Live data from Hacker News

Kashmir: A statically typed Lispy language compiling to Go

owickstrom.github.io

1–10 of 75 posts

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

#2
I'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

#4

I'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))

Good idea, thanks! I'll try to come up with something representative.

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

#6
post #3

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

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

#8
post #3

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

One thing I wonder: does let take types? Something like:

    (let ((x :string "hello"))
         (fmt.Println (+ x "owickstrom")))
(Although in that case the type can probably be infered...)
Post reply on HN