00:06:40 -!- atsampson has quit (Remote closed the connection). 00:06:53 -!- atsampson has joined. 00:07:50 -!- digital_me has joined. 00:36:40 -!- pikhq_ has changed nick to pikhq. 00:45:31 Bye for today :) 00:45:47 -!- ais523|busy has quit ("(1) DO COME FROM ".2~.2"~#1 WHILE :1 <- "'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1""). 00:46:06 -!- ehird has quit (Remote closed the connection). 00:53:04 -!- GreaseMonkey has joined. 00:58:28 reminds me of the esoteric file system idea I had, where all files were functions, Unlambda-style, which you evaluated to get the file's contents. That way, you could do special files easily, and files could be stored compressed on disk if necessary, and you could have lazy files which were infinitely long... 01:00:13 Seeking = PITA 01:05:47 -!- Tritonio has quit (Read error: 113 (No route to host)). 01:06:20 -!- CakeProphet has joined. 01:08:00 -!- Tritonio has joined. 01:09:56 -!- Tritonio has quit (Client Quit). 01:09:58 -!- Slereah has quit (Read error: 104 (Connection reset by peer)). 01:10:41 -!- Slereah_ has joined. 01:16:07 -!- ihope has joined. 01:32:29 -!- Tritonio has joined. 01:39:17 -!- CakeProphet has quit ("haaaaaaaaaa"). 01:41:22 -!- Corun has joined. 01:45:36 -!- Corun has changed nick to NeilStoleMySleep. 01:58:24 -!- NeilStoleMySleep has changed nick to Corun. 02:26:44 -!- Judofyr_ has joined. 02:26:44 -!- Judofyr has quit (Read error: 104 (Connection reset by peer)). 02:35:53 -!- Slereah_ has quit (leguin.freenode.net irc.freenode.net). 02:35:53 -!- digital_me has quit (leguin.freenode.net irc.freenode.net). 02:35:53 -!- sekhmet has quit (leguin.freenode.net irc.freenode.net). 02:36:16 -!- Slereah_ has joined. 02:36:16 -!- digital_me has joined. 02:36:16 -!- sekhmet has joined. 03:28:35 -!- olsner has quit ("Leaving"). 04:42:52 -!- Corun has quit ("This computer has gone to sleep"). 05:42:50 -!- digital_me has quit (Read error: 113 (No route to host)). 06:08:57 -!- lifthrasiir has quit ("leaving"). 06:09:05 -!- lifthrasiir has joined. 07:11:52 -!- Judofyr_ has quit. 07:21:30 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:22:07 -!- saudado has changed nick to lament. 08:29:07 -!- Iskr has joined. 10:45:54 -!- Tritonio has quit (Remote closed the connection). 10:48:46 -!- Tritonio has joined. 10:51:48 -!- GreaseMonkey has quit (Read error: 110 (Connection timed out)). 10:52:35 -!- GreaseMonkey has joined. 11:10:38 -!- GreaseMonkey has quit ("Unisex."). 11:24:10 -!- olsner has joined. 11:53:05 -!- ihope_ has joined. 11:55:01 Deewiant, your TIME fingerprint, wtf are you doing in it? D code as a string constant!? 11:55:46 -!- fizzie has quit (leguin.freenode.net irc.freenode.net). 11:55:46 -!- ihope has quit (leguin.freenode.net irc.freenode.net). 11:55:49 -!- ihope_ has changed nick to ihope. 11:56:33 AnMaster: metaprogramming 11:56:57 Deewiant, you mean, like a macro in C? 11:57:06 sorta 11:57:22 hm? 11:57:25 -!- fizzie has joined. 11:57:53 mixin("int x;") - equivalent to just int x; 11:58:07 but with templates you can generate the string literal 11:58:17 ah 11:58:21 like macros then 11:58:22 so I don't have to write the same code over and over 11:58:28 sorta. 11:58:36 #define ROMAPUSH(x, y) \ 11:58:37 static void FingerROMApush ## x (instructionPointer * ip) \ 11:58:37 { \ 11:58:37 StackPush(ip->stack, (FUNGEDATATYPE)y); \ 11:58:37 } 11:58:49 I do it like that 11:58:56 then just: 11:58:58 ROMAPUSH(I, 1) 11:58:58 ROMAPUSH(V, 5) 11:59:00 and so on 11:59:17 yes, that's similar. 11:59:42 quite powerful, macros in C 12:01:23 oh btw you seem to like using static buffers, instead of allocating on the stack, depending on situation I think creating one in the function may work better, due to risk of cache misses otherwise 12:01:30 but that is over-optimizing IMO 12:01:46 Deewiant, anyway I added JSTR to cfunge now 12:02:00 rather simple one really 12:05:52 -!- ehird has joined. 12:06:18 -!- ehird has set topic: * Topic for #esoteric set by http://tunes.org/~nef/logs/esoteric. 12:06:21 Deewiant, another question: Should the UTC/non-UTC stuff in TIME be local to the ip or global? 12:09:29 ccbi seems to have it global 12:23:09 AnMaster: say it with me: *not spe-ci-fied, up to you* 12:23:24 hah 12:23:31 * AnMaster is implementing FILE atm though 12:24:12 Deewiant: AnMaster does not know the meaning of that 12:24:31 or 'Premature opt-imi-zat-ion is the root of all evil' 12:56:00 -!- Corun has joined. 13:27:16 Zoop 13:38:38 damn i'm leet 13:38:42 i'm using emacs and vi on the same projcet 13:38:43 at once 13:48:41 -!- Slereah has joined. 13:48:41 -!- Slereah_ has quit (Read error: 104 (Connection reset by peer)). 13:51:25 hopefully you're not using the editor in emacs :P 13:54:48 olsner: i so am 13:55:22 may your choice of deity have mercy on your soul 13:58:06 -!- Slereah has quit (Read error: 104 (Connection reset by peer)). 13:58:16 -!- Slereah has joined. 14:00:16 -!- Slereah_ has joined. 14:00:16 -!- Slereah has quit (Read error: 104 (Connection reset by peer)). 14:01:46 -!- Slereah has joined. 14:01:47 -!- Slereah_ has quit (Read error: 104 (Connection reset by peer)). 14:03:09 olsner: i don't think the flying spaghetti monster really cares all that much 14:03:58 well, poor choice of deity then :P 14:04:07 -!- Slereah has quit (Read error: 104 (Connection reset by peer)). 14:14:14 -!- Slereah has joined. 14:42:25 return $it if $it = ...; // this is a kinda neat perl trick, i wish i could do this in other languages 14:42:27 'x and return' 15:14:58 Deewiant, there is a bug in FILE of CCBI I think 15:15:04 in fopen one: 15:15:05 case 2: file = c.fopen(name, "ab"); c.rewind(file); break; 15:15:17 you need to check in between that the fopen did work 15:15:30 rather than after trying rewind on it 15:15:43 doesn't rewind fail on a failed fopen 15:16:03 well fopen returns NULL on failed open 15:16:11 no idea what happens with rewind on a null pointer 15:16:21 man rewind says the following: 15:16:21 EBADF The stream specified is not a seekable stream. 15:16:33 But NULL is not a stream at all. 15:16:44 The rewind() function sets the file position indicator for the stream pointed to by stream to the beginning of the file. It is equivalent to: 15:16:45 (void) fseek(stream, 0L, SEEK_SET) 15:16:47 and hence it's not a seekable stream. 15:16:48 except that the error indicator for the stream is also cleared (see clearerr(3)). 15:16:49 hm 15:16:55 fizzie, indeex 15:16:57 indeed* 15:17:00 Yes, but you still need to specify a stream. 15:17:58 you appear to be correct 15:19:01 Even if it would happen to work, I don't think you could really rely on it unless The Standard would specifically mention it's safe to call with a null pointer. 15:19:21 seeing as it segfaults both on windows and linux I'd say you guys are right. ;-) 15:20:24 well man 3p on rewind refers to fseek for details, and man 3p fseek doesn't mention null pointer anywhere 15:20:55 The Standard That Is Great And Holy In Caps 15:20:55 :D 15:21:06 but i wouldn't rely on it, yeah 15:21:08 ehird, it wasn't I that said it... 15:21:08 it sounds shaky 15:21:14 and even if it is standard 15:21:16 i bet some system gets it wrong 15:21:18 AnMaster: I know 15:21:20 i just found it amusing 15:21:22 it's like Him 15:21:26 it's The Standard 15:21:27 Who? 15:21:37 AnMaster: Him is what religious people call god 15:21:40 always capitalized like That 15:21:49 ah 15:21:56 'And I talked to Him and asked him for big moneys, and he said FSCK U NOOB' 15:22:21 haha 15:23:03 I also used to refer to The Hitchhiker's Guide to the Galaxy as "The Book". 15:23:09 hah 15:24:14 Deewiant, may I ask wtf you are doing in your fgets routine? it seems overly complex 15:24:39 doesn't D have a fgets? 15:24:43 D has the C stdlib 15:25:50 well what are you doing it for then? 15:26:08 Deewiant, is it because fgets will look for \n and not \r\n or? 15:26:19 if that's what it does then that's definitely a reason 15:26:35 but well 15:26:36 probably the fact that I don't know 15:26:39 that doesn't really help 15:26:56 because both will stop on the \n of \r\n 15:27:09 what about only \r 15:27:27 well... I don't think your code stop on it 15:27:32 of course it does 15:27:40 case '\r', right there 15:27:54 oh wait yes it does 15:27:55 hm 15:28:41 Deewiant, it will probably use whatever is used on the OS 15:28:48 quite possible 15:28:50 and I can't have that 15:29:06 as in \r\n on windows, or if stream is in text mode (eww) just \n 15:29:36 shrug about text mode... I never know how that works except that it's never the way I want :-P 15:29:43 http://www.youtube.com/watch?v=dmEvPZUdAVI 15:29:45 indeed 15:29:59 but still, gotta support all 3 line endings regardless of OS 15:30:04 How did Microsoft ever became a monopole with ads like that? 15:30:08 and hence, I don't trust fgets. 15:30:44 Deewiant, not got to, the standard says should and "If an interpreter cannot support all three varieties of end-of-line marker, it should be clearly noted in that interpreter's documentation." 15:30:55 so it is strongly recommended to support all 15:30:59 but not required 15:31:00 I think that's crap. :-P 15:31:16 Deewiant, it is the 98 specs... 15:31:22 I think any program that doesn't support all 3 types is crap. 15:31:25 I support all three 15:31:28 regardless of specs. 15:31:41 Deewiant, I can think of cases where it may not be possible 15:31:49 say if the interpreter is coded in intercal 15:31:55 then intercal is crap. :-P 15:31:57 doesn't it mess with newlines? 15:32:01 I don't know. 15:32:17 ais523 isn't here so I guess we won't get an authoritative answer, either. :-) 15:32:52 also one thing of D I would like in C: being able to break out of multiple loops with a break 15:32:59 as it is, that is the only case I use goto 15:33:08 yep, it's probably the most common case 15:33:09 because there is no other way in C 15:33:42 Deewiant, yeah, also common for stuff like: goto error, that cleans up stuff or such. I don't do that 15:35:27 Deewiant, hm no your doesn't end input on \r 15:35:43 Deewiant, it just does break; not break loop; 15:35:48 so another bug in ccbi 15:36:23 good catch :-) 15:37:41 Deewiant, hm... FileHandle[c.FOPEN_MAX] handles; that is decided at compile time in CCBI? 15:37:53 just like a C array. 15:38:06 Deewiant, hm? 15:38:13 hm what? 15:38:17 it's a static array. 15:38:19 C99 got VLA :P 15:38:22 yeah 15:38:24 not at global scope. :-P 15:38:33 true 15:38:45 max fds varies however 15:38:54 hence, FOPEN_MAX. 15:39:03 yes, what does that mean in this case? 15:39:23 /usr/include/gentoo-multilib/amd64/stdio.h: FOPEN_MAX Minimum number of files that can be open at once. 15:39:27 seeing as it's in "c" it's a C constant... 15:39:41 FOPEN_MAX is defined to 16 here. heh 15:40:02 that is the minimum guaranteed. 15:40:07 " The value of this macro is an integer constant expression that represents the minimum number of streams that the implementation guarantees can be open simultaneously. You might be able to open more than this many streams, but that is not guaranteed." 15:40:26 thus it should be checked at runtime :) 15:40:26 oh, darn, it includes stdin/stdout/stderr 15:40:30 hm? 15:40:55 because you are more likely to be able to open like 1024 fds or so 15:41:03 but it's not guaranteed. 15:41:07 open files (-n) 1024 15:41:11 from ulimit -a 15:41:15 in one program? 15:41:26 Deewiant, indeed, but if you can't open, check return value of fopen ;P 15:41:27 and why does stdio.h then define it as 16? 15:41:36 Deewiant, it does here, I don't know why 15:41:46 wtf is the point of having all these predefined constants if they don't mean anything 15:41:47 I malloc my handle array so... 15:41:56 seriously, the windows API looks a lot nicer sometimes :-P 15:42:05 Deewiant, anyway SOCK could create more fds iirc 15:42:14 so it isn't FOPEN_MAX -3 15:42:19 or something as simple as that 15:42:35 fine, dynamic then. 15:42:38 the best way to check would be getconf() I think.... 15:42:40 piece of crap API. 15:42:42 if you *need* to know it 15:43:05 err not getconf, that is the command line alternative 15:43:08 version* 15:43:15 sysconf() 15:44:40 Deewiant, if you really need to know it is sysconf(_SC_OPEN_MAX) I think 15:45:17 whatever. 15:45:32 Deewiant, anyway the same applies to Windows afaik 15:45:49 you can't know exactly how many files you can have open 15:46:06 not at compile time at least 15:47:12 Deewiant, also, FOPEN_MAX is from ANSI C 15:47:18 so don't blame POSIX :P 15:47:34 I blame distributions for defining it as something anal 15:48:01 I blame whoever didn't read the docs for not doing so ;) 15:48:15 how the hell should I know what docs to read 15:48:17 I agree it is a stupid name... 15:48:26 I read the docs for fopen and it says FOPEN_MAX is the absolute limit 15:48:44 but oh, actually FOPEN_MAX is only one-sixteenth of the real limit 15:48:49 sigh 15:48:53 err my man fopen doesn't mention FOPEN_MAX... 15:49:28 and man 3p fopen doesn't say it is an absolute limit 15:49:41 it says it's the maximum guaranteed 15:49:45 The fopen() function shall fail if: 15:49:48 EMFILE {OPEN_MAX} file descriptors are currently open in the calling process. 15:49:51 The fopen() function may fail if: 15:49:55 EMFILE {FOPEN_MAX} streams are currently open in the calling process. 15:49:57 hm 15:50:06 streams vs. file descriptors too. :-P 15:50:07 yes maximum guaranteed 15:50:19 but my point here, is that on most systems you can open way more 15:50:26 so why doesn't the man page say that? 15:50:29 I tested with a befunge program opening 23 files 15:50:34 using FILE 15:50:37 at the same time 15:50:47 why does it say something useless like "may fail" instead of "is very likely not to fail, it's likely you can open 100x more" 15:51:11 Deewiant, because when it was written that wasn't the case I guess? 15:51:18 documentation can be updated 15:51:59 I agree that FOPEN_MIN may have been a better name... 15:52:12 or _MIN_MAX? :-P 15:52:14 Deewiant, but FOPEN_MAX is from ANSI C 15:52:15 ! 15:52:18 Huh? 15:52:28 exactly. "Huh?" :-P 15:52:35 so it is not a case of POSIX 15:52:38 but ANSI C 15:52:38 who cares where it's from 15:52:40 it's badly written 15:52:51 the man pages aren't copied from some 30-year old ANSI C manual either 15:52:52 FOPEN_MAX 15:52:52 which expands to an integer constant expression that is the minimum number of files that 15:52:52 the implementation guarantees can be open simultaneously; 15:52:58 C99 15:53:00 was that 15:53:12 whatever 15:53:31 and ranting about it in here won't help ;P 15:53:43 I'm willing to shut up 15:53:52 try ranting to ANSI maybe ;) 15:54:08 or, for C99 I think it is IEEE? hm 15:54:12 "not us anyway" 15:54:14 I don't care that much, I rarely have to mess around with raw C APIs 15:54:18 to this degree 15:54:33 Deewiant, well why can't you use the D file reading API for it? 15:54:49 ... because the specs say that it's the C file API ... 15:55:13 * AnMaster looks 15:55:15 "(like c fgets)" 15:55:39 Deewiant, 15:55:41 use Tango 15:55:41 Deewiant, seems to indicate same behaviour 15:55:44 you depend on it 15:55:46 so use its file apis 15:55:47 not c's 15:55:47 ;P 15:55:56 ehird: 2008-05-03 17:54:49 ( Deewiant) ... because the specs say that it's the C file API ... 15:56:01 AnMaster: D has two 100% incompatible stdlibs that you can't have at the same time. 15:56:04 Deewiant, anyway, it is RC/Funge specs so they aren't clear... 15:56:11 AnMaster: Phobos and Tango, Phobos is the official one. Real men use Tango. 15:56:15 (read: Phobos sucks) 15:56:16 ehird, that isn't the question here... 15:56:18 ehird: tangobos exists. 15:56:29 Deewiant: Yes, but that's for goatse-watchers. 15:56:30 Or something 15:56:37 ehird, he is doing this: import c = tango.stdc.stdio; 15:56:49 tango has libc in it yes 15:57:01 and then using c.fgets and so on 15:57:11 err not fgets, but several other ones 15:57:41 Deewiant, anyway the FILE specs doesn't say it have to be the A file API 15:57:49 it only says "(like c fgets)" 15:57:52 note "like" 15:58:03 I interpret that as "same behaviour" 15:58:06 exactly 15:58:10 bug-for-bug compatibility would be ideal 15:58:18 which is easiest to get by just using the C functions directly. 16:00:31 why bug-for-bug? 16:00:55 because of what the specs say. "like c xxx". 16:01:40 I assume it means "like the C specs describe this function", and it is INTERCAL no C that got the "random compiler bug" in it's specs ;P 16:02:12 I'm sure that if I used the tango functions you'd be here saying "in this obscure case, fseek does xxx, does tango's do that?" :-P 16:02:36 and then I'd be like "don't know, don't care". :-P 16:03:13 heh 16:03:45 however that is not an argument as you coded it before you knew of me 16:04:15 no, but I was sure there might be someone like you. :-P 16:04:30 or I just felt like using the C functions to remind myself of how they work, who knows?! 16:04:42 anyhoo, WYGIWYGAINGW. 16:04:45 I'm off to eat. -> 16:05:48 ah you like Discworld :) 17:59:30 Deewiant, by the way the HRTI test shows that at some stuff Boehm-GC is a LOT slower. Mainly realloc seems slow in it 18:00:47 using preallocaction to alloc at least the needed number of bytes in advance I got it down to acceptable levels. 18:01:07 however I suspect I may make no gc the default in future at some point 19:15:44 -!- comex has left (?). 19:22:27 -!- Sgeo has joined. 19:41:08 -!- jix has joined. 19:48:16 a 21:05:16 b 21:05:44 cd 21:05:46 EFG 21:06:46 hjkl; 21:06:55 ä' 21:07:13 ö! 21:09:28 -!- digital_me has joined. 21:09:56 AnMaster: surely you don't have "ö!" to the right of "z" on your keyboard. :-) 21:10:39 no 21:10:48 Deewiant, nor do I have ä there either 21:11:16 Shift < z x c v b n m , . - Shift 21:11:18 to the right of "hjkl;" on a 'merican keyboard comes ä' followed by enter 21:11:26 moving on, we get qwertyuiopå 21:11:37 asdfghjklöä 21:11:41 zxcvbnm 21:11:54 hm ... 21:11:55 exactly. so you broke the cycle :-/ 21:11:55 x 21:11:58 in that case 21:11:59 :-) 21:12:04 Deewiant, but so did ihope 21:12:07 shh ;-) 21:12:19 as we went alphabetically before 21:12:36 abcdefghjkl;' 21:13:20 abcdefgijkl 21:13:25 abcdefghijkl 21:13:26 even 21:13:31 you forgot i 21:13:50 Yes, we all know that defghijkl is almost all consecutively... on there. 21:14:08 Present in a consecutive manner. 21:14:53 http://4chanarchive.org/images/48232393/1197566589997.png 21:15:45 Slereah: hah 21:16:24 Yes. 21:16:29 That's how it is. 21:53:32 -!- digital_me_ has joined. 21:58:41 -!- CakeProphet has joined. 22:02:26 -!- CakeProphet has quit (Client Quit). 22:05:22 -!- digital_me has quit (Read error: 110 (Connection timed out)). 22:27:15 -!- Slereah_ has joined. 22:28:27 -!- Slereah has quit (Read error: 104 (Connection reset by peer)). 22:40:04 -!- digital_me_ has quit (Read error: 104 (Connection reset by peer)). 22:47:25 -!- Iskr has quit ("Leaving"). 22:50:32 -!- digital_me has joined. 22:53:42 -!- digital_me has quit (Client Quit). 22:53:54 -!- digital_me has joined. 22:58:18 -!- digital_me has left (?). 23:10:39 -!- Slereah_ has quit (Read error: 104 (Connection reset by peer)). 23:12:26 -!- Slereah has joined. 23:31:07 -!- Deformati has joined. 23:39:56 -!- Deformative has quit (Read error: 110 (Connection timed out)).