code logs -> 2011 -> Thu, 17 Mar 2011< code.20110316.log - code.20110318.log >
--- Log opened Thu Mar 17 00:00:02 2011
00:00 You're now known as TheWatcher[T-2]
00:08 You're now known as TheWatcher[zZzZ]
00:22 Derakon[AFK] is now known as Derakon
00:25
<@ToxicFrog>
API question!
00:26
<@ToxicFrog>
"[size| fmt1 fmt2 ... fmtN]" is the current specifier for bitpacks in vstruct.
00:26
<@ToxicFrog>
size is in *bytes* (consistent with the rest of the formats), formats within it are in *bits*
00:27
<@ToxicFrog>
Does this make sense, or should everything in [] be in bits?
00:27
< gnolam>
Hmm.
00:28
< gnolam>
This is the serialization library, right?
00:31
< gnolam>
In that case, I say it makes sense. I can't see a reason why you'd ever want to serialize in less-than-byte-sized chunks.
00:32
<@ToxicFrog>
Well, you can't anyways, the [] has to be byte aligned
00:33
< gnolam>
Ah.
00:33
< gnolam>
Then it makes even more sense. :)
00:33
<@ToxicFrog>
The question is whether it should be written [2| u4 u4 m3 s5] or [16| u4 u4 m3 s5]
00:34
<@ToxicFrog>
The latter makes it fully consistent internally; the former makes the size consistent with the (non-bitpack) remainder of the format specifier.
00:39
< gnolam>
Ahh, Lysator. Where, when they remind you that it's time to pay your membership fee, they also have to remind you to state your member number in /decimal/ when paying.
00:40 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
00:44
< Alek>
Lysator Liu?
00:49
< gnolam>
Yes.
00:50
< Reiv>
In case you try to be funny with binary?
00:51
< gnolam>
... your member number /is/ normally in binary.
01:19 Attilla_ [Some.Dude@37647E.0E7447.22C7B1.567421] has quit [Ping timeout: 121 seconds]
01:32 kwsn [kwsn@Nightstar-5a8951e9.res.rr.com] has joined #code
01:46
< Reiv>
No, I mean by reporting in 10011010 :p
01:47
< Reiv>
Which could cause minor issues with being Member# ten million, eleven thousand and ten.
02:06 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:08
<@Derakon>
Ahh, always a good sign when you think "Hm, I should move this module into this package", do a search, and discover that the only modules that use the aforementioned module are already in the package.
02:09 cpux is now known as shade_of_cpux
02:19
<@Derakon>
I moved 10 modules and only had to change 2 to reflect the new locations.
02:35 * ToxicFrog sets about fixing all of the ugly name-dynamic intramodule requires in vstruct
03:14 * Derakon eyes the Delaunay triangulator.
03:15
<@Derakon>
Right now it operates on a list of Vector2D instances.
03:15
<@Derakon>
In order for it to know that non-axis-aligned edges need to be removed in parts of the map that have axis-aligned terrain types, it obviously needs access to the terrain data.
03:16
<@Derakon>
The most straightforward way to handle that is to have it operate on a list of GraphNode instances instead; GraphNodes are basically wrappers around Vector2Ds that include terrain data and a set of neighbor GraphNodes.
03:16
<@Derakon>
But that would require finding every operation and access on a vector in the triangulator and changing it to operate on the node's "loc" attribute. ¬.¬
03:17
<@Derakon>
Or I suppose making GraphNodes inherit from Vector2Ds.
03:17
<@Derakon>
That might work.
03:25
<@Derakon>
...except that apparently when I do that, the initializer for Vector2D is getting called instead of the initializer for GraphNode.
03:25
<@Derakon>
Which doesn't work because I use a different set of arguments to initialize GraphNodes.
03:31
<@Derakon>
Anyone know what the special function name is to override the index operation in Python?
03:33
<@Derakon>
Ah, __getitem__.
03:36
< celticminstrel>
Or __getslice__ I think.
03:51
<@Derakon>
Hey hey hey, pruning diagonal edges in axis-aligned areas works just fine! http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen39d.png
04:12 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds]
04:18 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
04:48 Derakon [Derakon@Nightstar-cfae48c3.ca.comcast.net] has quit [Ping timeout: 121 seconds]
04:49 Derakon [Derakon@Nightstar-cfae48c3.ca.comcast.net] has joined #code
04:49 mode/#code [+o Derakon] by Reiver
05:06
<@Derakon>
Hm... http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen40a.png
05:07
<@Derakon>
An unexpected difficulty: I didn't realize that the spanning tree algorithm would quite happily subdivide a single region into chunks like that.
05:07
<@Derakon>
Still, all of the region transition edges should now be in known locations, so progress!
05:07
<@Derakon>
Hell, that even looks like a proper game map with different locations and everything.
05:08
<@Derakon>
Top: Crateria; Left: Brinstar; Right: Maridia; Bottom: Norfair; Middle: Tourian...
05:22 Kindamoody is now known as Kindamoody|away
05:40 Derakon is now known as Derakon[AFK]
05:50 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:52 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
05:54 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:42 Netsplit *.net <-> *.split quits: @Reiver, simon_, Reiv, @PinkFreud, Tarinaky, @Kazriko, @McMartin, @jerith, Alek, Rhamphoryncus, (+3 more, use /NETSPLIT to show all of them)
06:42 DBot [Reiver@5B433A.77CB96.194A93.12F406] has joined #code
06:42 Netsplit over, joins: ~Reiver, @jerith, Tamber, Reiv, @PinkFreud, SmithKurosaki, @McMartin, @Kazriko, Tarinaky, Rhamphoryncus (+3 more)
06:45 DiceBot [Reiver@Nightstar-aec8191b.xnet.co.nz] has quit [Ping timeout: 121 seconds]
06:45 DBot is now known as DiceBot
06:51 kwsn [kwsn@Nightstar-5a8951e9.res.rr.com] has quit [[NS] Quit: plus, WI > MN]
07:00 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited]
07:42 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has quit [[NS] Quit: leaving]
07:42 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has joined #code
07:42 AnnoDomini [annodomini@D553D1.41311B.D7DA6A.1B8E47] has joined #code
07:42 mode/#code [+o AnnoDomini] by Reiver
08:32 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
09:28 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
09:30 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
09:31 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
09:31 mode/#code [+o Attilla] by Reiver
09:41 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds]
09:45 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
10:02 You're now known as TheWatcher
10:03 AnnoDomini [annodomini@D553D1.41311B.D7DA6A.1B8E47] has quit [[NS] Quit: leaving]
10:38 AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code
10:38 mode/#code [+o AnnoDomini] by Reiver
11:28 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
11:45 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
11:46 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
11:51 AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: leaving]
12:29 AnnoDomini [annodomini@D553D1.41311B.D7DA6A.1B8E47] has joined #code
12:29 mode/#code [+o AnnoDomini] by Reiver
12:46 Reivles [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
12:49 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds]
13:29 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
13:29 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
13:29 mode/#code [+o ToxicFrog] by Reiver
15:06 * ToxicFrog closes his first personal bug!
15:10 Reivles [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer]
15:10 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
15:23
<@TheWatcher>
?
15:38
< gnolam>
He got a bug report for his serialization library the other day.
15:41 * gnolam twiddles his thumbs and waits for a requirements specification.
15:50 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
15:51 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer]
15:51 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
15:55
<@ToxicFrog>
That's not the one I closed, though
15:55
<@ToxicFrog>
It prompted me to create a bunch of sub-bugs and it's one of those I just resolved.
15:55 Phox [Tertius_Vulpe@Nightstar-bb8dd90c.abhsia.telus.net] has quit [Ping timeout: 121 seconds]
16:09 * jerith specifies his own damned requirements rewrites this truly horrible monstrosity into something usable.
16:09 * Tamber hands jerith an axe.
16:15
<@jerith>
An axe is the wrong tool.
16:16
< Tamber>
Chainsaw?
16:16
<@jerith>
I'm leaving the monstrosity where it is for now.
16:16
< Tamber>
...nah, not spectacular enough. I have a red button somewhere around here.
16:16
<@jerith>
I'm sculpting a beautiful replacement next to it, which I shall gradually replace it with.
16:16
< Tamber>
:)
16:17
<@jerith>
(Part of the horribleness is weird behaviour. Fixing that would break anything that uses it, which is a Bad Thing.)
16:17
<@froztbyte>
jerith: you mean your beautiful replacement doesn't have a killer spirit to tear down the prior one?
16:18 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
16:18
<@jerith>
froztbyte: Oh, it so very does.
16:18 * Tamber points jerith to the rod-from-god API. Y'know, just in case.
16:18
<@jerith>
But it's going to do it by a sane method of deprecation and starvation.
16:19 Phox [Tertius_Vulpe@Nightstar-bb8dd90c.abhsia.telus.net] has joined #code
16:19
<@froztbyte>
that's a deep pain for the victim, generally
16:19
<@froztbyte>
(and usually rightly so)
16:19
<@jerith>
Tamber: Causing two thirds of our critical systems to vomit all over themselves is kind of a problem.
16:20
< Tamber>
Yes, I suppose it would.
16:20
< gnolam>
Tamber: ... "rod from god"? Eww.
16:20
< Tamber>
:p
16:20 Kindamoody|away [Kindamoody@35E323.4A5F05.9893B9.A684A3] has joined #code
16:20
<@jerith>
froztbyte: I'm replacing the really, really revolting hidden magic with some rather less revolting explicit magic.
16:20
< Tamber>
gnolam, too late! The API has hit 1.0, you can't change it now! >:D
16:21
<@jerith>
Tamber: Of course you can. You slap down a v2.0 next to it and deprecate the old one.
16:22
< Tamber>
hehe
16:24
<@jerith>
My v3 API for a project I no longer work on was released three months ago.
16:24
<@jerith>
It's still getting a single-digit percentage of the call volume.
16:24
< Tamber>
Nice :)
16:25
<@jerith>
But I no longer care, because I no longer work on that project.
16:25
<@jerith>
Tamber: Not very nice. Means all the crap v2/v3 compat stuff can't go away yet.
16:25 Phox [Tertius_Vulpe@Nightstar-bb8dd90c.abhsia.telus.net] has quit [Ping timeout: 121 seconds]
16:26
< Tamber>
jerith, ah, but now it's SEP, isn't it? :p
16:26
<@jerith>
Also means the things still using the v2 API are having to do a bunch of crap that they wouldn't have to do in v3.
16:26
< Tamber>
Ah, fun(!)
16:27
<@jerith>
Tamber: Kind of. I'm still the guy who gets yelled at when weird things happen.
16:27
< Tamber>
Oh dear.
16:28
<@jerith>
Then I get to say "use the v3 API, dolt" and they say "but that's hard, just fix this thing" and then I say "that thing is why we /have/ a v3 API, moron" and then they say "but waaaah, I have a deadline tomorrow" and then I say "well, you shouldn't have waited until now" and then I get shat on by a boss.
16:29
<@jerith>
But usually after I explain it to the boss they get shat on and told to use the damned v3 API.
16:29
< Tamber>
"I have fixed it. That's what v3 is for"
16:29
<@jerith>
But it's an unpleasant process.
16:30 * Tamber offers a hug?
16:30 * jerith hugs.
16:30
< Tamber>
It'll die eventually.
16:30
<@jerith>
Probably not, actually.
16:30
<@froztbyte>
horrid stuff always has a tendency to stick around
16:30
<@jerith>
v2 is good enough for a bunch of stuff that there's no motivation to update.
16:30
<@froztbyte>
look at rancid, for instance
16:31
<@froztbyte>
(and the aptness of that name is merely coincidental, to my knowledge)
16:31
<@jerith>
And I don't have the energy to fight for it.
16:32
<@jerith>
But I've made it as easy as possible to switch, and I plan to not implement the v2 client in my shiny new thing that's replacing the old monstrosity.
16:32
< Tamber>
froztbyte, it'll stick around beyond the heat-death of the universe? That's some terrifying stuff.
16:33
<@froztbyte>
Tamber: a piece of software that combines bad bash, expect perl and sometimes C? yeah, it's pretty damn bad
16:33
< Tamber>
LOL!
16:33
<@froztbyte>
... expect,* perl ...
16:34
< Tamber>
Sounds like it's made almost entirely from duck-tape. o_O
16:34
<@jerith>
Expect is awesome. For a handful of very specific things.
16:34 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.]
16:35
<@froztbyte>
yeah, expect has a very specific purpose and it works fantastically for that
16:35
<@froztbyte>
but that's about it.
16:35
<@froztbyte>
Tamber: some dude (maze.io) started writing a replacement piece of software in python, but when I was looking around the other day I couldn't find the repo online anymore
16:36
<@froztbyte>
and I'm not sure I still have a checkout of it anywhere...
16:36
< Tamber>
Oh dear.
16:43
<@ToxicFrog>
I hate writing test frameworks.
16:45
<@jerith>
ToxicFrog: So do I.
16:45
<@jerith>
In fact, there's only really one programming task I hate more than that, which is working on a codebase that has no automated testing.
16:45
<@ToxicFrog>
Especially since this project is large enough that a framework rather a bunch of ad hoc tests is pretty much necessary, but small enough that it's not worth using an off the shelf one that would be bigger than the project itself and 90% of which I'd never use.
16:48
<@ToxicFrog>
Yeah.
16:48
<@ToxicFrog>
Forcing myself to add tests to this is the single best decision I made in its development.
16:48
<@ToxicFrog>
And sanooj's automated test case generator was and is a godsend.
17:33 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
19:24 SK [smith@Nightstar-7820a96a.dsl.teksavvy.com] has joined #code
19:25 SK [smith@Nightstar-7820a96a.dsl.teksavvy.com] has quit [[NS] Quit: Leaving]
19:40
<@ToxicFrog>
Oh god
19:40
<@ToxicFrog>
I'm having a sudden design crisis about bitpack behaviour
19:40
<@ToxicFrog>
If you have something like:
19:41
<@ToxicFrog>
[2| u5 u5 u5 b1 ]
19:41
<@ToxicFrog>
That is to say, a 2-byte bitpack containing three 5-bit integers and one flag bit
19:41
<@ToxicFrog>
Would you expect that to read it MSB to LSB, or LSB to MSB?
19:41
<@ToxicFrog>
That is to say, would you expect the flag bit to be the MSB or the LSB?
19:46
< gnolam>
LSB.
19:52 Kindamoody|away is now known as Kindamoody
20:03
<@VornicusVashicus>
I agree with gnolam.
20:04
<@VornicusVashicus>
I expect 3 5 7 true to pack as 0001 1001 0100 1111
20:06
< Tamber>
TF: How often do you run into systems that do it the other way around to what you'd expect? ;)
20:07 VornicusVashicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
20:10
<@ToxicFrog>
Tamber: it's not the system that's the question, it's the library
20:10
<@ToxicFrog>
The reason this is even a concern is that while, like gnolam and VV, MSB-to-LSB feels most natural to me, it's very common in specifications to declare bitpacks LSB-to-MSB
20:10 * Tamber nods.
20:12
< Tarinaky>
Point of curiosity... What's a sensible name for a std::pair<int,int> representing a vector quantity?
20:13
< Tarinaky>
Even though you can avoid collisions through namespaces it seems like a bad idea to call it a vector.
20:13
<@McMartin>
Any vector or a specific kind?
20:13
<@McMartin>
"velocity" would work if it's that
20:13
<@McMartin>
Otherwise, "vec" is the best you can hope for, really
20:14
< Tarinaky>
Gutted.
20:14 Vornicus [vorn@1526F6.B8E4F5.2CC834.DE3740] has joined #code
20:14 mode/#code [+o Vornicus] by Reiver
20:15 Vornicus is now known as VornicusVashicus
21:42 Phox [Tertius_Vulpe@Nightstar-ab4cb40f.abhsia.telus.net] has joined #code
22:13
< gnolam>
Heh, now this is some badass documentation.
22:14
< gnolam>
Not just a couple of thousand pages of manual... but also papers explaining the theory, and stuff (I assume) mainly for historical interest.
22:15
< gnolam>
Especially the one from 1947. Signed J. von Neumann and S. Ulam. :)
22:17
<@ToxicFrog>
Sweet.
22:17 * ToxicFrog learns he has no test cases covering negative fixed point number
22:28 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
22:32 shade_of_cpux is now known as cpux
22:46
<@ToxicFrog>
:siren: API DESIGN QUESTION :siren:
22:46
<@ToxicFrog>
I've had a feature request for widechar support in format z (null terminated string).
22:47
<@ToxicFrog>
This is needed because in, say, UTF-16 data, it might show up as 0x0065006500650000, meaning that normal z will interpret it as a zero-length string.
22:47
<@ToxicFrog>
I am currently debating between "z,2" or "z*,2" as the way to express this.
23:14 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
23:14 AnnoDomini [annodomini@D553D1.41311B.D7DA6A.1B8E47] has quit [[NS] Quit: leaving]
23:27 You're now known as TheWatcher[T-2]
23:31 You're now known as TheWatcher[zZzZ]
--- Log closed Fri Mar 18 00:00:03 2011
code logs -> 2011 -> Thu, 17 Mar 2011< code.20110316.log - code.20110318.log >