Live data from Hacker News

Janet: a lightweight, expressive and modern Lisp

janet-lang.org

151–160 of 280 posts

Re: Janet: a lightweight, expressive and modern Lisp

#151
post #134

Earlier quoted context omitted.

Clojure is an inspirational language that has some insightful opinions about how things should be done. A month spent learning Clojure is a great investment. A lifetime programming in Clojure would be a joy. But as I recall the original Rich Hickey talks on "Why Clojure?" he was explicit that dependency/project management were very hard problems that Clojure didn't really attempt to solve. I'm not aware of any Clojur…

> he was explicit that dependency/project management where very hard problems that Clojure didn't really attempt to solve. For what it's worth, having used Clojure for work for a couple years now, and ditching leiningen for deps.edn (built in package and dependency management that hooks into maven), I've not had an issue with it. You just add the dependencies to your deps.edn, and run your program. If your namespace…

That is a perfectly reasonable way of doing things. However, the official reference [0] recommends:

(1) Your way (but also throw in an :only and doesn't mention :refer)

(2) (require 'clojure.contrib.def 'clojure.contrib.except 'clojure.contrib.sql)

(3) (require '(clojure.contrib def except sql))

And leaves open a lot of room for someone to try to use (use) which is probably a mistake since you don't use it.

And sometimes your way has [] and sometimes it doesn't. Pretty much at random considering '[profusion.utils :refer :all]'. And the official docs add in a dizzying number of combinations of quoting requirements to recall.

It isn't the end of the world but that is a far cry from how good all the other parts of the language are. It is really sloppy and confusing to learn. There is no recommended approach and I personally can't remember which easy way I used last time so my personal projects cycle randomly. I think Clojure has the worst library loading mechanism of any language I think is good. Even your way has two completely different code paths (import vs require) to bring in dependencies.

[0] https://clojure.org/reference/libs

Re: Janet: a lightweight, expressive and modern Lisp

#152
post #69
post #61

Earlier quoted context omitted.

> No matter what some people say, getting started in Clojure is a nightmare. You just need Java installed on your system, then you install clojure (via brew, or sh install) and that's it, you're good to go. I've written a guide to starting with Clojure covering installation to REPL & IDE configuration: https://grison.me/2020/04/04/starting-with-clojure/

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

If you don't know what Java is, you are not in the Clojure target market.

Re: Janet: a lightweight, expressive and modern Lisp

#153
post #106

Earlier quoted context omitted.

What I like in Janet (I'm just a noob so take this comment with a grain of salt as it will sound superficial): - Easy to get started: one click install, great website and concise docs. No matter what some people say, getting started in Clojure is a nightmare. - Lightweight and fresh. No JVM, no Node. - Freedom and expressivity. Mutable or immutable data structures, ultimately is up to me. It might bite me down the ro…

I've posted this quote before, but it might help explain why making Clojure easier to get into maybe hasn't been a priority for Hickey et al. So we need players. I would rant here, but I won't. But look at this guitar player with blisters. A harpist has blisters, a base player with blisters. There's this barrier to overcome for every musician. Imagine if you downloaded something from GitHub and it gave you blisters.…

[deleted]

Re: Janet: a lightweight, expressive and modern Lisp

#154

Not mentioned here: Hy (hylang.org), a Lisp that manipulates/converts to the Python AST and therefore is fully interoperable with the whole vast Python ecosystem. Although the language is still somewhat short of 1.0, it has stopped changing (after a fairly dramatic turn circa 18) and I’ve been writing more Hy than straight Python for a while now. When I started using Streamlit (and then you can’t have a main.hy funct…

+1 for Hy. I recently did a project where I needed to embed a lisp. I actually considered Janet (since Schemes are a little too threadbare), but there was no binding for a non-C language. I might consider creating Rust or Nim binding myself later, but Hy proved to be immensely easy and satisfying to work with.

Re: Janet: a lightweight, expressive and modern Lisp

#155
post #106

Earlier quoted context omitted.

What I like in Janet (I'm just a noob so take this comment with a grain of salt as it will sound superficial): - Easy to get started: one click install, great website and concise docs. No matter what some people say, getting started in Clojure is a nightmare. - Lightweight and fresh. No JVM, no Node. - Freedom and expressivity. Mutable or immutable data structures, ultimately is up to me. It might bite me down the ro…

I've posted this quote before, but it might help explain why making Clojure easier to get into maybe hasn't been a priority for Hickey et al. So we need players. I would rant here, but I won't. But look at this guitar player with blisters. A harpist has blisters, a base player with blisters. There's this barrier to overcome for every musician. Imagine if you downloaded something from GitHub and it gave you blisters.…

False choice. Guitar Center sells out of the box integrated guitar + amp combos with a getting started booklet.

You can also use 9 gauge strings. Those _might_ give you a slight callus, but certainly no blisters.

Re: Janet: a lightweight, expressive and modern Lisp

#156
post #61

Earlier quoted context omitted.

What I like in Janet (I'm just a noob so take this comment with a grain of salt as it will sound superficial): - Easy to get started: one click install, great website and concise docs. No matter what some people say, getting started in Clojure is a nightmare. - Lightweight and fresh. No JVM, no Node. - Freedom and expressivity. Mutable or immutable data structures, ultimately is up to me. It might bite me down the ro…

> No matter what some people say, getting started in Clojure is a nightmare. You just need Java installed on your system, then you install clojure (via brew, or sh install) and that's it, you're good to go. I've written a guide to starting with Clojure covering installation to REPL & IDE configuration: https://grison.me/2020/04/04/starting-with-clojure/

A lot of tutorials assume the use of lein, which isn't part of Clojure, and isn't properly packaged for windows.

Re: Janet: a lightweight, expressive and modern Lisp

#157

Earlier quoted context omitted.

If you're not familiar with the JVM, I think this is a big ask for most people as far as ease is concerned. I have created a template on my github to use clojurescript with your typical NPM setup that would allow you to get started right away. I know of no equivalent in the JVM world mostly because of how tightly Oracle controls the download experience of the JDK.

Well, Oracle JDK is a non-starter outside enterprise settings these days. You should be using Zulu or Corretto, and both are much easier to download.

No, you should almost certainly be using openjdk, which oracle jdk is based off, unless you have a compelling reason an alternative implementation is better.

Re: Janet: a lightweight, expressive and modern Lisp

#158
post #103

Earlier quoted context omitted.

The original post complains of not knowing how to solve their particular problem in Lisp, and gives an example: > how to efficiently implement a message bus with observers You say: > I think that's a badly posed question But it isn't! It's the specific thing that person is trying to do and is having trouble with, the act of translating structures and designs they understand from other languages into the Lisp language…

> but they only benefit after you've actually written a program, which is the barrier the potential users are struggling at No, you miss the point. There is little benefit in interactive and incremental development once a program is written. The very benefit that this such incrementality provides is noticeable during the process of writing the program, not after it; when a program is written, it's written, and from s…

Programs are never finished. Most work is incremental modification and debugging of existing systems. The "getting started" bit of going from a blank editor to something that starts to be useful is a small part of the process. But it's the very beginning that is a surprisingly hard barrier to cross. The starting to write a program in the first place. Which is where the OP has got stuck. And is dismissed as irrelevant?

Re: Janet: a lightweight, expressive and modern Lisp

#159
post #148

Earlier quoted context omitted.

> 3 - Start command.com or PowerShell command.com? Is it 1995?

Unfortunately not all Windows shops got the message.

They're (probably) alluding to the fact that command.com is spelled cmd.exe since Windows NT became the mainline.

Re: Janet: a lightweight, expressive and modern Lisp

#160
post #131
post #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 appro…

Why was this downvoted? I don't get it :/

Category error maybe: CL is a language standard with several very extremely different implementations and a diverse tool landscape. Janet OTOH is a single language&implementation.
Post reply on HN