2017-05-12T00:45:35Z attila_lendvai quit (Ping timeout: 246 seconds) 2017-05-12T01:17:48Z cromachina joined #sbcl 2017-05-12T01:18:42Z drl joined #sbcl 2017-05-12T01:19:33Z drl quit (Client Quit) 2017-05-12T01:55:42Z dougk joined #sbcl 2017-05-12T03:15:55Z beach: Good morning everyone! 2017-05-12T03:24:41Z dougk quit (Ping timeout: 272 seconds) 2017-05-12T03:27:19Z milanj quit (Quit: This computer has gone to sleep) 2017-05-12T04:06:48Z slyrus__ joined #sbcl 2017-05-12T04:07:39Z slyrus_ quit (Ping timeout: 260 seconds) 2017-05-12T04:08:16Z slyrus quit (Ping timeout: 240 seconds) 2017-05-12T04:08:27Z slyrus__ is now known as slyrus 2017-05-12T04:12:55Z slyrus_ joined #sbcl 2017-05-12T04:16:09Z angavrilov joined #sbcl 2017-05-12T04:39:34Z gingerale joined #sbcl 2017-05-12T05:31:41Z igajsin joined #sbcl 2017-05-12T05:33:42Z oleo quit (Quit: irc client terminated!) 2017-05-12T05:49:48Z shka_ joined #sbcl 2017-05-12T06:26:01Z shka_ quit (Ping timeout: 258 seconds) 2017-05-12T07:22:08Z Bike quit (Quit: linear) 2017-05-12T07:44:35Z drl joined #sbcl 2017-05-12T07:58:40Z scymtym quit (Ping timeout: 260 seconds) 2017-05-12T08:18:27Z scymtym joined #sbcl 2017-05-12T08:29:49Z adlai quit (Read error: Connection reset by peer) 2017-05-12T08:30:06Z scymtym: dougk_: traceroot.test.sh failure on threaded x86 builds. e.g. https://ci.cor-lab.org/job/sbcl-master/2209/featureset=1,label=ubuntu_trusty_32bit/consoleFull 2017-05-12T08:30:36Z adlai joined #sbcl 2017-05-12T09:29:17Z milanj joined #sbcl 2017-05-12T10:23:06Z m00natic joined #sbcl 2017-05-12T11:08:35Z dougk joined #sbcl 2017-05-12T11:11:11Z milanj quit (Quit: This computer has gone to sleep) 2017-05-12T11:11:38Z dougk quit (Read error: Connection reset by peer) 2017-05-12T11:11:54Z dougk joined #sbcl 2017-05-12T11:17:12Z dougk quit (Ping timeout: 240 seconds) 2017-05-12T11:22:16Z stassats joined #sbcl 2017-05-12T11:22:40Z dougk joined #sbcl 2017-05-12T11:29:08Z dougk quit (Ping timeout: 260 seconds) 2017-05-12T11:51:54Z dougk joined #sbcl 2017-05-12T12:01:28Z dougk quit (Read error: Connection reset by peer) 2017-05-12T12:01:43Z dougk joined #sbcl 2017-05-12T12:11:17Z dougk quit (Ping timeout: 268 seconds) 2017-05-12T12:23:53Z milanj joined #sbcl 2017-05-12T12:26:49Z milanj quit (Read error: Connection reset by peer) 2017-05-12T12:38:51Z milanj joined #sbcl 2017-05-12T12:42:55Z oleo joined #sbcl 2017-05-12T12:52:09Z drl quit (Quit: Ex-Chat) 2017-05-12T13:31:01Z cromachina quit (Read error: Connection reset by peer) 2017-05-12T13:36:22Z dougk joined #sbcl 2017-05-12T13:44:59Z dougk quit (Ping timeout: 255 seconds) 2017-05-12T13:54:16Z slyrus_ quit (Ping timeout: 260 seconds) 2017-05-12T14:06:15Z stassats quit (Ping timeout: 272 seconds) 2017-05-12T14:07:24Z stassats joined #sbcl 2017-05-12T14:12:07Z dougk joined #sbcl 2017-05-12T14:32:45Z milanj quit (Read error: Connection reset by peer) 2017-05-12T14:35:40Z dougk quit (Ping timeout: 240 seconds) 2017-05-12T14:43:42Z milanj joined #sbcl 2017-05-12T14:44:08Z Bike joined #sbcl 2017-05-12T14:53:05Z DGASAU quit (Ping timeout: 240 seconds) 2017-05-12T14:55:18Z DGASAU joined #sbcl 2017-05-12T14:58:38Z dougk joined #sbcl 2017-05-12T15:31:26Z slyrus_ joined #sbcl 2017-05-12T15:33:18Z burtons joined #sbcl 2017-05-12T15:35:04Z jack_rabbit quit (Ping timeout: 260 seconds) 2017-05-12T15:46:34Z slyrus_ quit (Ping timeout: 255 seconds) 2017-05-12T15:49:12Z slyrus_ joined #sbcl 2017-05-12T15:52:55Z dougk_: could I get some opinions on whether my 'gc_coalesce_string_literals' can be made the default? 2017-05-12T15:53:21Z dougk_: i have another more aggressive coalescing that I'd like to do, and so I'd re-purpose the flag to mean "also do the more aggressive thing" 2017-05-12T15:53:38Z dougk_: if not, I have to make it 3-valued for "no","a little","a lot" 2017-05-12T15:54:14Z stassats: dougk_: i recently made load-time-value ignore the read-only argument on gencgc, so that would conflict 2017-05-12T15:55:05Z dougk_: but it's always impermissible to modify a literal that appeared in source, and I i'm only setting the "coalesce" bit on literals 2017-05-12T15:55:22Z dougk_: well, not "impermissible" but "results in undefined behavior" is what the spec says 2017-05-12T15:56:20Z dougk_: so it seems like i should keep it 3-valued. 0 will mean "maximally pessimistic, assume code will do anything". 1 will mean "strings loaded from fasls", 2 will mean "anything that was provably literal" 2017-05-12T15:56:33Z stassats: is gc_coalesce_string_literals done during slad? 2017-05-12T15:56:41Z dougk_: yes 2017-05-12T15:56:55Z dougk_: and now I'm tagging string literals used in compilation-to-core as well, not just compilation-to-fasl 2017-05-12T15:57:16Z stassats: that and not touching load-time-value strings, then i'm not against it 2017-05-12T15:57:51Z dougk_: strings computed by a load-time-value form won't be touched, if the l-t-v computed it, like (format nil "~a-~a") kind of thing 2017-05-12T16:00:49Z stassats: right now, how much does it save? 2017-05-12T16:00:58Z dougk_: in QPX, >100MB 2017-05-12T16:01:30Z stassats: and the vanilla core? 2017-05-12T16:01:41Z dougk_: it represents >18% reduction in core size for us 2017-05-12T16:02:39Z dougk_: plus all other things being equal, we had 540 occurrences of a string containing a single blank space, due to optimized (formatter "Foo ~A ~A") stuff 2017-05-12T16:02:50Z dougk_: now we only have about 30 occurrences, so better locality 2017-05-12T16:03:43Z stassats: could (WRITE-STRING " " STREAM) be replaced with (write-char #\Space stream)? 2017-05-12T16:03:46Z stassats: will it be faster? 2017-05-12T16:03:48Z dougk_: 380 occurrences of a string containing a single period in (formatter "Mumble ~D.") 2017-05-12T16:04:12Z dougk_: probably, but redoing FORMATTER attacks the problem less aggressively. I'm fixing every manner of how this happens 2017-05-12T16:04:42Z dougk_: all our formatter lambdas are dynamically compiled to memory for "reasons". 2017-05-12T16:05:06Z dougk_: which is why i want the to-memory string coalescing in s-l-a-d. 2017-05-12T16:07:30Z stassats: ok, it's faster indeed 2017-05-12T16:07:33Z stassats: doing that 2017-05-12T16:12:10Z oleo quit (Quit: irc client terminated!) 2017-05-12T16:16:43Z dougk_: stassats: i'll tell you what would also help us avoid compiling formatters to memory, and perhaps you'll have an idea how to not do that. 2017-05-12T16:17:31Z dougk_: (funcall (formatter "hairy format string ....") ...), this would compile code for that same string, over and over, at every point the string is used 2017-05-12T16:17:57Z dougk_: so instead we have something approximately like (funcall (cached-formatter "...")) 2017-05-12T16:18:25Z dougk_: where cached-formatter maps the string to a compiled code object. This code is compiled at load-time, prior to image dump 2017-05-12T16:18:53Z dougk_: Now you really want to compile it at "true compile-time". That's a problem because there's no correct way to write cached-formatter. 2017-05-12T16:19:25Z dougk_: What it wants to expand to is just #'FMTS:a-function-that-formats-~A-blah-~X supposing that the string is "~A-blah-~X" 2017-05-12T16:19:41Z dougk_: but it can't know whether it *also* has to emit the DEFUN of FMTS:a-function-that-formats-~A-blah-~X 2017-05-12T16:20:07Z dougk_: it has to emit the defun certainly if it's the first time it's seen it ever, but the best you can do is emit it if the first time it's seen per file. 2017-05-12T16:20:29Z dougk_: but that also doesn't work, because what if some random code-walking-based macro decides to macroexpand cached-formatter for the hell of it 2017-05-12T16:20:33Z stassats: why isn't it inlined, though? 2017-05-12T16:20:37Z dougk_: so you're not actually producing code 2017-05-12T16:20:49Z dougk_: you don't want it inlined. It could be 2K of formatter code 2017-05-12T16:21:04Z dougk_: you want that function to be shared 2017-05-12T16:21:06Z stassats: but why doesn't it get inlined, it's just a local call 2017-05-12T16:21:49Z dougk_: ok, imagine it's 50K of formatter code and it's used in 100 different places 2017-05-12T16:22:09Z dougk_: in literally 400 files. Each of the 400 files doesn't want to compile that monster function 2017-05-12T16:22:30Z stassats: i don't see what the compiler is doing to prevent it from getting inlined, yet it's not inlined 2017-05-12T16:22:42Z stassats: but the same function inserted by hand does get inlined 2017-05-12T16:22:50Z dougk_: why are we talking about inlining ? it has nothing to do with it. We don't want it inlined 2017-05-12T16:25:05Z stassats: huh, a macro expanding into a lambda prevents the call to be inlined 2017-05-12T16:25:34Z dougk_: that's not the issue. this has nothing to do with inlining whatsoever. 2017-05-12T16:26:07Z stassats: i'm interested in interaction of macros and inlining 2017-05-12T16:27:35Z stassats: i see what's going on 2017-05-12T16:27:37Z shka_ joined #sbcl 2017-05-12T16:27:44Z dougk_: i'm interested in discovering whether a macro can decide whether it's actually compiling to fasl or not 2017-05-12T16:27:55Z dougk_: so that it can decide to emit (funcall (l-t-v #'f) arg1 arg2) versus (funcall (l-t-v (progn (defun f (&rest args) ..) #'f)) arg1 arg) 2017-05-12T16:28:04Z stassats: but if i fix (funcall (macro=>lambda)) then your (funcall (formatter)) will get inlined too 2017-05-12T16:28:19Z stassats: well, in its current form 2017-05-12T16:28:29Z dougk_: i give up. this has nothing to do with inlining. we explicitly don't want inlining 2017-05-12T16:28:38Z stassats: i guess nobody uses (funcall (formatter)) directly anyway 2017-05-12T16:29:23Z dougk quit (Ping timeout: 272 seconds) 2017-05-12T16:30:27Z stassats: dougk_: a macro can kinda decide, via *compile-file-pathname* 2017-05-12T16:30:35Z dougk_: nope, that lies 2017-05-12T16:30:52Z dougk_: it will say there's a pathname, but it can have a pathname and being expanded "for effect" by any other code-walking macro 2017-05-12T16:31:02Z dougk_: i want to know if this particular expansion is definitely going to generate code, or not 2017-05-12T16:31:32Z stassats: a portable macro? then obviously no 2017-05-12T16:31:43Z dougk_: unportable would be fine 2017-05-12T16:32:28Z stassats: hm 2017-05-12T16:32:45Z stassats: wait, why not use a compiler macro? 2017-05-12T16:32:56Z dougk_: but even that's really not good enough. we need to know if any expansion of the formatter, in any file, in a parallelized build, has yet emitted the code for the defun in question 2017-05-12T16:33:27Z dougk_: basically there's no way to achieve this in a parallelized build. at best you can emit multiple definitions of the same defun, and toss out all except one, at load-time (and ignore the warnings) 2017-05-12T16:33:54Z dougk_: so load-time compilation is the best i can do, it seems. 2017-05-12T16:34:41Z dougk_: and now we're back to the problem of "technically" non-coalescible strings due to 3.2.4 saying the COMPILE does not coalesce strings 2017-05-12T16:37:13Z stassats: you can still use compile-file 2017-05-12T16:38:37Z dougk_: sure, we could autogenerate a file of the defuns for the formatter strings. that's got other inhibiting factors for us 2017-05-12T16:39:07Z stassats: harder to make things anonymous 2017-05-12T16:40:00Z dougk_: don't really care about anonymity. The symbolic name of a formatter for a given string S is just SOME-PKG: where SOME-PKG is used for nothing but formatter strings 2017-05-12T16:40:59Z stassats: wild idea, coalescing functions with the same code 2017-05-12T16:41:19Z dougk_: ICF - identical code folding - is a thing 2017-05-12T16:41:29Z stassats: debug info would be different though 2017-05-12T16:42:04Z dougk_: also C raises the same question as we would: can you fold code where someone cared about EQ ness of the pointers to it ? 2017-05-12T16:42:23Z dougk joined #sbcl 2017-05-12T16:42:58Z dougk_: more accurately, do pointer need to be non-eq of the code is logically not the same, but has the same assembly code 2017-05-12T16:57:20Z adlai left #sbcl 2017-05-12T17:06:57Z slyrus_ quit (Ping timeout: 240 seconds) 2017-05-12T17:09:55Z m00natic quit (Read error: Connection reset by peer) 2017-05-12T17:28:34Z dougk quit (Ping timeout: 246 seconds) 2017-05-12T17:32:04Z dougk joined #sbcl 2017-05-12T17:33:33Z milanj quit (Quit: This computer has gone to sleep) 2017-05-12T17:46:35Z oleo joined #sbcl 2017-05-12T18:01:33Z eschatologist quit (Ping timeout: 268 seconds) 2017-05-12T18:02:18Z dougk__ joined #sbcl 2017-05-12T18:02:42Z eschatologist joined #sbcl 2017-05-12T18:04:11Z dougk quit (Ping timeout: 255 seconds) 2017-05-12T19:37:01Z milanj joined #sbcl 2017-05-12T20:07:54Z otjura joined #sbcl 2017-05-12T20:11:09Z scymtym quit (Ping timeout: 240 seconds) 2017-05-12T20:12:26Z slyrus_ joined #sbcl 2017-05-12T20:12:56Z otjura: is it impossible to silece style-warnings in sbcl? 2017-05-12T20:13:00Z angavrilov quit (Remote host closed the connection) 2017-05-12T20:13:00Z otjura: tried this in .sbclrc (declaim (sb-ext:muffle-conditions sb-ext:compiler-note sb-int:style-warn)) 2017-05-12T20:13:48Z stassats: sb-int:style-warn is not a condition 2017-05-12T20:13:54Z stassats: and you shouldn't silence them 2017-05-12T20:13:56Z stassats: anyway 2017-05-12T20:14:11Z stassats: at least not wholesale in .sbclrc 2017-05-12T20:14:29Z otjura: but if I want to is it possible? 2017-05-12T20:15:06Z otjura: sb-ext didn't seem to have anything useful so I simply tried to shove sb-int:style-warn there 2017-05-12T20:15:23Z stassats: you need to use condition specifiers, not just any random symbols 2017-05-12T20:17:44Z otjura: you mean like (muffle-conditions (case 'style-warn (dosomething))) 2017-05-12T20:18:10Z stassats: that's piling on more random stuff... 2017-05-12T20:24:08Z Baggers joined #sbcl 2017-05-12T20:25:27Z Baggers: I'm struggling with this extent note https://gist.github.com/cbaggers/df77de48f43b879a7b086cac53379e46. I havent been able to work out what it is protecting against and thus what its suggestions mean. Could anyone here offer a slightly simplified version? 2017-05-12T20:26:07Z stassats: that's not an error 2017-05-12T20:26:41Z Baggers: true. My mistake 2017-05-12T20:28:02Z Baggers: I can amend the gist. I am still interested in how sbcl would prefer I wrote this. 2017-05-12T20:29:30Z stassats: that's not real code, so, who knows 2017-05-12T20:30:20Z Baggers: I tried to cut it down to a minimal test case. I can not do that in future if it helps? I'm Happy to follow any guides you folks have. 2017-05-12T20:30:41Z stassats: well, in this case you cut down too much 2017-05-12T20:31:12Z Baggers: that's fair, I'll go fix that 2017-05-12T20:31:40Z stassats: since in this case there's actually nothing to be done, but your case may have real out of extent exits 2017-05-12T20:35:28Z otjura: well poking seemingly random stuff is the way I try to usually figure out how things work at first. 2017-05-12T20:35:44Z otjura: I take it there is no easy solution to suppressing style-warnings? 2017-05-12T20:36:40Z stassats: reading some documentation instead would be a better first step, like http://sbcl.org/manual/#Controlling-Verbosity 2017-05-12T20:37:38Z otjura: that was the first step indeed (you might note some similarity between what is there and what I pasted here) 2017-05-12T20:38:22Z stassats: well then, you just need to correctly specify the style-warning condition 2017-05-12T20:38:38Z otjura: from that doc I saw only compiler-note is mentioned in 4.1.2 which led me to ask here about style warnings 2017-05-12T20:41:10Z Baggers: stassats: https://gist.github.com/cbaggers/caead4e1571e0af413c6b725767f6f7b slightly larger though still somewhat reduced 2017-05-12T20:42:07Z Baggers: I like going through my code an fixing all style warnings (and addressing notes where it makes sense) I wouldnt normally fret over this but I wanted to understand what the note was telling me, rather than just muffle it 2017-05-12T20:42:20Z stassats: Baggers: that note appears to be bunk 2017-05-12T20:43:05Z Baggers: stassats: smashing, then I'll stop bothering about it. Thanks for taking a look! 2017-05-12T20:43:22Z stassats: well, it should go away 2017-05-12T20:45:07Z Baggers: as the extent analysis in sbcl evolves or just in general? 2017-05-12T20:54:22Z dougk__ quit (Ping timeout: 246 seconds) 2017-05-12T21:03:19Z dougk joined #sbcl 2017-05-12T21:11:34Z slyrus_ quit (Ping timeout: 245 seconds) 2017-05-12T21:15:42Z stassats: Baggers: that noisy note is no more 2017-05-12T21:16:36Z stassats: but that still leaves a case where it does actually allocate a value cell, but needlessly 2017-05-12T21:16:38Z stassats: (lambda () (declare (optimize (speed 3))) (lambda () (block nil (labels ((x () (return))) (declare (notinline x)) (x))))) 2017-05-12T21:17:49Z dougk quit (Ping timeout: 245 seconds) 2017-05-12T21:18:15Z stassats: it just checks that X is referenced by an escaping function, without knowing that the block escapes together with it 2017-05-12T21:21:27Z Baggers: that's great. thankyou 2017-05-12T21:22:57Z otjura quit (Ping timeout: 240 seconds) 2017-05-12T21:23:00Z slyrus_ joined #sbcl 2017-05-12T21:24:08Z igajsin quit (Ping timeout: 260 seconds) 2017-05-12T21:26:24Z scymtym joined #sbcl 2017-05-12T21:29:11Z stassats: meh, out of extent return detection is known to be broken anyway 2017-05-12T21:29:21Z stassats: (defun foo () (declare (optimize (speed 3))) (lambda () (block nil (labels ((x () (return))) (lambda () (x)))))) 2017-05-12T21:29:28Z stassats: (funcall (funcall (foo ))) => segfault 2017-05-12T21:36:18Z stassats: and this ties into the functional deletion madness 2017-05-12T21:38:25Z stassats: huh what, these segfaults have messed up restarts 2017-05-12T21:38:34Z oleo quit (Quit: irc client terminated!) 2017-05-12T21:42:37Z stassats: and messed up everything 2017-05-12T21:45:27Z shka_ quit (Ping timeout: 240 seconds) 2017-05-12T22:06:28Z slyrus_ quit (Ping timeout: 246 seconds) 2017-05-12T22:09:59Z burtons quit (Quit: My MacBook has gone to sleep. ZZZzzz…) 2017-05-12T22:24:13Z aeth: Why isn't this optimized away to constantly return 0f0? (defun foo (x) (declare (single-float x)) (* 0f0 x)) 2017-05-12T22:24:29Z stassats: nans 2017-05-12T22:24:53Z aeth: It's an overly simplified example, but I do have some inlined functions where parts of them ultimately contain 0f0 multiplication... 2017-05-12T22:24:53Z stassats: and -1 2017-05-12T22:25:14Z aeth: ah, that would be -0f0 2017-05-12T22:25:22Z aeth: (if -1f0) 2017-05-12T22:26:36Z stassats: and infinities 2017-05-12T22:27:05Z aeth: Unless safety is 0, though, nans and infinities will throw an exception, right? And there isn't a significant -0f0 vs. 0f0 difference, is there? 2017-05-12T22:27:24Z stassats: safety doesn't affect it 2017-05-12T22:27:37Z stassats: aeth: there is a big difference 2017-05-12T22:28:41Z aeth: (* 0f0 -0f0) => -0f0 2017-05-12T22:28:46Z aeth: (* -0f0 -0f0) => 0f0 2017-05-12T22:28:52Z aeth: Interesting, they follow the multiplication rules 2017-05-12T22:29:23Z aeth: They fail plusp/minusp, though 2017-05-12T22:29:54Z gingerale quit (Remote host closed the connection) 2017-05-12T22:30:57Z aeth: I'm guessing this is because plusp/minusp/zerop/=/etc. specially handle this case. 2017-05-12T22:31:06Z Bike: plusp/minusp are greater than zero/less than zero, not sign 2017-05-12T22:32:05Z stassats: aeth: they do not specially handle it 2017-05-12T22:37:10Z aeth: Bike: my bad, I forgot about that 2017-05-12T22:37:39Z aeth: They really should have been called positivep and negativep like Scheme's positive? and negative? because while it can still be confusing it's not misleading 2017-05-12T22:37:53Z aeth: because then you have nonnegative and nonpositive vs. positive and negative as a distinction etc 2017-05-12T22:38:30Z stassats: this is not the place to discuss that 2017-05-12T22:41:05Z aeth: right, it's probably about 40 years too late to discuss that anywhere. 2017-05-12T22:54:24Z aeth: Thanks for the help, though. Now I know I need to manually remove unnecessary multiplications by 0 where I can. 2017-05-12T23:02:26Z DeadTrickster joined #sbcl 2017-05-12T23:17:14Z oleo joined #sbcl 2017-05-12T23:48:36Z Baggers left #sbcl