freenode/#lisp - IRC Chatlog
Search
7:31:21
contrapunctus
beach: I was thinking of doing as you suggested - writing pure Lisp libraries instead of using FFI. Is it possible to write an audio library this way? Especially for programs which want to use PulseAudio or JACK? 🤔
7:33:49
beach
contrapunctus: That would be fantastic! I have never attempted to interface with those systems so, I don't know what it involves. Some reading might be required.
7:39:25
moon-child
contrapunctus: it looks like at least in the case of pulseaudio, the wire protocol is undocumented. Which /could/ mean it's unstable. (https://lists.freedesktop.org/archives/pulseaudio-discuss/2010-April/006676.html)
7:40:01
moon-child
contrapunctus: in the case of jack, I know there are multiple independent server implementations; so I expect the story there is better
7:41:45
MichaelRaskin
Yeah, Poettering is known for saying that committing to too many stable interfaces is dangerous, and «dangerous» is literally the word used (although in another context).
7:43:33
no-defun-allowed
Reminds me of another software guy that gave a talk about how he needed to break implementations in his messaging program or the world would end, so you better not write another implementation.
8:00:45
contrapunctus
It's a daunting task, especially for someone like me (no experience in programming at this level, limited available time for programming) 🤔
8:13:06
beach
contrapunctus: In fact, you could write something that uses neither Jack nor PulseAudio to start with, and just use the ALSA interface directly. You can design your own substitute for Jack and PulseAudio in the form of a CLOS protocol, designed to run in the same process as the applications. Such a thing would be useful on Mezzano and ultimately on CLOSOS.
8:14:52
beach
contrapunctus: Then you can write your applications so that the use that protocol. If you want your applications to have a GUI, all of them could be written as CLIM/McCLIM applications.
8:15:36
contrapunctus
beach: ah, that could work too (although I have no experience with using these APIs, much less designing them). The most important thing is that existing audio plugins work...but I guess that's orthogonal, because those use LADSPA/LV2/DSSI 🤔
8:19:36
beach
I was merely suggesting a way that you could concentrate on writing your applications in Common Lisp without chasing unstable protocols, at least to begin with. And your code would then be useful in different settings without modification.
8:24:55
no-defun-allowed
You could use Harmony for the protocol: <https://shirakumo.github.io/harmony/>
8:26:49
no-defun-allowed
I wrote some code with that to synthesize notes coming in from a MIDI keyboard, and it was pretty good (except that I couldn't figure out how to reduce the latency of PulseAudio, so my timing was awful). The only problem for a full Common Lisp audio system could be that it uses foreign vectors to pass buffers around, but it's not hard to imagine a Harmony with Lisp vectors.
8:59:20
beach
And the author is around, so if you have issues or suggestions for improvement, they are likely to be taken into account.
9:12:02
beach
MayheM_FAN: I know nothing about FFI, but I am guessing you are not providing enough information for anyone to help out, like what you tried in order to get that error, what Common Lisp implementation you are using, on which OS, etc.
9:14:03
beach
MayheM_FAN: That's a very unusual combination. I think most people here use SBCL on Linux.
9:14:44
MichaelRaskin
And if you are using the latest _release_ of CLisp, it's kind of expected to fail to load random things by now…
9:15:03
MichaelRaskin
(development snapshot has at least a chance, releases are too old for anything)
9:17:06
MichaelRaskin
libffi is definitely a library that exists and is used for FFI; no idea where to get a fresh Windows build
9:18:19
MayheM_FAN
loading cl-tcod with quicklisp, while it was loading cffi-features (cl-tcod requires cffi) it gave me that error
9:20:08
phoe
https://proj.goldencode.com/projects/p2j/wiki/Building_and_Installing_libffi_on_Windows
9:20:47
beach
MayheM_FAN: Wow, you really hit the jackpot. Trying to learn Common Lisp starting with FFI using CLISP on Windows.
9:21:10
phoe
I mean, if you're okay with preaching, `apt install libffi-dev` on debian would solve the issue for you
9:29:12
phoe
MayheM_FAN: I see that some chocolatey packages include libffi DLLs, maybe you could scavenge it off one of those
10:16:50
MayheM_FAN
can i just use the prebuild libffi thats on the bottom of https://proj.goldencode.com/projects/p2j/wiki/Building_and_Installing_libffi_on_Windows
10:23:02
beach
MayheM_FAN: Again, my guess is that very few people here will be able to help you, given that they are not using the unique combination of implementation and OS that you are. I hope I am wrong, of course.
10:33:09
phoe
it needs to be the same architecture as your Lisp implementation, otherwise it won't load
14:02:35
beach
TheInformaticist: Multi-paradigm. A lot of modern Common Lisp code uses the Common Lisp object system (CLOS) a lot.
14:05:14
heisig
beach: Saying Common Lisp is not a functional language is like saying German is not a language for writing poems.
14:05:28
MichaelRaskin
(naturally, a lot of Clojure code uses a lot of objects — but from Java object system)
14:05:47
heisig
Neither is true. But it depends mostly on the author/programmer, and not so much on the language.
14:10:46
TheInformaticist
It really hasn't changed? That's a good sign, in my opinion. Everything's getting updated so constantly nowadays, you don't know what's going to be broken next.
14:11:47
TheInformaticist
That's good. By the way, does Common Lisp have primitive procedures for graphics?
14:14:10
beach
MichaelRaskin: When I say or hear "language", I think if a definition, usually in the form of an independent standard, of what some language processor allows or does not allow.