Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another go at updating dependencies #192

Merged
merged 10 commits into from
Oct 23, 2016
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ structures:
* [Bifunctor](#bifunctor)
* [Profunctor](#profunctor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this list. It's duplicative now that the diagram is up to date. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's best to keep this. It's nice to have a fallback in case something happens with the image, different people process information differently, and it's still plaintext so it can be searched.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two points in favour of the ASCII version. 😜

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

I'm fine with the output graph being ASCII. I just don't want to maintain the shape of the graph in raw ASCII.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm totally with you. A program like dot which generates an ASCII diagram would be neat!

I very much like your change. Thanks for taking the time to work on it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does support multiple output formats, including plain. plain gives you the size of the graph, a sequence of nodes with positions, and a sequence of edges with position if you want to parse the coordinates into an ascii thing. It looks like a regular language, so probably not too hard to parse.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! I may investigate that one day (but certainly not today).


<img src="figures/dependencies.png" width="677" height="212" />
<img src="https://cdn.rawgit.com/fantasyland/fantasy-land/master/figures/dependencies.svg" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inadvisable:

Use a specific tag or commit hash in the URL (not a branch). Files are cached permanently based on the URL.

The approach I used with Orthogonal was to add the SVG in one commit then reference its location by commit hash in the following commit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Makes sense.


## General

Expand Down Expand Up @@ -210,7 +210,7 @@ method takes one argument:

3. `ap` must apply the function in Apply `b` to the value in
Apply `a`

1. No parts of return value of that function should be checked.

### Applicative
Expand Down
35 changes: 35 additions & 0 deletions figures/dependencies.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
digraph {
node [fontcolor=blue;shape=plaintext]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's s/blue/#4078c0/ to match GitHub's link colour.


# Algebras
Applicative [URL="#applicative"];
Apply [URL="#apply"];
Bifunctor [URL="#bifunctor"];
Chain [URL="#chain"];
ChainRec [URL="#chainrec"];
Comonad [URL="#comonad"];
Extend [URL="#extend"];
Foldable [URL="#foldable"];
Functor [URL="#functor"];
Monad [URL="#monad"];
Monoid [URL="#monoid"];
Profunctor [URL="#profunctor"];
Semigroup [URL="#semigroup"];
Setoid [URL="#setoid"];
Traversable [URL="#traversable"];

# Dependencies
Applicative -> Monad;
Apply -> Applicative;
Apply -> Chain;
Chain -> ChainRec;
Chain -> Monad;
Extend -> Comonad;
Foldable -> Traversable;
Functor -> Apply;
Functor -> Bifunctor;
Functor -> Extend;
Functor -> Profunctor;
Functor -> Traversable;
Semigroup -> Monoid;
}
67 changes: 0 additions & 67 deletions figures/dependencies.mp

This file was deleted.

Binary file removed figures/dependencies.png
Binary file not shown.
4 changes: 4 additions & 0 deletions figures/dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

dot -Tsvg -odependencies.svg dependencies.dot
dot -Tpng -odependencies.png dependencies.dot
Loading