code logs -> 2009 -> Wed, 01 Jul 2009< code.20090630.log - code.20090702.log >
--- Log opened Wed Jul 01 00:00:26 2009
01:33 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
02:29 Attilla [~The.Attil@92.19.140.ns-11540] has quit [Quit: <Insert Humorous and/or serious exit message here>]
02:41 simontwo [~simon@78.129.201.ns-20882] has quit [Ping Timeout]
02:42 simontwo [~simon@78.129.201.ns-20882] has joined #code
02:46 simontwo [~simon@78.129.201.ns-20882] has quit [Ping Timeout]
02:57 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
02:57 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
02:57 Vornicus is now known as Phas
03:07 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
03:08 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
03:08 simontwo [~simon@78.129.201.ns-20882] has joined #code
03:12 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
03:15 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
03:20 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
03:22 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
03:36 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
03:37 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
03:41 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
03:42 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
03:47 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
03:49 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
04:02 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has quit [Ping Timeout]
04:02 Kazriko [~kaz@Nightstar-26123.gdj-co.client.bresnan.net] has joined #code
04:53 Thaqui [~Thaqui@121.98.166.ns-22683] has joined #code
04:53 mode/#code [+o Thaqui] by ChanServ
05:42 Phas is now known as Vornicus
05:55 Vornicus [Vornicus@Admin.Nightstar.Net] has quit [Quit: ]
06:01 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
06:01 mode/#code [+o Vornicus] by ChanServ
06:02 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer]
06:23 Vornicus is now known as Vornicus-Latens
07:14 Derakon is now known as Derakon[AFK]
07:15 UndeadAnno [AnnoDomini@Nightstar-29191.neoplus.adsl.tpnet.pl] has joined #Code
07:15 mode/#code [+o UndeadAnno] by ChanServ
08:06 Consul_ [~Consul__@Nightstar-13285.dsl.sfldmi.ameritech.net] has joined #code
08:07 Consul [~Consul__@Nightstar-13285.dsl.sfldmi.ameritech.net] has quit [Ping Timeout]
09:25 You're now known as TheWatcher
10:07 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
10:07 mode/#code [+o gnolam] by ChanServ
10:24 Attilla [~The.Attil@92.19.140.ns-11540] has joined #code
10:24 mode/#code [+o Attilla] by ChanServ
10:27 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
10:29 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
10:30 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
11:51 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
11:51 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
12:07 * TheWatcher makes a note to talk with Dera about mercurial when he awakes
12:38 yg[AwAy] [~lauriolag@Nightstar-13691.6-79-r.retail.telecomitalia.it] has joined #code
12:38 yg[AwAy] [~lauriolag@Nightstar-13691.6-79-r.retail.telecomitalia.it] has left #code []
12:39 yg[AwAy] [~lauriolag@Nightstar-13691.6-79-r.retail.telecomitalia.it] has joined #code
12:39 yg[AwAy] [~lauriolag@Nightstar-13691.6-79-r.retail.telecomitalia.it] has left #code []
12:43 Alek [~omegaboot@Nightstar-7110.dsl.emhril.sbcglobal.net] has quit [Quit: ]
12:46 Alek [~omegaboot@Nightstar-7110.dsl.emhril.sbcglobal.net] has joined #code
14:23 UndeadAnno is now known as Heretic
14:54 Consul_ [~Consul__@Nightstar-13285.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
15:40 Vornicus-Latens [~vorn@ServicesOp.Nightstar.Net] has quit [Quit: Leaving]
15:55
<@gnolam>
Finally. I got mic capture working.
15:59
<@gnolam>
Now I just have to figure out why I'm getting tons of noise when I'm touching the probe.
16:05 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
16:06 Syloqs_AFH is now known as Syloqs-AFH
16:26 Consul [~Consul__@Nightstar-13285.dsl.sfldmi.ameritech.net] has joined #code
16:26 mode/#code [+o Consul] by ChanServ
16:43
<@gnolam>
Hmm. Sounds like a ground loop, now that I think about it... but that's odd.
16:47
<@Consul>
Ground loop?
16:49
<@gnolam>
Score! Disconnecting the laptop from mains power solved it.
16:51
<@Consul>
You were getting a ground loop on your laptop?
16:52
<@gnolam>
Apparently.
16:52
<@Consul>
That IS kinda weird.
16:53
<@Consul>
Does your mains power have a proper ground?
16:53
<@gnolam>
Well, it is sort of a Frankenstein setup I've got going here...
16:53
<@gnolam>
Proper ground? In this apartment? Hah! :D
16:54
<@Consul>
Heh
16:54
<@gnolam>
I used to get electric shocks if I touched the computer case and the radiatior at the same time.
16:54
<@Consul>
We don't have proper grounding in our 120-year-old house here, either.
16:55
<@Consul>
I'm setting up my studio in the basement, where fortunately I can run a grounding bar from the cold water pipe.
16:56
<@gnolam>
That would be illegal here. But then again, so is probably most of the construction work that went into this place...
16:58
<@Consul>
It's probably against code here as well.
16:58
<@Consul>
I won't do that unless I actually have to, though.
17:00
<@Consul>
Although in the States, common ground for the house usually ties to the cold water pipe.
17:00
<@gnolam>
Anyway. It works now, and I'll be running on battery power tomorrow anyway.
17:06 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has joined #code
17:08 Derakon[AFK] is now known as Derakno
17:08 Derakno is now known as Derakon
17:16 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
17:16 mode/#code [+o Vornicus] by ChanServ
17:19
<@gnolam>
http://www.lysator.liu.se/~gnolam/temp/weak_beta_crackle.wav <- see, now this is how a radiac meter /should/ sound.
17:20
<@Vornicus>
Yay geiger counters
18:02 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
18:07 crem [moo@Nightstar-28703.adsl.mgts.by] has joined #code
18:13 * Derakon digs through the Jetblade code, looking for places he used 0, 1, or 2 and replacing them with invocations of constants.
18:16
<@Vornicus>
Why are you constantizing itty numbers?
18:16
< Derakon>
Because the 0, 1, and 2 had meanings that were not 0, 1, or 2.
18:16
< Derakon>
0 meant "empty space", 1 meant "uninitialized space", and 2 meant "wall".
18:17
< Derakon>
So I'm replacing them with BLOCK_EMPTY, BLOCK_UNALLOCATED, and BLOCK_WALL, which themselves are 0, 1, and 2.
18:18
<@Vornicus>
aha, that is wise.
18:20 crem [moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
18:21
<@TheWatcher>
... yeah, this was why I could never handle python for too long
18:22
< Derakon>
Whitespace getting to you?
18:22
<@TheWatcher>
Not so much that, the lack of braces
18:23 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Quit: Leaving]
18:24
<@TheWatcher>
Huge cognitive dissonance as I try to persuade my headbones that yes, that function/etc is closed. ¬¬
18:25
< Derakon>
Heh.
18:31 * Derakon gets an error on line 1234 of map.py. ¬.¬
18:42 crem [moo@Nightstar-28703.adsl.mgts.by] has joined #code
18:45 crem [moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
18:45 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
18:49 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
18:50 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has quit [No route to host]
18:50 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
18:50 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
18:53 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
18:53 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
19:00 Thaqui [~Thaqui@121.98.166.ns-22683] has quit [Client exited]
19:04 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
19:31 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
19:31 mode/#code [+o Vornicus] by ChanServ
19:34
< Derakon>
There, that's two to-dos knocked off.
19:35
< Derakon>
And 15 remaining. ¬.¬
20:06 fileExtewd [~rsgmw5@218.28.176.ns-23124] has joined #code
20:07 fileExtewd [~rsgmw5@218.28.176.ns-23124] has left #code []
20:09 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
20:12 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
20:28 * Derakon tries to figure out how to detect concave polygons.
20:28
< Derakon>
Wikipedia says that concave polygons have interior angles greater than 180°.
20:28
< Derakon>
I can use the law of cosines to find interior angles, but they're of course always clamped to [0, 180].
20:29
< Derakon>
I could draw lines from each point in the polygon to each other point and see if their midpoints are in the polygon, but that would require writing a point-is-in-polygon test and is brute-force to boot.
20:31
<@McMartin>
They can, idly; see the chevron logo.
20:31
<@McMartin>
There's an algorithm for this involving odd vs. even numbers of intersections, I think.
20:32
< Derakon>
That would involve rasterizing the polygon, wouldn't it?
20:32
< Derakon>
And I'm not certain what your point is about the chevron logo?
20:34
<@McMartin>
It has an internal angle (top center vertex) greater than 180 degrees.
20:35
< Derakon>
And it's concave.
20:35
<@McMartin>
Yeah, just saying wiki is actually right~
20:36
< Derakon>
Oh, sure.
20:36
< Derakon>
I'm just complaining because the law of cosines only gives angles in the range [0, 180] because it only looks at two edges at a time.
20:36
<@Vornicus>
Der: the correct way is not LoC but to use cross product.
20:36
< Derakon>
...duh!
20:36
< Derakon>
Thanks, Vorn.
20:37
<@Vornicus>
(a - b) x (b - c) should have the same sign all the way around.
20:37
< Derakon>
Right.
20:43
<@Vornicus>
You may in addition wish to enforce a particular winding direction, which can make your life easier in some ways.
20:43
< Derakon>
That should be easy enough to autodetect.
20:44
< Derakon>
But, uh, I'm getting bogus results here...
20:44
< Derakon>
Given sequential points p1, p2, and p3 in a polygon (with p2 between p1 and p3)...
20:44
< Derakon>
a = (p2[0] - p1[0], p2[1] - p1[1])
20:44
< Derakon>
b = (p3[0] - p2[0], p3[1] - p2[1])
20:44
< Derakon>
angleDirection = cmp(a[0] * b[1] + a[1] * b[0], 0)
20:45
< Derakon>
That's getting incorrect values.
20:45
< Derakon>
DEBUG: Angle formed by (14, 64) (14, 14) (64, 14) is in 1 direction from (0, -50
20:45
< Derakon>
) (-50, 0)
20:45
< Derakon>
DEBUG: Angle formed by (14, 14) (64, 14) (64, 64) is in -1 direction from (50, 0
20:45
< Derakon>
) (0, -50)
20:46
<@Vornicus>
Isn't it a.x * b.y - a.y * b.x
20:46
< Derakon>
...thank you.
20:46
< Derakon>
Right, that got it.
20:47
< Derakon>
Correctly identified the bogus concave polygon I made.
20:49
< Derakon>
Another to-do down.
20:51 Myst [~Myst@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
20:51 mode/#code [+o Myst] by ChanServ
20:51
<@Myst>
McMartin!
20:51
< Derakon>
Is, I believe, in a meeting.
20:51
<@Myst>
Cartesian Product got it, thank ye very much!
21:07 * Vornicus wonders what the cartesian product was for.
21:07 * McMartin returns from meatings
21:07
<@McMartin>
Hooray for them working!
21:14
<@Myst>
Vorn: http://southernmyst.livejournal.com/152411.html
21:15 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
21:18
<@Vornicus>
ah. yes, cartesian product.
21:19
<@McMartin>
I don't actually know how you do those in Mathematica though.
21:19
<@Myst>
CartesianProduct[l1,l2] but you have to load the Combinatorica package first
21:19
<@Myst>
<< Combinatorica`
21:20
<@Myst>
At least that's how it works in my copy of 6 ;-)
21:21 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Quit: Leaving]
21:22 * TheWatcher bleghs at this code
21:24
<@TheWatcher>
Feels weird having the function documentation in the header, not in the source file.
21:25
<@McMartin>
Heh
21:25
<@McMartin>
"You just can't handle my wild stylings!"
21:26
<@TheWatcher>
Hey, McM? Do you know if cstdio's snprintf() can have a std::string as its buffer argument?
21:29
<@gnolam>
No. c_str() is const.
21:30
<@McMartin>
gnolam calls it.
21:30
<@McMartin>
consider using a stringstream, though I forget the precise class offhand.
21:30
<@TheWatcher>
I have considered it.
21:30
<@McMartin>
c_str is *not* the backing store; std::string does not guarantee its contents are in continguous RAM.
21:33
<@TheWatcher>
Yeah, which is worrying me somewhat from an efficiency point of view, but hey
21:34
<@McMartin>
Depends on what's being made efficient.
21:34
<@McMartin>
It makes creation from substrings more efficient, not to mention prepending if it's a deque of char.
21:35
<@TheWatcher>
I need to be able to do string comparison quickly
21:37
<@TheWatcher>
My suspicion is that string is going to be rather less suitable for this than old fashioned blocks of char, but I'm trying to give it a chance.
21:39
<@McMartin>
string is acceptable for this and has so many other advantages it's almost certainly worth it
21:39
<@McMartin>
Just remember to past const references in most cases.
21:40 * Derakon is reminded of a signature on the GameDev.net forums: "As a general rule, if you post in For Beginners and your code contains the word 'char', you have a bug. std::string roxors teh big one one one one."
22:11 * gnolam blarghs at the Radiation Safety Authority.
22:14 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
22:14 mode/#code [+o Vornicus] by ChanServ
22:14
<@gnolam>
They don't quite seem to get the limitations of implementing all of this in a commercial computer game. :P
22:32 * TheWatcher constructs a test class to try all this stuff out using exclusively string, ostringstream and iomanip stuff, knows it'll work now at least
22:49 MyCatVerbs [~mycatverb@Nightstar-13709.lurkingfox.co.uk] has quit [Ping Timeout]
22:58 Heretic [AnnoDomini@Nightstar-29191.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
23:05 UndeadAnno [AnnoDomini@Nightstar-29648.neoplus.adsl.tpnet.pl] has joined #Code
23:05 mode/#code [+o UndeadAnno] by ChanServ
23:17 MyCatVerbs [~mycatverb@Nightstar-13709.lurkingfox.co.uk] has joined #code
23:17 mode/#code [+o MyCatVerbs] by ChanServ
23:26 * TheWatcher ponders 'Resource * const res'
23:27
<@TheWatcher>
They really could have come up with a nicer syntax for that, seriously
23:27
<@McMartin>
One of C++'s design goals was a few keywords as possible. >_<
23:28
<@Vornicus>
fewer keywords is in general good! However there is a limit.
23:29
<@McMartin>
Part of this is "every time we add a new reserved word, millions of lines of C code can no longer be combined directly into C++ code"
23:30
<@McMartin>
C++ is finally starting to be independent enough that maybe can make this go away
23:34
<@Vornicus>
Python has 33 reserved words; SQL has something like 700.
23:35 * UndeadAnno mumbles some more about when Power Designer let him use keywords for naming tables and attributes... it wrapped them in quotes and called it a day.
23:36
<@UndeadAnno>
I was not happy when I discovered this, as my Java persistence code - which ignored the quotes - did not work.
23:46 You're now known as TheWatcher[T-2]
23:48 You're now known as TheWatcher[zZzZ]
23:56 UndeadAnno [AnnoDomini@Nightstar-29648.neoplus.adsl.tpnet.pl] has quit [Quit: No fighting in the War Room!]
23:58 Consul [~Consul__@Nightstar-13285.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
--- Log closed Thu Jul 02 00:00:41 2009
code logs -> 2009 -> Wed, 01 Jul 2009< code.20090630.log - code.20090702.log >