Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
spiritual bypass
Feb 19, 2008

Grimey Drawer
If I want to write in Lisp and distribute a binary to my users, is Racket my best option these days?

Adbot
ADBOT LOVES YOU

spiritual bypass
Feb 19, 2008

Grimey Drawer

Pollyanna posted:

So the common idea of "HTTP is stateless and you must assume the connection and requests are too" still holds, but individual connections are considered their own processes? What advantage does this have over the previous one-process model? I can see the obvious picks of parallelization, but there's also concerns like database access that could limit the benefits from that...I'm not a web dev genius, just a monkey, so maybe I'm missing something. As a general system architecture, too, I can see how it'd be useful, but I still need some practice and experience to really grok it.

I'm under the impression that the database connection is actually an abstraction of a connection pool that works without programmer intervention. The process-per-connection allows a share-nothing approach that should, hopefully, make things just a little bit safer. FWIW, I think this is exactly how PHP-FPM works.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Clojure is the most convenient for web development because of its robust ecosystem, specifically the Luminus framework. It's more of a set of libraries with some basic scaffolding than anything Rails-like, which is why it's good. Programming in Clojure makes using Clojurescript more convenient, which is also a substantial benefit. The main downside of Clojure is that the error messages suck.

Common Lisp is good, too. SBCL can produce really fast binaries, there's a good webserver (woo), and plenty of other good tooling, including frameworks. The only downside I can think of is that reading the spec kinda sucks and that trying to figure out where your compiler diverges from the spec also sucks, but usually it's not a big deal in practice.

Every major Scheme implementation has at least a web server available for it, but I'm not aware of any that have a full-featured web stack with sessions, routing, and everything already well-considered the way Clojure has with Luminus. I'm on a personal crusade to make this happen for Racket, although Racket will be hampered by its execution speed for the forseeable future.

All of these languages have superb Emacs support, fwiw

spiritual bypass
Feb 19, 2008

Grimey Drawer
Racket is basically the best Lisp

spiritual bypass
Feb 19, 2008

Grimey Drawer
I'm halfway through Beautiful Racket, a guide to DSL writing, and it seems pretty cool and not that hard. I haven't done anything practical with it yet, but I plan to use it to build a Racket equivalent to Clojure's HugSQL. One DSL that Racket users will encounter frequently is Scribble, the Racket documentation generator. It's easy to work with and generates superb docs. When you build a package for the Racket package repository, the packaging system also builds and hosts your docs, so you'll definitely use it if you do any open source work in Racket.

One more Scheme I should've mentioned for web work is Chicken. I haven't used it myself, but it apparently has a following for its web capabilities. The website is nice and easy to navigate and it has its own package manager.

  • Locked thread