p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
sulami has quit [Ping timeout: 256 seconds]
<jcowan> Bike: In the R6RS standard it is possible to use macros before they are defined, except at the REPL (whose behavior R6RS does not specify). I argued against this (mis)feature in R7RS using a parable, "The Tale of Professor Simpleton and Dr. Hardcase" <https://www.mail-archive.com/r6rs-discuss@lists.r6rs.org/msg04199.html>
hsaziz has joined #lisp
EvW1 has joined #lisp
<Bike> what does using a macro before it's defined mean, exactly
hsaziz has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 240 seconds]
<bjorkintosh> wishful thinking! :-)
<_death> if macro forms are expanded just before they are evaluated, then it is possible to have them stored before macro definition (but not in CL)
<aeth> that sounds horrible
<aeth> (for AOT compilers)
<jcowan> (aeth: it's only possible within a library, the assumption being that you read in the whole library and process the syntax definitions before any variable definitions.)
<jcowan> But I think it's bad on human factors grounds
<jcowan> per the parable
<LdBeth> is there any optimizations for a quite large array with only small integers as elements?
<LdBeth> for example a (factorial 12) size array with only integers from 1 to 12 as elements?
<no-defun-allowed> Odds are the upgraded element type of (integer 1 12) would be (unsigned-byte 8)
* no-defun-allowed needs to check if INTEGER bounds are inclusive or exclusive
karlosz has joined #lisp
<_death> sbcl has (unsigned-byte 4) specialization
<no-defun-allowed> (Right, a number is an inclusive integer designator unless I wrap it in a list)
<LdBeth> It has to CCL specifically
<no-defun-allowed> Ah yeah.
<no-defun-allowed> In CCL: (upgraded-array-element-type '(integer 1 12)) ; ⇒ (UNSIGNED-BYTE 8)
<LdBeth> yup, a lot quicker
<no-defun-allowed> I...don't think many processors have instructions for manipulating 4-bit quantities, so it would probably only be better at saving memory.
zaquest has quit [Quit: Leaving]
<no-defun-allowed> ....which is reasonable because 12! is pretty big.
<LdBeth> Yes, I'm using it for a permutation quick lookup table
zaquest has joined #lisp
tiwEllien has quit [Ping timeout: 240 seconds]
sulami has joined #lisp
SGASAU` has quit [Remote host closed the connection]
SGASAU` has joined #lisp
Volt_ has quit [Quit: exit();]
sulami has quit [Ping timeout: 256 seconds]
EvW1 has quit [Read error: Connection reset by peer]
EvW has joined #lisp
KindOne has joined #lisp
bitmapper has quit [Ping timeout: 264 seconds]
Bourne has quit [Read error: Connection reset by peer]
iAmDecim has joined #lisp
Involuntary has quit [Quit: Leaving]
Jeanne-Kamikaze has joined #lisp
zmt01 has joined #lisp
zmt00 has quit [Ping timeout: 260 seconds]
EvW has quit [Ping timeout: 258 seconds]
amerigo has quit [Quit: Connection closed for inactivity]
<pjb> LdBeth: bit-vectors are vectors of bits (member 0 1).
<pjb> LdBeth: most implementations also have octet vectors. You can also assume fixnum vectors.
Josh_2 has quit [Ping timeout: 256 seconds]
Bike has quit [Quit: Lost terminal]
Bike has joined #lisp
<jcowan> there's a case to be made that 1 bit per byte is more performant if you can afford the space
<jcowan> Java does that for its vectors of booleans
sulami has joined #lisp
<pjb> It really depends on the operation. CL has a set of bit-* operations that work on whole bit-vectors. For those operations, packing bits in words is more efficient, both in space and time.
<pjb> The only operation that is slowed, is aref.
<pjb> I guess Java only has aref, and no bit-* operation…
sulami has quit [Ping timeout: 265 seconds]
<jcowan> Yes, I was taking about mutable bitvectors, not integers-as-bitstrings
<jcowan> But it's not true that aref is the only slow operation: for example "rotate (CL) byte" is not efficient at all with 1 bit per bit
<jcowan> or if you make it efficient, you have a good many edge cases to get right
<pjb> jcowan: yes, for integers, CL also has boole and the log- operations.
<pjb> Again, (rotatef (aref bv 0) (aref bv 1) (aref bv 2) (aref bv 3) (aref bv 4) (aref bv 5) (aref bv 6) (aref bv 7)) can be very efficient in CL (one read, one rotation of the octet, one store).
gko has joined #lisp
<jcowan> Those are the simple cases. Try using the constants 2, 3, 5, 7, 11, 13, 17, 19 instead
<jcowan> Or as I said rotating or reversing an arbitrary byte.
xlei has quit [Ping timeout: 256 seconds]
xlei has joined #lisp
<pjb> jcowan: as long as you use constant indices, it can be optimized at compilation-time.
ahungry has joined #lisp
akoana has joined #lisp
<aeth> The inability to declare something pure (beyond inlining and hoping) is probably one of the biggest weaknesses of CL optimizations. That is, you can have something effectively constant that's not seen as constant, unless you go out of your way to e.g. run it with #.
<aeth> (or put it in a macro, which is almost always superior to using #.)
<aeth> A pure FP subset of CL that compiles to CL should be able to beat idiomatic CL in performance in some cases.
<aeth> A related weakness is that you can have something literal like '(1 2 3 4) and you can see (e.g. with disassemble) the compiler have fun optimizing it within a function, but that's as far as it can go.
<aeth> (defun foo () (let ((l '(1 2 3 4))) (car l))) ; disassemble this in SBCL and you can see that it returns 2, i.e. 1 with the fixnum tag. and caddr will return 6, i.e. 3 with the fixnum tag.
ayuce has joined #lisp
<aeth> The compilation model is also a weakness here. The compiler can't substitute (foo) with 1 (except within the file, which it might do if not notinline!) because FOO can be redefined at any time.
<aeth> Finding a way to retore multi-file block compilation in SBCL could make a lot of this possible, but without a pure declaration, it would still be pretty easy to accidentally deoptimize your code.
<aeth> s/retore/restore/
cods has quit [Ping timeout: 268 seconds]
sulami has joined #lisp
mono has joined #lisp
monok has quit [Ping timeout: 256 seconds]
sulami has quit [Ping timeout: 265 seconds]
smasta has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Ping timeout: 256 seconds]
ukari has joined #lisp
smasta has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
h11 has quit [Quit: The Lounge - https://thelounge.chat]
ayuce has quit [Ping timeout: 256 seconds]
<beach> Good morning everyone!
sulami has joined #lisp
orivej has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
sulami has joined #lisp
sulami has quit [Ping timeout: 265 seconds]
Bike has quit [Quit: Lost terminal]
Involuntary has joined #lisp
dddddd has quit [Ping timeout: 265 seconds]
Jeanne-Kamikaze has quit [Ping timeout: 264 seconds]
Oladon1 has quit [Quit: Leaving.]
Sweedish has joined #lisp
Sweedish has quit [Client Quit]
quazimodo has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
Involuntary has quit [Quit: Leaving]
Jeanne-Kamikaze has joined #lisp
bjorkintosh has quit [Read error: Connection reset by peer]
bjorkintosh has joined #lisp
wxie has joined #lisp
<akoana> good morning beach!
<akoana> and good morning everyone!
libertyprime has joined #lisp
sulami has joined #lisp
iAmDecim has quit [Ping timeout: 264 seconds]
sulami has quit [Ping timeout: 264 seconds]
Involuntary has joined #lisp
Jeanne-Kamikaze has quit [Ping timeout: 265 seconds]
<beach> Hello akoana.
wxie has quit [Ping timeout: 256 seconds]
Necktwi_ is now known as Necktwi
Bourne has joined #lisp
Kundry_Wag has joined #lisp
Involuntary has quit [Quit: Leaving]
Jeanne-Kamikaze has joined #lisp
<LdBeth> pjb: thanks
<pjb> LdBeth: in any case, you can always specify a specific element-type for your arrays. Perhaps the current implementation doesn't optimize it, but the next one will!
<aeth> pjb: this has been discussed before and some of the element-types people might want (e.g. structs, if someone is used to C/C++/etc.) would be problematic to optimize
ahungry has quit [Remote host closed the connection]
v88m has quit [Remote host closed the connection]
<pjb> aeth: exactly. In the current implementations. But in the future it may be different. And it's a way to document the code.
iAmDecim has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Oladon has joined #lisp
Involuntary has joined #lisp
bjorkintosh has quit [Quit: Leaving]
Jeanne-Kamikaze has quit [Ping timeout: 258 seconds]
smasta has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
sulami has joined #lisp
sulami has quit [Ping timeout: 258 seconds]
zaquest has quit [Ping timeout: 256 seconds]
narimiran has joined #lisp
Involuntary has quit [Quit: Leaving]
Jeanne-Kamikaze has joined #lisp
manjaroi3 has joined #lisp
vhost- has joined #lisp
vhost- has quit [Changing host]
vhost- has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
theruran has joined #lisp
smasta has joined #lisp
gravicappa has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
smasta has quit [Ping timeout: 265 seconds]
Willi-Smith has joined #lisp
zymurgy has quit [Quit: WeeChat 1.4]
quazimodo has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Remote host closed the connection]
quazimodo has joined #lisp
Willi-Smith has left #lisp [#lisp]
Oladon has quit [Quit: Leaving.]
nmg has joined #lisp
Bourne has joined #lisp
zymurgy has joined #lisp
sulami has joined #lisp
sulami has quit [Ping timeout: 240 seconds]
_paul0 has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
paul0 has quit [Ping timeout: 246 seconds]
zaquest has joined #lisp
shifty has joined #lisp
emys has joined #lisp
shangul has joined #lisp
shka_ has joined #lisp
even4void has joined #lisp
emys has quit [Ping timeout: 246 seconds]
<phoe> morniiiing
emys has joined #lisp
<beach> Hello phoe.
sulami has joined #lisp
emys has quit [Ping timeout: 265 seconds]
<phoe> Hey beach
<phoe> I've hit the 50-page milestone on my "article" about the Common Lisp condition system. I guess it's time to start calling it a book instead.
even4void has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sulami has quit [Ping timeout: 264 seconds]
<beach> Sounds like it.
<beach> phoe: I am still very busy. Now I need to finish reading and assessing the document by Didier Verna, regarding his "habilitation".
<phoe> beach: no problem, yes.
<phoe> I'll keep on working on my thing for the time being. There's no rush reviewing it.
<beach> Thanks!
v88m has joined #lisp
<phoe> It is me who should be the thanking one.
<aeth> phoe: when you do have a book, you should put it on one of those sites that does low-volume publishing so people can buy it
jonatack__ has joined #lisp
pve has joined #lisp
<phoe> aeth: leanpub, yes.
jonatack_ has quit [Ping timeout: 256 seconds]
Codaraxis__ has quit [Ping timeout: 240 seconds]
asarch has joined #lisp
Codaraxis__ has joined #lisp
smasta has joined #lisp
slyrus_ has joined #lisp
smasta has quit [Ping timeout: 256 seconds]
slyrus has quit [Ping timeout: 258 seconds]
sulami has joined #lisp
emys has joined #lisp
ukari has quit [Remote host closed the connection]
emys has quit [Ping timeout: 240 seconds]
ebrasca has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
ebrasca has quit [Remote host closed the connection]
revtintin has joined #lisp
sulami has joined #lisp
emys has joined #lisp
ATuin has joined #lisp
<ATuin> hi
<no-defun-allowed> Hello ATuin
<ATuin> i'm gettin a strange behaviour with ASDF and stumpwm
<ATuin> and im quite new to both (also to lisp)
<jackdaniel> please describe your problem
<ATuin> ok, i will try
<ATuin> i install it using guix
<jackdaniel> fwiw there is also #stumpwm channel
<ATuin> seems that sbcl was updated at some point to 2.0.3 (dunno if that's the problem or now though)
<ATuin> yeah i was there, but no clue about the problem
<ATuin> ok i have a link to the binary
<ATuin> DISPLAY=:1 /home/atuin/.guix-profile/bin/stumpwm
<ATuin> running that i can get my stumpwm working (loading slynk usign ASDF)
<ATuin> DISPLAY=:1 $(readlink /home/atuin/.guix-profile/bin/stumpwm)
<ATuin> running that it takes like 1-2 minutes to start
<ATuin> it's stuck when loading a module
<ATuin> (asdf:load-system :mem) for instance
<ATuin> then ASDF loads itself (asdf:load-system :asdf) and that takes like 1 or 2 minutes
<ATuin> looks like a problem with the paths right? since the binary is the same (one the symlink and the other dereferencing)
<jackdaniel> yes, and that would be probably a packaging issue (i.e guix fault)
<ATuin> yep, i think the same, but i want to understand the root of the problem so i can fix it
<ATuin> at which point is using the relative paths, is it ASDF or stumpwm
<ATuin> since sbcl works fine using symlinks
emys has quit [Ping timeout: 256 seconds]
<jackdaniel> maybe asdf can't find .cache/common-lisp
<ATuin> ahh
revtintin has quit [Ping timeout: 264 seconds]
<jackdaniel> or sbcl cant figure its contrib directory?
<ATuin> i think sbcl works fine
<ATuin> i tried both ways of running it and no issues when loading systems
<ATuin> but the .cache/common-lisp could make sense
<ATuin> i tried to use (trace) but it does not provide enough info to see exactly what's taking the cpu so busy
* jackdaniel leaves to celebrate the easter, good luck!
<ATuin> thanks, and have fun :)
SGASAU` has quit [Remote host closed the connection]
SGASAU` has joined #lisp
iAmDecim has joined #lisp
asarch has quit [Quit: Leaving]
revtintin has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
sulami has quit [Ping timeout: 256 seconds]
stepnem has quit [Ping timeout: 265 seconds]
stepnem has joined #lisp
Necktwi has quit [Read error: Connection reset by peer]
revtintin has quit [Ping timeout: 256 seconds]
Necktwi has joined #lisp
tiwEllien has joined #lisp
v88m has quit [Ping timeout: 240 seconds]
z147 has joined #lisp
emys has joined #lisp
even4void has joined #lisp
amerigo has joined #lisp
sulami has joined #lisp
revtintin has joined #lisp
even4void has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smasta has joined #lisp
<phoe> the syntax inconsistencies between HANDLER-BIND and HANDLER-CASE and between RESTART-BIND and RESTART-CASE are kinda gross now that I think about them
<phoe> RESTART-BIND accepts :TEST-FUNCTION while RESTART-CASE accepts :TEST
sulami has quit [Ping timeout: 265 seconds]
<phoe> HANDLER-BIND has a &body that accepts forms to be execused while HANDLER-CASE has a &body that accepts handler definitions
<phoe> ewwwwww
<shka_> well, side effect of design by the committee
emys has quit [Ping timeout: 256 seconds]
<no-defun-allowed> The committee did care for aesthetics; there's a section for it in every issue writeup.
parjanya has quit [Ping timeout: 265 seconds]
<shka_> yes, but it is very likely that weirdness like above is the result of the backward compatibility requirements
ukari has joined #lisp
<no-defun-allowed> Maybe. Not so much a "committee" problem as a "don't break things" problem then.
smasta has quit [Ping timeout: 265 seconds]
ym has joined #lisp
dddddd has joined #lisp
<Shinmera> phoe: I've never used restart-bind
emys has joined #lisp
<phoe> Shinmera: I have, and it's fancy
<phoe> except not actually for restarts that restart actual processes
karlosz has quit [Quit: karlosz]
emys has quit [Ping timeout: 264 seconds]
<jackdaniel> phoe: bind is a let specie
<jackdaniel> case is a specie of well, case
<jackdaniel> so semantically these oprators are ok when we take their names
revtintin has quit [Ping timeout: 256 seconds]
<phoe> jackdaniel: I'm aware
<phoe> the disparity is more visible in the restart zone
emys has joined #lisp
<phoe> restart-bind's :test-function accepts #'foo, but restart-case's :test does not accept #'foo
<phoe> if I didn't know how CL came to be it would cause me to go "wtf"
<phoe> and even though I know, the urge to do so is strong in me
revtintin has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
dale has quit [Quit: My computer has gone to sleep]
ukari has quit [Ping timeout: 260 seconds]
ym has quit [Quit: Leaving]
emys has quit [Ping timeout: 250 seconds]
SGASAU` has quit [Remote host closed the connection]
revtintin has quit [Ping timeout: 256 seconds]
SGASAU` has joined #lisp
sulami has joined #lisp
random-nick has joined #lisp
emys has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
z147 has quit [Ping timeout: 240 seconds]
hhdave has joined #lisp
sulami has joined #lisp
emys has quit [Ping timeout: 265 seconds]
revtintin has joined #lisp
sulami has quit [Ping timeout: 264 seconds]
emys has joined #lisp
SGASAU` has quit [Ping timeout: 265 seconds]
sulami has joined #lisp
jonatack__ has quit [Ping timeout: 265 seconds]
jonatack__ has joined #lisp
wheelsucker has quit [Read error: Connection reset by peer]
sulami has quit [Ping timeout: 250 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
<phoe> also HANDLER-CASE has :NO-ERROR and RESTART-CASE does not
<phoe> another eww
emys has quit [Ping timeout: 246 seconds]
bendersteed has quit [Remote host closed the connection]
sulami has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 250 seconds]
__jrjsmrtn__ has joined #lisp
smasta has joined #lisp
smasta has quit [Ping timeout: 250 seconds]
emys has joined #lisp
Inline has joined #lisp
SGASAU has joined #lisp
v88m has joined #lisp
hhdave has quit [Quit: hhdave]
narimiran has quit [Ping timeout: 256 seconds]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
v88m has quit [Ping timeout: 240 seconds]
<phoe> I remember someone mentioning a macro named HANDLER-CASE* which worked exactly like HANDLER-CASE, except the cases were executed before unwinding the stack. Is anyone aware of any existing permissively-licensed implementation of it?
<phoe> Grepping the c.l.l archives of 1986-2017 did not give me any hits.
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
emys has quit [Ping timeout: 265 seconds]
SGASAU has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 256 seconds]
theruran has quit [Quit: Connection closed for inactivity]
SGASAU has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
smasta has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
<phoe> Hmm. I think I'll grab handler-case from CMU CL and modify it.
smasta has quit [Ping timeout: 264 seconds]
<jackdaniel> I've shared this macro
<jackdaniel> basically handler-bind in a block + no-error handling
<jackdaniel> (shared on this channel)
<phoe> jackdaniel: oh! let me grep the channel logs
<phoe> hmm, one hit from 2018
emys has joined #lisp
compmstr has joined #lisp
tsrt^ has quit []
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
sulami has joined #lisp
iAmDecim has joined #lisp
sulami has quit [Remote host closed the connection]
sulami has joined #lisp
emys has quit [Ping timeout: 265 seconds]
revtintin has quit [Ping timeout: 264 seconds]
<eta> why does SBCL use so much dynamic space memory just after it's started?
<eta> loading it and running (ROOM) results in 50,077,648 bytes for 1,311,232 dynamic objects (space total)
<p_l> eta: speed vs code size is in play
<eta> p_l, how so?
narimiran has joined #lisp
<_death> it includes the runtime, the compiler, docstrings, caches, libraries, docstrings, etc.
<p_l> CMUCL (and thus SBCL, which derives from it) compiler is famous for generating fast code. However, the same rules that help it generate fast code mean that it takes more space, due to inlining et al
<eta> oh wait, dynamic space includes code?
<p_l> then you have the part where it has to include all the doctstrings etc.
<p_l> yes
<eta> what's immobile space for then?
<p_l> eta: immobile space is the stuff that is, for various reason, "pinned" in memory location
<p_l> eta: btw, the optimization features? They also take space in terms of compiler code, so you get more space used by compiler, too :)
<eta> p_l, fair enough; thanks for the explanation! :)
<p_l> eta: IIRC, try (room t) and it should show you some statistics on object types
<p_l> though I think SBCL didn't show much detail there
* eta thinks a heap size of around 90M for their app is more than reasonable
<p_l> eta: remember to account for virtual memory, too
smasta has joined #lisp
<eta> > SB-C::COMPILED-DEBUG-FUN 2,399,872 bytes, 37,498 objects.
<eta> aha
<p_l> the GC algorithms work better if you have large address space + budget for ~2x the amount of memory used at any particular time (it's a quick approximation, not hard rule)
<eta> eh, I'll take a memory hit for the ability to remote-debug my app any day :P
<p_l> eta: compared to some code today, SBCL feels positively small ;)
<eta> indeed!
* p_l remembers when people used to complain about VCL's size when compiling binaries with Delphi :/
iAmDecim has quit [Ping timeout: 258 seconds]
revtintin has joined #lisp
<phoe> nowadays people run whole virtualized OSes to run their tiny apps; compared to this, SBCL footprint feels smol
hhdave has joined #lisp
emys has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
emys has quit [Ping timeout: 265 seconds]
jonatack__ has quit [Quit: jonatack__]
jonatack has joined #lisp
<jcowan> I am trying to solve a problem with involving the CL integer representation of bit sequences, and I can't see how to do it
<jcowan> Given a list of bit positions, (i j k ...) the representation as an integer is 2^i + 2^j + 2^k + ...; that seems clear.
<jcowan> Now I have a value n that means "all bits from n to infinity are set", which requires a negative number in the integer representation, i.e. -1 = 0 to infinity, -2 = 1 to infinity, -4 = 2 to infinity, etc.
<jcowan> How can I combine these such that I get the integer representation of (i j k n (+ n 1) (+ n 2) ...)? Every time I try to reason it out, I get more confused.
emys has joined #lisp
<beach> Is it the case that i < j < k < n?
Steinberg2010 has joined #lisp
<jcowan> We can assume that n > the rest wlg, though the order of i, j, k shouldn't matter, addition being commutative and all.
<Posterdati> jcowan: you can have a class with a bit array of n bits to store the < n bits positions
<jcowan> I want to represent them as an integer, since almost all cases will fit into a fixnum.
<beach> jcowan: Do you want to know how to obtain it in Common Lisp, or do you want some mathematical expression for it?
<jcowan> Either.
ggole has joined #lisp
<beach> In Common Lisp, you can use LOGIOR and LOGNOT, so if you know how to do n, n+1, n+2, ... then you can OR it with the one for i j k.
<jcowan> Just so
<beach> And if you don't know how to do n, n+1, ..., then you can AND it with -1 and the representation for 1, 2, ... n-1.
<Posterdati> what about over n positions bits?
<beach> Posterdati: What about them?
emys has quit [Ping timeout: 265 seconds]
<Posterdati> is it a bit mask?
<beach> It is an integer.
<jcowan> the expression for n+ is evidently 2^n - 1 !
iAmDecim has joined #lisp
<jcowan> whoa, much easier than I thought
<beach> Good.
<jcowan> thanks for being the proverbial teddy bear
<beach> Pleasure.
<Posterdati> so not an infinite bit mask
<jcowan> ("explain your problem to the teddy bear: only if that doesn't work can you talk to a human being")
<beach> Posterdati: A Common Lisp integer is an infinite bit mask.
<Xach> (dpb 0 (byte n 0) -1)
<Posterdati> beach: limited to the machine memory...
<jcowan> .. with either a finite number of 1s or a finite number of 0s
KDr24 has joined #lisp
<beach> Posterdati: No, -1 is an infinite mask with all 1s in it. No need for infinite memory.
hhdave has quit [Quit: hhdave]
<beach> Posterdati: And 0 is an infinite mask with all 0s in it. No need for infinite memory.
KDr23 has quit [Ping timeout: 256 seconds]
<phoe> you don't need infinite memory to represent an infinite mask
<phoe> CL does the trick of "hey, these are the bits that actually matter, and lets pretend that all the infinite bits that come later are zero" or "are one"
<jcowan> Yes, which means (for instance) that you cannot have a bit representation of "all the prime numbers"
<phoe> that is how all integers in CL are actually treated, unless you are explicitly use modular arithetic
iAmDecim has quit [Ping timeout: 265 seconds]
<beach> Posterdati: Try (logbitp (expt 2 100) -1)
revtintin has quit [Ping timeout: 256 seconds]
emys has joined #lisp
iAmDecim has joined #lisp
<beach> Posterdati: Then figure out how big a memory you need for (expt 2 100) bits.
tiwEllien has quit [Remote host closed the connection]
Steinberg2010 has quit [Ping timeout: 265 seconds]
srji has joined #lisp
tiwEllien has joined #lisp
emys has quit [Ping timeout: 265 seconds]
EvW1 has joined #lisp
<beach> Posterdati: Did that make sense to you?
revtintin has joined #lisp
emys has joined #lisp
lemoinem is now known as Guest290
lemoinem has joined #lisp
Guest290 has quit [Ping timeout: 258 seconds]
<Posterdati> I asked about the problem not about CL integers :)
emys has quit [Ping timeout: 258 seconds]
revtintin has quit [Ping timeout: 258 seconds]
efm has quit [Ping timeout: 260 seconds]
<beach> Fine.
<beach> That should teach me to try to explain something.
revtintin has joined #lisp
arduo has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
vhost- has quit [Ping timeout: 250 seconds]
emys has joined #lisp
<phoe> CLHS COMPUTE-RESTARTS says:
<phoe> > When condition is non-nil, only those restarts are considered that are either explicitly associated with that condition, or not associated with any condition; (...) If condition is nil, all restarts are considered.
<phoe> What should (restart-bind ((foo (lambda () 42) :test-function (constantly nil))) (print (find-restart 'foo)) nil) print?
<phoe> Or rather
<phoe> What should (restart-bind ((foo (lambda () 42) :test-function (constantly nil))) (print (compute-restarts)) nil) print? Will the printed list contain restart FOO?
<phoe> Or did I mix restart tests and association between restarts and condition objects?
<phoe> I think I did.
<phoe> This stuff is so wonderfully complex...
<Posterdati> beach: I asked about the problem, not CL, sorry :)
<splittist> phoe: I'm waiting for the book... (:
<phoe> splittist: so am I
<phoe> it's 60 A4 pages right now
<phoe> ...and still growing
<beach> <Posterdati> beach: limited to the machine memory...
<phoe> splittist: the offer is still there if you want to review the WIP
bitmapper has joined #lisp
Bike has joined #lisp
<Posterdati> beach: this is written in the specs about integers
smasta has joined #lisp
<Bike> phoe: well, i learned something today. i didn't think the tests factored in if no condition was provided to compute-restarts, but based on the glossary entry "applicable restarts" and 9.1.4.2.3, the tests are just called with NIL
emys has quit [Ping timeout: 258 seconds]
<Bike> so you can have a restart that's never applicable if a specific condition is given. i wonder if that could ever be good for anything. doesn't seem like it.
<Bike> also, i tried your example but thought "why bother with the print" and got an unhandled memory fault and it took me a sec to understand why
sulami has quit [Ping timeout: 240 seconds]
<phoe> Bike: I laughed at that last part
<phoe> also, yes - you can have a restart that is never applicable if a specific condition is given, that is the whole point
<phoe> from what I've read, it is only the case when you are dealing with a nested debugger and have therefore multiple conditions being handled in the dynamic scope
<Bike> but when a debugger computes restarts it probably passes the condition.
<phoe> if you try to handle error A and this results in signaling error B, you probably don't want to see A-related restarts in your debugger
<phoe> yes
<phoe> that's what I have inferred
<phoe> so when it computes restarts for condition B, it passes condition B there
<phoe> so, if any restarts are associated with A, they are not visible in (compute-restarts B)
smasta has quit [Ping timeout: 256 seconds]
<Bike> you can add to your inference the hearsay that i have written a debugger and that is what it does
<phoe> at least that is what I understood
<phoe> yay!
<phoe> still, I learn new and new things
<Bike> yes, you're correct. But this is about not passing a condition at all.
<phoe> the most important one: the test function and association are *separate* and accounted for separately
<phoe> therefore the restart can be associated with the proper condition, but its test function may still return NIL
<phoe> and boom, that restart is invisible
<phoe> if no condition is passed, then the test function needs to deal with that fact
<phoe> ...and it may still return NIL, for instance, when (= 0 (random 2))
<Bike> the association is also dynamic, so in two different dynamic extents calling compute-restarts with the same condition can give you different answers.
<phoe> yes, that's correct
<Bike> and yes, i understand how this no-condition test works, i'm just failing to think of a practical scenario in which you'd ever want to do this.
sulami has joined #lisp
<phoe> you can rebind dynamic variables between two invocations of (compute-restarts condition) and the test function for the restarts can take the current values of these dynavars into account
<phoe> Bike: I have found a use case for that - some restarts are only available if the dynamic environment permits them at the moment
<phoe> like, you don't want to call restart USE-FOO-INSTEAD if the dynamic variable *FOO* that houses the FOO that you are supposed to use is bound to NIL
<phoe> you don't want that restart to even be visible
<Bike> that's fine but i don't see how that's what i'm talking about
<phoe> oh! what are you talking about then?
<phoe> I misunderstood the no-condition test then
byronkatz has joined #lisp
<Bike> i'm talking about distinguishing (compute-restarts) from (compute-restarts condition) in such a way that the restart test would specifically want to know that the former and not the latter was done
<Bike> for example, given my debugger, you could make a restart that was never visible to the debugger
<Bike> with a test of (lambda (c) (not c))
<Bike> or well, just #'not i suppose
<phoe> this is useful if you have restarts that don't perform a NLToC
<phoe> you usually never want to have them visible in the debugger, since they don't get you out of it
<Bike> okay, well, question two, why would you want restarts that don't perform an NLToC. i have never seen restart-bind in actual code
<phoe> that's what I'm fixing in my book right now~
emys has joined #lisp
<Bike> by next week you'll have figured out how to use restarts to implement delimited continuations
<beach> Posterdati: Thank you for confirming that I need to work on my teaching skills.
<phoe> Bike: call/cc via restarts in two weeks, I promise
revtintin has quit [Ping timeout: 256 seconds]
<Posterdati> beach: wasn't my intention, you were right about numbers, but I asked about the specific problem :)
<Bike> https://github.com/clasp-developers/clasp/blob/dev/src/lisp/kernel/lsp/top.lsp#L1054 htere's where clasp's debugger computes restarts, for reference
<phoe> also posting this here so I have something to search for later: an implementation of handler-case* https://plaster.tymoon.eu/view/1740#1740
<phoe> seems not buggy from the little I've tested it
<phoe> Bike: yes, I see
<Bike> you don't need the return-from in the handler-bind, do you?
lavaflow has quit [Ping timeout: 264 seconds]
<phoe> which line?
<Bike> 34
<beach> Posterdati: No, you didn't ask, but you objected to an integer being an infinite bit mask, claiming that it is limited to available memory, and I showed with an example that you can check a bit way outside available memory, but since my explanation did not seem to make sense to you, it is clear that my teaching skills need improving.
<phoe> Bike: yes, seems to - let me edit
<Bike> i mean, it's hrmless, just making sure i udnerstand
<phoe> Bike: this is modified CMU CL code, so it's possible it's a bit dirty in other places
<phoe> I was unable to find jackdaniel's code so I decided to grab CMUCL's handler-case and smash it with a rock until it looked (hopefully) nice and clean enough to the eye
dorketch has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
ayuce has joined #lisp
emys has quit [Ping timeout: 264 seconds]
<Posterdati> beach: Common Lisp provides a true integer type, called bignum, limited only by the total memory available (not the machine word size).
<phoe> Posterdati: this is orthogonal to what beach was talking about
<Posterdati> beach: I was referring to that
<beach> I give up.
<phoe> you are talking about the important bits while beach was talking about the non-important bits
<Posterdati> phoe: no one stated against it
<Posterdati> phoe: ok!
<phoe> I think beach is well aware that the important bits are only limited by the memory that can store them
<phoe> but the *trailing* bits aren't bounded like that
<Posterdati> phoe: ok ok I understand now!
<phoe> we can always say "let's pretend there's an infinite number of zeroes after these defined bits" and that is exactly what CL does almost everywhere
<Posterdati> phoe: I didn't understand about > n bits positions
<phoe> these N bits in this case are the significant bits, and these need to fit in memory, yes.
<phoe> all the other ones, we can just pretend they fit. (;
<Posterdati> beach: you cannot be a good teacher without patience :)
<Posterdati> phoe: he stated from n to ininity which is not the case, we can hope that he can store a finite number of bits about position n...
<phoe> Posterdati: actually, yes, from n to infinity
<phoe> if your integer has N significant bits, then bits N+1, N+2, N+3, N+4, ..., N+inf are all the same
<Posterdati> that's was my point... I didn't realize that beach was talking about the 0 to n-1 bits :)
<phoe> and these are the bits that we pretend we know about
amerigo has quit [Quit: Connection closed for inactivity]
<Posterdati> phoe: now it is easy to reppresent those kind of numbers!
<Posterdati> phoe: you can even extend bit-array
<beach> *sigh*
<phoe> extending bit arrays is very, very implementation dependent
<phoe> which means that usually you cannot do it
emys has joined #lisp
<Posterdati> phoe: I mean you can write a new class
<Posterdati> not properly extend bit-array
<phoe> but that class won't be a subclass of INTEGER or BIT-ARRAY
Josh_2 has joined #lisp
<phoe> and will also likely be slow
<Posterdati> phoe: that's true
emys has quit [Ping timeout: 256 seconds]
jayspeer has joined #lisp
Oladon has joined #lisp
jayspeer has quit [Client Quit]
jayspeer has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
smasta has joined #lisp
sulami has joined #lisp
byronkatz has quit [Quit: Going offline, see ya! (www.adiirc.com)]
ATuin has quit [Ping timeout: 256 seconds]
smasta has quit [Ping timeout: 250 seconds]
EvW1 has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
Steinberg2010 has joined #lisp
smasta has joined #lisp
akoana has left #lisp ["Leaving"]
lavaflow has joined #lisp
v88m has joined #lisp
Steinberg2010 has quit [Ping timeout: 260 seconds]
emys has joined #lisp
vms14 has joined #lisp
nmg has quit [Remote host closed the connection]
v88m has quit [Ping timeout: 258 seconds]
<Xach> hmm, rfc3339-timestamp and rpc4cl have disappeared from gitlab.
* Xach emails author
vms14 has quit [Remote host closed the connection]
libertyprime has quit [Read error: No route to host]
<Xach> Wow, that was quick. The author says he has abandoned them due to lack of interest from users and himself.
<phoe> Xach: does he have old versions? he could reupload them somewhere and wait for a maintainer.
<Xach> I have old versions, but if the author has abandoned them due to lack of interest, I don't think it is good to ask them to do more work with them.
iAmDecim has quit [Ping timeout: 264 seconds]
<phoe> ooh - even better
jayspeer has quit [Remote host closed the connection]
<phoe> *we* could reupload them somewhere and wait for a maintainer
jayspeer has joined #lisp
<phoe> how many Quicklisp projects are affected by the disappearance?
<Xach> I will remove them from Quicklisp, and if anyone notices and cares, I will put them on sharplispers.
<Xach> Two - rfc3339-timestamp and rpc4cl.
<phoe> oh! no one depends on them?
<Xach> Nope.
<phoe> in that case removing them from QL sounds like a decent idea
<Xach> Not in quicklisp, anyway. there's no easy way to tell if others use them.
<phoe> we'll find that one out
byronkatz has joined #lisp
<Xach> I keep a cached checkout of all vcs projects for building Quicklisp dists, so sometimes a project can disappear from its host for a long time before I notice
<Xach> I'm going to be more systematic about fetching from the primary source every so often to detect problems with missing or moved projects.
arduo has quit [Ping timeout: 264 seconds]
emys has quit [Ping timeout: 260 seconds]
Oladon has quit [Quit: Leaving.]
sulami has quit [Remote host closed the connection]
sulami has joined #lisp
smasta has quit [Ping timeout: 260 seconds]
iAmDecim has joined #lisp
sulami has quit [Ping timeout: 240 seconds]
iAmDecim has quit [Ping timeout: 265 seconds]
gabiruh has quit [Quit: ZNC 1.7.5 - https://znc.in]
gabiruh has joined #lisp
byronkatz has quit [Quit: Going offline, see ya! (www.adiirc.com)]
rippa has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` has joined #lisp
vangogh has joined #lisp
X-Scale` is now known as X-Scale
vangogh has quit [Quit: Leaving]
gko has quit [Ping timeout: 258 seconds]
akoana has joined #lisp
jayspeer has quit [Ping timeout: 258 seconds]
sulami has joined #lisp
smasta has joined #lisp
<jcowan> aeth: You asked about alists vs. plists: see http://funcall.blogspot.com/2013/07/alist-or-plist.html by Joe Marshall
sulami has quit [Ping timeout: 250 seconds]
Oladon has joined #lisp
iAmDecim has joined #lisp
<jcowan> Actually, bignums may not be limited solely by memory: that was written before machine memories grew so big
smasta has quit [Ping timeout: 264 seconds]
choegusung has joined #lisp
choegusung has quit [Client Quit]
loli has joined #lisp
<jcowan> libgmp allows a maximum of 2^2^39, because the number of 64-bit limbs is bounded by a 32-bit signed value.
ebrasca has joined #lisp
apertus has joined #lisp
apertus has left #lisp [#lisp]
Kundry_Wag has quit [Ping timeout: 265 seconds]
Jeanne-Kamikaze has joined #lisp
v88m has joined #lisp
cosimone has joined #lisp
v88m has quit [Ping timeout: 260 seconds]
Jesin has quit [Quit: Leaving]
<eta> aha, a classic
akoana has left #lisp ["Leaving"]
Kundry_Wag has joined #lisp
Jesin has joined #lisp
guest1 has joined #lisp
Involuntary has joined #lisp
sulami has joined #lisp
narimiran has quit [Quit: leaving]
smasta has joined #lisp
Jeanne-Kamikaze has quit [Ping timeout: 250 seconds]
even4void has joined #lisp
even4void has quit [Client Quit]
sulami has quit [Ping timeout: 265 seconds]
smasta has quit [Ping timeout: 256 seconds]
manjaroi3 has quit [Quit: leaving]
ebrasca has quit [Remote host closed the connection]
Jeanne-Kamikaze has joined #lisp
Involuntary has quit [Ping timeout: 265 seconds]
shangul has quit [Ping timeout: 240 seconds]
ATuin has joined #lisp
guest1 has quit [Ping timeout: 265 seconds]
amerigo has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
iAmDecim has joined #lisp
sulami has joined #lisp
smasta has joined #lisp
EvW has joined #lisp
sulami has quit [Ping timeout: 264 seconds]
Involuntary has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
EvW has quit [Remote host closed the connection]
EvW2 has joined #lisp
Jeanne-Kamikaze has quit [Ping timeout: 256 seconds]
karlosz has joined #lisp
<LdBeth> well, 12 years age
<phoe> I bet we can go bigger nowadays
vhost- has joined #lisp
vhost- has joined #lisp
ATuin has quit [Ping timeout: 260 seconds]
astronavt has joined #lisp
v88m has joined #lisp
jonatack has quit [Ping timeout: 240 seconds]
jonatack has joined #lisp
sulami has joined #lisp
ATuin has joined #lisp
smasta has joined #lisp
easieste has joined #lisp
sulami has quit [Ping timeout: 256 seconds]
easieste has quit [Remote host closed the connection]
smasta has quit [Ping timeout: 258 seconds]
Kundry_Wag has quit [Remote host closed the connection]
EvW2 has quit [Remote host closed the connection]
EvW has joined #lisp
slyrus_ has quit [Remote host closed the connection]
slyrus_ has joined #lisp
<aeth> jcowan: interesting trick about priority, I didn't know that
<aeth> (defun foo (&key foo) foo) (foo :foo 42 :foo 43) => 42
<Bike> yeah, that's useful for APPLYing stuff.
<aeth> right, (let ((l (list :foo 43))) (apply #'foo (list* :foo 42 l)))
arduo has joined #lisp
<aeth> well, the article used something like `(:foo 42 ,@args)
shka_ has quit [Ping timeout: 264 seconds]
<phoe> that's equivalent
<aeth> yes
emys has joined #lisp
efm has joined #lisp
smasta has joined #lisp
vhost- has quit [Ping timeout: 256 seconds]
emys has quit [Ping timeout: 258 seconds]
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
wyan has joined #lisp
efm has quit [Read error: Connection reset by peer]
smasta has quit [Ping timeout: 250 seconds]
efm has joined #lisp
Kundry_Wag has joined #lisp
sulami has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
sulami has quit [Ping timeout: 265 seconds]
iAmDecim has quit [Ping timeout: 250 seconds]
Oladon has quit [Quit: Leaving.]
emys has joined #lisp
asarch has joined #lisp
shifty has quit [Ping timeout: 264 seconds]
Codaraxis__ has quit [Remote host closed the connection]
emys has quit [Ping timeout: 256 seconds]
cosimone has quit [Quit: Quit.]
emys has joined #lisp
pve has quit [Quit: leaving]
z147 has joined #lisp
emys has quit [Ping timeout: 256 seconds]
emys has joined #lisp
iAmDecim has joined #lisp
torbo has joined #lisp
gravicappa has quit [Ping timeout: 265 seconds]
iAmDecim has quit [Ping timeout: 240 seconds]
emys has quit [Ping timeout: 258 seconds]
picopala has joined #lisp
ATuin has quit [Ping timeout: 264 seconds]
iAmDecim has joined #lisp
sulami has joined #lisp
ggole has quit [Quit: Leaving]
sulami has quit [Ping timeout: 250 seconds]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
SGASAU` has joined #lisp
z147 has quit [Quit: z147]
Kundry_Wag has joined #lisp
<phoe> when I work with slime-company, I get a string like "-f------" that tells me that a given symbol is bound in the function namespace
<phoe> where is that code part defined? I can't see it in slime-company itself
Lord_of_Life_ has joined #lisp
SGASAU has quit [Ping timeout: 256 seconds]
SenasOzys has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
orivej has quit [Ping timeout: 265 seconds]
picopala has quit [Ping timeout: 240 seconds]
<phoe> found it, swank::symbol-classification-string
orivej has joined #lisp
hhdave has joined #lisp
Involuntary has quit [Quit: Leaving]
Jeanne-Kamikaze has joined #lisp
dale has joined #lisp
emys has joined #lisp
emys has quit [Ping timeout: 265 seconds]
emys has joined #lisp
SenasOzys has quit [Quit: Leaving]
Oladon has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
sulami has joined #lisp
emys has quit [Ping timeout: 265 seconds]
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Organize your IRC]
<conjunctive> Hi, what's the best method for function aliasing? The following gives Quicklisp warnings: (setf (fdefinition '@) #'fset:lookup)
<phoe> conjunctive: quicklisp warnings?
<conjunctive> (ql:quickload :zip :verbose t) => ... ;; caught STYLE-WARNING: undefined function: ZIP::@
<conjunctive> There's a warning for every use of the aliased function
<phoe> try instead doing (eval-when (:compile-toplevel :load-toplevel :execute) (setf (fdefinition '@) #'fset:lookup))
<phoe> that should fix the warning
sulami has quit [Ping timeout: 256 seconds]
z147 has joined #lisp
<conjunctive> Thank you, phoe!
<phoe> <3
<phoe> basically, you need the fdefinition to be available at compile time
<phoe> this eval-when makes it available there.
<phoe> otherwise, compile-time warnings happen, because the compiler has no idea that things will even out at runtime.
<phoe> also, these are not Quicklisp warnings - they are ASDF warnings, or rather, warnings that result from file-compiling your code.
X-Scale has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
random-nick has quit [Ping timeout: 256 seconds]
emys has joined #lisp
arduo has quit [Ping timeout: 256 seconds]
<Xach> conjunctive: is zip the name of your project?
emys has quit [Ping timeout: 256 seconds]
<White_Flame> conjunctive: I use define-symbol-macro for punning a function name globally
emys has joined #lisp
<White_Flame> it doesn't monkey around much with such early time dependencies
<Xach> White_Flame: how?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<White_Flame> oh, I just looked at my uses, and those were funcalled things
<Inline> all of a sudden i have generic functions defined in an earlier package with arguments depending on another package which comes later in the packages.list file not being able to find applicable method therein
<Inline> wth
sulami has joined #lisp
sulami has quit [Ping timeout: 240 seconds]
emys has quit [Ping timeout: 250 seconds]
hhdave has quit [Quit: hhdave]
iAmDecim has joined #lisp
wyan has quit []
iAmDecim has quit [Ping timeout: 265 seconds]
dale has quit [Quit: dale]
dale has joined #lisp
manjaroi3 has joined #lisp
hiroaki has quit [Ping timeout: 265 seconds]
z147 has quit [Ping timeout: 240 seconds]
karlosz has quit [Read error: No route to host]
karlosz has joined #lisp
sulami has joined #lisp