fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

#commonlisp

21 posts17 participants2 posts today

Lamber, my #LambdaCalculus -> Lisp compiler (github.com/aartaka/lamber) didn't handle big enough numbers (> 10-bit,) so I decided to implement some optimizations, reusing underlying #CommonLisp compiler to speed up and save space on numerics. It's not particularly reliable, because big LC numbers consume too much of the stack, but at least it's better than it used to be, almost reliably handling 12-bit numbers.

A functional scripting language compiling to pure Lambda Calculus - aartaka/lamber
GitHubGitHub - aartaka/lamber: A functional scripting language compiling to pure Lambda CalculusA functional scripting language compiling to pure Lambda Calculus - aartaka/lamber

#TIL (2) that Alexandria's mappend function is mostly unnecessary in #CommonLisp, because there's a standard mapcan that does roughly the same thing: mapping the function and joining the resulting lists. One downside might be that it uses nconc and not append, but it should be fine if you're mostly sticking with functional-ish style.

#TIL that #CommonLisp allows defining keyword arguments to be raw symbols and not keywords. So, theoretically, one can call a function like
(fn arg1 arg2 key1 kv1 key2 kv2)
instead of
(fn arg1 arg2 :key1 kv1 :key2 kv2)

Might make for some really undecipherable code, but a nice thing to have for e.g. user-facing commands.

Web developer KILLIAN.arts posted a review of Common Lisp: A Gentle Introduction to Symbolic Computation by David Touretzky. They read the book because:

"While I like web development, I have worried about specializing too much as a frameworker or a UI builder, missing out on more fundamental knowledge of computers and programming."

killianarts.online/en/articles

killianarts.onlineCommon Lisp: A Gentle Introduction to Symbolic Computation | KILLIAN.artsKILLIAN.arts creates bold and engaging web experiences to help you and your business reach your customers.

SpinPro™ was an expert system to design procedures for Beckman Instruments ultracentrifugation machines at biochemistry labs. Developed in Interlisp-D on Xerox 1108 workstations, SpinPro™ was deployed to IBM PC/XT computers as an application that ran under Golden Common Lisp by Gold Hill.

To learn more about SpinPro™ see this 1985 paper:

bitsavers.org/pdf/xerox/interl

Lisp Fun. A mathematical oddity.

Some numbers, when multiplied by consecutive numbers, produce a bit of a cycle. Try this code and notice that all the answers are permutations of the same number, 142857.

(defun cycle-142857 ()
"Prints the magical 142857 × 1..6 cycle."
(let ((n 142857))
(format t "~%Watch this cycle:~%")
(loop for i from 1 to 6 do
(format t "~d × ~d = ~d~%" n i (* n i)))))

When you've exhausted your fun running it, increment the number to see what 142857 * 7 gives you.

#programming #McCLIM #commonLisp #emacs #animating #graph #video.

toobnix.org/w/qAnmJAKv1mhuwem7

Silent, two minutes thirty of just what me being at a computer is like. I write a closure that has an example graph tree in it, open the frame, hand-write a tree into the interactor the frame draws, start a background loop that randomly changes between graph frames.

The code demonstrates a way of asyncronously running animations in mcclim.
Source codeberg.org/tfw/lineage-traci

Comments, thoughts(, prayers)?

Benben's audio engine (playback, FLAC reader/decoder, effect stack, resampling) is now all working in pure #CommonLisp, no bindings (well, except libao for the final output). Also working are a few other bits that I've ported over, like the configuration settings and metadata handling. Just FLAC files at the moment, but the others will follow very soon.

I haven't ported the UI yet, so it's just running in Emacs/Slime here with a very simple macro to init/deinit the audio output.

Performance is within just a few CPU percent of my existing Crystal version, and that should tighten up further.

#LinuxAudio

Replied in thread

@rzeta0
#CommonLisp is not minimal, because it wants to be "practical" and it comes from a tradition of very *rich* programming systems. It includes a library for meta programming, sophisticated interactive error handling, an interactive object system (CLOS) and a lot of other stuff integrated into the language. Stuff which one often needs when writing programs.

The main things you have learned: LISP is called "List Processor" for a reason, it is interactive (REPL) and extensible (macros).

So, I've been taking another run at learning #CommonLisp. The last time I tried, I simply could not wrap my brain around macros. I'm reading the same book again, but this time am a more experienced programmer, and it all just clicked in my head.

I might actually end up enjoying #Lisp after all. I don't know if it'll dethrone #Haskell, but I'm starting to get why people like it.