dale has quit [Read error: Connection reset by peer]
dale_ has joined #lisp
dale_ is now known as dale
dale has quit [Read error: Connection reset by peer]
dale has joined #lisp
dale has quit [Read error: Connection reset by peer]
dale has joined #lisp
dale has quit [Read error: Connection reset by peer]
dale_ has joined #lisp
dale_ is now known as dale
even4void has joined #lisp
even4void has quit [Client Quit]
Cymew has joined #lisp
iAmDecim has quit [Ping timeout: 250 seconds]
Bourne has quit [Ping timeout: 256 seconds]
Necktwi has quit [Read error: Connection reset by peer]
bendersteed has joined #lisp
<aeth>
Shinmera: Any chance of adding a NaN to float-features like you have infinities? There are many NaNs, of course, but I think any NaN would do when reading in a NaN from a file (or rather, a string representing the concept of "NaN"). It's just bits-single-float or bits-double-float with the right (wrong?) bits, I guess.
<aeth>
They also apparently have to be function calls, not constants, based on a conversation here a while back, maybe 4 years ago.
<Shinmera>
Hmm.
<Shinmera>
I suppose that's reasonable enough.
<Shinmera>
I won't implement it myself, but I'd be open to a PR.
<aeth>
e.g. (float-features:bits-single-float #x-4000)
<aeth>
I'm not sure I'd want to PR one line
<Shinmera>
There's documentation, testing, and more involved.
<Shinmera>
So definitely not just one line.
<aeth>
ah
oxum has quit [Remote host closed the connection]
zmt00 has joined #lisp
iAmDecim has joined #lisp
zmt01 has quit [Ping timeout: 240 seconds]
even4void has joined #lisp
even4voi1 has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
even4voi1 has quit [Client Quit]
dreamcompiler_ has joined #lisp
dreamcompiler has quit [Read error: Connection reset by peer]
<aeth>
Fortunately, it's not as bad as it sounds because there are only about a dozen or two years. I guess there would be 14: a Jan 1 with each day of the week and the presence or absence of Feb 29. Intervals that cross multiple years could complicate things, though.
oxum has quit [Ping timeout: 250 seconds]
EvW has joined #lisp
SGASAU` has quit [Remote host closed the connection]
<flip214>
jasom: holidays are not important?
SGASAU` has joined #lisp
bilb_ono has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
sonologico has quit [Ping timeout: 256 seconds]
asarch has quit [Remote host closed the connection]
asarch has joined #lisp
parjanya has quit [Remote host closed the connection]
parjanya has joined #lisp
slyrus_ has joined #lisp
sonologico has joined #lisp
asarch has quit [Quit: Leaving]
slyrus__ has quit [Ping timeout: 256 seconds]
slyrus has joined #lisp
bilb_ono has quit [Quit: bilb_ono]
sauvin has quit [Read error: Connection reset by peer]
* jackdaniel
desperately tries not to make a joke about comparing whose (implementation) is longer
prince1 has joined #lisp
gioyik has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
oxum has joined #lisp
rumbler31 has joined #lisp
refpga has joined #lisp
whiteline has quit [Quit: Leaving]
whiteline has joined #lisp
rumbler31 has quit [Ping timeout: 250 seconds]
bilb_ono has quit [Quit: bilb_ono]
efm has joined #lisp
oxum has quit [Ping timeout: 252 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
karlosz has quit [Quit: karlosz]
bilb_ono has joined #lisp
<jasom>
flip214: holidays are less important
<jasom>
xristos: I'm already using local-time, but it only has a single difference function and that only gives you the floor of the difference in years
cosimone has quit [Quit: Terminated!]
<jasom>
flip214: also there is no one standard for "holidays"
shka_ has quit [Ping timeout: 256 seconds]
shangul has quit [Ping timeout: 256 seconds]
madagest has joined #lisp
Shinmera- has joined #lisp
cartwright has quit [Ping timeout: 240 seconds]
fiddlerwoaroof_ has joined #lisp
idxu_ has joined #lisp
madage has quit [Ping timeout: 240 seconds]
fiddlerwoaroof has quit [Ping timeout: 265 seconds]
idxu has quit [Ping timeout: 265 seconds]
v88m has quit [Read error: Connection reset by peer]
SGASAU` has quit [Read error: Connection reset by peer]
idxu_ is now known as idxu
Shinmera has quit [Ping timeout: 265 seconds]
SGASAU` has joined #lisp
winny has joined #lisp
CrazyPython has joined #lisp
<_death>
jasom: your best bet is to look at emacs's calendar code.. the authors also wrote a book called Calendrical Calculations and someone ported some of the code to CL https://gist.github.com/perusio/6687883
shka_ has joined #lisp
cartwright has joined #lisp
Shinmera- has left #lisp [#lisp]
<Xach>
hmm
<Xach>
i had the strong impression that Calendrical Calculations was originally in CL.
<ecraven>
it is a really great book ;)
<Xach>
it is available online used for a few dollars. i think i will get a copy sometime soon.
<ecraven>
and the code is well-written, I "ported" it to Scheme (mostly just rewrite a few macros)
<_death>
I think some people had issues with the code's license
<ecraven>
yes, I heard about that too
<ecraven>
I contacted one of the authors years ago about the Scheme port, he was very friendly, though I don't remember what he said exactly about the license
karlosz has joined #lisp
<ecraven>
ok, found the emails, he suggested that the port would still need to adhere to the original license (free for non-commercial use, I think)
iAmDecim has joined #lisp
<jasom>
ah, I can't use it if it's NC.
refpga has quit [Ping timeout: 256 seconds]
<ecraven>
well, in theory, you could read the book (but not the code) and just implement the calculations yourself (depending on what exactly you need)
SGASAU` has quit [Remote host closed the connection]
ggole has quit [Quit: Leaving]
<ecraven>
the actual calendrical calculations are not so complex, mostly the sun/moon stuff is hard
SGASAU` has joined #lisp
<_death>
Xach: ah, the code in the book is indeed the CL code shown
<ecraven>
for number of weekdays, you "just" need to convert to rata die, calculate the difference, then check the weekdays
Hedi has joined #lisp
Hedi has quit [Remote host closed the connection]
iAmDecim has quit [Ping timeout: 252 seconds]
refpga has joined #lisp
shka_ has quit [Ping timeout: 250 seconds]
<ecraven>
hm.. there's a fourth edition of CC? nice
gioyik has quit [Ping timeout: 264 seconds]
CrazyPython has quit [Read error: Connection reset by peer]
gioyik has joined #lisp
bitmapper has quit [Remote host closed the connection]
bitmapper has joined #lisp
bilb_ono has quit [Quit: bilb_ono]
v88m has joined #lisp
bilb_ono has joined #lisp
narimiran has quit [Ping timeout: 240 seconds]
gareppa has joined #lisp
SGASAU` has quit [Remote host closed the connection]
gareppa has quit [Remote host closed the connection]
SGASAU` has joined #lisp
frgo has joined #lisp
pluplog has quit [Remote host closed the connection]
housel has quit [Read error: Connection reset by peer]
bilb_ono has quit [Quit: bilb_ono]
gioyik has quit [Ping timeout: 256 seconds]
refpga has quit [Ping timeout: 265 seconds]
xuxuru has joined #lisp
northwind has joined #lisp
prince1 has joined #lisp
theBlackDragon has quit [Ping timeout: 264 seconds]
theBlackDragon has joined #lisp
Lord_of_Life_ has joined #lisp
gioyik has joined #lisp
prince1 has quit [Ping timeout: 265 seconds]
Lord_of_Life has quit [Ping timeout: 264 seconds]
Lord_of_Life_ is now known as Lord_of_Life
stepnem has quit [Ping timeout: 240 seconds]
xuxuru has quit [Quit: xuxuru]
stepnem has joined #lisp
northwind has left #lisp [#lisp]
oxum has joined #lisp
wpasieka has joined #lisp
esotericalgo has joined #lisp
Shinmera has joined #lisp
SGASAU` has quit [Remote host closed the connection]
SGASAU` has joined #lisp
oxum has quit [Ping timeout: 264 seconds]
wpasieka has quit [Remote host closed the connection]
bilb_ono has joined #lisp
charles235 has joined #lisp
|Pirx| has quit [Ping timeout: 256 seconds]
gravicappa has quit [Ping timeout: 260 seconds]
|Pirx| has joined #lisp
wpasieka has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
<jasom>
I went for the O(n) solution of "increment day by one, check if weekday"
<jasom>
will be easier to add holidays to that way anyways
<MichaelRaskin>
Oh yes
EvW1 has joined #lisp
<jasom>
and I can run 8000 years of total time difference per second on my machine
wpasieka has quit [Ping timeout: 256 seconds]
<jasom>
which is fine for my use case of "dozens of deltas with a difference of no more than a few months"
aamukastemato has joined #lisp
bendersteed has quit [Ping timeout: 272 seconds]
refpga has joined #lisp
bendersteed has joined #lisp
jprajzne has quit [Quit: Leaving.]
KDr2 has quit [Remote host closed the connection]
KDr2 has joined #lisp
bendersteed has quit [Ping timeout: 256 seconds]
adam4567 has joined #lisp
refpga has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
refpga has joined #lisp
sonologico has quit [Ping timeout: 256 seconds]
Oladon has joined #lisp
heisig has quit [Ping timeout: 260 seconds]
sonologico has joined #lisp
refpga has quit [Ping timeout: 256 seconds]
refpga has joined #lisp
sjl_ has quit [Ping timeout: 264 seconds]
pilne has joined #lisp
refpga has quit [Ping timeout: 265 seconds]
efm has quit [Ping timeout: 252 seconds]
ukari has quit [Ping timeout: 250 seconds]
aamukastemato has quit [Quit: Leaving]
efm has joined #lisp
<_death>
can you not precompute the relevant time range?
prince1 has joined #lisp
<jasom>
most of the ranges are on the order of a few days, so I don't see how precomputing would help
<_death>
say a bitmap of around 90 years.. that's about 4kb
prince1 has quit [Ping timeout: 265 seconds]
<aeth>
_death: There are, afaik, only 14 years. Jan 1st on each day of the week and the presence and absence of Feb 29th. So you could just store those and have rules for ranges that span multiple years.
<aeth>
holidays can be a separate pass, just subtract 1 if the holidy is in the range and on a weekday
<aeth>
(and do (max 0 ...) so you don't go negative)
refpga has joined #lisp
iAmDecim has joined #lisp
SGASAU`` has joined #lisp
<_death>
well, it's just a popcount to get weekdays in the representation I'm thinking of.. you could have one bitset for each calendar and union/intersect if needed
SGASAU` has quit [Ping timeout: 252 seconds]
<_death>
if something changes, all that's needed is to update the bitsets
amerlyq has quit [Quit: amerlyq]
oxum has joined #lisp
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 265 seconds]
oxum has quit [Ping timeout: 250 seconds]
<pjb>
yep.
refpga has quit [Read error: Connection reset by peer]