--- Log opened Thu Nov 05 00:00:31 2009 |
00:01 | | * simon` needs to get used to thinking in terms of concurrent programming |
00:01 | < simon`> | it seems that there's a lot of conventions I can't adhere to while learning the basics, which frustrates me a little. :) |
00:20 | < gnolam> | A-ha! |
00:20 | < gnolam> | (Shall we say one million American dollars?) |
00:20 | | * gnolam conquers his normals. |
00:28 | < gnolam> | Also: speed increase. |
00:29 | < Derakon[work]> | Ha-HA! Codebase is now under 14k lines. ?.? |
00:30 | < Derakon[work]> | Basically all I've done today is delete dead code. |
00:30 | < Derakon[work]> | Tomorrow, gods willing, I'll be able to make certain that everything still works~ |
00:30 | < Derakon[work]> | Favorite line of code so far: |
00:30 | < Derakon[work]> | D.lp(0) # Luke says hi. |
00:30 | < Derakon[work]> | No, I don't know who Luke is. |
00:32 | < Vornicus> | Those are some relly good variable names. |
00:32 | < Derakon[work]> | Yeah, one of my long-term projects is going to be The Great Renaming. |
00:32 | < Derakon[work]> | Unfortunately, first I have to figure out what each single-letter variable name actually maens. |
00:32 | < Derakon[work]> | Er, means. |
00:35 | | Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has quit [[NS] Quit: Leaving] |
00:40 | < Rhamphoryncus> | bluh I hate handling overflow in C |
00:41 | < Namegduf> | How would one generally do that? |
00:41 | < Namegduf> | I know it's detectable on some processors |
00:41 | < Namegduf> | But I don't know if/how that capacity is made visible to C. |
00:41 | < Rhamphoryncus> | checking for large values before you do your math and capping to some maximum value |
00:41 | < Namegduf> | Ah, ew. |
00:42 | < McMartin> | Elch indeed. |
00:42 | < Rhamphoryncus> | But it basically means doing an inverted operation for that check |
00:42 | < Rhamphoryncus> | so checking if a+b will overflow may be done with if (a >= INT_MAX - b) |
00:43 | < Namegduf> | if (a >= INT_MAX / b) for multiplication. |
00:43 | < Rhamphoryncus> | I'm not doing one operation |
00:43 | < Namegduf> | You're doing many? |
00:43 | < Rhamphoryncus> | I'm doing a floating average. Multiply the old value by 9, add the new value, divide result by 10 |
00:43 | < Rhamphoryncus> | floats aren't an option btw |
00:44 | < Rhamphoryncus> | and for bonus points the new value is a 32bit int (or maybe 64bit, not sure), while I'm storing my output in a 16bit |
00:44 | < McMartin> | Well~ |
00:44 | < McMartin> | If that's the case, checking for overflow is seriously easy~ |
00:44 | < Namegduf> | Yeah. |
00:45 | < McMartin> | Do your math in 64 bits and check the result before truncation. |
00:45 | < McMartin> | Multiplying two 16-bit numbers can't overflow a 32-bit register. |
00:46 | < Rhamphoryncus> | *checks* oh hey, it has a 64bit type |
00:47 | | * Namegduf does something similar in Python |
00:47 | < Namegduf> | Just multiply and let it turn into a long, then truncate manually. |
00:47 | < Namegduf> | And store as a regular integer. |
00:47 | < Namegduf> | Well, check manually. |
00:47 | < Namegduf> | What're you trying to do, implement saturation? |
00:48 | < Rhamphoryncus> | Namegduf: for python it's easy. For C you can't usually just use a larger temporary |
00:48 | < Namegduf> | Yeah, I know. |
00:48 | < Rhamphoryncus> | I'm adding magic timetables to openttd |
00:48 | < Namegduf> | Magic timetables? |
00:49 | < Rhamphoryncus> | full automatic |
00:51 | < McMartin> | Rhamphoryncus: You should be able to declare an accumulator variable as a long and do the operations in it, then check before returning/storing the result. |
00:52 | < ToxicFrog> | Why are floats not an option? |
00:55 | < McMartin> | My guess is, embedded proc, especially if output has to be a short |
00:57 | < Rhamphoryncus> | McMartin: the one input is already an int. I don't want to do two checks if I don't have to. uint64 works fine though |
00:57 | < Rhamphoryncus> | floats aren't deterministic. They cause desyncs for network games |
01:05 | | Derakon[AFK] is now known as Derakon |
01:05 | < Rhamphoryncus> | ahh, fuck you C++. This is debugging output, I don't CARE that that member is private! |
01:07 | | * Rhamphoryncus replaces with the call to .GetFoo(). Clearly better than just .foo :P |
01:15 | < gnolam> | Got Foo? |
01:28 | < Rhamphoryncus> | no, but I do have Food |
01:28 | <@Derakon> | I don't have food any more. Ate it all. :( |
01:29 | < Rhamphoryncus> | aww |
01:30 | <@Derakon> | It was good while it lasted, though. |
01:33 | < ToxicFrog> | ...floats are entirely deterministic. |
01:33 | < ToxicFrog> | I think your objection is that they may not be the same deterministic across architectures. |
01:34 | < ToxicFrog> | (or OSes, if something tends to fuck with the floating point unit YES I AM LOOKING AT YOU DIRECTX) |
01:34 | < McMartin> | (Hell, UQM can fuck with it. SIMD 4tw) |
01:35 | < McMartin> | But yeah, network game desyncs means "not the same deterministic" means "You've got fail!" |
01:35 | < ToxicFrog> | (yes, but isn't UQM doing it deliberately?) |
01:35 | < McMartin> | (Well, only because we had to implement 2D acceleration ourselves.) |
01:36 | < Rhamphoryncus> | ToxicFrog: strictly speaking, the problem is that the input state is not all given by the sourcecode. It is affected greatly by compiler, hardware, and occasionally OS |
01:36 | < McMartin> | (If we had the option to throw a switch we would have, FPU consistency be damned) |
01:38 | < Rhamphoryncus> | If you had a language with explicit float contexts, where you could use a basic x86 context even on other systems, you might argue that's deterministic |
01:39 | < Rhamphoryncus> | Although if you don't limit that to just precision changes, and instead allow all the normal transformations, you'd still get random breakage when other bits of the sourcecode change |
01:39 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
01:55 | < Rhamphoryncus> | Yay got it working. Crudely, but it shows the concept |
02:04 | | MyCatVer1s [mycatverbs@Nightstar-f43ca811.blueyonder.co.uk] has joined #code |
02:51 | | Attilla [The.Attilla@FBC920.0A905B.8E5905.BA3BAF] has quit [Ping timeout: 121 seconds] |
04:08 | | Vornicus is now known as Vornicus-Latens |
04:39 | <@Derakon> | One of my friends posed the question of what the expected damage from this device would be: http://www.mspaintadventures.com/extras/ps000020.html |
04:39 | <@Derakon> | My answer is 9669.75; anyone else? |
05:04 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
05:31 | | AnnoDomini [farkoff@Nightstar-fa0045ff.adsl.tpnet.pl] has joined #code |
05:31 | | Ignis [Unknown@ECA6CF.10AA5D.86E58F.9F6069] has joined #code |
05:34 | | Ignis [Unknown@ECA6CF.10AA5D.86E58F.9F6069] has quit [[NS] Quit: leaving] |
05:51 | < Rhamphoryncus> | Derakon: first step is ambiguous. Is the number of sides variable, the number of bubbles, or both? |
05:52 | <@Derakon> | I'm assuming the number of bubbles, but the dice always start as d6s. |
05:52 | < Rhamphoryncus> | *nod* |
05:52 | < Rhamphoryncus> | maximum value is 7958661109946400884391936... |
05:58 | < Rhamphoryncus> | too lazy to do more |
06:46 | | Derakon is now known as Derakon[AFK] |
08:13 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited] |
09:45 | | You're now known as TheWatcher |
09:50 | | MyCatVer1s [mycatverbs@Nightstar-f43ca811.blueyonder.co.uk] has quit [Operation timed out] |
10:08 | | Reiver [Orthianz@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
10:56 | | Orthia [Orthianz@Nightstar-d5c591a6.xnet.co.nz] has joined #code |
11:11 | | AnnoDomini [farkoff@Nightstar-fa0045ff.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
11:17 | | AnnoDomini [farkoff@Nightstar-0bac1eaf.adsl.tpnet.pl] has joined #code |
12:42 | | Attilla [The.Attilla@FBC920.0A905B.8E5905.BA3BAF] has joined #code |
12:43 | | mode/#code [+o Attilla] by ChanServ |
12:57 | | Attilla [The.Attilla@FBC920.0A905B.8E5905.BA3BAF] has quit [Client closed the connection] |
13:16 | | Orthia [Orthianz@Nightstar-d5c591a6.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
13:42 | | Attilla [The.Attilla@FBC920.0A905B.8E5905.BA3BAF] has joined #code |
13:42 | | mode/#code [+o Attilla] by ChanServ |
14:00 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
14:21 | | Tannil [kelnadraco@842092.2332EB.125732.C63300] has joined #code |
14:23 | < Tannil> | hello all |
14:24 | < gnolam> | Ahoy. |
14:24 | < Tannil> | how are you? |
14:29 | < gnolam> | After having solved the normal generation problem, suddenly not so stressed anymore. |
14:29 | < Tannil> | that is good |
14:30 | < SmithKurosaki> | o.0 |
14:31 | < Tannil> | hello |
14:38 | | Orthia [Orthianz@Nightstar-364aee13.xnet.co.nz] has joined #code |
14:53 | < Tannil> | hello Orthia |
15:55 | | Tannil is now known as kelna |
15:58 | | kelna [kelnadraco@842092.2332EB.125732.C63300] has left #code [] |
16:06 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
16:07 | | Syloqs_AFH is now known as Syloqs-AFH |
16:47 | | Tarinaky [Tarinaky@Nightstar-4ed4c883.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds] |
17:00 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code |
17:06 | | Tarinaky [Tarinaky@Nightstar-a7f88525.adsl.virginmedia.net] has joined #code |
17:39 | < SmithKurosaki> | Yay |
18:04 | | Vornicus-Latens [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
19:21 | | Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has joined #code |
19:21 | | * Derakon[work] determines that the microscope software will not, in fact, Show Them All. |
19:21 | < Derakon[work]> | (sebGui.showAll() is an unused function) |
19:42 | <@TheWatcher> | ... pfft |
20:02 | < Derakon[work]> | Right, the microscope program is a bit under twice the size of Jetblade. I can work with this. |
20:06 | < Derakon[work]> | (Microscope: 13958 lines. Jetblade: 7916 lines) |
20:16 | < gnolam> | sebGui.InTheDarknessBindThem() |
20:29 | | * McMartin powers up one of his machines for the most important task of all: copying over his La Mulana-themed icon set. |
20:50 | | Tarinaky [Tarinaky@Nightstar-a7f88525.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds] |
20:52 | | Tarinaky [Tarinaky@Nightstar-a7f88525.adsl.virginmedia.net] has joined #code |
21:36 | | Tarinaky [Tarinaky@Nightstar-a7f88525.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds] |
21:58 | < AnnoDomini> | I like how they made the delete prompt of shortcuts say that it does not uninstall the program, in WinXP (and presumably onwards). |
22:00 | | Tarinaky [Tarinaky@Nightstar-aa7b13ae.adsl.virginmedia.net] has joined #code |
22:00 | < McMartin> | Win7 doesn't seem to, it just says "Delete Shortcut" |
22:02 | < AnnoDomini> | Even from the quicklaunch bar? |
22:03 | < McMartin> | Oh, haven't tried that. |
22:03 | < McMartin> | I did it off the Desktop |
22:03 | < AnnoDomini> | It says that from the desktop too, here. |
22:04 | < AnnoDomini> | Clearly, they have overestimated the user again. :P |
22:22 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
22:51 | < Derakon[work]> | Vorn! A puzzle for you! |
22:51 | < Derakon[work]> | What is the average expected damage from this device? http://www.mspaintadventures.com/extras/ps000020.html |
23:12 | | * Derakon[work] sighs at the function name "popupApopupMenu" |
23:15 | <@TheWatcher> | Well, it tells you want it does... I guess... I hope... |
23:16 | < Derakon[work]> | It does basically what it says on the tin. |
23:16 | < Derakon[work]> | I'm still trying to figure out why one of the arguments is a function that generates the menu...when said function is invariably constructed immediately before invocation, and is just used immediately inside popupApopupMenu to get the menu object. |
23:31 | | AbuDhabi [farkoff@Nightstar-0bac1eaf.adsl.tpnet.pl] has joined #code |
23:31 | | AnnoDomini [farkoff@Nightstar-0bac1eaf.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
23:43 | | You're now known as TheWatcher[T-2] |
23:46 | < Derakon[work]> | Oh, yes, this random bit of code. |
23:46 | < Derakon[work]> | manu = false # HACK |
23:46 | < Derakon[work]> | if manu: |
23:46 | < Derakon[work]> | log("Manu gone") |
23:46 | < Derakon[work]> | else: |
23:46 | < Derakon[work]> | actual code goes here |
23:50 | < Derakon[work]> | Best guess is that "manu" stands for "manual" and there used to be a manual control option. |
23:51 | | You're now known as TheWatcher[zZzZ] |
23:58 | < Vornicus> | Der: batshittery |
--- Log closed Fri Nov 06 00:00:12 2009 |