RE: Lark - A surface syntax for Common Lisp
"Adam Weaver (as adam at cleversure dot com dot au)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <SY5P282MB463816F52AA1A6C36FC5C30A9C6FA@SY5P282MB4638.AUSP282.PROD.OUTLOOK.COM> |
> From: [email protected] <[email protected]> On > Behalf Of Gerry Weaver (as gerryw at compvia dot com) > Hello All, > > I've been working on this thing for a while. I'm getting close to the point where > I'm going to call it good for now. I'm mainly working on the stdlib stuff (ie; http > server, http client, websockets, etc.). It isn't meant to replace Lisp. It is intended > to be an ergonomic extension. Hi Gerry, this is rather interesting indeed! What prompted this? Is this an extension language for something else? Or is it for standalone use? Is it an interpreted lang, or is it intended only to be compiled? Inquiring Minds Want To Know. > let x = 42 -- lexical binding (let) > let* y = x + 1 -- sequential binding (let*) let name = "Lark" -- > strings let pi = 3.14159 -- floats let ratio = 2/3 -- rationals let > hex = 0xFF -- hex literals let nothing = nil -- nil let yes = > true -- boolean true (t) let no = false -- boolean false (nil) let > ch = #\A -- character literal let kw = :hello -- keyword > symbol > > -- Assignment (mutation) > x := 100 -- setf Aha, you punted on using '=' for SETF 😊 I wrote a BASIC dialect for an internal extension language for my app. https://github.com/adamweaver/lw-basic It probably has bit-rotted a little bit, but I had no end of trouble in the parsing phase by using '=' for both SETF and EQUAL, like the BASICs of my childhood did. Re compilation, are you compiling to LISP and then using a native lisp compiler to turn into executable code? Or are you using a VM? Or something else entirely? For my BASIC dialect I decided to go meta-nerdy and compile the BASIC to a custom FORTH and interpret the FORTH code instead. Performance was much better than my first attempt (recursive descent interpretation of a sort of lispy lang). /Let Over Lambda/ convinced me that that could be a viable option. I'm interested in other solutions, because the solution I landed on was a bit metacircular ☹ Adam _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html