Top
Best
New

Posted by yacin 7 hours ago

Why Janet? (2023)(ianthehenry.com)
345 points | 168 comments
krinne 7 hours ago|
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.
probably_wrong 6 hours ago||
> 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.techspot.com/news/111698-digg-relaunch-fails-two...

andrewflnr 2 hours ago|||
I suspect real ways to keep AI out of a community, or really to have an online community at all, are going to be structurally incompatible with making anyone rich. The possibility of getting rich poisons the incentives.
flir 5 hours ago||||
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.

makkes 3 hours ago||
Web of trust has been a miserable failure because of the GPG's horrible UX and high entry barrier. It's dead, Jim.
andrewflnr 3 hours ago||
I think they were referring to invitation trees like lobste.rs.
layer8 4 hours ago||||
> 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.

LtWorf 3 hours ago||
Half the posts here are AI grifting.
whyenot 3 hours ago||
That’s a pretty extraordinary claim. Do you have anything quantitative to back it up? HN has bots, I think that is a fair assumption, but half? How do you know that for sure?
GroksBarnacles 2 hours ago||
[flagged]
dcuthbertson 2 hours ago|||
TIL that statements of obvious exaggeration are called causal, hyperbolic statements. Who knew?

All kidding aside, I've never heard them called causal hyperbolic before. It's a good term.

dwedge 5 hours ago||||
> 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

Cassell 1 hour ago||||
Altman’s orb is as terrifying as it is because businesses might see it as a solution to a real problem—a problem he helped to create.
throwway120385 18 minutes ago||
The reason we didn't see it in the US first is because he was probably gathering data from a pilot system. When he finishes his moonbase and/or volcano lab then we should probably start moving to the Northern Territories or the Yukon.
ponkpanda 5 hours ago||||
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.

nkrisc 4 hours ago|||
Then you’ll end up with a forum of only bots because they’ll spoof it and real people won’t put up with the hassle.
wbl 3 hours ago||||
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.
tialaramex 5 hours ago||||
FIDO tokens are designed to able (if authorized by the software, your web browser typically offers a pop-up where you can decline this) to prove their membership of a batch of tokens, but not their individual identity.

The Entra feature you thinking of lets somebody say "Only things which can prove they're in this list work". This could make sense if you, as their employer, issue every employee a custom DoodadCorp Doodad FIDO key and so you don't want somebody's Yubikey or off-brand generic device to work. It's stupid and you shouldn't do it in other scenarios, but your "this is how we detect humans" idea is arguably a scenario where that could make sense.

[Edited to add: This feature is called "Attestation"]

layer8 4 hours ago|||
This would result in hardware farms of such devices being automatically operated, like the existing iPhone farms used for similar purposes.
21asdffdsa12 5 hours ago||||
Pay per interaction model? 1 cent per post.
intrasight 3 hours ago||
Probably the only solution. But the penny has been deprecated so it will have to be a nickel.
imglorp 2 hours ago||
Only copper was deprecated. Real $0.01 absolutely exists in your bank etc.

Anyway, marketers see a popular site like a physical billboard, where they would pay thousands a month for their message to be seen by thousands of people. If you made it cost pennies to post, and a few more pennies to boost and astroturf, AND that the post would be seen by millions of people, they'd say "By Grabthar's hammer, what a bargain!!" and order a hundred more per day...

kitd 4 hours ago||||
Age verification with facial ID? ;)
geokon 6 hours ago||||
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
dust-jacket 5 hours ago||
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

ramon156 5 hours ago||
+1, if anyone wants to help me I'd be honored. mail me at ramon(@)odeva(.)nl
pbronez 5 hours ago||||
Isn’t the solution high-quality identity verification? There are piles of digital identity companies out there. They make money selling to banks for KYC compliance. Heck, there are background check as a service companies designed to add trust to gig economy platforms.

I used to think that a small payment could accomplish the same thing, but X selling blue check marks proved that doesn’t help much. Well, at least it’s a much weaker signal than the previous curated version.

The challenge is any barrier to entry high enough to discourage motivated spammers is also high enough to discourage casual users. That disrupts the network effects you’ve traditionally needed to bootstrap a social website.

If I was trying to get a new social site off the ground right now, I would try:

1) secure a good brand from the pre-AI era. Twitter, Digg, Friendster, MySpace. Something that motivates a first look.

2) Require third party identity verification on sign up, configured so the social site is never the custodian of PII, though require enough demographics to support high-value advertising later. Verification is free to the user, ideally provide multiple verification options- one US and one EU at minimum.

3) Target a few core communities and invest. Find the people who moderate historically great subreddits, were active in twitter communities during the good years, etc. get them in your platform. Maybe even pay them.

That should be enough to tell you if it’s going to work or not.

Decabytes 3 hours ago|||
Blizzard's Real ID system would fix all of this. It was ahead of it's time /s
wmedrano 58 minutes ago|||
Ironically, the top comment (this) is now about AI.
matheusmoreira 3 hours ago|||
> I think someone should start a community online where AI isnt allowed.

That's lobsters I guess. AI posts got banned there after a 300+ comment discussion, probably the biggest ever on the site.

The exact rule the moderators settled on was "meaningful human authorship" but don't be fooled: a lot of people on lobsters are ideologically opposed to LLMs. Doesn't matter how "meaningfully" the technology was applied. My work was classified as slop simply because AI touched it. People referred to me as an exhibitionist and fetishist when I talked about using AI. Just a heads up for anyone who's thinking of joining.

crumpled 2 hours ago||
on my way!
9dev 5 hours ago|||
> a community online where AI isnt allowed.

This is something I think about a lot, especially how one could pull it off without tearing down anonymity online. Having some sort of "proof of humanity" is a hard problem to solve.

mr-pink 4 hours ago|||
not really, you can just ask people to do a shit job identifying traffic lights and motorcycles and they'll do it.
DoughnutHole 6 hours ago|||
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.
NuclearPM 6 hours ago||
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.
shevy-java 6 hours ago|||
> a new syntax

How is the syntax new?

It looks like lispy - see the outer parens in the examples given.

embedding-shape 6 hours ago||
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.
maleldil 4 hours ago||
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?
drob518 4 hours ago|||
You don’t program in Lisp, do you? I used to be confused by the smug Lisp weenies. Now I am one. And the difficult thing I’ve found over the years is that Lisp is sort of unexplainable. You either “get it” or you don’t. Yes, it has macros, but macros are a bit overrated. I’ve been programming in Lisp for decades and I rarely write macros. I think the thing that is difficult to convey is how powerful Lisp’s core execution environment is while at the same time being just a page of code that a CS undergraduate can understand. Literally everything else is a library. And those libraries can create syntax, generate code on the fly, and do many other powerful things. But most people won’t “get it” until they take the plunge. I didn’t. Until I did. And now, I don’t feel a need to defend Lisp at all. It won’t go away. You can’t kill it. The folks that “get it” will always have it, and those that don’t “get it” will reach for their Blub language again and again. Such is the way of the world.
matheusmoreira 38 minutes ago|||
Yeah, I didn't get it either until I implemented my own lisp.

> the difficult thing I’ve found over the years is that Lisp is sort of unexplainable

I've found that getting rid of the parentheses helps.

  f(x)
  (f x)
  ["f", "x"]

  (print (< 10 20))
  ["print", ["<", 10, 20]]
Lisp code is just normal Python lists which get evaluated by an interpreter function. Like this:

  code = ["print", ["<", 10, 20]]

  def eval(code):
      # magic

  eval(code)
  True
Filling out that eval function is a great way to learn lisp.

These articles are very good and accessible:

https://www.norvig.com/lispy.html

https://norvig.com/lispy2.html

maleldil 1 hour ago||||
> You don’t program in Lisp, do you?

Not anymore. I started with Racket and went through the Little Schemer. I did Clojure for a while. I even used Babashka to write all my scripts, then later rewrote them in other languages.

I gave it a good try. Maybe it wasn't enough to properly "get it"?

chamomeal 1 hour ago|||
Aw man I love babashka. I will say the lack of static types in clojure is pretty brutal for me. Especially when combined with the obtuse error messages. But I still love babashka and the whole REPL driven world.

What did you end up rewriting your bb scripts in?

drob518 1 hour ago||
If there's one thing that I sometimes wish Lisp had, it's types. Most of the time, I don't need or even want them. But when you're doing a big refactor or changing the shape of your primary data structure, it would be nice to have the compiler be able to assist you in detecting locations where you've cross-wired something. But other than that, I don't care. And yes, Clojure's error messages could be better, but they have been getting better over time.
drob518 1 hour ago|||
That's a very reasonable try. Your statements are not unfounded. If I may ask, what's your daily driver now and why do you favor it over Lisps?
layer8 3 hours ago||||
There are reasons why not that many programmers “get it”, and it’s not because the others are uninformed. It’s a matter of valuing different things.
embedding-shape 1 hour ago|||
Hmm, that'd be weird, how do you know you "value something different" if you haven't "got it"? You'd need to "get it" first, then you can understand if you value something different or not, otherwise how would you know?
layer8 1 hour ago||
The usual insinuation is that if you don’t like it, you “just don’t get it”. I meant not “getting it” in that sense.
drob518 2 hours ago|||
Absolutely! But it’s also because they don’t really understand one of the things. It’s the Blub Paradox.
cdelsolar 3 hours ago|||
this is incredibly smug, but fun to read :) I briefly "got" Clojure but forgot again. Maybe I'll give this Janet thing a try.
drob518 1 hour ago||
LOL, indeed. Clojure is fun. I haven't used Janet, but I appreciate seeing some of the good ideas that it stole from Clojure (stealing being the sincerest form of flattery, and all that). IMO, one of Clojure's greatest gifts, above and beyond other traditional Lisps like CL and Scheme, is its focus on immutable data structures. When I started playing with Clojure, I was skeptical. I figured performance was going to be horrible. Now, I can't live without them. It's one of those subtle features that just changes how you program. It's one reason I choose Clojure over CL and Scheme today. Janet seems to have both mutable and immutable data structures, which is nice. Clojure has transients, but that's sort of partially mutable. That said, with Clojure, one of the nice things is that you can always drop back to Java's full mutability if you want, but that's obviously relying on the platform and not Clojure the language.
evdubs 30 minutes ago||||
S-expressions. Defining data in JSON or XML is way worse than S-expressions.
BoingBoomTschak 44 minutes ago|||
Just saying "macros" is a bit reductive: in CL, you have access to the full language at (read) parse time, compile time and runtime. Said macros also mean that logical OR/AND short-circuiting isn't a compiler black box, you can implement such behaviour easily yourself.

------

The syntax is actually a big pro for a lot of people. I love its streamlined look that basically reads like Python once you let your IDE indent properly and learn to see "through" the parentheses (CL, Scheme).

The original language where everything is an expression and it shows. Where Python still needs an ugly ternary and made match a statement, Lisp has had the perfect IF and COND since the dawn of time.

Symbols are still a cool and useful concept that almost no other language I know of got.

The numerical tower - despite some holes - is amazing. Built-in rationals and "correct math" as sane default (i.e. 1/2 not returning 0) never get old.

------

And if you let me rave about CL specifically (e.g. DECLARATIONs as "#pragma done well", restarts, CLOS/MOP, runtime READ/COMPILE, etc...), there are a lot of cool features barely copied anywhere that'd improve other languages, but these aren't part of "what make Lisp Lisp".

soomtong 7 hours ago||
It’s been a few months, but I built a tool by Janet lang to communicate with an LLM via HTTP. Of course, I probably had Claude Code write it for me. It turned out better than I expected.

I was really impressed by how small the executable file was. I’d only ever done web development with Node.js up until then.

janetacarr 3 hours ago||
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).

veqq 54 minutes ago||
> 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.

FelipeCortez 3 hours ago||
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

1313ed01 5 hours ago||
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/

ux266478 3 hours ago|
Fennel really is great, and a great way to get into the clojure family. My biggest gripe with it is that debugging is the typical transpilation bed of needles. The bridge between Fennel and the Lua VM is super fragile, and it just doesn't have half the quality of the Janet debugger and REPL. It's a real shame, because Fennel is way more portable, and thanks to LuaJIT is capable of breaking SBCL's jaw, which is absolutely fucking insane. But the transpilation experience just completely kneecaps it imo. There are workarounds you can do, but even if you mess around with implementing a debug.setinfo you still run into less-than-fun edge cases like with match-blocks.

I think there's a lot of value in forking LuaJIT2 and reworking the debugging and error structures within to make it more suitable for language transparency. Doing so would make languages like Fennel much more attractive.

chamomeal 1 hour ago|||
Is fennel clojure-ish? I’m vaguely aware of it being a lisp, but I didn’t know it was clojure-ey. Pretty neat sounding!
veqq 51 minutes ago||
All new Lisps since ~2010 have been Clojure-y-: https://p.hagelb.org/new-lisps.html (Lone Lisp and LispE are the only exceptions and LispE still has _some_ Clojure features.)
JHonaker 2 hours ago|||
> capable of breaking SBCL's jaw

What exactly do you mean by this? Speed? Portability? Ease of use?

ux266478 25 minutes ago||
What I mean by that is that it's in the same weightclass of speed, depending on the problem being tackled. In the case where data's shape is mutable, SBCL will scream ahead thanks to CLOS. You can cheat LuaJIT with dynamically-defined C-structures via abuse of the FFI lib instead of native tables, but it's not as nice as CLOS nor is it very safe. In the case that the shape of data is changed extremely frequently? CLOS might actually end up falling behind here. Another area where SBCL will likely win out is when the hotpath is bottlenecked on string operations.

Where I'd say it advances into breaking SBCL's jaw is that the runtime, interpreter, jitter, etc. are all much smaller than SBCL's runtime and compiler. If you're looking for a complete system, I'd say SBCL wins out obviously. You're talking a world-class REPL, debugger, a high quality stdlib, etc. All it's missing is a text editor like LispWorks (emacs and pretty much every other FOSS Lisp editor I've seen is a massive downgrade.) With that in mind, SBCL is not something you embed in an application written in another language. The holy grail is getting something as fast as SBCL, as flexible as SBCL, but as a 50k loc self-contained runtime. LuaJIT is the reigning heavyweight champ there, so having a Lisp-adjacent language like Fennel running atop it is a pretty damn compelling idea.

Interestingly with regards to text editors, Lua doesn't have that problem technically. Lite-XL is dangerously close to being zmacs/LispWorks for Lua. Poetically, just like Lua it's fairly bare bones and requires extension to be a decent IDE. But the underlying structure is absolutely fantastic, being based around a fairly cohesive object model rather than coats of paint over text buffers.

ramblurr 6 hours ago||
Always 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

declan_roberts 4 hours ago|
It's a really cool feature but what is a scenario when your average programmer needs such sandboxing?
myaccountonhn 4 hours ago|||
I sandbox all my utilities and programs in case some compromised third-party dependency decides to run lose. It's a way to limit the blast radius.
briaoeuidhtns 4 hours ago||||
you're embedding it as a scripting api and want to limit permissions to just what's needed
petee 3 hours ago|||
The TIC-80 game engine embeds Janet, and if i recall sandboxes the games created
xrd 5 hours ago||
The author made these using Janet (discussed on HN in the past):

https://bauble.studio

https://toodle.studio

Those two fascinating art tools got me very excited about Janet a while back.

a-french-anon 4 hours ago||
> 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 visceral reaction to square brackets (so vectors) being used in lambdas and control flow operators. Same as Clojure, I simply can't get over it. Maybe I will with enough effort?

Also, what's the current LSP/SLIME status? Really important these days.

nlitened 4 hours ago||
Square brackets’ use is very consistent and rather logical in how they are used in Clojure’s syntax.

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.

a-french-anon 3 hours ago||
Thanks a lot, that's a very interesting way of seeing it.
veqq 1 hour ago||
You can... just not use square (and curly) brackets. Instead of `[1 2 3]` just write `(array 1 2 3)`. Instead of `(fn [x] (+ 1 x))` just write `(f (x) (+ 1 x))`. They are never necessary.
BoingBoomTschak 41 minutes ago||
Huh! So like some Schemes and Racket? Yet I must read them in code that isn't mine, which is a large part of the problem.
mackeye 5 hours ago||
janet has replaced sh, python, awk, etc. for me, for system scripts over a certain length! it has a very fast startup time (on my system, 1.4ms via hyperfine vs. 1ms for dash) for scripts (not compiled executables), and its sh-dsl module allows typing shell commands very elegantly, like ($ cmda w x | cmdb y z). the ability to load an image to debug is a big help, too. i've started using it very recently but it's probably one of my favorite languages now, and the only other lisp i've used is mit scheme for sicp.
soomtong 5 hours ago||
This document was really helpful when I first met Janet:

https://janetdocs.org/tutorials

https://janet.guide/ (the author's one)

veqq 1 hour ago|
I'm really happy you liked it! It's still a work in progress.
uka 7 hours ago||
> 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.

fredrikholm 5 hours ago||
> very abstract things

A C macro with literals that lacks referential transparency:

  #define MULTIPLY(x, y) x * y
  int result = MULTIPLY(2 + 3, 4); // 14
Not knowing what something means does not make it bad, which is what I'm assuming you meant given how you phrased your sentence.

Having a shared language of patterns and problems that occur in programming is a good thing. Ridiculing such terminology on the basis of "that group of programmers sure are weird" is pointless and counter productive.

uka 1 hour ago||
Thank you for the lesson. Very productive of you and on point.

Now if you relaxed just a little bit - the world would be much nicer place.

bryanrasmussen 7 hours ago|||
you ever try to explain object oriented programming languages and their benefits to the "average person on the street"?
rambrrest 7 hours ago|||
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.
barrell 6 hours ago|||
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.

drob518 4 hours ago||
Spot on. For me, it clicked with Common Lisp, 15 years after I graduated from university. Now, Clojure is my daily driver. And it’s extremely difficult to explain to people. I’ve gotten to the point where I don’t even try. You’re right about all the things you mentioned. Once you discover structural editing, everything else seems primitive, on the level of cavemen playing with rocks. But it’s not just one feature that makes Lisp better. It’s all of it which interrelates and creates a powerful synergy (I hate that word, but in this case it’s appropriate) that just isn’t matched by anything else. There are other languages that have a similar vibe, notably Forth and Prolog, but they are often misunderstood, too. Honestly, that’s my real test of whether someone is a senior programmer: do they understand and at least have an appreciation for these languages, even if they don’t program in them everyday.
xigoi 6 hours ago||||
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.
embedding-shape 6 hours ago|||
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.
jurip 5 hours ago||
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?
embedding-shape 5 hours ago|||
Yes, a commonly occurring stumbling block for me is trying to use one language's syntax while actually programming in another, especially when it comes to all the Algol/C-like language, I probably mix things on a daily basis.

The concepts would be easier to grok up front if they just used normal function calls instead of "And now for this special syntax that only exists for this particular feature" which just adds more things to remember, instead of just the concepts themselves.

dragandj 4 hours ago||||
Yes it is, because as soon as programmers step out of the most basic language level (which is kinda similar in most mainstream languages) there's a bunch of wildly different concepts, with wildly different ways of writing them. Writing them in isolation might be manageable, but it's combining them effectively that gets hairy very quickly, unless one is very experienced in said language. But then, translating that to OTHER languages becomes a bar that is too high!
iLemming 3 minutes ago|||
[dead]
layer8 3 hours ago|||
That just moves the subtle and often arbitrary differences to the functions and macros you use.
xigoi 3 hours ago||
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?
layer8 2 hours ago||
The first one is pretty C-specific and for example doesn’t exist in Java. Similarly for the second one, the reason is that `while` is used for two different constructs, which for example isn’t the case in Rust. These are just accidental complexities stemming from unfortunate design decisions in C. Having a richer repertoire of syntactic constructs doesn’t by itself imply such complications.

My point was, replacing n syntactic constructs by n functions or macros doesn’t reduce the cognitive load of having to know how each construct works. To the contrary, one can argue that everything having the same syntactic form makes it more difficult to distinguish different classes of features.

xigoi 2 hours ago||
> The first one is pretty C-specific and for example doesn’t exist in Java.

It was just an example, most languages have quirks like this. I don’t know about Java, but in Rust you have the turbofish operator, whose necessity stems from using the less-than sign as both an operator and a delimiter.

> My point was, replacing n syntactic constructs by n functions or macros doesn’t reduce the cognitive load of having to know each of them.

The difference is that if you don’t know a function/macro, you can just read its documentation. If you don’t know a syntactic construct, where do you look?

Another advantage is that if you want to create new functionality similar to existing language features, it won’t stick out like a sore thumb. For example, you could create an until loop:

  (until (window-should-close)
    (draw-screen))
  # is equivalent to
  (while (not (window-should-close))
    (draw-screen))
In Rust, it would have to look completely different from a while loop:

  until!(window_should_close(),
    draw_screen());
  // is equivalent to
  while window_should_close() {
    draw_screen();
  }
zelphirkalt 6 hours ago|||
Probably depends on whom you are asking. For me the essence is (1) having functions or procedures as the basic building blocks, not classes. (2) Having all the utility and higher order functions you need to deal with the functions and procedures first idea. (3) Having a very powerful syntax, that allows great semantic editing and is never ambiguous. Oh and can actually be extended in useful ways, without having to wait for a committee to decide upon "the one syntax to rule them all".
veqq 46 minutes ago||
> can actually be extended in useful ways

I just made a library with [query syntax](https://codeberg.org/veqq/declarative-dsls) over various data structures a la sql:

    (import declarative-dsls/dataframes :as df)
    (def people (df/dataframe :name :age :job))
    (df/dataframe? people)

    (df/insert! {:name "Bob" :age 30 :job "Developer"} :into people)
    (df/insert! {:name "Alice" :age 27 :job "Sales"} :into people)
    (df/update! :set {:job "Engineer"}
             :where |(= ($ :job) "Developer")
             :from people)
    
    (df/save-csv people "people.csv" :sep "\\t")
    (def people2 (df/load-csv "people.csv" :sep "\\t"))
    
    (-> people2
       df/dataframe->rows
       df/rows->dataframe
       df/print-as-table)
Printing:

    job       age  name
    --------  ---  -----
    Engineer  30   Bob
    Sales     27   Alice
It also has datalog and minikanren (with s expr, sharing the same goals etc.) And it vectorizes like APL:

    (df/v + [1 2 3] 1 [1 2 3] 1) # returns: [4 6 8]
    (df/v + 1 {:column [1 2 3] :key [1 2 3]}) # returns: {:column @[2 3 4] :key @[2 3 4]}

    (df/v * [1 2 3] [[1 1 1]
                     [1 2 2]
                     [1 2 3]]) # returns: @[@[1 1 1] @[2 4 4] @[3 6 9]]
Or you can just use [J directly from Janet](https://git.sr.ht/~subsetpark/jnj):

    (jnj/j "3 4 $ i. 10") # returns: ((0 1 2 3) (4 5 6 7) (8 9 0 1))
    (jnj/j "$" [3 4] (range 10)) # returns: ((0 1 2 3) (4 5 6 7) (8 9 0 1))
The Joy Web Framework has a cool [db query dsl](https://github.com/joy-framework/joy/blob/master/docs/databa...) too: `(var account (db/find-by :account :where {:login (auth-result :login)}))`, used for a [web auth](https://codeberg.org/veqq/janetdocs/src/commit/848dcbd8e54ad...).

From my response, bigger than the article: https://lobste.rs/s/y0euno/why_janet_2023#c_lspe6n

skeledrew 5 hours ago|||
Pretty straight-forward, as the world as we perceive it is made of objects with attributes, interacting with each other via their methods. OOP easily fits the brain of the average person in the street.
the_af 4 hours ago||
[dead]
prerok 6 hours ago|||
Average programmer too /j

Frankly, though, I think lispy community has benefited from being smaller. For example, even though the now ancient Design Patterns already warned programmers to prefer composition over inheritance, the OO programmers still created 15 levels deep hierarchies.

the_af 4 hours ago||
> 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.

Referential transparency is a funny name for a very powerful feature which helps you understand what the program does better, it's not a deeply abstract thing. Don't let the name scare you.

You could ask "why the funny name"? Well, specialized professionals use specialized jargon, even for "normal stuff". It's unreasonable to expect otherwise. Car mechanics also have weird names for car parts that are absolutely essential for the car and not that hard to understand if they explained them to you.

didibus 24 minutes ago|
Wow I never realized Janet was released more than 10 years after Clojure.

Clojure: 2007

Janet: 2019

More comments...