mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

18K
active users

#common_lisp

0 posts0 participants0 posts today

I just completed "Restroom Redoubt" - Day 14 - Advent of Code 2024 with Common Lisp!

P1 was pretty easy. But part 2 is very vaguely defined. I'm not proud of my solution to dump each tick to an ASCII PBM and look through the images manually, but it got it done. I had some ideas of what to do to automate it, that might still work with some tweaking now that I know what specifically I am looking for.

adventofcode.com/2024/day/14

adventofcode.comDay 14 - Advent of Code 2024

Hello, does anyone have any experience with "#haunt" #SSG (static site generator) that is written in #guile #scheme ?

There looks like there are some neat sites made with it.

I'm looking for a static site generator, I'd like to be doing any html template etc, with something like hiccup, and write prose content (blog posts, etc) in #markdown and #orgmode . I would have thought that there would be something in #clojure or #common_lisp but I don't see anything.

What is the correct way to print a string without quotation marks surrounding it, but retain the automatic line-ending, in #common_lisp #lisp ?

(print "hello") ; has quotes
(princ "hello") ; no quotes, but no line-end

(format t "hello") ; no quotes, no line-end, and it seems like abusing format to me

I'm aware there's probably something I can pass to print to remove the quotes, but I can't see it at a glance :/

SBCL won't run-program fzf, but ECL does.
I was thinking of writing a program in lisp. Part of the program was going to pipe some choice to fzf fuzzy finder. I was trying to use SBCL, but it just hangs and does not launch fzf. I thought I try ECL, and it launches fzf just fine.
Type in
(uiop:run-program "echo -e 'One\\nTwo' | fzf" :interactive t :output *standard-output*) SBCL hangs and ECL launches fzf with my choices.
#common_lisp #lisp #sbcl #ecl

I am running my 4th #common_lisp script in production© and you surely can do it too!

lisp-journey.gitlab.io/blog/ru

This last one is about reading data from a DB, formatting it, sending it through SFTP every morning with a CRON job. I also developed and host little web apps. We take a tour of what I use, but the idea is that for these mundane tasks (data munging, REST APIs…) nothing technical is preventing us from using CL.

Lisp journey · Running my 4th Common Lisp script in production© - you can do it too - Lisp journeyBy Lisp journey

For clients I had to send files to a SFTP server. Giving the password on the command line is not really doable, that's why projects like LFTP exist (it is also multi protocol). I made a simple wrapper: github.com/vindarel/lftp-wrapp

You read credentials from ENV, files or variables, create a command object, and in the end you'll run a command like

lftp -p 400 sftp://user:*****@test.org -e "cd in/; put file.txt ; bye"

For FTP, cl-ftp is pure CL and works well.

lftp wrapper, sftp client for Common Lisp. Contribute to vindarel/lftp-wrapper development by creating an account on GitHub.
GitHubGitHub - vindarel/lftp-wrapper: lftp wrapper, sftp client for Common Lisplftp wrapper, sftp client for Common Lisp. Contribute to vindarel/lftp-wrapper development by creating an account on GitHub.