Earlier quoted context omitted.
> a new syntax How is the syntax new? It looks like lispy - see the outer parens in the examples given.
Heh, every time you show a average developer lisp for the first time the reaction is the same. Little do they know conditionals, GC, REPLs, macros and more comes from the syntax and language dreamed up in the 50s/60s.
Why Janet? (2023)
81–90 of 292 posts
Re: Why Janet? (2023)
#82Earlier quoted context omitted.
This is such a undervalued benefit, once you've learned s-expressions, you can basically learn a bunch of languages without having to learn completely new syntax. It'll be slightly different, with different idioms and names, but a hell of a lot easier than doing the same across every "It's like C but 50% of the syntax is different actually" language out there, which is most of them.
Is the syntax really the stumbling block for most languages? Would Rust's lifetimes or Swift's isolation rules be easier if they used more parens? Are the scoping rule differences between Emacs Lisp and Scheme easier to comprehend because the syntax is similar?
Re: Why Janet? (2023)
#83Always nice to see janet getting some attention. shout out to one modern feature: sandbox "Disable feature sets to prevent the interpreter from using certain system resources. Once a feature is disabled, there is no way to re-enable it." https://janet-lang.org/api/misc.html#sandbox
Re: Why Janet? (2023)
#84It also turns out that the mix is due to the standard library leaning on raw C loop iterations underneath whenever it can. Which is great! But it confuses the library's interface paradigms.
Re: Why Janet? (2023)
#85Earlier quoted context omitted.
> Also my main objection to Lisps is still the horrible bracket syntax. Yes it's unambiguous and easy to parse, but it's HORRIBLE to read and edit. I use Parinfer, which allows me to edit Janet as if it was an indentation-based language.
Yeah I mean I guess if you have to use that syntax, it's nice to have a better editor for it. But IMO the existence of that tool clearly demonstrates that the syntax is pretty bad.
Re: Why Janet? (2023)
#86> 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…
When round brackets are used, the first element in the list defines how the rest of the list is interpreted, for example:
(func a b c) — run a function with its parameters
(macro x y z) — expand a macro with its parameters
([p q r] …) — “bare” function body that starts with a vector of parameters, and executable forms follow.
Square brackets are used where elements are the same “kind”, and the first one is not special, e.g.:
(defn f [a b c] …) — a collection of same-kind parameters, the first parameter is not special
(let [a 1 b 2] …) — a collection of bindings, the first binding is not special
The only exception that comes to mind is grouping multiple matching elements in `case`, but it for ergonomics.
Once I got the logic, when which is used, I changed my mind, and ever since I’ve felt it’s beautiful.
Re: Why Janet? (2023)
#87Earlier quoted context omitted.
Heh, every time you show a average developer lisp for the first time the reaction is the same. Little do they know conditionals, GC, REPLs, macros and more comes from the syntax and language dreamed up in the 50s/60s.
I don't see why Lisp's history would necessarily imply the family is worth learning in 2026. What (other than macros) do lisps offer that other modern languages don't?
Re: Why Janet? (2023)
#88Always nice to see janet getting some attention. shout out to one modern feature: sandbox "Disable feature sets to prevent the interpreter from using certain system resources. Once a feature is disabled, there is no way to re-enable it." https://janet-lang.org/api/misc.html#sandbox
It's a really cool feature but what is a scenario when your average programmer needs such sandboxing?
Re: Why Janet? (2023)
#89Earlier 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.
Re: Why Janet? (2023)
#90Always nice to see janet getting some attention. shout out to one modern feature: sandbox "Disable feature sets to prevent the interpreter from using certain system resources. Once a feature is disabled, there is no way to re-enable it." https://janet-lang.org/api/misc.html#sandbox
It's a really cool feature but what is a scenario when your average programmer needs such sandboxing?