Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Pavel Bažant
On Sun, Jul 21, 2013 at 2:43 PM, Gath-Gealaich gath.na.geala...@gmail.comwrote: On Sat, 20 Jul 2013 14:28:59 +0200 Pavel Bažant pbaz...@gmail.com wrote: On the other hand, imagine math notated the same way programming languages are. That would be awful! IMHO, it is awful for PL, too, but

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Pavel Bažant
There are various ways to present the same structure. Trees, for example, can be represented top-down, bottom-up, left-to-right, dynamically (front to bottom), graphically, textually, etc. Each representation can also lead to different ways of editing them. So each application wants to

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Pavel Bažant
Well, I'm not a mathematician, but when I have to do equations, the problem I have in doing math on a screen doesn't come from the text matrix, but rather from the lack of automatic tools to manipulate the equations. On the paper, hand written math notation is optimized enough so you can

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Pavel Bažant
This! There have been so many attempts - by people who were by no means stupid - to replace text as the primary representation of code! And ALL of them have failed, miserably! The best anyone has ever achieved was to enthuse a few managers, much to the detriment of the engineers who

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Pavel Bažant
Thank you for the pointers to potentially relevant work. PB On Sun, Jul 21, 2013 at 12:43 AM, John Carlson yottz...@gmail.com wrote: I believe that X3D-Edit provides dual views. On Jul 20, 2013 5:26 PM, John Carlson yottz...@gmail.com wrote: Sorry if I mixed 2D and 3D ideas here. On Jul

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Pavel Bažant
Yes, what you write is what I had in mind. But this would really be abandoning 1d representation. I consider this to be a very important conceptual shift, not a mere moderate change! The presentation would be still 1d-like, but this is not important -- you may very well switch among several

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread John Carlson
The structures you need when programming behavior are lists of operations, something like lisp's cond with parameters, and the ability to refer to a cond from anywhere in the program (recursion, procedure call). Everything else is icing on the cake. ___

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Sam Putman
On Sun, Jul 21, 2013 at 5:04 AM, Gath-Gealaich gath.na.geala...@gmail.comwrote: On Sat, 20 Jul 2013 17:54:54 +0200 frank fr...@frankhirsch.net wrote: Hmm, perhaps extremes are a bad thing, but some moderate changes could yield improvements? I've recently thought of a programming system

Re: [fonc] Macros, JSON

2013-07-21 Thread James McCartney
I thought about this briefly. One issue is how to distinguish literal strings from identifiers. On Sun, Jul 21, 2013 at 10:28 AM, John Carlson yottz...@gmail.com wrote: Hmm. I've been thinking about creating a macro language written in JSON that operates on JSON structures. Has someone done

Re: [fonc] Macros, JSON

2013-07-21 Thread Alan Moore
As an alternative to JSON you might consider EDN: https://github.com/edn-format/edn Alan On Jul 21, 2013, at 11:46 AM, John Carlson yottz...@gmail.com wrote: Hmm. I've been thinking about creating a macro language written in JSON that operates on JSON structures. Has someone done similar

Re: [fonc] Macros, JSON

2013-07-21 Thread Alan Moore
JSON is all well and good as far as lowest common denominators go. However, you might want to consider EDN: https://github.com/edn-format/edn On the other hand, if you are doing that then you might as well go *all* the way and re-invent half of Common Lisp :-)

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Alan Moore
Looks interesting. Have you seen LightTable? If not, see: http://www.lighttable.com/ Alan Moore On Sun, Jul 21, 2013 at 12:03 PM, Sam Putman atmanis...@gmail.com wrote: On Sun, Jul 21, 2013 at 5:04 AM, Gath-Gealaich gath.na.geala...@gmail.com wrote: On Sat, 20 Jul 2013 17:54:54 +0200

Re: [fonc] Macros, JSON

2013-07-21 Thread John Carlson
You would have to create a JSON object which would have key (identifier), value pairs. On Jul 21, 2013 3:22 PM, James McCartney asy...@gmail.com wrote: I thought about this briefly. One issue is how to distinguish literal strings from identifiers. On Sun, Jul 21, 2013 at 10:28 AM, John

Re: [fonc] Macros, JSON

2013-07-21 Thread John Carlson
I think what would be more difficult would be identifying what is persistent and what is runtime values. Also, JSON doesn't contain pointers, so one would have to use strings for pointers. On Jul 21, 2013 3:22 PM, James McCartney asy...@gmail.com wrote: I thought about this briefly. One issue

Re: [fonc] Macros, JSON

2013-07-21 Thread John Carlson
Or numbers for pointers... On Jul 21, 2013 3:43 PM, John Carlson yottz...@gmail.com wrote: I think what would be more difficult would be identifying what is persistent and what is runtime values. Also, JSON doesn't contain pointers, so one would have to use strings for pointers. On Jul 21,

Re: [fonc] Macros, JSON

2013-07-21 Thread John Carlson
What makes this important is whether your running in stateless or stateful mode. If you only run the macro once no big deal. If you try to run on a server, you may find that you need to reset items like cursors to their original values. On Jul 21, 2013 3:43 PM, John Carlson yottz...@gmail.com

Re: [fonc] Macros, JSON

2013-07-21 Thread John Carlson
Hmm. Seems like someone has already done XMLisp. I thought s-expressions were the lowest common denominator. JSON is all well and good as far as lowest common denominators go. However, you might want to consider EDN: https://github.com/edn-format/edn On the other hand, if you are doing that

Re: [fonc] Macros, JSON

2013-07-21 Thread Casey Ransberger
Lisp is such a joy to implement. FORTH is fun too. I'm working on a scheme-alike on and off. The idea is to take the message passing and delegation from Self, expose it in Lisp, and then map all of that to JavaScript. One idea I had when I was messing around with OMetaJS was that it might

Re: [fonc] Macros, JSON

2013-07-21 Thread Casey Ransberger
Probably a more usable language would be arrived upon via some extensions to JSON. May I recommend OMetaJS? :) The lack of a unique atomic symbolic literal as distinct from a string is one of the things I'm grappling with right now. To get that I'd need to intern the atoms. Jury's out whether

Re: [fonc] Macros, JSON

2013-07-21 Thread Tristan Slominski
All this talk of macros and quotes reminds me that there is Kernel language where they are extraneous (if I understand it correctly). Operative and applicative combiners are used explicitly: http://www.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unrestricted/jshutt.pdf On Sun, Jul 21, 2013 at

Re: [fonc] Flat text and 1D syntax considered harmful

2013-07-21 Thread Sam Putman
On Sun, Jul 21, 2013 at 1:32 PM, Alan Moore kahunamo...@closedsource.comwrote: Looks interesting. Have you seen LightTable? If not, see: http://www.lighttable.com/ Alan Moore Indeed! Although I currently use Catnip: https://github.com/bodil/catnip Because the source is available now and

Re: [fonc] Macros, JSON

2013-07-21 Thread BGB
On 7/21/2013 12:28 PM, John Carlson wrote: Hmm. I've been thinking about creating a macro language written in JSON that operates on JSON structures. Has someone done similar work? Should I just create a JavaScript AST in JSON? Or should I create an AST specifically for JSON manipulation?