TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lisp for the Web, Part III

105 pointsby VitoVanalmost 10 years ago

9 comments

eudoxalmost 10 years ago
You can&#x27;t build a web application on Hunchentoot -- a basic HTTP server -- and call it modern. Take a look at Clack for the actual modern approach: <a href="http:&#x2F;&#x2F;clacklisp.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;clacklisp.org&#x2F;</a><p>Or one of the frameworks built on it:<p><a href="http:&#x2F;&#x2F;8arrow.org&#x2F;caveman&#x2F;" rel="nofollow">http:&#x2F;&#x2F;8arrow.org&#x2F;caveman&#x2F;</a><p><a href="http:&#x2F;&#x2F;8arrow.org&#x2F;ningle&#x2F;" rel="nofollow">http:&#x2F;&#x2F;8arrow.org&#x2F;ningle&#x2F;</a><p><a href="http:&#x2F;&#x2F;eudoxia.me&#x2F;lucerne&#x2F;" rel="nofollow">http:&#x2F;&#x2F;eudoxia.me&#x2F;lucerne&#x2F;</a>
评论 #10103007 未加载
评论 #10103060 未加载
评论 #10103514 未加载
评论 #10104636 未加载
sabyaalmost 10 years ago
&gt;You can imagine Lisp grammar like Pac Man eating the dots: ᗧ••••, and there is no ghosts here. Pac Man is the function in Lisp, and the dots are arguments. After Pac Man eat up all the dots (the function is executed with all these arguments), it becames a dot: • . and a dot is able to be eaten by another Pac Man.<p>Simplest explanation of Lisp grammar I&#x27;ve read!
评论 #10104715 未加载
评论 #10104578 未加载
aidenn0almost 10 years ago
This is a reasonable way to get a simple hello world up, but for those new to lisp, know that this isn&#x27;t how most people develop.<p>Firstly, it is rare to see the SBCL REPL used directly.<p>Most commonly, lisp is developed via an IDE that will include a full-featured REPL (there are several; for sbcl SLIME is what is most commonly used. ClozureCL has its own IDE on OS X, and commercial lisp implementations will ship with their own).<p>GNU clisp has a more feature-full REPL, so you may see that used occasionally.<p>Secondly, lisp has a build system called ASDF. There is a tiny amount of code needed to setup a simple project, and there is a tool named &quot;quickproject&quot; that will generate it all for you. With all the improvements to ASDF in the past decade, I never do a &quot;write lisp file, then load it&quot; anymore.
评论 #10104168 未加载
评论 #10103333 未加载
mck-almost 10 years ago
In case anyone might find it helpful to have another example: I wrote a similar post a couple years ago: <a href="https:&#x2F;&#x2F;kuomarc.wordpress.com&#x2F;2012&#x2F;05&#x2F;13&#x2F;12-steps-to-build-and-deploy-common-lisp-in-the-cloud-and-comparing-rails&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kuomarc.wordpress.com&#x2F;2012&#x2F;05&#x2F;13&#x2F;12-steps-to-build-a...</a>
olewhalehunteralmost 10 years ago
For anyone interested in having their application and web testing in the same runtime, I&#x27;m making a CL web automation library&#x2F;front-end out of emacs for testing and botting purposes. <a href="https:&#x2F;&#x2F;github.com&#x2F;olewhalehunter&#x2F;kommissar" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;olewhalehunter&#x2F;kommissar</a>
评论 #10103138 未加载
hacker_9almost 10 years ago
&gt; Why Lisp? Again &gt; It is awesome.<p>Why do people who write or talk about Lisp always have to start with something like this? To be honest I still can&#x27;t see the appeal of Lisp. Yes everything is a function so you can add&#x2F;remove &#x27;language features&#x27; as you want, and the syntax is really simple, and code is data (a rare need of mine anyway). But Lisp sacrifices the most important thing of all; readability.<p>Everyone tries to read programming languages as close as possible to plain english in their head, but Lisp goes completely against this and makes you write things like (* 1 (+ 2 (&#x2F; 3 4))) where you have to glance back and forth to even understand the equation - is 1 * (2 + 3&#x2F;4) not easier to read? Even in C# the phrase &#x27;if (!(foo is bar))&#x27; annoys me because it reads &#x27;if not foo is bar&#x27; when I&#x27;d like to say &#x27;if foo is not bar&#x27;! So I think me and Lisp have no hope.
评论 #10103885 未加载
评论 #10103879 未加载
评论 #10104397 未加载
评论 #10104589 未加载
评论 #10104564 未加载
评论 #10110610 未加载
评论 #10103869 未加载
评论 #10104007 未加载
评论 #10104584 未加载
murftownalmost 10 years ago
Nice tutorial!<p>Note that your sbcl must be built with threading enabled for the example to work. Otherwise, the initial Lisp landing page will show up at URI &#x2F;, but the handler for &#x2F;hello?name=Blah will never be executed because sbcl-without-threading silently fails to use threading and instead runs the server in a blocking way in which later code never gets a chance to run.<p>This was confusing for me at first, but once I built sbcl from source using &quot;.&#x2F;make.sh --fancy&quot; everything worked perfectly.
Scarbuttalmost 10 years ago
Don&#x27;t know how are things on the Common Lisp side, but on the Clojure side, as much as I prefer it to Javascript I end writing regular web applications in Javascript, because for me, it is the more pragmatic choice when I need to get something done. Javascript&#x2F;nodejs has lots of good mature libraries with good documentation for anything related to web dev, sponsored by companies that eat their own dog food (ex: the passportjs lib).
评论 #10103429 未加载
kerkeslageralmost 10 years ago
Do you have an RSS feed for your blog?
评论 #10104024 未加载
评论 #10103876 未加载