code logs -> 2010 -> Fri, 05 Nov 2010< code.20101104.log - code.20101106.log >
--- Log opened Fri Nov 05 00:00:30 2010
00:23 Attilla [Some.Dude@Nightstar-e8d1c737.threembb.co.uk] has quit [[NS] Quit: ]
00:32 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
00:52 You're now known as TheWatcher[T-2]
00:57 You're now known as TheWatcher[zZzZ]
01:06 Derakon[AFK] is now known as Derakon
01:27 kwsn [kwsn@Nightstar-1def9d24.dyn.centurytel.net] has joined #code
01:36 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
01:39 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
02:25 celmin [celticminstre@45386A.F5259F.ED4918.A80E46] has joined #code
02:33 Anno[Laptop] [annodomini@Nightstar-c628f571.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
03:50 cpux is now known as cpux[KOd]
04:18 celmin [celticminstre@45386A.F5259F.ED4918.A80E46] has quit [[NS] Quit: Clamming up!]
04:38 kwsn [kwsn@Nightstar-1def9d24.dyn.centurytel.net] has quit [[NS] Quit: BEEP BEEP IMMA JEEP]
05:51 Derakon is now known as Derakon[AFK]
07:16 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:39 McMartin_ [mcmartin@Nightstar-f8dd28a0.pltn13.sbcglobal.net] has joined #code
07:42 McMartin [mcmartin@Nightstar-4268be89.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds]
08:01 McMartin_ is now known as McMartin
08:27 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
08:28 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
08:28 mode/#code [+o ToxicFrog] by Reiver
08:53 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
08:55 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
08:56 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
09:10 You're now known as TheWatcher
09:12 Vornicus is now known as Vornicus-Latens
09:21 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
10:36 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Life isn't easy in Germany.]
10:58 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
11:07 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
11:26 cpux[KOd] is now known as cpux
11:27 cpux is now known as shade_of_cpux
11:37 celmin [celticminst@45386A.F5259F.ED4918.A80E46] has joined #code
11:37 celmin [celticminst@45386A.F5259F.ED4918.A80E46] has quit [[NS] Quit: Clamming up!]
13:59 Anno[Laptop] [annodomini@Nightstar-1d2479c0.adsl.tpnet.pl] has joined #code
16:34 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
17:06 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
17:43
<@ToxicFrog>
Ok. Time to seriously tackle the model/view separation stuff.
17:44
<@ToxicFrog>
View-wise, each object has two methods, render(ctx) and draw(ctx)
17:44
<@Vornicus-Latens>
What's the difference?
17:45
<@ToxicFrog>
draw is meant to draw the item in the given context, assuming the upper left is at (0,0) and no scaling is done.
17:45
<@ToxicFrog>
render() is the actual event handler; by default is calls draw, then calls render on all children in Z-order.
17:45
<@ToxicFrog>
render, typically, doesn't actually need to know anything about the frontend; only draw does.
17:46
<@ToxicFrog>
So it looks simple to have mixins for versions of draw that draw pixmaps, or geometric shapes, or what have you.
17:46
<@ToxicFrog>
However!
17:47
<@ToxicFrog>
In some cases, render needs to be adjusted. For example, if the item is a pickupable, it needs to be able to draw a border around the item and draw the item and all of its children as transparent - typically by modifying the context before it's passed to draw or the children, and restoring it afterwards.
17:47
<@ToxicFrog>
And I'm having trouble figuring out how this should work.
18:04
<@ToxicFrog>
Oh dear.
18:04
<@ToxicFrog>
We finally figured out why one of my students was having such problems.
18:04
<@Vornicus-Latens>
...he's actually a first-year?
18:04
<@Namegduf>
The other TAs suck?
18:04
<@ToxicFrog>
He's been developing and testing on linux. Ok, I did the same when I took this course. As long as the final version runs on windows this is not a problem.
18:04
<@ToxicFrog>
But he's comparing against results generated on windows.
18:05
<@ToxicFrog>
The program uses rand() to generate the initial board.
18:05 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
18:05 mode/#code [+o Derakon] by Reiver
18:05
<@Namegduf>
If rand() behaving differently breaks it, his problem is not his platform, but his use of a system rand()
18:05
<@Derakon>
Well, the presentation seems to have gone decently.
18:05
<@Derakon>
The main concerns were memory allocation and Python's tendency for new versions of the language to not be backwards-compatible with old ones.
18:05 * Namegduf once had to replicate FreeBSD rand() in Python for that reason at university
18:06
<@Namegduf>
In my first year.
18:07
<@Vornicus-Latens>
I suspect the answer may be "I'm trying to get the same results off of the same seed and it's Not Fucking Working"?
18:09
<@ToxicFrog>
Vornicus-Latens: exactly.
18:10
<@ToxicFrog>
Namegduf: the way it works is, you give the program some board parameters and a seed and it populates the board using that seed and using rand in a very clearly defined way.
18:10
<@Namegduf>
Does Windows define the algorithm used for rand() is consistent between versions and entirely based on the seed, then?
18:11
<@Namegduf>
I wasn't aware that most implementations defined any more than "a given copy of a given implementation, unless changed, will give the same values for the same seed"
18:12
<@ToxicFrog>
They're all sharing a single windows machine
18:12
<@ToxicFrog>
It doesn't need to be consistent across versions, it just needs to be consistent across runs on the same machine with the same seed, and that is guaranteed.
18:13
<@Namegduf>
Okay. So it was fine it was producing different results, it just needed to be consistent in results on a given machine with the other programs.
18:15
<@ToxicFrog>
Yeah.
18:15
<@ToxicFrog>
The problem he's seeing is that he runs the program, then compares the results with the reference implementation - but the boards after 40 iterations look completely different.
18:30
<@ToxicFrog>
Initially he thought his simulator was wrong, but then dumped the initially generated boards and sees that they're different
18:30
<@ToxicFrog>
So the seeding code must be wrong! Look it over, looks fine...
18:30
<@ToxicFrog>
Then I realize he's running it from a bash terminal.
18:31
<@ToxicFrog>
Some time ago, linux libc made rand() an alias for random(), which while not cryptographically secure is still much better than rand().
18:32
<@ToxicFrog>
Windows kept the old, broken rand() implementation.
18:32
<@ToxicFrog>
ANYWAYS model/view separation.
18:58
<@Derakon>
Man, funny how a 75-minute presentation can eat up an entire morning.
18:58
<@Derakon>
Also now my throat's a bit hoarse.
19:08
<@TheWatcher>
How'd it go?
19:09
<@Derakon>
Decently, I think.
19:09
<@Derakon>
The main concerns were dealing with memory allocation (e.g. "I want to load 200KB worth of this 10GB datafile without blowing my stack") and backwards compatibility in the language itself.
19:10
<@Derakon>
There was a lot of back-and-forth, though, so I know the audience was engaged!
19:15
<@TheWatcher>
Excellent, congrats
19:28 AgentIchiro [Smith@Nightstar-8ff23d84.dsl.teksavvy.com] has joined #code
19:28 SmithKurosaki [Smith@Nightstar-8ff23d84.dsl.teksavvy.com] has quit [Client closed the connection]
19:29 AgentIchiro is now known as SmithKurosaki
19:33
< McMartin>
"without blowing my stack"
19:33
< McMartin>
Har
20:07 * Derakon mutters at X11 for insisting on putting newly-created windows on top of the entire window stack instead of inserting them right above its own top window (thus, windows created when X11 has no focus are nonetheless put on top of whatever you're looking at).
20:16 SmithKurosaki [Smith@Nightstar-8ff23d84.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds]
20:25
<@Derakon>
"One [Xserve server] even went airborne and fell about 3 meters and other than some of the metal getting bent its perfectly fine." "What do you do in your datacenter that would result in a server becoming airborne?" "Oh, and you've never had a server crash?"
20:31
< PinkFreud>
...
20:31
< PinkFreud>
I would *love* to do that to an XServe.
20:50 * Tarinaky pokes the channel.
21:02 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
21:20 Stalker [Z@5E691D.FC7C16.F8708C.49C557] has joined #code
21:32 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
21:36 Stalker [Z@5E691D.FC7C16.F8708C.49C557] has quit [Ping timeout: 121 seconds]
21:43 SmithKurosaki [Smith@Nightstar-8ff23d84.dsl.teksavvy.com] has joined #code
21:53 Vornicus-Latens is now known as Vornicus
21:58 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:52 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving]
23:40 shade_of_cpux is now known as cpux
--- Log closed Sat Nov 06 00:00:31 2010
code logs -> 2010 -> Fri, 05 Nov 2010< code.20101104.log - code.20101106.log >