-
Notifications
You must be signed in to change notification settings - Fork 30
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
Metafont combinators #19
Conversation
to remove conflict with new combinator function
One possible idea (not sure if it's a good idea or not) is to make z1.- leaving unitX <> arriving unitY -.z2 .--. endpt z6 and we would no longer need e.g. the |
In general, I really like this though. Can you say a bit more about what exactly you don't like re: specifying directions? |
Mostly I am concerned about composition, which your monoid proposal addresses. Also, I would have liked to find a direction syntax that felt more like the Metafont syntax. Thinking through the monoid. We'd need to pick which side is used when combining two 'Just's; maybe there is a convention. We can change the join type from ´Either TensionJoin ControlJoin´ to ´Maybe (Either TensionJoin ControlJoin)´, where Nothing is the identity for ´mappend´ but defaults to ´tension 1´ if not overridden. I wonder if it better to make ´leaving´, ´arriving´, and friends functions Thoughts? Preferences? Brent Yorgey notifications@github.com wrote:
Sent from my Android phone with K-9 Mail. Please excuse my brevity. |
To be consistent with other things in diagrams, the convention would be that in |
Also, I'm not too worried about finding syntax that is like the Metafont syntax. Most users will not know Metafont, so it's more important to just have something simple and consistent. |
resolve trivial conflict in .cabal file Conflicts: diagrams-contrib.cabal
combinators Wrap the BasicJoin in Maybe to make the instances uniform
'arriving' and 'leaving' can be combined with <>
The commits above add the The result is a little funky, but I think the |
Yeah, that makes sense to me. |
This is a proposal for Metafont combinators, potentially a nicer interface than the text parser or the quasiquoter we've discussed. I'm pretty happy with the three new operators, but not terribly happy with the ways of describing paths, especially directions. Any better ideas?
See also the tutorial on these combinators: https://github.com/diagrams/diagrams-doc/blob/metafont/doc/metafont.rst
I'll submit a separate pull request for that after this one is closed, but I figure the examples may help when reviewing this.