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
Hu0p has joined #lisp
fikka has joined #lisp
Jesin has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
Ober has quit [Ping timeout: 252 seconds]
Fare has joined #lisp
jinkies has quit [Remote host closed the connection]
mange has quit [Remote host closed the connection]
mange has joined #lisp
it3ration has quit [Ping timeout: 246 seconds]
Bike has joined #lisp
makomo has quit [Ping timeout: 244 seconds]
fikka has joined #lisp
meepdeew has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
meepdeew has quit []
Kundry_Wag has quit [Ping timeout: 240 seconds]
it3ration has joined #lisp
rpg has joined #lisp
fikka has joined #lisp
mindCrime_ has joined #lisp
it3ration has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 244 seconds]
mindCrime_ has quit [Ping timeout: 245 seconds]
aindilis has quit [Ping timeout: 252 seconds]
acolarh has quit [Ping timeout: 272 seconds]
kristof has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
acolarh has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
mkolenda has quit [Ping timeout: 252 seconds]
it3ration has joined #lisp
asarch has joined #lisp
flazh has quit [Ping timeout: 252 seconds]
zooey has quit [Ping timeout: 256 seconds]
kamog has joined #lisp
fikka has joined #lisp
mindCrime_ has joined #lisp
argoneus has quit [Quit: No Ping reply in 180 seconds.]
zooey has joined #lisp
argoneus has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
acolarh has quit [Ping timeout: 252 seconds]
flazh has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
robotoad has quit [Quit: robotoad]
Kundry_Wag has joined #lisp
danielvu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
acolarh has joined #lisp
fikka has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
robotoad has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
it3ration has quit [Read error: Connection reset by peer]
it3ration has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
fikka has joined #lisp
dented42 has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Lycurgus has joined #lisp
robotoad has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
robotoad has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
robotoad has quit [Read error: Connection reset by peer]
danielvu has joined #lisp
mkolenda has joined #lisp
robotoad has joined #lisp
Kundry_Wag has joined #lisp
fikka has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
<jasom> survey: if you were to redesign setf expanders, would you leave ti as multiple-values or use a struct/class/something else?
<Bike> multiple values is fine. i'd change other things though.
pierpa has quit [Quit: Page closed]
fikka has quit [Ping timeout: 245 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
Kundry_Wag has joined #lisp
Roy_Fokker has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Ping timeout: 252 seconds]
X-Scale has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
anewuser has joined #lisp
fikka has joined #lisp
dddddd has quit [Read error: Connection reset by peer]
<aeth> jasom: I'd much rather have the language support multiple-values better
<jasom> aeth: in what way?
X-Scale has joined #lisp
<aeth> It would be nice to have things like (multiple-value-map #'1+ values)
Pixel_Outlaw has quit [Quit: Leaving]
fikka has quit [Ping timeout: 252 seconds]
<aeth> right now you mostly just have multiple-value-bind, multiple-value-list, multiple-value-call, and setf with multiple values... There's also multiple-value-prog1, which seems very niche (even rarer than prog1), and multiple-value-setq (probably entirely redundant now that you can (setf (values foo bar) (values 42 43)))
mindCrime_ has quit [Ping timeout: 252 seconds]
<Bike> you think mvprog1 is niche, but want this map thing?
<jasom> (map 'values ...) :)
Kundry_Wag has joined #lisp
<aeth> jasom: that would be nicer, but problematic given the semantics of map
<Bike> really? i don't see any problem with it...
<aeth> Bike: multiple-value-map would probably be orders of magnitude more used than multiple-value-prog1 if it existed
<Bike> can't say i've ever desired for it
<aeth> (e.g. 100 or so instead of 1)
PyroLagus has quit [Ping timeout: 252 seconds]
<Bike> i don't use multiple values when the different values are some uniform kind of thing
<jasom> Bike: can't take values as input so it would have to be (map 'values fn (m-v-l values))
<Bike> sure
<aeth> Going from sequences to values and back seems pretty useful, too.
<jasom> aeth: m-v-l and values-list do this
abbe has quit [Ping timeout: 276 seconds]
<aeth> jasom: for lists
<Bike> as far as actual semantics go, i like haskell making them unboxed tuples, but that would be a pretty severe change
<aeth> jasom: I mean, yes, you can just do (values-list (coerce #(1 2 3 4) 'list))
<jasom> (defmacro multiple-value-map (fn form) `(values-list (mmapcar ,fn (multiple-value-list ,form))))
<aeth> jasom: it would be very nice to be able to work with array subsections as multiple values, though... and without the probable consing that the values-list way will have. And for subsections, the naive way would double cons, first with subseq and then with coercing to list
<jasom> I just wish I could bind them in LOOP without using m-v-l
Kundry_Wag has quit [Ping timeout: 272 seconds]
<jasom> I know a decent compiler generates the same code, but it's annoying
<jasom> s/bind/set
<aeth> Bike: if more people worked with array subsections as multiple values, multiple-value-map would probably be the first requested feature
<Bike> why would you want to work with array sections as multiple values
abbe has joined #lisp
<Bike> i mean, it basically boils down to the same thing i guess, an unboxed vector
<aeth> Yes, it's an unboxed vector. It also composes well
Kundry_Wag has joined #lisp
<aeth> If there was no copy-seq it would be as simple as (setf (array-of-3 a) (array-of-3 b)) with my multiple-value code because of how it composes. (This still might be faster because it is loop-unrolled, whereas copy-seq probably isn't, even for every short arrays. On the other hand, generalizing this past size 2, 3, 4 would probably require *adding* loops to the implementation past a certain size instead of just unrolling it)
<aeth> Well (setf (array-of-3 a) (array-of-3 b)) would be copy-into. You'd either allocate it first or you'd multiple-value-call the constructor. e.g. for a T vector, (multiple-value-call #'vector (array-of-3 b))
pierpal has quit [Quit: Poof]
<aeth> (I have to provide the size in the name because I can't just pass in an arbitrary amount of VALUEs to SETF, at least with DEFSETF. It behaves like MULTIPLE-VALUE-BIND, where if you provide too many values it cuts off the end and if you provide too few it fills it with NILs.)
pierpal has joined #lisp
<Bike> yeah, you need define-setf-expander for that.
mkolenda has quit [Ping timeout: 252 seconds]
Kundry_Wag has quit [Ping timeout: 245 seconds]
<Bike> still needs to be a fixed number of values based on the place, tho.
<aeth> I'm assuming that general first class multiple values would not need the size provided and it would infer it from the type. Even if I used define-setf-expander I'd just be turning (array-of-3 a) into (array-of 3 a)
<Bike> semantics based on types is a whole other can of worms
<aeth> sorry, first class array <-> values
fikka has joined #lisp
<aeth> Bike: What would be nice is (values-array (vector 1 2 3 4)) or (multiple-value-array (values 1 2 3 4) :element-type '(unsigned-byte 8))
<aeth> I also think non-consing support for MAP would have to be included since otherwise you're translating it to a temporary sequence.
<aeth> (e.g. multiple-value-map)
<loke> aeth: I just looked at SBCL, and it doesn't optimise array initialisation or COPY-SEQ very well
anewuser has quit [Quit: anewuser]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<loke> (MAKE-ARRAY ... :INITIAL-CONTENTS other-array) ends up calling REPLACE
<loke> COPY-SEQ always calls the function itself, regardless of optimisation levels and type declarations.
fikka has quit [Ping timeout: 245 seconds]
dented42 has joined #lisp
Khisanth has quit [Ping timeout: 260 seconds]
<aeth> I would also like to see a (setf values-list) and (setf values-array) so you could replace the contents of a list or array with the results of multiple return values.
zooey has quit [Ping timeout: 256 seconds]
<aeth> and with arrays you could have keyword arguments so e.g. (setf (values-array foo :start 2 :end 5) bar) could behave similarly to setf subseq
fikka has joined #lisp
<aeth> I think that would be possible to implement, and would be easier to implement than values-array itself
zooey has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
<AeroNotix> aeth: isn't multiple-value-map a trivial macro though?
Khisanth has joined #lisp
fikka has joined #lisp
Lycurgus has quit [Quit: Exeunt]
Kundry_Wag has joined #lisp
<Bike> https://pastebin.com/WSyxr30z dumb as hekk
fikka has quit [Ping timeout: 272 seconds]
housel has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
Shinmera has quit [Ping timeout: 245 seconds]
isoraqathedh has quit [Ping timeout: 245 seconds]
mkolenda has joined #lisp
Colleen has quit [Ping timeout: 252 seconds]
rozenglass has joined #lisp
SaganMan has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
<beach> Good morning everyone!
Kundry_Wag has quit [Ping timeout: 252 seconds]
Shinmera has joined #lisp
kristof has joined #lisp
<kristof> late to the convo, but... very rarely do I ever want a filestream's contents all at once, and when I do it isn't hard to loop and push chars into a string
<SaganMan> Morning Peeps!
Bike has quit [Quit: Lost terminal]
Kundry_Wag has joined #lisp
fikka has joined #lisp
caltelt_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 272 seconds]
danielvu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<no-defun-allowed> hi SaganMan
<SaganMan> Hello no-defun-allowed
<SaganMan> no-defun-allowed: how is your day?
<no-defun-allowed> alright, you?
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
it3ration has quit [Remote host closed the connection]
wigust has joined #lisp
<SaganMan> I'm okay.
emaczen has quit [Read error: Connection reset by peer]
fikka has joined #lisp
Copenhagen_Bram has quit [Ping timeout: 272 seconds]
fikka has quit [Ping timeout: 272 seconds]
emaczen has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
Ober has joined #lisp
Inline has quit [Quit: Leaving]
emaczen has quit [Read error: Connection reset by peer]
bitch has joined #lisp
emaczen has joined #lisp
Copenhagen_Bram has joined #lisp
fikka has joined #lisp
Kaisyu7 has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
orivej_ has quit [Ping timeout: 272 seconds]
tripty has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
kristof has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
sauvin has joined #lisp
mathrick has quit [Ping timeout: 250 seconds]
fikka has quit [Ping timeout: 252 seconds]
steiner has quit [Remote host closed the connection]
yangby has joined #lisp
mathrick has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nirved has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
steiner has joined #lisp
steiner has quit [Remote host closed the connection]
steiner has joined #lisp
graphene has joined #lisp
caltelt_ has quit [Ping timeout: 246 seconds]
steiner has quit [Remote host closed the connection]
steiner has joined #lisp
fikka has joined #lisp
gpiero has quit [Remote host closed the connection]
vlatkoB has joined #lisp
dented42 has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
<beach> I guess I must be tired, because I can't figure out how to do nested backquote expressions. What should I put in place of <foo> in (let ((x 20)) `(bla `(<foo> 10))) so that the value of the form is (foo `(bla (20 10))), where 20 is of course the value of X?
fikka has joined #lisp
<beach> Er, sorry
<beach> So that the value of the form is (bla `(20 10))
<beach> I should not try to do any serious work today apparently.
yangby has quit [Quit: Go out for a walk and buy a drink.]
<beach> Let's try it again: What should I put in place of <foo> in (let ((x 20)) `(bla `(<foo> 10))) so that the value of the form is (bla `(20 10)) where 20 is the value of x?
<Shinmera> ,',x
<beach> I thought I tried that.
<beach> Oh, I think it is just SBCL printing it funny.
<beach> It prints it as (bla `(,'20 10))
fikka has quit [Ping timeout: 272 seconds]
<beach> Is that the same though?
<Shinmera> yes
<beach> Thanks.
<no-defun-allowed> hi beach
<dim> ah, the legend of the three-comma developer strikes again
<dim> I never could reach the two-comma level myself
<no-defun-allowed> more exciting than three star
rumbler31 has joined #lisp
<dim> is it really?
<beach> The nesting level is just 2.
<beach> "just" :)
<no-defun-allowed> yes, cause pointers kinda make sense sometimes
<aeth> AeroNotix: How do you do multiple-value-map without using values-list?
<aeth> *multiple-value-list
<aeth> I always get them mixed out
<aeth> *mixed up
<dim> well I played around at the REPL and once more understand nothing, one level is all I can handle it seems
rumbler31 has quit [Ping timeout: 252 seconds]
iskander has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
terpri has quit [Read error: Connection reset by peer]
fikka has joined #lisp
Hu0p_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Hu0p has quit [Ping timeout: 246 seconds]
Ober has left #lisp ["ERC (IRC client for Emacs 26.1)"]
scymtym has quit [Ping timeout: 244 seconds]
ebrasca has joined #lisp
asarch has quit [Quit: Leaving]
fikka has joined #lisp
zxcvz has joined #lisp
robotoad has quit [Quit: robotoad]
jlarocco has joined #lisp
gpiero has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
scymtym has joined #lisp
panji has joined #lisp
varjag has joined #lisp
shka_ has joined #lisp
<shka_> good morning
<beach> Hello shka_.
grumble has quit [Read error: Connection reset by peer]
Hu0p has joined #lisp
grumble has joined #lisp
Hu0p_ has quit [Ping timeout: 252 seconds]
orivej has joined #lisp
<ebrasca> Hi shka_ beach
jochens has joined #lisp
mange has quit [Remote host closed the connection]
lonjil has quit [Ping timeout: 252 seconds]
rozenglass has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 246 seconds]
yoonkn has joined #lisp
renzhi has quit [Ping timeout: 240 seconds]
lonjil has joined #lisp
fikka has joined #lisp
igemnace has quit [Quit: WeeChat 2.2]
renzhi has joined #lisp
lonjil has quit [Ping timeout: 252 seconds]
renzhi has quit [Client Quit]
fikka has quit [Ping timeout: 272 seconds]
steiner has quit [Remote host closed the connection]
lonjil has joined #lisp
fikka has joined #lisp
panji has quit [Read error: Connection reset by peer]
Kaisyu7 has quit [Read error: Connection reset by peer]
<beach> Now why does MAKE-METHOD have to be a macro?
<no-defun-allowed> should i work on cl-vep or cl-decentralise?
<no-defun-allowed> i haven't got a bloody clue which to do
jlarocco has quit [Ping timeout: 252 seconds]
<shka_> beach: does it has to?
<beach> clhs make-method
<beach> The Common Lisp HyperSpec says so.
<beach> Bah, no bots?
<beach> Thanks no-defun-allowed.
<no-defun-allowed> beep boop no problem
micro is now known as xxx
<shka_> interesting
<jackdaniel> beach: maybe because the form used in make-method should be evaluated in the null lexenv?
xxx is now known as micro
orivej has quit [Ping timeout: 252 seconds]
igemnace has joined #lisp
<no-defun-allowed> that's a good point
<beach> jackdaniel: Hmm.
<beach> I would have to think about that.
lavaflow_ has joined #lisp
lavaflow has quit [Ping timeout: 252 seconds]
akovalenko` has joined #lisp
akovalenko` has quit [Remote host closed the connection]
akovalenko has joined #lisp
<_death> I think the long names for multiple-value ops discourage their use, but I also think that's OK because multiple values hurt composability.. they are good and useful but have a price
bradcomp has joined #lisp
<_death> despite this they are still often abused due to efficiency concerns
bradcomp has quit [Ping timeout: 240 seconds]
<dim> multiple values look almost like a second class citizen
givre has joined #lisp
<givre> hi everyone, i'm having trouble with generating some HTML using spinneret, could anyone help me out ?
<dim> as said on another friendly channel, don't ask to ask, just ask!
<jackdaniel> givre: best course of action is to provide a snippet illustrating the problem, describing what's wrong and waiting :)
<_death> dim: by definition they are first class.. you can pass them around, store them, etc. also, there aren't many other languages that have them, but they're quite useful for both interface design and efficiency reasons
<givre> dim: makes sense :)
<dim> _death: what I mean is that when doing (f (g x)) then f only sees the first returned value of g
givre has quit [Quit: gonna use erc instead of webchat]
<shka_> dim: it is a feature
<dim> well depends on how your write f, maybe it's an issue with many of the CL provided functions not having a look
<dim> shka_: how so?
<shka_> multiple values allow you to extend returned values without breaking already written code
oystewh has joined #lisp
<shka_> otherwise, you can pack your result into list and have the same result
<_death> dim: for example think of truncate.. many times you're satisfied with just the quotient, but multiple values allow you to get at the remainder without more unnecessary computation
<shka_> yeah, this as well
<shka_> same for gethash
<shka_> anyway, multiple-values is thing that was done RIGHT in CL
<shka_> IMHO
<_death> you can always multiple-value-call.. btw recently I had the need to define a `values-concat` macro, whose body is `(multiple-value-call #'values ,@forms) .. don't think I've seen such a thing in the wild
nullniverse has quit [Ping timeout: 272 seconds]
<_death> it's much better than using parameters to return values.. (nowadays using C++ for work... ugh)
<dim> I like multiple values, I'm just not sure that I see ignoring them after the first one as a feature really, but I get I see shka_ point to some extend
<dim> silently ignoring data is something I can't get used to, I guess
<shka_> dim: well, alternative is always returning some sort of tuple, and always calling first
<shka_> hardly better!
ghard has joined #lisp
yoonkn has quit [Remote host closed the connection]
housel has quit [Read error: Connection reset by peer]
easye has joined #lisp
<dim> another alternative is to error when more values are provided than consumed, and having to do something like &allow-other-keys to ignore extra values, but I'm not sure if that'd be a good idea
<dim> API design is hard :/
<_death> that way lies Go
<dim> yeah but Go is a toy when it comes to implementing error handling anyway
<dim> they didn't seriously think about that, and it shows
<_death> in many ways Go is the antilisp.. it makes everything "plain" like C or assembly, which is good for the person-as-cog model.. still I liked parts of it, and its standard library is nice code to read.. but now they come up with big changes, as usual in fashion languages of today.. sjl's hamster wheel :).. so of course I cannot take it seriously anymore
makomo has joined #lisp
<_death> though it was bound to happen, as it's a language controlled by a company
graphene has quit [Remote host closed the connection]
<dim> when I tried Go, I didn't like the language, even though I appreciated the tooling and the fact that they took many small decisions, removing flexibility, winning a lot in terms of how easy it is to get started and productive, and to use other people code
graphene has joined #lisp
<_death> yes.. and they finally fixed the variable declaration syntax that until then was slavishly copied by C-like languages
<Shinmera> beach: freenode is doing some weird stuff, colleen hasn't been able to connect all day
dddddd has joined #lisp
<beach> Wow.
jochens has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
Lycurgus has joined #lisp
nirved has quit [Ping timeout: 240 seconds]
nirved has joined #lisp
<Demosthenex> oo! i just saw that croatan added forms!
<Demosthenex> wonder if i can find an example
jmercouris has joined #lisp
vlatkoB_ has joined #lisp
vlatkoB has quit [Ping timeout: 246 seconds]
jlarocco has joined #lisp
regreg has quit [Read error: Connection reset by peer]
jlarocco has quit [Ping timeout: 245 seconds]
<shka_> hm
<shka_> _death: calling go antilisp is on point!
orivej has quit [Ping timeout: 272 seconds]
<easye> ~.
Kundry_Wag has joined #lisp
jochens has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
Strelox has joined #lisp
rumbler31 has joined #lisp
Lycurgus has quit [Quit: Exeunt]
Colleen has joined #lisp
<jmercouris> anyone know how to do a redirect in caveman?
orivej has joined #lisp
<Shinmera> Colleen: welcome back
<Colleen> Thanks, it's good to be back.
fikka has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
steiner has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Bronsa has joined #lisp
steiner has quit [Remote host closed the connection]
jmercouris has left #lisp ["Exit."]
fikka has joined #lisp
steiner has joined #lisp
<dlowe> I love go for exactly the opposite reasons that I love lisp.
edgar-rft has joined #lisp
danielvu has joined #lisp
SaganMan has joined #lisp
danielvu has quit [Client Quit]
shrdlu68 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
danielvu has joined #lisp
danielvu has quit [Client Quit]
danielvu has joined #lisp
danielvu has quit [Client Quit]
shangul has joined #lisp
Kundry_Wag has joined #lisp
danielvu has joined #lisp
danielvu has quit [Client Quit]
rpg has quit [Ping timeout: 245 seconds]
Kundry_Wag has quit [Ping timeout: 246 seconds]
<shrdlu68> What is an efficient way to do (coerce (/ a b) 'short-float) when both a and b are unsigned fixnums?
danielvu has joined #lisp
danielvu has quit [Client Quit]
<dlowe> (/ (coerce a 'short-float) (coerce b 'short-float)) is probably going to be fast, just from floating division
<dlowe> though (/ a b) is going to return a rational, so it may do that in the implementation to coerce anyway
Kundry_Wag has joined #lisp
<shrdlu68> SBCL warns: "unable to do inline float coercion (cost 5)...because the first argument is a (RATIONAL 0)"
<dlowe> oh, heh. okay.
<shrdlu68> Hmm, if a and b are short-floats that could bypass all this, right?
plathrop has joined #lisp
<shka_> shrdlu68: this is not warn
<shka_> it is notice
<shrdlu68> Indeed, my bad.
<shka_> otherwise, what dlowe said
Bike has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
kooga has joined #lisp
warweasle has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
arbv has quit [Ping timeout: 252 seconds]
shangul has quit [Quit: sudo rm -rf /usr/*]
Kundry_Wag has joined #lisp
pfdietz has joined #lisp
azimut_ has quit [Ping timeout: 252 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
azimut has joined #lisp
Kundry_Wag has joined #lisp
iskander has quit [Ping timeout: 252 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
Kundry_Wag has joined #lisp
iskander has joined #lisp
steiner has quit [Remote host closed the connection]
rumbler31 has quit [Ping timeout: 244 seconds]
anewuser has joined #lisp
<beach> *sigh*
<beach> To much work to be done. Not enough time.
<dim> good summary
<dlowe> need more workers, then
<jackdaniel> 1 worker - 3 weeks; 2 workers - 2 weeks; 3 workers - 3 weeks ; 4 workers - 3 months
<dlowe> if that's the case, I guess you have pretty terrible management
<AeroNotix> sick burn
<dim> or a problem that is not parallelisable
<dim> “I bought you two copies of the book ‘The Mythical Man Month‘ so that you can read it twice as fast”
<jackdaniel> dlowe: unless you monkeypatch monumental software where every three abstraction layers you have functionality duplication I suppose managing teams larger than 6 people is terrible no matter how good at managing you are
<dlowe> that sounds like accumulated terrible management :)
<jackdaniel> let's agree to disagree on that matter
Zelmin has joined #lisp
jlarocco has joined #lisp
Inline has joined #lisp
<AeroNotix> Don't change, #lisp
Inline has quit [Read error: Connection reset by peer]
<dlowe> Well, managing teams larger than six people is definitely terrible. If you are in that position, the higher-up management should have noticed.
Inline has joined #lisp
<Zelmin> If you're using a cl library that uses cffi and make a binary, using sbcl, how do you catch a load-foreign-library-error so that you can log to a file when you run the binary on another computer?
<jackdaniel> Zelmin: best way to deal with it is to close all libraries before you save-lisp-and-die and to call loading yourself anew from init function
<Zelmin> jackdaniel: ah okay that makes sense, thanks
<jackdaniel> dlowe: my point is that there is some relatively small optimum for number of workers on one project, so increasing number of workers after the peak simply degrades the efficiency
<Shinmera> Zelmin: you might also be interested in https://shinmera.github.io/deploy/
<jackdaniel> not only because you can't parallelise some work, there is also a penalty for knowledge synchronization
<jackdaniel> (about a current state of the project)
<Zelmin> Shinmera: Thanks for the link! It looks like exactly what I need.
ghard has quit [Remote host closed the connection]
<dlowe> jackdaniel: if the penalties really outweighed the gains, no large projects would ever complete.
Lycurgus has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
azimut has quit [Read error: No route to host]
azimut has joined #lisp
igemnace has quit [Quit: WeeChat 2.2]
housel has joined #lisp
azimut has quit [Ping timeout: 272 seconds]
fikka has quit [Ping timeout: 245 seconds]
azimut has joined #lisp
fikka has joined #lisp
FreeBirdLjj has joined #lisp
mindCrime has joined #lisp
azimut has quit [Read error: Connection reset by peer]
azimut_ has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
wheelsucker has joined #lisp
asarch has joined #lisp
arbv has joined #lisp
<plathrop> My boss says his culture has a saying that roughly translates to English: "You can't make a baby in one month with nine women"
jochens has quit [Read error: Connection reset by peer]
jochens has joined #lisp
<dlowe> staggered schedules can make a 1 baby/month output however
graphene has quit [Remote host closed the connection]
<plathrop> not predictably, some babies take more time, some take less, and it's very difficult to determine which any particular baby will be... /me over-abuses the heck out of a metaphor...
azimut_ has quit [Ping timeout: 252 seconds]
graphene has joined #lisp
<plathrop> I think "more workers is terrible" is an over-simplification, but "that's just because of bad management" is an even more dangerous over-simplification.
<plathrop> but *shrug* YMMV
<Lycurgus> it's also to an inability to actually enslave multiple minds to a single master (to cut to what the metaphor is about)
<Lycurgus> *due to
<_death> simple fact is that it creates dependencies and communication overhead.. everything has to be balanced out
nowhere_man has quit [Ping timeout: 252 seconds]
<Lycurgus> otherwise that master could direct multiple slaves and achieve increased output or reduced makespan
juki has joined #lisp
fikka has joined #lisp
astalla has joined #lisp
mhd2018 has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
fikka has quit [Ping timeout: 252 seconds]
<Lycurgus> as _death indicates for a problem or one with subparts that can be parallel; maybe reduce the time to 1.5 trimesters, with a segmented fetus
<Lycurgus> but the bosses metaphor is a way of expressing understanding of the constraints of labor scheduling where a master does not have the ability to share memories, knowledge, etc. directly with subalterns
ebrasca has quit [Remote host closed the connection]
azimut has joined #lisp
<Lycurgus> the most relevant thing here would maybe be lparallel
<Lycurgus> which I wish somebody would do a whole system thing with
shka_ has quit [Quit: WeeChat 1.9.1]
rippa has joined #lisp
<dlowe> what do you mean by a whole system thing?
SaganMan has quit [Ping timeout: 252 seconds]
<_death> the other day I revisited zeromq documentation.. and this reminds me of this section http://zguide.zeromq.org/page:all#Patterns-for-Success
<Lycurgus> dlowe, like the objects in the bag of lisp OS things
<_death> also the previous sections.. X-oriented designs
sariyar has joined #lisp
fikka has joined #lisp
regreg has joined #lisp
shrdlu68 has quit [Quit: WeeChat 2.0.1]
mhd2018 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fikka has quit [Ping timeout: 252 seconds]
<dim> it would be quite nice to avoid the master/slave terminology
<Lycurgus> for the master, yes, but slave crave direction
<Lycurgus> *slaves
<dim> please stop with that?
<makomo> hello
<Lycurgus> yello
dale has joined #lisp
atgreen has quit [Ping timeout: 260 seconds]
robotoad has joined #lisp
astalla has quit [Ping timeout: 246 seconds]
<AeroNotix> dim: you know 4chan started that master/slave issue?
<AeroNotix> as a way to stir up issues
<dlowe> AeroNotix: it predates 4chan by a number of decades
Strelox has quit [Quit: Leaving.]
<AeroNotix> dlowe: the terminology or the sjw mission
<on_ion> client/server ?
<dlowe> AeroNotix: asking people to change the terminology
<AeroNotix> no dog in this fight. I find the whole thing amusing
<dlowe> "sjw" however IS a 4chan invention used to shut down others who value kindness
fikka has joined #lisp
<AeroNotix> "they" (government psyops) want you focusing on things like this
regreg has quit [Quit: Konversation terminated!]
regreg_ has joined #lisp
graphene has quit [Remote host closed the connection]
<dlowe> "they" would rather you just hacked lisp
Fare has quit [Ping timeout: 245 seconds]
<dim> AeroNotix: nonetheless, I think we should prefer meaningfull alternatives, see my article https://tapoueh.org/blog/2017/12/queen-princesses-and-workers/ for instance
<edgar-rft> I've heard bacteriae can make a bazillion babies per day without a single woman
graphene has joined #lisp
<dlowe> I've used overlord/minion at my workplace with great success
<dlowe> and it makes for funny meetings
<AeroNotix> it's the same damn thing
<_death> we had a minion here
<dlowe> can you please name a historical or current example of an overlord
regreg_ has quit [Client Quit]
<AeroNotix> dlowe: it's about the implied relationship. Colour it whatever you like, the terminology still represents that relationship
fikka has quit [Ping timeout: 272 seconds]
Bronsa has quit [Ping timeout: 252 seconds]
<dlowe> AeroNotix: amazingly, people have different reactions between implied and explicit meanings
<Xof> Philip II of France
<AeroNotix> dlowe: exactly! That's why the whole debate is ridiculous (imho)
<AeroNotix> dlowe: if the meaning is derived from the understanding of the reader, rather than the explicit meaning given by the author. Then the debate about what language to use becomes mired in so many issues
fikka has joined #lisp
<dlowe> That doesn't make it ridiculous, that makes it complicated and hard
<dlowe> AeroNotix: That is, in fact, the point
<AeroNotix> it makes it such that you need to determine the whole spectrum of meanings that someone can interpret your words under. How far do you go?
<dlowe> Well, it depends on how much you care, doesn't it
<Lycurgus> dlowe, well there's Operation Overlord which is reference to Normandy, the Norman Conquest (in reverse) which made the Normans king, the Normans generally Overlords
<AeroNotix> dlowe: https://github.com/dlowe-net/orcabot take this for example.
Fare has joined #lisp
<AeroNotix> What would you say if someone construed you were advocating the imprisonment and slavery of sentient orcas by representing Orcas in your code as tools to entertain you
<Lycurgus> (i.e. made them that in britain, over the saxons, etc)
<_death> orca, the oppressive whales that kill people
charh has quit [Ping timeout: 272 seconds]
<dlowe> When you communicate with someone, their brain doesn't linearly follow your exact utterance, all sorts of things are activated in parallel. So maybe by avoiding the activation of something that makes them upset, you make your point to them more clearly and effectively
<AeroNotix> dlowe: your implying that all understandings of your intent are logical
<AeroNotix> people make all kinds of crazy connections
steiner has joined #lisp
<dlowe> Hence communication is hard and difficult, and the more public, the harder and more difficult
Arcaelyx has joined #lisp
steiner has quit [Remote host closed the connection]
Bronsa has joined #lisp
nbunjevac has joined #lisp
doubledup has joined #lisp
doubledup has quit [Max SendQ exceeded]
doubledup has joined #lisp
makomo has quit [Ping timeout: 252 seconds]
bradcomp has joined #lisp
varjag has joined #lisp
dwo3984 has joined #lisp
gendl has joined #lisp
dwo3984 is now known as gypysdave5
LiamH has joined #lisp
gpiero has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
steiner has joined #lisp
gypysdave5 has quit [Remote host closed the connection]
makomo has joined #lisp
whartung has quit [Quit: whartung]
orivej has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 252 seconds]
Fare has quit [Ping timeout: 252 seconds]
juki has left #lisp ["ERC (IRC client for Emacs 26.1)"]
fikka has joined #lisp
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
whartung has joined #lisp
Zelmin has quit [Read error: Connection reset by peer]
kaun has joined #lisp
jochens has quit [Ping timeout: 246 seconds]
kaun has quit [Quit: IRC for Sailfish 0.9]
shka_ has joined #lisp
<shka_> good evening!
<shka_> i have SBCL question
jlarocco has quit [Ping timeout: 245 seconds]
<jasom> shka_: I may have sbcl answer
<shka_> i think that my question can be stupid though :-)
<jasom> shka_: only one way to find out ;)
<shka_> so i have a struct with bitmask
<jasom> as in a C struct?
<shka_> i am wondering when this bit mask can be inlined in struct memory layout without references
<shka_> jasom: defstruct
<jasom> okay
<jasom> shka_: can you paste sample code?
<shka_> fixnum seems to be obviously YES since sbcl won't box fixnums
<shka_> jasom: sure (defstruct struct bitmask) :D
<Bike> are you talking about a small integer, or a bit vector?
<shka_> Bike: integer
<Bike> well you'll need to specify :type to get any special layout
<shka_> ok
<shka_> can sbcl inline integers?
<jasom> shka_: if thee type ofthe slot is one that sbcl can unbox, then it won't box it inside the struct
<shka_> like big integers
<aeth> shka_: (unsigned-byte 64) should work, too, unless for some reason it only works for arrays
<Bike> it should keep small integers unboxed in structs
<jasom> shka_: it cannot unbox 'integer but it can unbox '(unsigned-byte 64) on 64-bit targets
<Bike> i don't know the particulars of the top of my head
<shka_> yeah, that part is obvious
<shka_> Bike: what about arrays?
<_death> instead of a struct you can have an array for each slot
<Bike> not arrays
<shka_> ok, so just integers
<Bike> with arrays there's eq-ness to preserve
<Bike> probably other numbers too, and characters
<shka_> _death: yeah, but that kinda sucks
<aeth> shka_: If (unsigned-byte 64) or double-float (in 64-bit, obviously) only stays within a data structure where the slot is of that type (e.g. struct or specialized array) or within a function, it doesn't cons in SBCL. e.g. You can do all the math on double-float you want and then coerce it to single-float as the return value or store it into an array with double-floats.
steiner has quit [Remote host closed the connection]
<shka_> aeth: yeah, that i know
<shka_> i was wondering about big ints and arrays
<aeth> only (unsigned-byte 64) and probably (signed-byte 64) too.
<shka_> ok, i know more then before
<shka_> and in fact that suffice for me
<shka_> in my case, using struct has no advantage over class
<aeth> But you need to use a struct because it's not smart enough to know that it never leaves a function if you put it into a class or hash-table
<shka_> because 32 bit fixnum will be inlined regardless, and array won't be inlined no matter what
pjb has joined #lisp
<aeth> Oh, okay. The problem with classes here is that it loses type information, even if you have :type
<shka_> aeth: sooo, you are saying that dynamic-extent works with structs?
<pjb> Not necessarily. This depends on the implementation.
<pjb> (Both).
fikka has quit [Ping timeout: 245 seconds]
<shka_> aeth: actually, you can set safety to 2 and sbcl will check in runtime type
<shka_> of slot
<shka_> it is quite neat
<Bike> sbcl does have dynamic-extent structs, according to the manual.
<aeth> shka_: What I'm saying is that the function needs to be inlined. So + is fine on ub64 but not ROUND because ROUND is never inlined afaik. And afaik struct accessors are inlined because redefining structs is undefined bevhaior
<shka_> pjb: in sbcl, obviously
<Bike> you have to declare the constructor inline.
<pjb> shka_: #sbcl vs #lisp
<aeth> shka_: The type information is normally lost in classes.
<jasom> shka_: accessing a slot of a struct in sbcl is always just single de-reference. If it's a type that is unboxed in structs you are done, otherwise you have a second reference to deal with.
<shka_> pjb: yeah, (let ((*lisp* *sbcl*))
<shka_> ;-)
<pjb> :-)
<pjb> I'm glad you use dynamic binding.
<jasom> shka_: classes are (almost?) always more complicated just to get to the point that you start with with structs
<shka_> Bike: constructor inline to get dynamic-extent working, right?
<jasom> s/classes/standard-objects/
fluxit has joined #lisp
<Bike> shka_: yes. just reading the manual here.
<_death> you can use the MOP to define storage
<shka_> makes sense, thanks
<shka_> _death: i did this already
<shka_> hm
<shka_> ok
<aeth> shka_: Generally imo if :type for your slots matters, use a struct, not a class. Especially if the types are simple types that help the compiler like (unsigned-byte 32) or single-float etc. You *can* use MOP for this sort of thing, but it's not easy.
<pjb> 1- good compilers can determine themselves if an object will leak out of the dynamic scope. 2- I don't think I make fewer errors than the compiler. 3- therefore dynamic-extend declarations shall be prohibited!
<aeth> s/use a struct, not a class/use defstruct, not defclass/
<shka_> pjb: eh, you are making beach happy ;-)
<shka_> ok, that's enough for me
<jasom> 4: sbcl's garbage collector algorithm is very friendly to short-lived objects anyways
<shka_> actually i noticed that
<jasom> It takes a lot of work to come up with a benchmark that makes dynamic-extent cause a measurable difference in throughput
fikka has joined #lisp
<jasom> I suppose that it *can* make a difference in latency if you make it so all allocations are dynamic-extent (i.e. no heap allocations at all)
<shka_> well, there are cases when this is useful
<aeth> shka_: imo don't rely on :type in classes if you need to enforce the type because you can assume that it's not going to be checked for the majority of your users because the default on the most popular implementation (SBCL) doesn't do it.
<shka_> aeth: well, as i said, it can do it :-)
<aeth> It's harder than it looks
<shka_> aeth: try wrapping defclass in (optimize (safety 2))
<shka_> in sbcl, that's it
<aeth> shka_: I bet that doesn't work in CLISP (I mean, my engine doesn't work in CLISP, either, but might as well write portably where I can)
<shka_> well, i didn't check in clisp
<shka_> how much do you want to bet? :-)
<Bike> thinking about it, i wonder if there are any obstacles to having unboxed storage in classes with :type, at least for storage rather than compile time info... i guess standard-instance-access could be problematic
<shka_> aeth: yup, clisp won't check
<shka_> anyway, i am doing this just to not waste time debugging stupid mistakes on my side so it won't matter
cage_ has joined #lisp
<aeth> I don't mind using structs where :type matters. I mean, CLISP won't check there, either, probably. But it gives structs a role and you could probably at the very least get constructor/accessor checking into every implementation, even if you can't get optimization.
pierpal has quit [Remote host closed the connection]
<Demosthenex> hrm, is there a way to get a list of slots from a class? i'm defining a dao object in postmodern, and for creation i'd like to iterate across the slots for the json document i'm importing.
<beach> mop class-slots
<beach> Oh well.
omilu has joined #lisp
gpiero has joined #lisp
<beach> Demosthenex: It is customary to acknowledge that you received the advice.
<beach> Demosthenex: As in "Oh, OK, thanks, I'll try that", or something like that.
<Demosthenex> beach: my apologies, i'm reading frantically =] on the other hand irc is quite async in nature
<Demosthenex> i do appreciate the tip !
<beach> Good.
fikka has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
nowhere_man has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
nowhere_man has quit [Ping timeout: 240 seconds]
<Demosthenex> sweet, it was hidden in sb-mop. and slot-definition-name works too.
<beach> You can use closer-mop if you want to be independent of the implementation.
<Demosthenex> yeah, i was reading it's not portable. atm that's not a concern. i'm learning on sbcl and don't plan to change for a long time
nowhere_man has joined #lisp
atgreen has joined #lisp
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
<Bike> it is portable, just not standard
nowhere_man has quit [Ping timeout: 244 seconds]
dyelar has quit [Remote host closed the connection]
dyelar has joined #lisp
<shka_> *sigh* ok done, i removed struct
<shka_> and replaced it with class
atgreen has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
atgreen has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
detergnet has quit [Ping timeout: 252 seconds]
msb has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
Fare has joined #lisp
fikka has joined #lisp
sauvin has quit [Remote host closed the connection]
kooga has quit [Quit: :]
fikka has quit [Ping timeout: 240 seconds]
shrdlu68 has joined #lisp
jochens has joined #lisp
Strelox has joined #lisp
<shrdlu68> jackdaniel: I have a piece of code that runs in around 14s in SBCL, but much much longer in ECL (I'm yet to let it finish). How can I figure out why?
Jesin has quit [Quit: Leaving]
<dlowe> shrdlu68: have you tried using a profiler on both?
zxcvz has quit [Quit: zxcvz]
<shrdlu68> dlowe: I have tried SBCL's statistical profiler, but I'm at my wit's end figuring out the results.
jochens has quit [Ping timeout: 272 seconds]
Jesin has joined #lisp
<dlowe> shrdlu68: yeah, the interpretation is different than with a deterministic profiler
<dlowe> "for this number of samples, this call stack was happening"
<shrdlu68> dlowe: According to sb-sprof, this is the most interesting function: https://github.com/shrdlu68/ac-experiment/blob/master/coding.lisp#L140
<dlowe> have you tried just using sb-prof instead?
<shrdlu68> Not yet.
<shrdlu68> Same with CCL as with ECL.
Kundry_Wag has quit [Remote host closed the connection]
<dlowe> sbcl is known for its fast math
graphene has quit [Remote host closed the connection]
<shrdlu68> Yes, but the difference here is more than I would expect.
<shrdlu68> I'm using bit vectors heavily, that perhaps that could be it?
graphene has joined #lisp
atgreen has quit [Ping timeout: 246 seconds]
Jesin has quit [Quit: Leaving]
<vsync> just learned someone made a Lisp for TempleOS
<vsync> probably blasphemous but pretty cool
<White_Flame> nifty
<on_ion> blasphemous against...?? do you understand what is TempleOS ? =p
Jesin has joined #lisp
<White_Flame> I really wish templeos wasn't C-based
<White_Flame> (well, c-derived I guess)
<dlowe> cool, but we talk about Common Lisp here
<dlowe> maybe you want ##lisp?
<White_Flame> oh, or #lispcafe
Fare has quit [Ping timeout: 244 seconds]
<dlowe> well, it *is* about a lisp.
<vsync> on_ion: blasphemous against HolyC
<vsync> dlowe: I figure we talk about Lisp here, just that Common Lisp is the only most purest form of the true heritage
<dlowe> You'd think from the channel name, but nope. ##lisp is for all the lisps.
<dlowe> As with most things in lisp, it's that confusing way for historical reasons
<vsync> it's how I choose to view the world
kamog has quit [Remote host closed the connection]
housel has quit [Ping timeout: 252 seconds]
doubledup has quit [Remote host closed the connection]
jmercouris has joined #lisp
vlatkoB_ has quit [Remote host closed the connection]
stacksmith has joined #lisp
aindilis has joined #lisp
astalla has joined #lisp
housel has joined #lisp
bsund has joined #lisp
shrdlu68 has quit [Quit: WeeChat 2.0.1]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
cage_ has quit [Quit: Leaving]
dented42 has joined #lisp
<Demosthenex> beach: wow, that allowed me to automate the import of json from a rest api down to just one line of code, specifying json keys by slot id. i'm thrilled!
<pfdietz> Every day, in every way, we are getting meta and meta.
<dlowe> pfdietz: nice Bucky quote
mindCrime has quit [Ping timeout: 244 seconds]
<Demosthenex> just saved me a bunch of code duplicate making a translation layer
<pfdietz> John Wisdom, I think.
<Demosthenex> that and upsert with dao classes in postmodern. so nice.
<Demosthenex> my last (personal) project i was using direct sql with postmodern with some s-sql, had to try dao this time
<Demosthenex> while i wait for 1 million league maches to download, now i'm working on a gw2 trading post analyzer
<Demosthenex> just creative pet projects to help me learn
mindCrime has joined #lisp
<shka_> shrdlu68: are you willing to post sb-sprof result?
<dlowe> pfdietz: Emile Coue, apparently, of whom I have never head
<dlowe> heard
Lycurgus has joined #lisp
Fare has joined #lisp
rumbler31 has joined #lisp
fikka has joined #lisp
<Demosthenex> so, i could not find docs on sbcl's sleep function granularity.
<shka_> well, we can check the source code!
<jasom> Demosthenex: there's a docstring!
<Demosthenex> looks like i'm hitting rate limits though i have sleep 0.002 in it
<Demosthenex> oh? darn i was googling like crazy
<jasom> any non-negative real number
<jasom> it's probably OS dependent what the granularity is
<jasom> and as others say, the code is just a M-. away
fikka has quit [Ping timeout: 245 seconds]
rumbler31 has quit [Remote host closed the connection]
<shka_> Demosthenex: ok, got it
<shka_> (defconstant sb!xc:internal-time-units-per-second 1000
<shka_> "The number of internal time units that fit into a second. See
<shka_> GET-INTERNAL-REAL-TIME and GET-INTERNAL-RUN-TIME.")
<Bike> that's probably not related to sleep
<jasom> Bike: it is
<Bike> oh? scuse me. thought it was just the standard relation
<jasom> well it's complicated
<shka_> Demosthenex: from what i can understand sleep follows internal-time-units-per-second granulity
<shka_> so that's the epsilon
<scymtym> that whole subsystem is pretty crazy, among other things because of WITH-DEADLINE
<jasom> On *nix it calls usleep for the timeout in usec, *but* if you are interrupted it uses internal-time-units-per-second to check if it should continue sleeping
<shka_> yeah
<shka_> but units in both cases align
kajo has quit [Ping timeout: 252 seconds]
<shka_> so i think you can assume 1/1000 of seconds as your epsilon
<shka_> Demosthenex: does that solves your problem?
<jasom> again, it will work as least as well as usleep would for things smaller than 1/1000
fikka has joined #lisp
<jasom> oh, this is only if the thread-local *deadline* is set, otherwise it just does a nanosleep
<shka_> oh
<shka_> this is even better
<shka_> IIRC Demosthenex just needed 1/1000 resolution at least
pjb has quit [Quit: good night]
<shka_> so i think he is VERY safe here
<Demosthenex> yep, sounds good, so the issue must be my math
<shka_> sounds likely
<shka_> but
<shka_> if you are sleeping
<shka_> it sounds like a bad design
<shka_> well, good night anyway
<Demosthenex> well for the riot api, they tell me how many requests i've made and my limit, and so i burst until i'm close and exponentially increase the wait, but for gw2 its just 600/minute. a standard sleep ought to suffice
<Demosthenex> and if i hit the rate limit, i wait a full minute and try again
<jasom> it does looklike the deadline code was intended to be used more when it was written; without looking at the code history I can't say if that's likely. It could affect sleeps resolution in a negative manner in the future I think.
<jasom> Demosthenex: sleep can exit early
<jasom> Demosthenex: you should probably use get-internal-real-time or something similar to check how fast you are going
<shka_> hmmm
<shka_> Demosthenex: listening to this makes me think that some timer wheel would be a good idea
kajo has joined #lisp
<Demosthenex> i thought my exponetial backoff curve was cool for the riot api, but they provide feedback on your usage in every head returned. the gw2 one is very dumb by comparison
nirved has quit [Quit: Leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jasom> so sb-impl:%nanosleep dosen't boil down to a pure nanosleep() call, but rather sb_nanosleep which checks for EINTR and continues sleeping, so it should always sleep for at least as long as you request.
<j`ey> how can I print a "subset" of an array? like the first 100 elements
<jasom> j`ey: you can either use subseq to get the subsequence, or you can bind *print-length* to cause it to never print more than 100 elements of any object
<Bike> print length is real nice forthat
<j`ey> letter sounds good
<Bike> it's only for display, mind. you can't read back something that hits the *print-length* limit
<jasom> j`ey: try e.g. (let ((*print-length* 10)) (print (make-list 100)) (print (make-array 100)) to see what it's like
<jasom> rather: (let ((*print-length* 10)) (print (make-list 100)) (print (make-array 100)) nil)
* jasom has forgotten to not return the last print before when using print-length to keep emacs from choking on 100s of millions of elements and failed totally...
astalla has quit [Ping timeout: 272 seconds]
jochens has joined #lisp
jochens has quit [Ping timeout: 240 seconds]
Roy_Fokker has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
<j`ey> jasom: thanks
scymtym has quit [Ping timeout: 252 seconds]
astalla has joined #lisp
LiamH has quit [Ping timeout: 240 seconds]
lavaflow_ has quit [Ping timeout: 246 seconds]
Fare has quit [Ping timeout: 246 seconds]
mindCrime has quit [Ping timeout: 246 seconds]
<razzy> ah, what a day
jmercouris has quit [Remote host closed the connection]
sariyar has quit [Ping timeout: 252 seconds]
sz0 has quit [Ping timeout: 252 seconds]
msb has quit [Ping timeout: 240 seconds]
sz0 has joined #lisp
stux|RC has quit [Ping timeout: 276 seconds]
scymtym has joined #lisp
msb has joined #lisp
lavaflow_ has joined #lisp
<AeroNotix> razzy: tell us about it
papachan has quit [Quit: WeeChat 2.2]
Arcaelyx has quit [Ping timeout: 252 seconds]
<razzy> when i forgot not to return print :]
Arcaelyx has joined #lisp
<razzy> AeroNotix: or was it sarcasm o your part?
<AeroNotix> no
phoe has quit [Read error: Connection reset by peer]
<j`ey> im having trouble with my recursive function.. it never seems to actually get to the point of calling itself: http://sprunge.us/g92q2m?scheme
<j`ey> lines 3 and 4 both print T, but hello is never printed
<j`ey> probably just messed up my () somewhere :/
<razzy> does elisp have trace function?
<j`ey> (if only takes a single form.. so I have to use progn
varjag has quit [Read error: Connection reset by peer]
varjag has joined #lisp
Bike has quit [Ping timeout: 252 seconds]
LiamH has joined #lisp
asarch has quit [Quit: Leaving]
terpri has joined #lisp
wheelsucker has quit [Quit: Client Quit]
wigust has quit [Ping timeout: 252 seconds]
Strelox has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
<jasom> j`ey: you don't need the outer progn in that code though.
<j`ey> does defun have an implicit progn?
<jasom> j`ey: yes
<White_Flame> as do LAMBDA, LET, WHEN, UNLESS, for probably the most common ones
<White_Flame> if there's only 1 body passed into the special form, then there's often an implicit progn. IF, for instance, has 2 code bodies, thus need to be individually PROGN-wrapped
<jasom> j`ey: I think your test is backwards, you are not recuring in the case that depth is <= to max-depth which looks wrong
<j`ey> oh, so my recursive call was actually in the false part of the if
<jasom> correct
<jasom> also LPT (lisp pro tip) if both the true and false parts of the if require PROGN, consider using COND.
<j`ey> I wanted the setf and the dotimes/recursion within the true block
<jasom> (unrelated to this example, but since you mention if and progn)
<j`ey> this is (if x y), not (if x y z)
<jasom> j`ey: with no false part? then just use when
<jasom> clhs when
<White_Flame> I would also point to #clschool as a place specifically for learning the language
<jasom> Colleen: ::clhs when
<j`ey> and when has an implicit progn, nice
<White_Flame> (and test1 test2 test3 (side-effect)) is also fun
<jasom> Colleen: ::chls ~a
<Colleen> Unknown command. Possible matches: 8, clhs, tell, roll, help, set, say, mop, get, hello,
<jasom> Colleen: ::clhs ~a
<jasom> (just checking that colleen can do what specbot could)
<White_Flame> prefixes are kind of annoying, though
<White_Flame> clhs doohickey
<j`ey> takes 8 minutes to reach 99.3% of the cases. I should see if declare optimise/declare types would help
<White_Flame> is much eaiser to remember, too
<j`ey> it does 0 bytes of consing already
<jasom> j`ey: it's probably just too complex, 18^depth grows very fast
edgar-rft has quit [Remote host closed the connection]
<j`ey> currently going to depth 8
<jasom> so like 22M iterations of the inner loop per second?
<j`ey> not bad
<jasom> 8^18 is about 10 billion if my math is right
<jasom> er 18^8 rather
<jasom> 8^18 is huge
<j`ey> it's for a rubik's cube
<jasom> 8^18 is also larger than the address space on a modern pc, so it's clearly wrong :)
<j`ey> it's calculating the depths of certain positions
<jasom> I'm having trouble decoding this; are you doing so by seeing if any positions with known depth are reachable in 1 move?
<j`ey> I start off with the solved state, do each turn (thats the 6 x 3), and go one depth further
<jasom> oh, I see what you're doing; if you have found a new minimum distance for a position, then you record it and then check all positions reachable in 1 move
rumbler31 has joined #lisp
<j`ey> or if the position hasnt been reached at all yet. prune-table has initial elements of a big number
<jasom> right, all moves are reachable in 20ish (a new lower bound was proven in the past 2 years IIRC)
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
<j`ey> Im looking at a particular subset, I think the upperbound is 9, maybe 10
rumbler31 has quit [Ping timeout: 245 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jasom> If you do a breadth-first search it will be a bit faster
<jasom> at least my intuitin tells me that
<jasom> because you will find the lowest bound first, so you won't have to rewrite the same position multiple times
<j`ey> hm
<j`ey> I can take a look at doing that, good idea
<j`ey> in my previous code I did DFS, but it was a different, smaller subset
<jasom> because I think right now if the subset of moves you are looking at can return it to the initial position in any of 2..6 moves, each adjacent position will be calculated 3 times.
jochens has joined #lisp
<j`ey> to be honest Im going to store/load the table. unless I can get the generation dwon to a few seconds
robotoad has quit [Read error: Connection reset by peer]
robotoad has joined #lisp
keppy has joined #lisp
jochens has quit [Ping timeout: 245 seconds]
<whartung> j`ey: still trying to serialize your data? or did you manage to get it in and out?
regreg has joined #lisp
<jasom> there are 1e12 total positions of distance 8, so obviously all moves won't be calculated in a few seconds, not sure with the subset you are using
makomo has quit [Ping timeout: 252 seconds]
caltelt_ has joined #lisp
<j`ey> whartung: I just decided to live with the 2minute start up time for now :P
<whartung> you just saved your image instead of the raw data?
<j`ey> jasom: the subset im working with has a total of ~5million positions
<j`ey> whartung: no, just generating it every time
<whartung> ah ok
<whartung> cool
<whartung> yup, that works.
<j`ey> but the new data set takes even longer to generate, so I will have to learn how to serialise soon :)
bsund has quit [Ping timeout: 244 seconds]
makomo has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
jessup has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 272 seconds]
Bike has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
LiamH has quit [Quit: Leaving.]
terpri has quit [Read error: Connection reset by peer]
actuallybatman has joined #lisp
regreg has quit [Remote host closed the connection]
ebrasca has joined #lisp
terpri has joined #lisp
rumbler31 has joined #lisp
robotoad has quit [Quit: robotoad]
makomo has joined #lisp
keppy has quit [Remote host closed the connection]
actuallybatman has quit [Ping timeout: 252 seconds]
rumbler31 has quit [Ping timeout: 252 seconds]
astalla has quit [Ping timeout: 240 seconds]
Kaisyu has joined #lisp
terpri has quit [Ping timeout: 252 seconds]
actuallybatman has joined #lisp
Kundry_Wag has joined #lisp
housel has quit [Read error: Connection reset by peer]
housel has joined #lisp
spm_ has quit [Remote host closed the connection]
PuercoPop has quit [Ping timeout: 250 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
<slyrus1> scymtym: did you see my response to your response?
atgreen has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Client Quit]
danielxvu has quit [Quit: Using Circe, the loveliest of all IRC clients]
danielxvu has joined #lisp
mindCrime has joined #lisp
bradcomp has quit [Ping timeout: 240 seconds]