Hello fellow programmers. Look at your favourite programming language.
Now back to Lisp.
Now back to your favourite language.
Now back to Lisp.
Sadly, it isn't Lisp, but if you stopped wasting your time, it could feel like it's Lisp.
Where are you?
Reading in OldSpice-guy's voice as I introduce the ASM programming language.
What's on your mind?
Back at me.
ASM has it. The expressiveness and brevity augmented by powerful and extensible features.
ASM is now usable.
Anything is possible when your programming language is functional and not imperative.
It's highly munctional.
It's high time for more Another Syntactic Monstrosity examples, but first let's take a look at its development.
The new parsing strategy reminds of CommonLisp reader and reader-macros:
- The raw input is passed to the lexer (written in D) that uses dynamic syntax table - a set of regular expressions describing the syntax (defined in ASM) to tokenize the input into a token stream.
- Next, the token stream is passed to the parser (written in ASM with default implementation in D), that uses ASM functions, correlated to the syntax table, to dispatch the token stream and translate it to basic, lispy S-expressions (see LR parser for details on how it's done).This will allow ASM to act like any other language, given there's the syntax table available, making it perfect for DSL programming.
(lambda (x y) (pow (+ x y) 2))
...might be written as:
[x y => (x + y)^2]
...and ASM will happily accept it. Awesome!Continue reading
Finally. Good job, Lazy-me, keep it up! Or shall I say, 'keep it down', dohoho!
So we've seen latmab - the calculator and Scheme - RNoRS Scheme interpreter, both leading to the following, somewhat fun story... After having basics of Scheme implemented even though I did not have any previous Lisp experience, I figured I could do even better. Hell, let's actually learn some Lisp, said my inner smoking-hot stallion-programmer-guy!Continue reading