mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

336K
active users

#commonlisp

20 posts15 participants8 posts today
Replied in thread

@lxsameer There are a lot of things I like about it. This is a great question, 'cos everyone will have different answers. I have a few, so hopefully I'm not just duplicating them.

I started on it a long time ago, using clisp, but took a long break. But what brought me back was remembering how I could easily talk my way through the code, to describe verbatim what it does. I got into sbcl because it is obviously more refined, but I still use clisp for anything quick I want to accomplish.

People complain about the parenthesis, but doing so ignore all the curly { and same number of () all over their code of choice. I like that Lisp's parens do not get in the way of reading what the code does. Don't listen to anyone complaining about parens, unless their language manages without some sort of equivalent. None of them do. It looks different, but hell, Python looks super weird, overly long and skinny, and everybody loves it.

To me print(something) is disruptive. (print "something") is not. Especially if that print("something"); has that semicolon on the end. wtf is that for? And this increases when "something" should be a function to output whatever that something is. In Lisp, it's pretty slobberproof, and still only takes the one line you started with (unless you WANT to make it pretty ans split it out).

I like that if I don't quite know how to do something, but I know how to start it, I can fudge my way through by writing the function, and the parts I don't know yet are just other functions I haven't written yet. I can then work on those functions after I am done writing the main thought I had. I can even make those uknowns a placeholder providing a fake output if I need to, and then they are right there ready for development once I get to it. Unlike some languages, the functions don't necessarily all become function calls, so eventually it becomes efficient while still being quite readable.

So many things. I simply can't think that way in C. I suppose I could, but all those damn ; are there, and other finicky things that get in the way of creativity when they don't really need to be there. Just a set of () around every separate thing.

Some tags to help with exposure (look upward in the thread if you got here because of one of these tags):
#lisp #commonlisp #scheme #clojure #sbcl #clisp

A roundup of what happened in Common Lisp and the broader Lisp world over the past two years seen through the lens of @vindarel: "[...] a personal pick of the most interesting projects, tools, libraries and articles that popped-up in Common Lisp land in the last two years". With some nice words on @interlisp (thanks!).

lisp-journey.gitlab.io/blog/th

Lisp journey · These years in Common Lisp: 2023-2024 in review - Lisp journeyBy Lisp journey
Replied to screwlisp

@screwtape @nosrednayduj @rat Religion sucks. I didn't read the entire article because the intro makes it so obvious that it is religious.

Languages constantly absorb Lisp features because it was obviously the right way to go. People wanted ~simple~ slobberproof instead. Yet, they never got there.

Lisp got simpler, but by that time we had sofa king many toy languages that eventually became real languages, that there is no way to back track.

So here we are. Lisp is ancient. It is incredibly powerful (and the only reason I retain my interest in it since also the 80's), but the battles are useless.

Wait until we find the fuzzy line between quantum computing and AI, and then nobody ever has to code... just have to say what you want, burn down a rainforest, and wait for the product.

The religious part has been going on so long you'd think people would just tire of it and stop repeating it. But noooo, can't be done, I guess.

I'm going to post a much nicer article later this week about using #commonlisp to interpret scientific notation.

I don't care about whether it can be done in other languages. In fact, it would be really weird if it couldn't be.

I celebrate the differences, so hopefully the article I'm writing (it's done... just making it more readable) will be entertaining enough that people who traditionally involve themselves in these silly battles will just put forth code and enjoy the fact that it works, and is sometimes really clever.

(defun integrate (f a b &optional (n 1000))
"Approximate the integral of f from a to b using the trapezoidal rule with n subdivisions."
(let* ((h (/ (- b a) n))
(sum (+ (funcall f a) (funcall f b))))
(dotimes (i (- n 1) (/ (* h sum) 2))
(setq sum (+ sum (funcall f (+ a (* i h))))))))

; Example:
(integrate #'sin 0 pi)

A Yamaha YMZ280B emulator in native #CommonLisp playing a VGM file. Basically the same thing as my YunoSynth library for Crystal, except this is my port of it to pure Common Lisp.

The song is supposed to be mono here, btw :-P Though apparently the chip supports stereo, too. This song just happens to be mono.

Hey everyone. I must admit, I don't believe I have ever seen someone enter #utf8 #unicode characters on a #computer in a natural way. Which seems weird, because a bunch of languages use them.

I wrote a #commonLisp #asdf package that just looks up a list of symbols in a file that has every non-surrogate unicode codepoint in it, and an #emacs #elisp function that just calls the #lisp one.

codeberg.org/tfw/unicode-chars

Multilingual people, what can you tell me about doing this at all?

#programming #lowLevel #lisp #commonLisp #article #medium
I wrote a short description of how lisp is coded by writing lisp sequences (lists), and the low level dotted cons view of the lists.

I wrote a funny piece of lisp that outputs a lower triangular emacs orgmode matrix depiction of a lisp form.

medium.com/@screwlisp/lisp-cod

Which leaves me wondering, does anyone "use" or otherwise think about (a . (b . NIL)) the dotted cons way of writing lists while programming?

A new version (0.7.3.0) of nodgui, a simple GUI library for Common Lisp, has been released: this is a feature release.

From the NEWS file:
- [new feature]
- added virtual keyboard widget;
- added label spinbox widget;
- [pixel-buffer] added multitexture polygon rendering;
- added function to manipulate tags in canvas items (add/remove tags and find items by tags)
- added `grid-implicit', a function that fill the next available row with widgets in a single call, without specify columns.
- [improvements]
-Enable use of `asdf:test-system`, thanks fosskers!
- [bugfix]
- fixed regression: restored support for TGA bitmap file format
- removed 'eval-when' around ~+2pi+~ definition to prevent error when compiling code, without loading the source (thanks to the person that reported this issue!).

Nodgui is copylefted free software released under LLGPL license.

- web page
autistici.org/interzona/nodgui

- source repository
codeberg.org/cage/nodgui/

Bye!
C.

www.autistici.orgnodguiCage's website

#programming #commonLisp #emacs #repl versus #orgmode for the #fizzbuzz challenge on #medium.
Using #series #lazyEvaluation
medium.com/@screwlisp/fizzbuzz
I think it ended up pretty interesting, and what you would expect. The repl is a better interactive experience, but the noweb tangle optimizes in ways the separate repl lines can't, and is already in a disk-persisted file.

Looking forward to feedback and commentary ( @ksaj ;p)

Joe Marshall started a blog post series about solving the 2024 Advent of Code problems in Common Lisp. Why now? Some of his motivations:

"I wanted to take my time and focus on code quality rather than on how fast I can write it."

[...]

"I want to show how to effectively use the rich set of Common Lisp library functions to write concise, readable, and efficient code."

funcall.blogspot.com/search/la

funcall.blogspot.comAbstract HeresiesA blog about computers, functional languages, Lisp, and Scheme.

#emacs #commonLisp #lisp #slime #braindump #programming #tutorial on #medium

medium.com/@screwlisp/my-perso

Really a mixture of three things:
1. Some (not very long history) historical notes about superior lisp interaction with inferior lisp
2. Some emacs shortcuts I use a lot
3. Interatively changing names used or setqing values and retrying in the interactive debugger - slime's exposure of advanced lisp debugging features