Kashmir: A statically typed Lispy language compiling to Go
owickstrom.github.io
Kashmir: A statically typed Lispy language compiling to Go
1–10 of 75 posts
Re: Kashmir: A statically typed Lispy language compiling to Go
#2 (define (factorial n)
(if (
and ;; here the type of y is inferred
(fn ([x : int] y) (+ x y))Re: Kashmir: A statically typed Lispy language compiling to Go
#3Re: Kashmir: A statically typed Lispy language compiling to Go
#4I'd really like to see an snippet in the front page. There are some samples in the tutorial, but I like to see an example to get some feeling of the language. For example, a mix of (define (factorial n) (if ( and ;; here the type of y is inferred (fn ([x : int] y) (+ x y))
Re: Kashmir: A statically typed Lispy language compiling to Go
#5Re: Kashmir: A statically typed Lispy language compiling to Go
#6I am sure Kashmir is a great idea - in fact, I was wondering why there couldn't be a typed lisp compiling to C, but please put more coding example!
Re: Kashmir: A statically typed Lispy language compiling to Go
#7How do goroutines work out? And/Or channel and stuff like `select`?
Re: Kashmir: A statically typed Lispy language compiling to Go
#8I am sure Kashmir is a great idea - in fact, I was wondering why there couldn't be a typed lisp compiling to C, but please put more coding example!
Cool! :) I'll add more examples as soon as possible. Actually there's not much you can do with Kashmir at the moment, I've mostly focused on getting the basic model up so there's no library functions available etc. I have an idea about how to read the type signatures from compiled Go packages to be able to do simple interop between Kashmir and Go - no extern declarations or anything like that.
(let ((x :string "hello"))
(fmt.Println (+ x "owickstrom")))
(Although in that case the type can probably be infered...)Re: Kashmir: A statically typed Lispy language compiling to Go
#9In my mind, the second one is where this language can really find it's niche.