A Lisp syntax with less parentheses
medium.com
medium.com
And the idea behind CirruSepal is to write ASTs in Cirru Synax, such as ES6 AST(CirruScript), Racket AST, Julia AST. Actually I failed in generating LLVM IR from Cirru, so I tried Julia AST instead. It could be more fun if I had those skills.
Cirru Syntax is nice for exploring.
Also, I'm not even sure what some of the code in the demos even do:
set a
+ 1 2
, 3
supposedly translates into the Racket code: (set a (+ 1 2) (, 3))
;; which is also
(set a (+ 1 2) 3)
I think you don't want set here ("set" is many things, but not setting variables: http://docs.racket-lang.org/search/index.html?q=set); I think you want "define" (http://docs.racket-lang.org/reference/define.html?q=set#%28f...), which only takes two arguments.Comma syntax is not always preferred in a program, but it's quite useful in some cases. Suppose `(+ 1 2)` here is something deeply nested, then you can see its power:
set a
+
+ 1
+ 2
+ 3
+ 4 5
, 3
Yes, `define` is better. It's because ES5 doesn't use `Set` and I was using it as an alias of `set!`.I think the comma operator is horribly explained, and I don't currently understand it. It "turns the expression it belongs into several words(or expressions)." Apparently (, 3) is the same as 3. Is it the same as identity, because each new line is a function call? But the identity function doesn't return several values (what are "words" in this context?), but only one.
Also also, the section beginning "However, Cirru does contain tricky parts in representing strings in Cirru", beyond being awkwardly worded, is confusing too. The only explanation is it "behaves like a Bash", and says two expressions "are totally different". What behaving like Bash does is never explained, and because you show inputs but no outputs, I can't tell how it differs.
Your example of, I think, escaping double quotes in a string is compared to a print of these five variables. When you say the two prints are "totally different", is it because one print expression is called with three strings, and the other with five variables? Do you expect that to be a point of confusion for the reader? It seems as though the two print statements are totally unrelated, but by joining them with "these are totally different", it makes the reader try to see where the confusion would be. And I'm confused why anyone who's familiar with programming enough to read this introduction would think they're the same.
You say that "Quotes are required when a token contains whitespace", but what token contains whitespace? You seem to rely on unset variables (the second `print` has variables `data`, `a`, `b`, `c`, and `d`, which are defined nowhere).
+ a
+ 1 2
, 3 4 5
;; which is also
(+ a (+ 1 2) (, 3 4 5))
;; and
(+ a (+ 1 2) 3 4 5)