00:01:20 ugh 00:01:31 copy + pasting glibc's strchr and remnoving checks leads to lower performance 00:01:55 comexk: add more compiler switches 00:02:07 -O3 -fomit-crucial-operations -fnuclear-weapons-on-invalid-memory-access 00:02:18 -funsafe-addition 00:02:22 I was about to copy that then I read the rest 00:02:32 ? 00:02:35 oh 00:02:36 lol 00:03:46 inlining significantly reduces time 00:03:49 that's nice 00:04:08 comexk: how fast is it? 00:04:46 funroll-loops may save you time on that sort of code, you could profile to find out 00:06:58 comexk: show us the generated asm 00:06:59 (-S) 00:07:28 also 00:07:31 comexk: % 59 00:07:33 slooow 00:07:39 ehird: it's multiplicified 00:07:43 ah 00:07:51 anyway, generated asmmy! 00:07:55 funroll helps, ftracer doesn't 00:08:05 208ms including java overhead and copy time for a 6mb string 00:08:08 comexk: you are using -O3 right 00:08:15 also, that's insanely fast 00:08:27 asm asm asm :P 00:09:11 also won't that crash on invalid inputs 00:09:13 sec 00:09:18 well I guess not since %59 00:09:43 ehird: only if the output length is not divisible by 4, maybe, and I can fix that 00:09:53 comexk: ASMMMMMM 00:09:54 sec 00:10:26 sorry, disassembledhttp://pastie.org/407791 00:10:34 I don't know x86 :< 00:10:44 for the same code except using custom strchr 00:10:54 ais523: err, that's a bit long isn't it? 00:10:59 inefficient looking, at least 00:11:03 lots of movs 00:11:08 you mean comex:? 00:11:11 i guess its the unrolling & inlining 00:11:14 comexk: no, you don;'t know asm 00:11:14 :P 00:11:24 00000d16nopw%cs:0x00000000(%eax,%eax) 00:11:28 i wish that meant 'wide nop' 00:11:55 what does it mean? 00:12:15 heh, it seemed to have changed the modulo into a multiplication by 0x22b63cbf 00:12:15 fucked if I know 00:12:17 magic numbers ftw 00:12:26 hmm 00:12:31 is 0x22b63cbf a power of two? 00:12:35 no 00:12:36 if it is... yo bitshift? 00:12:39 ais523: aw 00:12:40 powers of 2 are very simple in hex 00:12:45 oh, of course 00:12:45 hmm 00:12:54 you WOULD get better performance from a bitshift, right? 00:13:00 its just a matter of finding out which... 00:13:04 bitshift won't work by definition because you will get just some of the characters 00:13:21 0x12345678 << 8 will discard 12 00:13:31 0x22b63cbf * 59 is 0x800000005, by the way 00:13:35 with % 59 you get unique results from all 27 possibilities 00:13:42 comexk: left bitshift is multiplying by 2**n 00:13:42 so I strongly suspect that there are gcc shenanigans involved in there somewhere 00:13:43 though I don't know if there are better values 00:13:50 ehird: yeah, and you will discard 12 00:14:01 the first byte I mean 00:14:05 comexk: so find another constant 00:14:20 I mean, 0x12345678 is my four bytes 00:14:42 shifting it by any amount will discard the first bits, and is very unlikely to give me a unique 'hash' 00:14:50 the thing that worries me most are those jumps in the middle of the loop 00:15:05 jumps can take something like 60 or 70 cycles nowadays if the branch prediction screws up 00:15:11 as the processor has to flush the entire pipeline and try again 00:15:20 ais523: strchr, probably 00:15:23 they only take about 2 cycles if the branch prediction is correct, though 00:15:29 the silly thing is that he accesses the 4 characters one at a time 00:15:33 then does it AGAIN in one block later 00:15:34 that's just stupid 00:15:42 he should inline the strchr, going 4 at a time, and save the access of the first block 00:15:43 for the next part 00:15:54 I'd suggest using an algorithm such as first char * 16 plus second char * 8 plus third char * 4 plus fourth char * 2 00:16:02 which can be implemented in 8 addition instructions, so 8 cycles 00:16:33 comexk: do what I said for strchr :| 00:17:00 will that work? 00:17:01 c1: error: invalid option ‘cpu=core2’ 00:17:01 cc1: error: unrecognized command line option "-fearly-inlining" 00:17:06 and why the fuck did I suddenly get that 00:17:16 comexk: what I said? 00:17:18 why wouldn't it work 00:18:27 __builtin_expect helps 00:18:33 ehird: what are you expecting me to return from strchr 00:18:35 (which I do have inline) 00:18:54 well, two values, and since you're inlining it, just put it in the function tiself 00:18:56 basically 00:19:41 read 4 chars at a time using the int * trick, (to see how to use that to do strchr see the glibc explanation & link in http://www.stdlib.net/~colmmacc/2009/03/01/optimising-strlen/) and save the first block after reading it (since that's what you'll be processing anyway) 00:19:46 stop pasting that 00:19:46 :p 00:19:50 i didn't 00:19:52 i explained it 00:20:04 ehird: but I'm going one character at a time and wait fuck I'm dumb 00:20:14 i agree! 00:20:15 :P 00:20:18 I know the space will be here or later 00:20:56 O RLY 00:21:06 why is -mtune=core2 not working 00:21:08 it should 00:21:12 I blame apple 00:21:17 comexk: you can do it as multiple &s, I think 00:21:18 read the first block 00:21:30 then & 000space0 00:21:32 0space000 00:21:33 and so on 00:21:52 wait 00:21:56 comexk: what's the shortest morse code? 00:22:09 i have an idea 00:22:12 ah, 1 00:22:31 sec 00:22:32 comexk: so, the space is either in [1], [2], [3] or [4] 00:22:41 now, you've already just said 0-3 00:22:43 *read 00:22:55 so you just have to do 3 bitwise ands 00:23:00 to know if you have a space and where it is 00:23:05 ais523: confirm? 00:23:31 I'm not entirely sure exactly what you're planning 00:23:37 but the general details sound plausible 00:23:49 ais523: instead of doing the strchr then reading from the int* cast 00:23:53 read from the int* cast, because 00:23:57 the max is 4 chars 00:23:59 oh, yes 00:24:01 so you don't even have to read more than the machine word 00:24:04 ais523: and, it can't be the first char 00:24:07 since the minimum is 1 00:24:08 SO 00:24:10 that's pretty much what I was expecting you'd do 00:24:10 you just do some &s 00:24:15 with 0s and a space inbetween 00:24:18 specifically, 3 of them 00:24:21 to account for all the possibilities 00:24:23 ah, MUCH faster 00:24:30 comexk: did you use what I described? 00:24:36 and it worked? woo I'm not an idiot 00:24:39 only problem being that it doesn't work 00:24:42 lol 00:24:44 no, I was implementing while you were talking 00:24:47 pastie the C? 00:24:56 ais523: so, would mine work well? 00:24:57 i think so 00:25:18 I'm not sure of the details, but I'm pretty sure something like that could work 00:25:55 ais523: 00:26:03 ah, the input which contains .-.-.- is fucking it up otherwise it's working 00:26:05 0x00320000, 0x00003200, 0x00000032 00:26:08 what is .-.-.- anyway 00:26:14 read the first block from the int* 00:26:19 then & by those in order 00:26:22 see? 00:26:24 comexk: it's an abbreviation code 00:26:28 if you get your input back 00:26:30 given that it's at least 6 bytes, it's not a single letter 00:26:32 i.e. 0x00320000 or w/e 00:26:32 whatever, fuck that 00:26:34 then the spacei s there 00:26:36 get it ais523? 00:26:53 ah, ok, but I don't like the "if you get your input back" 00:26:57 comexk: that means you replace the strchr with *3* pairs of bitwise-and and equality checks 00:26:58 that has "if" in 00:27:04 ais523: it beats strchr 00:27:10 my preferred method would be to use arithmetic to set all of the word past the 0 to some known value 00:27:11 which goes through every character individually 00:27:13 and checks it 00:27:20 that gives you 26 different values, which you then make a perfect hash out of 00:27:27 and importantly, there's no branching involved at all 00:27:33 huh? 00:27:47 anyway comexk implemnt my algorithm it'd work. 00:28:04 comexk: apparently .-.-.- is full stop 00:28:06 which is not a letter 00:28:08 wait 00:28:08 ais 00:28:09 ais523: 00:28:14 you can do it with ONE AND 00:28:20 which one are you planning? 00:28:26 ais523: 0x00323232 00:28:27 and does your method involve branching? 00:28:31 yes, but only one brancha 00:28:32 and 00:28:34 strchr branches anyway 00:28:36 so this is a huge improvement 00:28:40 well, yes 00:28:51 I'm not trying to get something better, though, but trying to figure out what the best is 00:28:51 wtf 00:29:02 comexk: are you sure your input only contains letters? 00:29:03 why is this optimization working, it's not supposed to work 00:29:05 ais523: in theory 00:29:08 if(a & 0x20202020) { 00:29:12 better use long longs rather than ints, if there's .-.-.- in your input 00:29:26 long long? how efficient 00:29:31 comexk: are you even listening to me 00:29:32 sigh 00:29:34 why do I try and help you 00:29:52 ehird: long long beats branching easily, on a modern x86-compatible processor 00:29:55 except ., -, and / all and with 0x20202020 00:30:02 ehird: explain to me what I should do, clearly 00:30:08 ffffffffff 00:30:09 I did 00:30:12 It's not my fault you can't read 00:30:24 because add qword ptr's in the instruction set, and I strongly suspect it takes either 2 or 3 cycles 00:30:28 ais523: care to explain my idea to him? 00:30:32 since I evidently can't 00:30:53 well, I still think your idea's suboptimal, despite being better than what's been mentioned so far 00:31:03 WTF 00:31:05 besides, morse groups terminate with / not NUL 00:31:07 how come removing a check that always passes 00:31:08 yes, well, while you're thinking of the optimal solution can you be my english->comex translator? 00:31:10 slows it down 00:31:14 also, NUL has nothing to do with it 00:31:14 kthx 00:31:20 mine doesn't do anything with NUL 00:31:21 ehird: no, because I ought to be going home 00:31:30 ehird: I thought you were using masking to detect where the end-of-string was? 00:31:34 ... 00:31:35 no 00:31:37 i was replacing his 00:31:39 strchr(s, ' ') 00:31:40 oh 00:31:43 with an efficient method to check for the space 00:31:50 that also saved time just after 00:31:55 comexk: pastie your C 00:31:59 and I'll put my optimization in 00:32:01 well, your efficient method finds the space, but does it return it in a usable format? 00:32:13 ais523: y oudon't need the space, you just need to know where the space is 00:32:21 ehird: agreed 00:32:25 but your method returns a string with the space in 00:32:29 rather than the position of the space 00:32:59 irb(main):012:0> "%08x" % (0x11321111 & 0x00323232) 00:32:59 => "00321010" 00:33:09 -> space is at [1] 00:33:15 ehird: fail 00:33:22 space 0x20 = decimal 32 00:33:27 *forehead* 00:33:30 no wonder I couldn't understand what you were doing 00:33:36 irb(main):013:0> "%08x" % (0x11201111 & 0x00202020) 00:33:36 => "00200000" 00:33:39 space is at [1] 00:33:43 yep 00:33:46 agreed 00:33:49 that's what I thought you were doing 00:33:59 but the problem is, how do you convert the string "00200000" into a usable form 00:34:00 for the masking? 00:34:03 if(!(a & 0x03000000)) s2 = s; 00:34:03 else if(!(a & 0x030000)) s2 = s + 1; 00:34:03 else if(!(a & 0x0300)) s2 = s + 2; 00:34:03 else if(!(a & 0x3)) s2 = s + 3; 00:34:04 else s2 = s + 4; 00:34:06 that slows it down a lot :( 00:34:08 and I don't know why 00:34:11 over memory accesses 00:34:12 comexk: you do ONE & 00:34:14 not 4 00:34:15 comexk: it would do, you have ifs in there, you even have elses 00:34:16 also 00:34:20 there can't be a space at position 0 00:34:30 unfortunately there can 00:34:41 balls. 00:34:47 okay then, and by 0x20202020 00:34:48 ehird: // is the traditional way to send a space character in Morse 00:34:49 ais523: the alternative being strchr which contains all those things 00:34:54 i.e. a zero-length string 00:34:54 no 00:34:55 not strchr 00:35:00 you only need to do one memory read 00:35:04 ehird: 0x20202020 will ALWAYS and 00:35:05 brb 00:35:07 ... 00:35:08 no shit 00:35:10 you use the result from the and 00:35:12 not just checking it 00:35:19 ehird: what do you /do/ with the result from the and? 00:35:22 it won't magically fix your string 00:35:23 ais523: err, the obvious? 00:35:26 which is? 00:35:26 it shows you where the space is 00:35:32 yes, I know it shows you where the space is 00:35:34 ehird 00:35:35 problem is 00:35:36 it doesn't 00:35:38 but how do you change it into the masking of the string you need? 00:35:39 this isn't 0x11 00:35:43 this might be 00:35:43 0x2d 00:35:46 0x2e 00:35:48 err so 00:35:50 0x2f 00:35:52 all of which & 0x20 00:35:58 ... no shit 00:36:28 anyway, how come these strings are space-separated all of a sudden, Morse is normally separated with / 00:36:34 is your teacher using an unusual encoding? 00:37:29 ehird: what I mean is, even if your method does determine the location of the space (and it can do that, and against 0x0c rather than 0x20 because that's contained by dash and dot but not space) 00:37:35 once you have the location, what do you do with it? 00:37:42 ais523: comex's code 00:37:44 just uses the location 00:37:53 ehird: comex's code requires the location to be encoded as 0, 1, 2, 3, 4 00:37:58 your code doesn't encode the location like that 00:38:00 so change it to that 00:38:09 err... comex's code uses a multiplication 00:38:28 in other words, you need to convert your found-space into the position of the space so you can multiply by it 00:41:16 -!- ais523 has quit (Remote closed the connection). 00:47:01 hmm 00:47:23 but I still don't understand why REMOVING A BRANCH THAT ALWAYS GOES ONE WAY 00:47:24 speeds it up 00:47:29 branch prediction 00:47:34 uh, I mean slows it down 00:47:46 branch prediction 00:47:55 __builtin_expect(it, 1) slows it down 00:47:59 branch prediction 00:48:18 ehird: why is it faster to predict the wrong thing 00:48:23 butts 00:48:43 well, it's not 00:48:51 it's fastest without any prediction 00:48:59 but this shouldn't matter. 00:49:15 also, ehird: give me your code :p 00:49:23 what code 00:49:29 code to give me a position :p 00:49:38 :| i just gave an algo 00:49:39 not code 00:50:15 how will anding with 20202020 help anything 00:50:21 butts 00:50:25 * ehird tiredlazy 00:55:09 holy shit this sped it up 00:55:14 wut 01:04:00 -!- Azstal has joined. 01:04:36 :/ 01:04:43 i don't think it's very easy to get access to jstring 01:05:05 I'll try a memory dump 01:06:59 also, GetStringUTFChars returns a const char 01:07:04 so it's probably giving me an existing pointer 01:08:20 I give up 01:08:23 how do I make this faster 01:08:35 I'll just go to sleep 01:21:01 -!- Asztal^_^ has quit (Read error: 110 (Connection timed out)). 01:38:48 -!- Asztal^_^ has joined. 01:53:45 -!- Azstal has quit (Read error: 110 (Connection timed out)). 02:33:57 -!- GreaseMonkey has joined. 04:18:44 -!- ab5tract has joined. 05:26:06 I want to hear a lounge version of O Fortuna. 05:44:27 -!- oklopol has quit (Read error: 110 (Connection timed out)). 05:44:48 -!- oklopol has joined. 05:51:45 hm, that could really work 05:54:34 You're singing it in your head now, aren't you? :) 05:54:37 I think it would be good. 05:54:39 In a weird way 05:55:01 yes 05:56:36 i'm not really singing in my head, i'm preparing the looper and the guitar and the bass to try to record the verse at least 06:45:33 * Robdgreat would love to hear that when it's done 06:57:09 with or without my crappy singing? 07:18:37 with should work 07:19:00 but ultimately it's your call 07:25:20 one sec 07:28:35 crap, all audio is in one channel, how do i fix this 07:30:23 ok got it 07:31:22 jeez hurry up 07:33:08 http://filebin.ca/qyxpp/ofortuna.mp3 07:35:50 wtf was that 07:36:46 * lament will appreciate more constructive feedback. 07:41:29 * lament pokes GregorR 07:45:34 -!- olsner has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:07:27 lament: reminds me of 'Piggy' by NiN on Further Down The Spiral 08:30:35 -!- GreaseMonkey has quit ("Client Excited"). 08:36:32 -!- tombom has joined. 08:50:44 -!- ab5tract has quit. 09:07:04 -!- impomatic has joined. 09:12:07 -!- impomatic has quit ("mov.i #1,1"). 09:14:24 -!- Slereah has quit. 09:14:58 -!- Slereah has joined. 09:16:41 -!- olsner has quit ("Leaving"). 09:27:10 -!- ais523 has joined. 09:42:01 -!- Slereah_ has joined. 09:54:25 -!- Slereah has quit (Read error: 110 (Connection timed out)). 09:59:14 -!- ais523 has quit (Read error: 104 (Connection reset by peer)). 10:01:35 -!- ais523 has joined. 10:07:33 -!- ais523 has quit (Read error: 104 (Connection reset by peer)). 10:07:36 -!- ais523_ has joined. 10:11:19 -!- oerjan has joined. 10:15:44 -!- ais523_ has changed nick to ais523. 10:31:29 -!- comexk has quit (Remote closed the connection). 10:32:23 -!- comex has joined. 10:32:50 -!- ais523_ has joined. 10:34:49 -!- ais523 has quit (Nick collision from services.). 10:34:51 -!- ais523_ has changed nick to ais523. 10:36:22 -!- lifthrasiir has quit (calvino.freenode.net irc.freenode.net). 10:36:31 -!- lifthrasiir has joined. 10:40:37 -!- oerjan has quit ("leaving"). 10:45:07 -!- lifthrasiir has quit (calvino.freenode.net irc.freenode.net). 10:45:31 -!- lifthrasiir has joined. 11:54:52 -!- ais523 has quit (Remote closed the connection). 13:38:05 -!- ais523 has joined. 13:54:15 -!- ais523 has set topic: http://➡.ws/Ⱒ. 13:54:23 -!- ais523 has set topic: Logs: http://➡.ws/Ⱒ. 13:54:34 there, we have the spidery ha in the log link now 13:54:45 golfing the topic can be fun... 13:55:31 How is it golfed? 13:56:06 because it contains the same information as before 13:56:08 but is shorter 13:56:26 Does it? 13:56:34 yep, it contains the link to the logs 13:56:44 and a glagolitic capital letter spidery ha 13:56:56 In short URL form and using ASCII->Unicode? 13:57:14 in short URL form 13:57:16 it's a unicode URL 13:57:56 Though you can't actually click it or kopipeit 13:58:07 Sure you can. I just did. 13:58:11 well, that's the fault of your client 13:58:17 Firefox? 13:58:21 Well, it is Firefox2. 13:58:51 But I'm surprised that the glagolitic capital letter spidery ha was free-for-taking at ➡.ws. Would have thought someone had already used it. 13:58:57 mIRC ... though I get to the wrong place 14:00:11 ais523, err, I only see an arrow 14:00:11 http://xn--hgi.ws/Ⱒ is what the URL should be translated to for non-Unicode-aware systems 14:00:13 -> 14:00:17 is how it looks 14:00:19 in the url 14:00:20 AnMaster: it's a Unicode arrow 14:00:28 so what is the spidery thing? 14:00:31 I don't see it 14:00:32 I get http://xn--7a3kss.ws 14:00:37 it's a glagolitic capital letter spidery ha 14:00:46 Spidery HA is after the /, in the path part. 14:00:46 Same here 14:00:58 I get on that website and it does not redirect me at all 14:00:59 ais523, is it a "glagolitic capital letter spidery ha" or an unicode arrow 14:01:00 decide 14:01:01 obviously there's a character encoding fail somewhere 14:01:04 AnMaster: There's both. 14:01:11 no there ins't 14:01:13 AnMaster: It's [arrow].ws/[spidery ha]. 14:01:16 ah 14:01:16 AnMaster: the URL is http:// unicode arrow .ws/ glagolitic capital letter spidery ha 14:01:25 Spidery spidery 14:01:27 that looks like [2C22] here 14:01:29 ... 14:01:38 same here, I don't have a spidery ha in my font 14:01:53 Well, me neither. But I trust it's the ha if ais523 says so. 14:02:09 why the interest in that char? 14:02:14 it comes out in mojibake on the clog logs 14:02:38 my guess is that 7a3kss is the encoding of the mojibake, whereas hgi is the encoding of the correct unicode character 14:02:39 Whoops, I need to be elsewhere already. -> 14:03:51 Ah. If I copy it to chrome I get xn--hgi, but if I double-click it, I get xn--7a3kss 14:07:39 hm, fast integer square root in C... anyone knows anything good? 14:07:51 the newton algorithm is pretty fast 14:08:00 * AnMaster googles 14:08:11 basically, start with 2 14:08:22 well, x=2 14:08:31 iterative? 14:08:33 then change x to ((n/x)+x)/2 14:08:35 yep, iterative 14:09:15 http://www.beyond3d.com/content/articles/8/ 14:09:50 that is float 14:09:59 the target system doesn't have floating point hardware 14:10:02 ah 14:10:02 embedded target 14:10:25 I'm sure there's an integer arithmetic version 14:11:55 * AnMaster finds a pdf from microchip named "fast integer square root" 14:12:52 yay one avoiding slow division too 14:13:03 http://www.google.com/codesearch/p?hl=en#dl-KOTbXso4/libcs/isqrt.c&l=22 14:13:24 libcs? 14:13:53 ah, microchip 14:14:25 Here's one with only a for-loop: http://www.google.com/codesearch/p?hl=en#G1Uvi1prmwc/kernel2_4/drivers/media/video/omap/v4l2.c&l=189 14:14:27 well my target isn't a microchip, but it is is still interesting 14:14:38 I can't use the same asm, but the general idea should work I think 14:14:45 * AnMaster goes to experiment 14:16:05 MizardX, that seems to work on the same model basically. 14:16:20 same idea. slightly different implementations 14:25:36 well, I don't know for certain that's a spidery ha, I just copied it from the old topic 14:27:01 Character 0x2C22 ... I don't have any font that supports it. :) 14:28:22 >>> unicodedata.name(u'\u2C22') 14:28:22 'GLAGOLITIC CAPITAL LETTER SPIDERY HA' 14:31:50 nice 14:33:46 too bad http://➡.ws/λ is already taken (and doesn't point to anything haskell) 14:56:13 comex: that domain is still stupid 14:56:15 as discussed before 14:57:38 -!- ehird has set topic: Ⱒ GLAGOLITIC CAPITAL LETTER SPIDERY HA | http://tunes.org/~nef/logs/esoteric/. 14:57:58 14:33 comex: too bad http://➡.ws/λ is already taken (and doesn't point to anything haskell) 14:58:00 yes it do 14:58:00 es 14:58:14 johnnowak does Haskell and concatenative langs like factor 14:58:15 :P 14:58:32 ehird, what is wrong with ➡.ws ? 14:58:36 I like it, so did ais523 14:58:40 or does I guess 14:58:51 I think it's a bad idea for general use 14:58:54 the whole purpose is to subvert the twitter length limit, but it counts in bytes, not characters 14:58:58 but very funny for a #esoteric topic 14:59:03 so the makers are complete idiots 14:59:07 who buy domains and advertise them without thinking 14:59:16 ehird, err what? 14:59:27 also, a tiny url is mainly useful apart from twitter to write down 14:59:27 what has twitter got to do with it 14:59:37 AnMaster: oh shut the heck up 14:59:48 ehird, what? 15:00:05 i'm tired of being expected to explain 5 billion things to you every time I say something 15:00:17 there is nothing about twitter on http://➡.ws 15:00:28 you aren't making any sense 15:00:29 *shrug* 15:00:51 bbl 15:01:22 AnMaster: there is something about twitter on http://➡.ws, but only on the results page after you've worsened a URL 15:01:53 and, besides, the other purpose is to write it down or tell people irl. 15:01:56 good luck typing those urls 15:02:11 ehird: you're missing the point 15:02:14 which is to make a funny topic 15:02:21 I never said the topic wasn't funny 15:02:31 URL redirection services can be used to make a point, just as much as they can be used to shorten things 15:02:32 I just saw comex's message at the start of my quicklog 15:02:33 and replied to it 15:02:37 before seeing the context 15:03:32 -!- Hiato has joined. 15:11:28 oh, I just realised that the creators were quite young when they made INTERCAL 15:11:40 interesting 15:11:43 I was expecting them to be bearded like they are now, I guess that explains why INTERCAL _isn't_ popular 15:11:46 I suppose they must have been, as they're still in work now 15:11:58 just finished freshman year final exams, sez don woods 15:11:59 and that explains why INTERCAL wasn't popular back in 1972 but has become more popular since 15:12:01 (http://www.computerworld.com.au/article/251892/-z_programming_languages_intercal) 15:12:54 so, if I have my american educational system right, 15:13:00 late teens/early 20s? 15:14:29 http://www.diku.dk/hjemmesider/ansatte/jespera/doc.html oh god the comic sans it burns 15:19:05 ais523: also, do jumps -really- cost 60 cycles? 15:19:12 that's just painful... 15:19:18 it depends on which way they go 15:19:34 basically, branch prediction is the processor predicting in advance which way the jump will go 15:19:44 if it guesses wrong, you have to flush the pipeline and that takes ages 15:19:54 ais523: how often does it get it right? 15:20:00 quite a lot, nowadays 15:20:06 especially if jumps mostly go the same way 15:20:11 and even more with profile-guided optimisation 15:20:17 ehird, it depends on how long the pipeline is 15:20:19 that's one of the main purposes of that optimisation 15:20:29 ehird, on a pentium 4 a mispredicted branch is *very* expensive 15:20:37 did the RISC-y sort of processors do jumps better? 15:20:39 since it had such a long pipeline 15:21:12 ehird: it's nothing but pipeline length and prediction quality that affects the jump 15:21:13 yeah riscs do better 15:21:21 oklopol: i'll trust you <3 15:21:24 for instance, on a PIC microcontroller, the pipeline has length 2 so jumps only take 2 cycles 15:21:25 they generally have shorter pipelines 15:21:27 ehird, there are some CPUs with "delayed branch" stuff, basically they continue executing n instructions after the branch instruction even when jumping (iirc n was/is usually 1 or 2) 15:21:36 and as oklopol says, you can likely get away with a shorter pipeline on a RISC 15:21:42 true 15:22:08 15:21 AnMaster: ehird, there are some CPUs with "delayed branch" stuff, basically they continue executing n instructions after the branch instruction even when jumping (iirc n was/is usually 1 or 2) 15:22:12 that sounds rather dangerous for IO :D 15:22:16 ais523, delayed branches are another interesting way to solve it. It potentially reduces the issues to zero if you can reorder 15:22:16 ehird: delayed branch is just telling the compiler to use software to sort out what most processers do in hardware 15:22:22 *processors 15:22:28 ah 15:22:31 indeed 15:22:35 presumably not as well 15:22:36 and it gives the same result as the hardware version would do 15:22:45 since hardware tends to be faster... 15:22:59 well, it slows down the compilation but not the execution 15:23:04 ehird: it's not nearly as dangerous for io as it is for exceptions 15:23:11 heh 15:23:30 and all kindsa data hazards 15:23:38 but yes, there are lots of subtleties, it's really easy to screw up 15:23:47 and why would you start talking about something i'm actually interested in right when i'm about to leave 15:23:48 I think VLIW and delayed branch slots are both great ideas. 15:23:54 oklopol: sry I will talk mor ewhen you return. 15:23:56 damn you all to germany! 15:23:57 -> 15:24:04 hah 15:24:08 i'm rather upset jumps are so slow 15:24:14 i don't like my cpu :< 15:24:17 ehird, not if they are correctly predicted 15:24:27 well, it's more that non-jumps can be sped up more easily then jumps 15:24:38 ehird, anyway, Intel Core is *fast* at mispredicted jumps compared to Pentium 4 15:24:50 and AnMaster's right, a correctly predicted jump hardly costs anything, usually 1 or 2 cycles 15:24:55 i bet a functional-tuned cpu for lisp would get it right because it'd be more structured than 'jmp' :< 15:25:02 for some specific work loads a Pentium 4 is *worse* than a *slower* Pentium 3 15:25:13 due to the high cost for stuff like branch misprediction 15:25:19 unfortunately, you can't also predict jumps correctly, if you could it would defeat the point of having if statements in the first place 15:25:29 ais523, yes indeed 15:25:29 an unconditional goto, by the way, is fast because it's always trivial to predict 15:25:51 we just need to tie a crystal ball to our cpus 15:25:58 perfect branch prediction & halting problem solved to boot 15:26:10 some processors, like the PIC, are primitive enough that they don't even try to predict unconditional jumps 15:26:13 and so waste cycles when jumping 15:26:23 ehird, a crystal ball is slow. You need L1/L2 cache for the crystal ball lookups 15:26:29 but on modern hardware, you don't need to worry about it 15:26:31 which would defeat the point 15:26:37 AnMaster: ok then, the beating heart of a dead wise oracle 15:26:42 much more efficient 15:26:48 well, crystal is made from silicon 15:26:53 dead & wise, not "dead wise" as in slang that is 15:26:57 ais523, however delayed branch slots does solve the issue if you can reorder some. Sure there are cases where you can't, and have to put in NOP 15:27:00 so I'd suggest embedding the processor inside the crystal ball 15:27:01 ais523: oracles's hearts are made from silicon too 15:27:21 AnMaster: delayed branch slots are great, I agree 15:27:26 I was planning to implement them in INTERCAL 15:27:33 hah! 15:27:41 which is obviously ridiculous as INTERCAL's far too high a level to gain any benefit 15:27:47 but I think they could be useful for debugging purposes 15:27:52 -!- FireFly has joined. 15:28:02 ais523, anyway if you had a delay of 40 like ehird talked about then delayed branch slots would be bloody annoying 15:28:04 INTERCAL is low level, but delayed branch slots are slightly lower level than asm 15:28:16 AnMaster: ais523 claimed comex's branch was taking ~60 cycles 15:28:16 it only works great with a delay of 1-2 15:28:19 which is crazy as fuck 15:28:24 and yes, but I'm sure you can find something else to do for 40 cycles 15:28:33 ok 60 then 15:28:33 or however many it is 15:28:38 anyway it varies depending on CPU 15:29:04 hmm... pentium 4 has a pipeline length of 31, according to Wikipedia 15:29:46 ais523, hm what about mispredicted branch + IL1 miss ? 15:29:50 that would be very slow 15:29:54 ooh, nasty 15:29:57 possibly also L2 miss 15:30:06 comex's code didn't have much chance of an L1 miss, though, it was hardly using any memory 15:30:09 then you would hit a few hundred cycles right? 15:30:26 ais523, well DL1 and IL1 are luckily separate.. 15:30:38 so, just to put it into context, 15:31:00 how long do 100 cycles take on this 2.1ghz intel core 2 duo, on average? :P 15:31:01 btw, where is the code comex wrote? 15:31:16 AnMaster: http://pastie.org/407770 15:31:17 so far 15:31:19 we're still improving it 15:31:24 it's a morse code decoder 15:31:28 we're trying to eliminate the strchr atm 15:31:29 I see 15:31:38 AnMaster: his prof told him to optimize some java code 15:31:45 so he's writing it in C and linking it with Java Native Interface 15:31:55 using tricks like 15:31:57 int a = *((int *) s); 15:32:04 to read 4 characters (the max morse cod ehe's processing) in one go 15:32:05 I see 15:32:13 does that mean 'I don't see'? 15:32:23 not in this case 15:32:38 I still don't see what the algorithm is though... 15:32:45 just morse code decoding 15:32:50 AnMaster: stuff[] is a perfect hash table 15:32:55 ah 15:33:02 now that explains a lot 15:33:05 and the mask removes stuff after the space, essentially 15:33:15 but since the space can be determined just from the 'a' there 15:33:20 we're trying to figure out how to do it the quickest way 15:33:23 what is the space for? 15:33:26 (since strchr will do the 4 accesses and branch on each one) 15:33:28 AnMaster: separate the codes 15:33:32 mhm 15:33:34 ..-.- ...- .-... 15:33:35 and stuff 15:33:38 right 15:34:02 but he has two branches there, and up to 5 hidden in strchr 15:34:09 hm 15:34:09 so we're trying to reduce those, and fold them into each other 15:34:10 ais523: 15:30 ehird: how long do 100 cycles take on this 2.1ghz intel core 2 duo, on average? :P 15:34:26 ehird, how long did you say max length was 15:34:28 this is actually surprisingly like writing INTERCAL 15:34:38 -!- MigoMipo has joined. 15:34:39 and do you need to fail in a good way on bad input? 15:34:41 AnMaster: 4 characters, so that's why we use an int 15:34:44 and no, he doesn't 15:34:47 ah 15:34:51 also, whatever you say we've probably tried :P 15:34:52 and 100 cycles at 2.1 GHz is 100/2.1 ns which is just under 50 nanoseconds 15:34:58 ehird, it may be possible to use SIMD then 15:35:00 *may* 15:35:18 ais523: Oh. 15:35:24 depends on alignment though 15:35:26 Er, that's not so bad then. 15:35:30 so probably not a good idea 15:35:42 AnMaster: we need the actual code to be portable 15:35:44 ehird, depends on how much data you need to process 15:35:45 since java is portable 15:35:50 hrrm ok 15:35:54 ofc, he's going to get marked badly for, y'know, not using java but there you go 15:35:59 ehird, then it isn't. It assumes int == 32 bits 15:35:59 AnMaster: also, he's testing it on 6mb strings 15:36:05 also, yes 15:36:10 but that's universally true on modern systems. 15:36:24 a system in which it isn't probably doesn't run java 15:36:29 iirc there are systems with int == 64 bits 15:36:50 don't remember which system 15:36:59 only a vague memory of reading those existed 15:37:17 probably some HPC stuff 15:37:19 your personal anecdotes aren't too useful :D 15:37:32 ehird, was it supposed to be? 15:37:36 dunno 15:37:47 ehird, anyway there is int32_t in C99 15:38:14 ehird, btw how did you calculate the perfect hash? 15:38:21 or how did comex rather I guess 15:38:24 I'm not sure, ais523 did that 15:38:29 oh? 15:38:32 how ais523? 15:38:33 I told comex about the *((int*)s) trick though 15:38:40 let me read backlog 15:38:50 AnMaster: his original code was ridiculously bad, take a look: http://pastie.org/407681 15:38:50 ehird, well, that could be slow. If it isn't aligned 15:39:04 it was comex who did the perfect hash, not me 15:39:20 ehird, 1) some systems will SIGBUS on non-aligned int. IIRC Alpha for example. Not sure about MIPS, ARM, PPC and such 15:39:26 nobody actually cares 15:39:30 2) even on x86, reading non-aligned int is slower 15:39:32 it has to work on most systems, 15:39:34 and be fast on x86 15:39:36 not sure how much slower 15:39:38 but yes slower 15:39:46 his code takes something like 300ms on a 6 megabyte string now, iirc, and that _includes_ the overhead of the Java bridge and the like 15:39:52 x86 can certainly manage misaligned accesses 15:40:05 also, does his code work? 15:40:07 ais523, yes it can. But it is still slower than aligned access 15:40:17 ais523: he broke it recently IIRC 15:40:21 but the last working version :P 15:40:31 AnMaster: but 15:40:33 it's faster than 15:40:37 s[0], s[1], s[2], s[3]. 15:40:45 probably 15:40:59 although the strchr does that anyway 15:41:03 thus why we're trying to eliminate it 15:41:05 or at least i am 15:41:18 that strchr. I think you could do that faster with testing against a bitmask or something. 15:41:24 yes 15:41:28 that was what I was suggesting 15:41:30 bitmasking a 15:41:34 but I couldn't figure out what the right bitmask was 15:41:37 and what to do with the result 15:41:55 ehird, take a look at strlen in glibc. It is pretty insane. That is the generic C version. Each CPU also has an even crazier asm implementation 15:42:04 that's where I got the int * trick from 15:42:08 via http://www.stdlib.net/~colmmacc/2009/03/01/optimising-strlen/ 15:42:14 ehird, ah you have seen the bitmasking in glibc then? 15:42:26 ofc, strlen() is pointless since you should use length-tagged strings. 15:42:35 yes 15:42:45 if I could do anything to glibc, I'd add a 1 second wait for every strlen call :P 15:42:49 ehird: the principle of searching for a NUL is still useful, though 15:42:57 and modify gcc to never, ever optimize out a strlen 15:43:01 ais523: strchr(s,0) 15:43:04 if you _must_ :P 15:43:14 well, I was thinking of strchr in general 15:43:19 although notice that strchr stops on NUL 15:43:25 some things are faster for NUL-termination 15:43:41 yes, but in general strings should be length-tagged 15:43:46 personally, I think one of the better methods for storing strings is to both length-prefix and nul-terminate 15:43:49 just about every HLL does that, and their string handling is great 15:43:58 ais523: that can work 15:46:18 ehird, you can do length tagged strings in C 15:46:30 i know 15:46:33 but its a pain 15:46:37 because libraries don't like it 15:46:41 there are at least two libraries with macros for it 15:46:41 and you can';t use the stdlib 15:46:44 that I know of 15:46:48 probably a lot more exists 15:46:59 -!- impomatic has joined. 15:47:02 in C, using non-null-terminated strings is pretty painful 15:47:12 Hi :-) 15:47:12 if you're doing both length tag and nul-terminate, then you can use most of the read-only stdlib functions 15:47:15 hi 15:47:15 ehird, just consider it a generic byte buffer 15:47:22 besides, memchr = strchr for length-prefixed strings 15:47:29 ais523, yes indeed 15:47:37 there exists quite a few mem* functions 15:47:38 and likewise with the other mem* functions 15:47:43 that are *FASTER* than str* ones 15:47:51 because they don't need to check for end all the time 15:47:57 actually 15:48:01 comex switches to using memchr 15:48:03 and it was slower 15:48:05 memcpy() is faster than strcpy() for example 15:48:09 ehird, that's strange 15:48:10 maybe the \0 checking helped branch prediction :P 15:48:19 no idea 15:48:23 yep, most CISC processors can do branch prediction perfectly for for loops 15:48:32 but most processors aren't CISC nowadays 15:48:32 ais523, interesting 15:48:45 they're RISC-core, disguised as CISC using microcode 15:48:57 ais523, but can they still branch predict? 15:49:17 branch predict perfectly I mean 15:49:23 well, I've worked with a DSP before 15:49:30 that branch-predicted for-loops perfectly 15:49:34 as long as you didn't change the control variable 15:49:53 not only that, but it didn't even spend any cycles on the decrement-and-test such loops normally have 15:50:23 ais523, at least some x86 use microcode. I'm pretty sure AMD64 does for some instructions. I have a pdf somewhere around here documenting type of execution, with those in microcode marked "VectorPath", other ones marked "DirectPath" 15:50:24 iirc 15:50:33 * AnMaster searches his desktop 15:50:42 ah there it is 15:51:03 I think all modern x86-compatibles use microcode 15:51:11 indeed. Instruction latencies for the AMD64 ISA (k8 family) 15:51:17 DSPs are weird, though, they have some very specific CISC instructions 15:51:55 -!- Judofyr has joined. 15:52:12 ais523, even with microcode x86 is pretty CISC in the core. Just consider all the core SIMD instructions for example 15:52:28 are those non-microcode/ 15:52:30 I'm surprised 15:52:39 and suddenly realise why ARM uses so much less power 15:52:46 I don't like computers 15:52:50 They don't work very well 15:52:51 :( 15:53:15 From "Legend for table C.1": Decode type Shows the method that the processor uses to decode the instruction—either DirectPath Single (DirectPath), DirectPath Double (Double), or VectorPath. 15:53:31 I think it was clarified elsewhere in the pdf 15:54:07 yep 15:54:22 http://rafb.net/p/nVH4iJ51.html 15:55:54 ahem 15:55:57 don't use rafb.net 15:56:18 for people reading this sometime after tomorrow: http://pastie.org/408374 15:56:22 ehird, it is the one that loads fastest here. pastebin.ca take a lot of time to load. Same for all the others 15:56:30 pastie.org is always quick for me 15:56:35 ehird, not for me 15:56:47 rafb takes maybe 1 second to load. pastie.org around 5 15:56:54 hmm 15:57:08 I guess there is much more design on pastie.org 15:57:15 rafb has a very minimalistic design 15:57:19 your browser will cache the css. 15:57:36 well, I'm tempted to just say tha ta few more seconds now beats expiry in the future, but I'll look for something faster 15:57:52 ehird: that CSS expires, think of the logreaders! 15:58:02 lol wut 15:58:16 :D 15:58:29 AnMaster: http://paste.lisp.org/? 15:58:33 about as minimalist as rafb 15:58:38 irritating captcha though 15:58:42 well 15:58:45 it always says lisp 15:58:47 indeed 15:58:47 so you can easily script that 15:59:01 ehird, really? greasemonkey tends to slow down stuff 15:59:13 you don't really need greasemonkey for that 15:59:17 best captcha ever 15:59:33 comex: well, you have to target it specifically 15:59:37 ehird, I use paste.lisp.org when I want to highlight erlang 15:59:38 most spambots just generically spam everything 15:59:40 so it'd trip them up 16:00:15 ehird, it does load quite fast. But rafb does load even faster 16:00:22 1 second vs. 3 or such 16:00:31 if it takes more than 50 nanoseconds, it's too slow! 16:00:36 AnMaster: http://pastey.net/? 16:00:43 loads very fast for me, and has ids going back to 2006 (I just checked) 16:01:00 I suggest you use paste.eso-std.org 16:01:05 yes! 16:01:19 ehird, hm 2 seconds 16:01:22 still parked 16:01:26 it will give you vaginal herpes on your iso standards. or at least, that's what it claims. 16:01:27 err didn't eso-std expire? 16:01:31 AnMaster: so? 16:01:35 you can still use it! 16:01:45 well the pastes are gone. 16:01:53 the urls no longer valid 16:01:57 THINK OF THE LOGREADERS! 16:01:59 http://expired.revenuedirect.com/park.php?domain_name=&site_id=20788 16:02:05 then give us that link 16:02:06 never let your pastebin expire 16:02:15 also, nobody actually used it 16:02:19 I did 16:02:20 ehird, you did iirc 16:02:23 and ais523 did 16:02:25 ais523: okay, like thric 16:02:27 e 16:02:30 until anmaster told you not to 16:02:35 I used it more than ehird, I think 16:02:43 ehird, fixing that download bug might have helped 16:02:50 and THINK OF THE LOGREADERS!! 16:02:51 not a bug 16:02:52 that wasn't a bug, that was correct 16:03:02 doing things which are unusual but correct is very eso 16:03:13 incidentally, Microsoft have come up with their own way of doing that 16:03:18 indeed 16:03:23 i linked to that article yesterday 16:03:24 they wrote a standard, made it an RFC, and are now complying with it 16:03:33 ais523, um really? 16:03:36 details? 16:03:57 http://drplokta.livejournal.com/109267.html 16:04:15 ah, I was going to ask ehird if he had the link, I couldn't find it 16:04:24 huh, http://pastey.net/ thinks Erlang means Ericsson Language. It actually doesn't 16:04:37 it is a reference to a person named Erlang 16:04:40 AnMaster: it does and it doesn't 16:04:41 it's both 16:04:44 same as Haskell is named after someone 16:04:48 they named it because of both connotations 16:04:53 even though only one is official 16:05:05 "Keep my history for at least [99999999] days" —Firefox 16:05:07 ehird, true. But according to one of the original developers it was primarily due to the person 16:05:09 I should become the U.S. archivist. 16:05:46 ~273972 years? 16:05:51 yes. 16:05:56 and yes that was using 365 and integer division 16:05:57 I don't intend to be using Firefox by that t ime. 16:06:00 so probably off by a bit 16:06:45 ehird, personally I have it set to one week 16:06:51 I don't like to keep history around 16:06:52 AnMaster: DATA LOSS AAAAAAAAAGH 16:06:54 NO NO NO NO NO NO NO 16:06:57 YOU MUST PRESERVE ;_; 16:07:03 ehird, No. I'm paranoid 16:07:07 that is the reason 16:07:12 So encrypt it :P 16:07:14 ehird, I do 16:07:20 /home is encrypted 16:07:32 I have a huge obsessive aversion to deleting anything. 16:07:42 probably because of my logreading tendencies 16:07:48 ehird, I have a huge obession with having more than 3 GB free space on my disk 16:07:51 I do have backups of course 16:07:58 on tape 16:07:59 Eh, just transfer old stuff to a backup drive. 16:08:02 Lol, tap.e 16:08:03 *tape 16:08:09 Want to survive a nuclear attack? 16:08:09 ehird, it lasts. 16:08:17 disks last pretty well y'know 16:08:27 ehird, ever had a disk fail? 16:08:31 * AnMaster has 16:08:33 Yes. 16:08:41 Backup your backups. 16:08:45 To Xzibit's body. 16:08:51 huh? 16:08:59 Xzibit is the origin of the yo dawg meme. 16:09:06 -!- AnMaster has set topic: Ⱒ GLAGOLITIC CAPITAL LETTEmhmR SPIDERY HA | http://tunes.org/~nef/logs/esoteric/. 16:09:09 err 16:09:12 wth 16:09:12 LETTEmhmR 16:09:15 leave it like that :D 16:09:22 (I also don't keep backups. Yet.) 16:09:23 my kb2OPJħßj strs 16:09:29 AnMaster: indeed, it does str. 16:09:33 ah better... 16:09:37 keyboard went strange 16:09:39 no idea why 16:09:50 -!- AnMaster has set topic: Ⱒ GLAGOLITIC CAPITAL LETTER SPIDERY HA | http://tunes.org/~nef/logs/esoteric/. 16:09:50 Nice topic 16:09:54 fixed it 16:09:56 :< 16:09:57 -!- ehird has set topic: Ⱒ GLAGOLITIC CAPITAL LETTEmhmR SPIDERY HA | http://tunes.org/~nef/logs/esoteric/. 16:09:59 Fixed it. 16:10:00 :> 16:10:04 ... 16:10:25 anyway. Where was I 16:10:28 right 16:10:34 FireFly: sometimes I fly around in a spaceship? 16:10:41 Oh, you do? 16:10:48 it's a reference to eso-std.org 16:10:52 which was only ever placeholder text 16:10:54 ais523: now _that's_ obscure 16:10:56 also, no 16:10:59 well. 16:11:00 "sometimes I fly around in a spaceship :>" 16:11:01 in variou forms. 16:11:04 ehird, backups on tape may not survive a nuclear attack 16:11:08 but it had infrastructure set up/ 16:11:09 nor do I think anything I have will 16:11:11 it was just never used :P 16:11:19 AnMaster: will you survive a nuclear attack? 16:11:23 just keep a backup in your pocket 16:11:29 I live in a house based on the log technology 16:11:30 backup yourself in your pocket 16:11:31 that way, if you survive the attack probably so will the backup 16:11:36 INFINITE BACKUPS. 16:11:39 hey, I recognized it 16:11:41 you can never die. 16:11:42 ever. 16:11:46 comex: wow 16:11:59 since it would take infinite time to destroy all the copies of yourself 16:12:00 it was pretty obscure... 16:12:07 ais523, that would require fitting 500 GB in my pocket 16:12:08 how 16:12:20 flash memory's getting better all the time 16:12:26 MicroSDs are small 16:12:28 I have an 8 GB memory stick in my pocket at the moment 16:12:30 depends on the size of your pocket 16:12:32 ais523, and wear out quickly with daily backups 16:12:39 There are 32 gig SDHCs IIRC 16:12:39 er 16:12:41 well, my pocket-backup isn't daily 16:12:45 its for a nuclear attack AnMaster 16:12:48 and it's mental-incremental 16:12:49 currently I have incremental daily backups 16:12:51 i'm sure you could lose a month 16:13:02 as in, I back something up if I think it needs backing up and I remember it changes 16:13:06 I'd be happy to live 16:13:17 every now and then I'll tarball all the backup-requiring bits of my home dir and store that on the USB stick 16:13:18 FireFly: pfft, you and your logic 16:13:27 * FireFly likes his logic 16:13:29 my disaster plan: grab backup drive, run. 16:13:34 ehird, anyway I keep them in a safe. That is metal. That should at least reduce EMP *a bit* 16:13:40 do not perform step 2 until step 1 is complete. 16:13:51 incidentally, radioactivity has a much larger effect on fibre optic cables than both other electronic stuff and humans 16:13:52 My disaster plan: null 16:13:52 :< 16:13:55 AnMaster: okay, listen, if there's an EMP attack 16:13:59 you're fucked anyway 16:14:00 * FireFly doesn't do backups, but I should 16:14:03 ehird, yes 16:14:08 like, as in, death imminent :P 16:14:09 me too 16:14:12 FireFly: definitely, most people only learn that lesson until they've already lost one set 16:14:20 And I havn't been there 16:14:21 ehird: surely it depends on how near the EMP attack is? 16:14:28 and how strong 16:14:28 ais523: I've lost data before, but it wasn't vital 16:14:36 (Just some music, the drive partially made some files vanish) 16:14:50 how did the drive manage that? 16:14:50 ais523: considering it would wipe out infrastructure... 16:14:54 also, dunno 16:14:56 it was in my old computer 16:14:58 very dusty 16:14:58 CD ROM should be a pretty good backup 16:14:59 bashed around a lot 16:15:02 dropped a few times 16:15:04 I'm sufficiently old I've lost data due to bad sectors on floppy disks 16:15:05 never maintained 16:15:06 etc 16:15:09 and I don't mean CD-R. But CD-ROM 16:15:14 quite a difference 16:15:25 AnMaster: not really 16:15:27 the second computer I used didn't have a sufficiently large hard drive to store the things I did, so I stored everything on floppies instead 16:15:28 ais523, I have too 16:15:30 you can snap a disk trivially 16:15:40 I've done it in seconds 16:15:45 ehird, well assuming it is stored in a dry protected place 16:15:48 disk splinters everywhere :| 16:15:52 * impomatic backs up to memory sticks 16:15:55 I was kind of stupid and tired. 16:15:57 ehird, I mean, EMP wouldn't be much of an issue 16:16:01 ehird: it's relatively hard to snap them accidentally, it's easy but not easy to do accidentally 16:16:09 indeed 16:16:16 my hands stung a bit after snapping that disc :D 16:16:18 impomatic: anyway, I had to spend ages cleaning up after your quit message last time 16:16:27 I'm not really evolving as fast as the technology does. I'm fine with my 512 MB Mp3 player, I don't need no more 16:16:27 it was threatening to overwrite the logs 16:16:29 uh 16:16:35 ais523, what was that quit message? 16:16:42 AnMaster: a redcode quine 16:16:48 hah 16:16:49 that ran itself immediately after printing 16:16:56 known as an "imp" 16:16:58 What quit message? 16:17:00 thus presumably impomatic's username 16:17:13 Aha :-) 16:17:27 and I'm not sure I knew enough offhand redcode to write an imp-gate to stop it 16:17:39 I forgot about that. Cool that the logging software runs redcode 16:17:52 jmp #0, <-5 should stop it next time 16:17:53 I don't think it does 16:17:59 -!- jix has joined. 16:18:02 ais523: clog rebooted yesterday or the day before 16:18:07 and the mysterious nef was online 16:18:11 It was yesterday, yeah 16:18:15 for the first time since 2000 16:18:17 IIRC 16:18:20 or 2004 or something 16:18:20 but I'm trying to be sure 16:18:22 ages ago, anyway 16:18:30 you never know when the logging software might suddenly become Turing-complete 16:18:40 I have a proper redcode Quine actually, 170 instructions. I just need to recompile the MARS to run programs longer than 100 lines :-) 16:18:53 clog is pretty good, it's pretty stable 16:18:55 that needs a recompile? I thought the limit was just there to stop people cheating 16:18:57 Who's nef? 16:19:02 impomatic: see log link 16:19:02 impomatic: the person who keeps the logs 16:19:07 apart from that, we don't know anything about them 16:19:15 no idea why they're logging the channel, for instance 16:19:18 ais523: apparently the tunes.org server admin administers it now 16:19:22 Oh, I see :-) 16:19:25 also, lament or someone asked 16:19:43 Wait, we don't know _why_ they're here, logging our channel? ;o 16:20:06 I've finished Redcode Forth. It's currently doing well on the programming reddit. There's also an article on there about OISC. 16:20:49 wow, I read proggit from time to time but somehow I missed that 16:21:11 This is completely pointless and has no real world application. I love it! 16:21:18 Well it's handy to have logs as evidence! :-) 16:21:18 only one comment, I may as well copy it here 16:21:21 a while ago I was going to link impomatic to an article I saw on reddit last year about someone implementing a bunch of algorithms like from TAOCP in redcode, but then I clicked the link again and saw it was him :D 16:21:25 haha 16:21:34 did you link him anyway? 16:21:36 I would have 16:21:40 haha, not that I recall 16:21:44 Where's that? ;-) 16:21:52 impomatic: it just linked to impomatic.blogspot.com 16:22:02 I implement another ever now and again. 16:22:49 org euclid+2 16:22:50 euclid mod.ab #a, #b 16:22:50 impomatic: I like your descriptions of esolangs, very clear 16:22:51 mov.x euclid, euclid 16:22:53 jmn.a euclid, euclid 16:22:55 I didn't realise that was so simple 16:22:56 I ought to finish off Heap sort. It's about 70 instructions though, 4 times longer than anything else. 16:23:11 Quicksort and Combsort are both under 20 instructions 16:23:12 how long is mergesort in redcode, I wonder? 16:23:32 I might tackle merge sort. 16:23:39 I love redcode, actually, it's a sort of anti-esolang 16:23:46 it occurs to me that sorting arrays is a pretty rare operation. 16:23:53 I haven't quite figured in-place mergesort 16:23:55 -!- Judofyr has quit (Remote closed the connection). 16:24:01 and most of the time your values have a trivial mapping to integers, so you should just use one of the non-comparison sorts 16:24:04 like, wossname, bucket sort? 16:24:21 yep 16:24:41 anyway, recently I was sorting a large list of words ordered by the words with letters sorted into alphabetical order 16:24:48 sort of a lookup table for anagrams 16:24:50 letters have a trivial isomorph to integers. 16:24:53 so there are uses 16:24:53 :P 16:24:56 letters do, but words don't 16:25:00 oh, true 16:25:06 or, they do, but they're sufficiently large that bucket sort would be very inefficeint 16:25:07 still, that's quite a rare cas 16:25:07 e 16:25:09 *inefficeint 16:25:24 If I was making a standard library, I would have 'sort : (a -> int) -> [a] -> [a]' 16:25:35 and 'genericSort : {comparable a} [a] -> [a]' 16:25:42 or similar 16:27:34 also, it turns out that strongly typing OOP duck-typing is easy. 16:27:48 for instance: 16:27:49 hello : 'a = {(+) : 'b -> 'c} -> 'b -> 'c 16:27:50 hello a b = a + b 16:28:01 trying to figure out how to do that with multi dispatch 16:29:03 ehird: does that collapse into a '_a sort of type? 16:29:10 or does it stay fully polymorphic? 16:29:18 fully polymorphic 16:29:23 assuming + is a message, ofc. 16:29:25 pretty impressive 16:29:30 ocaml pretty much does the same 16:29:32 and yes, that's pretty clear from your syntax 16:29:42 for multi dispatch, well, it's harder 16:29:45 because you dispatch on all arguments 16:29:47 here's my attempt: 16:30:07 * ais523 suddenly wonders what unassignable compiled into ocaml would look like 16:30:09 hello : { (+) : 'a -> 'b -> 'c }. 'a -> 'b -> 'c 16:30:09 hello a b = a + b 16:30:31 so { } is a "context", basically meaning 'for the multi dispatch methods satisfying...' 16:30:44 ais523: oh, I might try that 16:30:46 wouldn't be hard 16:30:50 I doubt it would be 16:33:25 ais523: unfortunately, 16:33:25 avg : { length : 'a -> 'b; (/) : 'b -> 'c -> 'd; sum : 'a -> 'c } 'a -> 'd 16:33:25 avg lst = length lst / sum lst 16:33:31 you pretty much end up repeating the function body 16:33:46 that's to be expected 16:33:53 OMG 16:33:59 why the OMG? 16:34:00 The new version of D 16:34:02 is 100% open source 16:34:06 fully buildable dmd 16:34:08 wasn't the old version? 16:34:13 ais523: not all of it 16:34:22 the frontend and some of the backend, iirc 16:34:26 but there was some code from other places 16:34:30 that couldn't be relicensed 16:34:37 but finally it's fully open source 16:37:50 gr, this is irritating 16:42:47 why is this brokennn 16:43:39 Oh. 16:43:44 Grah. 16:43:49 Depends on gnu sed, I think. 16:44:03 ifdef LIB_PACK_NAME 16:44:04 FOR_PACK_NAME := $(shell echo $(LIB_PACK_NAME) | sed -e 's/^\(.\)/\U\1/') 16:44:06 endif 16:44:09 Why must people not test on BSD 16:44:39 does BSD sed have arbitrary limits 16:44:51 ais523: is that a reference 16:44:51 ? 16:45:25 that's a backrefence, yes 16:45:30 I thought all seds did that, though 16:45:36 i meant 16:45:41 16:44 ais523: does BSD sed have arbitrary limits 16:45:44 is that a reference to something 16:45:49 no, it isn't 16:46:01 % sed -e's/^\(.\)/\U\1/' 16:46:01 a 16:46:02 Ua 16:46:04 some old versions of sed couldn't handle more than a certain amount of text at once 16:46:08 thus causing my Usexplib problem 16:46:25 \U is a perlism for translating into uppercase, I wonder if GNU sed has it too? 16:46:34 ah, yes 16:46:36 definitely 16:46:39 since it should be Sexplib 16:46:49 now, I'd loathe to install gsed, and I can't modify omakefile 16:46:54 err, ocamlmakefile 16:46:58 so ... hm. 16:52:24 ais523: any suggestions> 16:53:03 write your own wrapper for sed that specifically traps that line, and put it higher up on your PATH? 16:53:27 I would not be surprised to find more gstupidity. 16:53:42 well, replace it with an s2p followed by perl layer, then 16:53:48 Maybe I should create /usr/local/hell. 16:53:51 Containing gnu tools. 16:53:52 a sort of perl-sed which is more likely to be GNU-sed compatible 16:53:59 And tell godi to put it on its path. 16:54:06 you seem to really dislike gnu tools for some reason 16:54:07 bloar/ 16:54:09 *bloat? 16:54:33 I'd dislike them less if software didn't rabidly depend on them when I preferred bsd tools 16:54:52 Sort of like how Windows would be a bad OS but not really that bad if it wasn't so ubiquitous 16:55:18 [ehird:~] % s2p -e 's/^\(.\)/\U\1/' >x.pl 16:55:18 [ehird:~] % perl x.pl 16:55:19 sexplib 16:55:21 Usexplib 16:55:27 ugh 16:55:33 that really is a bad sed script, then 16:57:24 Hmm... 16:57:41 install gsed as /opt/local/bin/sed, then alias sed='/usr/bin/sed' in zsh? 16:59:11 -!- BeholdMyGlory has joined. 17:00:16 -!- Judofyr has joined. 17:02:44 * ais523 is very impressed with impomatic's print-in-decimal code 17:03:38 it's a pretty simple algorithm, just everything looks more impressive when written in redcode for some reason 17:03:43 Is FP implemented? 17:03:51 floating point, no 17:03:56 Function Programming. 17:04:01 Backus's apology for Fortran. 17:04:02 http://en.wikipedia.org/wiki/FP_programming_language 17:04:05 oh 17:04:21 * ais523 misread wikipedia as esolang somehow 17:04:24 :D 17:04:47 ais523: which print in decimal algorithm? I think there are 3 on there. Recursive, interative, and one which can also do any number base 17:05:27 the one in your forth program 17:05:32 I was just shocked at how short it was 17:05:35 in a lang looking like asm 17:05:39 redcode does that to me 17:05:50 redcode is far superior to x86... 17:05:53 Scary. 17:06:04 I imagine it would be a real pain to implement in hardware 17:06:26 Conventional programming languages are growing 17:06:26 ever more enormous, but not stronger. Inherent defects 17:06:27 at the most basic level cause them to be both fat and 17:06:29 weak: their primitive word-at-a-time style of program- 17:06:31 ming inherited from their common ancestor--the von 17:06:33 Neumann computer, their close coupling of semantics to 17:06:35 state transitions, their division of programming into a 17:06:37 world of expressions and a world of statements, their 17:06:39 inability to effectively use powerful combining forms for 17:06:41 building new programs from existing ones, and their lack 17:06:43 of useful mathematical properties for reasoning about 17:06:45 programs. 17:06:47 Yikes, flood. 17:06:49 Sorry. 17:06:51 Didn't know PDF linebreaks were, y'know, real. 17:07:26 pdf is a strictly presentational language 17:07:34 Yeah. 17:07:35 I hate pdfs. 17:07:40 x86 http://assemb.atspace.com/printdec.txt 17:07:41 my client warns me about unexpected linebreaks in what I'm pasting, it's usual 17:07:48 So does mine 17:07:52 but it doesn't tell me how many 17:07:57 just shows me a multi line edit form 17:07:57 I mean, there are quite often unexpected linebreaks 17:08:02 and I entered it away too quick 17:08:06 impomatic: impressive 17:08:07 and mine just gives me a line count with a yes/no option 17:08:26 erm 17:08:27 impomatic: 17:08:28 call printdec 17:08:31 shouldn't that be 17:08:32 jmp printdec? 17:08:36 it's a tail recursion... 17:08:58 did impomatic write that one, I wonder? 17:09:04 yes 17:09:04 ah, yes 17:09:13 the main page is in the style of corewar.co.uk, and his name is on it 17:09:28 also, he's right here y'know 17:09:36 yes, I nkow 17:09:41 I nkow too 17:09:41 I saw the name 17:09:46 *know 17:09:53 and was wondering if it was impomatic 17:09:56 nkow: To nkep in a ow sort of way. 17:10:12 No, can't be changed to printdec. Yes, that's another of my pages! :-) 17:10:13 that's, like, a double abbreviation 17:10:32 hmm 17:10:42 why can't call at a tail position be turned into a jump...? 17:10:54 also, is that PUTCHAR for dos or linux or? 17:11:03 ugh, the first Google result for nkep is actually the correct meaning 17:11:07 DOS 17:11:28 although the fifth version is the one that actually defines it 17:11:29 ais523: for me, it suggests nkdep, and shows the top two sesults for that 17:11:32 *result 17:11:34 before the agora results 17:11:39 well, yes, but those don't count 17:11:55 wow, http://jmcteague.com/mediawikiold/index.php?title=Nkep&redirect=no looks so much like vandalism 17:12:04 [[So you are denying the existence of nonsensical action? Over 50 17:12:05 million idiots in this world prove you wrong every day.]] 17:12:07 --bobthj 17:12:11 but "nkeplwgplxgioyzjvtxjnncsqscvntlbdqromyeyvlhkjgteaqnneqgujjpwcbyfrpueoydjjk" bears a strong resemblence to its actual definition 17:12:16 impomatic, err, why does using DOS prevent you from jumping? 17:12:18 I wonder what politically motivated thing he's referring to. 17:12:27 AnMaster: SCROLLBACK. 17:12:32 also, is that PUTCHAR for dos or linux or? 17:12:35 ais523: that isn't vandalism 17:12:36 ah 17:12:38 that's iammars's site 17:12:43 ehird: I know 17:12:46 ah 17:12:52 that's why I said it /looked/ like vandalism 17:12:56 even though I know it's probably not 17:13:04 on the other hand, if someone did vandalism that string, would you ever know? 17:13:12 *vandalise 17:13:14 vandalism is a verb! :D 17:13:25 The routine builds a list of digits on the stack, which are then popped off and printed. 17:13:38 ah, so it's non-tail recursin 17:13:50 ah 17:13:54 but 17:14:00 hmm 17:14:02 oh right 17:14:06 you need call's stack effects 17:14:16 It can be made iterative, but that is 2 bytes longer. 17:14:36 you could make an iterative one that iterates backwards. I wrote one, The max space you may need is rather trivial to calculate iirc. 17:14:39 * AnMaster looks for the code 17:15:13 right. My code is for any base 0-36 and in C 17:15:18 err 17:15:20 1-36 17:15:33 .. the whole point is to be short. 17:15:49 Not bases <= 0 ? :-( 17:15:57 minus bases rock 17:15:58 everyone loves negative bases 17:16:05 besides, bases 0-36 and in C is trivial 17:16:06 http://rafb.net/p/o7Da1r12.html 17:16:08 although you need negative digits 17:16:11 -> negative strings 17:16:11 because there's a standard library function for doing that 17:16:18 umm.... 2-36, probably 17:16:23 what does base 0 mean, anyway? 17:16:28 AnMaster: http://pastie.org/408471 17:16:28 even base 1 = unary is dubious 17:16:38 ais523, I just followed BASE spec 17:16:39 ais523: highly dubious, base 1 is useless 17:16:41 it's all 0 17:16:48 ehird, make an automatic rafb repaster bot 17:16:50 ehird: agreed 17:16:50 :P 17:16:58 AnMaster: It'll do that, then spam you with messages. 17:17:04 /notices, to be precise. 17:17:11 Your choice 17:17:12 ehird, I can ignore them easily 17:17:19 *shrug* 17:17:22 Not if it makes 100 clones over proxie. 17:17:23 proxies. 17:17:29 ehird, anyway, I need to paste from command line. 17:17:34 as in wgetpaste 17:17:47 so? you can script that trivially 17:17:50 ehird: then we just get freenode to ban oyu 17:17:56 for spamming someone with 100 proxies 17:17:57 ehird, yes, I already have a working script 17:18:01 ais523, indeed 17:18:01 ais523: so I use a proxy :P 17:18:20 -!- Slereah has joined. 17:18:23 AnMaster: you write hex in lowercase? 17:18:39 ais523, why shouldn't I? 17:18:48 ais523: negative bases digit sets use your negative strings 17:18:48 :D 17:18:51 no real reason, I'm just surprised 17:18:56 ehird: haha! 17:19:01 ais523, BASE is RC/Funge, so it isn't that well defined anyway 17:19:19 what does it define bases 0 and 1 as? 17:19:38 ais523, reflect iirc. in mycology BASE is *all* UNDEF 17:19:46 hahahaha! 17:19:54 so what's the point of testing it, then? 17:19:57 to see what it does? 17:20:17 ais523, yes, and it is partly UNDEF because there is no way the program can verify it itself 17:20:26 since it only goes to output 17:21:00 -!- jix has quit (Connection timed out). 17:21:17 ais523, anyway my implementation is CCBI compatible, though different code. IIRC CCBI used some D string format stuff which could do any base 17:21:32 wow, is that underspecified 17:21:41 "Output n in base b" 17:21:57 ais523, well, it doesn't say iirc what range is valid 17:22:02 no, it doesn't 17:22:06 what I just wrote is the /entire definition/ 17:22:12 indeed 17:22:21 ais523, and that could vary a lot 17:22:40 base 2-16 are pretty well defined, by common practise. But apart from that... 17:22:54 meh, that's not too unspecified 17:23:29 My 8086 code for IEEE multiplication is more accurate than my processor. The processor rounds incorrectly about 1 time in 3 billion 17:23:42 impomatic, um, for specific values I guess? 17:24:07 impomatic, also that isn't strange. x87 is using 80 bits internally 17:24:38 impomatic, use SSE2 to do it, and you will get IEEE iirc 17:24:43 I didn't check the range of values... just ran it for a day and then compare some of the discrepancies. 17:25:18 impomatic, this was using float or double? 17:25:23 also what specific CPU? 17:25:26 I checked the results by hand and re-read the spec and it turns out the processor is wrong. 17:25:52 as well as, what exact instructions were you using for the CPU floating point 17:26:11 and what FPU flags did you have set... If you used x87 17:26:26 yeah impomatic can remember all these minute details from years ago 17:26:28 who can't 17:26:40 I didn't know it was years ago 17:26:52 he said 8086 17:26:58 that's not very modern 17:27:10 ehird, I know people using C64 for fun these days 17:27:18 for nostalgia 17:27:19 and such 17:27:27 ehird, your point was? 17:27:36 -!- Slereah_ has quit (Connection timed out). 17:27:40 8086 isn't very nostalgaic 17:27:45 it's just an old x86 17:27:50 the first one 17:27:50 nothing much special 17:27:56 8086 makes me nostalgic for the old versions of DOS 17:28:01 see! 17:28:04 that's DOS nostalgia 17:28:09 not 8086 nostalgia 17:28:16 Intel Celeron 600Mhz, can't be more specific. Single precision. 17:28:16 yes, I know 17:28:25 ais523, wasn't it FOS back then rather? 17:28:28 but the 8086 is a nostalgia-trigger for me 17:28:30 AnMaster: ? 17:28:37 Floppy Operating System 17:28:38 I prefer Z80 17:28:38 ;P 17:28:46 A floppy is a disk. 17:28:55 impomatic, "Intel Celeron 600Mhz" != "8086" 17:28:56 ... 17:29:05 and then ehird's argument is even more void 17:29:07 (So is an HD. A cd-rom is a disc though.) 17:29:14 AnMaster: no, because that's even less special 17:29:21 and so less nostalgiac 17:29:40 ehird, I use a Pentium 3 as a file server. 17:29:49 well, you're bonkers. 17:30:10 ehird, No I'm just not rich 17:30:25 yes but pentium 3? 17:30:38 ehird, yes, I had one around. A waste to throw it away 17:30:39 ehird: file servers don't need a fast processor 17:30:43 true 17:30:48 but a pentium 3 in _anything_... 17:30:52 indeed. All it does is serve NFS from two IDE disks 17:30:58 ehird, better than Pentium 4 17:31:02 I think I have some even older computers lying around 17:31:08 I've got a computer which used to run windows 3.1 17:31:14 ais523, I have some old world macs. 17:31:18 but both the Windows and the DOS on there have died to bitrot 17:31:23 a pentium 3 isn't better than a pentium 4... 17:31:25 well one pre-PPC 17:31:30 ehird, it is. in fact. 17:31:36 i disagree. 17:31:38 ehird, consider the pipeline stall 17:31:44 that's one aspect. 17:31:44 see logs from today 17:32:19 ehird, Pentium 4 also stalls badly at context switch 17:32:38 just FYI 17:33:08 I have about 40 old computers lying around. Several Z80 computer (z80, amstrad, msx) a few 6502, 6809 machines, one 8085 and others I haven't got a clue about. 17:33:20 I have a Hektor II and a Cray OWS :-) 17:33:29 oh and stalls a bit at syscall() too, it was worse when linux used interrupts, with 2.6 kernels it uses SYSENTER/SYSEXIT SYSCALL/SYSRET (forgot which is intel and which is amd) 17:33:39 which stalls less badly on Pentium 4 17:34:03 impomatic, CRAY! :D 17:34:19 this laptop's a celeron M, I have no idea if that's good or bad 17:34:22 ehird, in any case a P4 uses more power than a P3 too 17:34:31 and finally 17:34:36 I don't have a P4 17:34:47 I did have one years ago. it overheated in the end 17:34:50 i had a p4 way back. 17:34:50 even with a huge fan 17:34:54 it sucked! 17:34:59 yes 17:35:02 p4 sucks 17:35:05 i also had 15 inches. 17:35:07 of monitor, that is. 17:35:09 ... 17:35:12 afk food 17:35:18 AnMaster: all my previous processors sucked too, though. 17:35:23 the p4 was a mild improvement. 17:37:01 Huh, I knew haskell in 2007. 17:39:08 The Cray isn't a supercomputer, although it's the size of a washing machine, has 12 huge fans and 8 processors. 17:39:21 impomatic: However, it CAN execute an infinite loop in 6 seconds. 17:48:11 Sure, but so can your FACE. 17:48:29 :'( 17:49:20 ehird: 2 seconds according to answers.com 17:49:39 no, 6 17:49:43 was the original 17:49:59 the same search let me find this: http://stackoverflow.com/questions/367571/detecting-infinite-loop-in-brainfuck-program 17:50:14 which is interesting, and also contains some really stupid beliefs about infinite loops 17:50:22 "EDIT: I do know that the halting problem is unsolvable in general, but I was not sure whether there did not exist special case exceptions. Like, maybe Matlab might function as a Super Turing machine able to determine the halting of the bf program. I might be horribly wrong, but if so, I would like to know exactly how and why." 17:50:43 stack overflow is a hilarious cesspool of people with slightly less intelligence than jeff atwood 17:50:57 that doesn't mean it can't be interesting, if maybe in a perverse sense 17:51:13 "SECOND EDIT: I have written what I purport to be infinite loop detector. It probably misses some edge cases (or less probably, somehow escapes Mr. Turing's clutches), but seems to work for me as of now. In pseudocode form, here it goes:" 17:51:14 x_x 17:51:23 ais523: Interesting like a freakshow... 17:51:40 " Call bfexec recursively with subprog" 17:51:42 doesn't that fail on +[>+]? 17:51:43 That will never go wrong. 17:51:46 ais523: Yes. 17:52:39 Hahaha, that fails spectacularly :P 17:52:49 It'll also call this an infinite loop: +>++<[>] 17:53:07 most of the answers are surprisingly sane 17:53:27 The worst part is that you can actually have a good crack at a halting detector for BF, allowing for uncertainty for tricksy programs. 17:53:37 The sad part is, there /are/ specific cases where infinite loops are detectable, but this poor sap will never understand the distinction between "general" and "specific" at all :P 17:53:41 I'd like to see a usually-right halting oracle for BF 17:53:43 GregorR: snap 17:53:51 ais523: not usually-right 17:53:59 just right-a-good-portion-of-the-time-in-non-tricksy-cases 17:54:18 http://research.microsoft.com/en-us/um/cambridge/projects/terminator/ 17:55:32 I still like the idea of being able to submit a program with an automatically verifiable proof it always halts 17:55:42 or always spends a finite time between asking for input 17:55:47 or something like taht 17:56:01 also, the halting problem is neatly sidestepped by going slightly subturing 17:56:18 enough to express most things, but you can only loop forever if given infinite input from the outside environment 17:56:36 (if you want to run a program that requires infinite livelihood, pipe something like 'yes' to it) 17:56:43 or rather, that'd be optimised out 17:56:46 but that's the basic idea 17:57:34 ais523: the last answer: "I have created a truly marvelous program to do this, which this textbox is too narrow to contain. " 17:58:55 ais523: same user answered with befunge on another question 17:58:59 http://stackoverflow.com/questions/62188/stack-overflow-code-golf/ 17:59:05 using '1' as a befunge stack overflow 18:00:02 ? 18:00:12 ais523: 1 pushes 1 to the stack 18:00:14 then it loops 18:00:14 you need to have a very small stack to do that 18:00:17 oh 18:00:17 so it pushes infinite 1s 18:00:19 clever 18:00:20 eventually overflowing the stack 18:00:22 '1' not '1@; 18:00:25 * '1@' 18:01:29 that befunge solution is clever, even though it's a different sort of stack 18:01:47 shortest stack overflow I can think of in INTERCAL is (1)DO(1)NEXT 18:01:55 that beats most of the submissions there 18:02:31 ais523: Ruby/Perl `$0` 18:02:41 is that, technically speaking, a stack overflow? 18:02:43 system stack overflow! 18:02:47 it's an ingenious infinite recursion 18:02:50 but it's overflowing something else I think 18:02:52 ais523: yes, because `` returns a value 18:02:56 you could do 18:03:04 puts `$0` + " and " + `$0` 18:03:05 in ruby 18:03:07 yes, but it's a different stack each tiem 18:03:13 ah, it's a number-of-stacks overflow 18:03:17 a stack stack overflow! 18:03:17 ais523: it's the stack of process children 18:03:19 yep 18:03:20 which is more of a tree 18:03:22 but still 18:04:09 someone wrote a compile-time soverflow in C++ 18:04:11 *overflow 18:04:16 I don't think it's a stack overflow, though 18:04:20 http://stackoverflow.com/questions/62188/stack-overflow-code-golf/63812#63812 18:04:24 now _that's_ cool 18:04:25 it's a type-complexity-overflow 18:04:55 heh, that's ingenious, a non-looping stack overflow 18:05:08 back 18:06:00 grr, the Scheme submissions are stupid 18:06:03 they're tailcalls 18:06:18 and all Scheme standards mandate TCO 18:07:03 irssi: 18:07:05 /eval $L 18:07:13 about infinite recursion. You can detect trivial cases of finite/infinite. In fact compiler do that to optimise better. 18:07:33 GCC can warn you about loops it can't decide about 18:07:33 thanks, we only said that 5 times before you. 18:07:33 oh right 18:07:49 ehird, I'm still reading scrollback. My comment memory is rather small 18:07:56 so I can't wait until I read it all 18:08:02 the IRC equivalent of ais523's agora posting 18:08:10 except IRC lines are a lot easier to read ahead on.. 18:08:58 ais523: how do you declare something at the gprolog prompt? 18:09:00 I forget 18:09:07 use assert 18:09:13 you need an extra pair of parens due to precedence 18:09:21 but you write assert((head :- body)). 18:09:21 uncaught exception: error(existence_error(procedure,assert/1),top_level/0) 18:09:27 sorry 18:09:28 assertz 18:09:38 (or asserta to declare it at the start of the program) 18:10:09 | ?- assertz((a(X) :- assertz(X))). 18:10:23 did that work? 18:10:27 I don't see why it wouldn't have 18:10:33 it did 18:10:39 ooh, another one small as the befunge one 18:10:40 intel 4004 18:10:41 CALL $ 18:10:44 -> ascii , 0101 0000 18:10:49 a lot faster too :P 18:10:53 http://stackoverflow.com/questions/62188/stack-overflow-code-golf/597372#597372 18:11:13 a Prolog stack overflow would be a:-a,b. 18:11:18 a stack stack overflow! <-- possible in Funge-98. 18:11:25 although you need to set compiler flags not to error on the undefined command b 18:11:25 and in a different meaning 18:11:29 ais523: or just 18:11:32 p:-p 18:11:37 that's tail-recursion 18:11:44 gprolog doesn't optimize it 18:11:47 Fatal Error: global stack overflow (size: 16385 Kb, environment variable used: GLOBALSZ) 18:11:53 WOW IT IS RUBBISH 18:11:58 LOL 18:12:04 how can any prolog interp not optimise tail-recursion? 18:12:06 that was unexpected 18:12:06 if { can't allocate another stack in the stack-stack it is required to reflect though, so it doesn't fail at overflow 18:12:28 it's the only general way to do looping in prolog 18:12:37 apart from assert/retract in a backtrack loop, which is insanely ugly 18:12:38 [ehird:~] % GLOBALSZ=-1 gprolog 18:12:38 Fatal Error: global stack overflow (size: 1 Kb, environment variable used: GLOBALSZ) 18:13:00 ais523: 18:13:04 p :- print(hi), p 18:13:05 works 18:13:06 just not p :- p 18:13:30 wait, no 18:13:32 ok, that's even weirder 18:13:33 it just takes longer to overflow 18:14:15 anyway, gprolog's the only interp for any language I know of, other than OIL which doesn't count, which can crash because it's run out of strings 18:14:30 hahahaha 18:14:30 I mean, running out of strings is a dubious concept anyway 18:15:28 ais523, it has a fixed size string pool? 18:15:37 yes 18:16:24 technically current erlang versions can run out of atoms. But the limit is a few millions iirc, and someone said it will most likely go away in the next major release 18:17:03 + you can change the limit with some obscure command line option iirc 18:17:44 "The maximum number of atoms is 1048576." (in R12B-5) 18:18:13 http://www.erlang.org/doc/efficiency_guide/advanced.html#9.2 18:18:19 ehird: try running setof(Property,atom_property(Atom,Property),PropertyList). at the gprolog repl 18:18:26 and use ; to run through the results 18:18:29 ... is that russel's paradox? 18:18:32 no 18:18:38 it returns the string pool, and data about it 18:18:43 ha 18:18:52 really amusing is that some of the strings in the pool are filenames on the computers where it was defined or edited 18:18:55 ais523, that seems strange 18:19:01 Atom = '/home/diaz/GP/src/src/BipsPl/dec10io.pl' 18:19:01 PropertyList = [needs_quotes,hash(458243),length(39)] ? 18:19:18 ais523, strange... 18:19:37 AnMaster: GNU Prolog is crazily reflective 18:19:54 | ?- setof(Property,X,Y). 18:19:54 uncaught exception: error(instantiation_error,setof/3) 18:19:56 yeah 18:19:56 o_O 18:20:02 even more so than the standard portable version, which is also crazily reflective 18:20:05 ehird: why is that o_O? 18:20:10 idungeddi 18:20:13 t 18:20:21 that's "for all commands, run that command and return the set of results" 18:20:31 ais523, still don't you think running out of atoms is a bit funny? 18:20:36 AnMaster: yes I do! 18:20:43 18:20 ais523: that's "for all commands, run that command and return the set of results" 18:20:43 so? 18:20:45 i tshould do it! 18:21:03 would work in my language 18:21:04 > x 18:21:06 x = 0 18:21:07 x = 1 18:21:09 (forever) 18:21:13 x = {} 18:21:15 x = {0} 18:21:17 x = {1} 18:21:18 (forever) 18:21:20 x = {0,0} 18:21:22 (etc) 18:21:26 .. 18:21:27 most Prolog interpretations have some restrictions on what they can do 18:21:36 insane things are very easy to write in Prolog 18:22:24 I'd also have (crash = 1/0) 18:22:29 for error reporting. :P 18:22:41 surely running all commands would cause an exception before long? 18:22:48 ais523: ooh, that's a good idea 18:22:49 ais523, the reason erlang can run out of atoms currently is that for speed reasons it maps each atom to an integer internally. Type tagged in some way of course. 18:22:53 in fact, how did you know it didn't work? 18:22:53 then 18:23:00 maybe the first command it ran caused an instantiation_error 18:23:07 AnMaster: same reason in Prolog 18:23:15 except the pool seems smaller 18:23:21 isa(crasher(x), _) 18:23:25 crasher is all functions 18:23:33 although I'm not sure that would be valid code 18:24:03 ah, no 18:24:05 that'd just define x 18:24:06 not crasher 18:24:08 eval(_) should work 18:24:14 eval(x) would work 18:24:16 ais523, it also has some lookup table for it. Anyway the limit is too large for any sane program to hit. Oh and atoms are in the current version never removed from said table. Plans are to change that in the future. 18:24:18 but it'd just evaluate boring things 18:24:19 like '' 18:24:21 '\0' 18:24:21 etc 18:24:24 you'd want 18:24:37 ais523, that is garbage collect the atom ids. 18:24:39 some sort of 18:24:49 wow, it seems that Erlang copied some of the deficiencies of Prolog as well as some of its advantages 18:24:56 isa(x,string); try(eval(x), 'error') 18:25:05 ais523, How do you mean? 18:25:05 note: cannot distinguish errors from programs outputting 'error' :P 18:26:09 http://blog.wolfram.com/2009/03/05/wolframalpha-is-coming/ <- Puh leez. 18:26:13 ais523, oh and erlang seems more useful in "real world". I mean from what I understood, and I may be wrong, Prolog is a bit like Scheme: both languages are very nice and such, but aren't very easy to use for anything practical. 18:26:19 at least in a portable way 18:26:34 "You've got a Turing complete language and a toy model of complexity. That oracle will practically write itself!" --reddit. 18:26:52 scheme is very practical. 18:26:57 -!- olsner has joined. 18:26:58 just not for networked applications, or the like. 18:27:15 there are plenty of standalone, {file,keyboard}-to-{file,stdout} programs 18:28:05 ais523: "We're making early access available to a few select individuals. Contact us for information »" 18:28:05 I will totally write "dong" in it 18:28:11 you must apply :P 18:28:17 um 18:28:21 what is NKS? 18:28:27 in that link ehird posted 18:28:35 new kind of science, Wolfram's ego in book form. 18:28:44 ah 18:28:44 right 18:29:00 although the classification book is more generous, let's say "dead tree". 18:29:07 s/more/too/ 18:29:25 Oh you. 18:31:05 http://www.theonion.com/content/node/34168 18:31:24 http://blog.wolfram.com/2009/03/05/wolframalpha-is-coming/ <- Puh leez. <-- so, what do you think about it? 18:31:48 AnMaster: Wolfram is pioneering his revolutionary new "Masturbate direct to a web page" technology. 18:32:03 ehird, cuil fail? 18:32:13 Oh, cuil is at least amusing. 18:32:18 This will probably just be pathetic. 18:32:21 ah 18:32:57 I actually knew it was coming, but had to keep it a secret 18:33:14 Really, reading about it 18:33:23 It sort of reminds me of EsCo :o 18:33:26 Iunno why 18:33:29 ais523: LOL, since when 18:33:33 * impomatic wonders why the corewar subreddit has been banned :-( 18:33:38 impomatic: o_O it has? 18:33:39 for ages 18:33:44 Let's torture ais523 for more secrets 18:33:53 ais523: how could you keep the excitement in you?! 18:34:07 ais523, how did you know about it? 18:34:18 Slereah, good idea 18:34:30 one of the wolfram people was talking to me and showing it off 18:34:37 I even suggested a couple of changes 18:34:40 So... what does it do? 18:34:48 ais523, does it fail badly? 18:34:48 Slereah: it searches KNOWLEDGE ITSELF!!!!!!!1111111 18:34:50 read the wolfram blog description 18:34:58 So it's wikipedia? 18:35:01 no 18:35:02 :D 18:35:09 http://www.reddit.com/r/corewar/ 18:35:11 ais523, it actually works? 18:35:16 it's like wikipedia but useless! 18:35:21 ais523, it works well? 18:35:28 impomatic: I'd try the feedback 18:35:29 it's not really like wikipedia 18:35:34 it's more like google calculator + insane 18:35:41 + ego 18:35:49 ais523, so is it fail or not? 18:35:58 impomatic: you could start a new one called "raweroc" or something temporarily 18:36:11 AnMaster: its failure status is covered by his NDA. 18:36:19 why was corewar reddit banned, anyway/ 18:36:24 ehird, he didn't say so 18:36:25 that;'s what he's asking 18:36:28 AnMaster: it was a joke 18:36:44 ehird, which line was a joke 18:36:44 I didn't actually sign an NDA, it was an informal agreement 18:36:54 18:36 ehird: AnMaster: its failure status is covered by his NDA. 18:36:57 but I didn't really see enough to tell much more about it than what's been announced 18:37:07 :-) 18:37:10 ais523: with less hyperbole, I assume? 18:37:15 ehird, ah ok. "It" could have meant one of ais523's comments too 18:38:13 ais523: so, is it fail? 18:39:02 you'll see 18:39:29 you'd think that'd be a vague enough question to answer 18:39:45 * AnMaster agrees with ehird 18:39:49 "All one needs to be able to do is to take questions people ask in natural language, and represent them in a precise form that fits into the computations one can do." 18:39:55 from the Wolfram blog 18:40:07 ais523, yes, that implies fail 18:40:12 ais523: so it takes mathematica expressions? 18:40:15 and EVALUATES THEM?! 18:40:15 :D 18:40:27 ehird: it is certainly capable of doing that 18:40:27 holy shiiiiiiii 18:40:32 wow 18:40:35 can it make toast 18:40:39 if it can, I'm sold 18:40:47 will it cost money? 18:40:49 or be free 18:40:54 both 18:41:05 no idea about that, they changed the name since I last saw it 18:41:07 where did it say that? 18:41:13 * AnMaster looks for it in the blog 18:41:14 what was it called? AMAZINGWIN? 18:42:14 anyway, the biggest clue about what they expect it to be used for is "But if one’s already made knowledge computable, one doesn’t need to do that kind of natural language understanding.", I think 18:42:26 or maybe "Pulling all of this together to create a true computational knowledge engine is a very difficult task." 18:42:32 what the fuck does that mean 18:42:37 it's so vague scigen could have made it 18:42:44 scigen? 18:42:47 http://en.wikipedia.org/wiki/SCIgen 18:43:14 "Let’s say we succeed in creating a system that knows a lot, and can figure a lot out." is maybe an even better description 18:43:35 ais523: they created strong AI? 18:43:43 Enslaved 5 thousand chinese teenagers to answer the queries? 18:43:52 nah 18:44:05 Wolfram personally answers all input? 18:44:18 anyway, they probably had a reason for not telling anyone what the hell it's about, so I'll shut up now 18:44:40 Get the thumbscrews, we'll get the truth out of him! 18:44:59 ais523: I'm pretty sure the reason was "Wolfram is a megalomaniac theater director"... 18:44:59 either that, or they just have insanely bad marketing 18:45:45 yep, a web search about it reveals people saying, "that's too vague, it must just be an appetiser" 18:46:19 wait 18:46:20 http://motls.blogspot.com/2009/03/wolframalpha-central-brain-of-mankind.html 18:46:23 "central brain of mankind" 18:46:23 that sounds like Apple 18:46:23 XDDD 18:46:29 about future products 18:46:30 vague 18:46:36 rumors 18:46:43 AnMaster: apple are _silent_ about future products, except via rumours 18:46:49 ehird, ok true 18:46:52 that is a difference 18:46:53 and most often those rumours are ridiculously precise 18:47:05 ehird, you mean intentionally leaked? 18:47:16 possibly :P 18:48:22 ais523: one question -- is it actually something new that works? 18:48:26 surely that's vague enough to answer... 18:48:40 that blog: "Once you'll be able to open www.wolframalpha.com, it will be ready to convert every question of yours, formulated in a natural language, into a well-defined computational format that represents the natural language." 18:48:48 it's a NLP? 18:48:58 English -> Mathematica... 18:48:59 ? 18:49:02 and "The Central Brain of Mankind will search all (so far only millions of lines of) possible algorithms, methods, statements, and all (so far only trillions) of curated data that exist on the Internet, combine them and recombine them in all conceivable ways, and answer your question." 18:49:07 ok, I think that's clear enough 18:49:20 it's clear if you deal in marketing bullshit and vagueities 18:49:28 it compiles English into Mathematica, and then combines it with a massive database 18:49:42 right, right, nothing special 18:49:48 plus a few other miscellaneous things which probably they've dropped by now because they struck me as ridiculous ideas at the time 18:49:50 wait 18:49:55 specifically, the NLP is probably awful 18:49:56 but they haven't been mentioned yet so I won't tell 18:49:57 quantum computer? 18:49:57 like terrible awful. 18:50:00 AnMaster: no 18:50:04 "combine in all possible ways" 18:50:19 surely only a quantum computer could do that for such a large data set 18:50:25 are they renting out google's servers? :P 18:51:08 ehird, the TLA NLP means? 18:51:14 (in this context) 18:51:24 natural language probes. 18:51:28 except with a different p 18:51:30 probes? 18:51:32 ah 18:51:33 which I'm sure you can deduce 18:51:35 processor? 18:51:37 (hint: it's "parsing") 18:51:41 ah 18:52:22 wait, if this uses the internet, then the data isn't verified correct is it? 18:52:34 that is one reason it will fail 18:52:41 you won't know what is true and what is false 18:53:03 I don't know where the dataset comes from 18:53:13 ais523, btw, how comes you were told about this? 18:53:26 he won the prize 18:53:32 AnMaster: someone working on it was interviewing me 18:53:32 presumably wolfram have spammed him ever since 18:53:35 and decided to show it off 18:53:49 mhm 18:54:00 ais523, what did you say the name was back then? 18:54:07 I didn't 18:54:13 and there were at least two possibilities 18:54:17 but they didn't choose either 18:54:24 besides, does Wolfram's internal codename for something matter/ 18:54:29 would it hurt revealing them? 18:54:34 probably 18:54:39 oh? 18:54:40 why? 18:54:55 he was told not to. 18:54:55 because there's no reason anyone should know it, really, and they might have a reason for people not to know it? 18:55:04 err, what possible reason? 18:55:06 mhm ok 18:55:19 I don't know of a reason, but I don't specifically know that there isn't 18:55:30 -!- Judofyr_ has joined. 18:55:42 we could help you find out ;P 18:56:02 using wolfram|alpha 18:56:10 "WHAT WAS THE CODENAME OF WOLFRAM|ALPHA?" 18:56:12 "PARSE ERROR" 18:56:16 "**RESET**" 18:56:17 "" 18:57:01 :D 18:57:04 actually, so ask it that when it does come out, I'd be amused to see the reply 18:57:18 Or "HOW IS BABBY FORMED" 18:57:25 why in upper case? 18:57:31 AnMaster: It's 80s technology! 18:57:39 "WHAT SETS DO NOT CONTAIN THEMSELVES?" 18:57:39 Because capslock is cruise control for cool 18:57:42 "GO TO HELL" 18:57:44 ehird, wrong. It's because it is a REAL QUERY LANGUAGE 18:57:47 "**RESET**" 18:58:17 people typing with caps lock on should do it in lowercase 18:58:29 this message and the previous were typed using caps lock 18:58:31 It's the next best thing to knowing how to use a search engine! 18:58:37 ais523, shift 18:58:43 yes, I know, that was obvious 18:59:31 I think my old mac didn't lower case on shift + caps lock 19:00:02 it only caused the non-letter keys to change (they were unaffected by caps lock) 19:00:06 new macs don't either 19:00:10 hm ok 19:00:18 IT IS QUITE NICE FOR WHEN YOU WANT DOUBLE_POWERED CAPS LOCK 19:00:24 ehird, why? And I assume apple have a reason to change it? 19:00:27 err 19:00:34 have an option to change it* 19:00:48 AnMaster: because if you hit the shift key instinctively for new sentences, yOU DON'T LOOK LIKE THIS. sEE? 19:00:50 (never try writing two different things at once) 19:00:58 also, no, it's not an option, it's a rather trivial thing really 19:01:12 ehird, oh, like there is no option to change font 19:01:20 what 19:01:33 ehird, you can't change font size in Tiger iirc 19:01:42 or was it typeface you couldn't change 19:01:45 anyway, one of them 19:01:47 for menus and such 19:02:05 You know, your valid OS criticisms would be listened to more if you didn't say ridiculous vague things that on the mostpart aren't even legitimate criticisms. 19:02:10 You do that with Windows too... 19:02:19 ehird, err see above 19:02:22 I did clarify 19:02:45 as far as I remember you can't change either font, or size, in the menus in OS X 10.4 19:02:52 I may be wrong 19:02:57 since I don't use OS X often 19:03:03 and if I am, please tell 19:03:20 "the font" 19:03:22 so very specific 19:03:30 ehird, how is it unspecific? 19:03:52 Change to Helvetica in the Apple Menu using the settings panels in OS X 19:03:53 how 19:03:55 -!- jix has joined. 19:03:59 or if it is Helvetica 19:04:02 change it to Times 19:04:06 oh, in the actual system. 19:04:09 no, you can't do that. 19:04:14 ehird, yes menus 19:04:17 how was it vague 19:04:17 well, you can. 19:04:18 it wasn't 19:04:33 ehird, not documented with standard tools 19:04:33 using tinkertools 19:04:39 AnMaster: so? 19:04:44 who gives a shit apart from you? 19:05:14 ehird, some old people can't see very well for example 19:05:19 they would need larger font 19:05:20 you can make fonts bigger. 19:05:32 ehird, and possibly a clearer type 19:05:34 typeface* 19:05:41 lucida grande is very clear. 19:06:17 ehird, for example I read recently there are some type faces optimised for people who are dyslectics. I don't think lucida grande is, but I may be wrong 19:06:36 if I was dyslexic I'd probably use the speech features 19:06:48 ehird, sure. But can you get it to read the menus? 19:06:55 yes. 19:06:57 everything 19:07:10 blind people can use OS X just fine 19:07:23 ehird, What about speech-to-text? 19:07:27 yes 19:07:31 it does speech recognition 19:07:33 I've tested it 19:08:08 I tried it. "Open Safari." *firefox opens*. "Close window." *system preferences pops up* 19:08:08 and so on 19:08:15 + it isn't available in Swedish 19:08:19 works for me. 19:08:19 only in English 19:08:24 maybe your voice is unclear. 19:08:42 ehird, still neither TTS or STT is available in Swedish 19:08:45 in OS X 19:09:03 oh well, swedes are dirty anyway. who cares about them. 19:09:28 if you are trying to be funny you aren't succeeding 19:09:30 bbl 19:09:48 err, do you realise who you are? i could say that every time you speak :D 19:09:54 -!- Hiato1 has joined. 19:13:06 -!- Judofyr has quit (Read error: 110 (Connection timed out)). 19:13:36 i wonder if snobol still exists 19:16:13 -!- Hiato1 has quit ("Leaving."). 19:20:12 i love weird languages when people actually use them for real programs 19:20:35 like java 19:20:40 practical esolanging is always fun 19:20:53 tombom: who are you, by the way? 19:20:58 I don't think I've seen you here before 19:21:48 oh nobody special, i'm new here 19:22:23 what are you interested in, esolang-wise? 19:23:04 State-of-the-art text-to-speech in Finnish sounded better than I remembered it doing. (Some EU project people asked our speech group to answer a web-based speech synthesis listener-evaluation thing.) 19:23:13 nothing special, i'm not massively into it. it's something interesting to code and i find the concepts pretty clever 19:24:49 Oh, and there was one hilarious section, where they had the speech synthesizer read completely nonsense sentences, because the aim in that part was just to evaluate isolated-word intelligibility, and context would've helped if it were real text. I'd paste some of the examples if they weren't in Finnish. 19:25:07 ^ul (aS(:^)S):^ 19:25:08 (aS(:^)S):^ 19:25:33 ^ul ((^ul )SaS(:^)S):^ 19:25:33 ^ul ((^ul )SaS(:^)S):^ 19:26:15 :-) 19:27:02 I keep meaning to add keymaker's quine to my underload page 19:28:31 Underload is such a good language for quines 19:28:56 A more impolite person might, at this juncture, remark something about that being all it's good for. :p 19:29:12 -!- Hiato has quit (Read error: 110 (Connection timed out)). 19:29:15 ^ul ((+ul )SaS(:^)S):^ 19:29:15 +ul ((+ul )SaS(:^)S):^ 19:29:25 Dog nabbit 19:29:31 Ooh. 19:29:36 If ! was the char for two interps 19:29:41 then !ul ((!ul )SaS(:^)S):^ 19:29:42 would be a forkbomb 19:30:06 if an interp can handle writing newlines 19:30:12 then you could forkbomb even with different chars 19:30:18 EgoBot used to be able to output newlines... 19:30:26 I miss Egobot. <3 19:30:30 GregorR: Psst. 19:31:13 Someone should golf the +ul/^ul loop shorter; I don't think I've seen shorter than 19:31:16 ^ul (^ul )(+ul )(~:SaS~aSaS(:^)S):^ 19:31:16 +ul (+ul )(^ul )(~:SaS~aSaS(:^)S):^ 19:31:28 that's the shortest symmetrical one I know 19:31:38 asymmetrical can be shorter 19:32:15 asymmetrical? 19:32:29 as in, one just tells the other to run a cat with its own source code 19:32:35 ^ul (^)(+)(~:S(ul )SaS~aSaS(:^)S):^ 19:32:35 +ul (+)(^)(~:S(ul )SaS~aSaS(:^)S):^ 19:32:44 That seems to have the same amount of chars. 19:32:45 ah, clever 19:33:19 ^ul (+ul butts)S 19:33:20 +ul butts 19:33:26 ^ul ((+ul butts)S)^ 19:33:26 +ul butts 19:33:40 ^ul ((+ul )SS):a~^ 19:33:40 +ul ((+ul )SS) 19:34:02 Someone may continue. 19:35:51 ^ul ((+ul )Sa(^ul )~*(:^)*a(S)*S):^ 19:35:51 +ul (^ul ((+ul )Sa(^ul )~*(:^)*a(S)*S):^)S 19:36:04 is that shorter? 19:36:07 that's an asymmetrical one 19:36:17 hoorah 19:36:35 It seems to again have the same amount, heh. 19:37:13 Maybe it's the THEORETICAL LIMIT 19:38:22 well, there must be a theoretical limit 19:39:08 ^ul ((+ul )SS):^ 19:39:08 +ul (+ul )SS 19:39:13 ^ul ((+ul )SaS):^ 19:39:14 +ul ((+ul )SaS) 19:39:18 ^ul ((+ul )SaS(:^)S):^ 19:39:19 +ul ((+ul )SaS(:^)S):^ 19:39:26 Almost, almost 19:39:30 ^ul ((+ul )SaS(S)S):^ 19:39:30 +ul ((+ul )SaS(S)S)S 19:39:34 you have to get it to prefix with ^ul when the +ul program is run, though 19:39:41 so the ^ has to end up somewhere in the result 19:39:47 oh, right 19:39:48 darn 19:40:11 Yes, about outputting newlines to fork-bomb; underload is very difficult for that, since you can hardly input newlines in IRC. 19:40:31 Underlambda will likely have sugar for output-newline 19:41:27 ^ul ( 19:41:27 ...unterminated (! 19:41:28 )S 19:41:37 Bah, it should keep reading the IRC lines following. 19:41:38 ^ul . 19:41:39 ...bad insn! 19:41:44 ^ul ...bad insn! 19:41:44 ...bad insn! 19:41:51 kimian 19:41:55 Kimian quines FTW 19:42:07 ^ul (...bad insn!)S 19:42:07 ...bad insn! 19:42:17 ^ul ((a)~:^):^ 19:42:19 ...out of time! 19:42:47 -!- Slereah_ has joined. 19:43:26 -!- impomatic has changed nick to ^ul. 19:43:40 <^ul> Hmmm... 19:43:45 ^ul (hi!)S 19:43:45 hi! 19:44:19 ^ul (:aSS:^):aSS:^ ...out of stack! 19:44:19 (:aSS:^):aSS:^ ...out of stack! 19:44:41 :DD 19:44:49 beautiful 19:45:15 ^ul (:aSS(:^):^):aSS(:^):^ ...out of time! 19:45:15 (:aSS(:^):^):aSS(:^):^ ...out of time! 19:45:27 The sense, it has none. 19:45:40 ^ul S 19:45:40 ...out of stack! 19:45:46 Hmm. 19:45:50 Shouldnt' that say underflow? 19:46:29 ^ul ^ 19:46:29 ...out of stack! 19:48:02 Hm. 19:48:04 Yes. 19:48:27 ^ul (:S^):S^ 19:48:27 :S^ ...out of stack! 19:48:44 ^ul (::S^)::S^ 19:48:44 ::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^::S^ ...too much output! 19:48:54 Oh yes, that's the underflow message. 19:48:59 ^ul (:::aSS^):::aSS^ 19:49:00 (:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(:::aSS^):::aSS^(::: ...too much output! 19:49:06 ^ul (:::aSS^ ):::aSS^ 19:49:06 (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ (:::aSS^ ):::aSS^ ...too much output! 19:49:20 ^ul (:::aSS^. In case you missed that: ):::aSS^ 19:49:21 (:::aSS^. In case you missed that: ):::aSS^. In case you missed that: (:::aSS^. In case you missed that: ):::aSS^. In case you missed that: (:::aSS^. In case you missed that: ):::aSS^. In case you missed that: (:::aSS^. In case you missed that: ):::aSS^. In case you missed that: (:::aSS^. In case you missed that: ):::aSS^. ...too much output! 19:49:37 ^ul (foooooo)(~:*~:^):^ 19:49:37 ...too much stack! 19:49:45 There's the stack overflow message, too. 19:50:16 ^ul (butts)(:*S):^ 19:50:17 :*S:*S 19:50:21 ^ul (butts)(*S):^ 19:50:21 butts*S 19:50:36 ^ul (butts)(~*S):^ 19:50:36 ~*Sbutts 19:50:43 ^ul (butts)(~*:S:^):^ 19:50:44 ~*:S:^butts ...out of stack! 19:51:05 fungot: What exactly do you mean with "butts out of stack"? 19:51:06 fizzie: probably chicken or gambit. i think you're supposed to smile and notice i was only joking... also im sure it'll be the best way 19:51:18 :D 19:52:11 -!- Slereah has quit (Read error: 110 (Connection timed out)). 19:53:11 -!- Asztal has quit (Remote closed the connection). 19:53:53 -!- Asztal has joined. 19:58:04 http://funcall.blogspot.com/2009/03/not-lisp-again.html 19:58:58 -!- Asztal has quit (Remote closed the connection). 19:59:01 -!- Asztal has joined. 20:05:47 back in ~1hr 20:08:07 -!- ^ul has quit ("spl #0,0 / mov.i #1,1"). 20:11:10 -!- Judofyr_ has changed nick to Judofyr. 20:15:41 back 20:18:02 -!- ais523 has quit (Remote closed the connection). 20:19:53 Kimian quines FTW <-- ? 20:20:14 ehird, what are those? 20:25:00 An error message which produces itself when run. 20:31:42 ^ul ( )(*)(~:S:*a~a~*~a*^:Sa~a*~a*^:^):^ 20:31:43 * ** **** ******** **************** ******************************** **************************************************************** ******************************************************************************************************************************** ************************************************************* ...too much output! 20:33:51 btw 20:33:53 http://www.int80h.org/strlen/ 20:39:16 ^ul (*)()(a~a*~a*^:S( )S:a~a*~a*^*a~a*~a*^:^):^ 20:39:17 * * ** *** ***** ******** ************* ********************* ********************************** ******************************************************* ***************************************************************************************** ********************************************************************************* ...too much output! 20:48:03 -!- tombom has quit ("Peace and Protection 4.22.2"). 21:07:33 ah 21:26:42 comex, modern libc uses highly optimised strlen() 21:27:18 for example glibc has different very fast optimised ones for i486, i586, i686 and so on 21:27:46 -!- Judofyr has quit (Remote closed the connection). 21:27:50 scasb isn't fastest on modern x86 21:28:01 rather a much more complex SIMD using variant is iirc 21:28:08 o_o 21:28:20 also, FUCK THIS 21:28:27 comex, fuck what? 21:28:35 I just tried to watch an episode of the daily show and it showed me about 5 30-second ads 21:28:47 huh 21:28:53 on their website 21:28:54 -!- MigoMipo has quit ("QuitIRCServerException: MigoMipo disconnected from IRC Server"). 21:28:56 fast forward? 21:29:00 you can't 21:29:06 after the end of one of them, I forgot to unmute in time, so I tried to go back ten seconds 21:29:35 I accidentally went back before the break, so it gave me a commercial and then I watched the last few seconds of the last part 21:29:48 after that, it gave me another commercial 21:30:03 and then I finally got to watch the show 21:30:06 comex, anyway asm hacks for stuff like strlen, memcpy and so on are stupid on modern systesm 21:30:08 systems* 21:30:19 why? 21:30:26 because the libc includes highly optimised variants 21:30:27 ! 21:30:29 as I said above 21:30:35 using libc will be faster! 21:30:36 doesn't that count as asm hacks :p 21:30:41 just not ones you make yourself 21:30:43 comex, not in your code 21:31:05 mmmm, not enough benefit in inlining? what if you call $function a million times 21:31:16 comex, also your code will be more portable, you don't need one asm hack for x86, one for PPC and so on. 21:31:22 as libc provides each 21:31:27 comex, glad you asked 21:31:42 comex, gcc has a builtin one anyway that it uses when possible 21:31:59 so libc one actually only ends up used when you do stuff that needs the function to be called 21:32:03 like function pointers 21:32:14 or when you use -O0 21:32:21 or possible sometimes else 21:32:36 comex, for constant string literals, gcc will compute length at compile time 21:32:55 hmm 21:33:50 comex, http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Other-Builtins.html#Other-Builtins 21:33:56 that is a LOT of them 21:34:16 comex, and there are other pages with other categories 21:34:23 like vector builtins 21:34:29 also, what are you trying to convince me of 21:34:29 sync built ins 21:34:31 and so on 21:34:33 :p 21:34:49 comex, that doing stuff like in http://www.int80h.org/strlen/ is counter productive 21:34:52 on modern systems 21:35:04 http://pastie.org/408758 21:35:27 comex, looks like the one yes 21:35:27 indeed, quite unlike what that optimizing strlen article says 21:35:30 for i686 21:35:34 that's x86_64 21:35:39 ah right 21:35:44 and I tell you the glibc one is faster 21:36:00 for various reasons 21:36:04 and I believe you, which makes me wonder why doing it manually is faster 21:36:07 ah yes I should have seen it was x86_64 21:36:11 had I read it properly 21:36:18 * AnMaster sees rax now 21:37:05 comex, in any case gcc uses a builtin when it deems it better 21:37:12 which mean code is inlined 21:37:21 other compilers do it too 21:37:25 like icc and so on 21:37:32 AnMaster: so is there any builtin for "scan forever for a certain character" 21:37:44 no, I mean manually as in asm stuff versus scasb 21:37:46 http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Other-Builtins.html#Other-Builtins 21:37:51 The ISO C90 functions abort, abs, acos, asin, atan2, atan, calloc, ceil, cosh, cos, exit, exp, fabs, floor, fmod, fprintf, fputs, frexp, fscanf, isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower, toupper, labs, ldexp, log10, log, malloc, memchr, memcmp, memcpy, memset, modf, pow, printf, putchar, puts, scanf, sinh, sin, snprintf, sprintf, sqrt, 21:37:51 sscanf, strcat, strchr, strcmp, strcpy, strcspn, strlen, strncat, strncmp, strncpy, strpbrk, strrchr, strspn, strstr, tanh, tan, vfprintf, vprintf and vsprintf are all recognized as built-in functions unless -fno-builtin is specified (or -fno-builtin-function is specified for an individual function). All of these functions have corresponding versions prefixed with __builtin_. 21:37:55 that lists strchr 21:37:59 which I assume is what you want 21:38:03 no, it's not 21:38:07 I don't want to stop at a null byte 21:38:22 though I suspect the speed difference is negligible 21:38:34 comex, hm. memchr with size set to max pointer - start address :P 21:38:47 AnMaster: if you saw the discussion yesterday, memchr was slower than strchr 21:38:52 with gcc -O3 21:39:53 comex, how did the generated asm differ? 21:39:54 sometime I intend to look at gcc's internals 21:39:56 they must be crazy 21:39:58 that caused it 21:39:58 AnMaster: didn't look :p 21:40:01 hm ok 21:40:05 comex, then it is hard to know why 21:40:43 comex, also how much slower? 21:40:46 did it matter? 21:41:21 comex, glibc has rawmemchr... not portable 21:41:32 and not a builtin 21:41:55 about 10ms :u 21:41:56 -!- atrapado has joined. 21:41:57 maybe 20 21:42:17 mhm 21:42:24 comex, for how many calls? 21:42:31 also rawmemchr if you don't need portable 21:42:36 about, uh, a few million or so :u 21:42:41 I think 21:42:46 also not a builtin 21:43:03 comex, that doesn't prevent inline sometimes... 21:43:18 comex, some stuff expand to macros 21:43:27 in *certain cases* 21:43:34 comex, glibc headers are pretty insane 21:43:52 as for gcc internals... Ask ais 21:43:54 he worked on them 21:44:01 when me made gcc-bf 21:44:17 uh, I'm scared 21:44:23 and for all this icc is still faster :u 21:44:40 comex, not on my AMD CPU 21:44:53 comex, btw I see one very very stupid thing on http://www.int80h.org/strlen/ 21:44:58 subecx, ecx; ECX = 0 21:45:03 that is very stupid 21:45:13 everyone knows xor is the fastest way to zero a register on x86 21:45:24 xor it with itself 21:45:40 that is even specially optimised in some x86 cpus 21:45:54 sub with itself is slower 21:46:11 at least in some cases 21:46:13 iirc 21:48:07 hey, even I knew to notice that :p 21:48:31 though I still don't know shit about x86 and it seems to me that there's a lot more shit than, say, ARM 21:48:33 :u 21:48:49 yeah, I know, not risc 21:48:58 comex, so I wouldn't trust that page too much. But it looks similar to the glibc implementation for i386... 21:49:22 AnMaster: why does x86 use push and pop so much anyway? 21:49:24 comex, actually modern x86 are RISC on the inside. They run CISC in microcode... 21:49:40 comex, register starved. x86 doesn't have a lot of registers 21:49:41 thought I read somewhere that that used to be true but not so much anymore 21:49:48 AnMaster: why? 21:50:19 is there a reason? 21:50:22 comex, iirc: 1) making register memory is expensive 2) the original 8086 and even some later models were made to be cheap 21:50:32 x86_64 double the register count after all 21:50:49 oh and you can't add more registers as you go without breaking existing stuff 21:50:58 due to the changes needed 21:51:16 you mean like x86_64 did :p 21:51:16 well, not add general purpose ones that is 21:51:33 comex, yes it did as I said above. But it did break everything else too by going 64-bit 21:51:38 why can't arguments be passed in r8-r15 now :u 21:51:46 what? 21:51:59 I don't remember x86_64 calling convention on the top of my head... 21:52:29 I do know some asm, but I'm far from an expert. I prefer high level stuff. Like Scheme. 21:52:40 scheme is pretty low-level 21:52:47 car? cdr? wtf is this bullshit. 21:52:47 lament, compared to? 21:53:06 AnMaster: compared to modern high-level languages like C#. 21:53:29 lament, car? well the modern world are based on those :P 21:53:41 * AnMaster ducks 21:54:15 anyway I know enough asm and quite a bit of C. And modern glibc uses very optimised routines for stuff like memcpy, strlen, strcpy and so on 21:55:04 also, backwards syntax is annoying 21:55:09 mov source, dest 21:55:10 fuck that 21:55:12 :u 21:55:28 (in the sense that 'mov source, dest' is backwards.) 21:55:47 comex, I prefer AT&T syntax 21:56:09 mostly I deal with asm as it shows up from objdump 21:56:13 or gcc 21:56:17 I don't code much in asm 21:56:20 why would I 21:56:29 compilers tend to do a great job a lot of the time 21:56:33 what can I use to assemble x64 anyway 21:56:45 comex, well, there is gas 21:56:47 oh, I guess nasm supports it now 21:56:48 the GNU asm 21:56:54 comex, there is yasm 21:56:57 and finally nasm 21:57:02 but gas is best certainly 21:57:03 ...for a year and a half 21:57:07 I mean it is a nice syntax 21:57:15 compared to the horrible intel syntax 21:57:24 comex, ^ 21:58:18 i prefer the intel syntax 21:58:45 it's closer to the arm syntax.. which was the first assembly language i really used 21:59:28 but for x86 the at&t syntax is easier to handle by automated tools 21:59:35 because it's more verbose 21:59:48 but for coding in it it's too verbose imho 22:01:04 comex, I checked other stuff on http://www.int80h.org... the site is utter bullshit in many places. 22:01:10 I would recommend not using it 22:01:54 it seems to suggest a syscall convention where you push arguments rather than fill them in the registers is "faster". 22:01:58 which is utter bullshit 22:02:32 no justification for it? 22:03:38 oklopol, well it suggests it on freebsd, so I guess it talks about linux emulation layer. But really, use some macro or wrapper to use whatever the system prefers 22:03:52 for example linux doesn't use interrupt for system calls nowdays 22:03:53 at all 22:03:58 nor does freebsd afaik 22:04:20 on recent x86 they both use SYSCALL/SYSRET or SYSENTER/SYSEXIT 22:04:29 one of those pairs is for intel, the other for amd 22:04:33 forgot which was which 22:08:32 in any case at least the linux kernel injects this with a fake dynamic library on x86 22:08:48 it decides at boot if it should use the intel one or the amd one 22:09:06 libc then calls this for system calls 22:09:08 very fast 22:13:17 -!- jix has quit ("..."). 22:29:16 The AMD64 ABI calling convetion does use some of the extra registers for argument-passing; namely it does rdi, rsi, rdx, rcx, r8 and r9 for integer and pointer arguments. More than six function parameters is probably rather rare anyway. 22:31:16 fizzie, it seems useful if the other ones were kept for local scratch I guess 22:31:29 and more than 6 does happen, but the norm is fewer 22:31:43 fizzie, also iirc it passes some other stuff in registers too 22:31:50 according to an elaborate schem 22:31:52 scheme* 22:42:03 -!- atrapado has quit ("Abandonando"). 23:14:52 21:34 AnMaster: comex, that doing stuff like in http://www.int80h.org/strlen/ is counter productive 23:14:57 get it in your head 23:15:00 THIS IS #ESOTERIC 23:31:45 -!- olsner has quit ("Leaving"). 23:39:04 Had to powercycle my machine there; it decided putting the fans on full was an excellent idea. 23:39:10 It does that once in a while, I wonder why? 23:39:46 23:33:08 http://filebin.ca/qyxpp/ofortuna.mp3 23:39:49 i like it 23:48:27 My dad is asking me to model a ball of gas in a vacuum held together by gravity at equilibrium. 23:48:48 Tell him to fuck off. Or, you know, do it. 23:50:30 But eh. 23:53:23 Why does he want you to 23:55:11 ehird: yay, constructive feedback <3 23:55:35 23:55 JuanDaugherty: brainfuck is offensive ... as a waste of time and resources 23:55:38 --#haskell 23:57:26 he's on #squeak, #lisp, and #haskell, and he's talking about waste of time and resources? 23:57:32 pot. kettle. 23:57:53 23:57 JuanDaugherty: I didn't say I had a right not to be offended, just that I find it offensive as a concept and a reality 23:58:10 23:58 JuanDaugherty: it's to computing like bleeding is to medicine 23:58:23 so ridiculous so funny :DD