[HN Gopher] Eliza in SNOBOL4
___________________________________________________________________
Eliza in SNOBOL4
Author : todsacerdoti
Score : 99 points
Date : 2024-10-19 17:44 UTC (1 days ago)
(HTM) web link (dl.acm.org)
(TXT) w3m dump (dl.acm.org)
| JKCalhoun wrote:
| I have never looked at SNOBOL code before. I had heard of it
| because the arcade game _TRON_ had a SNOBOL level (in addition to
| levels: FORTRAN, BASIC, etc.).
|
| I had also not seen the _Eliza_ code before. Very fun.
| sedatk wrote:
| Neither have I, and this has gotten me excited solely because
| of that. I had heard SNOBOL's name back in the 80's a lot,
| along with COMAL, COBOL, FORTRAN, RPG, etc. This looks like a
| hybrid between COBOL and FORTRAN :)
| mhd wrote:
| Both SNOBOL and its spiritual successor Icon did some
| interesting things with control flow.
| stvltvs wrote:
| That brings me back! One of my profs had us use Unicon, an
| extension of Icon that he designed.
| JadeNB wrote:
| I was always fascinated by that whole lineage Snobol ->
| Icon -> Unicon. I seem to remember one of the members
| (Icon?) is in "7 languages in 7 weeks." I'm sorry not to
| see them take off, although the recent flood of stories on
| Prolog (two of them!) makes me wonder if we might see the
| revival of Icon one of these days.
|
| (Is Rebol related, or am I just free-associating languages
| with interesting control structures?)
| dugmartin wrote:
| Pragprog just published a new book this month with SNOBOL
| in it:
|
| Seven Obscure Languages in Seven Weeks
|
| https://pragprog.com/titles/dzseven/seven-obscure-
| languages-...
| JadeNB wrote:
| Huh, interesting! The introduction is explicit that it is
| considering _old_ languages, but somehow I 'd thought
| that occam was comparatively recent--at least, 21st-
| century. Wiki (https://en.wikipedia.org/wiki/Occam_(progr
| amming_language)) tells me it isn't so, though.
| dreamcompiler wrote:
| Icon is a very cool language. Everything is a generator.
| __jonas wrote:
| The fact that one of the variables is named 'POST' makes some of
| this code read quite funny in todays context
| lysace wrote:
| Memories from when the majority of my programming
| information/influences (I was bbs/modem-less) in the early 90s
| came from this CD-ROM disc that I had purchased. It was from:
| https://en.wikipedia.org/wiki/Simtel
|
| The CD-ROM had this whole SNOBOL directory iirc. This CD-ROM was
| my entire world for like two years (until I got Internet access
| in 1995). I miss having oodles of time with zero pressure to do
| something that pays the bills.
|
| It was like having this gigantic curated dump of collected,
| sometimes quite old information from a connected world I had no
| access to. It felt so weird. Like discovering ancient alien
| civilizations, with no information on how to decipher it all.
|
| I think so many of us were so starved for information back then.
| mindcrime wrote:
| One really awesome thing.. a lot (most?) of that stuff is still
| available online today!
|
| https://discmaster.textfiles.com/browse/10852/Simtel20_Sept9...
|
| I was always partial to the CMU AI archive back in the day, and
| that stuff is still out there too:
|
| https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/
| lysace wrote:
| Cool :) Directory MSDOS/SNOBOL4/
| Filename Type Length Date Description
| ==============================================
| AISNOBOL.ARC B 286049 871217 SNOBOL language for MSDOS
| AISNOBOL.TXT A 5750 871217 Description of files in
| AISNOBOL.ARC VSNBL220.ZIP B 250971 920312 Vanilla
| SNOBOL4, PD vers. 2.20 of the language VSNOBOL4.ARC B
| 258956 871217 Vanilla SNOBOL4, PD version of the language
| VSNOBOL4.TXT A 5984 871217 Description of VSNOBOL4.ARC
| - Vanilla SNOBOL4
| anthk wrote:
| Close to having a complete distro in CD's in early 2000's or 3
| DVD in early mid 2000's.
|
| Debian used to ship tons of geeky lore, fun manuals, serious
| manuals, oddities here and there, weird languages, compilers
| and manuals...
| sedatk wrote:
| I had my own utility distributed in Simtel CDs. It was an
| offline mail reader for FidoNet called Wolverine. I think the
| filename was w230.zip :)
| tomcam wrote:
| I've wanted to see SNOBOL code in the wild for 40 years. Long
| time getting that itch scratched.
| gustavopezzi wrote:
| A couple of years ago I was lucky to teach a compiler class with
| Roberto Ierusalimschy from PUC-Rio, where we used a PEG parser
| for Lua called LPEG. That semester we spoke a lot about LPEG's
| implementation and that was very important for me to understand
| the original motivations for SNOBOL. I'm glad to see more
| examples of proper SNOBOL code in action. Thanks for the post.
| syndicatedjelly wrote:
| The original paper by Weizenbaum is a blast to read. The sample
| interaction with ELIZA is genuinely humorous. He also makes a
| number of observations that sound like precursors to societal
| issues today, such as how humans may perceive human-like
| machines, and whether it matters if humans can even recognize the
| non-humans among us.
|
| https://dl.acm.org/doi/pdf/10.1145/365153.365168
| 8bitsrule wrote:
| Certainly one of the first algos to demonstrate that humans are
| quite accepting of a hint of machine intelligence that is
| laughably far from what they are projecting upon it. Much like
| politics and advertising in that way.
| syndicatedjelly wrote:
| Weizenbaum was certainly cynical of and horrified by people's
| willingness to accept these machines so easily. But this
| paper didn't express those concerns directly, but felt rather
| hopeful and forward-looking. Yes, look how ridiculous this
| sample interaction is. But the fact that we all agree that
| this is ridiculous, means we can all agree to move forward
| together, with a common understanding of what "better" is.
|
| I am not sure if I agree with this sentiment (the way forward
| in computing has arguably never been entirely clear), but I
| still am excited for the future
| b800h wrote:
| Amazing, now I can add SNOBOL to my list of languages with
| variable variables:
|
| PHP
|
| SNOBOL
| ithkuil wrote:
| Perl (disabled with use strict)
|
| Bash
|
| Python (via locals() and globals())
|
| JavaScript (via eval)
|
| R
| jimcollinswort1 wrote:
| Nice to see some SNOBOL again. I used it in college at Indiana
| University late 70s, and again a few years later for work at
| Arthur Anderson.
| masto wrote:
| My first "job" was at a place that did a lot of crunching on big
| data (or what counted for big at the time). I'd go there after
| school and do things like rotate the backup tapes. Until they
| found out I could, and then it got a lot more interesting.
|
| One of the things I loved about that experience was that I got to
| try a ton of programming languages. They'd use anything under the
| sun if it had a useful feature. A lot of it was compiled BASIC,
| but it was also my first exposure to C, Lisp, APL, and...
| SPITBOL. Which was the boss's favorite.
|
| It was a SNOBOL variant that they had a compiler for that ran on
| the 286 PCs of the day. I didn't write much, if anything, in it,
| but I remember the reason they liked it so much was because it
| had pattern matching features, kind of like how AWK and Perl made
| working with regexes trivial. The other memorable aspect as I
| recall was that every line of code could also contain not just
| one, but two GOTOs (I think one for success and one for failure),
| which made it a bit.. interesting.. to try to follow the flow.
___________________________________________________________________
(page generated 2024-10-20 23:01 UTC)