Show HN: Heresy, a BASIC-inspired functional Lisp(github.com)
github.com
Show HN: Heresy, a BASIC-inspired functional Lisp
https://github.com/jarcane/heresy
6 comments
There's an SRFI that outlines an indentation based Scheme syntax called Sweet-expressions. It also adds infix operations.
http://srfi.schemers.org/srfi-110/srfi-110.html
http://srfi.schemers.org/srfi-110/srfi-110.html
Interesting, turns out there is a version of this for Racket: https://github.com/takikawa/sweet-racket
I will have to take a gander and see if it's compatible.
I will have to take a gander and see if it's compatible.
It's an interesting idea. I'd have to study up a lot more on how to do reader macroing in Racket. Mostly I was more focused on terminology (going forward my naming policy will be to favor BASIC names over Lisp ones, same reason why print is display in Heresy), and on providing a kind of 'nutrasweet' Lisp rather than a full blown functional BASIC dialect (which is as yet beyond my skills with the language).
Like this toy lisp of mine: http://akkartik.name/post/wart
Odd.. I had a similar project I worked on at work one day out of boredom. Except mine was called "HereC", I was trying to make C more Basic like. Visual Basic 6 was my first language, so sometimes it's fun to 'go back' to it. GAMBAS is a neat little language I play with now and then.
euphoria [http://www.rapideuphoria.com/] is the closest I've seen to a decent c/basic cross. worth checking out if you're interested in that space.
Have you tried to use keywords instead of normal symbols in the forms?
For example, instead of
For example, instead of
(if *test* then *do1* else *do2*)
define it to use (if *test* #:then *do1* #:else *do2*)
[Disclaimer: I still use VB6 from time to time.]I didn't really think about it. Doing them as literals felt more idiomatic to classic BASIC, and it was easy to implement (initially) with syntax-rules.
Nice, but I miss ON ERROR RESUME NEXT.
I love the name.
In other words anything between two auccessive non escaped line endings is treated as being parenthesized. Suddenly you can write lisp without parens everywhere.