Icon Programming Language – A brief introduction (1993)
www2.cs.arizona.edu
www2.cs.arizona.edu
Every time I use generator functions in Python I wonder how many people realise this is a poor mans Icon.
It's worth pointing out that Unicon is where all the Icon development happens as OSS now. The current implementation can almost certainly still run my 19 year old program linked. http://unicon.org/
I remember a whole library with demo programs was available with the interpreter. It included a 'caricature generator' you should check out if you can find it back, that was fun.
Apart from that, there's a treasure trove of information available in articles and newsletters (The Icon Analyst [1], and The Icon Newsletter [2]), which are filled with little projects that please the mind.
[0] https://www2.cs.arizona.edu/icon/gb/index.htm
Thanks for the pointer. PL implementation books are my favorite sub-sub-genre.
Edit: there doesn't appear to be one for that specifically, but this list is kinda close.
One of the first non-trivial simulators that I wrote was an implementation of Icon's control structures using heap-allocated frames.
While heap allocating a frame is more expensive than incrementing/decrementing a stack pointer, managing lots of heap-allocated execution contexts is faster than managing lots of execution stacks, especially in a 32 bit world.
It had an ordinary stack for each thread, which was used mainly for running libc stuff.
The primary characteristic of both is that they have pervasive backtracking. The primary difference is that jq is built around a concept of immutable, copy-on-write data types. Well, the syntax is also radically different, but that's less interesting to me.
Anyways, I'm very fond of Icon, and I miss writing code in it. It really feels like a language that could have been a much better Python or Perl N. There was an effort to make it so called Unicon, but it never really took off.
Icon was the first language I really got enamored with. I took two classes from Ralph Griswold, and generators, backtracking, and string scanning made for really pretty algorithms. Python has /almost/ caught up to the expressiveness that Icon had in the late 80s / early 90s.
To me, Icon and jq are kindred spirits, even though they have nothing in common in terms of lineage.
I think SNOBOL predated the invention of structured programming, or at least Griswold wasn't aware of structured programming's advantages when he designed it.
edit: found his docs on the Icon language:
https://www2.cs.arizona.edu/icon/v95u.htm
Additional info/context here: