3 ms·
People accidentally a scheme all the time. I first accidentalled a scheme in high school. I learned about S-types, which were to Lisp what JSON is to JavaScript
by frognumber 3y ago
People accidentally a scheme all the time. I first accidentalled a scheme in high school. I learned about S-types, which were to Lisp what JSON is to JavaScript. I made a language around then. Oops.
Some would argue Brendan Eich of Netscape accidentalled a scheme in JavaScript, but others would argue that he didn't. Most accidental schemes are pretty bad, and the original JavaScript fits the bill, or it doesn't, depending on what you think to be a scheme.
There's a law about that: https://en.wikipedia.org/wiki/Greenspun's_tenth_rule https://en.wikipedia.org/wiki/Greenspun's_tenth_rule
It comes up in most DSLs.
I bet this is a better accidental scheme, by virtue of the author, but a big part of the point of a scheme is that it's easy to implement, yet powerful. MIT freshman used to build a scheme interpreter and a scheme compiler in their first computer science course (6.001).
It's very easy to accidentally a scheme.
- robofanatic 3y agothats scheme accidentallification
- trollian 3y agoI think Eich intentionallyed a scheme.
- yarg 3y agoReminds me of carcinisation; lots of things turn into crabs.
- benj111 3y agoPlease people, wear protection when 'experimenting', especially as teenagers. A scheme is for life, not just for Christmas.
- simiones 3y ago> I learned about S-types, which were to Lisp what JSON is to JavaScript. Do you mean s-expressions here (sexps), or is there also a thing called s-types that I've been missing?
- frognumber 3y agoNeither. * I meant s-types. * There is no such thing. The problem, as Clinton: "It depends on what the meaning of the word 'is' is." S-types WERE a thing, but never a major one. I ran across them as a high school student on a random research project at a university as a summer internship of some kind. They were used by a handful of research groups for some data interchange format. Literally the only person who would find the interesting is myself, and not for what they were, but because they were my first exposure to Lisp / Scheme concepts, which I had not heard of before, and which triggered a series of (high school grade) epiphanies for me (which would probably be obvious to 50+% of the people here). As far as I know, S-types no longer exist. A quick web search brought up zero references. There is absolutely no reason to know about them in 2023. However, if you want to know about them: - They were quite literally S-expressions. All S-types were S-expressions - However, they were well-specified, so useful as an import/export format - In particular, they had research-grade libraries to do the above from at least two languages (I would guess Java and LISP, but I no longer recall; perhaps it was C++ and Scheme). - There was some attempt to simplify, but I no longer recall what it was. I recall that I was told it had something to do with lists versus function calls, but looking back on it, the explanation I recall being told makes zero sense. That's more likely a function of my memory than the explanation. I believe on that internship, my direct use of them was probably limited to looking at some data in that format. This was really at the outskirts of the project I was doing. They did inspire a lot of work during the school year, when I schemed for the first time, not really knowing what I was doing but figuring out a lot of stuff in the process. Looking back at it, though, having a standardized Python / JavaScript / etc. import/export library for some standardized version of S-expressions might be helpful. Or it might not be. Who knows.
- fanf2 3y agoSounds a bit like the S-expression syntax that was developed for SPKI/SDSI in the 1990s. I am surprised to find that the old spec has been revived after over 25 years https://datatracker.ietf.org/doc/draft-rivest-sexp/ https://datatracker.ietf.org/doc/draft-rivest-sexp/
- zelphirkalt 3y agoWhat is a Scheme and what is not a Scheme is actually pretty well defined in terms of language concepts and features. The JavaScript of back then is not that. Some Scheme may have served as something that Eich took hints from, but he did not create a new Scheme.
- bitslayer 3y agoTook hints from, ergo "an ad hoc, informally-specified, bug-ridden, slow implementation"
- frognumber 3y agoFYI: At the time, the creator of Scheme, Jerry Sussman, believed the JavaScript was a Scheme. I don't say this to claim he was right (I didn't agree with him, at the time), but merely to point out that "what is not a Scheme is actually" NOT "pretty well defined in terms of language concepts and features." A proper Scheme is as defined in Revised Report on the Algorithmic Language Scheme, but there are many improper half-baked Schemes too. Reasonable people can and do disagree about which things do and don't qualify.
- aidenn0 3y agoI think there is nothing more vacuous than taxonomy arguments (though they can be fun). Kent Pitman (KMP), for example, is on record as saying that Scheme is not a Lisp[1] 1: https://groups.google.com/g/comp.lang.lisp/c/Bj8Hx6mZEYI/m/6AWmNEwQR5YJ https://groups.google.com/g/comp.lang.lisp/c/Bj8Hx6mZEYI/m/6... (besides the inevitable flamewar started by @lisper's question, there's actually some good discussion between the "adults in the room" well downthread of what I linked).
- dahart 3y agoThe story goes Eich was hired to embed Scheme in a browser, and hung on to lambdas and functional concepts but lost homoiconicity by management fiat; they didn’t like the weird way it looked. He tried to intentionally a Scheme and ended up accidentally a Scheme step-cousin. It’s fair to say some argue it is a Scheme dialect, because some people do, and they’re not wrong, JS does share aspects. It’s also fair to say JS is not a Scheme, also true. I googled and found someone’s blog post with a fun description: “JS is stupid Lisp in Java’s ill-fitting clothing. It’s Alonzo Church going to a Halloween party as Alan Turing. It’s the lambda calculus in Turing-machine drag. It’s a quirky nerd with a cynical marketing department. (The syntax and the name of the language — JavaScript—were determined by Netscape’s desire to ride the coattails of Java’s popularity in the early 1990s.) It’s multiparadigm salad.” https://medium.com/thinking-with-computers/javascript-is-not-scheme-7a84889e9b3c https://medium.com/thinking-with-computers/javascript-is-not...
- taneq 3y ago> There's a law about that That was my first thought too. As the length of your codebase increases, the likelihood of (probably badly) accidentally a scheme'ing tends towards 1.