Live data from Hacker News

Janet: a lightweight, expressive and modern Lisp

janet-lang.org

11–20 of 280 posts

Re: Janet: a lightweight, expressive and modern Lisp

#12
post #8

janet:1:> (cons 1 2) compile error: unknown symbol cons on line 1, column 1 while compiling repl janet:2:> (list 1 2) compile error: unknown symbol list on line 2, column 1 while compiling repl janet:3:> (vector 1 2) compile error: unknown symbol vector on line 3, column 1 while compiling repl I certainly need to learn the basic idioms of this dialect; it looks nothing like Common Lisp under the hood.

Is it really Lisp without cons?

Re: Janet: a lightweight, expressive and modern Lisp

#13
post #10

Lisp languages should be great for embedding into games to implement game logic, instead of more straightforward solutions such as embedding Lua. I've always wanted to explore this for my iOS side-project game, which now uses an event-based system inspired by ReactiveX, implemented in Lua. This works pretty well but is very hard to debug. The main thing holding me back to try to replace it with something Lisp-like is…

> but when I try to reason about common subproblems I really have no idea how to map them to something like Lisp. For example how to efficiently implement a message bus with observers that can register for certain events.

I think that's a badly posed question. The main benefits of using Lisp are its introspection and interactivity. You can use the REPL to inspect your message bus at runtime, you can modify parts of it as it runs, you can interactively debug errors as they happen, but none of that is directly related to "how to implement a message bus".

I think that is more of an ADS question that it is a Lisp question; an efficient message bus, no matter whether you implement it in Lisp or in C or in Haskell, needs some synchronization primitives from the programming language core that are likely backed by OS primitives, as well as some data structures that need to be cleverly designed to be fast. Neither of these is language-specific - only means of implementing and using those might be language-specific.

In other words: Lisp makes it possible to be more productive by means of dramatically reducing the time of feedback loop and by means of providing in-depth language introspection, but it doesn't solve the problem of actually needing to figure out how to design programs and data structures. That's why e.g. SICP is not a Scheme tutorial, despite using Scheme throughout the whole book.

Re: Janet: a lightweight, expressive and modern Lisp

#14
post #12
post #8

janet:1:> (cons 1 2) compile error: unknown symbol cons on line 1, column 1 while compiling repl janet:2:> (list 1 2) compile error: unknown symbol list on line 2, column 1 while compiling repl janet:3:> (vector 1 2) compile error: unknown symbol vector on line 3, column 1 while compiling repl I certainly need to learn the basic idioms of this dialect; it looks nothing like Common Lisp under the hood.

Is it really Lisp without cons?

Yes, it seems so. Try the REPL available at the website.

Re: Janet: a lightweight, expressive and modern Lisp

#16
post #12
post #8

janet:1:> (cons 1 2) compile error: unknown symbol cons on line 1, column 1 while compiling repl janet:2:> (list 1 2) compile error: unknown symbol list on line 2, column 1 while compiling repl janet:3:> (vector 1 2) compile error: unknown symbol vector on line 3, column 1 while compiling repl I certainly need to learn the basic idioms of this dialect; it looks nothing like Common Lisp under the hood.

Is it really Lisp without cons?

[deleted]

Re: Janet: a lightweight, expressive and modern Lisp

#18
post #11

1) How is this different from other Lisps or Schemes? 2) When promoting a new programming language, always provide a nontrivial example. Couple of pages of code. Mandelbrot generator, desk calculator, notekeeping app, that sort of thing.

And the motivation for designing the new language. What problems does it solve better than existing languages? How does it promote the creation of maintainable programs? Etc, etc.

Re: Janet: a lightweight, expressive and modern Lisp

#19
This sounds awesome!

I was about to try and extend a software-product with graalvm to extend it live in clojure.

But Janet sounds like a couple less hoops to jump through.

Also, I won't have to deal with Oracle at all :D which is really the main reason I haven't begun work on this project yet.

Re: Janet: a lightweight, expressive and modern Lisp

#20
post #18
post #11

1) How is this different from other Lisps or Schemes? 2) When promoting a new programming language, always provide a nontrivial example. Couple of pages of code. Mandelbrot generator, desk calculator, notekeeping app, that sort of thing.

And the motivation for designing the new language. What problems does it solve better than existing languages? How does it promote the creation of maintainable programs? Etc, etc.

> What problems does it solve better than existing languages? How does it promote the creation of maintainable programs?

I broadly agree that widespread adoption probably requires answering some sort question like these.

But sometimes people create languages just because they are fun to create, and they think other people might enjoy using them.

Post reply on HN