4 ms·
I would like to see a light-syntax dialect of Lisp that recognized semantic white space to get you out of the parentheses maze. (But you could still optionally
by jackfoxy 10y ago
I would like to see a light-syntax dialect of Lisp that recognized semantic white space to get you out of the parentheses maze. (But you could still optionally use parens when you wanted.)
Disclaimer: I've been coding almost exclusively F# and SQL for nearly 3 years, and any kind of ceremony and noise characters in code just throw me off. Typescript is being hard on me right now.
- jackfoxy 10y agoPredictably I offended somebody. Discussions of parens in Lisp often turn out this way. I actually think Lisp is a beautiful language, the only language (other than assemblers) that I'm somewhat familiar with that is homoiconic. (At least a couple more according to https://en.wikipedia.org/wiki/Homoiconicity. https://en.wikipedia.org/wiki/Homoiconicity.)
- qwertyuiop924 10y agoActually, that's already been done in Scheme. Three times. Wisp(http://www.draketo.de/proj/wisp/ http://www.draketo.de/proj/wisp/) is probably the best one. It runs as a preprocessor, but if you use a scheme with the right syntax hooks (guile, racket, a few others), you might find a direct implementation. In fact, the main distribution has one for guile. There's also something similar for Common Lisp, but I don't know where or what.
- zeveb 10y ago> I would like to see a light-syntax dialect of Lisp that recognized semantic white space to get you out of the parentheses maze. Take a look at sweet-expressions: http://readable.sourceforge.net/ http://readable.sourceforge.net/
- qwertyuiop924 10y agoI'd reccomend wisp over readable: it's more readable than readable.
- zeveb 10y agoThe wisp I found is JavaScript-written-in-S-expressions, not Lisp-written-in-something-other-than-S-expressions. Naturally, I tend prefer S-expressions, but I was responding to someone who wanted a homoiconic alternative.
- lispm 10y agoReduce/RLISP looks like this: symbolic procedure detq u; % Top level determinant function. begin integer len; len := length u; % Number of rows. for each x in u do if length x neq len then rederr "Non square matrix"; if len=1 then return caar u; matrix_clrhash(); u := detq1(u,len,0); matrix_clrhash(); return u end; Which would be approximately look like this in Common Lisp: (defun detq (u &aux (len (length u))) (dolist (x u) (if (not (= (length x) len)) (error "Non Square Matrix"))) (if (= len 1) (return-from detq (caar u))) (matrix-clrhash) (setf u (detq1 u len 0)) (matrix-clrhash) u)