2014-10-06T00:37:47Z njmurphy joined #sbcl 2014-10-06T01:10:43Z Bicyclidine quit (Ping timeout: 272 seconds) 2014-10-06T01:19:26Z oleo is now known as Guest11705 2014-10-06T01:20:18Z oleo__ joined #sbcl 2014-10-06T01:22:28Z Guest11705 quit (Ping timeout: 244 seconds) 2014-10-06T02:20:34Z LiamH1 joined #sbcl 2014-10-06T02:22:09Z LiamH1 quit (Client Quit) 2014-10-06T02:22:17Z LiamH quit (Ping timeout: 272 seconds) 2014-10-06T02:27:17Z scymtym_ quit (Ping timeout: 245 seconds) 2014-10-06T02:31:52Z ehaliewicz quit (Ping timeout: 245 seconds) 2014-10-06T02:39:02Z christoph_debian quit (Ping timeout: 245 seconds) 2014-10-06T02:52:20Z christoph_debian joined #sbcl 2014-10-06T03:55:42Z slyrus joined #sbcl 2014-10-06T04:14:32Z scymtym_ joined #sbcl 2014-10-06T04:22:04Z yacks quit (Quit: Leaving) 2014-10-06T04:22:25Z yacks joined #sbcl 2014-10-06T05:02:30Z oleo__ quit (Quit: Verlassend) 2014-10-06T05:22:21Z fikusz joined #sbcl 2014-10-06T05:36:40Z fikusz quit (Ping timeout: 260 seconds) 2014-10-06T05:47:34Z pranavrc joined #sbcl 2014-10-06T05:48:38Z edgar-rft joined #sbcl 2014-10-06T05:53:11Z slyrus quit (Ping timeout: 272 seconds) 2014-10-06T06:04:15Z slyrus joined #sbcl 2014-10-06T06:16:29Z jackdaniel quit (Quit: leaving) 2014-10-06T06:16:38Z jackdaniel joined #sbcl 2014-10-06T06:22:16Z fikusz joined #sbcl 2014-10-06T06:53:35Z stassats joined #sbcl 2014-10-06T07:12:16Z flip214_ is now known as flip214 2014-10-06T07:12:22Z flip214 quit (Changing host) 2014-10-06T07:12:22Z flip214 joined #sbcl 2014-10-06T07:21:31Z gingerale joined #sbcl 2014-10-06T07:30:49Z loke_: Latest SBCL from git fails to load XPATH 2014-10-06T07:30:55Z loke_: Is this a known problem? 2014-10-06T07:31:02Z stassats: yes 2014-10-06T07:31:06Z loke_: Thanks 2014-10-06T07:31:13Z loke_: Whose fault is it? 2014-10-06T07:31:22Z stassats: alphanumericp's 2014-10-06T07:31:57Z loke_: Right, but it seems to me that the issue is trigged by the combination of cl-ppcre, xpath and sbcl. Which component needs to be fixed? 2014-10-06T07:32:14Z stassats: alphanumericp 2014-10-06T07:32:20Z loke_: Is this part of the new Unicode stuff from the SoC? 2014-10-06T07:32:24Z stassats: yes 2014-10-06T07:33:11Z loke_: So presumably I should wait for a SBCL release that doesn't suffer from this? Do you happen to know which changelist I should roll back to? 2014-10-06T07:33:58Z stassats: the latest release tag doesn't, that's clear 2014-10-06T07:34:14Z loke_: OK, thanks. I'll use that one 2014-10-06T07:35:07Z scymtym_: loke_: if you're not on i686 and do use extended sequences, the latest release should be no different from master apart from the unicode stuff 2014-10-06T07:35:21Z scymtym_: do /not/ use extended sequences 2014-10-06T07:35:24Z stassats: and gc stuff 2014-10-06T07:35:28Z loke_: I have another issue (the reason I wanted to try with the latest git version). I keep getting the following warning message when deploying my application on two different hosts (centos and ubuntu). But I never see it on OSX, or my development Ubuntu machine: 2014-10-06T07:35:29Z loke_: WARNING: Starting a poll(2) without a timeout while interrupts are disabled. 2014-10-06T07:35:47Z stassats: are you using timers? 2014-10-06T07:35:54Z loke_: stassats: Yes 2014-10-06T07:36:01Z loke_: A _lot_ of them 2014-10-06T07:36:05Z stassats: interrupts are disabled when a timer is triggered 2014-10-06T07:36:19Z stassats: which is stupid, if you ask me 2014-10-06T07:37:11Z stassats: though, timers implemented with interrupts is stupid in itself 2014-10-06T07:37:43Z loke_: Hmm... But I don't call poll from a timer handler, as far as I know. 2014-10-06T07:38:12Z stassats: something does it for you 2014-10-06T07:38:16Z stassats: streams, for example 2014-10-06T07:38:22Z loke_: Hmm... Probably 2014-10-06T07:38:40Z stassats: well, just enable interrupts 2014-10-06T07:38:47Z loke_: I'll look at it. So it's definitely a timer then? Their use is limited to a few functions, so analysing should be easy enough 2014-10-06T07:39:00Z stassats: as in sb-sys:with-interrupts 2014-10-06T07:39:08Z loke_: Cool. I'll play with that 2014-10-06T07:39:17Z loke_: So it's safe to do from a timer handler? 2014-10-06T07:39:54Z flip214: christoph_debian: any chance to get a current SBCL on ARM (ie. raspbian), too? should work now AFAIK, right? 2014-10-06T07:40:08Z stassats: you may exceed interrupt depth, but you shouldn't really use timers which interrupt, creating new threads is a better idea 2014-10-06T07:40:16Z scymtym_: will enabling interrupts in the handler cause re-entry if the handler is too slow? 2014-10-06T07:40:58Z stassats: i hope it doesn't 2014-10-06T07:41:46Z scymtym_: but yeah, making threads sounds like the better idea anyway 2014-10-06T07:42:06Z yacks quit (Ping timeout: 272 seconds) 2014-10-06T07:42:51Z stassats: is slime completion a lot slower or is it just me? 2014-10-06T07:43:48Z stassats: all the time is spent in CHAR-DOWNCASE 2014-10-06T07:45:45Z loke_: This is weird. I'm looking at my timer usage, and all I do in the handler is to add an entry to a queue and do a condition-notify. There is a separate thread pulling stuff off of the queue to send to other components. The warning must come from somewhere else. Is there a way to get a stack trace when the message is printed? 2014-10-06T07:46:12Z stassats: four times slower 2014-10-06T07:47:29Z stassats: making completion basically unusable 2014-10-06T07:48:10Z DGASAU joined #sbcl 2014-10-06T07:49:25Z stassats: i guess i'll go to a pre unicode changes too, since i can't work with that 2014-10-06T08:04:59Z angavrilov joined #sbcl 2014-10-06T08:07:29Z Krystof: stassats: report to the list; I'm not sure krzysz00 reads scrollback religiously 2014-10-06T08:07:58Z stassats: but can char-downcase be made faster? 2014-10-06T08:08:04Z stassats: it spends all the time in gethash 2014-10-06T08:08:50Z Krystof: if it was faster before, it might signal that the rewrite of the uncode database included a slow path 2014-10-06T08:09:42Z flip214: stassats: can you disassemble to see whether the "deftransform char-downcase" is applied there? 2014-10-06T08:10:28Z stassats: it can't be applied 2014-10-06T08:11:14Z flip214: ouch, char-downcase uses both-case-p, which uses misc-index, which .... 2014-10-06T08:11:26Z stassats: both-case-p is fast 2014-10-06T08:11:30Z stassats: as i said, it's all in gethash 2014-10-06T08:12:38Z flip214: okay 2014-10-06T08:16:21Z stassats: building the HEAD sbcl again to see why 2014-10-06T08:24:09Z stassats: although misc-index could be better too 2014-10-06T08:24:45Z stassats: **character-high-pages** and **character-low-pages** don't have their type defined 2014-10-06T08:30:04Z stassats: though in calling char-downcase directly, misc-index dominates 2014-10-06T08:30:46Z flip214 knew it ;) 2014-10-06T08:30:56Z stassats: it doesn't in the real test case 2014-10-06T08:32:06Z stassats: ok, it gethash dominates when called from string-downcase 2014-10-06T08:33:05Z stassats: the hash-table could be an EQ one too 2014-10-06T08:33:16Z stassats: when not in the xc 2014-10-06T08:39:11Z stassats: oh, of course 2014-10-06T08:39:33Z stassats: gethash caches things, and testing string-downcase with one char is useless 2014-10-06T08:40:10Z kanru quit (Remote host closed the connection) 2014-10-06T08:41:26Z stassats: char-downcase that is 2014-10-06T08:43:04Z stassats: so, it's not 4 times slower 2014-10-06T08:43:31Z stassats: 4 times is with the same char 2014-10-06T08:43:46Z stassats: (locally (declare (notinline char-downcase)) (time (loop for i to 500000 DO (char-downcase #\b) (char-downcase #\a)))) is around 1000 times slower 2014-10-06T08:44:38Z kanru joined #sbcl 2014-10-06T08:45:13Z |3b| wonders if unicode is regular enough that downcase could be implemented in a reasonably small number of logic ops 2014-10-06T08:45:29Z loke_: Is the case mapping information stored in hash maps now? I presume it was a simple 256-entry table before? 2014-10-06T08:46:07Z loke_: |3b|: it's not 2014-10-06T08:46:13Z stassats: make it ~1400 times slower 2014-10-06T08:46:16Z loke_: |3b|: and it's worse. It's also locale-dependent 2014-10-06T08:46:35Z flip214: hmmm, superoptimizer to the rescue! 2014-10-06T08:46:37Z |3b|: loke_: well, locale-dependent just means it couldn't be inlined 2014-10-06T08:46:47Z loke_: |3b|: The case fold table is here: 2014-10-06T08:46:51Z stassats: 4 times didn't sound like a launchpad ticket, 1400 does 2014-10-06T08:46:51Z loke_: ed 2014-10-06T08:46:51Z loke_: |3b|: The case fo 2014-10-06T08:46:53Z loke_: oops 2014-10-06T08:46:56Z loke_: http://www.unicode.org/Public/UNIDATA/CaseFolding.txt 2014-10-06T08:47:16Z |3b|: that table doesn't say much 2014-10-06T08:47:57Z loke_: |3b|: well, you might want to read this 2014-10-06T08:47:58Z loke_: http://www.unicode.org/faq/casemap_charprop.html 2014-10-06T08:48:15Z |3b|: not obvious from that that it is just 1 bit in ASCII for example 2014-10-06T08:48:53Z |3b| isn't talking about the semantics, just the 21bits -> 21 bits mapping 2014-10-06T08:49:20Z flip214: if that is the whole table, at ~1300 entries it doesn't seem that big for a few compare trees + logic ops. 2014-10-06T08:49:31Z loke_: |3b|: well, the number of cased character is actually very small, since most scripts don't have case. 2014-10-06T08:49:31Z DGASAU quit (Read error: Connection reset by peer) 2014-10-06T08:49:47Z loke_: flip214: That is the whole table, as far as I know. 2014-10-06T08:50:01Z stassats: Size: 3392 2014-10-06T08:50:16Z stassats: scratch that, Count: 2236 2014-10-06T08:50:27Z DGASAU joined #sbcl 2014-10-06T08:50:27Z |3b|: question is whether more than just the ascii block are arranged similarly with only 1 or 2 bit difference 2014-10-06T08:50:54Z flip214: sounds like a trivial challenge for pkhuongs blog ;) 2014-10-06T08:51:00Z stassats: it uses a custom hash function 2014-10-06T08:51:07Z stassats: although it doesn't shine in the profiler 2014-10-06T08:51:42Z stassats: i presume it has a lot of collisions 2014-10-06T08:52:09Z loke_: I just checked cyrillic. Tha main characters are divided in a similar way, but not for the second half of the block (contains more rare characters) 2014-10-06T08:52:13Z loke_: http://en.wikipedia.org/wiki/Cyrillic_(Unicode_block) 2014-10-06T08:52:55Z loke_: stassats: Since the data is static, can't you generate a perfect hashing function for it? 2014-10-06T08:53:02Z flip214: well, some huffman-like thing should be fine here ... group translations in a block, group blocks by operation, and then build a tree 2014-10-06T08:53:06Z stassats: _i_ can't 2014-10-06T08:53:18Z loke_: Pkuhong can, I'm sure :-) 2014-10-06T08:53:20Z stassats: _i_ don't want to 2014-10-06T08:53:33Z loke_: Or just use this: https://www.gnu.org/software/gperf/ 2014-10-06T08:53:37Z stassats: anyhow, back to work and using older sbcl 2014-10-06T08:53:47Z flip214: gperf - Perfect hash function generator 2014-10-06T08:53:53Z flip214: ace-gperf - ACE perfect hash function generator 2014-10-06T08:54:11Z |3b|: yeah, perfect hash was my next guess after just pure bit ops 2014-10-06T08:54:33Z flip214: I'd still believe that divide-and-conquer would be fine, too. 2014-10-06T08:54:44Z |3b|: probably 2014-10-06T08:55:41Z stassats: and i'm going to put (+ ६ ೫) into my code 2014-10-06T08:56:41Z loke_: An even easier solution, I guess, would be to simply use a index lookup. The table wouldn't be that large since it's only a handful of blocks that have case 2014-10-06T08:57:00Z loke_: One would just figure out a quick way to determine if the character is in a block with case 2014-10-06T08:57:06Z flip214: 1FAF; S; 1FA7; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI 2014-10-06T08:57:38Z flip214: loke_: that would be a few ifs. and if you're that far, a simple subtract/XOR or whatever is enough for many cases, too... 2014-10-06T08:58:06Z flip214: although, it's noteworthy that the result of a (char-downcase) can be a string... 2014-10-06T08:59:00Z stassats: can it? 2014-10-06T08:59:19Z loke_: flip214: depends if you're using case mapping or case folding 2014-10-06T08:59:37Z loke_: Case mapping is a 1/to/1 mapping used by things such as programming languages 2014-10-06T08:59:48Z loke_: case folding can result is strings, yes 2014-10-06T09:00:01Z flip214: well, would that mean that downcase/upcase need to look at several characters, to provide the same result back? 2014-10-06T09:00:21Z loke_: flip214: for case folding, yes. But it depends on locale 2014-10-06T09:01:08Z loke_: Actually. I'm re-reading the faq, and I used the wrong terminology. 2014-10-06T09:01:46Z loke_: WHat I called case mapping is the case mapping information in the main unicode character list, not the file I posted earlier. 2014-10-06T09:04:08Z karswell` is now known as karswell 2014-10-06T09:10:10Z Krystof: stassats: this is easy. Will fix 2014-10-06T09:10:26Z stassats: great 2014-10-06T09:11:23Z Krystof: the code already figures out quickly if it is in a block with case, or indeed whether the character itself has case; that's what both-case-p does. 2014-10-06T09:12:12Z Krystof: ironically, the hash function is already a perfect hash; we just don't exploit it 2014-10-06T09:20:06Z loke_: Krystof: thanks, very interesting 2014-10-06T09:23:54Z fridim__ joined #sbcl 2014-10-06T09:25:21Z thoto quit (Ping timeout: 272 seconds) 2014-10-06T09:27:21Z Krystof: oh, wait, is there also a trivial bug? I was here messing with the data structure, but... 2014-10-06T09:27:47Z Krystof: I think it's possible that the hash-function of this hash table maps every character with case to a key of 0 2014-10-06T09:28:33Z Krystof: stassats: if you change the (ash key 6) in the :hash-function to (ash key -6), do things start working better? 2014-10-06T09:29:57Z flip214: Krystof: are you saying that it was an inperfect hash? ;) 2014-10-06T09:30:48Z Krystof: very imperfect :) 2014-10-06T09:31:10Z Krystof: I think that it's probably still worth pursuing what I'm doing, but it would be nice to know whether this solves the gross problem 2014-10-06T09:31:50Z thoto joined #sbcl 2014-10-06T09:32:13Z stassats: doesn't seem to make a difference 2014-10-06T09:32:43Z stassats: wouldn't -6 drive it towards zero? 2014-10-06T09:33:01Z Krystof: it's a first-stage lookup 2014-10-06T09:33:29Z Krystof: **character-case-pages** contains a list of which pages (of 64 characters each) actually have characters with case 2014-10-06T09:33:58Z Krystof: so using a key of 65 (for #\A) should return 0 from (sorted-position (ash key -6) **character-case-pages**) 2014-10-06T09:34:02Z stassats: but -6 does look like the correct thing 2014-10-06T09:34:51Z Krystof: I find it surprising that there's no difference between a hash table where everything collides, and a hash table where at least if I've understood things correctly nothing collides 2014-10-06T09:35:26Z loke_: Krystof: Why is that surprising? 2014-10-06T09:35:35Z loke_: Other than performance, it shouldn't make a difference 2014-10-06T09:36:18Z stassats: we are talking about performance 2014-10-06T09:36:49Z loke_: Oh, sorry. Yeah, I misunderstood. 2014-10-06T09:38:28Z stassats: so, why shift at all? 2014-10-06T09:39:18Z Krystof: in a hash table? only to get a perfect hash 2014-10-06T09:39:32Z Krystof: if you replace the hash table by an array, to *implement* a perfect hash 2014-10-06T09:39:44Z Krystof: without needing a #x110000-element array 2014-10-06T09:39:51Z stassats: the value from **character-case-pages** is then sifted back 6 bits, why not store unshifted? 2014-10-06T09:40:08Z Krystof: it's not stored, it's used as a key 2014-10-06T09:40:21Z Krystof: along with the low 6 bits of the character itself 2014-10-06T09:40:30Z Krystof: #\A has a different case mapping from #\B, but they're on the same page 2014-10-06T09:41:57Z stassats: but why shift twice if you only need (logand x #x-3F) once? 2014-10-06T09:42:33Z Krystof: I don't understand you 2014-10-06T09:43:26Z stassats: (let ((page (sorted-position (ASH KEY -6) **character-case-pages**))) (if page (+ (ASH PAGE 6) (ldb (byte 6 0) key)) 0)) => (let ((page (sorted-position (logand key #x-3f) **character-case-pages**))) (if page (+ page (ldb (byte 6 0) key)) 0)) 2014-10-06T09:43:50Z stassats: and **character-case-pages** has things shifted by 6 to the current valus 2014-10-06T09:44:08Z Krystof: the call to sorted-position returns the index of the page 2014-10-06T09:44:18Z Krystof: some number between 0 and about 55 or so 2014-10-06T09:44:34Z Krystof: we need to combine the index of the page with the position of the character on the page to get some unique key 2014-10-06T09:44:39Z stassats: ok then 2014-10-06T09:44:57Z Krystof: one easy way of doing that is to shift the index of the page by 6 bits, and add in the six low bits of the character 2014-10-06T09:45:22Z flip214: that's not "unique" ;) 2014-10-06T09:45:31Z stassats: but that's not the slow part anyway 2014-10-06T09:45:55Z Krystof: flip214: it is for all of the arguments that this function will ever receive 2014-10-06T09:46:28Z Krystof: stassats: if this does in fact produce unique keys, it *ought* to be the slow part :-/ 2014-10-06T09:46:42Z stassats: not according to the profiler 2014-10-06T09:46:53Z stassats: let me try to profile with -6 2014-10-06T09:47:39Z stassats: 25% is spent in EQL 2014-10-06T09:48:31Z stassats: EQL 20.11, (LAMBDA (SB-IMPL::KEY) :IN #:!CHARACTER-DATABASE-COLD-INIT) 3.80 2014-10-06T09:50:09Z stassats: which is strange, because i set it to #'EQ 2014-10-06T09:51:10Z stassats: but, now it's not strange, because component-from-pc can't distinguish between assembly routines 2014-10-06T09:51:30Z stassats: if it is 2014-10-06T09:51:44Z Krystof: and of *course* I can't get this right first time and now I have to work out what's going on in cold-init :-9 2014-10-06T09:52:02Z Krystof: gives you more time to work out why it's slow with -6 2014-10-06T09:52:15Z stassats: i guess it just didn't get redefined 2014-10-06T09:52:30Z Krystof: did you not do a full build? 2014-10-06T09:52:41Z stassats: of course not 2014-10-06T09:52:49Z Krystof: :) 2014-10-06T09:53:04Z stassats: ok, i see 2014-10-06T09:53:20Z stassats: yeah, now it is fast 2014-10-06T09:54:05Z stassats: 1400 => 10 times 2014-10-06T09:54:09Z Krystof: excellent 2014-10-06T09:54:24Z Krystof: I can probably get you back another factor of 2 or 3 on that 2014-10-06T09:54:37Z Krystof: after I sort out what I've done wrong 2014-10-06T09:54:58Z stassats: now misc-index shows up 2014-10-06T09:55:08Z stassats: that needs a couple of declaims for array globals 2014-10-06T09:56:48Z Krystof: ok, back in a bit 2014-10-06T09:57:05Z stassats: added a couple of declarations, it stopped consing 2014-10-06T09:57:24Z stassats: that'd be 7 times slower now 2014-10-06T10:04:43Z flip214: stassats: compared to without unicode? 2014-10-06T10:04:52Z stassats: yes 2014-10-06T10:07:28Z stassats: 6.5 now 2014-10-06T10:08:35Z stassats: 6.1 2014-10-06T10:21:16Z Krystof: is completion now usable? 2014-10-06T10:21:37Z stassats: yeah 2014-10-06T10:22:06Z stassats: having it faster wouldn't hurt, though 2014-10-06T10:22:24Z Krystof: still working on something to remove the unnecessary hash table 2014-10-06T10:22:40Z Krystof: I mean, I had a coffee in between. Maybe that will help 2014-10-06T10:24:01Z scymtym_ quit (Ping timeout: 272 seconds) 2014-10-06T10:28:20Z flip214: Krystof: if it's a perfect hash, why not simply look up in an array instead? 2014-10-06T10:29:46Z stassats: disjoint? 2014-10-06T10:31:13Z Krystof: flip214: this is exactly what I'm doing 2014-10-06T10:31:41Z Krystof: it just takes time to pacify the elder gods in order for the build to work 2014-10-06T10:49:06Z Krystof: stassats: can you try ? 2014-10-06T10:49:27Z stassats: i'll try to try it 2014-10-06T10:49:39Z Krystof: (needs full build, obviously) 2014-10-06T10:49:47Z stassats: challenge accepted! 2014-10-06T10:50:49Z stassats: one chunk rejected 2014-10-06T10:51:03Z stassats: i'm on HEAD 2014-10-06T10:51:03Z flip214: Krystof: is an array of CONSes the same size as two arrays? 2014-10-06T10:51:22Z flip214: then you could avoid one more indirection. 2014-10-06T10:51:39Z Krystof: stassats: then you probably needs patches 0001-3 too, hold on 2014-10-06T10:51:55Z stassats: can you git diff HEAD^^^ or something? 2014-10-06T10:52:21Z Krystof: 2014-10-06T10:52:34Z Krystof: 2014-10-06T10:52:43Z Krystof: <0003-whoops-The-perfect-hash-function-for-case-conversion.patch> 2014-10-06T10:52:58Z Krystof: SS 2014-10-06T11:29:32Z flip214: lists of char-codes? why not array of characters? ;) 2014-10-06T11:29:44Z Krystof: because building is a pain 2014-10-06T11:30:13Z Krystof: and we're into the realm of "not going to amortize the time spent on it" 2014-10-06T11:30:27Z Krystof: unless someone pays someone else to do it, of course 2014-10-06T11:30:29Z stassats: when was that true? 2014-10-06T11:30:47Z Krystof: the 1400->6 change 2014-10-06T11:31:13Z flip214: Krystof: even if the array/string would know how long it is? Ie. amortizing in caller code? 2014-10-06T11:31:16Z stassats: yeah, but not usually 2014-10-06T11:31:16Z Krystof: specifically, not going to amortize _my_ time 2014-10-06T11:31:30Z Krystof: someone else can sort out the last 30% if they care 2014-10-06T11:32:35Z stassats: well, it doesn't handle multiple characters now anyway? 2014-10-06T11:32:44Z Krystof: yes it does 2014-10-06T11:33:16Z stassats: not really, (both-case-p #\LATIN_SMALL_LIGATURE_FF) => NIL 2014-10-06T11:33:42Z Krystof: (sb-unicode:uppercase "ß") -> "SS" 2014-10-06T11:33:58Z Krystof: you can't use the CL functions because they assume a 1-char to 1-char mapping 2014-10-06T11:33:59Z stassats: that'd be broken now 2014-10-06T11:34:08Z Krystof: yes, but I've fixed it here 2014-10-06T11:34:10Z stassats: ok 2014-10-06T11:34:30Z stassats: so, special tables for cl functions? 2014-10-06T11:35:04Z Krystof: at the moment they can share the same table, and guard against looking up the wrong stuff with both-case-p vs sb-unicode:cased-p 2014-10-06T11:35:55Z stassats: **character-cases** is too long, ain't it? 2014-10-06T11:36:10Z stassats: from 3360 it's all zeros 2014-10-06T11:37:16Z Krystof: the last page of 64 characters has some trailing zeros 2014-10-06T11:37:26Z Krystof: but unless you want to make the lookup more complicated, they have to be there 2014-10-06T11:37:50Z Krystof: remember, the index for a character is (+ (page-of character) (low-6-bits-of character)) 2014-10-06T11:38:08Z stassats: but nothing checks for zeros 2014-10-06T11:38:30Z Krystof: true 2014-10-06T11:38:56Z stassats: (count 0 sb-int::**character-cases**) => 1156 2014-10-06T11:39:15Z Krystof: right, but if you compress the table the lookup function has to be more complicated 2014-10-06T11:39:55Z stassats: does it have to call upper-case-p? 2014-10-06T11:41:38Z Krystof: I think it could manage with just both-case-p 2014-10-06T11:42:00Z Krystof: depends what's more expensive: the extra test in both-case-p or the lookup 2014-10-06T11:43:26Z stassats: there's your 30% 2014-10-06T11:43:48Z Krystof: I guess upper-case-p and lower-case-p have two calls to misc-index (once for both-case-p, and once for ucd-general-category 2014-10-06T11:45:05Z stassats: so, (char-downcase #\a) is now the same speed, (char-downcase #\A) is twice as fast 2014-10-06T11:45:05Z Krystof: I'd prefer fixing upper/lower-case-p to be faster than moving back to both-case-p 2014-10-06T11:45:16Z Krystof: haha 2014-10-06T11:46:01Z Krystof: hang on, before all this excitement I was going to write a test case for alphanumericp 2014-10-06T11:49:43Z stassats: ok, so, with a fixed upper-case-p, the no-op operations is 10 ms faster, and the op is 10 ms slower 2014-10-06T11:51:07Z stassats: what happens when lookup-char-case-info is given a non-bothcase char? 2014-10-06T11:54:03Z stassats: can it collide with another character? 2014-10-06T11:56:06Z Krystof: if the character is on a page with no caseful characters, it will try to read off the end of **character-cases** 2014-10-06T11:56:37Z Krystof: if the character is on a page with caseful characters, but does not itself have case, lookup-char-case-info will return 0 (and clients will try to take the CAR or CDR of 0) 2014-10-06T12:00:33Z stassats: so, we can do that instead of both-case-p? 2014-10-06T12:02:25Z eudoxia joined #sbcl 2014-10-06T12:07:19Z stassats: ok, that way it's about twice as fast as it was in the (char-downcase #\a) case, and four times in (char-downcase #\A) 2014-10-06T12:08:59Z Krystof: do what? 2014-10-06T12:09:10Z stassats: check for zeros and 255s 2014-10-06T12:10:11Z Krystof: ok. Let me commit these gross correctness / enormospeedups 2014-10-06T12:10:17Z Krystof: (just running tests) 2014-10-06T12:10:39Z Krystof: then you can sort the rest out 2014-10-06T12:10:56Z stassats: right 2014-10-06T12:20:27Z eudoxia quit (Quit: Lost terminal) 2014-10-06T12:42:55Z fikusz quit (Ping timeout: 244 seconds) 2014-10-06T13:11:34Z Hache_ joined #sbcl 2014-10-06T13:37:59Z pkhuong: Krystof: you committed some #+nil :\ 2014-10-06T13:40:41Z christoph_debian: flip214: my armel is a armv5te without neon. if it bootstrapps there I can add it 2014-10-06T13:41:05Z stassats: sbcl doesn't need neon 2014-10-06T13:41:05Z christoph_debian: tough fixing the powerpc build is of higher priority to me right now 2014-10-06T13:41:14Z stassats: what's wrong with ppc? 2014-10-06T13:41:18Z stassats: works fine here 2014-10-06T13:41:36Z christoph_debian: 1.2.3 fails with self-test failure in sb-concurrency 2014-10-06T13:41:44Z christoph_debian: https://buildd.debian.org/status/fetch.php?pkg=sbcl&arch=powerpc&ver=2%3A1.2.3-1&stamp=1410937921 2014-10-06T13:41:46Z stassats: that was always the case 2014-10-06T13:42:18Z stassats: and is because of memory ordering 2014-10-06T13:42:23Z christoph_debian: I'm pretty sure it wasn't for the 1.1.6 2014-10-06T13:42:29Z stassats: i'm pretty sure it was 2014-10-06T13:42:41Z christoph_debian: at least it didn't fail the contrib build there 2014-10-06T13:42:53Z christoph_debian: ah! 2014-10-06T13:43:05Z christoph_debian: or I had threads disabled untill recently 2014-10-06T13:43:15Z christoph_debian: that'd explain it of course 2014-10-06T13:45:37Z pranavrc quit 2014-10-06T13:47:06Z Krystof: pkhuong: *sigh* 2014-10-06T13:47:10Z Krystof: it is still logically monday morning 2014-10-06T13:48:41Z Krystof: stassats: are you lining up some commits? 2014-10-06T13:48:46Z stassats: not really 2014-10-06T13:48:56Z Krystof: then I will remove the evidence of my own slapdashery 2014-10-06T14:05:32Z pkhuong: christoph_debian: if I send a patch your way for sb concurrency, can you easily test it? 2014-10-06T14:05:50Z christoph_debian: I should jep 2014-10-06T14:06:16Z pkhuong: it's been around for ages, I'm pretty sure I know exactly how to fix it, I just never had the time/energy to run a test. 2014-10-06T14:08:14Z christoph_debian: jep the power thing is up and I have a almost recent sbcl there so testing should be quite doable 2014-10-06T14:08:20Z nyef joined #sbcl 2014-10-06T14:14:17Z oleo joined #sbcl 2014-10-06T14:14:18Z alchemis7 left #sbcl 2014-10-06T14:14:19Z alchemis7 joined #sbcl 2014-10-06T14:50:01Z krzysz00 quit (Ping timeout: 272 seconds) 2014-10-06T15:10:43Z krzysz00 joined #sbcl 2014-10-06T15:14:33Z krzysz00: Krystof: Thanks for fixing the problems with that hash table (I just checked scrollback) 2014-10-06T15:15:02Z Krystof: that's OK 2014-10-06T15:15:10Z krzysz00: I could probably write tests for a few more things after class 2014-10-06T15:15:32Z Krystof: I'm nowhere near being able to look at the non-sb-unicode test failure, whatever that is 2014-10-06T15:20:29Z krzysz00 quit (Ping timeout: 260 seconds) 2014-10-06T15:22:34Z krzysz00 joined #sbcl 2014-10-06T15:24:04Z krzysz00: That failure (if its still around) has something to do with the PRINT <-> READ round trip, and it was introduced in the Unicode 1 refactoring. 2014-10-06T15:24:35Z krzysz00: I checked, and each individual character had the same cononical name before and after the change, so I'm stumped too 2014-10-06T15:35:24Z stassats quit (Ping timeout: 260 seconds) 2014-10-06T15:44:48Z DGASAU quit (Remote host closed the connection) 2014-10-06T15:45:35Z DGASAU joined #sbcl 2014-10-06T15:52:21Z krzysz00 quit (Ping timeout: 246 seconds) 2014-10-06T15:55:44Z krzysz00 joined #sbcl 2014-10-06T16:09:48Z krzysz00 quit (Quit: Lost terminal) 2014-10-06T16:13:37Z fridim__ quit (Ping timeout: 272 seconds) 2014-10-06T16:15:06Z njmurphy quit (Ping timeout: 246 seconds) 2014-10-06T16:30:13Z slyrus quit (Ping timeout: 258 seconds) 2014-10-06T16:33:25Z fikusz joined #sbcl 2014-10-06T16:38:37Z attila_lendvai joined #sbcl 2014-10-06T16:38:37Z attila_lendvai quit (Changing host) 2014-10-06T16:38:37Z attila_lendvai joined #sbcl 2014-10-06T17:09:36Z Krystof: I think I know the problem: it's not actually related to the unicode change 2014-10-06T17:09:39Z Krystof: it's a pretty-printer bug 2014-10-06T17:11:01Z slyrus joined #sbcl 2014-10-06T17:11:04Z loke_ quit (Remote host closed the connection) 2014-10-06T17:52:56Z scymtym_ joined #sbcl 2014-10-06T18:06:11Z Hache_ quit (Remote host closed the connection) 2014-10-06T18:10:42Z DGASAU quit (Ping timeout: 245 seconds) 2014-10-06T18:14:45Z DGASAU joined #sbcl 2014-10-06T18:21:53Z DGASAU` joined #sbcl 2014-10-06T18:24:52Z DGASAU quit (Ping timeout: 245 seconds) 2014-10-06T18:29:26Z DGASAU` is now known as DGASAU 2014-10-06T18:37:47Z scymtym_ quit (Ping timeout: 245 seconds) 2014-10-06T19:05:44Z krzysz00 joined #sbcl 2014-10-06T19:06:28Z Krystof: "When a line break is inserted by any type of conditional newline, any blanks that immediately precede the conditional newline are omitted from the output and indentation is introduced at the beginning of the next line." 2014-10-06T19:06:32Z Krystof: EPIC FAIL 2014-10-06T19:07:30Z nyef quit (Ping timeout: 250 seconds) 2014-10-06T19:08:21Z Krystof: "For the graphic standard characters, the character itself is always used for printing in #\ notation---even if the character also has a name[5]." 2014-10-06T19:08:53Z Krystof: "Space is defined to be graphic." 2014-10-06T19:11:28Z krzysz00 quit (Ping timeout: 260 seconds) 2014-10-06T19:13:48Z Krystof: (in case anyone is wondering: this explains scymtym's bug in the printer: we faithfully print "#\\ " to the pretty stream, then a newline, and that newline "helpfully" erases the previous space character) 2014-10-06T19:14:37Z krzysz00 joined #sbcl 2014-10-06T19:15:39Z Krystof: it's also nothing to do with the new sb-unicode stuff; it's been around for ever 2014-10-06T19:15:46Z Krystof: dunno why the unicode stuff exposed it 2014-10-06T19:17:15Z Krystof: probably the least harmful thing to do is to output #\Space rather than #\ if *print-readably* is true 2014-10-06T19:17:22Z Krystof: pfdietz would probably frown, but... 2014-10-06T19:19:06Z nyef joined #sbcl 2014-10-06T19:20:20Z krzysz00 quit (Ping timeout: 260 seconds) 2014-10-06T19:22:39Z edgar-rft quit (Quit: continuation expired because of unknown reasons) 2014-10-06T19:26:32Z krzysz00 joined #sbcl 2014-10-06T19:33:24Z krzysz00 quit (Ping timeout: 260 seconds) 2014-10-06T19:35:25Z krzysz00 joined #sbcl 2014-10-06T19:38:12Z slyrus quit (Ping timeout: 245 seconds) 2014-10-06T19:38:49Z angavrilov quit (Remote host closed the connection) 2014-10-06T19:42:39Z rpg joined #sbcl 2014-10-06T19:43:54Z slyrus joined #sbcl 2014-10-06T19:44:08Z krzysz00 quit (Ping timeout: 260 seconds) 2014-10-06T20:02:28Z rpg quit (Remote host closed the connection) 2014-10-06T20:02:36Z rpg joined #sbcl 2014-10-06T20:18:47Z krzysz00 joined #sbcl 2014-10-06T20:23:01Z christoph_debian: pkhuong: if you have the patch for testing you can also just shoot me a mail ( christoph@debian.org ) 2014-10-06T20:24:06Z pkhuong: christoph_debian: all right. Tomorrow, hopefully 2014-10-06T20:25:17Z fikusz quit (Ping timeout: 272 seconds) 2014-10-06T20:37:44Z fikusz joined #sbcl 2014-10-06T20:41:28Z foom: I'd be in favor of #\Space rather than "#\ " always. #\ may be readable by an implementation, but certainly is not by humans. 2014-10-06T20:41:36Z foom: IMHO it shouldn't even be allowed for input. 2014-10-06T21:18:25Z tmh_ is now known as sav 2014-10-06T21:19:02Z Bicyclidine joined #sbcl 2014-10-06T21:39:09Z fikusz quit (Ping timeout: 272 seconds) 2014-10-06T21:51:22Z fikusz joined #sbcl 2014-10-06T21:51:26Z rpg quit (Quit: rpg) 2014-10-06T21:59:51Z Bicyclidine quit (Ping timeout: 246 seconds) 2014-10-06T22:13:32Z attila_lendvai quit (Quit: Leaving.) 2014-10-06T22:38:01Z njmurphy joined #sbcl 2014-10-06T22:41:37Z krzysz00 quit (Quit: leaving) 2014-10-06T23:12:44Z DGASAU quit (Remote host closed the connection) 2014-10-06T23:13:01Z Bicyclidine joined #sbcl 2014-10-06T23:13:47Z DGASAU joined #sbcl 2014-10-06T23:27:47Z DGASAU quit (Ping timeout: 245 seconds) 2014-10-06T23:38:53Z DGASAU joined #sbcl 2014-10-06T23:54:02Z DGASAU quit (Ping timeout: 245 seconds)