Live data from Hacker News

Ask HN: Anarki or Racket?

news.ycombinator.com

1–10 of 17 posts

Ask HN: Anarki or Racket?

#1
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?

Re: Ask HN: Anarki or Racket?

#2
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.

Re: Ask HN: Anarki or Racket?

#3
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.

Re: Ask HN: Anarki or Racket?

#4
post #3

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.

In my case, web-based just means "it is a piece of software you access via the web." Web application, website, SAAS, whatever.

And you're right, I should have considered Gambit. Dang, now I have a ternary decision to make.

Re: Ask HN: Anarki or Racket?

#5
post #3

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.

In my case, web-based just means "it is a piece of software you access via the web." Web application, website, SAAS, whatever. And you're right, I should have considered Gambit. Dang, now I have a ternary decision to make.

The FFI with JavaScript is nice. Have a look at this paper, in particular the examples that can be copy-pasted to https://try.gambitscheme.org:

https://www-labs.iro.umontreal.ca/~feeley/papers/BelangerFee...

Re: Ask HN: Anarki or Racket?

#6
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.

Re: Ask HN: Anarki or Racket?

#7
post #6

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 arou…

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

Re: Ask HN: Anarki or Racket?

#8
post #5

Earlier quoted context omitted.

In my case, web-based just means "it is a piece of software you access via the web." Web application, website, SAAS, whatever. And you're right, I should have considered Gambit. Dang, now I have a ternary decision to make.

The FFI with JavaScript is nice. Have a look at this paper, in particular the examples that can be copy-pasted to https://try.gambitscheme.org : https://www-labs.iro.umontreal.ca/~feeley/papers/BelangerFee...

While I’ve got you… What’s the state-of-the-art story for package management in Gambit?

Re: Ask HN: Anarki or Racket?

#9
post #5

Earlier quoted context omitted.

The FFI with JavaScript is nice. Have a look at this paper, in particular the examples that can be copy-pasted to https://try.gambitscheme.org : https://www-labs.iro.umontreal.ca/~feeley/papers/BelangerFee...

While I’ve got you… What’s the state-of-the-art story for package management in Gambit?

Gambit supports the R7RS module system and has a decentralized module system that can automatically download libraries from git repositories. Take a look at the "Libraries" section of the online REPL's tutorial for a few examples, or just type at the REPL:

  > (module-whitelist-add! '(github.com/feeley))
  > (import (github.com/feeley/roman demo))
This paper might be helpful if you want to know why it was designed that way:

https://www.iro.umontreal.ca/~feeley/papers/HamelFeeleyELS20...

Re: Ask HN: Anarki or Racket?

#10

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.

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

And what would those reasons be?

Post reply on HN