Alternatives to . for composition

At http://hackage.haskell.org/trac/haskell-prime/wiki/CompositionAsDot , there is a list of possible Unicode replacements for the '.' operator. Oddly, the canonical one is missing (from http://www.unicode.org/charts/PDF/U2200.pdf ): 2218 RING OPERATOR = composite function = APL jot 00B0 degree sign 25E6 white bullet I don't think any other Unicode character should be considered. (Is this the approved way to send minor updates like this?) Peace, Dylan Thurston

2218 RING OPERATOR = composite function = APL jot 00B0 degree sign 25E6 white bullet
I don't think any other Unicode character should be considered.
That's great but 1) I have no idea how to type it. Can I easily and comfortably? In emacs? 2) Will it show up in PuTTY (and everyone else's terminals/IDEs)? in everyone's mail readers (including Gmail)? 3) What encoding do my textfiles need to be in (i.e. how many bytes per char)? How do I do that? Does Haskell even support everything related to Unicode that we'd need? If the answers are satisfactory to all these questions, then Unicode is a good idea (and that's the ideal character). If not, we're sadly stuck in ASCII land. Jared. P.S. Plus that opens a lot of cans of worms for writing programs with all those fancy symbols! APL here we come! -- http://www.updike.org/~jared/ reverse ")-:"

On 2006-03-25 at 09:41PST "Jared Updike" wrote:
2218 RING OPERATOR = composite function = APL jot 00B0 degree sign 25E6 white bullet
I don't think any other Unicode character should be considered.
That's great but 1) I have no idea how to type it. Can I easily and comfortably? In emacs?
For emacs, just bind a key (C-. say) to (ucs-insert #X2218). ucs-insert comes from ucs-tables.
2) Will it show up in PuTTY (and everyone else's terminals/IDEs)?
Eventually.
in everyone's mail readers (including Gmail)?
Eventually, I should think. I'm using nmh, which has to be one of the least trendy MUAs about, and that can do it. What does this: ∘ look like in your email reader?
3) What encoding do my textfiles need to be in
Probably utf-8
(i.e. how many bytes per char)?
a bit more than one on average.
How do I do that?
Depends on the OS you are using. I've got locale set to en_GB.UTF-8 and it all more or less works.
Does Haskell even support everything related to Unicode that we'd need?
Not now, but Haskell' jolly well ought to.
If the answers are satisfactory to all these questions, then Unicode is a good idea (and that's the ideal character).
"Satisfactory" is in the eye of the beholder.
If not, we're sadly stuck in ASCII land.
It's far worse than that. We are stuck in an idiotic land where the meaning of a file depends on the meaning of a user settable variable in the OS. This is one of the many unpleasant consequences of untyped filesystems¹. Oh, and Haskell claims already to have unicode source files, but the compilers can't handle it.
Jared.
P.S. Plus that opens a lot of cans of worms for writing programs with all those fancy symbols! APL here we come!
It's a question of good style, isn't it? Using → instead of -> might be nice, but stringing together lots of arcane symbols like ₀∘°⁰ wouldn't be. For Haskell 98 I argued against unicode, preferring that we should stick with ASCII, but nowadays a language that doesn't handle unicode properly is going to look shabby in a few years. Jón [1] Something about which something should be done in Haskell... -- Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk

For emacs, just bind a key (C-. say) to (ucs-insert #X2218). ucs-insert comes from ucs-tables.
Sounds easy enough. I'll test emacs and my terminal and see about it.
2) Will it show up in PuTTY (and everyone else's terminals/IDEs)?
Eventually.
in everyone's mail readers (including Gmail)?
Eventually, I should think. I'm using nmh, which has to be one of the least trendy MUAs about, and that can do it. What does this: ∘ look like in your email reader?
Looks great in Gmail.
It's far worse than that. We are stuck in an idiotic land where the meaning of a file depends on the meaning of a user settable variable in the OS. This is one of the many unpleasant consequences of untyped filesystems¹.
That's a bad situation (i.e. idiotic).
Does Haskell even support everything related to Unicode that we'd need?
Not now, but Haskell' jolly well ought to. Oh, and Haskell claims already to have unicode source files, but the compilers can't handle it.
I agree this ought to be rectified, but since I'm not volunteering to do it, I personally can't ensure its adoption. But I'll be cheerleader for it!
If the answers are satisfactory to all these questions, then Unicode is a good idea (and that's the ideal character).
Your answers seem very satisfactory to me. I guess it's a question of support / using Unicode in practice.
P.S. Plus that opens a lot of cans of worms for writing programs with all those fancy symbols! APL here we come!
It's a question of good style, isn't it? Using → instead of -> might be nice
This seems reasonable. Haskell already has a lot of carefully chosen graphical notation that actually aids in readability. As long as the old version of "→" i.e. "->" works, I don't see this as a problem. Although all the lexers for all tools and compilers would have to be updated. If it's a new backwards-incompatible standard (like Haskell 2), then this isn't a problem. For Haskell', since the compilers don't already support things well enough it sounds like, (i.e. Unicode everywhere with all its complexities, plus "->" + "→", etc.) then maybe this is beyond the scope of Haskell'. But I hope these sorts of important improvements occur sooner than later. (Once again I'm only cheerleading.)
but stringing together lots of arcane symbols like ₀∘°⁰ wouldn't be.
And that's where APL breaks down. I don't see Unicode allowing for any more abuse than the current DIY infix operator already does.
For Haskell 98 I argued against unicode, preferring that we should stick with ASCII, but nowadays a language that doesn't handle unicode properly is going to look shabby in a few years.
True. Thanks for the enlightenment. Jared. -- http://www.updike.org/~jared/ reverse ")-:"

On Sat, 25 Mar 2006, Jon Fairbairn
For emacs, just bind a key (C-. say) to (ucs-insert #X2218). ucs-insert comes from ucs-tables.
You can also activate the TeX input method using C-u C-\ TeX RET (if leim is installed). Then you can insert many characters by typing their TeX names. The character ∘ can be inserted by typing \comp, for instance. Of course, this is not very useful unless you already know some TeX. -- /NAD

I am not sure how this look in other people's editors and mail- readers, but on my machine (Mac OS X Tiger) there is significantly more white space after the symbol than before. Is that normal?
For emacs, just bind a key (C-. say) to (ucs-insert #X2218). ucs-insert comes from ucs-tables.
You can also activate the TeX input method using C-u C-\ TeX RET (if leim is installed). Then you can insert many characters by typing their TeX names. The character ∘ can be inserted by typing \comp, for instance.
Doaitse Swierstra

Gah! I managed to send that without a content-type field (for bizarre reasons which I won't elaborate right now). Here it is again with what I hope is the right (utf-8) type, which ought to make it more legible in some email readers. On 2006-03-25 at 09:41PST "Jared Updike" wrote:
2218 RING OPERATOR = composite function = APL jot 00B0 degree sign 25E6 white bullet
I don't think any other Unicode character should be considered.
That's great but 1) I have no idea how to type it. Can I easily and comfortably? In emacs?
For emacs, just bind a key (C-. say) to (ucs-insert #X2218). ucs-insert comes from ucs-tables.
2) Will it show up in PuTTY (and everyone else's terminals/IDEs)?
Eventually.
in everyone's mail readers (including Gmail)?
Eventually, I should think. I'm using nmh, which has to be one of the least trendy MUAs about, and that can do it. What does this: ∘ look like in your email reader?
3) What encoding do my textfiles need to be in
Probably utf-8
(i.e. how many bytes per char)?
a bit more than one on average.
How do I do that?
Depends on the OS you are using. I've got locale set to en_GB.UTF-8 and it all more or less works.
Does Haskell even support everything related to Unicode that we'd need?
Not now, but Haskell' jolly well ought to.
If the answers are satisfactory to all these questions, then Unicode is a good idea (and that's the ideal character).
"Satisfactory" is in the eye of the beholder.
If not, we're sadly stuck in ASCII land.
It's far worse than that. We are stuck in an idiotic land where the meaning of a file depends on the meaning of a user settable variable in the OS. This is one of the many unpleasant consequences of untyped filesystems¹. Oh, and Haskell claims already to have unicode source files, but the compilers can't handle it.
Jared.
P.S. Plus that opens a lot of cans of worms for writing programs with all those fancy symbols! APL here we come!
It's a question of good style, isn't it? Using → instead of -> might be nice, but stringing together lots of arcane symbols like ₀∘°⁰ wouldn't be. For Haskell 98 I argued against unicode, preferring that we should stick with ASCII, but nowadays a language that doesn't handle unicode properly is going to look shabby in a few years. Jón [1] Something about which something should be done in Haskell... -- Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk

FYI, Cayenne used the center dot as composition. See the System$HO module.
http://www.cs.chalmers.se/~augustss/cayenne/system.html
I remember liking it but I think the ring operator would be closer to
mathematics notation and indeed the best choice.
Cheers,
/Josef
On 3/25/06, Dylan Thurston
At http://hackage.haskell.org/trac/haskell-prime/wiki/CompositionAsDot , there is a list of possible Unicode replacements for the '.' operator. Oddly, the canonical one is missing (from http://www.unicode.org/charts/PDF/U2200.pdf ):
2218 RING OPERATOR = composite function = APL jot 00B0 degree sign 25E6 white bullet
I don't think any other Unicode character should be considered.
(Is this the approved way to send minor updates like this?)
Peace, Dylan Thurston
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEJXsQVeybfhaa3tcRApNiAJ9eSfuIgaRkbJaOle1IG5AmzWoOfACdH9U1 Vh/63jQ4c0Rft041WGEbut8= =HF0S -----END PGP SIGNATURE-----
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime
participants (6)
-
Doaitse Swierstra
-
Dylan Thurston
-
Jared Updike
-
Jon Fairbairn
-
Josef Svenningsson
-
Nils Anders Danielsson