01:34:16 <oklopol> i've never quite understood how it can be so quiet here at this hour
01:34:33 <oklopol> so in america, it's prime time right?
01:40:24 <oklopol> might be the time when people go to school and shit
01:50:04 <Pikhq> I'm just busy doing other things, like trying to get a PS2 emulator working.
01:59:07 <oklopol> well i should sleep.... hope you get it working
01:59:42 <Pikhq> I've got myself a working PS2 emulator. . . Which runs damned slowly.
02:00:25 <oklopol> i've actually played the playstation 1 demo cd games... and prolly something else
02:00:39 -!- calamari has joined.
02:01:20 <oklopol> my eyes hurt like hell ------>
02:02:48 <Pikhq> . . . 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:29:10 <oklopol> masturbation causes eye pain?
02:30:04 <bsmntbombdood> what's a good function to score rational approximations to pi?
02:30:25 <bsmntbombdood> i'm thinking score(a, b) = (log(b, 10) + log(a, 10) + 2) * -1./log(abs(a/b - pi), 10)
02:31:38 <oklopol> calculate it and use the fact doubles are easily converted to rationals... ta-daa
02:35:53 <bsmntbombdood> 355/113 turns out to be a very good approximation using that metric
02:41:30 -!- SuperAussieEvll has joined.
02:55:05 <SimonRC> Argh! Haskell numeric libraries == pain.
03:15:20 <bsmntbombdood> there needs to be a better than brute force algorithm to do this
03:21:34 <SimonRC> according to Haskell's Doubles and the window calculator, it is closer
03:21:47 <SimonRC> what is your scoring syste,?
03:22:00 <bsmntbombdood> but you have to take into account the lengths of the numbers
03:23:17 <SimonRC> in that case there may not be anything better than 355/113, ever
03:38:01 <bsmntbombdood> if you use (log(b) + log(a) + 2) * abs(a/b - pi), there are lots
04:12:13 <Pikhq> How does -O2 *hurt* performance (in comparison to what)?
04:16:59 <bsmntbombdood> i'm running it with denominators up to 10**11, get back to you in 15 hours on that
04:35:29 <Pikhq> I think your C compiler's broken.
04:37:20 -!- Pikhq has quit ("Leaving.").
04:38:09 -!- Pikhq has joined.
05:04:00 <bsmntbombdood> after this the floating point errors will make it worthless
05:05:19 <Pikhq> What language are you using? C, C++?
05:05:28 * Pikhq really prefers C++ for GMP stuff. . .
05:05:57 <Pikhq> If used right, it's wonderful.
05:06:25 <Pikhq> If you do something weird like make operator+ do multiplication, though, I will have to hunt someone down and kill that someone.
05:11:28 <Pikhq> Uh. . . Why would you use an integer for a non-integer?
05:12:45 <Pikhq> mpz_t is the GMP integer type. . .
05:12:58 <Pikhq> And I assume by rational, you mean "non-integer rational".
05:13:11 <Pikhq> (otherwise, why not just say integer?)
05:13:35 <Pikhq> I paid attention that day of middle school.
05:14:17 <Pikhq> Why not use, say, mpq_t?
05:15:08 <bsmntbombdood> because i don't actually do anything with the rational
05:17:05 <Pikhq> typedef struct {mpz_t numerator,denominator} mpq_t; is, I believe, the mpq_t definition.
05:18:31 <Pikhq> Of course, you could use the macros mpq_numref and mpq_denref. . .
05:19:41 <Pikhq> 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 <bsmntbombdood> 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:23:02 <Pikhq> int main(){mpz_class a,b;/* your code*/}
05:23:13 <Pikhq> And that's what I do.
05:25:37 <Pikhq> Realise that c++ = suck *really* means that c sucks, and c then gets incremented.
05:30:20 <Pikhq> And you've not changed the meaning at all. . . You've just managed to pour some more memory into it.
05:30:50 <Pikhq> tmp = c++; means that tmp is set to c, and c is then incremented. Then you say that tmp == suck.
05:30:58 <Pikhq> Since tmp==c, c==suck.
05:32:09 <bsmntbombdood> which actually means c won't let itself be insulted
05:32:27 <Pikhq> That's what you get for failing at C semantics.
05:32:45 <Pikhq> (and thereby failing at C++ semantics)
05:34:19 <Pikhq> The second "c" has an incremented value.
05:34:40 <Pikhq> However, (C == C++) *does* return true.
05:34:48 <Pikhq> It's perfectly legal.
05:37:31 <Pikhq> Hrm. Something's wrong with my compiler. . .
05:37:38 <Pikhq> I've got it saying (2 == 3).
05:39:16 * Pikhq kicks C in the shins for a bit
05:40:19 <Pikhq> (c++ == 1) is true, then (c == 1) is true, and finally (c++ == c).
05:40:38 <Pikhq> And, after that, it says c == 2.
05:40:43 <Pikhq> Just to make things more confusing.
05:41:27 <bsmntbombdood> with -Wall it also says warning: operation on ‘c’ may be undefined
05:42:16 <Pikhq> Which would explain why the hell something weird is happening.
05:43:46 <bsmntbombdood> apparently GMP doesn't support operations with long longs
05:44:34 <Pikhq> 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 <oerjan> bsmntbombdood: you need to read up on continued fractions.
07:13:34 <oerjan> those give you the best approximations.
07:15:19 <oerjan> closeness given size of denominator, i think
07:18:19 <oerjan> 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 <oerjan> the last paragraph of that section gives another "best" sense, too.
07:25:43 -!- Arrogant has joined.
07:35:31 <oerjan> i thought we had a discussion the other day of why things like c == c++ are undefined.
07:42:34 <bsmntbombdood> 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 <oklopol> <Pikhq> However, (C == C++) *does* return true. <<<<< undefinatorized.
11:33:16 <oklopol> oerjan saved the day already :<
11:40:15 <oklopol> but, java compensates for it's non-operator-overloadingy boringness by defining evaluation order accurately
11:41:35 <fizzie> I don't think a well-defined evaluation order is all that interesting.
11:41:47 <fizzie> Quite the contrary: undefined operations add a little spice to the life.
11:44:26 <oklopol> i only find intrest determinicity
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 <ais523> * a computer with an IRC client
15:45:42 -!- jix__ has joined.
15:46:50 <ais523> I'm busy working on Underload's parent language
15:47:19 <ais523> it's complicated, because I've changed the language I've written the interpreter in twice
15:47:33 <ais523> and have both an old imprecise spec and a new unfinished one to try to work from
15:47:42 <ais523> as well as the fact that I keep on coming up with new features it needs
16:04:01 <ais523> Yep, that's what it's called
16:04:20 <ais523> It extends it with features like variables and pointers
16:04:49 <ais523> (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 <ais523> What I've done so far can be seen at http://pastebin.ca/505403 for the next 24 hours or so
16:19:32 <ais523> I've set it to expire because it's very much a work in progress.
16:20:03 <ais523> 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 <ais523> The C++ interpreter can do more at the moment, but is an older version of the interpreter
16:20:56 <ais523> 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 <ais523> (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:04 <SimonRC> http://blog.modernmechanix.com/2006/08/31/your-telephone-of-tomorrow/
23:21:19 <SimonRC> Modern mobile phones, predicted in ... 1956!
23:45:27 <Pikhq> Reading the article attached. . .
23:45:37 <Pikhq> The "in 3-D" part hasn't happened yet. ;)
23:46:04 <Pikhq> And cell phones aren't normally used for duplex audio/video. ;)
23:47:00 <Pikhq> But it's a hell of a lot closer to the mark than most predictions. . .
23:47:09 <Pikhq> Hell, it's actually a reasonable thought.
23:48:56 <Pikhq> Additionally, the discuss power sources. . .
23:49:23 <Pikhq> The "solar battery" takes advantage of the photovoltaic effect to charge a battery, which is used for power. . .
23:54:29 <Pikhq> Wow. Jack Thompson is suing Microsoft.