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.

Ask HN: My experience with Common Lisp. Is there a better way?

1 pointsby boxmonsterover 3 years ago
I&#x27;m posting my experience hoping someone will tell me I&#x27;m doing it wrong and tell me a better way. I&#x27;m aware that I could use Racket or Clojure but I really wanted to try Common Lisp as a historically important language.<p>2 days ago I posted a link that looked really interesting as a fun way to learn Common Lisp. See https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29856110 or Sketch https:&#x2F;&#x2F;github.com&#x2F;vydd&#x2F;sketch<p>Turns out it was previously posted and got good feedback so I decided to try it. I use Windows. There were several Common Lisp installations to choose from. I choose Clozure because it appeared to be developed by Mac users, so I thought it might to have features I liked.<p>Clozure installation on Windows was fine. However, I ran into problems installing sketch because I had to build Simple Direct Media components https:&#x2F;&#x2F;www.libsdl.org&#x2F; and it wasn&#x27;t clear ahead of time which ones. I didn&#x27;t have MinGW, MSYS2 or Cygwin setup so instead I rooted around until I found SDL2.dll and libtiff.dll. Unfortunately, I couldn&#x27;t find libffi.dll so had to build it. I installed MSYS2 but failed. Cygwin same thing. This is my fault as I never learned how to do this.<p>I installed Steel Bank Common Lisp without problem hoping it might have what Sketch needs but it doesn&#x27;t<p>I gave up on Windows proper and installed WSL2 because I&#x27;m on a developers preview of Windows 11 and had read that it does graphics now. I installed Ubuntu 20 into it, but couldn&#x27;t get it to work. I had the same problem building SDL.<p>I switched to my VMWare installation of Ubuntu 20 and failed there too, but I suspected there might be a conflict, so I installed a fresh copy of Ubuntu 20 in a new virtual machine.<p>It worked! Very nice. I can do graphics with Common Lisp.<p>I prefer not using VMWare so I am currently learning the difference between MSYS2, MinGW, Cygwin, and GnuMake32. I expect to have a Windows version working by the end of the day. I wondering if I should do a Docker image or maybe there is something better now? Last time I used Docker it seemed more difficult than it need to be.<p>&#x2F;&#x2F; These are the steps I took to make it work on Ubuntu. I don&#x27;t use Linux that often so I&#x27;m sure there is a better way like combining some of these commands<p><pre><code> &#x2F;&#x2F; Install dev tools sudo apt-get update -y sudo apt install build-essential -y sudo apt-get install -y m4 sudo apt-get install -y git sudo apt-get install -y libsdl2-dev sudo apt-get install -y libsdl2-image-dev sudo apt-get install -y libsdl2-ttf-dev sudo apt-get install -y curl &#x2F;&#x2F; install Clozure git clone https:&#x2F;&#x2F;github.com&#x2F;Clozure&#x2F;ccl.git ccl-dev curl -L -O https:&#x2F;&#x2F;github.com&#x2F;Clozure&#x2F;ccl&#x2F;releases&#x2F;download&#x2F;v1.12.1&#x2F;linu xx86.tar.gz cd ccl-dev tar xf ..&#x2F;linuxx86.tar.gz sudo cp .&#x2F;scripts&#x2F;ccl64 &#x2F;usr&#x2F;local&#x2F;bin cd &#x2F;usr&#x2F;local&#x2F;bin sudo chmod +rwx ccl64 sudo chown mike ccl64 sudo chgrp mike ccl64 sudo mv ccl64 ccl code . &#x2F;&#x2F; start vscode put path to home ccl in var CCL_DEFAULT_DIRECTORY=&#x2F;home&#x2F;mike&#x2F;ccl-dev cd ~&#x2F;ccl-dev ccl to start REPL (rebuild-ccl :full t) (quit) &#x2F;&#x2F; install quicklisp into ccl-dev curl -O https:&#x2F;&#x2F;beta.quicklisp.org&#x2F;quicklisp.lisp ccl --load quicklisp.lisp (quicklisp-quickstart:install) (ql:add-to-init-file) (quit) &#x2F;&#x2F; start sketch cd to ccl-dev directory type &#x27;ccl&#x27; to start Clozure REPL (load &quot;quicklisp.lisp&quot;) (ql:quickload :sketch) (ql:quickload :sketch-examples) (make-instance &#x27;sketch-examples:hello-world) (make-instance &#x27;sketch-examples:sinewave) (make-instance &#x27;sketch-examples:brownian) (make-instance &#x27;sketch-examples:life)</code></pre>

no comments

no comments