akoana has quit [Quit: leaving]
<Josh_2> Anyone got any examples of their use of MOP? Just tryna find more ways I can integrate the MOP beyond just specializing an :after on initialize-instance
kakuhen has quit [Remote host closed the connection]
<jcowan> Not only that, but if cleanup is not run, locked resources may stay locked.
<Josh_2> mostly just curious about how others have utilized the MOP, dont need to see code
<jcowan> in general, have the thread poll a kill-myself flag (this is independent of the language) rather than external killing
taiju has quit [Ping timeout: 268 seconds]
mindCrime has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has quit [Changing host]
kakuhen has joined #commonlisp
<ramenbytes> Josh_2: Filtered Functions is a cool example in my opinion: https://github.com/pcostanza/filtered-functions
<ramenbytes> Though, that's not my library.
<ramenbytes> So not something I've personally done with mop.
sjl has quit [Quit: WeeChat 2.2-dev]
sjl has joined #commonlisp
<Josh_2> What have you personally done with MOP?
<ramenbytes> Nothing to my remembrance, I'm still learning and haven't worked on something big or radical enough to need MOP.
<dlowe> I wrote a game object read/write with MOP that saves to human readable sexp in files
<dlowe> the only limitation is that lists of game objects in game objects need to have the type game-object-list
<dlowe> also it doesn't check for multiple references or anything
<Bike> Josh_2: cl-jupyter has a custom slot definition class that lets you register callbacks to run when a slot value changes, and functions to validate new values https://github.com/yitzchak/common-lisp-jupyter/blob/master/src/widgets/traits.lisp
<Bike> i wrote the original version, but it's moved on from me
dlowe has quit [Remote host closed the connection]
<Bike> don't use mop just for the sake of using it, tho
kakuhen_ has joined #commonlisp
<Josh_2> ofcourse
kakuhen_ has quit [Client Quit]
kakuhen_ has joined #commonlisp
kakuhen_ has quit [Client Quit]
kakuhen has quit [Ping timeout: 268 seconds]
Lycurgus has joined #commonlisp
wheelsucker has quit [Remote host closed the connection]
wheelsucker has joined #commonlisp
kakuhen has joined #commonlisp
kakuhen has quit [Changing host]
kakuhen has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.2]
<Josh_2> ramenbytes: that library reminds me of another similar library, can't remember its name
<Josh_2> I think that library could be quite useful
taiju has joined #commonlisp
<Josh_2> I think I will try it out in my cl-coinpayments library, its better than my silly dispatcher I made
<ramenbytes> Josh_2: I think there are several type-based dispatch libraries if that is what you were thinking of.
derelict has quit [Ping timeout: 244 seconds]
Lycurgus has quit [Quit: Exeunt]
<Josh_2> actually I would need a mix of normal class dispatching and dispatching on a keyword, basically I have a plist and an object, and I have written a convenient way for the user to dispatch on the plist and the object, but its outside of the normal object system (mostly)
<ramenbytes> If you're dispatching on keyword symbols, could you use an EQL specializer?
mindCrime has quit [Ping timeout: 272 seconds]
<ramenbytes> Re-reading your message, I think I misunderstood. I'm guessing you're using an EQL specializer after extracting your symbol(s) from the plist. In which case I see how filtered functions would be handy.
<Josh_2> yeh
<Josh_2> Although my custom dispatcher works on the class and subclasses of the object, the value of a specific key from the plist and the number of arguments
<Josh_2> but still its outside of all of the conveniences of :around :after and :before
<ramenbytes> Right, because there is some preprocessing on the args before dispatch can happen.
ramenbytes has left #commonlisp [--]
<Josh_2> yeh. Initially I was just using apply to make instances of classes but then the API I was working with sent representations of 'objects' I couldn't find specifications for, so I gave up on that method
tyson2` has quit [Remote host closed the connection]
prxq_ has joined #commonlisp
prxq has quit [Ping timeout: 268 seconds]
derelict has joined #commonlisp
Alfr has quit [Quit: Leaving]
<beach> Good morning everyone!
derelict has quit [Ping timeout: 252 seconds]
IAmRasputin has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life_ is now known as Lord_of_Life
dsk has joined #commonlisp
IAmRasputin has quit [Ping timeout: 268 seconds]
karlosz has joined #commonlisp
karlosz has quit [Client Quit]
CrashTestDummy has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 268 seconds]
Bike has quit [Quit: sleep]
wheelsucker has quit [Quit: ERC (IRC client for Emacs 27.2)]
pjb has quit [Read error: Connection reset by peer]
raeda_ has quit [Ping timeout: 244 seconds]
raeda has joined #commonlisp
pjb has joined #commonlisp
Oladon has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 244 seconds]
frgo has quit [Read error: Connection reset by peer]
frgo has joined #commonlisp
CrashTestDummy has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
knusbaum_ has joined #commonlisp
knusbaum has quit [Ping timeout: 268 seconds]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
azimut has quit [Ping timeout: 252 seconds]
azimut has joined #commonlisp
pjb has quit [Read error: Connection reset by peer]
<kakuhen> Does anyone here know of any good documentation for cl-tui? Specifically, I am interesting in setting up panes and relatively "simple" objects of a TUI.
Krystof has quit [Ping timeout: 244 seconds]
<beach> Is McCLIM too "graphic" for you?
rgherdt has joined #commonlisp
knusbaum_ has quit [Remote host closed the connection]
knusbaum has joined #commonlisp
frgo has quit [Remote host closed the connection]
knusbaum has quit [Ping timeout: 268 seconds]
frgo has joined #commonlisp
<kakuhen> Yes
pve has joined #commonlisp
<dsk> Has anyone considered the possibility of a McCLIM Emacs front end?
<moon-child> what motivates that?
<dsk> Not wanting to leave Emacs.
Oladon has quit [Quit: Leaving.]
<beach> Isn't that what lukego is doing with Clime?
<dsk> Oh cool, I wasn't aware of this!
<moon-child> dsk: oh - you mean mcclim talking to emacs. I thought you meant emacs using clim (as an alternative to termcap/gtk/xaw/...)
<dsk> Or I confused it with Climacs.
<dsk> moon-child: No, I guess what I was calling a "front-end" is actually a "back-end"
taiju has quit [Ping timeout: 268 seconds]
<beach> dsk: Something like the stuff shown in that link?
<dsk> beach: Exactly!
<kakuhen> ok turns out cl-charm seems to have what I want
<kakuhen> it exposes lisp to well-documented curses functions rather than trying to build abstractions on top of them like cl-tui
IAmRasputin has joined #commonlisp
pve has quit [Remote host closed the connection]
IAmRasputin has quit [Ping timeout: 268 seconds]
mindCrime has joined #commonlisp
Wilfred has joined #commonlisp
Lycurgus has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
hendursa1 has joined #commonlisp
cage has joined #commonlisp
hendursaga has quit [Ping timeout: 252 seconds]
taiju has joined #commonlisp
gwefnn_ has joined #commonlisp
gwefnn has quit [Ping timeout: 272 seconds]
prxq_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<kakuhen> has anyone ran into an issue where looping and printing works in sly repl but not when connected to a remote lisp image?
<kakuhen> say we have something dumb like (loop (print "hi") (sleep 1)) -- this obviously works in the SLY REPL but if I launch ccl in a terminal and connect sly to it, then it does nothing
<kakuhen> Presumably this has something to do with the global redirection stuff, but I'm not sure.
varjag has joined #commonlisp
jans has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 252 seconds]
jans has quit [Ping timeout: 240 seconds]
<Shinmera> Josh_2: https://github.com/shinmera/iclendar uses mop to ensure data is only composed out of valid parts.
waleee has joined #commonlisp
skyl4rk has quit [*.net *.split]
skyl4rk has joined #commonlisp
<Shinmera> As a consequence of using MOP, the constraints can be expressed using defclass.
<dsk> kakuhen: It doesn't even print on the terminal?
<kakuhen> dsk: no
<dsk> Well, I use SLIME and SBCL, so I'm not sure what's happening there, but setting SLYNK:*GLOBALLY-REDIRECT-IO* to T before connecting might do what you want.
<dsk> Out of curiosity, what's the value of *STANDARD-OUTPUT* in the Sly REPL?
random-nick has joined #commonlisp
azimut has quit [Ping timeout: 252 seconds]
dlowe has joined #commonlisp
tfb has joined #commonlisp
azimut has joined #commonlisp
tfb has quit [Client Quit]
mindCrime has quit [Ping timeout: 268 seconds]
CrashTestDummy3 has joined #commonlisp
mindCrime has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 244 seconds]
CrashTestDummy has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 268 seconds]
Wilfred has quit [Quit: Connection closed for inactivity]
waleee has quit [Ping timeout: 252 seconds]
Alfr has joined #commonlisp
waleee has joined #commonlisp
<beach> Is the declaration (ftype nil <some-name>) meaningful?
CrashTestDummy2 has joined #commonlisp
<beach> Oops, I need to vanish for a while. I'll read answers later.
CrashTestDummy has quit [Ping timeout: 264 seconds]
Inline has joined #commonlisp
<phoe> beach: looks like your question reduces to, "is NIL a functional type"
<phoe> because CLHS Declaration FTYPE says: "Specifies that the functions named by function-names are of the functional type TYPE."
<phoe> and type NIL is a subtype of FUNCTION as it is a subtype of every type
mindCrime has quit [Ping timeout: 264 seconds]
<phoe> but I don't think you can meaningfully state that any function object is of type NIL, since the mere existence of such a function means that it is not of type NIL
<phoe> s/of such a function/of such a function object/
killsushi has quit [Quit: Leaving]
<phoe> so I guess that DECLARE FTYPE NIL of a given symbol would only be meaningful if a given symbol is *not* fbound
mindCrime has joined #commonlisp
<gigo> Why does plaster.tymoon.eu require unscrambling a word before posting? Difficult for dsylexic people like me.
<gigo> can someone unscramble "rosean" for me please? need to make a paste and share here.
<gigo> okay, managed to make the paste. my question incoming now.
<gigo> Here is my code: https://plaster.tymoon.eu/view/2499 - How to make the second "No error" code block execute only when there is no error condition? I am trying to make an if-error-then-this-else-that kind of code.
<phoe> gigo: spambot protection
<phoe> if you register, the unscrambling goes away
<phoe> gigo: use :no-error instead of t
<phoe> also note that then your lambda list will need to accept whatever values were produced by (/ 3 1), which in this case it will
<gigo> phoe: thanks. I will try :no-error. In the meantime, what do you think of this: https://plaster.tymoon.eu/view/2500 ? Is this a valid solution too?
<loke[m]> I'm still trying to figure out what rosean becomes?
<phoe> reason
<loke[m]> Oh
<phoe> gigo: kinda sorta, yes - control only reaches the first FORMAT call if the division succeeded
<Alfr> phoe, hm ... it may be clearer to quantify over all things of type nil, when talking about such.
<phoe> Alfr: there are exactly 0 things of type NIL
mindCrime has quit [Ping timeout: 268 seconds]
<phoe> it is the empty type and therefore must contain exactly 0 elements
<Alfr> Thus all statements are not false, phoe.
<phoe> what do you mean?
<Alfr> For all x of type NIL, P(x) is true.
<phoe> what's P(x)?
<Alfr> Any predicate.
<phoe> oh, then for all x of type NIL, P(x) is false
<phoe> and you can't prove me wrong either
<Alfr> Yeah, that too.
<phoe> that's the beauty of empty types and making an error in the proof assumptions
<phoe> this line of reasoning is only valid if there is any x of type NIL, and that is false
<phoe> hence our contradiction
<Alfr> We should take it into the cafe, if you wish to continue this.
<phoe> yes, though I'm fine with ending here
<Alfr> Sounds good to me.
<gigo> phoe: Tried your suggestion of :no-error. https://plaster.tymoon.eu/view/2500 - I will use this instead of my hack. This looks neater. It has an added advantage that I can get the result of the first expression in variable c and use that if I need to.
<phoe> <3
amb007 has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
<gigo> phoe: is your nick a shortened form of the word "phoenix". is that why your nick is pronounced "phoe"?
<gigo> Alfr: where is the cafe?
<phoe> gigo: #lispcafe
<phoe> gigo: yes
<gigo> thanks
silasfox has joined #commonlisp
chrysanthematic has joined #commonlisp
ldb has joined #commonlisp
<lucerne> How do I read all of the stdin?
<lucerne> (I want to read some JSON froom stdin.)
<ldb> you mean read until EOF?
<lucerne> yes
<phoe> alexandria:read-stream-content-into-string
<lucerne> thanks
<phoe> although if you want to parse json, then the json library of your choosing should have a function that reads stuff from a stream and then outputs its parsed representation
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
<lucerne> phoe: which library do you recommend?
<lucerne> phoe: How do I install it? `(ql:system-apropos "jzon")` doesn't return anything
IAmRasputin has joined #commonlisp
<gigo> https://plaster.tymoon.eu/view/2502#2502 - It runs but I get "The variable C is defined but never used." How can I resolve this warning when I don't intend to use the variable c?
<ldb> lucerne: you know how to use ASDF?
<lucerne> ldb: I have read on it once, but I really don't want to manage the deps manually. (IIRC, ASDF is basically just cloning the repo in the loadpath and then loading it, no?)
<ldb> gigo: see CLHS Declaration IGNORE, http://clhs.lisp.se/Body/d_ignore.htm
IAmRasputin has quit [Ping timeout: 252 seconds]
<ldb> (error (c)
<ldb> (declare (ignore c))
<ldb> (format t "~&Error~%"))
<edgar-rft> grmbl, ldb was faster than me :-)
<ldb> lucerne: ASDF is used by Quicklisp to load dists, so if you clone the git repos to quicklisp/local-projects, you should be able to quickload them as well
<lucerne> ldb: Doesn't sth like emacs package fetchers (like `straight.el`) exist? Sth that automatically fetches from a git repo.
<ldb> well, there's so called "roswell" proivdes that feature, and can help manage common lisp version as well
kakuhen has quit [Quit: Leaving...]
<beach> phoe: Thanks.
<phoe> beach: no problem, and please double-check what I said since I don't know if my interpretation is correct
<etimmons> lucerne: there's also qlot and clpm
<lucerne> Thanks!
<beach> phoe: I am not sure how to check it.
<phoe> beach: neither am I. Maybe let's simply wait for other #commonlisp folk to chip in!
tyson2 has joined #commonlisp
<beach> Yeah.
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
yewscion_ has joined #commonlisp
silasfox has quit [Ping timeout: 244 seconds]
silasfox has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
silasfox has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
derelict has joined #commonlisp
silasfox has joined #commonlisp
lucerne has quit [Quit: Bye]
ldb has quit [Quit: ERC (IRC client for Emacs 27.2)]
chrysanthematic has quit [Quit: chrysanthematic]
lucerne has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
yitzi has joined #commonlisp
Krystof has joined #commonlisp
yewscion_ has quit [Ping timeout: 264 seconds]
Cymew has joined #commonlisp
Cymew has quit [Ping timeout: 265 seconds]
<Josh_2> Shinmera: what is the advantage to doing this using a metaclass rather than using something like an :after on initialize-instance?
<Shinmera> I already answered that question
<Josh_2> I see
<Josh_2> Its a good example, thanks :D
<Josh_2> I know of a use case that I often find, a :required key which would check that a value is provided to that slot when initialized
tyson2 has joined #commonlisp
<Josh_2> pretty common to have a mix of required and not required slots when interfacing with an external API
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
<greyrat> `sbcl --script` doesn't load `~/.sbclrc`?
Noisytoot has joined #commonlisp
<edgar-rft> greyrat: according to http://www.sbcl.org/manual/ --script <filename> implies --no-userinit --no-sysinit --disable-debugger --end-toplevel-options
silasfox has quit [Quit: WeeChat 3.1]
<edgar-rft> see http://www.sbcl.org/manual/ -> Section 3.3.2 Toplevel Options
<gigo> Need some help with this: https://plaster.tymoon.eu/view/2503 - I get this error while trying to use handler-case: (SB-C::XEP (LAMBDA () :IN #:|error-return|)) called with invalid number of arguments: 1
<greyrat> edgar-rft: Thanks. I should use =--non-interactive=, it seems.
Noisytoot has quit [Remote host closed the connection]
<greyrat> I tried `#!/usr/bin/env -S sbcl --non-interactive --load`, but this gets into conflicts with the shebang line. Should I just load the init file manually?
Noisytoot has joined #commonlisp
d4ryus has joined #commonlisp
<gigo> what does the 'f' stand for in 'incf' and 'decf'?
Bike has joined #commonlisp
<Bike> gigo: like phoe said, the no-error clause needs to accept the values from the form
<Bike> i.e. the result of (/ 3 1) in this case
<gigo> Bike: so if I don't want to use the values from the form I have to (declare (ignore ...)) them?
<Bike> so, do (:no-error (value) ...) basically
<Bike> yes
<gigo> thanks
Bike has quit [Client Quit]
<gigo> Is there a function to exit with a nonzero exit code, so that when run via shell, the shell knows that the program errored out?
<beach> Not in the standard.
<beach> The standard doesn't think you should ever quit the Common Lisp image.
<phoe> gigo: uiop:quit
<phoe> uiop is loaded whenever asdf is loaded so you should have it available in most situations
<gigo> phoe: thanks. uiop:quit works
hydandata_ has joined #commonlisp
<gigo> Now the problem I have is that I want my Lisp program behave well when a user runs it like yet another tool on their system. It should exit with a proper exit code based on success or failure. But at the same time I don't want it to kill my SLIME's REPL when I am coding using Emacs. Is this a common problem? If so, how does one resolve this problem?
<phoe> gigo: so you actually want two things
<phoe> one, a library function that you can call from the REPL that implements whatever you seek to have implemented
<gigo> Yes, I want the program to behave well for the user too and for the developer too.
<phoe> two, an entry point for Unix, which calls this library function and exits with different exit codes based on the results
<gigo> If I could somehow detect that the program is running within SLIME, then I will skip the (uiop:quit) call. otherwise I will execute the (uiop:quit) call to behave well for the user.
<phoe> gigo: actually, no, don't do it
<phoe> use only the library function(s) within slime
<phoe> and leave the main function only for deployed executables
<gigo> phoe: that is a nice idea. thanks.
hydandata_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Lycurgus has joined #commonlisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
<gigo> Another macro trouble. Please help me with this: https://plaster.tymoon.eu/view/2504#2504 - I get this error: COMMON-LISP-USER::HELLO is a macro, not a function.
<Josh_2> You arent defining your macro at the top level
<Josh_2> Try macrolet instead of defmacro
<phoe> DEFINE-FOO and DEFFOO are usually toplevel forms
<phoe> as Josh_2 said, the lexical variant of DEFMACRO is MACROLET, and you'll want to use that for a macro that is defined locally
<gigo> oh! what about defun? is defun allowed in lexical scope?
<Josh_2> you should use labels/flet for local functions
<phoe> yes, but it will define a global function
<gigo> why doesn't defmacro define a global macro then?
<phoe> it does!
<phoe> except in your code DEFMACRO is not toplevel so the compiler does not know that a call to HELLO is supposed to be a macro when it compiles it
<phoe> if you structure the code in your file like (defmacro hello ...) (let (...) (hello ...) ...) then you'll get the expected results
<dlowe> aw, harmony-pulse-cffi isn't in quicklisp anymore
<gigo> understood. thanks phoe and Josh_2
IAmRasputin has joined #commonlisp
<phoe> Shinmera: is that intended? or did it break for reasons unknown and we're only learning about it now?
gpiero has joined #commonlisp
<Shinmera> That change happened a year ago: https://reader.tymoon.eu/article/387
<Shinmera> backend interaction is now part of cl-mixed
<Shinmera> The new harmony & cl-mixed are much improved.
IAmRasputin has quit [Ping timeout: 265 seconds]
<dlowe> it's fine. I found where the cffi is hidden :)
dlowe has quit [Remote host closed the connection]
dlowe has joined #commonlisp
zacts has joined #commonlisp
<dlowe> (I needed to read from pulseaudio, not write to it)
derelict has quit [Ping timeout: 252 seconds]
zacts has quit [Client Quit]
andreyorst has joined #commonlisp
chrysanthematic has joined #commonlisp
chrysanthematic has quit [Client Quit]
chrysanthematic has joined #commonlisp
<gigo> Two questions: Inside (handler-case (expr) (error (c) ..., is it possible to (1) Print the full error stack? (2) Rethrow the error?
<phoe> 1) no 2) yes
<phoe> but in case of 2) maybe you don't want to resignal it
<phoe> if you use handler-bind instead of handler-case, you can simply decline to handle it
<phoe> also, errors in CL are signaled rather than thrown; CL:THROW serves a different purpose
<phoe> also, in handler-bind, you have the stack available
Lycurgus has joined #commonlisp
<gigo> phoe: okay, thank you
<phoe> if you want to stick to portable CL, then you can manually establish a block that you can conditionally RETURN-TO inside a HANDLER-BIND-bound handler
<phoe> the difference is, handler-bind just calls functions in the dynamic context of some other code, whereas handler-case FIRST makes a non-local return and then executes code
<phoe> that's why the original stack is unavailable in handler-case handlers, it has already been destroyed by the time your code executes
<Shinmera> dlowe: reading is something I'd like cl-mixed to do as well, so a patch would be very welcome!
<dlowe> Shinmera: I just needed pa_simple_read, though now I'm looking at trying to pull the list of audio devices and it looks considerably more complicated
<dlowe> namely, it seems to want the PA mainloop
<Shinmera> device enumeration is always a pain, though alsa and pulse are honestly pretty easy by comparison!
Inline has quit [Ping timeout: 252 seconds]
<edgar-rft> I'm just asking myself if the SYMBOL-VALUE slot of an INTERNed symbol is "special" in the "special variable" sense. Or in other words, is there a difference between (DEFPARAMETER <symbol> <value>) and (PROGN (INTERN <symbol>) (SETF <symbol> <value>)) ?
<dlowe> pulse wants a name like "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor" and I've just been passing it in, but it'd be nice if it would select the "default"
<Shinmera> It does have the concept of a default device, so there ought to be a way of getting it.
<dlowe> oh, wait, no.
<dlowe> I don't need the default device, I need the monitor of the output device :D
Lycurgus has quit [Quit: Exeunt]
leo_song has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<dlowe> so (concatenate output-device-name ".monitor")
<Shinmera> are you working on a screen recording thingy?
<dlowe> *blush* I wrote a program to fish in Minecraft
leo_song has joined #commonlisp
andreyorst has quit [Quit: WeeChat 3.1]
<dlowe> Shinmera: looking at the pulse extension, it doesn't really look like it was all designed with async operation in mind
<Shinmera> Hm?
<dlowe> you were mentioning including reading into cl-mixed
<Shinmera> right.
<Shinmera> the undrelying buffers are thread safe.
<Shinmera> the current extension doesn't do it async because there's no reason to, but it can be if you have to.
<Shinmera> the coreaudio backend for instance has to do it async.
<dlowe> pulse has a mainloop implementation that spawns a thread, and that might work
<Shinmera> do you have to?
<dlowe> if you want to use any async apis
<dlowe> I fantasize about a pure lisp pulseaudio library :p
<Shinmera> I don't understand what prevents you from using the simple synchronous library.
<dlowe> For just providing a source? Nothing
<dlowe> Literally anything more than reading and writing requires the async api
<Shinmera> Ok. Well, if you want to support even more then I can only say you can make it work with cl-mixed without much issue.
<dlowe> thanks :)
<Shinmera> Feel free to hang out in #shirakumo as well if you want to get involved further.
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
Inline has joined #commonlisp
Posterdati has joined #commonlisp
<Alfr> edgar-rft, I think your setf in progn is UB, clhs 3.1.2.1.1 . It's the same problem as a (setf foo ..) w/o an enclosing lexical binding or special declaration for foo.
<Alfr> Hm ... where's specbot?
<Shinmera> ::clhs
<edgar-rft> Alfr: thank you, I can look it up myself :-)
amb007 has quit [Ping timeout: 258 seconds]
<Alfr> Shinmera, ah ... thanks. :)
<dsk> edgar-rft: A couple other things. INTERN takes a string as an argument, not a symbol. It also does nothing extra since the reader interns the symbol if it's not interned already as soon as you mention it.
amb007 has joined #commonlisp
<dsk> (setf (symbol-value <symbol>) <value>) sets the symbol value.
<dsk> The symbol in question could be interned in some package or uninterned, it makes no difference.
<phoe> edgar-rft: DEFPARAMETER is basically DECLAIM SPECIAL + SETF SYMBOL-VALUE, all with appropriate compile-time processing
<Alfr> edgar-rft, and if you want to be evil and really don't want that special declaration in the global environment, then there's always (locally (declare (special ..)) ..) .
yitzi has quit [Quit: Leaving]
andreyorst has joined #commonlisp
derelict has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
chrysanthematic has quit [Quit: chrysanthematic]
derelict has quit [Ping timeout: 265 seconds]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 240 seconds]
leeb has joined #commonlisp
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #commonlisp
andreyorst has quit [Quit: WeeChat 3.1]
azimut has quit [Ping timeout: 252 seconds]
azimut has joined #commonlisp
eta has quit [Quit: Gateway shutdown]
eta has joined #commonlisp
Wilfred has joined #commonlisp
tfb has joined #commonlisp
tfb has quit [Quit: Leaving]
tfb has joined #commonlisp
tfb has quit [Client Quit]
tyson2` has joined #commonlisp
makomo has joined #commonlisp
chrysanthematic has joined #commonlisp
tyson2`` has joined #commonlisp
makomo has quit [Client Quit]
tyson2 has quit [Ping timeout: 265 seconds]
tyson2` has quit [Ping timeout: 258 seconds]
selwyn has joined #commonlisp
azimut has quit [Remote host closed the connection]
luna-is-here has quit [Ping timeout: 268 seconds]
luna-is-here has joined #commonlisp
tyson2`` has quit [Ping timeout: 252 seconds]
azimut has joined #commonlisp
andreyorst has joined #commonlisp
nature has joined #commonlisp
mindCrime has joined #commonlisp
amb007 has quit [Ping timeout: 258 seconds]
akoana has joined #commonlisp
<lucerne> How do I convert a string to a stream? `with-input-from-string' doesn't help me, because the conversion needs to bind the value in `let', and not immediately use it.
<phoe> what do you mean, not immediately use it?
amb007 has joined #commonlisp
IAmRasputin has joined #commonlisp
<greyrat> phoe: (let (s (create-stream-here)) (use-stream s))
<White_Flame> you should be able to pass that stream around, and even store it somewhere, as long as you're within that dynamic context
<phoe> greyrat: with-input-from-string is going to work with dynamic context
<phoe> if indefinite extent is needed for whatever reason, MAKE-STRING-INPUT-STREAM
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
<greyrat> phoe: Thanks, that's exactly what I wanted.
IAmRasputin has quit [Ping timeout: 252 seconds]
<phoe> greyrat: but still, this code should be equivalent to (with-input-from-string (s "...") (use-stream s)) as long as S does not leak outside this context
<greyrat> Yes, but that example was simplified
<phoe> oooh, that would explain things
<White_Flame> if it does leak out, I presume that actions on S would yield a plain closed stream error
<White_Flame> and not some weird undefined state
<phoe> White_Flame: actually for W-I-F-S the stream is DX
<phoe> so it's completely undefined behavior if S leaks out
<White_Flame> the stream object itself, or the stream-holding variable?
<phoe> the stream object itself
<phoe> you can't leak the variable out because it is lexical
<phoe> see (describe (with-input-from-string (s "123") s)) on a freshly launched SBCL
<phoe> there are fireworks
<White_Flame> huh
<White_Flame> yeah, found that in the spec now
Inline has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
amb007 has joined #commonlisp
Guest63 has joined #commonlisp
<Guest63> Recommendations for persistent data store?
<phoe> postgresql + postmodern
<Guest63> I'm looking at BKNR but not sure if its updated
<phoe> if you want nosql, then bknr.datastore works
<Guest63> phoe: I was doing that, but now looking at a RAM solution
<Guest63> unless there is a way to load on startup the whole db? Also need to parse all the data contained inside it into CLOS objects, so not sure if its the best way
Inline has quit [Ping timeout: 252 seconds]
yitzi has joined #commonlisp
<White_Flame> Guest63: maybe just save the whole lisp image?
<White_Flame> if you're doing a fully RAM-based solution
<White_Flame> reconnecting everything you need at startup is an easier task that figuring out all the random serialization issues yourself
<Guest63> white_flame: thanks
<Guest63> I will look into that too
<_death> https://github.com/robert-strandh/Clobber may be interesting
derelict has joined #commonlisp
<Guest63> _death: looking into it now
frgo_ has joined #commonlisp
frgo has quit [Ping timeout: 268 seconds]
<Guest63> _death: what's the difference between clobber and just writing to file?
<Guest63> is it just mainly a wrapper around with-open-file etc?
dsk has quit [Ping timeout: 240 seconds]
<_death> it's a way to serialize object graphs
<White_Flame> Guest63: what would you write?
<_death> you could write your own, sure
<Guest63> lol the only thing I could write would likely delete the whole filesystem '=D
<White_Flame> I meant what would you write to the file? :)
amb007 has quit [Ping timeout: 252 seconds]
<White_Flame> that's what clobber & such address
<Guest63> structures and Clos objects
<White_Flame> how?
<Guest63> maybe a hash table
<White_Flame> the textual form is generally not readable. Same for hash tables
mindCrime has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
<Guest63> One could just store the lisp instructions to recreate them
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<Guest63> and run eval on that
<White_Flame> sure, that would be a manual serialization
<White_Flame> now, as slots share values, or deeply interconnected values, or hold things like gensyms that are shared between things, it can get rough
<White_Flame> and serializing closures are one of the hardest things as they're not introspectable via standard means
<Posterdati> hi
<Posterdati> flip214: are you there?
<Guest63> white_flame: thanks, I can see how it would get tricky
<White_Flame> but if your data is intentionally simple, then yes you can have simple serialization/deserialization passes
<White_Flame> it's just not possible for the general case, which is what most people tend to ask for
<Guest63> would clobber capture most of the complexity?
<White_Flame> I've not used clobber
<_death> it can't serialize functions
<White_Flame> and it all depends on what complexity your particular data has
<_death> for that there are libraries like common-cold
<Guest63> thanks
<White_Flame> heh, nice name
<_death> that are implementation dependent and limited
<Posterdati> is anyone using gsll on freebsd?
<Guest63> I will have to have a think on the best way forward, but I learnt some new stuff today :) thanks
Inline has joined #commonlisp
<White_Flame> btw, if you consider what databases do, by reifying every reference into a numeric ID, that means every field is just a plain value that it has no issue serializing
<White_Flame> *SQL databases
<Guest63> yeah exactly. I am assuming that reading all the plain text back into lisp is more expensive than an in-memory solution
<White_Flame> I do even mean databases dumping into a plain text .sql file
<Guest63> actually I take that back
Quasus has joined #commonlisp
<Guest63> if you can load the full database on startup, then it should be the same speed or so
<White_Flame> the load speed would probably be slower for a text rather than binary file, but yeah none of that should affect runtime performance after load
<Guest63> I guess I realised I didn't really need SQL (even though I am a big fan), so a nosql solution is fine and is easier to handle in lisp
<Guest63> for my use case
<Guest63> Is CLIki still active and meant to be the goto wiki?
<Guest63> I saw it in the welcome message
<White_Flame> yes, though certainly sections drift out of date
<Guest63> cool, thanks - I was going to put some lisp notes on the web, but I'll just add pages to the wiki instead
<greyrat> Guest63
chrysanthematic has quit [Quit: chrysanthematic]
bilegeek has joined #commonlisp
omr has joined #commonlisp
Guest63 has quit [Ping timeout: 252 seconds]
lottaquestions has joined #commonlisp
bldr has joined #commonlisp
Wilfred has quit [Quit: Connection closed for inactivity]
lottaquestions_ has quit [Ping timeout: 240 seconds]
lottaquestions has quit [Client Quit]
lottaquestions has joined #commonlisp
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
Noisytoot has joined #commonlisp
Lycurgus has joined #commonlisp
Alfr has quit [Quit: Leaving]
IAmRasputin has joined #commonlisp
Wilfred has joined #commonlisp
IAmRasputin has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
waleee has joined #commonlisp
omr has quit [Quit: zzz]
Inline has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Quit: Exeunt]
Krystof has quit [Ping timeout: 258 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
tyson2 has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
varjag has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
Quasus has quit [Ping timeout: 265 seconds]
Inline has joined #commonlisp
Wilfred is now known as wilfred
rgherdt has quit [Ping timeout: 268 seconds]
sm2n has quit [Ping timeout: 264 seconds]
bilegeek has quit [Quit: Leaving]
sm2n has joined #commonlisp
akoana has quit [Quit: leaving]
ceblan has joined #commonlisp
waleee has quit [Ping timeout: 244 seconds]
waleee has joined #commonlisp
random-nick has quit [Ping timeout: 268 seconds]