Live data from Hacker News

Janet – a Lisp-like functional, imperative programming language

github.com

61–70 of 143 posts

Re: Janet – a Lisp-like functional, imperative programming language

#61
post #59
post #55

Earlier quoted context omitted.

I use Janet most often as a glue for shell utilities using the sh package ( https://github.com/andrewchambers/janet-sh ). It's a great tool for building small containerized jobs. I think it has a ton of potential as the ecosystem grows and matures. Some rough spots: - No canonical http client. There are a few attempts at wrapping libcurl but nothing complete and well documented yet. However, the creator of Joy framew…

> I have never been successful getting any of the UI or drawing libraries to work. Have you tried jaylib (built on top of raylib)? I have gotten that to work well on macos, linux and windows. :) > The main http server circlet is MIT licensed, but it is built on top of Mongoose, which is GPL/paid commercial. Something to be aware of if you want to distribute binaries made with this library. While I haven't used it out…

The Mongoose github says it's MIT Licensed https://github.com/Automattic/mongoose

Re: Janet – a Lisp-like functional, imperative programming language

#63
post #30

Off topic: Is it just me or are there any others who find naming programming languages with women's names a bit weird? Julia, Janet, Eve... I understand the guy referring to his car as his "girlfriend" and give it a women's name. I just can't feel the same about tech. I guess this may be the nerd's way of immortalizing their sweetheart, but if I was a woman I'd rather prefer to be a car and not a programming language…

Ada, Alice... Interesting question, but it might just be a yellow volkswagon effect. Quickly looking at Wikipedia's list of languages, theres Babbage, Bertrand, Cecil, Darwin, Dylan, Escher, Euclid, Euler, Godel, Hume, Orwell, Tom, Zeno, and probably a few others I missed. EDIT: Haskell and Pascal, how embarassing to miss those

It is interesting that female-named languages from your examples generally use first-name, while male-named languages generally use surname.

Re: Janet – a Lisp-like functional, imperative programming language

#64

Anything new happen with Janet? https://news.ycombinator.com/item?id=28255116 (August 2021) [114 Comments] https://news.ycombinator.com/item?id=23164614 (May 2020) [269 Comments]

I'd never heard of it until https://news.ycombinator.com/item?id=28845971 was shared here yesterday. I guess I'm not alone in just finding out about it and that's why it's posted here.

Re: Janet – a Lisp-like functional, imperative programming language

#65
post #59

Earlier quoted context omitted.

> I have never been successful getting any of the UI or drawing libraries to work. Have you tried jaylib (built on top of raylib)? I have gotten that to work well on macos, linux and windows. :) > The main http server circlet is MIT licensed, but it is built on top of Mongoose, which is GPL/paid commercial. Something to be aware of if you want to distribute binaries made with this library. While I haven't used it out…

The Mongoose github says it's MIT Licensed https://github.com/Automattic/mongoose

Different mongoose in this case: https://cesanta.com/

Re: Janet – a Lisp-like functional, imperative programming language

#66
post #59
post #55

Earlier quoted context omitted.

I use Janet most often as a glue for shell utilities using the sh package ( https://github.com/andrewchambers/janet-sh ). It's a great tool for building small containerized jobs. I think it has a ton of potential as the ecosystem grows and matures. Some rough spots: - No canonical http client. There are a few attempts at wrapping libcurl but nothing complete and well documented yet. However, the creator of Joy framew…

> I have never been successful getting any of the UI or drawing libraries to work. Have you tried jaylib (built on top of raylib)? I have gotten that to work well on macos, linux and windows. :) > The main http server circlet is MIT licensed, but it is built on top of Mongoose, which is GPL/paid commercial. Something to be aware of if you want to distribute binaries made with this library. While I haven't used it out…

When I tried to use jaylib I was not able to get it to work at the time. Might have to give it another shot.

The http server used in Chidi is actually fairly new and I was not aware of it. It is part of the spork package. About two months ago I chatted with the creator of Janet about whether or not an http server will be added. He said it would not be added to core, but it looks like he added to spork about a month ago. It looks like it is a pure Janet implementation so there should be no licensing conflicts. I'll have to try it out.

Re: Janet – a Lisp-like functional, imperative programming language

#67

What's the advantage of not having lists? How does this affect one's programming style versus Scheme or Common Lisp (or Emacs Lisp, honestly the Lisp I'm most familiar with)?

Disclaimer: I've never used Janet, but I am pretty familiar with Clojure.

In Clojure, there are lists, but the most common structure for sequential data is actually a vector [1], which works more-or-less as a slightly modified version of the Clojure version of a hashmap. Advantages of doing it this way is that you get log32 indexed lookup times (vs linear for lists), and you also get log32 [2] append-to-the-end semantics instead of "push to the beginning" that you have with lists.

In practice it generally doesn't affect a lot, but occasionally when I do need to put an item in the front of a collection, I will wish I had used a list instead of a vector, but I feel like the far more-common usecase is to append to the end, since in Erlang there's been a few times where I end up having to reverse the list after I'm done building it.

[1] At least how I use it, I haven't done any statistics to prove this.

[2] Don't let the log scare you! Log32 is very good and also effectively constant time for most in-practice use cases. Log32 of a billion is basically six, meaning you're dealing with a constant factor times six hops for inserts and lookups on a billion elements.

Re: Janet – a Lisp-like functional, imperative programming language

#68
post #8

Earlier quoted context omitted.

Some interesting changes since August this year: - Threaded channels `ev/thread-chan` (`thread` has been deprecated [and removed in latest version [[1.18]]]) - JPM (Janet Package Manager) is now separate, not distributed together with Janet anymore - Janet binary can directly run image files with `-i`

(Not a lisp guy). What is an image and why would I want to run one? My best guess is that an image would be platform independent bytecode vs compiled executable?

When folks run emacs, they aren’t actually starting it entirely from scratch. They are booting up a similar “image”, which allows for much faster startup.

The lack of image support is what prevents Clojure from competing on startup time (but see also grallvm and babashka)

Re: Janet – a Lisp-like functional, imperative programming language

#69
post #19

This looks really interesting, going to check this out later today. Anyone using Janet for anything that would care to comment on their experience?

I'm making an editor, Freja, which is like a tiny Emacs with graphical support. Makes it fun to create gui apps and games. :) Ultima Underworld inspired game I'm making for a game jam: https://youtu.be/1fWsV83P-S8 Demo of pixel editor: https://www.youtube.com/watch?v=KOBi805nxNc Freja: https://github.com/Saikyun/freja --- My experience has overall been very nice. I come from Clojure, and comparing to that: - so nice…

Freja looks really cool! Thanks for sharing it. I find these types of projects very inspiring. They bring back the wonder and joy that I felt when I first discovered computers in the early 80s. You felt like you were in control of a whole new world and anything was possible.
Post reply on HN