Settings

Theme

Ask HN: Anarki or Racket?

5 points by hawkeyedan 3 years ago · 16 comments · 1 min read


For a new web-baed project, one I'm doing for fun but hope to make a success, I've pretty much decided to write it in Racket or Anarki.

Which one?

The problem domain is Lisp-y: convenient for functional programming, and made easier with macros, DSLs and/or metaprogramming.

I haven't used a proper Lisp since my programming paradigms course at Bryn Mawr many moons ago, so I don't have any strong preferences yet.

Obviously either will do the job, and Anarki is built on top of Racket.

Still, what are the pros and cons (pun intended) of each?

krapp 3 years ago

As someone who's used Anarki, and contributed to it (for better or worse,) between the two I'd have to recommend just using Racket.

All of the web stuff in Anarki just calls Racket libraries sooner or later, and Racket has better facilities for HTML and other language generation.

Anarki (IMHO) is really only good if you want a HN clone without changing much, or if you want to experiment, because it's still rough around the edges in places, documentation is spotty, and error handling is still a disaster.

  • hawkeyedanOP 3 years ago

    Thanks, that’s a very helpful insight. You’ve put my mind a significant ease.

feeley 3 years ago

I'm not sure what part of your project is web-based and what you mean by "web-based". Do you mean executing Lisp/Scheme code on the browser side or the server side? In any case you should consider Gambit Scheme that has a complete JavaScript backend. For example check out the https://try.gambitscheme.org site to see the online REPL in action.

idoh 3 years ago

I've tried both. While I enjoyed the setup with Anarki better (in particular using the repl to make live inspections and changes), Racket is vastly more supported by docs and the community. So if you are a CS pro and don't mind figuring out everything for yourself then Anarki is plausible, otherwise it's kinda crazy to go that way.

hawkeyedanOP 3 years ago

Just to be clear: yes, there are other Lisps.

Yes, Clojure is cool.

Yes, LFE is a thing that exists. Yes Elixir is Lisp-adjacent.

Yes, any of those would give me access to a larger ecosystem and the resources of a well used, well supported VM.

I may be an idiot (it's been said), but I'm not a stupid idiot. I've ruled each of those out for good-ish reasons.

  • _448 3 years ago

    > I've ruled each of those out for good-ish reasons.

    And what would those reasons be?

    • hawkeyedanOP 3 years ago

      LFE lacks it’s own robust web app development stack … and translating between documentation in Elixir (Phoenix) and Lisp all day will make my head hurt.

      Clojure is a tougher call. For this project it might be good.

      However, I want to include some CLI scripts … and the JVM adds deployment complexity for those.

      ClojureScript is tempting, but I don’t see a great story about the server piece for rapid web app development there.

      • fulafel 3 years ago

        Do you want scripts as in "i want text files run by an interpreter" or "i can package my scripts as single executables"? In Clojure land Babashka and Graal native image can do those respectively.

  • mepian 3 years ago

    Any reason why Common Lisp is not considered?

    • hawkeyedanOP 3 years ago

      It’s not in my mix because it’s a fairly “big” language, which is a huge bonus once you’re proficient but makes it a poor choice for me to dive into Lisp(s). For someone else, that might not be true. But I like to be able to hold things in my head.

      In the long run, CL is a great option. My theory is that it’s a place I could go if/when I’m up and running in another Lisp.

soegaard 3 years ago

FWIW the source of both racket-stories.com as well as mini versions are available.

     https://racket-stories.com/about
If you are looking for a framework, then check out Koyo.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection