00:00:44 lexande: mapole ↓ 00:00:47 `? mapole 00:00:48 A mapole is a thwackamacallit built from maple according to Canadian standards. 00:13:09 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds). 00:26:51 -!- Phantom_Hoover has joined. 00:39:34 -!- vravn has quit (Ping timeout: 240 seconds). 00:40:19 -!- tromp has joined. 00:42:20 -!- vravn has joined. 00:43:37 `? ingesorgeco 00:43:38 ingesorgeco? ¯\(°​_o)/¯ 00:43:54 `coins --french 12 00:43:55 ​commantecoin vertielcoin limeubwecoin gaêtancrcoin surguercoin faciencoin reuccoin substrumcoin autopécoin deyroncoin physiavacoin djerontcoin 00:44:25 -!- boily has quit (Quit: CHICKENCOIN). 00:45:08 `coins --canadian-english-insane 10 00:45:09 ​refrankedcoin mastaicoin finlidcoin brutcoin capcoin bionarcheterimcoin leurinacoin mimmarkcoin sabillecoin phicablecoin 00:45:25 i am all about bionarcheterimcoin 00:55:05 -!- Phantom_Hoover has quit (Ping timeout: 252 seconds). 01:14:02 `coins 01:14:03 ​chacoin judicacoin lazycoin teqcoin tmlibergcoin mircoin tetneycoin camecoin filecoin frainfcoin etaplecoin wikmanlarcoin foblefoodcoin dvenghacoin hyanickethaxcoin blaccoin watchacoin v--coin monofcoin headcoin 01:27:56 Why do people still use quicksort when radix sort exists? 01:28:33 Because quicksort has "quick" in the name. 01:28:50 I fail to see how radix sort is relevant though: quicksort is honestly a blatant misnomer. 01:29:06 It's literally got O(n^2) worst case performance. 01:32:39 -!- sebbu has quit (Ping timeout: 250 seconds). 01:32:54 -!- vravn has quit (Ping timeout: 240 seconds). 01:33:17 pikhq: It's faster than merge sort on average though 01:33:29 And merge sort is O(n log n) 01:33:41 Radix sort is just O(nk) though 01:33:57 I mean, merge sort is guaranteed O(n log n) 01:34:39 Radix sort blows quicksort out of the water 01:35:20 -!- vravn has joined. 01:42:24 Only if k <= log(n). 01:43:13 If you have a sparse distribution of numbers over some large range it's going to be very inefficient. 01:43:40 That's true 01:43:56 But would quicksort for such a distribution be better than merge sort or even insertion sort? 01:46:12 Dunno. 01:46:26 Radix sort is O(nk) but not constant in memory usage. 01:46:34 Shell sort is bitchin'. 01:47:14 There is in-place radix sort, although it's not quite the same 01:48:13 I think the main thing with quicksort *in particular* is, in general what you want from a sorting algorithm is not absolute fastest time, but rather consistently not-slow time. 01:48:22 Especially when dealing with, say, a library function. 01:48:32 That you Want to be robust against potentially malicious input. 01:49:41 "Usually fast, but sometimes ungodly slow" is not a good thing. 01:53:03 pikhq: If you have n 128-bit numbers, it's going to take radix sort the same amount of time to sort them no matter what they are 01:53:39 Yes. Radix sort is a good algorithm, and should probably be used when applicable. 01:53:55 My complaints were with quicksort, not radix sort. 01:54:41 Shell sort seems to have the same asymptotic complexities as quicksort, so simplicity and constant factors would be the thing to consider 01:55:10 Shell sort has worst-case O(n log n). 01:55:19 Erm, wait. 01:55:21 Smooth. 01:55:23 That's what I meant. 01:55:31 Jeeze, I must be sleepy today. 01:55:41 Shell sort is not at all what I meant to recommend. :) 01:56:09 Your being confused at me is very understandable. 01:59:05 Shell sort isn't stable, but in-place quicksort isn't either 01:59:19 What sort did you mean then? 02:04:13 Smoothsort. 02:04:36 Or... well. At least something that isn't worst-case suboptimal. 02:04:58 Which is definitely not shell. :) 02:13:53 Ah, heapsort variation 02:14:06 That takes advantage of runs 02:14:44 Yep. 02:52:30 FreeFull: you can't always use radix at all 02:52:47 you might only have pairwise comparison 02:53:32 -!- ^v has quit (Quit: http://i.imgur.com/Akc6r.gif). 02:53:55 -!- ^v has joined. 03:16:04 -!- contrapumpkin has changed nick to copumpkin. 03:16:15 [wiki] [[Suicide]] http://esolangs.org/w/index.php?diff=39462&oldid=17129 * 76.100.81.188 * (+70) Tagged 03:19:07 does anyone know who, if anyone, owns the rights to 65xx processors? like, MOS is gone, can anyone make them now? 03:23:04 [wiki] [[Gerbil]] http://esolangs.org/w/index.php?diff=39463&oldid=23533 * 76.100.81.188 * (+51) Tagging 03:29:22 -!- sebbu has joined. 03:29:55 -!- sebbu has quit (Changing host). 03:29:55 -!- sebbu has joined. 03:31:35 i should lie and tell people that the Finnish language has case for punctuation and that { is actually considered a lower case version of [ 03:31:56 or someone can try now to convince me that this is actually true, that might be a fun game 03:38:59 wait i thought it was { is the upper case version of [ 03:40:31 hmm no i guess not 03:57:40 `run echo '[{' | iconv -f iso646-fi 03:57:40 ​Ää 04:07:41 -!- Sprocklem has joined. 04:08:18 http://arxiv.org/abs/cond-mat/0303625/ neat paper people might like. does CAs! 04:09:53 `run echo ']}\|' | iconv -f iso646-fi 04:09:54 ​ÅåÖö 04:16:56 -!- tromp has quit (Remote host closed the connection). 04:17:28 -!- tromp has joined. 04:21:34 -!- tromp has quit (Ping timeout: 240 seconds). 04:45:50 -!- Sorella has quit (Quit: It is tiem!). 05:06:58 Bike: you are wrapping a mobius strip of videotape around and around the math/porn part of my mind 05:07:22 i... don't know what that means? or where i got video tape nowadays 05:08:17 it means mind = blown 05:09:11 i saw a VHS rewinder next to a trash can the other day 05:26:09 -!- Sgeo has quit (Read error: Connection reset by peer). 05:26:25 -!- Sgeo has joined. 05:33:23 Why do people still sort when you can just put it in a replicated nosql cloud 05:33:38 sort what? 05:33:47 stolen Flickr passwords 05:34:37 oh 05:35:33 -!- password2 has joined. 05:36:26 And this one? 05:36:55 hunter2 obv 05:37:11 I assume that's what you use as a password for everything 05:43:19 -!- FreeFull has quit. 05:52:21 -!- oerjan has joined. 05:58:02 -!- ^v has quit (Quit: http://i.imgur.com/Akc6r.gif). 06:05:54 `learn Ingesorgeco is when a German is worrying that their money might get cut short. 06:05:55 I knew that. 06:15:58 -!- MoALTz_ has quit (Quit: bbl). 06:27:44 -!- ter2 has quit (Ping timeout: 255 seconds). 06:31:23 -!- drdanmaku has quit (Quit: Connection closed for inactivity). 06:34:18 Bike: http://www.westerndesigncenter.com/wdc/ perhaps ... but there may be more companies holding licenses to make 65xx chips 06:34:41 it's just that the licensor doesn't exist any more far as i can tell 06:34:56 legalities are hard 06:35:28 yeah, I'm not sure who/what they'd have a license from, presumably commodore (who bought MOS) exists in a shell somewhere 06:36:22 patent trolls from beyond :o 06:36:42 or, no, they split from commodore, and apparently it was later "liquidated", http://en.wikipedia.org/wiki/MOS_Technology#GMT_Microelectronics 07:23:58 -!- Tritonio has joined. 07:29:53 -!- slereah_ has joined. 07:42:28 -!- edwardk has joined. 08:08:13 -!- edwardk has quit (Quit: Computer has gone to sleep.). 08:16:27 -!- impomatic has quit (Ping timeout: 276 seconds). 08:24:31 -!- Patashu has joined. 08:33:58 -!- conehead has quit (Ping timeout: 240 seconds). 09:31:28 -!- Froox has quit (Read error: No route to host). 09:31:37 -!- Frooxius has joined. 09:32:05 -!- KingOfKarlsruhe has joined. 09:43:18 Is there a C type specific to probabilities? 09:43:31 Floating points are pretty bad at it 09:43:41 Not uniform and bad range 09:44:18 long long int hth 09:44:30 wait 09:44:34 make that unsigned 09:44:47 very uniform. 09:45:43 -!- lexande_ has joined. 09:50:41 -!- lexande has quit (*.net *.split). 09:50:46 -!- FireFly has quit (*.net *.split). 09:51:59 -!- TodPunk has quit (Ping timeout: 252 seconds). 09:58:00 -!- yorick has joined. 09:59:25 -!- FireFly has joined. 10:12:01 Is a long long int 128 bits anywhere? 10:18:14 * oerjan thinks they must have finally fixed the annoying tab bug in IE 11 10:31:59 and also, the address bar suddenly seems not to give the entirely wrong completion suggestions any more... 10:32:44 __int128 is 128 bits everywhere 11:06:21 Melvar: no 11:06:47 -!- oerjan has quit (Quit: What about long long long long long long ints?). 11:07:53 How long must we long for long long long! 11:09:17 mroman_: Would it comply with the standard? 11:09:27 long long is guaranteed to be 64bits 11:09:42 but that's it 11:10:19 mroman_: You mean, exactly 64 bits, not ≥64? 11:10:43 I mean "at least" 11:11:07 Okay, that’s what I would have expected. Thanks. 11:11:12 There is no required integer type required to have an exact bit size 11:11:31 The C standard only defines the manimum range of a long long 11:11:59 *minimum 11:12:31 This is so that WG14 sponsors can make a 32-bit sandwich toaster and advertise support for ISO standard C 11:12:32 You should use int128_t if you wan't exactly 128bits 11:12:41 but I'm not sure how much support compilers have for intN_t 11:13:00 I don't get it why compilers use non-standard stuff like __int128 11:13:06 when they could just use int128_t 11:13:43 mroman_: I was just wondering; I don’t need a 128-bit type for anything. 11:14:00 You better use inttypes . 11:14:20 I don't see a reason to use long long 11:14:27 I don't see a reason to use int for that matter 11:14:36 it's broken 11:15:00 for(int i = 0; i < 10000; i++) { /* hurray, I'm crappy unportable code */ } 11:15:09 *100000 11:15:56 Melvar: My opinion on those regular C types is "They suck" 11:16:00 It's a feature to prevent idiots with obsolete computers from enjoying the software 11:16:09 Exactly! 11:16:22 There's no guarantee an int can hold 100k 11:16:39 on my obsolete computer . 11:17:06 I did once program a microcontroller with a 16-bit int, I think. 11:17:16 Well, the real problem is that int is no longer mapped to machine words by any amd64 compiler (and on most of them, not even long) 11:17:24 int is at least 2^16 11:17:35 So you have people writing int left and right and the compiler has to sign-extend them all 11:17:38 but nobody said it can hold 32bit values 11:17:47 It's p. efficient 11:18:36 well 11:18:44 There's int_fast32_t! 11:19:29 Pretty sure that's still mapped to int to appease the peasants 11:19:37 which, if you use on a 64bit machine probably gives you an int64_t? 11:19:59 which means that you better not rely on 32bit wrap-arounds . 11:20:07 No, I don't know any compiler that maps int to int64_t 11:20:20 I think posix requires int to have at least 32 bits, though 11:20:36 I don't know any compiler that maps int to int64_t 11:20:42 but a compiler is allowed to do so 11:20:58 In practice, it's not going to happen 11:21:16 why not? 11:21:33 It will break milljeeons of programs 11:21:35 I could imagine that int64_t is faster 11:21:48 Jafet: I don't care about breaking millions of crappy written programs . 11:21:50 ;) 11:22:04 If you rely on int to be 32bit you don't know C 11:22:07 Good thing you're not writing compilers, then 11:22:11 Or programs 11:23:14 If one relies on 32-bit wraparounds, it needs int32_t and -fwrapv at least, I believe. 11:23:53 Yeah 11:23:59 wrap-arounds are evil anyway 11:24:12 but what kind of evil stuff were people doing so that the code breaks if int is suddenly 64bit wide? 11:24:36 (relying on wrap-arounds would be one thing) 11:24:55 Not evil, just stupid 11:24:59 ( the Int maxBound 11:24:59 Can't resolve type class MaxBound Int 11:25:33 Oh, right, it won’t actually be known … 11:25:54 `echo $'#include \n#include \nmain(){ printf("%zu %zu %zu", sizeof(int_least32_t), sizeof(int32_t), sizeof(int_fast32_t)); }\n' > /tmp/a.c && gcc /tmp/a.c -o /tmp/a.out && /tmp/a.out 11:25:54 ​$'#include \n#include \nmain(){ printf("%zu %zu %zu", sizeof(int_least32_t), sizeof(int32_t), sizeof(int_fast32_t)); }\n' > /tmp/a.c && gcc /tmp/a.c -o /tmp/a.out && /tmp/a.out 11:26:06 `run echo $'#include \n#include \nmain(){ printf("%zu %zu %zu", sizeof(int_least32_t), sizeof(int32_t), sizeof(int_fast32_t)); }\n' > /tmp/a.c && gcc /tmp/a.c -o /tmp/a.out && /tmp/a.out 11:26:07 4 4 8 11:26:23 Wow, gcc fucks the peasants 11:27:43 hm? 11:27:51 looks like int_fast32_t is 64bit 11:28:45 although I'm currently reading something about "you can fit more 32bit ints into the cache so it's faster" 11:28:57 You certainly can fit more 32bit ints into a cache line 11:29:25 so... 11:30:40 If you do 32bit computations on 16 integers 11:30:45 they fit neatly into a cache line 11:30:52 wherease 16 64bit integers wouldn't! 11:31:27 well... 11:31:33 Somebody should test that 11:33:54 My gcc is probably 32bit though 11:33:55 hm 11:34:22 Not on itanium 11:36:40 ah 11:36:45 `run echo $'#!/bin/sh\necho "$@" > /tmp/a.c && gcc /tmp/a.c -o /tmp/a.out && /tmp/a.out' > bin/cc && chmod +x bin/cc 11:36:46 they blocked me on the 64bit machine 11:36:46 No output. 11:37:02 probably due to something important running on it :D 11:37:18 `cc #include \nmain(){ return 1/0; } 11:37:18 ​/tmp/a.c: In function ‘main’: \ /tmp/a.c:2:17: warning: division by zero [-Wdiv-by-zero] \ Floating point exception 11:38:30 `cc #include \nmain(){ puts("\n\n\n"); } 11:38:30 ​/tmp/a.c: In function ‘main’: \ /tmp/a.c:2:14: warning: missing terminating " character [enabled by default] \ /tmp/a.c:2:1: error: missing terminating " character \ /tmp/a.c:5:1: warning: missing terminating " character [enabled by default] \ /tmp/a.c:5:1: error: missing terminating " character \ /tmp/a.c:5:1: error: expected expression at 11:38:41 `cc #include \nmain(){ puts("\\n\\n\\n"); } 11:38:42 No output. 11:39:00 `cc #include \nmain(){ puts("\\n\\n\\n☃"); } 11:39:01 ​ \ \ \ ☃ 11:45:19 -!- Froox has joined. 11:47:18 -!- Sgeo has quit (Read error: Connection reset by peer). 11:49:38 -!- b_jonas_ has joined. 11:49:42 -!- Frooxius has quit (Read error: Connection reset by peer). 11:49:42 -!- b_jonas has quit (Ping timeout: 258 seconds). 11:52:17 -!- b_jonas_ has changed nick to b_jonas. 11:55:03 -!- ter2 has joined. 12:25:31 very snowman 12:29:52 -!- S1 has joined. 12:31:02 [wiki] [[Zero]] N http://esolangs.org/w/index.php?oldid=39464 * Tailcalled * (+1493) Created page with "Zero is a language invented by Tailcalled. It was specifically designed to be literally impossible to program in and execute in the general case. Zero has eight instructions,..." 12:34:35 -!- edwardk has joined. 12:36:54 Literally 12:40:37 literally what? 12:51:45 -!- Sorella has joined. 12:57:31 -!- S1 has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client). 13:17:38 -!- password2 has quit (Ping timeout: 240 seconds). 13:23:14 [wiki] [[Zero]] M http://esolangs.org/w/index.php?diff=39465&oldid=39464 * FireFly * (+172) +categories 13:32:58 -!- nucular has joined. 13:32:58 -!- nucular has quit (Changing host). 13:32:58 -!- nucular has joined. 13:34:37 -!- edwardk has quit (Quit: Computer has gone to sleep.). 13:38:56 -!- aloril has quit (Ping timeout: 252 seconds). 13:43:22 -!- MindlessDrone has joined. 13:48:40 -!- Patashu has quit (Ping timeout: 265 seconds). 13:52:25 -!- ter2 has quit (Ping timeout: 252 seconds). 13:52:46 -!- aloril has joined. 13:53:37 -!- Sprocklem has quit (Ping timeout: 252 seconds). 13:58:03 -!- KingOfKarlsruhe has left. 13:59:13 -!- ter2 has joined. 14:06:48 -!- ter2 has quit (Ping timeout: 276 seconds). 14:07:02 -!- `^_^v has joined. 14:10:12 -!- ter2 has joined. 14:22:41 -!- Sprocklem has joined. 14:26:18 -!- ais523 has joined. 14:31:45 -!- callforjudgement has joined. 14:31:52 -!- ais523 has quit. 14:32:42 -!- callforjudgement has changed nick to ais523. 14:33:14 -!- vravn has quit (Ping timeout: 240 seconds). 14:34:45 -!- ais523_ has joined. 14:36:54 -!- vravn has joined. 14:40:38 Firefox just upgraded; I had to open the About menu to make sure I hadn't opened Chrome by mistake 14:58:54 -!- `^_^v has quit (Ping timeout: 240 seconds). 15:04:16 -!- `^_^v has joined. 15:11:39 -!- Tritonio has quit (Ping timeout: 250 seconds). 15:29:42 -!- conehead has joined. 15:31:09 -!- atriq has joined. 15:31:31 -!- AnotherTest has joined. 15:34:57 -!- AnotherTest_ has joined. 15:36:30 -!- AnotherTest has quit (Ping timeout: 276 seconds). 15:36:31 -!- AnotherTest_ has changed nick to AnotherTest. 15:49:08 -!- FreeFull has joined. 15:50:50 -!- Tritonio has joined. 15:53:10 -!- TodPunk has joined. 15:54:27 -!- TodPunk has quit (Client Quit). 15:54:41 -!- TodPunk has joined. 15:57:18 -!- ter2 has quit (Ping timeout: 276 seconds). 16:04:53 -!- slereah_ has quit (Quit: Leaving). 16:11:27 -!- password2 has joined. 16:11:36 -!- Sprocklem has quit (Ping timeout: 276 seconds). 16:18:45 -!- lexande_ has changed nick to lexande. 16:19:08 -!- Sprocklem has joined. 16:19:56 -!- tertu has joined. 16:22:26 -!- sebbu2 has joined. 16:22:55 -!- tertu has quit (Client Quit). 16:23:00 -!- sebbu2 has quit (Changing host). 16:23:00 -!- sebbu2 has joined. 16:23:49 -!- sebbu has quit (Ping timeout: 245 seconds). 16:25:12 kmc: http://pipeline.corante.com/archives/2014/04/21/molecular_printing_of_drug_molecules_say_what.php :catdrugs: 16:26:59 -!- ^v has joined. 16:27:37 -!- impomatic has quit (Read error: Connection reset by peer). 16:32:14 -!- drdanmaku has joined. 16:32:34 Peer review. Not even once. 16:34:10 -!- john_metcalf has quit (Read error: Connection reset by peer). 16:52:15 -!- ais523 has quit (Read error: Connection reset by peer). 16:52:25 -!- ais523 has joined. 16:52:43 -!- idris-bot has quit (Quit: Terminated). 17:01:35 -!- MoALTz has joined. 17:02:02 -!- atriq has quit (Quit: Page closed). 17:17:19 -!- Tritonio has quit (Ping timeout: 250 seconds). 17:20:37 -!- Tritonio has joined. 17:31:14 -!- Sprocklem has quit (Quit: Sacrificing a goat to the sun god.). 17:33:21 -!- Tritonio has quit (Ping timeout: 250 seconds). 17:35:27 i feel dirty using nested wheres in haskell 17:35:58 -!- Tritonio has joined. 17:36:41 Those dirty where nests 17:37:06 i wrote some rust code with early return inside a match inside a macro inside a guard 17:41:10 match () { _ if match self.lookahead_and_consume(6, |s| s.eq_ignore_ascii_case("public")) { None => return true, Some(r) => r } => go!(to AfterDoctypeKeyword Public), ... } 17:43:43 what does go! do? 17:44:07 also, I approve of that case-insensitive equality operation 17:44:56 why is ascii mentioned there? 17:45:04 does it respect other types of cases? 17:45:22 no, it doesn't do Unicode case folding, which is very complicated and also not what's in the relevant spec 17:45:59 ais523: it's another macro I defined, a DSL for writing HTML tokenizer actions in a concise way https://github.com/kmcallister/html5/blob/master/src/tokenizer/mod.rs#L475-L543 17:46:00 -!- Sprocklem has joined. 17:46:08 there are a bunch of ways to do case folding 17:46:12 ASCII case folding is at least well-defined 17:46:23 well-defined, simple, fast, not locale-dependent 17:48:17 the HTML parsing spec mostly doesn't interpret non-ASCII characters 17:48:31 because it's not like past software has handled them consistently 17:51:36 this is also handy because a parser operating on UTF-8 can do most operations on bytes without decoding them to codepoints 17:51:51 -!- john_metcalf has joined. 17:53:57 which in turn makes it easier to use SIMD instructions 17:54:37 SIMD parsing :-) 17:54:54 wouldn't UTF-32 be faster for that, if you had to handle Unicode codepoints, but didn't care about grapheme clusters? 17:55:17 although that would probably suffer from caching issues 17:55:38 yeah, increasing memory traffic 4x will probably kill other gains 17:55:47 and most content comes off the wire as UTF-8 so you would need to convert it first 17:56:05 (and basically no content comes as UTF-32; I'm not sure it's even allowed) 17:56:21 I want a UTF-graphemecluster 17:56:30 even if it's hundreds of bytes per cluster 17:56:37 -!- john_metcalf has quit (Ping timeout: 252 seconds). 17:56:40 actually, that's how ncursesw works internally 17:57:22 i'm not sure that grapheme clusters are relevant to any part of the web stack 17:58:39 high quality text shaping for proportional fonts can map any number of codepoints to any number of (translated, scaled, etc.) glyphs 17:59:28 but the input to the shaping library might be a sequence of grapheme clusters? i've forgotten 18:02:06 in servo I mean 18:05:06 oh, right, I forgot that Rust is made by a browser company 18:05:08 I was just thinking in general 18:05:16 heh 18:06:56 I am writing a HTML parser for Servo but I want it to be a generally useful library, which is tricky because browsers have some unusual requirements 18:10:16 -!- edwardk has joined. 18:10:32 I think there are a lot of open questions about API design in Rust generally 18:10:44 Is Servo Rust's only killer program so far? 18:11:02 because of the need to accommodate library users with different memory management strategies, in a safe API 18:11:19 It seems to be quite influential to Rust's design 18:12:01 I think I care more about getting higher-kinded polymorphism after considering its use with lifetime variables 18:12:47 FreeFull: well, what do you mean by killer program? 18:12:59 FreeFull: it may be the motivating application 18:13:10 Servo is probably the second largest program written in Rust, but it's not usable for anything real yet 18:13:10 like, aimake is mostly used on NetHack, because that's what I needed it for 18:13:27 (it's like 100k SLoC) 18:13:35 rustc is like 300k 18:13:42 ooh, self-hosting already? 18:13:43 including the bundled libs etc 18:13:48 ais523: yes, for some years now 18:14:01 for Rust, I think that makes sense 18:14:01 ais523: the runtime system is also self hosting, which is a lot more unusual 18:14:05 there's some debate about whether languages should self-host 18:14:14 but something with Rust's aims should probably be able to 18:14:21 i mean, not every language is a good choice for writing a compiler 18:14:25 exactly 18:14:28 so there isn't a general answer to the question of "should you self-host" 18:14:34 here, we identify the languages that aren't 18:14:35 but yeah, I think for Rust it's a defensible decision at least 18:14:41 then write self-compilers in them anyway 18:15:13 the compiler still makes heavy use internally of the deprecated refcounted @-boxes 18:15:16 :/ 18:15:21 which have been removed in favor of a Rc library type 18:15:34 self-hosting is a big pain when your language is still evolving so rapidly 18:15:54 is it possible to change from one to the other in an automated way? 18:15:59 like, the syntax for ~-boxes is also changing 18:16:04 that's been the big Rust news recently 18:16:12 they've done some automated refactorings I know 18:16:15 everyone seems to expect a huge outcry, yet it never emerges 18:16:20 pcwalton wrote a big perl script 18:16:25 ais523: i whined about it in #rust yesterday 18:16:46 oh, I was expecting something parsetree-based, but I guess it's hard to preserve comments when doing that 18:16:47 15:36 <@kmc> for f**ks sake 18:16:47 15:36 <@kmc> at this rate in another year Rust will be the SK calculus 18:17:10 is there a SK-calculus self-compiler? 18:17:25 Rust has a syntactic concept of a "token tree", which is useful for macros and automated refactoring 18:17:37 I don't know if other languages have this 18:17:54 lisp macros? 18:17:56 nortti: there are Unlambda self-compilers 18:18:05 which is about as close as you'll get 18:18:10 err, self-interps 18:18:13 it's a tree of balanced parentheses (and brackets etc.) where the leaves are tokens 18:18:19 those are basically SK + C + I/O 18:18:23 nortti: yeah, I guess it is similar to manipulating code as S-expressions 18:18:28 probably closer to an AST than s-expressions are? 18:19:00 but Rust has a lot more expression grammar than Lisp; it's just that you can manipulate code before the stage at which that grammar is implemented 18:19:22 but I'm fond of pointing out that Lisp also secretly has a lot of expression grammar 18:20:18 FreeFull: Servo has been influential to Rust's design, certainly, but I think somewhat less than one might expect 18:20:23 and not-secretly. the BNF for loop is a couple pages long 18:20:29 heh 18:20:51 loop really is a beast 18:21:15 -!- sebbu2 has changed nick to sebbu. 18:21:21 and shivers's loop is the same way, so there go any "uh but loop isn't REALLY lisp" crapola 18:21:38 there are only a few people who do lots of work on both Rust and Servo 18:21:55 r u one 18:22:12 no 18:24:36 i've only landed a few patches to rust 18:24:43 opened a lot of bugs though :P 18:25:29 -!- Sprocklem has quit (Ping timeout: 264 seconds). 18:25:39 i basically consider compiler bugs part of the fun 18:25:44 i've only hit a few really nasty ones, though 18:28:04 I've only hit one so far 18:34:30 -!- cel_reloaded has joined. 18:35:39 -!- oerjan has joined. 18:45:06 -!- cel_reloaded has quit (Quit: cel_reloaded). 18:45:25 -!- cel_reloaded has joined. 18:49:32 http://www.pcworld.com/article/2150775/amd-announces-skybridge-chips-to-bring-together-x86-and-arm.html 18:53:29 hmm, how would that work? 18:54:34 oh, it's not x86+arm in one cpu chip, but different pin-compatible x86 and arm cpus, I guess 18:55:22 lame 18:55:30 I thought it's a hardware translator between those two 18:55:43 like a ARM chip that also supports x86 18:55:53 oh 18:56:03 you can get almost that with qemu, I think 18:56:07 that'd be the same as you said :) 18:56:07 you could almost do that in microcode 18:56:14 we need a customizable-microcode chip, really 18:56:22 my paper at http://homepages.cwi.nl/~tromp/cl/cl.html has an SK self-interpreter 18:56:35 but it's bigger than the lambda calculus self-interpreter 18:56:37 So they've finally given up on drag racing intel 18:57:46 which is under 26 bytes 18:58:24 binary lambda calculus? 19:00:06 yep 19:01:18 -!- MindlessDrone has quit (Quit: MindlessDrone). 19:02:56 -!- cel_reloaded has quit (Quit: cel_reloaded). 19:06:15 -!- john_metcalf has joined. 19:11:48 -!- zzo38 has joined. 19:14:13 -!- FreeFull_ has joined. 19:16:22 -!- FreeFull has quit (Ping timeout: 265 seconds). 19:28:36 FireFly: um how can Zero be both unusable for programming and turing-complete 19:29:33 I thought "unusable for programming" was supposed to be in terms of practicality 19:29:49 in _our_ community? 19:29:59 ...fair point 19:30:08 I'm not sure why I had that idea 19:31:27 although looking at the actual language, i think it's more likely that it's not tc.. 19:32:00 by the unusual way of not having any computable reduction from a turing machine to it. 19:32:26 um or the other way, for that matter. 19:33:52 hm actually it _might_ be possible to reduce some universal bf program with input to it. 19:34:35 because the halting sequence will only start being undecidable from some point on, and that point may very well be pretty large 19:36:27 this is like saying "is BF with a source code limit of 200 bytes TC?" 19:36:34 yep 19:36:47 it would be very hard to prove that the answer is no, but if the answer is yes, a proof would likely be trivial 19:39:30 ais523_: also you run into L problems 19:40:09 err, right 19:40:12 curly-L-coplete 19:40:14 *complete 19:40:42 shachaf: thanks for that Haskell help you gave me a few days ago; how should I credit you in my PhD thesis? 19:40:50 atm I credited your nick, but it looks a little unprofessional 19:41:02 Shachaf the Terrible, Lord of all Mankind hth 19:41:55 Sha Chaf is not shachaf's real name?! 19:42:06 afaik it is 19:42:16 well without the space 19:42:33 also he used to have his surname in the /whois but i see it's gone 19:45:23 I went to an IBM recruiting event today, and they made a snide joke at Google's expense. 19:45:31 hm it might actually possible to program in zero entirely, if undecidable points in the halting sequence are sparse enough. 19:46:19 oerjan: can you at least force such points to never be an unmatched bracket? 19:46:28 if not, the first one is going to mess up your bracket matching 19:46:41 also, I have a feeling that Zero may be uncomputable 19:46:59 yeah that's the main problem, you need to have no 3 in a row. 19:47:43 actually 2 in a row is also a problem if they're the first two in a triple 19:48:31 "fun" exercise: write a program in Zero that halts if and only if it doesn't halt 19:48:37 -!- newsham has joined. 19:48:56 ais523: not sure that's possible to achieve 19:49:02 neither am I 19:49:07 but if it is, it'd say something about the language 19:49:37 after all the programs tested for the halting sequence are logarithmically shorter than the program you are constructing. 19:50:06 you could insert a bunch of NOPs, but even then it'd cause problems 19:50:16 because you couldn't reliably make them NOPs 19:50:27 like, it'd work if you had "immutable NOPs", Malbolge-style 19:50:37 (also programming in Zero would be very easy if you did) 19:50:41 also i think the specification of Zero has some weak points. like the fact that ordinary lexicographic order isn't isomorphic to the natural numbers. 19:51:00 and also, what happens to malformed programs tested in the halting sequence 19:51:02 isomorphic is so 90s 19:51:12 now we say isographic 19:51:24 * oerjan categorically swats fowl -----### 19:51:28 read in the same tone you would read "reaganomics" 19:52:08 also i'm pretty sure Zero is uncomputable if you make no attempt to avoid the undecidable points in the halting sequence. 19:53:02 and come to think about it, avoiding 3 undecidables in a row also seems impossible, even if you can assume malformed programs have an easy value. 19:53:27 I imagine the undecidables take quite a while to show up 19:53:28 -!- Sprocklem has joined. 19:53:36 yeah 19:53:39 ais523: Hmm, I guess "Shachaf Ben-Kiki" would work. 19:53:45 ais523: Which Haskell help was this? 19:53:56 but i'm thinking of translating general bf programs to it 19:53:57 the rank-2 polymorphism declaration 19:54:28 I'm trying to give an example of "this program can type with this type in at least one widely used language, but the inference algorithm can't figure it out itself" 19:55:06 Oh, that. OK. 19:56:44 perhaps I'll remove the argument altogether because it turned into a bit of a mess 19:57:13 [wiki] [[Zero]] http://esolangs.org/w/index.php?diff=39466&oldid=39465 * Oerjan * (+18) I'm going to assume you meant this, as the original doesn't give a sequence order 19:57:42 shachaf: huh, I thought that name was familiar; I looked at the monitor on my desk, and it has the YAML spec open 19:57:47 and one of the authors is Oren Ben-Kiki 19:57:59 (and another has a surname of "döt Net") 19:59:36 thanks for the help, anyway 19:59:43 ais523: i am thinking that if you could only avoid undecidable brackets in zero (which alas i don't think you can), then all other problems could probably be solved with the ][...] comment trick. 19:59:56 oerjan: yes, that would probably work 20:00:16 then you could just pad out with 3^n +-+-+-+- 20:00:26 and create a paradoxical program 20:00:39 that's some level above uncomputable, I think 20:00:56 not just "cannot be implemented without an oracle", but "an implementation directly causes a paradox" 20:01:13 um i wasn't thinking of paradoxes here 20:01:23 just general translation to zero 20:01:39 -!- nooodl has joined. 20:01:48 well, if you can translate any BF program to zero in linear time 20:01:51 you can produce a paradox 20:01:52 but you are right about the padding, that means you can find equivalent elements further out in the sequence 20:02:33 ais523: Yes. 20:02:39 an ancestor of mine 20:03:20 now I'm imagining that the YAML spec is hundreds of years old, which is an awesome mental image 20:04:56 hichaf 20:05:46 Is the proper answer "himc", I wonder. 20:05:56 ais523: hm i don't think you can make a paradoxical program in Zero, because the encoding is not self-referential in the right way - the halting sequence tests _unencoded_ programs. 20:06:19 oerjan: it doesn't have to test itself for halting 20:06:23 just a program that is equivalent to itself 20:06:57 well what i'm saying is Zero programs cannot actually do halting tests once they're up and running. 20:07:57 oh hum on rereading the spec it implies the ordering skips unmatched programs. 20:08:42 oerjan: oh, I see; they can test most of themself 20:09:00 but they can't test the unsure instruction that they're testing without first knowing what it'll be 20:09:22 if we think as a program as a function from the haltingness of a particular other program P to a termination status 20:09:33 then P cannot equal the entire /function/, just the application of that function to some argument 20:09:42 and that argument has to be defined as a constant, it can't come from a halting oracle 20:10:07 my real argument is that as written, the halting sequence is mathematically well defined, and so therefore is the semantics of a zero program, and so there cannot be any paradox. 20:10:29 right 20:10:34 I was trying to expose the hole in my argument 20:10:39 rather than the hole in yours 20:10:40 and I think I found it 20:11:52 fizzie: no the proper response is kmcello hth 20:17:43 hm i'm starting to wonder if you may have enough control of consecutive elements in the halting sequence to at least know whether they give the _same_ bit or not. 20:18:28 like, programs that don't end in brackets will come in groups of 6, all of which must do the same thing. 20:18:36 (afa halting is concerned) 20:19:04 and that is enough to avoid encoding brackets with them 20:23:08 so the trouble happens with programs ending with ] 20:24:40 hm and those can do wild things, like P+] P-] P>] P<] are consequtive in the order. 20:26:13 which is almost certainly enough to encode switching between two independent undecidable subprograms. 20:30:25 -!- Sprocklem_ has joined. 20:30:51 -!- Sprocklem has quit (Disconnected by services). 20:31:08 -!- Sprocklem_ has changed nick to Sprocklem. 20:51:36 -!- idris-bot has joined. 20:54:02 higan 20:55:09 -!- AnotherTest has quit (Ping timeout: 240 seconds). 21:00:19 -!- Patashu has joined. 21:04:49 -!- password2 has quit (Ping timeout: 252 seconds). 21:06:58 -!- Patashu_ has joined. 21:06:58 -!- Patashu has quit (Disconnected by services). 21:11:00 -!- nucular has quit (Quit: Excess Food). 21:12:57 -!- Patashu has joined. 21:16:14 -!- Patashu_ has quit (Ping timeout: 265 seconds). 21:20:17 -!- Sprocklem has quit (Quit: Ascending to God form). 21:20:26 shachaf: I like languages with strong safety guarantees, but I seem to spend a lot of my time learning about ways to break the rules :) 21:24:08 -!- Patashu has quit (Ping timeout: 255 seconds). 21:42:14 Have any computers other than PDP-11 got a single instruction which copies itself through the entire memory? The PDP-11 instruction is MOV -(PC),-(PC) 21:44:34 john_metcalf: you should talk to impomatic about that, pity impomatic isn't online 21:44:51 that's a major part of CoreWars strategy, the fact that Redcode has an instruction that does that 21:45:25 `addquote john_metcalf: you should talk to impomatic about that, pity impomatic isn't online 21:45:26 1193) john_metcalf: you should talk to impomatic about that, pity impomatic isn't online 21:45:44 ais523: same person! jm is my real name :-P 21:45:55 elliott: I don't know, it's useful advice, just advice that can't be actd on 21:45:59 if not for the reason I expected 21:46:09 `revert 21:46:10 Done. 21:46:17 elliott: it's funnier with the context 21:46:26 ain't it always. 21:46:27 feel free to readd 21:46:29 oh, is that why you reverted, to add the context? 21:47:07 hmm 21:47:18 most processors don't have PC-relative addressing 21:47:28 because compilers typically know where their output is in the program 21:47:36 Is that true? 21:48:02 X86-64 does, ARM does (IIRC). 21:48:14 ais523: not with dynamic linking 21:48:15 ais523: no, to let others add it if they wish 21:48:28 None of the processors I've used allow anything similar to be created. 21:48:54 for dynamic linking it's desirable to emit position-independent code, and in that case PC-relative addressing is very useful 21:48:57 you might manage it on a processor where the PC is memory-mapped /and/ indirect addressing is supported 21:49:18 PIC has a pretty severe performance penalty on 32-bit x86 because of the need to reserve a register for an offset 21:50:41 dynamic linking is relatively recent compared to the history of programmers, though, isn't it? 21:50:42 Does it count if you need to set registeres to particular values before the one instruction? 21:51:03 fizzie: some sort of movsw instruction? 21:51:11 dynamic linking isn't that recent, but there are different implementation strategies and they don't all require PIC 21:51:21 http://www.iecc.com/linkers/ has lots on this 21:51:22 that's basically *di++ = *si++, if you make di the next line and si the current line 21:51:29 then it should keep going until di overflows 21:52:09 I don't see why it'd stop there. 21:52:36 Assuming all address space is mapped and rwx, anyway. 21:54:01 Though a rep stos with the maximum count sounds approximately the same. 21:54:30 if a REP MOVSB instruction overwrites itself, the repetition stops after the next processor interrupt 21:54:49 which is something emulators tend to implement incorrectly 21:54:50 http://repzret.org/p/rep-prefix-and-detecting-valgrind/ 21:55:01 But that wasn't a rep. 21:55:18 Interesting, though. 21:55:20 kmc: it's not a rep, you're copying the movsb onto the next instruction 21:55:24 yeah this is a tangent 21:55:24 then executing the new copy 21:55:27 imp-style 21:55:27 just a bizarre fact 21:55:41 also, detecting valgrind is easy 21:55:51 because of client requests? 21:55:55 yes 21:55:58 yeah 21:56:05 there really should be a way to disable those, but I didn't find one 21:56:19 kmc: that is cool 21:56:21 I remember fixing JPC-RR to do pipeline flushing on self-modifying code 21:56:30 it used to just run the old version of the code, and it has a very long pipeline 21:56:32 I was wondering if e.g. Native Client code running in Valgrind could use client requests to escape the sandbox 21:56:35 I needed to do that so that NetHack would run correctly 21:56:47 kmc: there's a client request for "run this on the real CPU", so trivially 21:57:23 yeah 21:57:44 now how hard is it to set up a NaCl toolchain so i can write a PoC 21:58:13 NaCl uses valgrind? 21:58:19 no 21:58:27 but you can run a NaCl program in Valgrind, like any other program 21:58:29 oh, I see 21:58:36 and in this case it makes it less secure, not more :) 21:58:46 is it still using the prctl-based sandbox? or has it moved to a different sandbox? 21:59:02 prctl's basically undefeatable because it limits the syscalls you can use and there's no way to undo it 21:59:28 as in, you need to find a kernel bug to get around it no matter how many layers of emulation are used, so long as the emulator runs the prctl call itself 21:59:41 no, NaCl is used for sandboxing within a process, aiui 21:59:50 oh right 21:59:54 I was thinking of a different sandbox entirely 22:00:07 I think NaCl in Chrome will run in a process sandbox too 22:00:10 but that's separate 22:00:11 NaCl's the "run a static analyser on the code to make sure it doesn't try to do anything nasty, then run it unmodified" system 22:00:22 NaCl uses a conservative subset of x86 with well behaved static semantics 22:00:28 MOVSB imp doesn't work because of the prefetch queue. (Works in a debugger though). 22:00:28 plus segmentation 22:00:54 john_metcalf: huh, pipeline behaviour causing problems on real processors? 22:01:01 I always wondered about memory ordering with self-modifying code 22:01:04 what about in 8086 mode? 22:01:24 since there's no way to put a read barrier before the other CPU's fetch 22:01:25 I know that NetHack overwrites the argument of an int instruction, then runs that instruction immediately afterwards 22:01:42 to run arbitrary interrupts 22:02:28 why 22:03:00 Can't be done on a Z80 without looping. (Demo here) https://www.youtube.com/watch?v=LPqDksPdNiE 22:03:06 How about a "movsd; jmp $+2" one? (Modulo instruction length issues. And not a single instruction.) 22:03:57 the manuals do mention self-modifying code with multiple cpus, basically saying "don't do that" 22:03:58 I think there might even be room for a NOP in there 22:04:37 olsner: fuck tha police 22:05:12 -!- TodPunk has quit (Read error: Connection reset by peer). 22:05:25 -!- TodPunk has joined. 22:10:26 -!- oerjan has quit (Quit: leaving). 22:13:10 hmm, actually I remembered that wrong, they instead describe some appropriate synchronization procedures for getting cross-modified code to run properly 22:14:19 -!- Sprocklem has joined. 22:14:24 basically use a memory flag to indicate when your modification is complete, then do cpuid before you jump to any of the modifying code 22:15:22 cpuid's a memory barrier? 22:15:25 cross-processor? 22:15:29 weird instruction to use 22:16:11 it's not for memory, I think, but for serializing and emptying pipelines and the whatnots 22:16:32 err, instruction cache barrier 22:16:50 if it's not cross-cpu doing a jump is enough (but cpuid also works) 22:19:28 CPUID is a memory barrier but there are better memory barrier instructions 22:19:44 and yeah it's also a barrier to OOE 22:19:50 -!- Bicyclidine has joined. 22:19:57 I don't know which other instructions are 22:20:39 some hypervisors virtualize CPUID which makes it very slow for this purpose 22:20:47 also, there totally are legitimate use cases for multi-threaded self modifying code 22:22:56 Self modifying codes can be very useful 22:23:56 CPUID isn't a very good idea 22:24:51 why not? 22:26:15 -!- Phantom_Hoover has joined. 22:30:37 -!- Tritonio has quit (Ping timeout: 250 seconds). 22:33:17 -!- ais523_ has quit (Quit: Page closed). 22:35:11 -!- ais523 has quit. 22:46:15 -!- Sgeo has joined. 22:47:04 -!- nooodl has quit (Quit: Ik ga weg). 22:50:47 -!- Bicyclidine has quit (Ping timeout: 255 seconds). 22:51:00 -!- Bicyclidine has joined. 23:22:08 -!- augur has quit (Quit: Leaving...). 23:22:39 -!- augur has joined. 23:22:56 -!- Bicyclidine has quit (Ping timeout: 255 seconds). 23:23:10 -!- Bicyclidine has joined. 23:23:28 -!- ^v has quit (Read error: Connection reset by peer). 23:23:56 -!- ^v has joined. 23:25:28 -!- edwardk has quit (Quit: Computer has gone to sleep.). 23:43:30 -!- ^v has quit (Quit: http://i.imgur.com/Akc6r.gif). 23:47:34 -!- Bicyclidine has quit (Ping timeout: 240 seconds). 23:47:39 -!- boily has joined. 23:51:05 -!- Bicyclidine has joined.