code logs -> 2010 -> Thu, 16 Dec 2010< code.20101215.log - code.20101217.log >
--- Log opened Thu Dec 16 00:00:02 2010
00:01 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
00:02 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
00:16 You're now known as TheWatcher[T-2]
00:18 You're now known as TheWatcher[zZzZ]
00:28 Attilla [Some.Dude@Nightstar-4b569e0c.threembb.co.uk] has quit [[NS] Quit: ]
00:34 AnnoDomini [annodomini@Nightstar-8646a406.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:43 Kimo[break] is now known as Kimo[workhome]
00:50 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
01:39 Vornicus-Latens is now known as Vornicus
02:03 Kimo[workhome] is now known as Kindamoody
02:09 shade_of_cpux is now known as cpux
02:45 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
03:24 EvilDarkLord [jjlehto3@Nightstar-f1ccbb45.hut.fi] has quit [Ping timeout: 121 seconds]
03:24 EvilDarkLord [jjlehto3@Nightstar-f1ccbb45.hut.fi] has joined #code
04:04 Chi is now known as Alek
04:15 Kindamoody is now known as Kindamoody[zZz]
04:43 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
04:45 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
05:53 Janus [nsJChat@Nightstar-283cd59d.clmboh.sbcglobal.net] has joined #code
05:55 * Janus consults watch. ... manditory lurking ends in 3... 2... ...
05:56 * Vornicus gives Janus a cheese.
05:56 * Janus cheeses it
05:59
< Janus>
I'm wondering! If I use nothing but integers, can I count on a physics simulation, where the starting conditions are all the same, to end the same way on any computer ever? Because that would be nice. *nods*
05:59
<@Vornicus>
Assuming no race conditions, and you use the same-sized integers all the time, yes.
06:02
< Janus>
Hazzah! Okay! Then another thingy! And I'm sure this will make me sound stupid. Is there an Integer Sin function?
06:02
< Janus>
That could theoretically exist anyway
06:05
<@Vornicus>
Theoretically, yes; it'd be int(round(sin(x * 2 * M_PI / ANGLE_RESOLUTION ) * SINE_RESOLUTION)), where a_r and s_r are the scale of the inputs and the scale of the outputs respectively. However, you probably don't need to use sine and cosine; angle can be abstracted out via vectors.
06:05 kwsn [kwsn@Nightstar-467dc0c1.dyn.centurytel.net] has joined #code
06:07 * Janus discretely writes down this startling and possibly illegal equation.
06:08 cpux is now known as shade_of_cpux
06:08
< Janus>
Mmm! I was hoping so, but I'm at a lost for how to rotate a vector around it's origin without falling to floating point. And floating point is terrible.
06:09
<@Vornicus>
With a matrix. ...only problem with matrices is that you're pretty much doomed to floats in there.
06:09
<@Vornicus>
Well.
06:09
<@Vornicus>
You can use fixed point stuff.
06:09
<@Vornicus>
Which is actually sort of what I'd want to do ANYWAY
06:11
< Janus>
Fixed Point... *consults wikipedia holy moly that looks complicated*
06:12
<@Vornicus>
Essentially every number comes out with a fixed number of decimal places.
06:13
<@Vornicus>
But instead of letting the computer do the work, you keep track of decimal places yourself, and adjust your various operating routines accordingly.
06:13
<@ToxicFrog>
Oi. Floating point is not terrible, you just need to be aware of the pitfalls.
06:13
< Janus>
Oh, so it's like an integer, but with like... a decimal part and an integer part maybe?
06:14
<@Vornicus>
Yeah, just like floating point really except you've decided ahead of time how much you have after the decimal.
06:14
<@ToxicFrog>
Well, that and you're storing it integer+fraction rather than exponent+mantissa
06:15
< Janus>
Hm! ... actually... is it true different FPUs in computers do floating point calculations slightly differently?
06:15
< Janus>
Between one computer to another
06:17
<@Vornicus>
All of them implement ieee 754; ieee 754 gives practically 0 tolerance to rounding errors in all except the most esoteric and complex of calculations. Some computers use slightly different settings for how to round, but no desktop computer made by a major manufacturer in the last 5 years would do this.
06:17
<@ToxicFrog>
In principle, this is true.
06:18
<@ToxicFrog>
In practice, it's a compiler|processor crapshoot whether you end up using SSE (32 or 64 bit) or x87 FPU (32 or 64 bit with 80 bit intermediate values) for your floating point calculations.
06:18
<@ToxicFrog>
And that will affect the results when working with numbers that are not exactly representable, ie, most of them.
06:19
<@Vornicus>
In addition, if you're /really picky/ you can tell the computer that your program wants things to be rounded in a particular way.
06:20
< Janus>
Aww... But there's no way to garenttee it use only one method of rounding I take it?
06:20
<@Vornicus>
That's what the Really Picky is for.
06:21
<@ToxicFrog>
Yeah. In general you can assure consistency easily by limiting yourself to a single architecture, or with more difficulty by being very careful and pedantic across multiple architectures.
06:23
<@Vornicus>
If you're that picky you should probably use something like fdlibm.
06:23
< Janus>
I wonder if rolling/finding a fixed point thing would be easier or harder than that
06:23
< Janus>
fdlibm?
06:24
<@Vornicus>
"Freely Redistributable Math Library"
06:24
<@Vornicus>
Lower performance, higher strictness, than your standard math library.
06:25
< Janus>
(Normally I don't mind floating point honest! It's just I've never done network programing. Stuff like lag and de-syncing are terrifying concepts. Fixed point might let ignore both those things hopefully though)
06:27
< Janus>
*googles around for one of those things then!*
06:27
<@Vornicus>
Network programming: The server is God.
06:27
<@Vornicus>
If your client code is doing anything where floating point inaccuracy becomes a problem /between state packets/, there's something seriously, ridiculously wrong.
06:28
< Janus>
Aye! The only reason I'm having the client perform the simulation at the same time, is so the server only has to send the final position of the ball (for a... um, golf thing) to the client
06:29
< Janus>
... actually
06:29
< Janus>
Do you think, if the floating point, even if it rounds off, will result in that big a difference?
06:30
<@Vornicus>
You might be off by 0.001%.
06:31
< Janus>
... aha. I'll have to try it using just regular floats. If desyncing becomes a problem, then it'll be time to dunk into this pool of snakes
06:32
<@Vornicus>
The server is God. The server should be telling the client where the ball goes, and the client should never have to guess more than a second or two apart.
06:34
< Janus>
Maybe if I make the server do it's calculation first, intentionally stalling the client until it gets time to get the next several states of the ball... then it can send them to the client without there being any sign of lag during
06:35
< Janus>
And that'd take care of the desyncing thing too! Aha, no way a float would go crazy with only a second or two between when it's set straight
06:36
<@ToxicFrog>
Depends on what calculations you're doing~
06:36
<@ToxicFrog>
But, seriously, this is golf
06:36
<@Vornicus>
The server should send out calculation updates as often as possible, and as early as possible. The moment you can guarantee what's happening you should be sending stuff off to the client to tell it where stuff will be at that point, unless there's wallhack cheats involved.
06:36
<@Vornicus>
(with timestamps so the client can use interpolation liberally)
06:37
<@ToxicFrog>
You can probably get away with sending "the ball lands here", letting the client do all of the path calculations itself, and then adjusting the ball after it lands by the hundredth of a millimeter necessary.
06:39
<@Vornicus>
More sensible than "ball lands here" would be "ball hits here, bounces to here, then rolls to a stop there", really.
06:39
<@ToxicFrog>
Mmm, point
06:39
< Janus>
That would work too actually. Thinking about it, the only point at which floating point stuff is happening, is when it hits the ground, which needs it's slope calculated from a bitmap thing
06:40
<@Vornicus>
You don't need trig functions if you have slope -- you can pretend your slope is a vector and do your horrible math from there!
06:40
<@ToxicFrog>
The point here is that the server is the final authority on what happens, and the floating point differences between the server and client - if any - are not going to be nearly significant enough for the player to notice before it resyncs.
06:41
<@Vornicus>
The real errors you'll get are "The client is missing information that the server is currently using to recalculate the world"
06:47
< Janus>
Hm! If the server runs 2 or so seconds ahead, it can send information to the client everytime the ball hits/touches the ground. With it's time, position, and velocity. And maybe even record total positional corrections that had to take place over a time. So the server knows how long of a leash it needs to keep on a client. And if it's short, increase the lag at the very start of a shot so it gets as many states for it as possible
06:48
< Janus>
Or something
06:52
< Janus>
Aha, if I go that route, I can use floats for anything!
06:53
< Janus>
Um..! Though the rounding stuff is different, if I send a byte for byte copy of a float to a different computer, it's the same number to it, right?
07:01
<@Vornicus>
Once you've passed it through an endianness fixer, yes. Which you should be doing; network byte order is guaranteed, processor byte order is not.
07:04
< Janus>
Hm, doing that looks easy enough. I wonder if there's any way of telling if it's needed though
07:05
< Janus>
Maybe like... sending a long int in both formats. And having the client check to see which one matches
07:07
< Janus>
Or rather, having the client send a predetermined number, like 1 or something, to the server. So the server knows how to send data to it, if, say, it sees the number as 0xEFFF etc
07:07
< Janus>
*wait, it'd see it as 0x0100, duh
07:10
<@Vornicus>
Yeah, no, that won't happen if you've corrected for endianness.
07:21
< Janus>
It's pretty late... thank you for all the help! I need to visit more often when I'm not being code stupid. xD Seeya guys!
07:21 Janus [nsJChat@Nightstar-283cd59d.clmboh.sbcglobal.net] has quit [[NS] Quit: </codestupid>]
07:53 Anno[Laptop] [annodomini@Nightstar-ce031cc9.adsl.tpnet.pl] has joined #code
08:20 shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [Connection closed]
08:53 Vornicus is now known as Vornicus-Latens
09:33 You're now known as TheWatcher
09:50 Kindamoody[zZz] is now known as Kindamoody
10:02 Anno[Laptop] [annodomini@Nightstar-ce031cc9.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
10:22 Stalker [Stalker@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
10:28 Stalker [Stalker@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
10:41 kwsn is now known as kwsn\t-2
10:45 kwsn\t-2 [kwsn@Nightstar-467dc0c1.dyn.centurytel.net] has quit [[NS] Quit: blargh-o-matic]
10:48 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code
11:13 Stalker [Stalker@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
11:20 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
11:28 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
11:29 Syloqs_AFH is now known as Syloqs-AFH
12:16 Stalker [Stalker@26ECB6.A4B64C.298B52.D80DA0] has joined #code
12:22 Kindamoody is now known as Kindamoody[work]
12:39 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
13:12 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: Away.]
13:19 Lurker [Lurker@AF512E.3901B6.3A00DE.3A45DE] has joined #code
13:20 Lurker [Lurker@AF512E.3901B6.3A00DE.3A45DE] has left #code []
13:59 Anno[Laptop] [annodomini@Nightstar-ce031cc9.adsl.tpnet.pl] has joined #code
15:00 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
15:20 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
16:10
< Alek>
yo
16:11
< Alek>
d'you guys know any way to have 2 keyboards connected but have one of them use a different language/key layout than the other?
16:14 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
16:42 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code
16:48
< Tarinaky>
Alek: OS?
17:07
< Alek>
Win 7
17:19
< Tarinaky>
No idea then.
17:25
< Alek>
41. "I think Microsoft named .Net so it wouldn't show up in a Unix directory listing."
17:25
< Alek>
- Oktal
17:27
< Alek>
30. "Python's a drop-in replacement for BASIC in the sense that Optimus Prime is a drop-in replacement for a truck."
17:27
< Alek>
- Cory Dodt
17:29
< Alek>
12. "Measuring programming progress by lines of code is like measuring aircraft building progress by weight."
17:29
< Alek>
- Bill Gates
17:48 Stalker [Stalker@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
18:12
< gnolam>
Alek: isn't that built into "Region and Language"->"Keyboards and Languages"?
19:18 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
19:42 Vornicus-Latens is now known as Vornicus
20:33 Kindamoody[work] is now known as Kindamoody
20:45 Stalker [Stalker@26ECB6.A4B64C.298B52.D80DA0] has joined #code
21:49 froztbyte [froztbyte@Nightstar-dc394964.za.net] has quit [Operation timed out]
21:50 Anno[Laptop] [annodomini@Nightstar-ce031cc9.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
21:53 froztbyte [froztbyte@Nightstar-dc394964.za.net] has joined #code
22:10 Derakon [chriswei@Nightstar-cfae48c3.ca.comcast.net] has joined #code
22:10 mode/#code [+o Derakon] by Reiver
22:10 * Derakon takes a hacksaw to the mosaic subsystem to turn it into a minimal standalone app.
22:22
<@Derakon>
Fortunately, the problems I was having still reproduce in this version.
22:22
<@Derakon>
Unfortunately, I still have no idea how to fix them.
22:23
<@Derakon>
Also unfortunately, the "minimal" app is still 538 lines of Python.
22:40 Anno[Laptop] [annodomini@Nightstar-ce031cc9.adsl.tpnet.pl] has joined #code
23:23 * Derakon posts his difficulties here: http://sourceforge.net/mailarchive/message.php?msg_id=26768908
23:24
<@Derakon>
If anyone wants to take a look, the standalone app is linked there.
23:53 shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
23:53 shade_of_cpux is now known as cpux
23:54 Derakon [chriswei@Nightstar-cfae48c3.ca.comcast.net] has quit [[NS] Quit: leaving]
--- Log closed Fri Dec 17 00:00:03 2010
code logs -> 2010 -> Thu, 16 Dec 2010< code.20101215.log - code.20101217.log >