Live data from Hacker News

The Janet Programming Language

janet-lang.org

111–120 of 124 posts

Re: The Janet Programming Language

#111
post #34

I was a donator to Janet for a little while and then eventually stopped. I think it would be a great programming language if it arrives 5~10 years earlier. Highlights to me are: green thread, TCO, easy distribution, great interop with C, flexibility of choosing between imperative vs immutable data structures. However, I just couldn't find a good use case for it. For embedded programming, I would always choose Lua if…

Thanks you very much for the support, I can totally understand that position. We have been making great progress in terms of features since then to "flesh out" the languages and libraries including threading support, an event loop, and some basic networking (socket) support built in to the runtime. Generally though, the PL design space is already incredibly fatigued an most new languages claiming something have alrea…

Thank you for creating Janet. It is a fun language and it's exciting to watch it evolve. With the addition of the event loop and networking I'm curious to know if an http client and http server based on these will be added in the future?

I am aware that there are already libraries that cover these to an extent like circlet and halo for http. Joy also features an http client. Maybe it's outside the scope of the project, but I think an http server and client as part of the core would really add to the utility of Janet. It would also answer some of the licensing questions for distribution if these were included directly in Janet core. For example, circlet is MIT, but it is based on mongoose is GPLv2.

Also, seeing Janet on HN a year or so ago was what got me to watch The Good Place, so thanks for that as well.

Re: The Janet Programming Language

#112
post #34

I was a donator to Janet for a little while and then eventually stopped. I think it would be a great programming language if it arrives 5~10 years earlier. Highlights to me are: green thread, TCO, easy distribution, great interop with C, flexibility of choosing between imperative vs immutable data structures. However, I just couldn't find a good use case for it. For embedded programming, I would always choose Lua if…

How Lua is viable in embedded? You mean microcontroller/low-level programming right?

I once worked on a project at a FAANG where we had to run an app on a 600Mhz CPU with no FPU. Javascript (v8, spidermonkey) wouldn't cut it (for some reasons function calls where very slow amongst other things). While Lua was incredibly fast on that hardware and the VM footprint was also a blessing. Even better, we could send a binary blob of the Lua VM/app state over the wire, and so we could precompute the whole app start on a server and send that to the device (the app would start in under 5 secondes instead of minutes as it would just load the blob). Best hacking time of my career, thanks to Lua.

Re: The Janet Programming Language

#113
post #90
post #5

So what is it good for? Edit:maybe my comment was too short, but for me it is important to know what problem a new language solves (better). And I seriously think the landing page does not explain it well/at all. I mean like: D is C++ done right with garbage collection (and of course expand from there). Zig and Rust are safe languages and aim to replace C (with different strategies). And of course more than one sente…

> Zig and Rust are safe languages Zig is a nice improvement over C, but it is not safe. There is work in progress ( https://github.com/ziglang/zig/issues/2301 ), but from what I can tell, key details are still to be decided, including the classes of errors that will be covered, whether they will require runtime tracking, etc. In my opinion, Zig should look into becoming UB-less -- listing undefined behavior instances…

Exactly! Zig is an improvement over C in many areas, but it's fundamentally still _not_ a memory safe language. It's comparable to a modern C/C++ project setup with valgrind and allocator checks by default. The comptime is nice, but C++17 and upwards have dramatically improved the "comp time" compiling in C++.

Re: The Janet Programming Language

#114

Earlier quoted context omitted.

Thanks you very much for the support, I can totally understand that position. We have been making great progress in terms of features since then to "flesh out" the languages and libraries including threading support, an event loop, and some basic networking (socket) support built in to the runtime. Generally though, the PL design space is already incredibly fatigued an most new languages claiming something have alrea…

Thank you for creating Janet. It is a fun language and it's exciting to watch it evolve. With the addition of the event loop and networking I'm curious to know if an http client and http server based on these will be added in the future? I am aware that there are already libraries that cover these to an extent like circlet and halo for http. Joy also features an http client. Maybe it's outside the scope of the projec…

Probably unlikely to be added in the core (esp. HTTP/2), but an HTTP/1 implementation could be done in pure janet - there is a binding of just a parser here: https://github.com/andrewchambers/janet-pico-http-parser

But yes, at some point a canonical replacement for circlet that was MIT licensed and event-loop friendly would be nice.

Re: The Janet Programming Language

#115
post #89
post #88

Earlier quoted context omitted.

When was that? The range wasn't as large because the top end was way more limited, but the same thing applied at least since the 90s.

My impression in the 90s is that most people talking about embedded were talking about microcontrollers or very limited microprocessors.

My counterpoints would be e.g. QNX and vxWorks, famous embedded OSes, both being active in the 90s (roots go to the 80s, but in both cases afaik they really came into being and found a market in the 90s). Plenty 90s embedded hardware with x86 CPUs in it.

What's probably different today is that you have more options also on MCUs (not just assembly and maybe C), because MCUs have grown.

Re: The Janet Programming Language

#116
post #5

So what is it good for? Edit:maybe my comment was too short, but for me it is important to know what problem a new language solves (better). And I seriously think the landing page does not explain it well/at all. I mean like: D is C++ done right with garbage collection (and of course expand from there). Zig and Rust are safe languages and aim to replace C (with different strategies). And of course more than one sente…

Janet's biggest draw for me was it's PEG engine and API. That is still excellent. But I'd say the biggest draw for me now is that Janet has a lot made a lot of choices I agree with. It's language that boots up very quickly, makes for easy building of CLI tools, compiles to statically linked executables, has full compile-time metaprogramming (Lisp style), and can interface with C libraries very easily. It doesn't solv…

> Janet isn't something I'd build a business on, not quite yet

What would you say needs to change about Janet or its ecosystem to make it business-proof?

Re: The Janet Programming Language

#117

Earlier quoted context omitted.

Janet's biggest draw for me was it's PEG engine and API. That is still excellent. But I'd say the biggest draw for me now is that Janet has a lot made a lot of choices I agree with. It's language that boots up very quickly, makes for easy building of CLI tools, compiles to statically linked executables, has full compile-time metaprogramming (Lisp style), and can interface with C libraries very easily. It doesn't solv…

> Janet isn't something I'd build a business on, not quite yet What would you say needs to change about Janet or its ecosystem to make it business-proof?

Mostly just time and testing coverage, and more packages for various things. Maybe another 10,000 man-hours? I don't know the exact numbers.

For context, I've found and/or helped fix bugs around multi-char string split, process termination on windows, and async IO on Windows. All things that forced me to pop the hood on the language, study relevant OS APIs, and generally yak shave, rather than focus on the task at hand. Which has been really edifying, but would have slowed me down if I was writing for a job.

In the process, I've written a few libraries of my own for things like string manipulation, data schemata, rendering html forms/tables based on a schema, and so on.

If you have people that are competent with C, then Janet atop that could work well, but by itself, it's still a long ways from having all of the things one might expect from Python/Ruby, let alone Java or .NET

Re: The Janet Programming Language

#118

Seems like the prevailing opinion is that the website needs a “Why Janet?” blurb because I looked at this and thought, “Why would I ever use this over Racket?”.

For me, Janet seems more practical than Racket, or I at least got over the hump of it better. I like Janet's function-like data structure access as well, I don't know of another Lisp-like that does that.

Re: The Janet Programming Language

#119

Earlier quoted context omitted.

I've submitted a ticket about this. https://ibb.co/dQpKT3T

Thanks, although I should say that I searched for a few minutes about this Trojan and it seems Microsoft antivirus has been reporting it on other projects as well for years (since 2019 at least IIRC) and in the support forums the most upvoted answer was that the only way to stop it except for reporting every single new version as a false positive to Microsoft was to get a certificate and start signing the software. I…

It's a valid problem, but I think the root cause has been a lot of complaining and noone reporting it through the right channels. They've responded to my ticket with a fix, a refresh on virustotal confirms zero detections now.

Re: The Janet Programming Language

#120
post #5

So what is it good for? Edit:maybe my comment was too short, but for me it is important to know what problem a new language solves (better). And I seriously think the landing page does not explain it well/at all. I mean like: D is C++ done right with garbage collection (and of course expand from there). Zig and Rust are safe languages and aim to replace C (with different strategies). And of course more than one sente…

I've used it to make Freja, a text editor making coding GUIs and games fun for me again. Demo: https://youtu.be/KOBi805nxNc

When comparing to non-lisps 1. It has a real REPL, so you can do live coding (this is what makes me choose it over many languages at the same "level", js, lua, python, java). Honestly, this feature alone makes or breaks languages for me. 2. It is easy to interact with C (I found this hard in js, haven't tried the other)

Comparing to lisps (I've only properly tried guile & clojure) 1. Easy to build on windows / macos / linux (compared to guile which I didn't manage to build on windows) 2. Compared to clojure, just closer to the machine overall, in my case specifically OpenGL libs. I love Clojure but have had a hard time making client side apps with it. Done a bunch of CLJS stuff (e.g. card game https://animal-capital.surge.sh/), but many little things get annoying (e.g. can't open my editor from a browser error, can't `eval` etc. Doesn't quite have the live coding feel).

Post reply on HN