Live data from Hacker News

Why Janet? (2023)

ianthehenry.com

201–210 of 292 posts

Re: Why Janet? (2023)

#201
post #4

> But by allowing you to unquote literal functions, Janet makes it possible to write macros that are completely referentially transparent. These lisp guys really get excited over very abstract things. If you say this to an average person on the street they will probably try to run away.

> If you say this to an average person on the street they will probably try to run away.

This is the average reaction I get any time I get the "so what do you do" question. I try to stay very vague "I do computer work" or something. Or I'll say "Oh, nothing interesting" and try to change the subject. Any more specific than that and they start looking for the exits.

Re: Why Janet? (2023)

#203
post #172

Earlier quoted context omitted.

> advanced HTTP routing What do you concretely mean by this? I use https://github.com/joy-framework/joy for all web stuff and can probably get your missing features in within the week.

TLS. There are some curl wrappers but last time I checked they did not work

There's a few that don't work, but one works phenomenally well— CosmicToast/jurl is incredible (unless you're on Windows—the library as a whole does work on Windows but the build script doesn't have Windows instructions in it, you have to hack that yourself).

Re: Why Janet? (2023)

#204
post #158
post #144

Earlier quoted context omitted.

My first question too, and I checked out the linked book [1], and sure seems like it! There's global functions like `janet_init()` and `janet_loop()` all over the place. A language shouldn't advertise itself as "embeddable" if it does this. It means you can't have multiple interpreters, you can't use it on multiple threads, etc. GNU Guile does this too, and it's a baffling decision! For my field (audio plugins like V…

Janet global state is thread local;[1] janet_init() is called once per thread. [1] official docs: https://janet-lang.org/capi/embedding.html

So you can't execute a Janet script on a different thread than it was created on? Still not good: if you're making audio plugins, you don't control the threads which your program runs on. It's just not good enough, IMHO.

Re: Why Janet? (2023)

#205

Earlier quoted context omitted.

on my way!

I like the Lobsters stance on AI. Also posts are tagged hence you can decide for yourself if the topic may be interesting despite being touched by AI. I haven't found a way to join Lobsters yet hence for the meantime I keep posting here only. Not so much of an issue since I am mostly a happy lurker.

Here's the lobsters stance in case anyone is wondering:

https://lobste.rs/s/29pm2f/llm_generated_submissions_should_...

TL;DR Plenty of ideological opposition which will loudly call you out for any usage of AI, and also quite a few nuanced takes which will no doubt be overridden by the vocal opposition. It got to the point the site itself told me to leave.

I don't feel comfortable posting my projects there anymore, even though they do have meaningful human authorship. Still have my account, but I'm essentially a lurker now. I'll participate if someone else independently posts my stuff there.

Feel free to reach out and introduce yourself if you want an invite.

Re: Why Janet? (2023)

#206
post #114
post #40

Earlier quoted context omitted.

The non-commutavity is a feature, not a bug. It allows you to have clearly defined parsing for grammars that would traditionally be considered ambiguous.

But that’s not how humans writing code generally think about ambiguous expressions. You can see that by how few precedence rules programmers tend to internalize, and often prefer extra parentheses to make sure that the parser interprets it the way they mean.

We absolutely order more likely / preferred options before other options. Codifying that as a short circuit optimization is a feature.

Re: Why Janet? (2023)

#207
post #3

This post is refreshing - smells of the pre AI discussions on the internet. A new language, a new syntax, heavy debate with people who have spent years writing code. I think someone should start a community online where AI isnt allowed.

[deleted]

Re: Why Janet? (2023)

#208
post #172

Earlier quoted context omitted.

> advanced HTTP routing What do you concretely mean by this? I use https://github.com/joy-framework/joy for all web stuff and can probably get your missing features in within the week.

TLS. There are some curl wrappers but last time I checked they did not work

I am happy with https://github.com/pyrmont/churlish

Re: Why Janet? (2023)

#209
post #32

Seems some of the listed advantages for Janet would also apply for tcl (small/simple, easy to learn, embeddable, usable as a shell, great for domain specific languages). It would be interesting, to me at least, to see a fan of Janet compare the two.

I've only used Tcl briefly, mostly for automation which it's great at. But it's a Algol-like imperative language, doesn't have any type of macros and makes everything based on strings (which makes sense for automation) instead of lists, with all the tradeoffs that comes with. It seems easier to figure out what the similarities are, because I think they're pretty few, they seem to differ more than they are similar.

Tcl is pretty good at functional-programming type stuff, and it can absolutely do anything that you could do with a macro. It isn't Algol-like at all imo, maybe beyond some superficial syntax. It feels a lot more like if LISP and Bash had a baby out of wedlock.

(I've written a lot of Tcl over the years and it'll always have a spot in my heart)

Re: Why Janet? (2023)

#210

> SETQ is def At first I said "what" out loud, since SETQ doesn't create bindings, it only updates them then I read the doc ( https://janet-lang.org/docs/bindings.html ) and the author is indeed wrong ("bindings created with def are immutable"). He probably meant "SETQ is set". I really want to like Janet, as it seems to be the sweet spot between Guile, Tcl and CL (minus the speed/maturity of SBCL) but I have a visce…

> I have a visceral reaction to square brackets

Once you understand how destructuring works in Clojure, it then becomes obvious what role square-brackets play.

Post reply on HN