Stumbled across Janet, a functional programming language that clocks in at 1MB

=> Janet | Awesome Janet | Humorous Janet Book

=> Posted in: s/programming | ๐Ÿ€ gritty

Jan 17 ยท 2 days ago ยท ๐Ÿ‘ darkghost, argenkiwi

10 Comments โ†“

=> ๐Ÿ‘ป darkghost ยท Jan 17 at 00:41:

I've learned more about programming from this BBS than I did from a year of computer science. I should make my own scripting language. I could call it ghostscript or something. (this is a joke for all of you about to jump in.)

=> ๐Ÿš€ stack ยท Jan 17 at 02:39:

Yes, it's a Lisp!

I remember being excited and later disappointed, but not why...

=> ๐Ÿ undefined ยท Jan 17 at 03:55:

@darkghost do it!

=> ๐Ÿ€ gritty [OP] ยท Jan 17 at 17:10:

@stack looks like it compiles to C. I was looking at lisp. kind of deciding between this and common lisp.

=> ๐Ÿ€ gritty [OP] ยท Jan 17 at 17:16:

this guidebook is hilarious

=> โ€” https://janet.guide/values-and-references/

=> ๐Ÿš€ stack ยท Jan 17 at 22:02:

common lisp, definitely! It's a proven (30+ years since standardization), pragmatic language with every imaginable feature -- other languages are slowly adopting things from CL.

I wouldn't use it for CGI scripts, as binaries are huge, but for servers and things that run for a while, a big yes!

Once you know CL, you can do anything.

=> ๐Ÿ€ gritty [OP] ยท Jan 18 at 02:20:

good to know, thanks! any lisp based languages you can suggest for cgi?

=> ๐Ÿš€ stack ยท Jan 18 at 02:35:

I generally just use C for CGI, precomputing most of the game logic ahead of time when possible...

ECL and GCL for common lisp. If you want scheme (I do not like it personally), Chicken or Gambit is a good choice.

Janet may be a good choice. But it is some flavor of lisp.

=> ๐Ÿš€ stack ยท Jan 18 at 02:41:

Earlier I was misleadingly talking about my goto SBCL lisp which is super fast and great, but make a standalone executable you basically dump the memory image to a 100MB file.

ECL and GCL generate smallish executables and interoperate with C. ECL can even be embedded into a C application as a scripting language.

=> ๐Ÿš€ stack ยท Jan 18 at 02:58:

Internally, Janet uses arrays to represent code, rather than the traditional lisp way of using linked lists.

Because of that, you cannot use normal lisp list operations to operate on code, which makes it a lisp with awful macro capabilities, even worse than Scheme.

You sort of can use array operations, but dealing with subscripts makes it impossible to create beutifly simple recursive macros of CL.

To me, the raison d'etre of Lisp is being able to manipulate code easily, or in other words, macros. Common Lisp is the only Lisp variant that does not screw it (or anything else) up, as evidenced by its specification remaining unchanged in 40 years.

If you ever wonder why Lisp looks the way it does, it is to enable macros.

Proxy Information
Original URL
gemini://bbs.geminispace.org/s/programming/23945
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
127.20563 milliseconds
Gemini-to-HTML Time
0.813485 milliseconds

This content has been proxied by September (ba2dc).