Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Heresy, a BASIC-inspired functional Lisp (github.com/jarcane)
34 points by jarcane on Nov 16, 2014 | hide | past | favorite | 13 comments



If you could elimiate the outermost braces and have a line continuation character you might get something even less intimidating.

In other words anything between two auccessive non escaped line endings is treated as being parenthesized. Suddenly you can write lisp without parens everywhere.


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


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.


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

  (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.


I expected GOTO implemented with continuations. Very disappointing.


CL can already do GOTO. And the BREAK and CARRY implementations use exit continuations.

I did consider doing it in CL though because then I'd have an excuse to call FUNCTION and FUNCALL "SUB" and "GOSUB".


Nice, but I miss ON ERROR RESUME NEXT.


I love the name.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: