Live data from Hacker News

Why Janet? (2023)

ianthehenry.com

121–130 of 292 posts

Re: Why Janet? (2023)

#121
post #109
post #19

Earlier quoted context omitted.

The idea is that instead of having to learn tens of different syntactic constructs with subtle and often arbitrary differences, you just have parentheses and use them to build everything.

That just moves the subtle and often arbitrary differences to the functions and macros you use.

The kind of subtle difference I’m talking about is that in C, you have to put a semicolon after struct {…} and do {…} while (…), but not after other curly brace constructs. What would be the analogue in Janet?

Re: Why Janet? (2023)

#122
I have my qualms with Janet. Mostly, it's lack of package management versioning and lack of libraries in general (advanced HTTP routing, etc).

I do LOVE that Janet can create binaries with JPM, scripts, and is very portable. I once put the Janet programming language on the Playdate game console as POC.

I actually do enjoy writing Janet, but every time I do people think I created the language (I did not).

Re: Why Janet? (2023)

#124
post #101

Earlier quoted context omitted.

> I think someone should start a community online where AI isnt allowed. In case you haven't followed the saga, the latest[1] digg.com relaunch failed because they couldn't deal with the bot onslaught [2]. Whoever finds a reliable way to keep AI out of an online community first is likely to become a very rich person. [1] Second-to-last, actually, seeing as there seems to be a new homepage right now. [2] https://www.t…

> Whoever finds a reliable way to keep AI out of an online community first is likely to become a very rich person. I believe it’s the opposite: You have to pay competent human moderators. Like here on HN.

Half the posts here are AI grifting.

Re: Why Janet? (2023)

#125

I have my qualms with Janet. Mostly, it's lack of package management versioning and lack of libraries in general (advanced HTTP routing, etc). I do LOVE that Janet can create binaries with JPM, scripts, and is very portable. I once put the Janet programming language on the Playdate game console as POC. I actually do enjoy writing Janet, but every time I do people think I created the language (I did not).

Julia Evans has a fun blog post using Julia to visualize Gunzip: https://jvns.ca/blog/2013/10/24/day-16-gzip-plus-poetry-equa...

you should totally do a "Janet writes Janet" version

Re: Why Janet? (2023)

#126
post #115
post #75

Earlier quoted context omitted.

We've already got models that can handle it - eg web of trust. We don't want to use them. Plus "AI" is a spectrum, with "the AI fixed a typo for me" at one end, and "the AI writes my posts for me" at the other.

Web of trust has been a miserable failure because of the GPG's horrible UX and high entry barrier. It's dead, Jim.

I think they were referring to invitation trees like lobste.rs.

Re: Why Janet? (2023)

#127
post #15
post #6

Earlier quoted context omitted.

> Pretty compelling, especially "Janet does not adhere to the ancient customs. CAR is called first. PROGN is called do. LAMBDA is fn, and SETQ is def." - a sign of good sense for sure! Just FYI, many of these are also done in Scheme and its derivative Racket. They kept lambda (but even Python did that), but progn -> begin, setq -> set!, car -> first, and so on. > Also my main objection to Lisps is still the horrible…

I'm starting to prefer the s expression syntax when dealing with tree structures like json. I wonder if we were raised on tree based algebra if math would be easier to do, or harder. Like, solve for x. (= (+ (* 2 x) 3) 11) (= (* 2 x) (- 11 3)) (= (* 2 x) 8) (= x (/ 8 2)) (= x 4) Though this isn't too bad. (= (+ (pow x 2) (pow y 2)) (pow r 2))

If you ever used an RPN calculator then this is very familiar

Re: Why Janet? (2023)

#128

(defn foo [first & rest] ...) So basically Lisp 2.0. Although, this here is a good idea: "pass values from compile-time to run-time" Would be nice if some kind of "scripting" language be as fast as a compiled language, but without ruining the syntax. Just about 99% of the languages that are shown, have a horrible syntax. Syntax is not everything, but most language designers don't understand that syntax also matters.…

can't there theoretically be a language which transpiles to Janet to get all the benefits without additional paranthesis too? Not sure if such transpilation would have a perf hit though, I hope somebody responds who knows about it more. I don't deny that syntax matters itself too but there are some ideas of janet like sandboxing and other features which seem to me to be worth implementing in other languages too. Pers…

"... all the benefits without additional parenthesis too?"

I guess you don't like Lisp's syntax. I didn't either until I realized the key insight: when you're writing Lisp, you're basically writing an AST. Which is why it's so easy to manipulate your code. Want a new feature the language doesn't have, such as the pattern-matching they added to C# a few versions back? You can add it yourself; you don't need to wait for a language committee to implement it years after you needed it. That's all that macros are: functions that take AST and return AST, which is then executed.

And once I realized that Lisp's syntax was basically an AST, I no longer saw the parentheses. Now I just see blonde, brunette, redhead... Oops. Sorry. Wrong reference.

Re: Why Janet? (2023)

#129

Earlier quoted context omitted.

> I think someone should start a community online where AI isnt allowed. In case you haven't followed the saga, the latest[1] digg.com relaunch failed because they couldn't deal with the bot onslaught [2]. Whoever finds a reliable way to keep AI out of an online community first is likely to become a very rich person. [1] Second-to-last, actually, seeing as there seems to be a new homepage right now. [2] https://www.t…

Perhaps requiring webauthn credential for any post/comment with a whitelist of permitted webauthn hardware devices which must have touch/interaction enabled. I'd have to read the FIDO specs, however the only place I've seen webauthn hardware pinning in the wild is with Azure AD/Entra which is ostensibly based on token GUID. If this is the only enforcement mechanism available, it's spoofable.

Doesn't actually work that well. Browsers hate this, the hardware isn't actually difficult for bots to access, and privacy story is bad. There are solutions being worked on.
Post reply on HN