Live data from Hacker News

Janet: a lightweight, expressive and modern Lisp

janet-lang.org

51–60 of 280 posts

Re: Janet: a lightweight, expressive and modern Lisp

#51
I'd love to hear more from the author (can someone interview him for a podcast please? :-). He also has another programming language called Fennel [1] which compiles a lisp like language to Lua.

Both Fennel and Janet seem to orbit around Clojure ideas.... interestingly one of Fennel's main contributors [2] is also the author of Clojure's most popular build system, Leiningen.

1: https://fennel-lang.org/

2: https://technomancy.us/186

Re: Janet: a lightweight, expressive and modern Lisp

#52
post #40
post #23

Okay, so when Clojure came along, it came with a strong underlying philosophy of what the language was supposed to be/do. Among them were design decisions such as, e.g.,: - VMs, not OSes, are the platforms of the future, so target the JVM - Object Orientation is overrated, but polymorphism is a good thing - Multi-core is here to stay, so use immutable data structures to greatly facilitate writing correct concurrent p…

Yet Clojure supports a subset of CLOS, so not so much overrated after all.

Clojure was never against any of the ideas in OO, just that they should be accessible individually if or when they make sense. Traditional OO is very “all in”, while Clojure is very a-la-carte use the bits that make sense for the problem you are trying to solve. Clojure also encourages a data-over-objects and a functional-first approach, but when you need the OO features, they’re there and you should use them.

Re: Janet: a lightweight, expressive and modern Lisp

#53
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?

I can understand it's a traditional name, but maybe we can appreciate that it's a new/stand-alone language and that modern/expressive function names are an improvement and a breath of fresh air.

Re: Janet: a lightweight, expressive and modern Lisp

#54
post #47
post #41

Earlier quoted context omitted.

> antiquated VM I'm always flabbergasted about the ignorance against the JVM on this site. There is nothing out there that has seen similiar research and optimisations and has so good monitoring/debugging tools.

I did a JVM targeting language as a research project, and was involved into porting KVM to an obscure architecture. It's been a while of course (early 00s) so maybe I misremember something or there were huge strides of progress in JVM. Can you jump over 64Kb in bytecode yet? Allocate a lexically scoped variable? Of course, enormous amount of work has been put into making this particular pig fly at reasonable speed. D…

From the narrow scope of web development, JVM is fine. Kotlin is able to have every ergonomic feature you'd want from a language, and it gets closer to the performance of C in TechEmpower than many other languages (notably C#, Node, and Python, three of the most popular languages).

Tuning can be a pain, but scaling anything is hard.

Re: Janet: a lightweight, expressive and modern Lisp

#55
post #34
post #23

Okay, so when Clojure came along, it came with a strong underlying philosophy of what the language was supposed to be/do. Among them were design decisions such as, e.g.,: - VMs, not OSes, are the platforms of the future, so target the JVM - Object Orientation is overrated, but polymorphism is a good thing - Multi-core is here to stay, so use immutable data structures to greatly facilitate writing correct concurrent p…

The first point clearly didn't pan out. In reality, applications ended up bundling their own OSes along, so Clojure is stuck with antiquated VM on its ankle for no good reason.

That "antiquated" VM is head and shoulders above any other extant runtime in compilation, GC and observability. Not only that, most of the major innovations in recent years in those areas seem to be happening there. Moving from the JVM to almost anything else -- be it Python, Go, Erlang or Node -- feels like being transported to medieval society. Don't get me wrong, some find it liberating as in, huh, I turns out I can survive without my smartphone, but calling the state-of-the-art technological leader "antiquated" is taking it way too far. If you care about performance, productivity and observability, there really aren't that many alternatives out there, and whatever adequate alternatives there are, they are even more "antiquated." And guess what? It turns out that a great many people care about those things.

Re: Janet: a lightweight, expressive and modern Lisp

#56
post #26
post #4

2020: a programming language is named Janet; a child is named X Æ A-12. How did we come to this.

It's not really something new. Ada ( https://en.wikipedia.org/wiki/Ada_(programming_language) ) was created 40 years ago. Kids with crazy names is a long standing tradition, going back millenia :-)

You are right, just the timing and example is so striking :)

Re: Janet: a lightweight, expressive and modern Lisp

#57
post #17

Is it compiled or interpreted? If interpreted does it use existing interpreter? The description mentions Lua, does it use the Lua engine? Does it have JIT? If it is compiled is it based on LLVM?

It doesn't "depend" on Lua at all, but you can definitely feel inspiration from Lua in the language. Has coroutines, tables, small and easy to embed as a design goal, has a LPEG-like PEG built-in. Really lovely if you can appreciate those things in Lua-land.

Re: Janet: a lightweight, expressive and modern Lisp

#58
post #55
post #34

Earlier quoted context omitted.

The first point clearly didn't pan out. In reality, applications ended up bundling their own OSes along, so Clojure is stuck with antiquated VM on its ankle for no good reason.

That "antiquated" VM is head and shoulders above any other extant runtime in compilation, GC and observability. Not only that, most of the major innovations in recent years in those areas seem to be happening there. Moving from the JVM to almost anything else -- be it Python, Go, Erlang or Node -- feels like being transported to medieval society. Don't get me wrong, some find it liberating as in, huh, I turns out I c…

It is state of the art in the same sense that America is the uncontested leader in WWE.

Re: Janet: a lightweight, expressive and modern Lisp

#59
post #40

Earlier quoted context omitted.

Yet Clojure supports a subset of CLOS, so not so much overrated after all.

Clojure was never against any of the ideas in OO, just that they should be accessible individually if or when they make sense. Traditional OO is very “all in”, while Clojure is very a-la-carte use the bits that make sense for the problem you are trying to solve. Clojure also encourages a data-over-objects and a functional-first approach, but when you need the OO features, they’re there and you should use them.

Just to clarify, CLOS is very a-la-carte too.

Re: Janet: a lightweight, expressive and modern Lisp

#60
post #58
post #55

Earlier quoted context omitted.

That "antiquated" VM is head and shoulders above any other extant runtime in compilation, GC and observability. Not only that, most of the major innovations in recent years in those areas seem to be happening there. Moving from the JVM to almost anything else -- be it Python, Go, Erlang or Node -- feels like being transported to medieval society. Don't get me wrong, some find it liberating as in, huh, I turns out I c…

It is state of the art in the same sense that America is the uncontested leader in WWE.

Is it? I've looked hard and couldn't find any runtime that isn't more than five years behind OpenJDK(+Graal) in those areas, but maybe I missed something. I'm not saying it's perfect, but there's nothing out there that's better in those areas.
Post reply on HN