01:34:16 i've never quite understood how it can be so quiet here at this hour 01:34:24 3:33 here 01:34:33 so in america, it's prime time right? 01:34:42 am i right, folks? 01:34:51 but, seriously, sp ----> 01:40:10 actually 01:40:24 might be the time when people go to school and shit 01:49:48 In theory. 01:50:04 I'm just busy doing other things, like trying to get a PS2 emulator working. 01:59:07 well i should sleep.... hope you get it working 01:59:10 playstation? 01:59:23 i've heard of those. 01:59:25 -----------> 01:59:31 Mmkay. . . 01:59:42 I've got myself a working PS2 emulator. . . Which runs damned slowly. 02:00:25 i've actually played the playstation 1 demo cd games... and prolly something else 02:00:28 but i'm not proud of it 02:00:39 -!- calamari has joined. 02:01:20 my eyes hurt like hell ------> 02:01:47 too much masturbation... sad 02:02:48 . . . Ah. The x86_64 build currently has an unoptimized recompiler, but the x86 build is fairly optimized. 02:06:18 -!- calamari has quit ("Leaving"). 02:14:53 355/113 02:29:10 masturbation causes eye pain? 02:30:04 what's a good function to score rational approximations to pi? 02:30:25 i'm thinking score(a, b) = (log(b, 10) + log(a, 10) + 2) * -1./log(abs(a/b - pi), 10) 02:31:18 where a/b is the approximation 02:31:38 calculate it and use the fact doubles are easily converted to rationals... ta-daa 02:32:29 sleep, perhaps -------> 02:35:53 355/113 turns out to be a very good approximation using that metric 02:36:58 the best with a denomiator under 10**7, in fact 02:41:23 yes 02:41:30 -!- SuperAussieEvll has joined. 02:41:35 the next one is humongous 02:41:48 i need to rewrite this code 02:41:54 python is not a good language for this 02:42:16 Hi all 02:43:52 bsmntbombdood: pastebin? 02:44:41 http://pastebin.ca/503834 02:44:52 i'm redoing it in c right now 02:47:16 * SimonRC re-does it in Haskell 02:50:33 mine will be faster :P 02:55:05 Argh! Haskell numeric libraries == pain. 02:59:35 pain pain pain 03:05:09 done 03:08:01 * SuperAussieEvll falls over 03:08:52 jeez 03:08:57 none under 10**8 03:12:04 I have results too 03:15:20 there needs to be a better than brute force algorithm to do this 03:19:46 what about 312689/99532 ? 03:20:57 that seems to be closer 03:21:02 that has a score of 14.7 03:21:10 355/113 has a score of 7.7 03:21:34 according to Haskell's Doubles and the window calculator, it is closer 03:21:46 closer to pi, yes 03:21:47 what is your scoring syste,? 03:22:00 but you have to take into account the lengths of the numbers 03:22:12 (log(b) + log(a) + 2) / -log(abs(a/b - pi)) 03:23:17 in that case there may not be anything better than 355/113, ever 03:25:16 possible 03:35:16 wtf? 03:35:31 -O2 hurts the performance 03:38:01 if you use (log(b) + log(a) + 2) * abs(a/b - pi), there are lots 03:45:13 i'll find some approximations for e now 03:45:54 193/71 03:46:01 2721/1001 03:46:13 49171/18089 03:46:16 that's interesting 03:46:42 1084483/398959 03:49:31 28245729/10391023 03:49:37 i wonder why there's so many more 04:12:13 How does -O2 *hurt* performance (in comparison to what)? 04:16:26 in comparison to -O0 04:16:59 i'm running it with denominators up to 10**11, get back to you in 15 hours on that 04:23:59 . . . *How*?!? 04:24:38 #ifdef O 2 04:24:38 run_slow(); 04:24:38 #endif 04:24:39 ? 04:29:09 i dunno, it just happens 04:35:29 I think your C compiler's broken. 04:36:30 gcc (GCC) 4.1.2 20061115 04:37:20 -!- Pikhq has quit ("Leaving."). 04:38:09 -!- Pikhq has joined. 05:00:58 ah ha! 05:01:04 9978066541/3176117225 05:04:00 after this the floating point errors will make it worthless 05:04:08 * bsmntbombdood pulls out the GMP manual 05:05:19 What language are you using? C, C++? 05:05:23 C 05:05:28 * Pikhq really prefers C++ for GMP stuff. . . 05:05:44 yeah, operator overloading is good sometimes 05:05:57 If used right, it's wonderful. 05:06:25 If you do something weird like make operator+ do multiplication, though, I will have to hunt someone down and kill that someone. 05:09:54 hrm 05:10:28 should i use mpz_ts for the rational 05:10:43 that is, allow numbers greater than 2**64? 05:11:20 naw, no way i'm going to do that many iterations 05:11:28 Uh. . . Why would you use an integer for a non-integer? 05:11:47 ? 05:12:45 mpz_t is the GMP integer type. . . 05:12:49 yeah 05:12:58 And I assume by rational, you mean "non-integer rational". 05:13:11 (otherwise, why not just say integer?) 05:13:17 a rational is two integers 05:13:26 Um, yeah. 05:13:35 I paid attention that day of middle school. 05:14:17 Why not use, say, mpq_t? 05:15:08 because i don't actually do anything with the rational 05:15:27 i just do stuff with its numerator, denominator 05:17:05 typedef struct {mpz_t numerator,denominator} mpq_t; is, I believe, the mpq_t definition. 05:18:31 Of course, you could use the macros mpq_numref and mpq_denref. . . 05:19:41 Or just do it your own way, and wait as I wonder why you need the numerator and denominator of a rational, but not the rational itself. 05:21:37 a = round(b*pi); error = (log(b) + log(a) + 2) / -log(abs(a/b - pi)); if(error < min_error) {min_error = error; min_denom = b;} 05:21:40 that's what i d 05:21:41 o 05:21:45 where a/b is the rational 05:23:02 int main(){mpz_class a,b;/* your code*/} 05:23:13 And that's what I do. 05:23:27 c++ = suck 05:24:15 real men use mpz_add(tmp, a, b) instead of a+b 05:25:37 Realise that c++ = suck *really* means that c sucks, and c then gets incremented. 05:29:23 tmp = c++; tmp == suck 05:30:20 And you've not changed the meaning at all. . . You've just managed to pour some more memory into it. 05:30:50 tmp = c++; means that tmp is set to c, and c is then incremented. Then you say that tmp == suck. 05:30:55 oops 05:30:58 Since tmp==c, c==suck. 05:31:41 c++ won't let itself be insulted! 05:32:09 which actually means c won't let itself be insulted 05:32:15 it never stops! 05:32:15 Yup. 05:32:27 That's what you get for failing at C semantics. 05:32:45 (and thereby failing at C++ semantics) 05:33:38 why be redundant? 05:33:46 C++ == C, remember 05:33:55 Nope. 05:34:19 The second "c" has an incremented value. 05:34:39 i think it's not legal 05:34:40 However, (C == C++) *does* return true. 05:34:48 It's perfectly legal. 05:37:31 Hrm. Something's wrong with my compiler. . . 05:37:38 I've got it saying (2 == 3). 05:38:33 ? 05:39:16 * Pikhq kicks C in the shins for a bit 05:39:44 It's also saying: 05:39:48 int c = 0; 05:40:19 (c++ == 1) is true, then (c == 1) is true, and finally (c++ == c). 05:40:38 And, after that, it says c == 2. 05:40:41 gcc says that c++==c 05:40:43 Just to make things more confusing. 05:41:27 with -Wall it also says warning: operation on ā€˜cā€™ may be undefined 05:42:16 Which would explain why the hell something weird is happening. 05:43:46 apparently GMP doesn't support operations with long longs 05:44:03 i'll have to use mpz_t after all 05:44:34 Well, yeah. . . GMP is a bignum library, not a native datatype library. 06:06:49 -!- SuperAussieEvll has quit ("Leaving"). 06:59:02 -!- oerjan has joined. 07:04:50 -!- h|barbobot has joined. 07:12:45 bsmntbombdood: you need to read up on continued fractions. 07:13:00 oerjan: i tried that 07:13:34 those give you the best approximations. 07:13:54 "the best" according to what? 07:14:39 closeness? 07:15:19 closeness given size of denominator, i think 07:17:06 not quite sure 07:18:19 found it: http://en.wikipedia.org/wiki/Continued_fraction#Best_rational_approximations 07:20:07 -!- Pikhq has quit (Read error: 113 (No route to host)). 07:24:55 the last paragraph of that section gives another "best" sense, too. 07:25:43 -!- Arrogant has joined. 07:35:31 i thought we had a discussion the other day of why things like c == c++ are undefined. 07:37:47 c == c++ is false 07:37:49 c > c++ 07:42:22 hrm 07:42:34 9978066541/3176117225 isn't one of the convergents of pi 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:11:19 -!- h|barbobot has quit (Remote closed the connection). 08:29:51 -!- oerjan has quit ("leaving"). 10:01:34 -!- Arrogant has quit ("Leaving"). 10:58:41 -!- oklopol has quit (pratchett.freenode.net irc.freenode.net). 10:59:22 -!- oklopol has joined. 11:11:11 -!- Pikhq has joined. 11:32:11 However, (C == C++) *does* return true. <<<<< undefinatorized. 11:32:18 i thin k. 11:33:04 oh 11:33:16 oerjan saved the day already :< 11:40:15 but, java compensates for it's non-operator-overloadingy boringness by defining evaluation order accurately 11:41:35 I don't think a well-defined evaluation order is all that interesting. 11:41:47 Quite the contrary: undefined operations add a little spice to the life. 11:44:26 i only find intrest determinicity 11:44:30 *in 15:17:25 -!- ais523 has joined. 15:30:39 * ais523 is in the wrong timezone to log on to IRC at a time they have access to a computer and come across a conversation 15:30:50 * a computer with an IRC client 15:45:42 -!- jix__ has joined. 15:46:50 I'm busy working on Underload's parent language 15:47:19 it's complicated, because I've changed the language I've written the interpreter in twice 15:47:33 and have both an old imprecise spec and a new unfinished one to try to work from 15:47:42 as well as the fact that I keep on coming up with new features it needs 15:54:12 overload? 16:04:01 Yep, that's what it's called 16:04:20 It extends it with features like variables and pointers 16:04:49 (Imagine Scheme with goto, and you'll have some idea of what I've got myself into) 16:05:35 -!- jix__ has changed nick to jix. 16:19:24 What I've done so far can be seen at http://pastebin.ca/505403 for the next 24 hours or so 16:19:32 I've set it to expire because it's very much a work in progress. 16:20:03 The Perl program is the current interpreter-in-progress (but it needs reworking so it can handle programs with reasonable efficiency, with some sort of internal compression) 16:20:19 The C++ interpreter can do more at the moment, but is an older version of the interpreter 16:20:56 The text files are the spec; neither is complete, and the less complete one is a newer version (I was working through the alphabet, but haven't finished making the end of it rigorous yet) 16:22:54 (By the way, does anyone else create archives using more?) 16:53:12 -!- sebbu has joined. 17:00:27 -!- ais523 has quit (Remote closed the connection). 17:16:53 -!- jix__ has joined. 17:25:07 -!- jix has quit (Read error: 113 (No route to host)). 17:31:31 -!- sebbu2 has joined. 17:33:15 -!- sebbu3 has joined. 17:41:08 -!- sebbu4 has joined. 17:42:06 -!- sebbu4 has quit (Excess Flood). 17:42:33 -!- sebbu4 has joined. 17:42:55 -!- sebbu3 has quit (Read error: 145 (Connection timed out)). 17:53:13 -!- sebbu has quit (Connection timed out). 17:53:13 -!- sebbu2 has quit (Connection timed out). 17:55:20 -!- sebbu has joined. 18:08:37 -!- sebbu4 has quit (Read error: 110 (Connection timed out)). 18:12:12 -!- sebbu2 has joined. 18:31:41 -!- sebbu has quit (Connection timed out). 18:40:59 -!- sebbu has joined. 18:52:43 -!- sebbu2 has quit (Connection timed out). 19:01:35 -!- sebbu2 has joined. 19:20:52 -!- sebbu has quit (Connection timed out). 19:40:26 -!- oerjan has joined. 20:59:53 -!- oerjan has quit ("Reboot"). 21:05:39 -!- oerjan has joined. 21:32:08 -!- oerjan has quit ("leaving"). 21:33:18 -!- jix__ has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 22:32:34 -!- cmeme has quit (Remote closed the connection). 22:32:50 -!- cmeme has joined. 22:54:33 -!- sebbu2 has quit ("@+"). 23:21:02 Oh wow! 23:21:04 http://blog.modernmechanix.com/2006/08/31/your-telephone-of-tomorrow/ 23:21:19 Modern mobile phones, predicted in ... 1956! 23:44:48 spooky. 23:45:27 Reading the article attached. . . 23:45:37 The "in 3-D" part hasn't happened yet. ;) 23:46:04 And cell phones aren't normally used for duplex audio/video. ;) 23:47:00 But it's a hell of a lot closer to the mark than most predictions. . . 23:47:09 Hell, it's actually a reasonable thought. 23:48:56 Additionally, the discuss power sources. . . 23:49:23 The "solar battery" takes advantage of the photovoltaic effect to charge a battery, which is used for power. . . 23:54:29 Wow. Jack Thompson is suing Microsoft.