Live data from Hacker News

Kashmir: A statically typed Lispy language compiling to Go

owickstrom.github.io

11–20 of 75 posts

Re: Kashmir: A statically typed Lispy language compiling to Go

#11

Is this intended as a human-written language, or as a target for machine generated Go? In my mind, the second one is where this language can really find it's niche.

Human-written is the purpose, but as it builds on the LISP syntax, which is just simple data structures, generating it would be simple. I guess one could do a more Haskell-like syntax front-end for Kashmir and transform it.

Re: Kashmir: A statically typed Lispy language compiling to Go

#14
post #5

How do goroutines work out? And/Or channel and stuff like `select`?

Currently not at all. :) Haven't gotten that far yet, but I have it in mind. There will probably be a 1:1 mapping to these concepts in Kashmir.

Cool, looking forward!

Re: Kashmir: A statically typed Lispy language compiling to Go

#17

This is a fun project, I'm looking forward to seeing how far you can take it. One thing to note is that Go doesn't have TCO so performance when using a lot of recursion might be pretty bad or the compiler has to be smart and use loops and states.

JVM also doesn't have TCO, so Clojure has a special form, which transforms recursion into an ordinary loop: http://clojure.org/special_forms#Special%20Forms--%28recur%2...

Author of Kashimir could use a similar solution.

Re: Kashmir: A statically typed Lispy language compiling to Go

#18
post #16

Has anybody come across a list of languages that compile to Go?

There are a number of Lisp interpreters written in Go [0-3]. There is a Lua interpreter [4]. The only compiled language I know is Gisp [5] by jcla1. I also built on top of Gisp with Gsp [6] to provide wrappers to the Go stdlib and support more standard lisp functionality.

However, Kashimir is the first statically typed language implemented in Go that I have seen. The rest are dynamically typed.

[0] GLISP - https://github.com/zhemao/glisp

[1] golisp - https://github.com/SteelSeries/golisp

[2] go-lisp - https://github.com/janne/go-lisp

[3] Kakapo - https://github.com/bytbox/kakapo

[4] Golua - https://github.com/akavel/goluago

[5] Gisp - https://github.com/jcla1/gisp

[6] Gsp - https://github.com/gsp-lang/gsp

Post reply on HN