phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
robdog has quit [Ping timeout: 268 seconds]
Lord_of_Life_ has joined #lisp
robdog has joined #lisp
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life_ is now known as Lord_of_Life
robdog has quit [Ping timeout: 264 seconds]
Achylles has quit [Read error: Connection reset by peer]
Nilby has joined #lisp
Nilby has quit [Remote host closed the connection]
Nilby has joined #lisp
abhixec has joined #lisp
Ukari has quit [Remote host closed the connection]
giova has quit [Ping timeout: 245 seconds]
shrdlu68 has quit [Quit: WeeChat 2.3]
robdog has joined #lisp
loli has quit [Ping timeout: 246 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
robdog_ has quit [Ping timeout: 268 seconds]
loli has joined #lisp
keep_learning_M has joined #lisp
robdog has joined #lisp
keep_learning has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
milanj has quit [Quit: This computer has gone to sleep]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
jb-brook has quit [Quit: leaving]
robdog has joined #lisp
wanz has joined #lisp
rumbler31 has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
<emaczen> fiddlerwoaroof: Have you done any work on Exceptions yet?
robdog has quit [Ping timeout: 268 seconds]
robdog_ has quit [Read error: Connection reset by peer]
robdog has joined #lisp
<emaczen> fiddlerwoaroof: If you see my message, leave me a memo via minion
loli has quit [Ping timeout: 258 seconds]
emaczen has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 264 seconds]
anewuser has joined #lisp
Lycurgus has quit [Quit: Exeunt]
loli has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 255 seconds]
bendersteed has joined #lisp
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
iovec has quit [Quit: Connection closed for inactivity]
robdog_ has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
<loke> _death: PROGV?
kushal has quit [Ping timeout: 256 seconds]
kdas_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
kdas_ is now known as kushal
dddddd has quit [Remote host closed the connection]
loli has quit [Ping timeout: 255 seconds]
Oladon has joined #lisp
<loke> _death: Have you actually used PROGV in action?
bendersteed has quit [Remote host closed the connection]
bendersteed has joined #lisp
robdog has joined #lisp
dale has quit [Quit: dale]
robdog has quit [Ping timeout: 250 seconds]
loli has joined #lisp
bendersteed has quit [Remote host closed the connection]
bhyde has left #lisp ["ERC (IRC client for Emacs 26.1)"]
wanz has quit [Quit: wanz]
wanz has joined #lisp
tr4zodone has joined #lisp
wusticality has joined #lisp
DGASAU has quit [Ping timeout: 258 seconds]
emaczen has joined #lisp
<pillton> Only in dark alleys.
XiangyuHe has joined #lisp
robdog has joined #lisp
stardiviner has joined #lisp
robdog_ has joined #lisp
KingRiver has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
dale has joined #lisp
KingRiver has left #lisp [#lisp]
Josh_2 has quit [Remote host closed the connection]
XiangyuHe has quit [Quit: Leaving]
robdog_ has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
karlosz has joined #lisp
AdmiralBumbleBee has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 264 seconds]
sigjuice_ has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
AdmiralBumbleBee has joined #lisp
sigjuice has joined #lisp
robdog has joined #lisp
loli has quit [Ping timeout: 250 seconds]
robdog_ has joined #lisp
<aeth> So this seems to work as a way to run something in another thread but the consing quickly adds up so it's clearly not supposed to be done in a big loop: (defun my-thread () (loop (bt:with-lock-held (*world*) (bt:condition-wait *hello* *world*)) (format t "Hello!~%")))
robdog has quit [Ping timeout: 268 seconds]
<aeth> Is there a better way to tell a thread to wait to resume until it's told to do so by another thread? One that's more loop-friendly.
XiangyuHe has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
Bike has quit [Quit: Lost terminal]
marvin2 has quit [Ping timeout: 245 seconds]
<pjb> aeth: condition-wait is the way to do it. However you have to be careful if several threads wait on the same condition, since it's random which will wake on signaling the condition.
XiangyuHe has quit [Quit: Leaving]
<aeth> pjb: What I like about condition-wait is that every subthread can be written like a loop, just like the outer controlling loop. What I don't like about it is: (1) it would be tricky to coordinate e.g. 127 child threads since they'd all need their own name to be awken that way
<aeth> (2) it's non-obvious how to coordinate the terminating of the child loops
robdog has quit [Ping timeout: 250 seconds]
<pjb> add messages.
<aeth> and (3) in SBCL it appears to cons a decent measurable amount *each* iteration of the loop, so for something that's a quick calculation meant to be run very frequently, this is going to be very suboptimal
<pjb> Using blocking queues can be useful to manage a pool of workers too.
<pjb> To terminate everybody, you just send n termination messages on the queue.
loli has joined #lisp
robdog has joined #lisp
jack_rabbit has quit [Ping timeout: 250 seconds]
DGASAU has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
ikki has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
torbo has left #lisp ["ERC (IRC client for Emacs 26.1)"]
robdog has quit [Ping timeout: 250 seconds]
Oladon has joined #lisp
<emaczen> I'm using cffi:define-foreign-library and cffi:use-foreign-library no differently than I have in the past, but for some reason when I asdf:load-system my system with the foreign-libraries lisp just hangs
<emaczen> If I interrupt with emacs I just get a "bogus stack frame"
<emaczen> Strangely, the compilation reports that it has cached the fasl so if I restart, it will successfully load the cached version
<emaczen> Any suggestions on how I can figure out what is hanging?
robdog has joined #lisp
<emaczen> It looks like the use-foreign-library form is what is hanging (if I comment it out and try asdf:load-system) but even when I leave it in, the forms following are compiled/loaded but it just hangs...
robdog has quit [Ping timeout: 250 seconds]
<beach> Good morning everyone!
ramus has quit [Ping timeout: 250 seconds]
tr4zodone has quit [Quit: Lost terminal]
<emaczen> morning beach
XiangyuHe has joined #lisp
ltriant has quit [Quit: leaving]
n3k0_t has joined #lisp
ramus has joined #lisp
robdog has joined #lisp
XiangyuHe has left #lisp [#lisp]
XiangyuHe has joined #lisp
dale has quit [Quit: dale]
XiangyuHe has quit []
ramus has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 268 seconds]
iovec has joined #lisp
wusticality has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
ramus has joined #lisp
XiangyuHe has joined #lisp
stardiviner has quit [Ping timeout: 268 seconds]
robdog has quit [Ping timeout: 250 seconds]
ramus has quit [Ping timeout: 255 seconds]
KingRiver has joined #lisp
KingRiver has left #lisp [#lisp]
loli has quit [Ping timeout: 244 seconds]
robdog has joined #lisp
libertyprime has quit [Ping timeout: 240 seconds]
svillemot has quit [Ping timeout: 268 seconds]
<emaczen> Has anyone ever had a ASDF hang error?
<no-defun-allowed> as in, ASDF just hangs?
<emaczen> where it just hangs on compilation of a file?
<emaczen> yes
robdog has quit [Ping timeout: 268 seconds]
<emaczen> Related to what I asked about an hour ago, I decided to try loading my system with my own loader rather than ASDF (my loader doesn't know how to load CFFI, so I used ASDF to load CFFI first before loading my system) and I'm not getting any hangs
didi has joined #lisp
<didi> Idea: SLIME magically macroexpands MACROLETs inside functions when I use C-c M-m.
loli has joined #lisp
svillemot has joined #lisp
<emaczen> didi: For me?
<didi> emaczen: Do you maintain SLIME? Get to work! :-P
XiangyuHe has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
<no-defun-allowed> rood
Krystof has joined #lisp
robdog has joined #lisp
<didi> Oh, was it rude? I'm sorry. I went for whimsical.
robdog has quit [Ping timeout: 268 seconds]
<emaczen> didi: No worries, I don't work on SLIME
robdog has joined #lisp
<PuercoPop> didi: it does with macrostep
<PuercoPop> *it already does
<didi> PuercoPop: Nice. I didn't find "macrostep' inside SLIME's manual tho.
asarch has joined #lisp
<PuercoPop> yeah, its an external contrib. (I'm using the Sly port of said contrib. Just expanded a macrolet)
<didi> PuercoPop: oic
milivoj has joined #lisp
<PuercoPop> https://github.com/joddie/macrostep The macrostep repo appears to have the Slime support included
<didi> PuercoPop: Thanks.
robdog has quit [Ping timeout: 268 seconds]
<_death> loke: I used it once for a small template engine
<emaczen> What is the correct method to customize when a defclass form is evaluated? I tried ensure-class-using-class with my metaclass being the first specializer, and it works, but only after the defclass form has been evaluated once (which is because of the way ensure-class is defined by default)
ramus has joined #lisp
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
sauvin has joined #lisp
robdog has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
easye has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 268 seconds]
easye has joined #lisp
robdog has joined #lisp
<phoe> emaczen: what kind of customization do you mean?
robdog_ has joined #lisp
<emaczen> phoe: I want to run code after a defclass form with my metaclass is evaluated
<phoe> let us see what the holy MOP says
<emaczen> ensure-class-using-class does this, but only for a redefinition
robdog has quit [Ping timeout: 250 seconds]
<phoe> emaczen: make-instance :after on your metaclass?
<phoe> or :around if you want to capture the return value
<emaczen> phoe: I tried that
<phoe> s/capture/access
<phoe> sure, what were the results?
anewuser has quit [Quit: anewuser]
<emaczen> phoe: I'm reading the definitions of sb-mop:ensure-class and sb-mop:ensure-class-using-class
prite has joined #lisp
<emaczen> The results are that the method I want to be called isn't called
robdog_ has quit [Ping timeout: 250 seconds]
<emaczen> The reason why, is because the metaclass object in (defmethod ensure-class-using-class ((class null) name &rest args &key) ...) has type standard-class
<emaczen> I put a break point in the call right above (apply #'make-instance metaclass :name name initargs)
robdog has joined #lisp
loli has quit [Ping timeout: 272 seconds]
<emaczen> Oh, I'll try specializing the second parameter
<phoe> :shrug:
<phoe> oh right
<phoe> I said make-instance, right?
<phoe> and I coded initialize-instance
<phoe> bleh, I should not be allowed to go on IRC before 10 AM when I'm properly woken up
<emaczen> yes you said make-instance
<emaczen> More coffee!
robdog has quit [Ping timeout: 244 seconds]
<didi> Yes, please.
asarch has quit [Quit: Leaving]
loli has joined #lisp
jprajzne has joined #lisp
<emaczen> phoe: What I tried didn't work...
<emaczen> The problem is the metaclass argument in ensure-class-using class is a standard-class with the name of my metaclass
<phoe> emaczen: take a look at my code - it seems to work in the scenario you described
robdog has joined #lisp
<phoe> a method on initialize-instance will take care of creating the class
<phoe> another method on reinitialize-instance, methinks, will take care of redefining it
<phoe> or update-instance-for-*
<phoe> u-i-f-redefined-class that is
makomo has joined #lisp
<makomo> morning
<emaczen> phoe: Yep, initialize-instance works!
<emaczen> Before, after I tried what I thought, then I tried make-instance like you originally said haha
robdog has quit [Ping timeout: 250 seconds]
robdog_ has joined #lisp
<phoe> yayyy
* phoe goes get tea
<phoe> also do u-i-f-r-c if you want reevaluating DEFCLASS to invoke some code
<emaczen> huh?
sauvin has quit [Ping timeout: 258 seconds]
<emaczen> oh I see, I'm not sure if I want to yet or not
<phoe> do you want code to be run the next time you ree-- okay
robdog_ has quit [Ping timeout: 246 seconds]
didi has left #lisp ["O bella ciao bella ciao bella ciao, ciao, ciao."]
robdog has joined #lisp
rumbler31 has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 258 seconds]
sauvin has joined #lisp
robdog_ has quit [Ping timeout: 268 seconds]
varjag has joined #lisp
milivoj has quit [Ping timeout: 250 seconds]
sauvin has quit [Ping timeout: 246 seconds]
schweers has joined #lisp
angavrilov has joined #lisp
robdog has joined #lisp
sauvin has joined #lisp
selwyn has joined #lisp
emaczen has quit [Ping timeout: 268 seconds]
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
hjudt has quit [Quit: leaving]
loli has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 250 seconds]
ludston has joined #lisp
robdog has joined #lisp
status402 has joined #lisp
hjudt has joined #lisp
loli has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
<schweers> I have a question about DECLAIM. If I put a toplevel form at the beginning of a file, it will affect the compilation of the rest of said file, correct?
scymtym has joined #lisp
<jackdaniel> schweers: yes, declaim is to proclaim is what defpackage is to make-package
<schweers> what about other files? does the effect of declaim end at the end of the file?
<jackdaniel> schweers: "As with other defining macros, it is unspecified whether or not the compile-time side-effects of a declaim persist after the file has been compiled. "
<schweers> yeah, I read that but I wasn’t entirely sure i understood it correctly.
<schweers> I can’t help it, but this seems like a bad idea. Do you know the reasoning behind this descision?
robdog has joined #lisp
<schweers> This seems to me as if the declaim forms in a library I load (might) affect how my code is optimized. Or did I get that wrong?
<jackdaniel> it is unspecified, so they might (just as proclaim and changing reader settings will)
<schweers> hmm. Okay, thanks for helping me out.
<jackdaniel> sure
<jackdaniel> as of rationale: I can imagine it is for consistency with other macros which are treated specially when toplevel
robdog has quit [Ping timeout: 264 seconds]
<schweers> I’m not sure which others are treated this way, can you give an example off the top of your head?
<schweers> defining macro sounds like a forth-ism ;)
<jackdaniel> i.e defmacro, in-package and such, they affect compiler even without being put in eval-when
<schweers> Ah, and there too it is unspecified when the effect ends? Well, I guess not for defmacro, but for in-package?
dtornabene has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
rozenglass has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
<jackdaniel> this is a tricky one, in-package setf *package*, but package is bound for each file
<jackdaniel> separately
robdog has quit [Ping timeout: 268 seconds]
<schweers> it is?
<makomo> take a look at this
<makomo> it lists some of the "defining macros" at the bottom
hhdave_ has joined #lisp
<schweers> makomo: thanks
<makomo> hmm, DEFMACRO is in that list as well
<makomo> "(...) nor is it specified whether they are available in subsequent compilation units or subsequent invocations of the compiler."
robdog has joined #lisp
keep_learning_M has quit [Quit: This computer has gone to sleep]
robdog has quit [Ping timeout: 252 seconds]
<makomo> this is pretty weird imo
<makomo> and then there's also "In particular, the information stored by the defining macros at compile time might or might not be available to the interpreter (either during or after compilation), or during subsequent calls to the compiler.", along with a surprising example
<schweers> It seems to me that this is so that (say) defmacro causes effects which affect runtime, but not compilation. But I’m not sure.
robdog has joined #lisp
akoana has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
wanz has quit [Quit: wanz]
<pjb> No, it's just that you can compile the code in a different image than where you load it, and also where you run it.
<pjb> ccl -x '(compile-file "foo.lisp")' -x '(ccl:quit)' ; ccl -x '(load-file "foo")' -x '(ccl:save-application "foo" …)' -x '(ccl:quit)' ; ./foo
<pjb> It's compiled in the first process, loaded in the second process, and executed in the third process.
<pjb> There is nothing in common between the first two process (compilation, load), and little in common between the second and the third.
<pjb> And with ecl, it's even worse, since it doesn't save a lisp image, but reload the compiled files when you launch the run-time program.
<schweers> Well, doesn’t your example also load the code twice? Once in the second step, and again in the third?
<pjb> nope.
<schweers> So if I added a (eval-when (:load-toplevel) ... ) with some visible side-effect (say, format), it would only show up once?
<schweers> In your example, that is.
<pjb> schweers: it's easy to see: (eval-when (:compile-toplevel) (print :compile-toplevel)) (eval-when (:load-toplevel) (print :load-toplevel)) (eval-when (:execute) (print :execute)) (defun main () (print :run-time))
<pjb> Yes.
<pjb> During the second process.
<pjb> Saving a lisp image, and restoring is neutral for non-live data. (and even for some live data, eg. clisp tries to re-open opened files if they're found at the same path).
<schweers> Running such an executable does something similar to loading, right? Somehow the image has to be restored. But this is not considered load-time as far as the language is concerned?
<pjb> No, it restores the image.
<pjb> It's like swapping the process memory out to disk.
<pjb> a saved image is like a swap file.
<schweers> Ah, I think I get it
<pjb> This is why you have this development mode, called "in image", where you run a lisp image, mutate it (eg. at the repl), and save it for the next session, rinse and repeat until your lisp image contains your application.
loli has quit [Ping timeout: 255 seconds]
<schweers> Even though there are still some cases which I have not yes successfully wrapped my head around, I like how most implementations handle this image based approach.
<pjb> The defect of this development mode is that it's not reproducible, unless you have very good introspection tools (not in standard CL implementations, but have a look at ibcl).
<makomo> just to refresh my memory: :compile-toplevel corresponds to COMPILE-FILE, :load-toplevel to LOADing compiled files, and :execute to EVAL/LOADing source files, right?
<pjb> Yes. :load-toplevel is loading fasl files.
wanz has joined #lisp
<pjb> :execute is loading the source file.
<makomo> right, FASLs only, not source files
<pjb> (or C-x C-e)
<makomo> that was a subtle thing to realize for me
<makomo> and what about COMPILE? i always forget how that fits into the picture. i guess COMPILE doesn't do top-level form processing so the only relevant situation is :execute?
<pjb> compile is not compile-file.
<pjb> You have to call it explicitely, like eval or coerce.
<makomo> yeah, i know
<makomo> hm yeah, only :execute is relevant, but the evaluation happens at run-time of course, once the compiled function is called
<makomo> pjb: but even with all this EVAL-WHEN recap, is this line "nor is it specified whether they are available in subsequent compilation units or subsequent invocations of the compiler" not surprising?
rumbler31 has joined #lisp
<pjb> (eval-when (:compile-toplevel) (compile foo)) But by definition compile doesn't compile toplevel forms.
<pjb> makomo: not really, because compile-file could call fork first.
<makomo> pjb: i meant more like (compile nil '(lambda () (eval-when ...)), but yeah, not top-level form processing so that's settled
<pjb> for example, in ecl, the compiler is gcc: it definitely fork/exec!
<makomo> so let's say we have files A and B, and there's a macro M defined in A. subsequent forms in A use the macro M, and forms in B also use the macro M. does this mean that just compiling A is not enough in order to compile B?
<makomo> i.e. you'd have to also load A in order to be sure that M is available when B is being compiled?
rumbler31 has quit [Ping timeout: 240 seconds]
<pjb> See the discussion about the environments at http://www.lispworks.com/documentation/HyperSpec/Body/03_ba.htm
<pjb> makomo: indeed.
<pjb> You have to load A into the compilation environment used to compile B.
easye has quit [Remote host closed the connection]
<pjb> This means that the way M is used in A and in B is very different.
<pjb> M can be used in A, because the compiler will use what it has saved in the compilation environment of A to be used by the rest of the file.
<makomo> yeah, i've read this a couple of times. now i see that it's actually quite a normal thing, but it was surprising to me because it regarded such a common macro, DEFMACRO (but i get that that makes no difference now)
<pjb> On the other hand, M can be used in B, only because the compiler saved some information in the fasl file, that has been loaded into the compilation environment of B.
loli has joined #lisp
<pjb> OR, you can wrap (with-compilation-unit (compile-file "A") (compile-file "B")).
<makomo> pjb: mhm, makes sense
<pjb> But notice that how the enviroments are segregated is entirely implementation dependent. But you find that you soon need to load A to compile B.
random-nick has joined #lisp
easye has joined #lisp
akoana has left #lisp ["Leaving"]
selwyn has quit [Remote host closed the connection]
prite has quit [Quit: Konversation terminated.]
prite has joined #lisp
kuribas has joined #lisp
<kuribas> hi, when does trap_Halt gets called?
dddddd has joined #lisp
<kuribas> I get the error: "%PRIMITIVE HALT called; the party is over."
<kuribas> (in sbcl)
<jackdaniel> kuribas: this is not CL-specifc question, you may have better luck at #sbcl
<jackdaniel> since it seems you hit some corner case of its internals
robdog has joined #lisp
<kuribas> jackdaniel: right, thanks
<no-defun-allowed> when SBCL has a very major internal disaster
<no-defun-allowed> one way is to declare (optimize (safety 0)) and really mess up
<kuribas> no-defun-allowed: it seems to happen when the slime connection is flakey
<no-defun-allowed> that...shouldn't really happen.
<no-defun-allowed> it runs over TCP, and usually it won't even leave your machine
<kuribas> no-defun-allowed: the lisp server is a remote server
<no-defun-allowed> see: "runs over TCP"
<no-defun-allowed> i can't imagine why a SWANK server would lose like that
<kuribas> I agree with "it shouldn't happen".
<kuribas> But I'd like to fix it...
<no-defun-allowed> the SBCL debugger gives you a backtrace, IIRC
gxt has quit [Ping timeout: 255 seconds]
robdog_ has joined #lisp
kuribas has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 250 seconds]
<schweers> Given a class, I want to get all slots in it (to generate some code for every slot). Do I have to use MOP for this?
<no-defun-allowed> Did you define the class yourself?
<schweers> Yes.
<no-defun-allowed> You could write a macro which reads the defclass slot descriptions and generates code from them.
<schweers> Now that I think about it, I could instead use a macro which defines both the class and the code per slot. This may be easier.
<no-defun-allowed> Yeah.
kuribas has joined #lisp
<kuribas> sorry, have problems connecting
marvin2 has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
<beach> schweers: Using the MOP is usually not a problem. There is the CLOSER-MOP library for that.
<schweers> I know it exists, I’ve just never worked with MOP and don’t understand it.
karlosz has quit [Quit: karlosz]
<beach> OK.
<beach> mop class-slots
<no-defun-allowed> Oh, forgot about that one.
<no-defun-allowed> The stackoverflow post provides code to get slot names though, through slot-definition-name.
<no-defun-allowed> mop slot-definition-name
vilivulpine has joined #lisp
loli has quit [Ping timeout: 246 seconds]
<schweers> I’ll just create the class and the assorted per-slot code in a single macro. It also saves some work in defining the class.
robdog has joined #lisp
<schweers> But I’ll have to look at MOP someday. It’s a shame that I’m limiting my designs by not knowing MOP.
<shka__> MOP is not must-know
<shka__> but it is worth knowing
robdog has quit [Ping timeout: 250 seconds]
robdog_ has joined #lisp
gxt has joined #lisp
<schweers> My guess is also that it will understand my CLOS and general OO understanding. So that alone is probably a good reason to learn more about MOP.
loli has joined #lisp
<shka__> schweers: i think that you are correct
robdog_ has quit [Read error: Connection reset by peer]
robdog has joined #lisp
robdog has quit [Ping timeout: 259 seconds]
robdog_ has joined #lisp
robdog_ has quit [Read error: Connection reset by peer]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
gxt has quit [Ping timeout: 250 seconds]
wanz has quit [Quit: wanz]
gxt has joined #lisp
flazh has quit [Ping timeout: 246 seconds]
flazh has joined #lisp
dtornabene has quit [Quit: Leaving]
robdog has joined #lisp
gxt has quit [Ping timeout: 246 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
gxt has joined #lisp
rumbler31 has joined #lisp
wanz has joined #lisp
robdog_ has joined #lisp
heisig has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
robdog has quit [Ping timeout: 250 seconds]
flazh has quit [Ping timeout: 250 seconds]
flazh has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
gxt has quit [Ping timeout: 244 seconds]
gxt has joined #lisp
robdog has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
gxt has quit [Ping timeout: 255 seconds]
m00natic has joined #lisp
gxt has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
heisig has quit [Ping timeout: 255 seconds]
robdog has joined #lisp
loli has quit [Ping timeout: 258 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life_ is now known as Lord_of_Life
gxt has quit [Ping timeout: 268 seconds]
ludston has quit [Ping timeout: 268 seconds]
gxt has joined #lisp
jmercouris has joined #lisp
<jmercouris> hello everyone
<pjb> hello onlyone
<jmercouris> lol
<schweers> Hi o/
amerlyq has joined #lisp
sz0 has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
loli has joined #lisp
ggole has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
Ukari has joined #lisp
robdog has joined #lisp
kuribas has quit [Ping timeout: 240 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
Nilby has quit [Read error: Connection reset by peer]
robdog_ has quit [Ping timeout: 268 seconds]
CrazyEddy has quit [Ping timeout: 240 seconds]
robdog has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
ebrasca has joined #lisp
heisig has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
<dim> beach: hi! I stumbled upon http://herpolhode.com/rob/utah2000.ps this morning and got to think about your LispOS project in that context again, so I though if you didn't read the piece from Rob Pike before, you might like it... the title is “Systems Software Research is Irrelevant” and it was publised Feb 21, 2000
robdog has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
robdog_ has joined #lisp
loli has quit [Ping timeout: 240 seconds]
robdog has quit [Ping timeout: 264 seconds]
<beach> dim: I read it. It is brilliant. I recommend it to others.
wanz has quit [Quit: wanz]
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
xkapastel has joined #lisp
<heisig> If I remember correctly, Rob Pike once convinced Stephen Wolfram to write Mathematica in C instead of Lisp. His argument was that 'C is more modern'.
<heisig> And the fun twist - Pike is now working on Go, which is basically C with GC and closures.
robdog_ has joined #lisp
wxie has joined #lisp
loli has joined #lisp
wanz has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
<beach> Interesting!
<beach> My thesis advisor tried to convince Wolfram to use our very efficient rewrite engine as the core of Mathematica, but he declined.
robdog has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
<heisig> The interesting part is how even very smart people like Wolfram can make software engineering decisions that are totally bonkers.
<beach> I totally agree.
<scymtym> beach: is there a publication describing this rewrite engine?
<ggole> That particular phenomenon is not limited to software engineering
robdog_ has joined #lisp
<beach> scymtym: I think it is best to start with O'Donnell's book. Hold on...
robdog has quit [Ping timeout: 250 seconds]
q9929t has joined #lisp
<scymtym> beach: thank you
<beach> And this is my dissertation, but no PDF is available: https://dl.acm.org/citation.cfm?id=59707
<beach> My dissertation works is summarized here https://link.springer.com/chapter/10.1007%2F3-540-51081-8_125
robdog_ has quit [Ping timeout: 245 seconds]
<scymtym> thanks
<beach> I have vague plans to typeset my dissertation using LaTeX, but I am too lazy I think.
<shka__> beach: oh, this sounds like interesting thing to read
<shka__> but no PDF?
<beach> Nope, sory.
<beach> sorry even
<beach> I suppose I could stick it in the scanner and make it available that way.
<shka__> don't worry about it
<beach> Thanks.
robdog has joined #lisp
<lieven> Guy Steele convinced Knuth his typesetting system needed to be programmable. And then Knuth chose a macro rewriting system :(
<beach> Heh!
<beach> The book by O'Donnell describes the language and an interpreter for it. I generalized the class of programs that could be handled, and I showed how to write a compiler for it, rather than an interpreter. The compiler uses partial evaluation in an interesting way, in that part of the compiled code is generated from partial evaluation of the same code that is compiled.
cranes has joined #lisp
wxie has quit [Ping timeout: 268 seconds]
<shka__> beach: would same approach be usefull for creating lisp-embedded efficient logic programming language?
<shka__> *efficient implementation
<shka__> by that i mean something around the same order of magnitude fast as prolog implementations
<beach> Yes, but not Prolog-style "logic programming". Equational logic programming, which is basically rewriting.
<beach> No, it can't be used for Prolog-style logic programming.
<beach> But, yes, I have had plans to embed the engine in Common Lisp. The compiler that I wrote for my dissertation generated VAX assembly code.
<lieven> ouch. that's a blast from the past.
Bike has joined #lisp
<shka__> beach: ok, thanks for answer
* lieven started in between the 'all the world is a vax' and 'all the world is a sun' periods
robdog_ has joined #lisp
<beach> lieven: Well, I did the work around 1985.
<shka__> i still want to eventually take a stab at prolog style logic programming for CL
<beach> shka__: There are several existing systems. One by Xof I think.
<beach> An improvement of the one in PAIP as I recall.
<shka__> beach: exactly
<shka__> but i found article with very simple but fast enough VM that may work a lot faster
robdog has quit [Ping timeout: 268 seconds]
<beach> Oh, OK.
<shka__> authors even implemented basic prolog-like language in it using java, codebase was very compact and performance was more then decent
milanj has joined #lisp
<Ukari> the code `(funcall (lambda () (print "foo")) "bar")` will throw a `invalid number of arguments: 1` error, I know use `(lambda (&optional x))` could prevent from it, but is there anything equivalent to the `funcall` but which could auto decide between expression-A `(funcall (lambda (x) (print "foo")) "bar")` and expression-B `(funcall (lambda () (print "foo")))`, and not rely on a specific implementation?
<shka__> so i think that this could be way to go in CL
<shka__> before that i attempted to understand WAM but oh boy this thing is complex
notzmv has quit [Ping timeout: 244 seconds]
<Bike> Ukari: there's no function that will tell you how many arguments a function accepts, if that's what you mean.
robdog_ has quit [Ping timeout: 268 seconds]
<shka__> also, this VM approach sounds like it could be compiled fairly easy
<Ukari> ah, I got a way
<Ukari> use a `(lambda (&rest args) (print args))` to wrap outside
robdog has joined #lisp
<Ukari> then i could detect it but will it cost expensive in runtime?
<shka__> Ukari: would it matter if it was?
<Bike> i don't follow.
ikki has joined #lisp
<Ukari> what is the "matter" your points for, expensive or the (&optional x)?
robdog has quit [Ping timeout: 264 seconds]
q9929t has quit [Remote host closed the connection]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
flamebeard has joined #lisp
Lycurgus has joined #lisp
milivoj has joined #lisp
wanz has quit [Quit: wanz]
XiangyuHe has joined #lisp
flamebeard has quit [Remote host closed the connection]
wanz has joined #lisp
XiangyuHe is now known as XH_
XH_ is now known as Guest74671
Guest74671 is now known as XH4
FreeBirdLjj has joined #lisp
XH4 is now known as `XH
<Ukari> that way is wrong, wrap outside is meaningless
FreeBirdLjj has quit [Ping timeout: 244 seconds]
`XH has quit [Quit: Leaving]
FreeBirdLjj has joined #lisp
loli has quit [Ping timeout: 246 seconds]
pierpal has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
robdog has joined #lisp
dale has quit [Client Quit]
wanz has quit [Quit: wanz]
robdog has quit [Ping timeout: 250 seconds]
loli has joined #lisp
flamebeard has joined #lisp
rippa has joined #lisp
q9929t has joined #lisp
jmercouris has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
amerlyq has quit [Quit: amerlyq]
Josh_2 has joined #lisp
robdog has joined #lisp
sjl_ has joined #lisp
q9929t has quit [Quit: q9929t]
robdog has quit [Ping timeout: 252 seconds]
makomo has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
robdog has joined #lisp
rumbler31 has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 264 seconds]
dale_ has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
dale_ is now known as dale
robdog has joined #lisp
amerlyq has joined #lisp
dale has quit [Remote host closed the connection]
dale has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
varjag has joined #lisp
loli has quit [Ping timeout: 246 seconds]
flamebeard has quit []
status402 has quit [Quit: status402]
robdog has joined #lisp
moei has quit [Quit: Leaving...]
robdog has quit [Ping timeout: 250 seconds]
loli has joined #lisp
robdog has joined #lisp
jprajzne has quit [Quit: Leaving.]
robdog has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
edgar-rft has quit [Remote host closed the connection]
beach has quit [Disconnected by services]
beach has joined #lisp
robdog has joined #lisp
FreeBirdLjj has joined #lisp
charh has quit [Ping timeout: 245 seconds]
prite has quit [Ping timeout: 250 seconds]
schweers has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 250 seconds]
nowhere_man has joined #lisp
robdog has joined #lisp
LiamH has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
rumbler31 has joined #lisp
loli has quit [Ping timeout: 272 seconds]
charh has joined #lisp
robdog has joined #lisp
makomo has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
Achylles has joined #lisp
angavrilov has quit [Remote host closed the connection]
dale has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
dale has joined #lisp
FreeBirdLjj has joined #lisp
loli has joined #lisp
hhdave_ has quit [Ping timeout: 244 seconds]
cage_ has joined #lisp
<cage_> is there a way to register for ELS without using google form?
xkapastel has joined #lisp
gxt has quit [Ping timeout: 246 seconds]
gxt has joined #lisp
amerlyq has quit [Quit: amerlyq]
amerlyq has joined #lisp
charh has quit [Ping timeout: 268 seconds]
matijja has joined #lisp
edgar-rft has joined #lisp
waron has quit [Remote host closed the connection]
charh has joined #lisp
prite has joined #lisp
ggole has quit [Quit: Leaving]
<jackdaniel> cage_: the best place to ask is els mailing list
<cage_> jackdaniel, right! Thank you!
nanoz has joined #lisp
gxt has quit [Ping timeout: 255 seconds]
karlosz has joined #lisp
karlosz has quit [Client Quit]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
robdog has joined #lisp
dmiles has quit [Ping timeout: 258 seconds]
m00natic has quit [Remote host closed the connection]
orivej has joined #lisp
noloop has joined #lisp
<noloop> how do I talk to asdf to recompile all files whenever test-op is called?
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
dale has quit [Quit: dale]
loli has quit [Ping timeout: 250 seconds]
Adamclisi has joined #lisp
Adamclisi has quit [Remote host closed the connection]
Adamclisi has joined #lisp
Adamclisi has quit [Remote host closed the connection]
lumm has joined #lisp
Adamclisi has joined #lisp
<ebrasca> Hi
loli has joined #lisp
dale has joined #lisp
lumm_ has joined #lisp
lumm has quit [Ping timeout: 255 seconds]
lumm_ is now known as lumm
gxt has joined #lisp
Lycurgus has quit [Quit: Exeunt]
lumm_ has joined #lisp
robdog has joined #lisp
dmiles has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
lumm has quit [Ping timeout: 268 seconds]
lumm_ is now known as lumm
nowhereman has joined #lisp
lumm has quit [Client Quit]
lumm has joined #lisp
fkac has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
Zaab1t has joined #lisp
matijja has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
Adamclisi has quit [Remote host closed the connection]
izh_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
Adamclisi has joined #lisp
buffergn0me has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
sauvin has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 250 seconds]
cage_ has quit [Remote host closed the connection]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
milivoj has quit [Ping timeout: 255 seconds]
lumm has quit [Quit: lumm]
robdog has joined #lisp
lumm has joined #lisp
lumm_ has joined #lisp
pierpal has quit [Quit: Poof]
lumm has quit [Ping timeout: 246 seconds]
lumm_ is now known as lumm
robdog has quit [Ping timeout: 264 seconds]
pierpal has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
matijja has joined #lisp
Lycurgus has joined #lisp
loli has quit [Ping timeout: 246 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
hiroaki has joined #lisp
lumm has quit [Quit: lumm]
robdog has joined #lisp
lumm has joined #lisp
nanoz has quit [Ping timeout: 250 seconds]
loli has joined #lisp
robdog has quit [Ping timeout: 245 seconds]
ikki has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Remote host closed the connection]
robdog has joined #lisp
matijja has quit [Ping timeout: 244 seconds]
q3d has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
robdog has quit [Ping timeout: 250 seconds]
emaczen has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
robdog has joined #lisp
makomo has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
comborico1611 has joined #lisp
comborico1611 has quit [Ping timeout: 255 seconds]
robdog has joined #lisp
Lycurgus has quit [Quit: Exeunt]
scymtym has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Remote host closed the connection]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
moldybits has joined #lisp
buffergn0me has joined #lisp
makomo has quit [Ping timeout: 268 seconds]
<moldybits> i would like my repl to print numbers as binary literals
robdog_ has quit [Ping timeout: 250 seconds]
<moldybits> as well as decimal, like how emacs does it.
makomo has joined #lisp
pierpal has quit [Ping timeout: 246 seconds]
<moldybits> ah, setting *print-radix* to t gets me a #b prefix. that's nice. i presume the pretty printer will allow me to get something like 5 => 5 (#b101)
<jasom> moldybits: yes you could install a pretty print dispatch entry for type rational (or maybe integer) to do that
<jasom> clhs 22.2.1.4
Denommus has joined #lisp
Denommus` has joined #lisp
lumm has quit [Ping timeout: 250 seconds]
Denommus has quit [Ping timeout: 252 seconds]
Nilby has joined #lisp
abhixec has quit [Quit: rebooting]
lumm has joined #lisp
amerlyq has quit [Ping timeout: 250 seconds]
Nilby has left #lisp ["👽愛🆑"]
Nilby has joined #lisp
izh_ has left #lisp [#lisp]
<moldybits> hm, slime keeps crashing for when i try to set-pprint-dispatch 'integer to whatever, while 'float works fine.
amerlyq has joined #lisp
Achylles has quit [Ping timeout: 258 seconds]
<moldybits> *print-base* and *print-radix* will have to do for now. thanks, jasom and LdBeth!
Denommus` has quit [Remote host closed the connection]
amerlyq has quit [Quit: amerlyq]
<moldybits> does this seem like a reasonable thing to do? (take-bits 3 #b10101111) => #b101 and (discard-bits 3 #b10101111) => #b1111
<jasom> moldybits: just zeroing the highest N bits (counting from the highest non-zero bit)?
<ThomasLewis[m]> I think you want ‘fixnum or ‘bignum.
<Bike> how does it know what bit to start on? #b00010101111 = #b10101111 after all
<emaczen> Do we have to use eval-when for reader macros in a file? Or is there a way to make it implicit?
<moldybits> Bike: i have an optional argument byte-size which defaults to *byte-size*.
<jasom> emaczen: named readtables might solve the problem you have?
Zaab1t has quit [Quit: bye bye friends]
<Bike> moldybits: seems like it's basically ldb then.
<jasom> moldybits: so the implementation is just (setf (byte n (- *byte-size* n)) 0)?
<jasom> a thin wrapper around ldb anyways
<jasom> clhs ldb
ltriant has joined #lisp
<jasom> something like: (defun take-bits (n x &optional (byte-size *byte-size)) (ldb (byte (- byte-size n) 0) x))
loli has quit [Ping timeout: 250 seconds]
<jasom> with typo correction, seems to work: (defun take-bits (n x &optional (byte-size *byte-size*)) (ldb (byte (- byte-size n) 0) x))
rumbler31 has joined #lisp
heisig has quit [Remote host closed the connection]
<moldybits> yes, that is much simpler than my original implementation. not sure if it's worth naming, then ...
<jasom> though if you want it to be fast; I suggest using a constant named +byte-size+ rather than a variable named *byte-size*
<jasom> and yes it might not be worth naming
Achylles has joined #lisp
<jasom> ldb is one of those things that is implemented many times (often poorly) as a preprocessor macro in C, so it's nice to have it in the lisp spec.
Bike has quit []
loli has joined #lisp
Nomenclatura has quit [Quit: q]
makomo has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
<moldybits> i'm translating some C into Lisp in order to understand and refactor it. later i might translate it back into C.
prite has quit [Ping timeout: 240 seconds]
q3d has quit [Ping timeout: 256 seconds]
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
makomo has joined #lisp
karlosz has quit [Quit: karlosz]
wusticality has joined #lisp
lumm has quit [Ping timeout: 258 seconds]
lumm has joined #lisp
jb has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
rumbler31 has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 268 seconds]
gigetoo has joined #lisp
Bike has joined #lisp
varjag has quit [Ping timeout: 246 seconds]
robdog has joined #lisp
lumm has quit [Quit: lumm]
robdog has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
loli has quit [Ping timeout: 240 seconds]
Achylles has quit [Remote host closed the connection]
sjl_ has quit [Ping timeout: 246 seconds]
random-nick has quit [Read error: Connection reset by peer]
pierpal has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
loli has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
emaczen has quit [Ping timeout: 250 seconds]
sz0 has quit [Quit: Connection closed for inactivity]