cosimone has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
Oladon has quit [Quit: Leaving.]
zacts has joined #commonlisp
cosimone has joined #commonlisp
s-liao has quit [Ping timeout: 250 seconds]
zacts has quit [Quit: Ping timeout (120 seconds)]
cosimone has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
cosimone has joined #commonlisp
yauhsien has quit [Ping timeout: 256 seconds]
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
molson has quit [Remote host closed the connection]
Guest74 has joined #commonlisp
notzmv has joined #commonlisp
Inline__ has joined #commonlisp
notzmv has quit [Ping timeout: 250 seconds]
molson has joined #commonlisp
Inline has quit [Ping timeout: 240 seconds]
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
molson has quit [Remote host closed the connection]
occ has joined #commonlisp
molson has joined #commonlisp
razetime has joined #commonlisp
<pfd>
Is anyone with a copy of _The AI Workbench, Babylon..._ by Christaller, Thomas and co-authors, 1992 Academic Press willing to accept payment to create a PDF of it, or sell it to me?
igemnace has quit [Remote host closed the connection]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
<beach>
Good morning everyone!
Spawns_Carpeting has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
waleee has quit [Ping timeout: 240 seconds]
Spawns_Carpeting has joined #commonlisp
semz_ has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
semz has quit [Ping timeout: 248 seconds]
occ has quit [Ping timeout: 246 seconds]
occ has joined #commonlisp
occ has quit [Ping timeout: 248 seconds]
occ has joined #commonlisp
zeroc00l0 has joined #commonlisp
occ has quit [Ping timeout: 246 seconds]
yauhsien has joined #commonlisp
occ has joined #commonlisp
pranavats has joined #commonlisp
<livoreno>
Morning beach
zacque has joined #commonlisp
hashfuncf9 has joined #commonlisp
zeroc00l0 has quit [Ping timeout: 250 seconds]
<hashfuncf9>
i'm having a hard time gaining an intiution on how to use MOD when implementing an equation that relies on MOD. is the general rule to always use MOD when the form contains a term that corresponds to a number in the finite field being worked on? is this question making sense?
<White_Flame>
if you're dealing with powers of 2, LOGAND would seem to make more sense
<White_Flame>
or LDB of the lowest bits
<mfiano>
Hello everyone!
kpoeck has quit [Quit: Client closed]
<mfiano>
How should I test for equality of two pathnames an an implementation-independent manner? CLHS is confusing here for me, as EQUAL is implementation dependent, and EQUALP doesn't make mention of anything but the precedence being the same as EQUAL. Additionally, EQUALP specifies that it does not descend into the components of a pathname (implicitly, as it's not listed in what are descended on)
<White_Flame>
if the pathname exists, maybe call TRUENAME on it first?
<mfiano>
There is no guarantee that it exists at the time I need to check.
<mfiano>
My only thought is one of the namestring functions. They are implementation-dependent representations, but EQUALP testable nonetheless.
yauhsien has quit [Remote host closed the connection]
<Bike>
hashfuncf9: are you asking about performance or correctness?
yauhsien has joined #commonlisp
<hashfuncf9>
Bike: for performance i assume that they all compile to the same thing (please correct me if i'm wrong). but i'm mainly concerned with correctness
<Bike>
basic arithmetic like this (i.e. addition, subtraction, multiplication) is largely compatible with mod, in the sense that no matter when you decide to mod you'll get the same answer
<Bike>
they don't compile to the same thing. if they did they'd have similar performance
<Bike>
the fourth one will eventually give you the same result, but in the meantime it's going to cons up huge bignums, thus the slowdown
yauhsien has quit [Ping timeout: 240 seconds]
occ has quit [Ping timeout: 256 seconds]
<zacque>
Hi, can I compare two floats with `=`?
<Bike>
more explicitly, for any polynomial P, if A = B mod M, P(A) = P(B) mod M. or in lisp terms, (mod (poly B) M) = (mod (poly (mod B M)) M)
<Bike>
zacque: sure, but watch out for accumulated error
<hashfuncf9>
Bike: ok, i understand that they will all give me the same answer. i guess i'll pivot my question. so is the key to _correctly_ using mod, is to use MOD if consing huge bignums might be a possibility?
occ has joined #commonlisp
<zacque>
Bike: There will be no accumulated error for my use case, so I'll go with `=`. Thanks!
<Bike>
no, it's _correct_ whether you use mod up front or just at the end. keeping intermediates low with mod is key to _efficiency_, though.
<Bike>
by "correct" i just mean "will get you the correct answer"
<hashfuncf9>
Bike: thank you for the insight! that's a huge epiphany for me. i appreciate it, Bike
<Bike>
for example, expt-mod2 will go really slow when the exponent is a power of two, since you'll just keep doing (setf r (expt r 2)) and computing more and more digits you don't actually care about
<Bike>
i recommend grabbing a copy of TAOCP or something. knuth knows more about modular arithmetic than i ever will
Bike has quit [Quit: sleep]
<hashfuncf9>
TAOCP is definitely on my bucket list, but for how long it takes me to comprehend/gain-an-intuition on certain maths, i don't think i'd be able to dedicate enough time to reading it in full
<hashfuncf9>
although, that might change in the future; we'll see
masinter has quit [Ping timeout: 256 seconds]
Oladon has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
zeroc00l0 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
occ has quit [Ping timeout: 240 seconds]
zacts has joined #commonlisp
yauhsien has joined #commonlisp
hashfuncf9 has quit [Remote host closed the connection]
razetime_ has joined #commonlisp
razetime_ has quit [Client Quit]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
karlosz has joined #commonlisp
jeosol has joined #commonlisp
zacts has quit [Quit: Client closed]
Oladon has quit [Read error: Connection reset by peer]
occ has joined #commonlisp
Oladon has joined #commonlisp
aartaka has joined #commonlisp
karlosz has quit [Ping timeout: 250 seconds]
matthewm has joined #commonlisp
Oladon has quit [Quit: Leaving.]
matthewm has left #commonlisp [ERC (IRC client for Emacs 27.1)]
euandreh has quit [Quit: WeeChat 3.4.1]
euandreh has joined #commonlisp
jrx has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
igemnace has joined #commonlisp
igemnace has quit [Remote host closed the connection]
jrx has quit [Quit: ERC (IRC client for Emacs 27.2)]
<zacts>
I want to include the above into common lisp
<zacts>
note: I'm a beginner
treflip has joined #commonlisp
<zeroc00l0>
You'll need some common lisp library that can make python libraries available to a common lisp programmer. The term "foreign function interface" might return some relevant searches.
<zacts>
thanks
<zeroc00l0>
Why don't you want to just write the code in python?
<zeroc00l0>
s/programmer/program
<zacts>
this isn't for a particular project or application
<zacts>
I'm just tinkering really
<zeroc00l0>
Ok, have fun.
<zeroc00l0>
This sort of think is definitely possible, but I don't know what are all the relevant details in this case.
<zeroc00l0>
s/think/thing
<zacts>
I'm kind of trying to decide between learning python first or common lisp too