FWIW there are blog posts from the same author of the Emacs setup: https://andreyor.st/tags/game1/
Can't say I made anything worth mentioning. There are some bigger templates available that I am sure do more useful things, but I prefer something small enough that I can see what is going on.
Worked fine even for getting things to run in LoveDOS, a port of some older Love2D version to MS-DOS. In practice compilation was a bit too slow for comfort, so a better way was to pre-compile the fennel-scripts to Lua and just run those.
I installed some LSP server for fennel that comes with optional built-in code completion for both Love2D and TIC-80. Works well in emacs.
https://github.com/yfuna/paip-el
The original one:
https://github.com/norvig/paip-lisp
Paradigms of AI Programming:
https://upload.wikimedia.org/wikipedia/commons/d/d4/Peter_No...
jhoechtl•6mo ago
xlii•6mo ago
I would add Clojure to the modern Lisps, too, which I find the most feature rich (even though had much more blast writing Janet).
TacticalCoder•6mo ago
Yup. Clojure may not be the most lispy Lisp but it reaches: it works on top of the JVM (with super easy Java interop), it transpiles to JavaScript and I also use it to write script using Babashka (GraalVM/AOT native Clojure interpreter which starts in milliseconds, avoiding JVM startup time [notoriously slow for regular Clojure programs]).
Being able to share code between Clojure and ClojureScript is really sweet.
Clojure(Script) / Emacs (CIDER) / eglot (LSP client for Emacs): life is good!
neutronicus•6mo ago
foxygen•6mo ago
vindarel•6mo ago
With toggle-pretty-print-hash-table it will pretty-print its content, readably.
tmtvl•6mo ago
terminalbraid•6mo ago
tmtvl•6mo ago
kryptiskt•6mo ago
tmtvl•6mo ago
ashton314•6mo ago
Racket improves on Scheme: its macros are fully hygienic whilst not being limited to template -> pattern transforms. See https://docs.racket-lang.org/guide/macro-transformers.html
EDIT: syntax-case -> syntax-rules; R6RS specifies the latter—I believe the former is a Racket construct equivalent in power to `syntax-rules`.
Straw•6mo ago
ashton314•6mo ago
It does not have the same power as `defmacro`: you cannot define general procedural macros with `syntax-rules`, as you are limited to the pattern-matching language to compute over and construct syntax objects.
[1]: https://docs.racket-lang.org/reference/stx-patterns.html#%28...
shawn_w•6mo ago
R6 having `syntax-case` macros is one of the more controversial things about it; a surprising number of implementers don't care for them.
ashton314•6mo ago
https://www.scheme.com/tspl4/syntax.html#./syntax:h3
terminalbraid•6mo ago
soegaard•6mo ago
Scheme R5RS, R6RS and R7RS all have macro systems. In R5RS has a pattern/template based system (syntax-rules). In R6RS the system has both patterns, templates and procedural macros.
The most modern system is Racket though. See `syntax-parse`.
ashton314•6mo ago
Wait, r6rs has proc macros? Where is that in the spec? I've only seen the `syntax-rules` bit.
soegaard•6mo ago
Look for `define-syntax`.
https://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_i... https://www.r6rs.org/final/html/r6rs/r6rs-Z-H-13.html
setopt•6mo ago
As far as I know, the CL spec hasn’t been updated for 30+ years, and most of its design is far older.
tmtvl•6mo ago
CL also has first-class support for debugging with things like describe, step, and trace built-in.
EDIT: Yeah, the CL spec dates from 1994 and a bunch of things which we would expect nowadays (networking, POSIX,...) are provided by external libraries rather than being part of the spec, but in various ways CL is way ahead of its time.
pjmlp•6mo ago
Which goes to show how many lessons the industry failed to learn on those 30+ years.
spauldo•6mo ago
CL has a more-or-less frozen standard, in the sense that it's unlikely to have an update. Scheme gets updated standards, but they seem to focus on refining Scheme rather than adding "modern" features. Both are very extensible and people do add modern features as implementation extras or libraries.
I can't comment about Racket. As an outsider, it appears to be a playground for hardcore CS types to experiment with different programming language features, which suggests it's the most "modern." That's just the impression I get, though - feel free to correct me on that.
radiator•6mo ago
ritenuto•6mo ago
Typo, it should be: “with one n” (as the earlier commenter wrote “Jannet”). It took me a while to parse this, I was searching for the nonexistent “l” embarrassingly long.
giraffe_lady•6mo ago
Janet is also very good, I like it a lot I just don't have a ton of use for it. It's good as a high level scripting or glue language, but then so also are ruby, python, node, elixir, raku, and so on you probably already know several so it's hard to justify learning another. It's pleasant though.
I think janet is actually an extremely strong lua competitor for embedding, it takes the best parts of lua's design on that front but also includes excellent tools for implementing parsers and DSLs (PEG lib in the language core! and macros) which is most of the time what you're embedding lua for in the first place.
So basically janet is good to replace lua, and fennel is good when you can't replace lua.
Re: lisp. I think the main thing about "modern" lisps is that they don't use a cons cell or linked list as the main data structure, though they still use it for code structure. These two (and also clojure) use hashmaps and arrays a lot more, and have lispy ways of interacting with them. Some nerds will say it's not really a lisp for this reason and to them I say "ok."