You can also do the memory dump thing, if that's your preference--and, under the hood, that's actually how the native executables work too. The Janet compiler/interpreter and core library all together is approximately 1MB in size (that's not a typo! One Megabyte!). So when you compile an executable, what you're really doing is packaging together a serialized image of the compile time state bundled together with a full copy of the Janet abstract machine. On startup, the Janet runtime boots (extremely quickly, FWIW), it rehydrates the compile time state (which includes all your function definitions, variable declarations, etc.), and then it executes your `(main)` function.
This means there's all kinds of compile-time metaprogramming magic you can do _without_ needing a whole separate build language to do it, and also without impacting run time performance (like, for e.g., macro expansion all happens during that step). Because all that will have calculated during compilation, the results are saved to your embedded image and so they'll be accessible at run time, wherever and whenever that may happen.
I'm honestly not that well-educated on programming languages in general so I don't know if this is all super boring run-of-the-mill type stuff that other languages do too (probably so), but learning how Janet does it was super fun when it all clicked in my brain and it's the one language I know a little bit about, so hey, now you get to know about it too. :)
Because it's not built around linked lists, the core type most encountered for lists of data is arrays and tuples. Neither is conducive to efficiently removing elements mid-set, or composing two sets, or interleaving two sets, or other operations that require reordering, replacing, adding or removing elements in the set. When I'm writing code in lisp I don't think about that overhead much, because for linked lists it's not an issue.
> Insert a sequence of random integers into a sorted sequence, then remove those elements one by one as determined by a random sequece of positions: Do you use a vector (a contiguously allocated sequence of elements) or a linked list?
The key is that the sequence is sorted; and is kept sorted throughout the insertion process. With a linked list that means at least an O(n) traversal for insertion, so of course it's terrible.
And yet a subset of the linked list called a tree is usually the right answer to problems.
In the contrived example, a linked list is clearly a terrible option for manipulating a sorted set of integers. Modern computers can slice and dice contiguous integers with vectorized routines, and those benefits are lost with linked lists that are storing their data haphazardly across the heap.
If your problem space is best defined with contiguously-stored numbers, then for sure, don't use linked lists. Most lisps will happily provide you with vectors and arrays for these use cases.
Janet's REPL has a debug mode, but I'm sadly not qualified to evaluate whether/how it measures up to CL's due to my own inexperience with either. :)
As for restarts (I had to Google around to get an idea of what that means)—it seems to me that Janet does not have first-class support for restarts in the way that some other Lisps, for e.g. CL, do. Presumably (as it would be in most other languages I would suppose) one could recreate that experience in Janet by tapping into the first-party error handling and REPL primitives. But you'd definitely be rolling your own rather than having it already in Janet out of the box.
What Lisp should we learn if we want to make money from it?
That said, I don't think it matters much. A developer familiar with some lispy language (and perhaps functional programming) should be able to quickly pickup any other lispy language. And the developers that make the most money have probably used a lot of programming languages, with different paradigms.
[0]: https://survey.stackoverflow.co/2022/#top-paying-technologie...
[1]: https://survey.stackoverflow.co/2023/#section-top-paying-tec...
If you're serious about learning a Lisp but motivated more by, as you say, "having more fun" rather than, say, landing a six-figure job writing it professionally... then may I recommend Janet[0] for your consideration. Janet is an embeddably-small, yet surprisingly batteries-included Lisp implemented in pure C. In terms of syntax and core library it borrows more directly from Clojure than from Scheme, but all the modern Lisps have their bits of influence. I've found both the language and the tiny little community that exists around it delightful.
As an example of the latter, somebody smart wrote a real actual book[1] about Janet recently that was on the HN front page for a day or so when he first released it. It's a gentle introduction not just to Janet but to Lisp in general, and assumes only general proficiency with JavaScript to get you up to speed. I recommend it.
[0] https://www.janet-lang.org
[1] https://janet.guide