Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension
On Sat, Mar 03, 2012 at 10:37:10PM -0500, Ras Far wrote: letters correspond to grammar, words, or meaning. So we've got love, too (Aramaic word “Abba” = love of God or so...) Not quite, it's a familiar/intimate form of father, cf English papa, dada or daddy. -Brent ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension
On 3/3/12 10:37 PM, Ras Far wrote: Now the serendipity with Wren's linguistic research. And even the freegeek domain. Fantastic. Wren, your slides look great, thanks for the link, I think I'll read them tonight. Do you have a paper version of the slides at all? Slides can be a bit terse on their own. I have a draft, but alas it isn't fit for the light of day. I've been meaning to do a more full writeup of the metatheory and how it relates to monads, staged computing, etc.; but I haven't had the time yet. Perhaps this summer, if I can convince my advisers to accept it as one of my qual papers :) -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension
On 3/3/12 10:37 PM, Ras Far wrote: So we can have ... chiastic freesects? This sounds like too much fun! I find chiasmus is a term from linguistics? I'm not sure it's used much in linguistics per se, but it's common terminology from classics, rhetoric, and poetry. Literally chiastic just means X shaped or cross-aligned (as opposed to parallel-aligned). It's one of those nice geometric oppositions like cis-/trans-, iso-/anti-, co-/contra-, ipsi-/contra-,... -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension
So we can have ... chiastic freesects? This sounds like too much fun! I find chiasmus is a term from linguistics? From [1]: The elements of simple chiasmus are often labelled in the form ABBA, where the letters correspond to grammar, words, or meaning. So we've got love, too (Aramaic word “Abba” = love of God or so...) Also coincidental, since a lot of the literary instances are apparently found in sacred texts (although Coleridge comes up a lot too, cough). So many coincidences around this. I'd written up the idea for the Haskell extension in 2003 (calling them arbitrary sections), but only decided to implement them about a week ago. Had just gotten started about an hour earlier, when eyebloom on #haskell asks about the same thing, right down to the _ syntax. (I offered him collaboration but he didn't get back to me, hope you're not sore eyebloom, anyhow I don't mind you were maybe too busy.) Then I get hacking Language.Haskell.Exts and -- the most recent extension already added is TupleSections! And there's no other extension so related to this idea. Now the serendipity with Wren's linguistic research. And even the freegeek domain. Fantastic. Wren, your slides look great, thanks for the link, I think I'll read them tonight. Do you have a paper version of the slides at all? Slides can be a bit terse on their own. Yours Chiastically, Andrew [1] http://en.wikipedia.org/wiki/Chiastic_structure ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension
Hi John, Thanks for your feedback. It would be preferable to use regular parentheses to delimit the section, but it could only work in special cases. Consider this expression using free sections: map _[ f (g __ y) ]_ bs If that were written map (f (g __ y)) bs and parentheses used to delimit the freesect, that would give you the equivalent of map ( f _[ g __ y ]_ ) bs which is incorrect (doesn't type). Also, one may want more than a single free section in a RHS, which would not be possible without distinct grouping syntax. I looked into some sort of default context inference (like, the tighest grouping which passes the type check), but that gets fairly complicated and might still result in ambiguity, in case more than one possible grouping types correctly. I also set out originally to overload the single-underscore for wildcard, but was unsuccessful (reduce/reduce conflicts in the HSE parser), so I settled on double-underscore which I've come to think preferable. As I said on the linked web page, I'm still exploring default context inference (for interest's sake), and if anyone can suggest a nice way to use SYB to compute the join (in the semilattice sense) of all terms in a constructed tree which have type T, I'd really like to see that... -Andrew On Thu, Mar 1, 2012 at 10:01 PM, John Lask jvl...@hotmail.com wrote: On Wed, Feb 29, 2012 at 9:27 PM, Ras Farras...@gmail.com wrote: Hello, I bit premature perhaps but I wanted to post it on a leap day... http://fremissant.net/freesect Thanks for eyebloom on #haskell for motivating me to finally implement an old idea. Thanks to the rest on #haskell for doing their best to talk me out of it. ;) I make no claims regarding the usefulness of the extension, but some folks might find it interesting, or may just appreciate additional examples of using HSE and SYB. I regret that I am not a better Haskell coder, but it is what it is! Kind Reg'ds, Andrew Seniuk (rasfar) why couldn't you use standard brackets ( to delimit the extent ? I suppose that would have added complexity to the syntax analysis, however I think it would have been (in my mind) neater. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension
For anyone who tried building the implementation linked off the fremissant page (see above email), there was a glitch or two and this is fixed. The problem being simply the target path -- I build to a ramdisk because, as is often the case, GHC produces a rather large binary and I don't like to thrash my HDD during development. The executable is now produced in the root directory of the distro. Cheers, Andrew On Wed, Feb 29, 2012 at 9:27 PM, Ras Far ras...@gmail.com wrote: Hello, I bit premature perhaps but I wanted to post it on a leap day... http://fremissant.net/freesect Thanks for eyebloom on #haskell for motivating me to finally implement an old idea. Thanks to the rest on #haskell for doing their best to talk me out of it. ;) I make no claims regarding the usefulness of the extension, but some folks might find it interesting, or may just appreciate additional examples of using HSE and SYB. I regret that I am not a better Haskell coder, but it is what it is! Kind Reg'ds, Andrew Seniuk (rasfar) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension
On Wed, Feb 29, 2012 at 9:27 PM, Ras Farras...@gmail.com wrote: Hello, I bit premature perhaps but I wanted to post it on a leap day... http://fremissant.net/freesect Thanks for eyebloom on #haskell for motivating me to finally implement an old idea. Thanks to the rest on #haskell for doing their best to talk me out of it. ;) I make no claims regarding the usefulness of the extension, but some folks might find it interesting, or may just appreciate additional examples of using HSE and SYB. I regret that I am not a better Haskell coder, but it is what it is! Kind Reg'ds, Andrew Seniuk (rasfar) why couldn't you use standard brackets ( to delimit the extent ? I suppose that would have added complexity to the syntax analysis, however I think it would have been (in my mind) neater. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] FreeSect -- generalised sections syntax extension
Hello, I bit premature perhaps but I wanted to post it on a leap day... http://fremissant.net/freesect Thanks for eyebloom on #haskell for motivating me to finally implement an old idea. Thanks to the rest on #haskell for doing their best to talk me out of it. ;) I make no claims regarding the usefulness of the extension, but some folks might find it interesting, or may just appreciate additional examples of using HSE and SYB. I regret that I am not a better Haskell coder, but it is what it is! Kind Reg'ds, Andrew Seniuk (rasfar) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe