Login
You're viewing the ruby.social public feed.
  • Nov 25, 2026, 10:13 AM

    I rewrote some of last year's #LuaLang #adventOfCode solutions into #SBCL for practice. Conclusions: doing that kind of imperative solution in Lisp hurts my head. Hopefully I have more success coding #Lisp the way I usually code #Forth: with shorter functions and less gnarly control flow.

    💬 1🔄 0⭐ 0

Replies

  • Nov 25, 2026, 10:18 AM

    @psf I remember having fun incorporating PROG when porting some imperative code to Common Lisp. The result was verbatim-ish.

    💬 1🔄 0⭐ 0
  • Nov 25, 2026, 10:24 AM

    @jackdaniel Oh yeah I made some perfectly good let-prog-do stew, it just vastly loses out in readability compared to the original Lua program. It's hard to write better imperative code than in an imperative language!

    💬 1🔄 0⭐ 0
  • Nov 25, 2026, 10:26 AM

    @psf

    PROG is often shunned as non-lispy, but it is a perfectly reasonable construct for programs that bind variables for he scope, have multiple GO statements and want to RETURN at any point.

    If I recall correctly, the operator was introduced to lisp family to appease Algol developers :-)

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0