Xach changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook>
monaaraj has quit [Ping timeout: 256 seconds]
monaaraj has joined #commonlisp
hobo has joined #commonlisp
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
euandreh has quit [Ping timeout: 268 seconds]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
Bike has quit [Quit: Connection closed]
<Guest74> looks like i missed lots of graphics talk.
wyrd has quit [Ping timeout: 276 seconds]
Guest74 has quit [Quit: Connection closed]
wyrd has joined #commonlisp
sloanr has joined #commonlisp
random-nick has quit [Ping timeout: 256 seconds]
algae has quit [Ping timeout: 240 seconds]
<moon-child> pjb: I don't think runtime efficiency is a good argument for having multiple namespaces. A function call target can still be determined at compile time if it has not been lexically shadowed
<moon-child> and if it has been lexically shadowed, it's because you wanted it to be shadowed anyway
thomaslewis has joined #commonlisp
hobo has quit [Ping timeout: 252 seconds]
hobo has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
s-liao has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
kevingal has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
thomaslewis has joined #commonlisp
s-liao has quit [Quit: Client closed]
Oladon has quit [Quit: Leaving.]
algae has joined #commonlisp
Bike has joined #commonlisp
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
jmes has quit [Remote host closed the connection]
antonv has joined #commonlisp
<antonv> hi. Is it normal that ASDF loads the same .fasl file twice?
<antonv> In my file I do (fare-memoization:memoize ...) for some functions, and it complains if preformed twice.
sloanr has quit [Ping timeout: 256 seconds]
<antonv> Usually loading my ASDF system goes ok, but now fare-memoization started to complain about the second invocation - and indeed, the file is loaded twice
Devon has joined #commonlisp
<moon-child> pjb: (iow, runtime efficiency _is_ a good argument against pervasive dynamic scope)
Guest74 has joined #commonlisp
wyrd has quit [Quit: leaving]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
phantomics has quit [Ping timeout: 240 seconds]
wyrd has joined #commonlisp
john__ has joined #commonlisp
xaltsc has joined #commonlisp
gaqwas has quit [Ping timeout: 256 seconds]
Oladon has joined #commonlisp
<beach> Good morning everyone!
semz has quit [Ping timeout: 268 seconds]
algae has quit [Quit: WeeChat 3.4]
<antonv> shalom
semz has joined #commonlisp
s-liao has joined #commonlisp
Algernon91 has joined #commonlisp
wyrd has quit [Quit: leaving]
Algernon91 has quit [Ping timeout: 252 seconds]
Jing has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 256 seconds]
pranavats has left #commonlisp [Error from remote client]
s-liao has quit [Ping timeout: 256 seconds]
pranavats has joined #commonlisp
s-liao has joined #commonlisp
wyrd has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jstoddard has quit [Quit: Leaving]
Bike has quit [Quit: Connection closed]
Devon has quit [Ping timeout: 240 seconds]
<bollu> How do I view what value was returned when debugging using Swank?
<bollu> I can examine stack frames
<bollu> But I don't follow how to figure out what was computed by a call.
<bollu> (if it's not bound to a let or some such, but is an honest subexpression)
lisp123 has joined #commonlisp
<sm2n> bollu: That information isn't available by default as far as I am aware
<lisp123> Was there a particular reason CL was designed so that access to internal functions was still allowed, just not recommended?
<sm2n> bollu: For subexpressions, The best facility I know what SLY provides, stickers
<sm2n> But for function calls in particular both SLY and SLIME have a tracing facility
<lisp123> Like its very useful to have it this way and it treats programmers as grown-ups, but I wonder if there was any particular other reason
<antonv> bollu: you can simply evaluate this call again - if that's a stateless subexpression
<bollu> antonv i agree
<sm2n> ^ also this, note that you still have access to your repl while in the debugger
<sm2n> sometimes people forget that
<bollu> It seems like a poor proxy for what I want though, in case it is stateful, or expensive
<bollu> That's what I've been doing so far
<sm2n> I would recommend checking out SLY then
<antonv> not only repl, you can evaluate using local variables
<sm2n> (it's a SLIME fork)
<antonv> pres 'e' in slime
<sm2n> right, eval in stack frame as well
<antonv> lisp123: strange question
<bollu> sm2n so, do stickers show subexpression values?
<sm2n> Basically, you select an expression prior to running the code, and add a "sticker" to it
aartaka has joined #commonlisp
<sm2n> then once you recompile the code, every time that expression is evaluated, the value is captured
<sm2n> and you can playback through it
<beach> lisp123: What is an "internal function"?
<sm2n> beach: He means symbols that are not exported
<beach> Oh, that's very different.
<bollu> sm2n I am told that the debugger is very hackable. Is this a feature i can add into SBCL/SLDB, that of showing me the return value of each expresion?
<bollu> (I ask for entertainment. I'd like to learn how to exploit the extensibility of lisp)
<sm2n> bollu: I am not the person to ask, but I would imagine probably not
<lisp123> sm2n: Yes, thanks
<sm2n> simply because that would preclude a lot of optimizations
<sm2n> You could ask in #sbcl if you are curious, since I think that would require compiler support
<beach> lisp123: I can't think of a single reason why a programming language would not allow the programmer to access all of the code that programmer has written or installed.
<sm2n> (note that the debugger you use in slime/swank is part of that — you can write portable debuggers as libraries in CL!)
<beach> bollu: Debugging in FLOSS Common Lisp implementations is in a dismal state: http://metamodular.com/SICL/sicl-debugging.pdf
<antonv> bollu
<antonv> do you know many debuggers in other languages where value of already executed expression may be seen?
<antonv> except for experimental "time machine" debuggers?
<beach> I was just about to ask something similar.
<lisp123> beach: "Commercial" software may not want to expose their internals (not that I'm a fan, just giving a reason). The other thing is it increases assurance to the library writer that he/she can change the internals of his library without worrying about any users accessing those internals. Although any user who did so would do so at their own risk
<beach> lisp123: I can see why they would not want to expose their source code.
<sm2n> "time machine" debuggers typically don't let you do that either
<bollu> antonv I don't want *all* already evaluated expressions. I only want the *last* one. That is, the return value of the last executed expression. Visual studio provides this for C++, for example. Also, the rr time travel debugger is quite stable and works very well.
<sm2n> They snapshot syscalls, so any state between syscalls has to be regenerated typically
<sm2n> (talking about rr)
<beach> lisp123: If you have a user that modifies the internals of third-party modules, you should find a different user.
<bollu> beach SICL is the system you're implementing, I gather?
<beach> Yes.
<lisp123> beach: Yes
<bollu> Very cool
<beach> Thanks.
monaaraj has quit [Ping timeout: 240 seconds]
<antonv> bollu, right the "experimental" was a wrong word, but those tools are relatively new, as far as I know, I never used them (never needed actually)
<moon-child> 'debuggers where value of already executed expression may be seen?' as in, a value is associated with every ast node which was executed? I have no idea, but I have always wanted that
<antonv> as for the last expression, I don't really understand the use case
<beach> lisp123: In a multi-user Common Lisp system, you would want first-class global environments as we have planned.
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
<lisp123> beach: Yes, I can see now yet another reason why that would be very helpful (to avoid one user's mistakes affecting another)
<antonv> bollu, lisp debugger is activated by invoke-debugger, which in turn may be invoked by (error ...) call
<antonv> so the last expression is the (invoke-dubugger some-condition) and you see the condition in SLDB
<antonv> so, not clear how to think about the "last expression" that you need
<bollu> antonv when I step through an expression, say an if condifion, (if (g x) k l), how does one view the value computed by (g x) ? You can step into (g x), and infer what (g x) returned based on whether k or l is executed after (g x) returns. But there's no way to view *what exactly* (g x) computed.
<bollu> [as far as I can tell. I would love to be proven wrong]
<antonv> you can step through expressions?
<antonv> what CL do you use?
<antonv> Allegro?
<antonv> Maybe others will suggest something, but what I would do in real life is (let ((flag (g x))) (break) (if flag k l))
<antonv> and recompile the function
<antonv> yes, shockingly simple...
<sm2n> antonv: stickers let you do this without making you change the code and risk committing things you shouldn't
<antonv> cool
<bollu> antonv I'm bouncing between SBCL and lispworks personal
<bollu> sm2n it looks like stickers is what I need, yes :)
<antonv> lisp123, how to use that stepper?
<lisp123> antonv: (ql:quickload "COM.INFORMATIMAGO.COMMON-LISP.LISP.STEPPER")
<lisp123> It's quite good, so worth spending a few minutes learning how it works
<lisp123> pjb: Just thinking actually, could consider re-implementing CL-STEPPER / IBCL through a DEFADVICE approach vs. changing packages
<antonv> interesting
<lisp123> antonv: So basically packages like this 'take over' from the normal CL package, and add some additional functionality to the main CL symbols. In this case, it allows you to then step with much more control / information
<antonv> I understood the idea, more or less
<lisp123> pjb: I guess with DEFADVICE, the changes become global, maybe that's why that approach wasn't taken
<lisp123> Another reason for first-class global environments..
monaaraj has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
igemnace has joined #commonlisp
wyrd has quit [Remote host closed the connection]
wyrd has joined #commonlisp
Jach has quit [Remote host closed the connection]
lisp123 has quit [Quit: Leaving...]
xmyst has joined #commonlisp
monaaraj has quit [Ping timeout: 240 seconds]
monaaraj has joined #commonlisp
Nselm has joined #commonlisp
Nselm has quit [Ping timeout: 256 seconds]
xmyst has quit [Quit: Connection closed]
Alfr has joined #commonlisp
Nselm has joined #commonlisp
lisp123 has joined #commonlisp
antonv has quit [Ping timeout: 256 seconds]
Oladon has quit [Quit: Leaving.]
remexre has quit [Remote host closed the connection]
remexre has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
s-liao has joined #commonlisp
rgherdt has joined #commonlisp
notzmv has joined #commonlisp
<pjb> lisp123: defadvice cannot work on CL functions. But cl-stepper doesn't bother with functions, only with special operators (and a few CL macros).
monaaraj has quit [Ping timeout: 240 seconds]
<lisp123> pjb: Got it
monaaraj has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
pve has joined #commonlisp
john__ has quit [Remote host closed the connection]
Algernon69 has joined #commonlisp
Algernon69 has quit [Ping timeout: 250 seconds]
pranavats has left #commonlisp [Error from remote client]
rito_ has joined #commonlisp
rain3 has joined #commonlisp
<phoe> is anyone aware of an EQUAL-like predicate that is capable of detecting cycles?
<phoe> s/detecting/not hanging on/
<moon-child> phoe: (let ((*print-circle* t)) (equal (format nil "~a" x) (format nil "~a" y)))
<moon-child> :^)
lisp123 has joined #commonlisp
<phoe> moon-child: nice, but not what I'm looking for
lisp123 has quit [Ping timeout: 240 seconds]
pranavats has joined #commonlisp
gaqwas has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
mgl has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
s-liao has quit [Ping timeout: 256 seconds]
Lycurgus has joined #commonlisp
<Lycurgus> anybody know of a cl MIL implementation? (module interconnection language), i.e. one that exists in the present?
mingus has joined #commonlisp
random-nick has joined #commonlisp
s-liao has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
aphextwin has joined #commonlisp
<frodef> I have a slime-question... In sldb I have a frame with a local variable that is a long string, printed like "foo ...", so I don't get to see the whole string. To my surprise, if I do "copy to REPL" etc I also get only the shortened string!? How can I get to the full string object?
<jackdaniel> perhaps press "i" so you can inspect it in frame, then copy
<phoe> I cannot reproduce it
<phoe> copy-to-repl gives me the full string
<frodef> strange.
<jackdaniel> I can reproduce it
<frodef> "Pretty-print" will at least give me a full printout, if not the object as such.
<jackdaniel> phoe: think big, 80 characters is not enough. make it 512
<phoe> (let ((string (reduce (lambda (x y) (concatenate 'string x y)) (loop repeat 100 collect "djfhskdjhsdf ")))) (break) string)
<phoe> once broken, I go into the first frame, select the local shortened string, hit M-RET
<phoe> and there's the whole string in my repl
<jackdaniel> try (let ((string "#<C-u 512>a")) (error "booya"))
<phoe> hm, I get no locals whatsoever with that code
<jackdaniel> ha, you don't even get ... ;-)
<jackdaniel> did you try to /copy/ the variable from the frame to repl (i.e not return it)?
<phoe> you mean like M-w the text to copy it?
<jackdaniel> no, right click on the variable (part after "STRING = "), and select copy to repl
<jackdaniel> that's what frodef in my understanding tried to do, and that's what reproducible here
<phoe> oooooh yes
<phoe> the right-click does not behave like M-RET
<phoe> even though it should
<phoe> that's a slime bug!
<jackdaniel> frodef: press M-RET over the variable to copy it to the repl, that indeed works
pranavats has left #commonlisp [Error from remote client]
<frodef> ok thanks.
gaqwas has joined #commonlisp
pranavats has joined #commonlisp
tyson2 has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
Jing has joined #commonlisp
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
aphextwin has quit [Ping timeout: 256 seconds]
mingus has quit [Ping timeout: 240 seconds]
<jackdaniel> hmm, to confirm that (say) compute-applicable-methods is not specialized by the programmer for /a generic function/, is it enough to check whether the generic function is an instance of standard-generic-function (i.e one of its subclasses) and whether number of methods is = 1 ?
Devon has joined #commonlisp
<phoe> I think so
<jackdaniel> thanks
<phoe> the only thing I can think of is that your system can possibly define more methods than 1 - but that depends on your implementation
x88x88x has quit [Remote host closed the connection]
<phoe> if you are an implementer, then you can safely assume that number is 1
<jackdaniel> right, that's not a concern
<phoe> if a GF is not a SGF then the system-provided method will not apply
x88x88x has joined #commonlisp
<phoe> and if there is more than 1 method then the system-provided method *might* not apply
<jackdaniel> yes, that's why /and/
<phoe> but otherwise it seems that the system-provided method is the one to get called
<phoe> yes
* jackdaniel hums the imperial march
lisp123win has joined #commonlisp
<lisp123win> The more I write code, the more I am gravitating towards the one package/one file approach
<jackdaniel> it is like with the gauss bell, you'll use more files with time
<lisp123win> jackdaniel: Probably, yes. For now I have been subdividing and isolating ideas to single files - but perhaps at some point the interdependencies will become too much and it doesn't work out as well
<lisp123win> At which point, I'll migrate to the CLIM way
<jackdaniel> have you met our lord and saviour, the presentation-type-class metaobject?
<lisp123win> Indeed, one of the best ideas in CLIM
cage has joined #commonlisp
xaltsc has quit [Read error: Connection reset by peer]
s-liao has quit [Quit: Client closed]
<phoe> minion: memo for VincentVega: remember the time we ended up making https://plaster.tymoon.eu/view/2737#2737 ? I ended up using this in my code today, thanks :D
<minion> Remembered. I'll tell VincentVega when he/she/it next speaks.
mingus has joined #commonlisp
<rotateq> hmm Vincent Vega ... wasn't that the guy from Pulp Fiction? :D
gaqwas has quit [Remote host closed the connection]
mingus has quit [Ping timeout: 256 seconds]
aphextwin has joined #commonlisp
<jackdaniel> yes
peterhil has joined #commonlisp
<phoe> is anyone aware of whether a utility like https://plaster.tymoon.eu/view/2845#2845 is already available anywhere on Quicklisp?
<phoe> I want to avoid reinventing the wheel before documenting and submitting it somewhere
<jackdaniel> I doubt that there is
<moon-child> that is interesting
<jackdaniel> moreso I don't think I'd like to /read/ code that does such conflation between the compilation time and the runtime (source-code-wise)
<phoe> jackdaniel: that's a fair point
<phoe> still, right now I need to figure out if I want to use compile-time conditionals like these or if I want to duplicate substantial bodies of code or if I want to extract the common parts while complicating the uncommon ones
VincentVega has joined #commonlisp
mingus has joined #commonlisp
<phoe> jackdaniel: I've updated the paste with a bypass that a programmer should be able to set - this makes macroexpanding and slime-macrostep more usable. See L6-L7 and L147-L153 in updated paste
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mingus has quit [Ping timeout: 256 seconds]
<jackdaniel> my objection was more concerned with the source code than with the expansion. I mean - if you need it then you need it, I would be just quite upset if I had to read (and debug) code having such forms
<phoe> OK, I partially understood what you meant then
gaqwas has joined #commonlisp
Jing has joined #commonlisp
<phoe> gasp
<phoe> DEFINE-SYMBOL-MACRO accepts no documentation!
<rotateq> how dare those!
<pjb> phoe: (define-symbol-macro variable (car *foo)) (setf (documentation 'name 'variable) "Docstring"
<phoe> yep, SETF DOCUMENTATION looks like the way to go
<rotateq> too obvious (maybe) :D
<pjb> the thing is that symbol macros can be used to define anything, variables, syntax, whatever.
<rotateq> they are powerful indeed :)
<jackdaniel> just put in the expansion (break "something something symbol macro documentation")
<jackdaniel> :)
<moon-child> seems like all the more reason to have documentation for them specifically
<pjb> I guess define-symbol-macro was specified after (setf documentation) :-)
<moon-child> Do not meddle in the affairs of specifiers, for they are subtle and quick to anger
<jackdaniel> lambda macro and define-symbol-macro are added for compatibility with a portable ISLISP :)
<jackdaniel> I've read it in some more comprehensive comparison between islisp and cl, but this is in line of what I've read
<moon-child> 'I helped to keep CL from becoming a Lisp1' huh, I never realised that was even a question
<phoe> :D
ldb has joined #commonlisp
x88x88x has quit [Quit: ZNC - https://znc.in]
ldb has left #commonlisp [#commonlisp]
monaaraj has quit [Ping timeout: 240 seconds]
monaaraj has joined #commonlisp
s-liao has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
x88x88x has joined #commonlisp
monaaraj has quit [Ping timeout: 256 seconds]
monaaraj has joined #commonlisp
euandreh has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
s-liao has quit [Ping timeout: 256 seconds]
mgl has quit [Ping timeout: 256 seconds]
monaaraj has quit [Ping timeout: 240 seconds]
xsperry has quit [Remote host closed the connection]
monaaraj has joined #commonlisp
monaaraj has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
bendersteed has joined #commonlisp
monaaraj has joined #commonlisp
rito_ has quit [Ping timeout: 256 seconds]
mingus has joined #commonlisp
mingus has quit [Client Quit]
psf has quit [Ping timeout: 240 seconds]
Nselm has quit [Ping timeout: 256 seconds]
Algernon69 has joined #commonlisp
psf has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
Bike has joined #commonlisp
xaltsc has joined #commonlisp
euandreh has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
tyson2 has joined #commonlisp
<yitzi> For those that were interested in the discussion about org-mode parsers... cl-org-mode is a hot mess. It doesn't even export any symbols and whole bunch of the supposed functionality isn't even included by the system declaration. Ugh!
<beach> Ouch!
<yitzi> Yeah, if I was running quicklisp I'd boot it.
<yitzi> Which means to test my idea for using org-mode in wscle I'll probably have to write my own parser/serializer.
s-liao has quit [Quit: Client closed]
<Xach> yitzi: i run quicklisp, and i don't boot (or add) things based on the apparent quality
<yitzi> Xach: I know. I appreciate that. Just mostly irritated by junk software.
attila_lendvai has joined #commonlisp
monaaraj has quit [Ping timeout: 256 seconds]
monaaraj has joined #commonlisp
Lycurgus has joined #commonlisp
* Xach ponders derived dists with only the good software
<jackdaniel> hah, empty dists requrie less curation for sure! :)
* Lycurgus was gonna ask why decided to just push SB-EVAL onto *features* before loading ql
<yitzi> ACTION realizes there might be unintended consequences to such derived dists
<VincentVega> phoe: Nice! BTW, I also ended up adding a macro which would look like this http://ix.io/3LE3 in your new code. It's for cases when you want to mix with runtime flags such as in OR or AND (which happened to be necessary for what I was doing), relaying the trivial optimization to CL (jarringly, however, macroexpanading (or nil t 'hello) on sbcl yields a let-if ladder instead of just T, what gives?). Also, if you are going to publish it,
xsperry has joined #commonlisp
<minion> VincentVega, memo from phoe: remember the time we ended up making https://plaster.tymoon.eu/view/2737#2737 ? I ended up using this in my code today, thanks :D
<VincentVega> would you mind adding the lambda version too, since it's only a step away? I guess you were going to anyway, but here: https://paste.rs/DxW. Also, would "macroexpand-time" instead of "compile-time" be more precise?
<phoe> it's the more generic version
<phoe> still polishing it
<phoe> and figuring out why SBCL does a funny thing related to it
<VincentVega> phoe: cool, will take a look at it!
<phoe> hmm, s/compile-time/macroexpand-time/ works too
<phoe> also the disassembly is AFAIK the same because the code is the same - the only difference is in the values that are closed over
Lycurgus has quit [Quit: Exeunt]
BerntH_ has left #commonlisp [#commonlisp]
Algernon69 has quit [Read error: Network is unreachable]
Algernon91 has joined #commonlisp
gaqwas has joined #commonlisp
<Bike> the code doesn't seem the same?
<VincentVega> phoe: also, it's not a big deal, but maybe rename compile-time-if just to if since the package name already encodes that?
<phoe> Bike: you mean the disassemblies for print-maker?
<Bike> yeah, i mean, one is (lambda (x y)) and the other is (lambda (x y) (print (+ x y))), right?
<phoe> VincentVega: hmm, that's an option
<VincentVega> phoe: yeah, I am sort of scratching my head too over that rn
<VincentVega> I mean Bike ^
<phoe> Bike: hm, at least in my case: https://plaster.tymoon.eu/view/2847#2847
euandreh has joined #commonlisp
<Bike> that's different. in any case the body will be (+ x y constant).
<Bike> and since sbcl doesn't know the types of x and y it can't totally remove an addition of 0.
<phoe> that's a bug
<phoe> there's no mention of the PRINT call in either disassembly
Algernon91 has quit [Ping timeout: 250 seconds]
<phoe> VincentVega: I'm kind of unsure about this - mostly because they can be too similar to IF/WHEN/UNLESS from the CL package, *even* when used with a local nickname
<phoe> COMPILE-TIME:IF still gives a different vibe than COMPILE-TIME-IF
lisp123 has joined #commonlisp
<VincentVega> phoe: I see what you mean, especially if a local name is short like wctb:if.
nij- has joined #commonlisp
Devon has joined #commonlisp
<phoe> jackdaniel's point is pretty good and important when it comes to reading such code - I'd rather have COMPILE-TIME-{IF,WHEN,UNLESS} stay explicit like that
igemnace has quit [Remote host closed the connection]
<Bike> phoe: i can get a similar result without the macrology - (defun make-adder (x &key huge-p) (if huge-p (lambda ( y ) (+ x y (print 1000))) (lambda ( y ) (+ x y 0))))
attila_lendvai has quit [Quit: Leaving]
igemnace has joined #commonlisp
<phoe> Bike: thanks! updating the ticket
monaaraj has quit [Ping timeout: 256 seconds]
monaaraj has joined #commonlisp
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bendersteed has quit [Ping timeout: 256 seconds]
monaaraj has quit [Ping timeout: 256 seconds]
Jing has joined #commonlisp
monaaraj has joined #commonlisp
<yottabyte> what is isetq?
nij- has left #commonlisp [#commonlisp]
<phoe> it's a hack
hobo has quit [Quit: ZNC 1.8.2 - https://znc.in]
<yottabyte> Interesting. Is Fset the way to go if I want to use sets?
<phoe> if you want anecdata, I have used plenty of sets in Lisp and I have not used FSet (yet)
<phoe> in my code they're usually represented by hash tables or lists
<phoe> but then again, I don't usually use immutable data structures because I don't need to, and FSet provides these
<phoe> but then again, fset was the 81st most downloaded Quicklisp system last month - and that's pretty popular, if popularity is any good measure of whether you should use it
attila_lendvai has joined #commonlisp
monaaraj has quit [Ping timeout: 240 seconds]
Jing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
monaaraj has joined #commonlisp
domovod has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
jealousmonk has joined #commonlisp
<VincentVega> phoe: IMHO with-compile-time-macro:if is quite unambiguous, I mean one doesn't simply redefine if and what not, and that's the way I would go, but, on the other hand, I think wctm:compile-time-if is fine as well.
<VincentVega> phoe: My previous note on "compile-time" bothers me quite a bit more, since it might as well be loading time or execute time for it to work (speaking of vibes, EVAL-WHEN is what comes to mind here). I would much rather prefer it be called macroexpand-time.
<phoe> VincentVega: sure, that works - I'll do that
<VincentVega> phoe: awesome, thank you!
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
Algernon91 has joined #commonlisp
<phoe> VincentVega: done
shka has quit [Remote host closed the connection]
gaqwas has quit [Remote host closed the connection]
Algernon666 has joined #commonlisp
shka has joined #commonlisp
gxt has quit [Quit: WeeChat 3.4]
Algernon91 has quit [Ping timeout: 240 seconds]
gxt has joined #commonlisp
Algernon91 has joined #commonlisp
xcombelle has joined #commonlisp
Algernon666 has quit [Ping timeout: 240 seconds]
Algernon91 has quit [Ping timeout: 240 seconds]
gaqwas has joined #commonlisp
lisp123 has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
igemnace has quit [Remote host closed the connection]
<VincentVega> phoe: could you please also add http://ix.io/3LF0?
<phoe> oh? what is it for?
<phoe> this looks like (macroexpand-time-if branch t nil)
<VincentVega> phoe: dang, you are right!
<VincentVega> phoe: this looks good, thanks again for publishing this.
victor_ has joined #commonlisp
victor_ has quit [Client Quit]
vibjelo has joined #commonlisp
vibjelo is now known as victor
domovod has quit [Quit: WeeChat 3.4]
Guest74 has quit [Quit: Connection closed]
hobo has joined #commonlisp
makomo has joined #commonlisp
<yottabyte> phoe: I just want to be able to check for contains and remove in constant time. I could use a hash table but the values would be throwaway nils. Doesn't read as cleanly.
rito_ has joined #commonlisp
theothornhill has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
lisp123 has quit [Quit: Leaving...]
lisp123 has joined #commonlisp
random-nick has quit [Ping timeout: 240 seconds]
rain3 has quit [Ping timeout: 240 seconds]
<rotateq> yottabyte: do you know upto now how to see if a key in a hash-table has value NIL or isn't bound?
<phoe> I usually set the hash-value to be eq to the hash-key
gaqwas has joined #commonlisp
<mfiano> same ^
<mfiano> which is essentially a hash set as other languages call it
<mfiano> It's a useful idiom
<adeht> you can just write a set abstract data type using hash table as representation.. then it'll read cleanly
adeht is now known as _death
random-nick has joined #commonlisp
superduperuser has joined #commonlisp
Oladon has joined #commonlisp
jstoddard has joined #commonlisp
<pjb> rotateq: yottabyte: (multiple-value-bind (value presentp) (gethash key table) (when presentp (do-something-with key value)))
<lisp123> If anyone has any thoughts
<phoe> already voiced mine :D
<lisp123> phoe: :)
xcombelle has quit [Quit: WeeChat 3.3]
attila_lendvai has quit [Ping timeout: 240 seconds]
<mfiano> I commented.
<mfiano> Though on a comment leaving something out that hurts me greatly
<lisp123> mfiano: That was me, waving the flag for %name ;)
<mfiano> Good, we drilled it into you finally that means :)
<lisp123> mfiano: Yes, my stubborn self has accepted it :)
<mfiano> Truth be told, you wouldn't be a Lisper if you weren't stubborn as all hell.
<lisp123> Indeed. Although on the spectrum, Common Lispers are most accomodating, the rest went off and developed their own micro languages
<_death> personally I don't like such adorning of names
remexre has quit [Remote host closed the connection]
remexre has joined #commonlisp
<_death> if a newbie comes up with a style guide by piecing together other style guides and other people's personal preferences, I'm not sure that's any guide at all
<phoe> aw snap, WITH-HASH-TABLE-ITERATOR has dynamic extent
<phoe> I don't see a good API for writing a CPS-style hash table traversal then
<phoe> other than extracting all hash-table keys and going over them
gaqwas has quit [Remote host closed the connection]
<Bike> oh, yeah, i hit that when i was poking at making a general iterator concept. i ended up demoing something using sbcl internals
<Bike> admittedly it might get a little weird with concurrency anyway
kevingal has joined #commonlisp
<phoe> concurrency, yeah, but I want to go single-threaded without modifying the hashtable
<rotateq> pjb: exactly that i had in mind ^^
<jeosol> lisp123: you wrote the guide?
<rotateq> lisp123: do you know the style guide by pitman and norvig?
<jeosol> one thing that was obvious to me, I never used <class> for naming at all, not sure that is common
<rotateq> jeosol: wasn't that common is Dylan?
<phoe> I've seen it in some codebases, but nowhere near common
<jeosol> lisp123: also in a few places, you used NPKP, but earlier you stated it has PNKP which is the correct abbrevations right (Peter Novig, Kent Pitman)
<jeosol> phoe: thanks for that feedback
<jeosol> phoe: I saw you comment about pln? is it every now, or we need to upgrade asdf to get it
<rotateq> after reading some SICL code i now use more #\% for prefix for slot-names
lisp123 has quit [Remote host closed the connection]
<jeosol> rotateq: yes, beach advocates for that style. I noticed it in his codes
<mfiano> It is a style I have used for years myself.
<rotateq> I like it.
<mfiano> Since, well, slots are implementation details, and we don't export constructs like other languages, but symbols which are used in many different contexts.
<jeosol> lisp123: I commend the effort to coalesce these guides but of course these things can be very hairy sometimes we'd have to use the right language, "could", "must", "should" etc
triffid has joined #commonlisp
<jeosol> mfiano: thanks for voting of using % prefixed slot names. I read your strong comment on reddit about this and related to using :use
<mfiano> I wouldn't say I voted. It is just a major concern of mine to not see a dinstiction between public and private APIs.
<jeosol> When reading code, it is better to quickly be able to decipher what is what and of course syntax helps
<jeosol> mfiano: I mean more like chiming in. I don't  use %prefixed names when I started coding but I try to do use slots directly too, use with-accessors .. instead, but the %prefix name is something I'd consider
<phoe> jeosol: DEFPACKAGE works out of the box, UIOP:DEFINE-PACKAGE requires a recent ASDF
<phoe> that is, when used with :LOCAL-NICKNAMES
<rotateq> the accessors i use without #\%
<theothornhill> What is the reasoning about (#name :accessor name)?
<mfiano> Do you mean %name?
<theothornhill> sry s/#/%
<jeosol> phoe: that's why, I almost use uiop:define-package everywhere as I have codes using :asdf-inferred-system
<phoe> theothornhill: (defclass foo () ((%bar :accessor bar)))
<theothornhill> yeah, but why
<phoe> if you export the symbol BAR, you cannot so SLOT-VALUE on that symbol
cosimone has quit [Ping timeout: 268 seconds]
<jeosol> That explains the reason I had some problems
<mfiano> theothornhill: Because bar and bar are the same symbol.
<mfiano> If you export bar, you gave your users access to implementation details.
<phoe> you must use the accessor unless you want to ::
<theothornhill> oh right
shka has quit [Ping timeout: 240 seconds]
<mfiano> Bypassing your protocols you put in place.
<theothornhill> thanks. For some reason I assumed that's what it would do
lisp123 has joined #commonlisp
<lisp123> jeosol: No way (no offense to the author) :)
<lisp123> rotateq: yes of course
* theothornhill has lots of refactorings to do
<jeosol> lisp123: apologies then. I don't see a metacontent user here.
<lisp123> jeosol: No worries. Yeah, I just saw it on reddit
<mfiano> Everyone has their own style guide derived from 1 of those, but still distinct in their own way
<mfiano> That's kind of what makes Lisp great; that it can map well to one's own mind very well with its flexibility.
<jeosol> The author is working on it as we speak, the README was updated 25 seconds ago. Given the post is fresh, I guess s/he is incorporating the feedback received
kevingal_ has joined #commonlisp
<rotateq> I like what I also tried to make clear to other people: You can fit the solution to your problem and don't have to fit the problem to your possibilities.
<rotateq> theothornhill: and not to forget you can have multiple accessors or initargs for a slot ;)
monaaraj has quit [Ping timeout: 240 seconds]
<mfiano> Sometimes I will even %-prefix an accessor in that case
monaaraj has joined #commonlisp
<rotateq> uiii
<mfiano> For example if I want the public API to be read only, but want the internal API to invoke all the generic function methods involved while mutating a place.
tyson2 has quit [Remote host closed the connection]
lisp123 has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
aartaka has quit [Ping timeout: 256 seconds]
gaqwas has joined #commonlisp
dra has joined #commonlisp
victor has quit [Quit: Connection closed for inactivity]
<rotateq> hey dra :) hope your lisp in assembly comes along well
<dra> Hey rotateq! It's slowly yet steadily growing. :)
<dra> But it's lightyears away from being Common Lisp.
dre has joined #commonlisp
<dre> Good morning everyone
<dra> Hi dre!
VincentV` has joined #commonlisp
<dre> :D
<rotateq> dra: so you can profit from the SICL modules some day too!
<dre> 2 quick questions: 1. how do you get the "docstrings" from functions, is it implementation specific? I can't find anything for SBCL.
VincentVega has quit [Ping timeout: 256 seconds]
<rotateq> maybe I can understand assembly some day a bit too. i restarted my MIX project now that i also have a better idea with using mixins
<dre> 2. if I have a .lisp file; can I wrap all of its contents into a "(do *file-contents*)" form to evaluate? I'm writing a vim plugin and can only send a single form to the swank server (afaik)
<rotateq> dre: hm with DOCUMENTATION ? :)
<dre> unless anyone here is an expert with swank
<rotateq> dre: you would use PROGN to wrap multiple forms into one
<dre> rotateq, perfect, sorry; I was confusing myself
<rotateq> I confuse myself all the time. :)
varjag has joined #commonlisp
<dre> (documentation foo) didn't seem to work tho :x
mht-wtf has joined #commonlisp
<rotateq> hm and what is FOO ?
<rotateq> which type of thing i mean
<dre> (defun foo () "Some func" (print "bar") ())
<rotateq> you can also use (SETF DOCUMENTATION) on things
<White_Flame> (documentation 'foo 'function)
<White_Flame> the 1st param can be a symbol, function, package, all sorts of things
<White_Flame> since there are different namespaces by which named things are implemented & documented
<dre> neat! thanks, that make sense
<dre> reminder to self: like always, read the docs
varjag has quit [Read error: Connection reset by peer]
_73 has joined #commonlisp
<White_Flame> however, it is often more useful to do (describe 'foo) or #'foo, as it can give a lot broader information when interactively figuring things out
varjag has joined #commonlisp
<dre> thanks, that's much easier
_73 has left #commonlisp [#commonlisp]
aartaka has joined #commonlisp
nature has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
rito_ has quit [Quit: Leaving]
<White_Flame> I'm finally making a bit more progress on Revivory, my Symbolics Ivory emulator written in CL
<rotateq> sounds good
<White_Flame> certainly have my face full of ASM stuff from a very different architecture
<rotateq> ah it has 40bit architecture
<White_Flame> I can compile the ivory functions into native CL functions, and execute them quite fast. But the hardware model has some unknown missing bits still, and it crashes ~250k instructions into bootup with a (emulated) memory fault :-P
<White_Flame> but at least I know what it is now, and can progress
<rotateq> :D
miique has joined #commonlisp
superduperuser has quit [Quit: Connection closed for inactivity]
<rotateq> I try to use as much CLOS for my MIX emulator as I can. (and what makes maybe sense)
<rotateq> I remember, my first approach in summer 2020 was just with structs and jeez no, just no. :D
bendersteed has joined #commonlisp
monaaraj has quit [Ping timeout: 256 seconds]
monaaraj has joined #commonlisp
kevingal_ has quit [Remote host closed the connection]
jstoddard has quit [Quit: away from internet for a bit]
<dre> https://github.com/Olical/conjure/pull/296 my common lisp client for vim conjure is just about up :D
gaqwas has quit [Remote host closed the connection]
BerntH has joined #commonlisp
BerntH has quit [Client Quit]
<phoe> nice! I see port 4005, does it use swank under the hood?
<dre> yep
<dre> unfortunately you have to start up swank in another terminal or something. I don't know how to make a simple script to load up swank
<phoe> even better!
akoana has joined #commonlisp
<dre> I tried to do something like `sbcl --eval "(ql:quickload :swank)...."` -- but it can't find swank that early.
<dre> I'll perhaps work on that another time
nature has quit [Ping timeout: 240 seconds]
rogersm has joined #commonlisp
gaqwas has joined #commonlisp
rogersm has quit [Client Quit]
bedouin_ has joined #commonlisp
dec0d3r has joined #commonlisp
dra has quit [Quit: Leaving]
lisp123 has joined #commonlisp
pve has quit [Quit: leaving]
rgherdt has quit [Ping timeout: 256 seconds]
lisp123 has quit [Ping timeout: 256 seconds]
gaqwas has quit [Remote host closed the connection]
Algernon69 has joined #commonlisp
Algernon91 has joined #commonlisp
Algernon69 has quit [Ping timeout: 250 seconds]
Oladon has quit [Quit: Leaving.]
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
azimut has joined #commonlisp
azimut_ has quit [Remote host closed the connection]
Algernon91 has quit [Read error: Connection reset by peer]
varjag has quit [Remote host closed the connection]
notzmv has quit [Read error: Connection reset by peer]
notzmv has joined #commonlisp
IPmonger has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 256 seconds]
<pjb> dre: perhaps: sbcl --eval '(load #P"~/quicklisp/setup.lisp")' --eval '(ql:quickload :swank)' --eval '(swank:create-server :interface "127.0.0.1" :port 4005)'
notzmv has quit [Ping timeout: 268 seconds]
monaaraj has quit [Ping timeout: 256 seconds]
monaaraj has joined #commonlisp
<rotateq> reminds me I wanted to try building sbcl with the linkable-runtime feature
monaaraj has quit [Ping timeout: 240 seconds]
monaaraj has joined #commonlisp
<dre> pjb, nice, thanks, that does work.
random-nick has quit [Ping timeout: 240 seconds]
scruple has joined #commonlisp
s-liao has joined #commonlisp