Live data from Hacker News

Why Janet? (2023)

ianthehenry.com

51–60 of 292 posts

Re: Why Janet? (2023)

#51
post #43
post #28

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

It was named after the sentient computer system in the TV show "The Good Place" A humourous clip: https://youtu.be/etJ6RmMPGko?si=W98LdG1jDdUCXsHV

Also mentioned in the GitHub repository:

> Why is it called "Janet"? Janet is named after the almost omniscient and friendly artificial being in The Good Place

https://github.com/janet-lang/janet#why-is-it-called-janet

Re: Why Janet? (2023)

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

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

Re: Why Janet? (2023)

#53

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

I guess you could transpile direct to Janet bytecode, and performance would be in theory the same as native Janet?

Re: Why Janet? (2023)

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

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

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

Given that they wrote their goodbye post using LLMs and gave up after such a short amount of time, I don't take that at face value the same way I don't believe AI layoffs

Re: Why Janet? (2023)

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

Re: Why Janet? (2023)

#56
post #28

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

I know that Lisp has lots of paranthesis and I don't have enough experience with Lisp at all. But from the looks of it, Janet has some great ideas like the one that @ramblurr shared here about sandboxing ("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.") Lisp from my understanding is incredibly polarizing and many peopl…

While I do not like the excess of parentheses of LISP and similar languages, their syntax is very consistent and predictable. Moreover, while LISP has an excess of parentheses, it omits a greater number of commas that are required in many other programming languages.

I am much more annoyed by the random syntax inconsistencies of most popular programming languages, which are either caused by original language design mistakes, or, more frequently, by the late addition of some features that were not planned in the original language, so they had to be squeezed in with the help of various ugly workarounds.

While during the last years I have not used much LISP like languages, there have been times when I used them a lot, for several years, in scripting applications, e.g. the LISP variant of old AutoCAD, the Scheme-like scripting language of the Cadence EDA applications, or the scsh Scheme dialect that is usable for replacing UNIX shell scripts.

In all cases, these languages allowed a greater productivity associated with rarer bugs than the more popular scripting languages, like Python, Perl, TCL, bash.

While aesthetically I might prefer the look of a Python program, for solving a practical production problem I would prefer to write scripts in one of the LISP derivatives. Obviously, the productivity in various programming languages depends a lot on individual preferences and previous experiences.

It should be noted by all those who believe that the LISP-derived languages have too many parentheses, that the C programming language and all languages with syntax derived from it, like Java or Rust, have a great excess of parentheses in comparison with the older languages that had better designed syntaxes, e.g. ALGOL 68 or IBM PL/I.

For example, compare

  for (i = 1; i 
with

  for i from 1 to 100 by 5 do ... od
or

  if ( ... ) { ... } else { ... }
with

  if ... then ... else ... fi
The first example has 12 syntactic tokens instead of the minimum required, which is 6.

The second example has 8 syntactic tokens instead of the minimum required, which is 4.

If I cannot have a decent programming language with a minimum number of parentheses, I would rather have a programming language where all the places that need parentheses are predictable, like in LISP, instead of having a language like C and its derivatives, which require parentheses in random places, for no good reason at all.

Re: Why Janet? (2023)

#58
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:…

Actually not all those are ancient customs, and not all that Janet uses is newer.

In the first description of the language LISP, from March 1959 (AIM-008), John McCarthy had used the names "first" and "rest", instead of what later will be called "CAR" and "CDR".

The names of "CAR" and "CDR" appear to have come from the students who worked at the practical implementation of the LISP interpreter on an IBM 704, and unfortunately we have remained stuck with them, like also with other features that were intended only for a temporary use, until being replaced in the "final version" (which was abandoned).

Re: Why Janet? (2023)

#59
There is also fennel, earlier language originally by same developer, that is similar, but compiles to, and is fully implemented in, Lua. No standard library of its own so missing many nice things like the parser library from janet, but it is good for writing scripts for things that embed Lua.

https://fennel-lang.org/

Re: Why Janet? (2023)

#60
post #29

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…

lobste.rs uses a web-of-trust referral system. I guess it still involves a moderator killing off bad nodes, but it seems to scale well

yeah but I can't post there because I don't know anyone with an account and frankly CBA traipsing around looking for someone who has an account.

does seem like more things will have to go this way though

Post reply on HN