Live data from Hacker News

Why Janet? (2023)

ianthehenry.com

41–50 of 292 posts

Re: Why Janet? (2023)

#41

(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.

Personally, I would be really interested in a language like lua/wren which can transpile to Janet too.

Re: Why Janet? (2023)

#42
post #28

why is it called Janet? perhaps to prevent it to be identified with the acronym for Lots of Irritating Single Parenthesis?

If it was called [Something] Lisp, Lisp enthusiasts would complain that it’s not a lisp because it does not use linked lists as the primary data structure.

Re: Why Janet? (2023)

#44

(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.…

What would be a better syntax according to you? I have found Janet’s syntax very pleasant to work with as opposed to JavaScript, Lua or even Python.

Re: Why Janet? (2023)

#45
post #2

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! How fast is it? 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 wish this project had been a success (or something similar to it): https:…

> 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.

Re: Why Janet? (2023)

#46
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.

The amazing thing about AI is that you don’t even need AI superfans to shoehorn it into a conversation that doesn’t even touch on AI. Detractors will do it for them.

Yes, it’s similar to Trump. But that makes sense right? AI is changing the world drastically, and so is Trump and his fascist friends.

Re: Why Janet? (2023)

#47
post #8

> Instead of regular expressions, Janet’s text wrangling is based around parsing expression grammars. Parsing expression grammars are simpler, more powerful, and more predictable than regular expressions. I would dispute that this is the case. In PEGs, alternatives are not commutative, unlike in regular expressions. This can lead to quite frustrating debugging. While a valid choice, the advantage over REs is overstat…

"small peg tracer"[1] is really helpful for breaking down a PEGs operation

[1] https://github.com/sogaiu/small-peg-tracer

Re: Why Janet? (2023)

#48

I've been drawn into the Janet posts that surface every once in a while here on HN, but found the otherwise highly praised "Janet for Mortals", not being for mortals at all.

Personally I get hung up on the macro syntax being near the beginning, but there is so much valuable stuff past that

Re: Why Janet? (2023)

#49
post #19

Earlier quoted context omitted.

somehow i also never got the idea around these languages like lisp. I remember i studied them in school - but i quickly forgot and never got around to relearning it.

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.

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.

Re: Why Janet? (2023)

#50

Earlier quoted context omitted.

you ever try to explain object oriented programming languages and their benefits to the "average person on the street"?

somehow i also never got the idea around these languages like lisp. I remember i studied them in school - but i quickly forgot and never got around to relearning it.

It took me probably 5 years of writing Clojure before it clicked. Once you get used to structural editing and repl driven development, it’s really hard to go back to syntactic languages.

It’s kind of like in treesitter style editing, where you can “swap these two arguments,” “select this function,” “wrap this in a try block” with a single keyboard command… but way more standardized and granular. Plus with the ability to execute anything you highlight

All that and then you realize you can store code as data (since it’s just a data structure) and run data as code.

I think most programmers don’t realize how arbitrary the difference is between code and data until they get used to using LISP.

Post reply on HN