7 ms·
Eliza in SNOBOL4
- JKCalhoun 2y agoI 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 2y agoNeither 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 2y agoBoth SNOBOL and its spiritual successor Icon did some interesting things with control flow.
- stvltvs 2y agoThat brings me back! One of my profs had us use Unicon, an extension of Icon that he designed.
- JadeNB 2y agoI 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 2y agoPragprog 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-in-seven-weeks/ https://pragprog.com/titles/dzseven/seven-obscure-languages-...
- JadeNB 2y agoHuh, 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_(programming_language) https://en.wikipedia.org/wiki/Occam_(programming_language)) tells me it isn't so, though.
- dreamcompiler 2y agoIcon is a very cool language. Everything is a generator.
- __jonas 2y agoThe fact that one of the variables is named 'POST' makes some of this code read quite funny in todays context
- deleted 2y ago[deleted]
- lysace 2y agoMemories 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 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 2y agoOne really awesome thing.. a lot (most?) of that stuff is still available online today! https://discmaster.textfiles.com/browse/10852/Simtel20_Sept92.cdr/msdos 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/ https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/
- lysace 2y agoCool :) 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 2y agoClose 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...
- 2y ago
- tomcam 2y agoI’ve wanted to see SNOBOL code in the wild for 40 years. Long time getting that itch scratched.
- gustavopezzi 2y agoA 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 2y agoThe 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 https://dl.acm.org/doi/pdf/10.1145/365153.365168
- 8bitsrule 2y agoCertainly 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 2y agoWeizenbaum 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 2y agoAmazing, now I can add SNOBOL to my list of languages with variable variables: PHP SNOBOL
- ithkuil 2y agoPerl (disabled with use strict) Bash Python (via locals() and globals()) JavaScript (via eval) R
- jimcollinswort1 2y agoNice 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 2y agoMy 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.
- cafard 2y agoI took a programming languages course from a professor what written a book on SNOBOL. It was out of print, so he distributed photocopies. I didn't see much point in it, but when I encountered Perl a bit later, it did help.