Live data from Hacker News

Janet: a lightweight, expressive and modern Lisp

janet-lang.org

91–100 of 280 posts

Re: Janet: a lightweight, expressive and modern Lisp

#92
post #78

Earlier quoted context omitted.

My position on the matter might be summarized as "No TCO, no copyable stackful coroutines, no buy." Separately from that a lot of my experience with the JVM involves things like trusting the JVM's claim that it spent 0 microseconds GCing a certain thread that was running code specifically designed to produce no garbage, then running the code in production for one day and losing tens of thousands of dollars, then lear…

Do you know of a production ready VM with these properties that has a nice ecosystem?

If you do a trivial amount of up-front work, C and Luajit have these properties, but Luajit often isn't a suitable replacement for the JVM and C isn't a VM. So no.

Re: Janet: a lightweight, expressive and modern Lisp

#93
post #55
post #34

Earlier quoted context omitted.

The first point clearly didn't pan out. In reality, applications ended up bundling their own OSes along, so Clojure is stuck with antiquated VM on its ankle for no good reason.

That "antiquated" VM is head and shoulders above any other extant runtime in compilation, GC and observability. Not only that, most of the major innovations in recent years in those areas seem to be happening there. Moving from the JVM to almost anything else -- be it Python, Go, Erlang or Node -- feels like being transported to medieval society. Don't get me wrong, some find it liberating as in, huh, I turns out I c…

I guess this boils down the difference between what I call "l'art pour l'art" software engineering vs production-ready code providing a business functionality. The amount of hello world computing on HN is out of the roof, it seems nobody really cares about software lifetime or just never run into a situation when observability is a must. I think the reason for this that most businesses being ok with software being ridiculously expensive and shitty quality. The few places where software matters use Java/C++ because that works at a massive scale and these languages bring observability to the table that is required to maintain a service.

Re: Janet: a lightweight, expressive and modern Lisp

#94
post #41

Earlier quoted context omitted.

> antiquated VM I'm always flabbergasted about the ignorance against the JVM on this site. There is nothing out there that has seen similiar research and optimisations and has so good monitoring/debugging tools.

My position on the matter might be summarized as "No TCO, no copyable stackful coroutines, no buy." Separately from that a lot of my experience with the JVM involves things like trusting the JVM's claim that it spent 0 microseconds GCing a certain thread that was running code specifically designed to produce no garbage, then running the code in production for one day and losing tens of thousands of dollars, then lear…

I gotta agree with HelloNurse here. When that kind of money is on the line you set up a production version that ingests real data at real speed, and produces the same output / response but doesn't actually spend / affect any money. You watch it for at least a week and see what happens.

I'm sorry to say it, but the loss of money here was not the JVMs fault. It was putting code with insufficient load testing in a production environment and crossing your fingers despite the fact that serious money was on the line.

Re: Janet: a lightweight, expressive and modern Lisp

#95
post #80

Earlier quoted context omitted.

> you install clojure (via brew, or sh install) and that's it, you're good to go The vast majority of PCs are Windows, not Mac or Linux. Though WSL2 (available with Windows Insiders) makes working with Linux software a breeze, it's not the standard flow. Java isn't installed by default, either. Your guide suggests using WSL and IntelliJ. Does IntilliJ actually work with Closure running in WSL? For that matter, does t…

I have both a MacBook Pro and a standard PC running Windows, and yes on Windows I run Clojure both on Windows and inside WSL, both IntelliJ and VSCode works pretty well with WSL there's really no problem running it. I'm doing a lot of Clojure since years both on my MBP and on Windows and there's no problem at all doing that way. Besides VSCode even has a plugin for WSL which will let you directly hook into it. So yea…

I'm not familiar enough with Clojure to help (ironically because I myself was put off by the tooling). The reason I asked about WSL and editor issues is because I encountered them myself when working with Elixir on WSL and VS Code and saw related issues on SO about Clojure. This was almost 2 years ago, though.

Probably the biggest thing would be to assume the person reading the guide has a brand new computer and hasn't installed anything yet (including Java and Homebrew).

It's really hard to assume much about the background of someone just trying a new programming language. Maybe they've worked with other languages and you're familiar with, maybe not.

Re: Janet: a lightweight, expressive and modern Lisp

#96

Earlier quoted context omitted.

My position on the matter might be summarized as "No TCO, no copyable stackful coroutines, no buy." Separately from that a lot of my experience with the JVM involves things like trusting the JVM's claim that it spent 0 microseconds GCing a certain thread that was running code specifically designed to produce no garbage, then running the code in production for one day and losing tens of thousands of dollars, then lear…

I gotta agree with HelloNurse here. When that kind of money is on the line you set up a production version that ingests real data at real speed, and produces the same output / response but doesn't actually spend / affect any money. You watch it for at least a week and see what happens. I'm sorry to say it, but the loss of money here was not the JVMs fault. It was putting code with insufficient load testing in a produ…

A complete-fidelity production-like environment would be a couple orders of magnitude more expensive than the 1-day loss, so I disagree.

Re: Janet: a lightweight, expressive and modern Lisp

#97
post #71
post #68

Earlier quoted context omitted.

tried to install Clojure on Windows. Just flat out gave up.

1 - Download a JVM and make it available on the PATH 2 - Dowload clojure.jar 3 - Start command.com or PowerShell 4 - cd into clojure installation directory 5 - java -jar clojure.jar

Of course, that's not the official instructions. These are the official instructions: https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Wind... - they've managed to work out what the powershell is for "run untrusted shell script directly from HTTPs".

What there should be is an exe or MSI installer like every other Windows program.

Re: Janet: a lightweight, expressive and modern Lisp

#99
This looks so awesome! It's got the best parts of a lot of languages. This is what sticks out to me:

- Really simple lisp like scheme, but reminds me of lua (and not bloated like CL)

- Has resumable fibers, no callcc like scheme

- Not missing the lack of lists tbh

- A module system that doesn't feel awkward like CL

- A built-in package manager (unlike CL)

- Good lua and C support

- Threads have a shared-nothing approach with message passing (reminds me of Erlang actors)

- Destructuring

- Good PEG support, encourages it over regex

- (Im)mutable versions of data structures (ie tuples vs arrays, structs vs tables) for maximum flexibility

- Prototypal inheritance

- Docs are clean and easy to read

I'll definitely have to try this out, it looks really cool.

Some stuff I'd like to see:

- Pattern matching support (could be a library I guess)

- Multimethods

- Full numeric tower with arbitrary precision types

- Javascript compilation -- I could see this language being really useful for web and game dev

Does it have good debugging support? I'm thinking of something like slime, swank, etc. Can I set up emacs and/or vim to work the same way I can use CL with slime + swank?

I'm also wondering about the stack traces -- one of the downsides to CL is sometimes the stack traces are nasty to read

Re: Janet: a lightweight, expressive and modern Lisp

#100
post #69

Earlier quoted context omitted.

This process might seem easy for you, but maybe not for people installing Clojure for the first time. In an extreme case, someone who doesn't know Java ecosystem might want to stop to research: what is JVM, why is it necessary, which version would be the best, what's the difference between Oracle's Java and OpenJDK, etc...

One could say the same for a plethora of programming languages some research is needed and we don't have to resort to extreme cases. Out of the top of my head: - There is the Python 2.7/3.X situation still going on, then there are the several distributions of python. - GNU's R has a similar problem - Installing gcc on windows was (perhaps still is) a confusing mess for a newcomer. IMO I did not find installing clojur…

the comparison was to Janet, not Python, R, C or Scala
Post reply on HN