shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

267
active users

#commonlisp

6 posts5 participants2 posts today
Replied in thread

@robpike Cool to look at, but it's a well-known first-order error term of Stirling’s formula revealing itself in base-10 notation.

My code here differs slightly from what you did to get your results, but look at the (stubborn( similarities.

(defparameter *bernoulli-coeffs*
'(-1/12 1/360 -1/1260 1/1680 -1/1188)) ; not working this out from scratch lol

(defun log-error (n &optional (terms 3))
(let ((sum 0d0) (nk n))
(dotimes (j terms)
(setf sum (+ sum (/ (float (nth j *bernoulli-coeffs*) 1d0) nk)))
(setf nk (* nk n n))) ; N, N³, N⁵, …
sum))

(defun stirling-ratio (k &optional (places 25) (terms 3))
(let* ((n (expt 10d0 k))
(ratio (exp (log-error n terms))))
(format nil "~,vF" places ratio)))

(defun show-pattern (&optional (max-k 6) (places 25) (terms 3))
(loop for k from 1 to max-k
do (format t "k = ~d ⇒ ~a~%" k
(stirling-ratio k places terms))))

Try this with (show-pattern 15 17). This is from clisp, but it should work on any common lisp.

There are people much smarter than I that can probably do this more efficiently. but this should show you why you see what you see.

Google "borrow trail" for more info about what it is.

Continued thread

Are there anybody working on integrating #mcp's in #guix?

I can see all the base ones are node.js dependent packages and even filesystem-mcp won't import good with `guix import …`.

And on lisps options are very limited. I've only found this gem github.com/40ants/mcp (#commonlisp)

40ANTS-MCP is a framework for building Model Context Protocol servers in Common Lisp - 40ants/mcp
GitHubGitHub - 40ants/mcp: 40ANTS-MCP is a framework for building Model Context Protocol servers in Common Lisp40ANTS-MCP is a framework for building Model Context Protocol servers in Common Lisp - 40ants/mcp

#alife #ai #reflection #BDI #crows for my #commonLisp #emacs #slime #eepitch #caisor #softwareIndividuals #programming (I guess this is particularly #softwareEngineering ).

screwlisp.small-web.org/comple

I consider the scenario where one vehicle tells another one where to get food, and run a #thoughtExperiment with crow tool use. I find programs want to alternate autonomous action with human-in-the-loop interpretive collaboration.

@ksaj @shizamura

Unsung heroes @dougmerritt @mdhughes & everyone.

screwlisp.small-web.orgAfter alife talk practical reflections

A few weeks ago I wondered what it takes to turn a small LISP-1 into a LISP-2. Turns out it takes just a few hours to get most things right, then some days to iron out a few subtleties, and then a couple of weeks to polish it into a piece of art.
MICRO COMMON LISP is a tiny, purely symbolic, microscopic subset of #CommonLISP. It runs in less than 64K bytes of memory, even on #DOS (tiny model) or CP/M. Here it is:
t3x.org/mcl/
#CPM #LISP

t3x.orgT3X.ORG mcl/index

#lisp Cookbook, condition handling: handler-bind better explained: it doesn't unwind the stack.

lispcookbook.github.io/cl-cook

context (and self plug): as I was meeting with Ari on our Lisp mentoring session (PM if interested ;) ), I realized this page was lacking. But the topic was well and complete on my Udemy course. So I took another 1h40min and "backported" this example. Hope you learn a thing or two.

lispcookbook.github.ioError and exception handlingA collection of examples of how to use Common Lisp

#programming #softwareEngineering #commonLisp images as communicating #automata screwlisp.small-web.org/comple screwlisp.small-web.org/comple

Article with one minute video showing four lisp images chattering unattended.

There is no leader- they're just talking. However, they are using #emacs #slime #eepitch and sleeps so you can usefully watch them.

A precursor to next week's episode featuring @ksaj discussing breitenbergian vehicles etc.

Do you use a cluster of #lisp images?

#programming #softwareEngineering #emacs #automation from #commonlisp #swank #slime via #eev
screwlisp.small-web.org/screwn
I'm really, really, really happy with how this turned out to work.
CLIM-USER> (eepitch-expr '(get-decoded-time))
(GET-DECODED-TIME)
T

Lisp receives an instruction from emacs to send an instruction to emacs to pitch an instruction to the lisp image, which gets executed, and control returns to the lisp image.

@eduardoochs I pulled the insides out of eepitch-do.
@akater@shitposter.world <- CL-EL

Replied to screwlisp

P.P.S.

* (defun pathname-info (p)
"Return a list with partial information about pathname P."
`(,(namestring p) #+sbcl ,(sb-ext:native-namestring p) ,(pathname-type p)))
PATHNAME-INFO
* (pathname-info (make-pathname :name "foo" :type "bar"))
("foo.bar" "foo.bar" "bar")
* (pathname-info (make-pathname :name "foo.bar" :type nil))
("foo\\.bar" "foo.bar" NIL)

Caveat programmator...

#CommonLisp

@screwlisp

Replied to screwlisp

If all pathnames are constructed within your program, indeed you work with pathname objects made with `make-pathname' (or `merge-pathnames') and it's all right.
(More or less, maybe.)

To _process_ portably pathname _strings_ coming from the _outside_...
(Where that includes _changing_ parts, not merely passing strings around.)
Off the top of my head, I am afraid all I can say is it can be tricky.
The proverbial devil in the proverbial details.

Not helpful, I know...
🙁

#CommonLisp

@screwlisp

Replied to screwlisp

[Multi-type pathnames.]

I don't recall, but it may be implementation-specific whether parsing a pathname string takes the first dot or the last dot as the start of the type part.
Do check the specification.
If unspecified, regrettably I don't recall the recommended way to tackle this.
These are legitimate cases, of course, e.g. foo.tar.gz.

#CommonLisp

@screwlisp

#programming #softwareEngineering article screwlisp.small-web.org/progra #commonLisp #asdf #systemsProgramming #series #pathnames #packaging

Really simple... Sort of... But so intricate to write. I deal with (writing a smidge of #interactive #lazyEvaluation #functionalProgramming ) :

- Tangling markdown into an asdf :class :package-inferred-system lisp system
- Doing so with scan-file and collect-file from series
- Working with lisp’s make-pathname directories.

screwlisp.small-web.org:screwlisps-knowledge/tangle common lisp asdf package markdown tangling and lisp pathnames
Replied to screwlisp

<"/>
CL-USER> (scan-file "test.sexp" #'read-line)
#Z("foo bar" "" "baz" "" "buz frob ulous" "ly")

With an input format as simple as that you may want to call instead `read-delimited-list' in a loop with a readtable where the definition of right parenthesis is copied to newline.
With more complex formats like CSV simple splitting of sequences won't be enough.

#CommonLisp

@screwlisp @hairylarry @8arrow @jdevoo @jakimfett @psvensson @t73fde @khinsen @bassethorn @vindarel @swrogers

@jackdaniel @NGIZero h'mmm ... Yesterday, not for the first time, I was looking at reimplementing #InterLisp's GRAPHER library in #Clojure. It's doable, but surprisingly difficult. If there was a good Java SVG engine which allowed callbacks through JavaScript or whatever, it would be easier, and *possibly* Batik may do that.

But #CommonLisp in the browser, interacting with SVG in the browser... Now that sounds fun.

#Introduction

Hello, my name is Christoff.

I live in Illinois, USA, outside the St. Louis area. Below I'll talk about my technology and creative interests, and a bit about me personally. I'm going to hashtag the heck out of this post.

the whole "deadbeef" thing is the magic number from #Solaris for freed memory. I simply chose .monster TLD because it seemed cool and I like "extended" TLDs.

#Technology

I have been using a OpenBSD, #NetBSD, or #GNU/#Linux since the late 1990s as a primary workstation. I used macOS from 2020 to 2025, switching to the #KDE neon distro (KDE plasma is amazing and KDE isn't bloated anymore, yay!).

My current career is as a #pentester where I break into web applications, IP networks, mobile applications (especially #Android), and people to their face or over the phone; code #malware; write documentation; and enjoy helping clients in a third party contractor/consultant role. I started that job change in 2020, when I earned the #OSCP certification at the height of "#infosec twitter" when I did well there.

Previously I worked for about 20 years as a senior-level programmer, and systems, infrastructure, and database administrator. Burnout was very real and I was extremely bored/unfulfilled.

Now that programming and sysadmin stuff isn't my career, I find I enjoy programming and tinkering again.

I am a big fan of NetBSD and always have been. I am not a huge fan of GNU/Linux but I do appreciate things "just working", even if it is full of closed-source binary blobs and other garbage. It was fun in the 1990s.

I know many programming languages but have been paid professionally to code in #C, #Perl, #Python, #PHP, #Java, and #Groovy for big commercial entities like eBay, small companies, and the US government.

I've maintained 99.99% uptime for a 60MM+ platform for years, including failover and backups (that were regularly tested... you test your failover and backups, right?!).

I always wanted to be a cool C and low-level programmer, which I thought for the longest time was being a kernel programmer, but now I know that isn't the life for me.

Emacs is something I've enjoyed since the beginning and I still can't code a #Lisp well. I'd love to be a cool #lisper with #CommonLisp, but haven't gotten there yet. I'm on the #c64 and #embedded #retrocomputing train now.

#Creative

For creative stuff, I aim to do a lot but tend to hop around as interests take me. I could use some discipline there (someday?).

For #music, I have an electric #bass (Fender Jazz) and electric #guitar. I love #jambands (#GratefulDead, #Phish, #Goose) and that's the type of music I like to play along to.

For #art, I like #acrylic and #watercolor painting. I rarely do it, but think about it a lot and love it when I do it. I don't have any skill or talent, but that's not the point. It's for me and no one else.

For #computing, I am venturing into #C64 #demoscene programming and exploration. Not only was I too poor to get one when I was little but I sorta forgot about it over time. The desire to do cool things in a restricted environment where folks are playing in the sandbox, too, is very exciting and attractive to me. I don't know how to code the #Commodore64 stuff yet, but will! Learning the assembly language (I have zero desire to code in BASIC again and I can just code assembly).

#Personal

I live with my soulmate and our five amazing cats in a small town outside St. Louis living a quiet life. Just doing our jobs, taking care of daily life stuff, and enjoying each other and life as much as we can. Ups and downs of life chaos, like anyone else, but we're doing alright!

We enjoy exploring places within driving distance and there are a lot of places to go to.

Currently, we're really into playing two-player games together and just started collecting #boardgames. Right now, we're really digging #SkyTeam, #RoyalGameOfUr, #ForrestShuffle, #SentinelsOfTheMultiverse, and this magnet game I don't know the name of. We have #SpiritIsland and #ArcNova to unwrap and learn. We tried really really hard to get into #ArkhamHorrorTheCardGame but the rules are too complicated and confusing, where it felt like we were doing the wrong thing all the time.

I am 46. I grew up loving Star Wars, Star Trek, #SciFi, reading novels non-stop, horror, and watching movies. I collect classic SciFi books from 1960s and 1970s.

I would perhaps describe myself as an extremely curious person, that loves #puzzles and #mysteries, #exploration, figuring out #HumanBehavior like I'm an alien studying humans (I'm good at it, it turns out), that has a keen eye for detail, remembering random little things, and a good listener. I'm fairly adaptable and fluid in most things, which works well for me. My brain works differently than a lot of people, and while frustrating a lot of the time for things I don't understand fully, it is me and serves me well in niches.

Making people laugh makes me happy. I am a #hacker and #tinkerer.