4 ms·
Developer in Racket, does not have S-expressions syntax? Why? Would love to use some scripting lisp on my machine.
by Gonzih 12y ago
Developer in Racket, does not have S-expressions syntax? Why? Would love to use some scripting lisp on my machine.
- xiaq 12y agoMaybe some lisp hackers gradually find out that a lot of parenthesis is not that fun for everyone. Not meant to enrage Lisp hackers, I actually find parenthesis bearable. There is also Pyret(http://www.pyret.org/ http://www.pyret.org/) created by some people on the PLT team (you can confirm this by looking at the owner of their Github repo https://github.com/brownplt/pyret-lang https://github.com/brownplt/pyret-lang). But more surprisingly it's implemented in JavaScript...
- agumonkey 12y agoAs usual, one just need a paredit equivalent to forget about parens forever. I also remember an extension (maybe emacs, or a scheme SRFI) removing the top-level parens (implicit rewriting rule). repl> defun id (x) x repl> defun fact (n) (if (< n 2) 1 (* n (recur (1- n)))) A little more pleasant for people used in curly braces I'd say.
- xiaq 12y agoCodes are read much more often than written. paredit makes editing parens easier, but reading them is still difficult for the unskilled (rainbow parens help, but it's still far from painless). Compare this to how autocompletion makes it easier to write a VeryVeryVeryVeryVeryVeryVeryLongMethodName but doesn't make it any easier to read.
- agumonkey 12y agoI don't know, properly abstracted LISP code is 'supposed' to be tiny (you have all you need to write nice DSL/API) so you don't have long winded things on screen. And I have a differing opinion about code meant to be read. This is a side effect of syntaxful languages read statically in buffer editors. You want to understand LISP ? you load the code, play with and evaluate sub expressions, and sexps/paredit is of great help here.
- rcfox 12y agoI think you're referring to sweet-expressions. http://srfi.schemers.org/srfi-110/srfi-110.html http://srfi.schemers.org/srfi-110/srfi-110.html
- agumonkey 12y ago--Nope-- Kinda, I actually blended this with something else, which was more of a simple editor hack to avoid typing the top parens. Now things are clear. Thanks for the link though. Anybody actually wrote code in sw-exps ?
- jpolitz 12y agoPyret is implemented in JavaScript so we can have a completely in-browser runtime. And since the Pyret compiler is implemented in Pyret, that comes along for free and can be run in the browser as well. JS is far from an ideal compilation target (especially for a functional language, it requires jumping through some extra hoops [1]), but compiling to it lets us deliver the language to students with no installation necessary [2]. [1] http://www.ustream.tv/recorded/43777177 http://www.ustream.tv/recorded/43777177 [2] https://code.pyret.org https://code.pyret.org
- xiaq 12y agoHey, I just checked out your homepage and learned that Pyret is already being used to teach programming at Brown University. Cool!
- arnsholt 12y agoGood luck convincing a serious Lisp afficionado that his preferred syntax schema isn't some kind of Platonic ideal though.
- jkleiser 12y agoIf your machine is running some Unix OS, then PicoLisp is what I would recommend. -> http://picolisp.com/ http://picolisp.com/
- berdario 12y agoSo you'd want something like the Lush of yore? http://lush.sourceforge.net/ http://lush.sourceforge.net/
- ICWiener 12y agoSCSH: http://scsh.net/ http://scsh.net/