jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
dale has quit [Quit: dale]
makomo has quit [Ping timeout: 252 seconds]
siraben has quit [Ping timeout: 252 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
Copenhagen_Bram has quit [Read error: Connection reset by peer]
r1b has joined #lisp
orivej has joined #lisp
mingus has quit [Ping timeout: 252 seconds]
razzy has quit [Ping timeout: 252 seconds]
sjl has quit [Read error: Connection reset by peer]
Copenhagen_Bram has joined #lisp
cydork has joined #lisp
robotoad has quit [Quit: robotoad]
elderK has joined #lisp
slyrus2 has joined #lisp
slyrus1 is now known as slyrus
slyrus has quit [Ping timeout: 252 seconds]
slyrus2 is now known as slyrus1
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Copenhagen_Bram has quit [Read error: Connection reset by peer]
Copenhagen_Bram has joined #lisp
robotoad has joined #lisp
nydel has joined #lisp
skidd0 has joined #lisp
robotoad has quit [Quit: robotoad]
<skidd0> I'm struggling to figure out why a class object created with make-instance has all its slots unbound
<Petit_Dejeuner> Did you provide values in the constructor or do they have some kind of default value in the defclass?
<ober> did you create an accessor? or a default?
<skidd0> I provided values when i constructed it
<skidd0> the class has accessors
<Petit_Dejeuner> Do you have :initarg for each slot?
<Petit_Dejeuner> (defclass bank-account () ((customer-name :initarg :customer-name)
<skidd0> yes
<skidd0> and those init-args are used in the make-instance
<Petit_Dejeuner> Did you redefine the class after making the instance?
<skidd0> i did not
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
<Petit_Dejeuner> Does (slot-value object 'slot-name) not work?
<skidd0> that's what set of the unbound issue
<skidd0> I tried to format the slot's value
<skidd0> but it is unbound in the object
<Petit_Dejeuner> Can you give me the relevant slot form of the defclass and the snippet where you try to access to slot-name?
<Petit_Dejeuner> the*
<skidd0> sure one moment
robotoad has joined #lisp
<ober> xb
parjanya has quit [Remote host closed the connection]
parjanya has joined #lisp
<skidd0> https://bin.0x00sec.org/?6a63eff8f6d0cf8d#x7OSAPS09fK+2L0p/tywF0lDNO7MaQHHd25TX9TdDxU=
<|3b|> :initarg ?
<skidd0> I'm using Postmodern for SQL management
<skidd0> oh
<skidd0> oh my
<skidd0> I am so silly
<skidd0> and that's why pair programming is pushed so hard in my software engineering class
<|3b|> :)
<skidd0> I'm to hyphen-happy
* |3b| is surprised it didn't complain
<skidd0> me too
<|3b|> maybe metaclass confuses it
<skidd0> was just thinking about that
<skidd0> does init-form need a hyphen?
<|3b|> clhs defclass
<skidd0> thanks
* |3b| points at something definitive rather than relying on my brain which will get confused by reasonable seeming options :)
<|3b|> ouch, mostly definitive :/ (has it as :init-form in the description of the argument to :initform)
<|3b|> :initform with no - is the correct one
<skidd0> oh that is odd
<skidd0> now my method works
<skidd0> thank you, Petit_Dejeuner, Ober, and |3b| (and specbot)
troydm has quit [Ping timeout: 252 seconds]
skidd0 has quit [Quit: WeeChat 2.2]
troydm has joined #lisp
joast has quit [Remote host closed the connection]
robotoad has quit [Quit: robotoad]
DGASAU has quit [Read error: Connection reset by peer]
joast has joined #lisp
DGASAU has joined #lisp
shifty has joined #lisp
fiddlerwoaroof has quit [Read error: Connection reset by peer]
fiddlerwoaroof has joined #lisp
rocx has joined #lisp
chipolux has quit [Quit: chipolux]
Roy_Fokker has quit [Read error: Connection reset by peer]
<rocx> stupid question: is there a better way to make `random' actually be random across executions besides constantly making a new random-state as an argument for random?
marusich has joined #lisp
chipolux has joined #lisp
patche has joined #lisp
patche has quit [Client Quit]
DecimPrime has joined #lisp
<Bike> seeding it each time won't make it any more "actually random" really
<Bike> there's only so much entropy
<rocx> so it basically works best on a persistent program rather than a compiled program to get consistently random number?
robotoad has joined #lisp
<Bike> what behavior do you actually want
<Bike> usually a pseudorandom sequence is fine
<rocx> say, when running the program, first thing it does is generate some string (in a hypothetical and structured way). it needs to be random every time the program is run.
<Bike> just seed it once at startup then
<Bike> assuming you mean it should be distinct between runs
<rocx> yes. as in (setf *random-state* (make-random-state t)) ?
<Bike> yeah should be fine
<rocx> hm. odd. swore i did that and it didn't work as intended.
moei has quit [Quit: Leaving...]
jkordani has quit [Read error: Connection reset by peer]
dddddd has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
anewuser has quit [Ping timeout: 268 seconds]
skeuomorf has joined #lisp
jackdaniel has quit [Ping timeout: 252 seconds]
dented42 has joined #lisp
r1b has quit [Ping timeout: 245 seconds]
adlai has quit [Ping timeout: 272 seconds]
adlai has joined #lisp
pierpal has joined #lisp
Copenhagen_Bram has quit [Read error: Connection reset by peer]
Copenhagen_Bram has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
<beach> Good morning everyone!
<no-defun-allowed> Morning beach
jackdaniel has joined #lisp
nowhere_man has joined #lisp
Copenhagen_Bram has quit [Read error: Connection reset by peer]
moei has joined #lisp
steiner has joined #lisp
Copenhagen_Bram has joined #lisp
Bike has quit [Quit: Lost terminal]
vlatkoB has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
<LdBeth> Midnight
shifty has quit [Ping timeout: 252 seconds]
shrdlu68 has joined #lisp
shifty has joined #lisp
_whitelogger has joined #lisp
myrmidon has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
<no-defun-allowed> hi shrdlu68
<shrdlu68> no-defun-allowed: Hello
<shrdlu68> Is there a way to tell my implementation (sbcl, in this case), to do (* x y) like MUL x y? x and y being, say 64-bit values.
<no-defun-allowed> pop a (declare (fixnum x y)) in your function and it should get closer
<no-defun-allowed> clhs declare
<no-defun-allowed> clhs declaration type
<no-defun-allowed> basically if you have some kind of body with lexical binds you can tell CL systems that they are some type and that they should optimize for it
myrmidon has quit [Ping timeout: 252 seconds]
myrmidon has joined #lisp
<shrdlu68> My goal is to get a 64-bit value by multiplying two 64-bit numbers, just as one would in C. I'm not sure type declaration will help.
<no-defun-allowed> oh good point
<no-defun-allowed> as well, (declare (optimize (safety 0))) tends to stop overflow checking
doubledup has joined #lisp
doubledup has quit [Max SendQ exceeded]
doubledup has joined #lisp
<no-defun-allowed> [this seems to work](https://pastebin.com/AvCbV1na)
<shrdlu68> Nice!
<no-defun-allowed> i wouldn't expect it to be portable for obvious reasons
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
<aeth> shrdlu68: 64-bit values work as long as they're not boxed
<aeth> shrdlu68: they're not boxed as long as they don't leave the function
<aeth> shrdlu68: ways you can do that are (1) inline function, (2) use a macro, (3) mutate a specialized array (i.e. :element-type) or a struct with a slot with a :type, (4) coerce it into a value that's not boxed (e.g. coercing a double-float to a single-float as the return value)
<aeth> otherwise, you get generic arithmetic functions that will box
zxcvz has joined #lisp
<aeth> note that #3 is the most implementation specific and #1 might not always work if the compiler isn't very smart.
pierpal has quit [Read error: Connection reset by peer]
<aeth> shrdlu68: as for wrapping around, in SBCL, you can do that with mod
<aeth> shrdlu68: e.g. (defun foo (a) (declare ((simple-array (unsigned-byte 64) (1)) a)) (setf (aref a 0) (mod (* (aref a 0) 42) (expt 2 64))) a)
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
pierpal has joined #lisp
<aeth> (For something that trivial you'd probably want to go with an inline function, though. The inline function itself will have the unoptimized disassembly, but the caller function will be optimized.)
pierpal has quit [Read error: Connection reset by peer]
scymtym has joined #lisp
pierpal has joined #lisp
angavrilov has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
ravndal has quit [Quit: WeeChat 2.2]
pierpal has joined #lisp
ravndal has joined #lisp
razzy has joined #lisp
shka_ has quit [Remote host closed the connection]
DecimPrime has quit [Ping timeout: 252 seconds]
shka_ has joined #lisp
<shrdlu68> What I'm trying to do is this: https://programmingpraxis.com/2018/06/19/fibonacci-hash/
<shrdlu68> I'm not sure whether SBCL already implements it.
<aeth> (defun foo (a) (declare ((simple-array (unsigned-byte 64) (1)) a)) (setf (aref a 0) (mod (ash (mod (* (aref a 0) 11400714819323198485) (expt 2 64)) 54) (expt 2 64))) a) (foo (make-array 1 :element-type '(unsigned-byte 64) :initial-element 42))
<aeth> Alternatively, (declaim (inline bar)) (defun bar (x) (declare ((unsigned-byte 64) x)) (mod (ash (mod (* x 11400714819323198485) (expt 2 64)) 54) (expt 2 64)))
<aeth> The second version will allocate the final result as a bignum, but inlining can remove the allocation depending on the details of the calling function
<aeth> s/will allocate/might allocate/
<shrdlu68> But you end up doing both mod and multiplication.
<aeth> I don't see a DIV in the disassembly
<aeth> I also don't see the LEA followed by an AND that mod by a power of 2 (optimized specially) normally gives
froggey has quit [Ping timeout: 240 seconds]
<aeth> It's more than that, though. Doing the multiplication on an ub64 and then the mod would make it a bignum and then do the generic mod on the bignum. It would be very noticable.
pierpal has quit [Read error: Connection reset by peer]
froggey has joined #lisp
sauvin_ has joined #lisp
pierpal has joined #lisp
ggole has joined #lisp
<aeth> hmm... actually, modifying it to get variations that aren't optimized produces weird results
Sauvin has quit [Ping timeout: 260 seconds]
siraben has joined #lisp
johnjay has quit [Ping timeout: 256 seconds]
pierpal has quit [Read error: Connection reset by peer]
makomo has joined #lisp
shrdlu68 has left #lisp ["brb"]
doubledup has quit [Quit: Leaving]
doubledup has joined #lisp
trittweiler has joined #lisp
doubledup has quit [Quit: Leaving]
doubledup has joined #lisp
shifty has joined #lisp
robotoad has quit [Quit: robotoad]
pierpal has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dented42 has joined #lisp
doubledup has quit [Quit: Leaving]
dented42 has quit [Ping timeout: 244 seconds]
doubledup has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
micro has quit [Remote host closed the connection]
random-nick has joined #lisp
makomo has quit [Ping timeout: 244 seconds]
shrdlu68 has joined #lisp
dented42 has joined #lisp
makomo has joined #lisp
sauvin_ is now known as Sauvin
shka_ has quit [Ping timeout: 252 seconds]
shka_ has joined #lisp
beach has quit [Ping timeout: 252 seconds]
beach has joined #lisp
varjag has joined #lisp
anewuser has joined #lisp
orivej has joined #lisp
dented42 has quit [Ping timeout: 272 seconds]
krkini has quit [Quit: No Ping reply in 180 seconds.]
kini has joined #lisp
SenasOzys has joined #lisp
dddddd has joined #lisp
kini has quit [Client Quit]
kini has joined #lisp
dented42 has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
Lycurgus has joined #lisp
Josh_2 has joined #lisp
vlatkoB_ has joined #lisp
vlatkoB has quit [Ping timeout: 252 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
<no-defun-allowed> Woohoo, I think it's burnout time.
Bike has joined #lisp
kajo has joined #lisp
<beach> no-defun-allowed: Are you working too hard?
<shrdlu68> What does (space 3) really do? Is it "don't sacrifice speed for space"?
<shrdlu68> I mean (space 0)
<shka_> shrdlu68: not much :-)
<shka_> in sbcl, it makes function more likely to be inlined
<shka_> other then that, i don't know
<Bike> it means "space [usage] is extremely important". implementations can decide what that means variously
<phoe> space 0 means "don't care for space in the slightest"
<phoe> space 3 means "the resulting code is meant to be as small as possible"
<Bike> space means "both code size and run-time space" according to the standard
<Bike> i mean
<Bike> they're 'all kinda vague
<phoe> in particular (optimize (speed 3) (space 0) (debug 0) (safety 0) (compilation-speed 0)) means "sacrifice everything for speed"
<phoe> that's the setting everyone is the most interested in for some weird reason
<shka_> *weird reason* :P
<shrdlu68> (compilation-speed)? Why would that produce faster code?
<Bike> compilation-speed 0 is telling the compiler to take its time
<Bike> so it can maybe do more optimizations
<shrdlu68> Oh.
<shrdlu68> What's the default?
<Bike> implementation-defind, i think
froggey has quit [Ping timeout: 252 seconds]
scymtym has joined #lisp
froggey has joined #lisp
skeuomorf has quit [Ping timeout: 252 seconds]
cydork has quit [Quit: WeeChat 2.2]
mkolenda has quit [Remote host closed the connection]
mkolenda has joined #lisp
<phoe> compilation-speed 0 is SBCL, compilation-speed 3 is CCL
<phoe> /s
warweasle has joined #lisp
<shka_> sbcl compilation-speed is acceptable
<phoe> I know, I'm just being silly
<Shinmera> And it's improved a lot recently thanks to Stas
<phoe> Yep - especially regarding Ironclad that was famous for taking way too long to compile
<phoe> There were fixes both in Ironclad and in SBCL to improve that situation, and the SBCL fixes actually helped all of SBCL compilation speeds
<scymtym> yeah, we heavily optimized the register allocator more or less specifically for ironclad. dougk, stas and myself worked on it
<beach> What is special about Ironclad?
<Bike> huge functions that do a lot of arithmetic
<scymtym> it uses macros to generate large functions
<beach> I see.
<Bike> it's pretty slow to compile even in general
<scymtym> and i suspect large chunks of straight-line code and thus large basic blocks or something like that in addition to just large in general
<russellw> a function can return two values using VALUES. but is it considered okay to return two values on one path and one value on another? Or is it required or recommended that if a function ever returns two values, it should always do so?
<Bike> i find it confusing, but it's allowed
<Bike> i usually just manually write out the implied NILs
<shka_> russellw: returning fixed number of values is a better idea
SenasOzys has quit [Read error: Connection reset by peer]
<Bike> might also be easier to optimize if the number of values is fixed.
SaganMan has quit [Quit: WeeChat 1.6]
<russellw> so not required, but recommended? olay, thanks!
jsjolen has joined #lisp
dented42 has quit [Ping timeout: 252 seconds]
Essadon has joined #lisp
jsjolen has quit [Remote host closed the connection]
jsjolen has joined #lisp
hellosaw has joined #lisp
jsjolen has quit [Remote host closed the connection]
jsjolen has joined #lisp
Lycurgus has quit [Quit: Exeunt]
shrdlu68 has quit [Quit: WeeChat 2.0.1]
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
<jsjolen> I'm debugging some code running in SBCL. At some point there's a type mismatch from a DECLARE, does anyone know if it's possible to receive more info about what DECLARE it's from (like what variable it pertains to)?
angavrilov has quit [Remote host closed the connection]
<Bike> what message are you getting?
<jsjolen> The value 3 is not of type (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*))
<jsjolen> And the call-stack doesn't reveal a lot (a single call to a fast-method)
<Bike> you can get more info by throwing a (declare (optimize debug)) in there somwhere. if you paste what you're seeing i might be able to untangle it, too
<jsjolen> I did do a SB-EXT:restrict-compiler-policy before doing an ASDF:compile-system (and I'm fairly certain that the system does not do that itself)
<jsjolen> Alright, I manually commented out all of the declares, now I get that it's a call to LENGTH at least.
<jsjolen> Aha, I got it.
<beach> I just love those error messages. They are so ... unhelpful.
dented42 has joined #lisp
<_death> (defun helpfulify (error-message) (string-append error-message "; and by the way, your shoe laces are untied."))
<jsjolen> _death: Jokes on you, I'm wearing sandals with socks
flazh has quit [Ping timeout: 268 seconds]
<_death> but that means your shoe's laces are likely untied indeed
<Shinmera> beach: What would be more helpful to say about a type mismatch?
<jsjolen> Only if you use classic logic
<_death> jsjolen: well, aside from vacuous truth.. it may be that it's the shoe not worn ;)
steiner has quit [Remote host closed the connection]
<jsjolen> _death: Good point
Roy_Fokker has joined #lisp
flazh has joined #lisp
<jsjolen> There are 2 CL implementations of HMMs on Github. One is large, well-featured and fast but I can't get it to work and the other one doesn't implement learning. I might give up on making the first one work and write my own, but that'd just be: https://xkcd.com/927/
<Josh_2> jsjolen: nah that would just be the lisp way, apparently we like to reinvent the wheel *hmm*
<Shinmera> My wheel's better than yours
<shka_> Shinmera: actually your wheels are pretty good
<Shinmera> Thanks
<shka_> ;-)
<Shinmera> Working on lockless wheels recently
<Shinmera> so, new wheels on quicklisp soon
<jsjolen> Josh_2: Yeah, only issue is that implementing the algorithms is really boring haha. Hey, I've got them in Java, maybe I should just use ABCL? inb4 now I've got 2 problems
<shka_> you made something like trivial-atomics recently?
<Shinmera> No
<Shinmera> Not gonna try either, all I need is CAS on svref and slot accessors.
<shka_> ok
igemnace has joined #lisp
_whitelogger has joined #lisp
dented42 has quit [Ping timeout: 245 seconds]
flazh has quit [Read error: Connection reset by peer]
flazh has joined #lisp
<beach> Shinmera: The argument <name> was supposed to contain a <type> but it contains a <type> instead.
emma_ has joined #lisp
<hellosaw> hi, do any of you know how to connect to multiple mysql databases using mito?
slyrus2 has joined #lisp
dented42 has joined #lisp
elderK has quit [Quit: Connection closed for inactivity]
<Josh_2> hellosaw: did you look at https://github.com/fukamachi/mito/#connecting-to-db maybe you can fiddle with the value of *connection* idk
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
angavrilov has joined #lisp
Iolo has joined #lisp
slyrus2 has quit [Ping timeout: 260 seconds]
<hellosaw> thanks Josh_2
shka_ has quit [Quit: Konversation terminated!]
shka_ has joined #lisp
DecimPrime has joined #lisp
myrmidon has quit [Quit: myrmidon]
hellosaw has quit [Quit: Page closed]
ckonstanski has quit [Remote host closed the connection]
Oladon has joined #lisp
SaganMan has joined #lisp
dented42 has quit [Ping timeout: 244 seconds]
micro has joined #lisp
mejja has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
grumble has quit [Quit: If we're putting dbus in the linux kernel, I want a java rmi registry there too.]
iAmDecim has joined #lisp
iAmDecim has quit [Client Quit]
DecimPrime has quit [Ping timeout: 260 seconds]
grumble has joined #lisp
maarhart has joined #lisp
maarhart has quit [Remote host closed the connection]
r1b has joined #lisp
doubledup has quit [Quit: Leaving]
knicklux has joined #lisp
dented42 has joined #lisp
sabrac has joined #lisp
SenasOzys has joined #lisp
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
knicklux has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 252 seconds]
knicklux has joined #lisp
warweasle has joined #lisp
smaster has joined #lisp
r1b has quit [Quit: r1b]
bendersteed has joined #lisp
dented42 has quit [Ping timeout: 252 seconds]
knicklux has quit [Remote host closed the connection]
bendersteed has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
Khisanth has quit [Ping timeout: 250 seconds]
knicklux has joined #lisp
scymtym has joined #lisp
bendersteed has joined #lisp
thinkpad has quit [Ping timeout: 244 seconds]
Khisanth has joined #lisp
knicklux has quit [Quit: Leaving]
knicklux has joined #lisp
shka_ has quit [Quit: Konversation terminated!]
meepdeew has joined #lisp
thinkpad has joined #lisp
<phoe> I think I might actually publish my code for classes named after lists somewhere.
<phoe> It might be good to have it published somewhere as an example of how to ab^H^Huse the MOP.
shka_ has joined #lisp
knicklux has quit [Quit: Leaving]
knicklux has joined #lisp
<otwieracz> You should rather use ^W instead.
shka_ has quit [Ping timeout: 252 seconds]
<otwieracz> ^H is terribly inefficient.
<on_ion> computationally expensive ascii codes
graphene has quit [Remote host closed the connection]
shka_ has joined #lisp
Oladon has quit [Quit: Leaving.]
jack_rabbit has joined #lisp
warweasle is now known as warweasle_afk
mejja has quit [Quit: mejja]
mhd2018 has joined #lisp
robotoad has joined #lisp
dented42 has joined #lisp
bacterio has joined #lisp
<aeth> If you want to be really inefficient...^UIf you want to be really inefficient, use C-u
megeve has joined #lisp
stereosphere has joined #lisp
<jackdaniel> http://i.imgur.com/lmMnN4H.png - multiline with font leading :)
<|3b|> always nice when text looks better than the lines :)
<jackdaniel> haha
<jackdaniel> yeah
Iolo has left #lisp ["Konversation terminated!"]
ggole has quit [Quit: ggole]
knicklux has quit [Remote host closed the connection]
r1b has joined #lisp
bendersteed has quit [Quit: bye]
zxcvz has quit [Quit: Leaving]
vlatkoB_ has quit [Remote host closed the connection]
megeve has left #lisp [#lisp]
vlatkoB has joined #lisp
anewuser has quit [Quit: anewuser]
dented42 has quit [Ping timeout: 252 seconds]
kajo has joined #lisp
serichsen has joined #lisp
<serichsen> good evening
doubledup has joined #lisp
buffergn0me has quit [Remote host closed the connection]
thinkpad has quit [Ping timeout: 268 seconds]
thinkpad has joined #lisp
vlatkoB has quit [Remote host closed the connection]
buffergn0me has joined #lisp
<phoe> heyy
robotoad has quit [Quit: robotoad]
robotoad has joined #lisp
<shka_> what's going on?
bacterio has quit [Quit: bacterio]
jcowan has joined #lisp
<jcowan> It seems that value the expression (eql #c(2.0 1.0) #c(2.0 1)) is implementation-dependent. Is this the result of bugs or an allowed divergence?
<Bike> "Two complex numbers are considered to be eql if their real parts are eql and their imaginary parts are eql"
Lycurgus has joined #lisp
<Bike> so i think no?
<|3b|> what does (type-of #c(2.0 1)) say?
<jcowan> The CLHS (under EQL) says: "[EQL returns true] If x and y are both numbers of the same type and the same value."
<jcowan> And the definition of #c says that it does floating-point contagion.
<|3b|> spec also says that r and i parts are either both real or both rational
<jcowan> Bike's sentence comes from CLtLv2 6.3, so presumably is overridden by the ANS.
<|3b|> so if there is an implementation extension for float+rational, they aren't EQL. if there isn't, they should both be float/float and probably same type so eql
<Bike> it's from the notes
<trittweiler> it's right in the Notes section of the clhs. The examples also specifically list this case. I find it pretty clear?
<Bike> notes and examples aren't normative though, i guess
<Shinmera> Hoorah for clisp
<|3b|> yeah, i think clisp is the one with the float/rational extension
<jcowan> So #c(2.0 1) should be of type (complex single-float) just like #c(2.0 1.0)
<|3b|> Shinmera: what is the type-of #c(2.0 1) for all?
<jcowan> There has been dispute in the Scheme community about whether examples are normative
<|3b|> jcowan: that's what the spec says, but clisp extends the spec
<Bike> jcowan: CLHS explicitly says notes and examples aren't part of the standard.
<jcowan> clisp reports all complex numbers as simply type COMPLEX
<jcowan> or I should say, clisp's type-of does
<Shinmera> ( by the way, https://github.com/shinmera/cl-all )
<|3b|> (but they don't support inf/nan, because that would encourage unportable code or something :p)
<|3b|> from clisp docs: "Complex numbers can have a real part and an imaginary part of different types. "
<jcowan> sbcl's reports (COMPLEX (SINGLE-FLOAT 2.0 1.0))
<Bike> deep.
<|3b|> while clhs says "The real part and imaginary part are either both rational or both of the same float type. "
<jcowan> |3b|: yes, not supporting +inf, -inf, nan, and -0.0 is stupid nowadays
serichsen has quit [Ping timeout: 252 seconds]
<jcowan> So clisp is out of spec here
<jcowan> (because #C(2.0 1) and #c(2.0 1.0) are not eql)
<Bike> are you running with clisp's ansi conformance flag?
<jcowan> no
<Bike> cos i just remembered it totally has such a thing
<trittweiler> So this isn't about EQL at all but about #c and COMPLEX. I.e. an example where the definition of EQL kicks in would be: (eql (complex 1 0.5f0) (complex 1 0.5d0)) must be NIL
<jcowan> But the -ansi flag doesn't help, eql still returns NIL
<trittweiler> assuming single-float and double-float are distinct types. Can't remember if that's mandated by the standard
<jcowan> No, it isn't.
<jcowan> Only pairwise consistency is mandated
<Bike> what if you mess with custom:*floating-point-contagion-ansi*
<jcowan> Didn't know about that one
<Bike> and floating-point-rational-contagion-ansi because so many flags
<jcowan> the custom: flag doesn't change it either
themsay has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
kajo has joined #lisp
dddddd has joined #lisp
kajo has quit [Client Quit]
kajo has joined #lisp
<jcowan> trittweiler: https://bitbucket.org/cowan/r7rs-wg1-infra/src/default/FloatPrecision.md is mostly about Schemes, but also tells what various CLs do with the four float types
<jcowan> in short, Lispworks has 19-bit shorts but is otherwise normal, and clisp has 17-bit shorts and arbitrary precision longs.
r1b has quit [Quit: r1b]
<trittweiler> That document doesn't seem to mention the assumed architecture (x86-64), perhaps that would be a useful addendum?
<fe[nl]ix> trittweiler: IEEE floats should behave the same across architectures
<trittweiler> Might also want to include a note about Emacs lisp which is quite a popular Lisp. That doesn't have a concept of different floats to begin with so it's sort of out of place but may still be worth a note given its pop
dented42 has joined #lisp
<jcowan> trittweiler: Good idea
smaster has quit [Ping timeout: 252 seconds]
orivej has quit [Quit: orivej]
<|3b|> fe[nl]ix: immediate short floats might depend on pointer size though
jcowan has quit [Quit: This computer has gone to sleep]
orivej has joined #lisp
<aeth> you could try typep
<aeth> (for clisp)
shka_ has quit [Ping timeout: 252 seconds]
<aeth> (typep (complex 1f0 1f0) '(complex single-float)) => T
<aeth> Shinmera: Good library. I might need to use it.
warweasle_afk has quit [Quit: rcirc on GNU Emacs 24.4.1]
knicklux has joined #lisp
<aeth> mfiano: https://github.com/Shinmera/float-features has a with-float-traps-masked which can replace the SBCL-only without-fp-traps in cl-sdl2 https://github.com/lispgames/cl-sdl2/blob/a963ea57c7d43761f28314f0642fcae18fb51174/src/sdl2.lisp#L131-L136
rozenglass has joined #lisp
Lycurgus has quit [Quit: Exeunt]
angavrilov has quit [Remote host closed the connection]
knicklux has quit [Ping timeout: 246 seconds]
skeuomorf has joined #lisp
<Petit_Dejeuner> Is there an equivalent to *nix access(2) in Common Lisp? I couldn't find anything in UIOP or the file I/O chapter in PCL. Is there some third party library I should be using?
Josh_2 has quit [Read error: Connection reset by peer]
dented42 has quit [Ping timeout: 264 seconds]
<Petit_Dejeuner> I guess I'll try Osicat for now.
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
marusich has quit [Ping timeout: 240 seconds]
kajo has joined #lisp
kajo has quit [Client Quit]
<LdBeth> it about file permission
<fe[nl]ix> Petit_Dejeuner: don't use it
<Petit_Dejeuner> fe[nl]ix: Anything better?
<fe[nl]ix> attempt to do whatever you're planning to do with the file and handle the errors
knicklux has joined #lisp
<Petit_Dejeuner> ...yeah, you're right.
<Petit_Dejeuner> Thanks.
* Petit_Dejeuner deletes 20 loc and a dependency
zxcvz has joined #lisp
robotoad has quit [Max SendQ exceeded]
robotoad has joined #lisp
groovy2shoes has quit [Read error: Connection reset by peer]
Elon_Satoshi has joined #lisp
emaczen has quit [Ping timeout: 260 seconds]
Copenhagen_Bram has quit [Ping timeout: 260 seconds]
<Petit_Dejeuner> clhs read-line
doubledup has quit [Quit: Leaving]
Lycurgus has joined #lisp
Lycurgus has quit [Client Quit]
dented42 has joined #lisp
mkolenda has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
mkolenda has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
random-nick has quit [Ping timeout: 246 seconds]
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
SenasOzys has quit [Ping timeout: 246 seconds]
ryan_vw has joined #lisp
meepdeew has quit [Remote host closed the connection]
Josh_2 has joined #lisp
<no-defun-allowed> beach: I'm not very sure.
<no-defun-allowed> It's that or I've hit a mental block in my work.
dented42 has quit [Ping timeout: 260 seconds]
ryan_vw has quit [Quit: WeeChat 2.2]
ryan_vw has joined #lisp
mkolenda has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
mkolenda has joined #lisp
Essadon has quit [Quit: Qutting]
Elon_Satoshi has quit [Ping timeout: 260 seconds]
Copenhagen_Bram has joined #lisp
nyingen_ has joined #lisp
dented42 has joined #lisp
<nyingen_> I have a situation where a lib I installed via quicklisp is not working and needs to be patched. I can see where QL installed it
<on_ion> ~/quicklisp/ ?
<nyingen_> If I modify that code, how do I make sure the lisp system compiles and uses that new version
<|3b|> just loading it again probably will do that
<Bike> quicklisp won't download a system again unless it's updated.
<nyingen_> To be clear, my project depends on library A which depends on library B, and B is the one that needs the patch
<|3b|> right, ASDF handles loading for QL, and recompiles when files are modified
<nyingen_> ok
<nyingen_> so (ql:quickload "library-a") would do it?
<|3b|> probably better to put a temporary copy in ~/quicklisp/local-projects/ and modify that though
<|3b|> right, or load your project if it has proper dependencies
dented42 has quit [Ping timeout: 246 seconds]
<nyingen_> right, I didn't use quickproject this time because I thought it would be a small one-off
<nyingen_> So to put the local copy in ~/quicklisp/local-projects, I just use 'cp' as normal? Or do I need to tell QL to do it somehow?
<nyingen_> I know almost nothing about QL so feel free to point me to the relevant docs if these are simple questions :)
<|3b|> cp or a git checkout or whatever (in case it is fixed already upstream)
<nyingen_> ah, I should check that
<nyingen_> QL doesn't pull from git, it has its own repo, right?
<nyingen_> and once I have it in local-projects/ do I need to do something special to make QL use that one?
<|3b|> right, it gets current code (for some project-dependent definition of current) every month, and that's what you get all month
Pixel_Outlaw has joined #lisp
<|3b|> possibly (ql:register-local-projects) after making the copy if it doesn't see it immediately, but ql loads things from local-projects before the things it downloads
<|3b|> 'current' might mean 'git head', or 'release tarball', or specific branch from git or whatever
<nyingen_> I see
<nyingen_> The lib I need to patch hasn't been updated in some years by the looks of it
<|3b|> what lib?
<on_ion> |3b|: that is what i do, but a symbolic link in ~/ql/l-p
<nyingen_> |3b|: this would be 'chillax', a lib for communicating with CouchDB
<|3b|> ah
<|3b|> author of that stopped using CL i think :(
<nyingen_> Ah that's too bad
<on_ion> no one stays in the temple forever =)
<on_ion> except those whom teach others
<on_ion> The Way
<nyingen_> |3b|: well thanks for the tips. I'll give this a whirl later, and if it all works out I guess I'll fork the chillax lib since it sounds like it's probably unmaintained
<nyingen_> in case anyone else is interested in it. it's a simple lib but I like the API
warweasle has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]