!iNkFOAFNSlAAUKgcCT:matrix.org

lisp

513 Members
All things lisp: cl, scheme, racket, clojure etc68 Servers

Load older messages


SenderMessageTime
2 May 2022
@white_redd:matrix.org@white_redd:matrix.org joined the room.10:06:06
@white_redd:matrix.org@white_redd:matrix.org left the room.10:18:38
@koriolano:matrix.orgkoriolano joined the room.16:57:28
4 May 2022
@carson.couillard:matrix.orgCarsaloma set a profile picture.02:06:03
@carson.couillard:matrix.orgCarsaloma changed their display name from carson.couillard to nosrac.02:06:34
@carson.couillard:matrix.orgCarsaloma changed their display name from nosrac to nosrac bringer of tea.02:29:27
@let-over-lambda:matrix.orglet-over-lambda
In reply to @tho1efx:matrix.org
What do people use for playing sounds with common lisp? I literally just need to play a couple of different sounds after sleeps.

I have found many options but i don't know how to pick, just a few:
Harmony
CL-Mixed
Mixalot
CLM (Common Lisp Music)
PAL (Pixel Art Library)
CLAVE
SB-SIMPLE-audio
Not really a general case, but when I was experimenting with sound I did a CFFI binding to JACK. Otherwise I imagine you'd have to pick what sound library you want to interact with and do the same.
02:59:30
@let-over-lambda:matrix.orglet-over-lambda
In reply to @tho1efx:matrix.org
What do people use for playing sounds with common lisp? I literally just need to play a couple of different sounds after sleeps.

I have found many options but i don't know how to pick, just a few:
Harmony
CL-Mixed
Mixalot
CLM (Common Lisp Music)
PAL (Pixel Art Library)
CLAVE
SB-SIMPLE-audio
* Not really a general case, but when I was experimenting with sound I did a CFFI binding to JACK. Otherwise I imagine you'd have to pick what sound library you want to interact with and do the same. My binding was under SBCL.
02:59:57
@carson.couillard:matrix.orgCarsaloma changed their display name from nosrac bringer of tea to sword of poop.03:04:26
@tho1efx:matrix.org@tho1efx:matrix.orgDid you use a tool for the binding or write it yourself?03:26:33
@carson.couillard:matrix.orgCarsaloma changed their display name from sword of poop to https://www.walmart.com/ip/Poop-Knife/790700036.03:52:11
@carson.couillard:matrix.orgCarsaloma changed their display name from https://www.walmart.com/ip/Poop-Knife/790700036 to nosrac the meek.03:52:58
@carson.couillard:matrix.orgCarsaloma changed their display name from nosrac the meek to chuck.19:42:06
5 May 2022
@let-over-lambda:matrix.orglet-over-lambda
In reply to @tho1efx:matrix.org
Did you use a tool for the binding or write it yourself?
Wrote it myself. I settled on SBCL and CFFI after toying around with other lisps. Unfortunately they couldn't handle the foreign thread callback requirement of JACK. In my opinion Common Lisp + CFFI is the best toolset for interacting with C code I've used.
04:46:45
@an_origamian:matrix.organ_origamianHave you used Lua's FFI?04:52:03
@yeik-the-spik:matrix.orgYeikoff set a profile picture.08:14:49
@tho1efx:matrix.org@tho1efx:matrix.org Thank's for the tips let-over-lambda 17:28:52
@let-over-lambda:matrix.orglet-over-lambda
In reply to @an_origamian:matrix.org
Have you used Lua's FFI?
I haven't tried Lua in a serious sense that way, although I like the ideas behind it. It's not so much that there's issues calling into C in most languages, although some languages make it unnecessarily difficult (i.e. JNI (can't wait for the new foreign API to finally give the JVM proper FFI support)), the issues arise when going the other way and being able to wrap your functions as callbacks that C can call. If that can be cleared the next issue is that those callbacks must be able to be called at arbitrary times. Some runtimes like Chicken Scheme cannot handle that (correct me if I'm wrong but I tried). Unless a language/runtime can provide that level of integration as a starting base, I don't see it as a "real" FFI. We can stack on additional features such as having union, struct, and bitfield support, padding configuration support, signed/unsigned support, runtime definition of callbacks that can be changed while retaining callback address etc. SBCL/CFFI provides these things and more. If Lua's FFI achieves parity (you tell me) with CFFI I would be interested in it but otherwise no. To give a better idea of what I have tried, my main stack I turn to is C, Common Lisp, Clojure, and C++ if C/Common Lisp aren't appropriate. I have yet to try Haskell, but I'm not sure if it's appropriate.
17:48:01
@let-over-lambda:matrix.orglet-over-lambda
In reply to @tho1efx:matrix.org
Thank's for the tips let-over-lambda
1 more for you, don't forget about macros when wrapping APIs (web or native).
17:51:54
6 May 2022
@an_origamian:matrix.organ_origamian

Yes. Lua callbacks can be called at arbitrary times. It's known for it's good interoperability with C, so I was wondering if SBCL's FFI was any better, because I would love to take a look at it if it is. I've been thinking about using lisp for embedded languages.

additional features such as having union, struct, and bitfield support, padding configuration support, signed/unsigned support, runtime definition of callbacks that can be changed while retaining callback address etc

I'm pretty sure Lua doesn't have all of those, especially since its goal is to be minimal. I think you can add new C types to it though. Not sure how. Sounded kind of hacky.

02:49:51
@let-over-lambda:matrix.orglet-over-lambdaI think it'd be good to check out. You can view the manual https://cffi.common-lisp.dev/manual/cffi-manual.html . However, Common Lisp isn't really something to embed. It works best the other way around by slaving other things to it (as most languages/runtimes do). Scheme implementations often tout embedding if that's your focus and you want to stick with a Lisp dialect. If possible, starting your application in Common Lisp or Clojure can obviate the need for an embedded language to begin with since your REPL will provide so much at runtime. A nice data format such as Clojure's EDN could also fill in that role depending on your needs.03:10:39
@an_origamian:matrix.organ_origamianYes, Scheme would probably be better.03:33:30
@an_origamian:matrix.organ_origamianOr write my own :P03:34:15
@luismbo:matrix.orgLuís OliveiraA lot of Lisp implementations support embedding. Lispworks, Allegro, ECL, and recently SBCL 10:11:40
@marek:mrms.cz@marek:mrms.cz joined the room.15:52:44
7 May 2022
@beslayed-:matrix.orgemacsomancer[mx] changed their display name from '(E . Max `(0 ,Mancer)) to emacsomancer[mx].18:06:46
8 May 2022
@carson.couillard:matrix.orgCarsaloma changed their display name from chuck to Allan.01:52:16
@kotrckap:matrix.orgkotrckap set a profile picture.22:45:31
9 May 2022
@parlortricks_:matrix.orgparlortricks_ joined the room.10:00:59
10 May 2022
@ralfwissing:matrix.org@ralfwissing:matrix.org joined the room.17:50:36

Show newer messages


Back to Room List