Live data from Hacker News

Janet: a lightweight, expressive and modern Lisp

janet-lang.org

271–280 of 280 posts

Re: Janet: a lightweight, expressive and modern Lisp

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

More precisely, Lisp

... without cons,

without arbitrary precision integers, fixed precision integers, rationals and complex numbers,

without image-based development,

without the conditions-restart system,

without CLOS,

etc.

It's interesting to note, since Janet is a bytecode interpreter, that we've have had a full Common Lisp implementation for years (CLISP) that provides all the features above (plus many many others) with a download size (1.8MB) just slightly bigge than to Janet's.

Re: Janet: a lightweight, expressive and modern Lisp

#272
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…

>Does anyone have pointers to books or websites to learn 'real-world' LISP programming?

https://lisp-lang.org/learn/getting-started/

You can start here to set up your IDE and then read the "Practical Common Lisp" book.

Re: Janet: a lightweight, expressive and modern Lisp

#273
post #91

For those who would prefer a more traditional albeit possibly less “lightweight” alternative there’s always Embeddable Common Lisp.

Or, since Janet is a bytecode interpreter with a download size of <2MB, there's CLISP which also fits that criteria, while providing the full power of Common Lisp and a nice FFI with C.

Re: Janet: a lightweight, expressive and modern Lisp

#274

Any tutorial about Janet?

The Janet documentation is sufficient to get going. It reads pretty much like a tutorial. At least if you have any lisp/scheme experience. https://janet-lang.org/docs/index.html I downloaded a couple weeks ago. I really wanted to build an executable, but I couldn’t. It seemed all the docs on this aspect were out of date or my build was broken in this respect.

oh okay, freecodecamp course would be great :-D

Re: Janet: a lightweight, expressive and modern Lisp

#275
post #106

Earlier quoted context omitted.

What I like in Janet (I'm just a noob so take this comment with a grain of salt as it will sound superficial): - Easy to get started: one click install, great website and concise docs. No matter what some people say, getting started in Clojure is a nightmare. - Lightweight and fresh. No JVM, no Node. - Freedom and expressivity. Mutable or immutable data structures, ultimately is up to me. It might bite me down the ro…

I've posted this quote before, but it might help explain why making Clojure easier to get into maybe hasn't been a priority for Hickey et al. So we need players. I would rant here, but I won't. But look at this guitar player with blisters. A harpist has blisters, a base player with blisters. There's this barrier to overcome for every musician. Imagine if you downloaded something from GitHub and it gave you blisters.…

What turned me of from clojure when I tried it last time was "Why my trivial syntax errors like unmatched brackets or easy semantic errors like wrong number of parameters to 'built in' functiins blow up in my face with java stack that involves some parser or something only after I 'lein run' the program?" I used vs code with most popular clojure plugin and I was expecting more.

Re: Janet: a lightweight, expressive and modern Lisp

#277
post #137

I like it, and I am considering using it as a scripting language. It was clear and easy how to build it for my Windows 10 box, and it is relatively small. I have always like the small Lisps like PicoLisp, but PicoLisp is not Windows friendly; it's very POSIX-dependent. I haven't had great experiences with Cygwin. PicoLisp works on WSL/WSL2 though.

Have you seen https://janet-shell.org ?

Re: Janet: a lightweight, expressive and modern Lisp

#278

Earlier quoted context omitted.

Well, Oracle JDK is a non-starter outside enterprise settings these days. You should be using Zulu or Corretto, and both are much easier to download.

No, you should almost certainly be using openjdk, which oracle jdk is based off, unless you have a compelling reason an alternative implementation is better.

OpenJDK releases become unmaintained as soon as a new release comes out, not ideal for anyone who cares about stability. Zulu and Corretto backport bug and security fixes to supported releases.

Re: Janet: a lightweight, expressive and modern Lisp

#279

Earlier quoted context omitted.

>For what it's worth, having used Clojure for work for a couple years now, and ditching leiningen for deps.edn (built in package and dependency management that hooks into maven), I've not had an issue with it. >... >To be clear, projects like this can be run with the base Clojure distribution, no additional tools required. Didn't you just say that dependency management hooks into Maven? So doesn't that imply you need…

> So doesn't that imply you need to get Maven set up before you can run a Clojure project? Not sure what is meant by "get Maven set up". With Clojure it does not involve any additional work, it's just built in to the Clojure runtime, and it goes ahead and fetches your dependencies either when you ask it to, or right before loading your program for the first time. I think they just use the Maven repositories, as in th…

Then surely, you need to set up a Maven server before you can use Clojure.

Re: Janet: a lightweight, expressive and modern Lisp

#280
post #277
post #137

I like it, and I am considering using it as a scripting language. It was clear and easy how to build it for my Windows 10 box, and it is relatively small. I have always like the small Lisps like PicoLisp, but PicoLisp is not Windows friendly; it's very POSIX-dependent. I haven't had great experiences with Cygwin. PicoLisp works on WSL/WSL2 though.

Have you seen https://janet-shell.org ?

I had, but it is for unixes, and I am primarily on Windows. I have a Linux box, WSL2, and an iMac, but all of my paying work is on Windows. I like them all, and I like Janet a lot!
Post reply on HN