code logs -> 2011 -> Sat, 19 Mar 2011< code.20110318.log - code.20110320.log >
--- Log opened Sat Mar 19 00:00:04 2011
00:18
<@McMartin>
http://dfan.org/blog/2011/03/17/one-more-ultima-underworld-story/
00:24
< gnolam>
That's commitment!
00:38 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
00:48 You're now known as TheWatcher[T-2]
00:53 You're now known as TheWatcher[zZzZ]
01:01 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
01:04 SchoolPhox [NSwebIRC@FD3571.2233F7.69D3C5.3FAC0C] has joined #code
01:06
< SchoolPhox>
Well, I think I may have a tough one
01:07
< SchoolPhox>
Let's suppose I have struct FOO {double a; double b; double c;};
01:07
< SchoolPhox>
So, I make struct FOO bar[100];
01:08
< SchoolPhox>
If I want to pass just array 1 by reference, how could I do this?
01:08
< SchoolPhox>
About to upload my code to pastebin
01:11
<@ToxicFrog>
Your question is underspecified. Is this plain C, or C++? If the latter, do you mean by reference or by pointer?
01:12
< SchoolPhox>
C
01:12
<@ToxicFrog>
Same as anything else, then
01:12
<@ToxicFrog>
&bar[1]
01:12
< SchoolPhox>
http://pastebin.com/ETdTb0hf
01:13
< SchoolPhox>
'Kay, I've got that.
01:13
< SchoolPhox>
What I'm running into is problems at compile. I think my function prototype is wrong
01:13
< SchoolPhox>
I should have struct*, right?
01:15
<@ToxicFrog>
struct FOO *.
01:15
<@ToxicFrog>
(bar) has type (struct
01:15
<@ToxicFrog>
(bar) has type (struct FOO[100])
01:15
<@ToxicFrog>
(bar[1]) has type (struct FOO)
01:15
<@ToxicFrog>
(&bar[1]) has type (struct FOO *)
01:16
<@ToxicFrog>
Also, by convention, ALLCAPS is reserved for macros; consider naming your struct type Foo (and possibly using a typedef so that you can call it 'Foo' rather than 'struct Foo'), not FOO.
01:18
< SchoolPhox>
Okay. Still running into errors trying to compile, though. struct Foo * is causing the compiler to expect a pointer to incomplete struct Foo, while &bar[1] is a pointer to struct Foo.
01:18
< SchoolPhox>
Not sure I understand what it means by incomplete.
01:19
<@ToxicFrog>
Pastebin the revised code and exact error.
01:24 DesktopPhox [NSwebIRC@FD3571.2233F7.69D3C5.D06239] has joined #code
01:25
<@ToxicFrog>
<SchoolPhox> Not sure I understand what it means by incomplete.
01:25
<@ToxicFrog>
<ToxicFrog> Pastebin the revised code and exact error.
01:25
< DesktopPhox>
http://pastebin.com/XzsnfzjG
01:25
< SchoolPhox>
Yeah, just logging the desktop in, rather than messing up my copy-pasta
01:25
<@ToxicFrog>
"incomplete type" typically means you've implicitly declared 'struct T' but have not actually defined what a struct T contais.
01:26
<@ToxicFrog>
void update_instruments(struct config_data *); //definitions.h line 11
01:26
<@ToxicFrog>
This declaration occurs before your struct definition, doesn't it?
01:26
< SchoolPhox>
Ah
01:26
< SchoolPhox>
Yeah
01:26
< SchoolPhox>
Shoot
01:27
<@McMartin>
That's a pointer. That should be fine
01:27
<@McMartin>
You can use opaque types there
01:27 * SchoolPhox rearranges his .h file
01:27
<@ToxicFrog>
McMartin: in that case I have no idea what's going on, unless for some reason it isn't matching up the definition of struct config_data to the original declaration.
01:28
<@McMartin>
I guess we'll see
01:28
<@McMartin>
If it's not even forward declared that might still be wrong
01:28
< SchoolPhox>
No, moving the struct declaration higher seems to have fixed it
01:28
<@McMartin>
Was that declaration the first mention of it?
01:29
<@McMartin>
Forward decls (what I was describing) still need something like
01:29
<@McMartin>
struct config_data;
01:29
<@McMartin>
first
01:29
<@McMartin>
And then you can define variables of type struct config_data * (which are basically equivalent to void * at that point), but you can't define something of type struct config_data
01:30
< SchoolPhox>
Hmm. So, I can declare the struct, then populate it with data types later?
01:41
< SchoolPhox>
Man, this is getting confusing, now. So, I've got the function GetCtrlVal, in update_instruments. It returns a value by reference. Would I then have to dereference my struct *, and just use foo.bar?
01:42
< SchoolPhox>
It's line 48, on the last link
01:48
<@ToxicFrog>
...as in, it returns a pointer to a struct, and you want to know how to get at its contents?
01:48
<@ToxicFrog>
foo->bar is a shortcut for (*foo).bar and is preferred.
01:49
<@McMartin>
Make sure you aren't returning a pointer to a stack-allocated variable
01:50
<@McMartin>
That said
01:50
<@McMartin>
Line 48 looks very off
01:50
< SchoolPhox>
It likely is very off.
01:51
<@McMartin>
Is the idea that GetCtrlVal will write into the value pointed to by its third argument?
01:51
< SchoolPhox>
Yeah.
01:51
<@McMartin>
If so, I think what you actually want is, frex, &(config_x->vcc)
01:52
< SchoolPhox>
That worked perfectly, as far as I can tell.
01:52
<@McMartin>
Unless, that is, GetCtrlVal is taking an int& instead of an int&, in which case, you'd just pass config_x->vcc
01:52
< SchoolPhox>
What's this -> operand?
01:52
<@McMartin>
x->y is equivalent to (*x).y
01:52
<@McMartin>
It's clearer than *x.y because if y is a pointer type, that might be *(x.y)
01:53
<@McMartin>
"But only one of those can type-check," you object
01:53
< SchoolPhox>
But only one of those can---
01:53
< SchoolPhox>
Oh
01:53
<@McMartin>
Compilers that deduce what types must be based on usage are both extremely rare and only guaranteed to work at all under very specific problem domains, neither of which apply to C
01:54
<@McMartin>
Generally speaking, the languages that do type inference don't actually allow variable reassignment.
01:54
< SchoolPhox>
So -> is a compiler safe option, (*x).y should work, and *x.y is right out?
01:54
<@McMartin>
This isn't about safety, it's about clarity
01:55
<@McMartin>
(*x).y is "uglier".
01:55
<@McMartin>
More to the point: what is GetCtrlData's prototype?
01:55
<@McMartin>
Er, GetCtrlVal
01:56
< DesktopPhox>
int GetCtrlVal (int Panel_Handle, int Control_ID, void *Value);
01:56
<@McMartin>
If this is C++, there are two ways to pass by reference, and which is the right calling convention depends on which one it uses.
01:56
< DesktopPhox>
Just C
01:56
<@McMartin>
OK
01:56
< DesktopPhox>
Boring, old, I-thought-it-would-be-simple C
01:56
<@McMartin>
What you wrote shouldn't actually work.
01:56
< DesktopPhox>
Eh?
01:56
<@McMartin>
C isn't so much "simple" as it is "close to the metal"
01:56
<@McMartin>
The value you're passing in on line 48 in that link is passing in an object of type double.
01:56
<@McMartin>
You want a void*.
01:57
<@McMartin>
Has GetCtrlVal been written by someone else, or do you need to write it too?
01:58
< DesktopPhox>
No, that's from the NI user interface library
01:58
<@McMartin>
OK
01:58
<@McMartin>
If this doesn't crash the system as it tries to write through a double that it thinks is a pointer, I would expect the code as written to not actually change the value of the member of config_x.
01:58
<@McMartin>
Because it's not being told where it is.
01:59
<@McMartin>
While "take this pointer structure, dereference it to get a field, and take the address of *that*, so that GetCtrlVal can write through into it" would be the aforementioned &(config_x->vcc).
01:59
< SchoolPhox>
Even with .vcc being declared globally?
02:00
<@McMartin>
Er
02:00
<@McMartin>
GetCtrlVal, if it's doing the normal pass-by-ref thing for C, is expecting to be handed a pointer through which it can write its result
02:00
<@McMartin>
Even if it's global, it needs to know where that is
02:00
<@McMartin>
And you tell it that, in the third argument.
02:00
< SchoolPhox>
Okay. I follow, so far.
02:01
< SchoolPhox>
Means I still need to find a way to dereference .vcc
02:01
<@McMartin>
No
02:01
<@McMartin>
You need not to dereference it
02:01
<@McMartin>
But to take its address
02:01
< SchoolPhox>
mind = blown
02:01
<@McMartin>
Then, when that gets dereferenced, you get the vcc element
02:01
< SchoolPhox>
Heh, I kid
02:01
<@McMartin>
This is what the & operator does.
02:02
< SchoolPhox>
Which is unavailable when in a struct?
02:02
<@McMartin>
No, it's totally OK.
02:02
<@McMartin>
You have to do it to the whole expression, though
02:02
<@McMartin>
But first
02:02
<@McMartin>
x = 3; y = &x; *y = 4;
02:02
<@McMartin>
After those three commands, x is 4
02:02
<@McMartin>
config_x->vcc is a value - specifically, a double
02:03
<@McMartin>
&(config_x->vcc) is a double *
02:03
<@McMartin>
Most C compilers should accept any pointer as being acceptable to a call whose parameter is void *
02:03
<@McMartin>
If this is not the case, you'll have to tell the compiler "I realize this is used as a void *" by adding a "cast":
02:03
<@McMartin>
(void *) &(config_x->vcc)
02:03
< SchoolPhox>
Hang on, if &(config_x->vcc) is a double *, isn't that what we need?
02:04
<@McMartin>
Yeah. That should be enough
02:04
< SchoolPhox>
Compiler aside, I mean
02:04
<@McMartin>
Yes, that's what I've been saying; that expression is the answer you seek
02:04
< SchoolPhox>
Ah.
02:04
< SchoolPhox>
We've been working off of different versions of the code
02:04
<@McMartin>
Everything else has been "this is why it is the answer you seek"
02:04
<@McMartin>
Aha.
02:05
<@McMartin>
Did I miss a link?
02:05
< SchoolPhox>
I changed it to &(config_x->vcc) at <@McMartin> If so, I think what you actually want is, frex, &(config_x->vcc)
02:05
< SchoolPhox>
Didn't repost, sorry
02:05
< SchoolPhox>
But, thanks for taking the time to explain about referencing/dereferencing within structs
02:06
< SchoolPhox>
And how that affects the whole
02:06
<@McMartin>
Oh, OK
02:06
<@McMartin>
Without knowing the API beyond the signatures, that sounds like it should do what you want.
02:06
<@McMartin>
But if it doesn't I have a pretty good idea what the compiler will be barfing on~
02:06
<@McMartin>
(And then putting (void *) in parens before the expression should solve that)
02:07
<@McMartin>
(And there should be fist-shaking)
02:07
< SchoolPhox>
I hope to get the chance to test that portion tonight. I don't think I've had to explicitly cast pointers to void.
02:07
< SchoolPhox>
Not before, at least.
02:07
< SchoolPhox>
I mean, the point of those is to pass different data-types, aren't they?
02:10
<@McMartin>
Yeah.
02:11
<@McMartin>
But embedded compilers are full of weird nonstandard horrors.
02:14
< SchoolPhox>
XD, this program. A nightmare, I say. Shooting out general protection faults everywhere.
02:32
< simon_>
I live a blissful life of only having made compilers with Standard ML.
02:34
< SchoolPhox>
Ooh, so cool. Typing foo-> brings up a window listing all the elements of the structures. So cool.
02:35
< SchoolPhox>
Useless, in my case, since I was modifying something I'd pasted from elsewhere, but still cool
03:18 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
03:18 mode/#code [+o Attilla] by Reiver
03:57
< Tarinaky>
Does anyone have any experience with SDL_ttf?
03:57
< Tarinaky>
I'm having difficuly getting TTF_OpenFont to work.
03:58
< Tarinaky>
It reports that it 'couldn't load font file'.
04:12 DesktopPhox [NSwebIRC@FD3571.2233F7.69D3C5.D06239] has quit [[NS] Quit: Page closed]
04:13 SchoolPhox [NSwebIRC@FD3571.2233F7.69D3C5.3FAC0C] has quit [[NS] Quit: Page closed]
04:15 Kindamoody is now known as Kindamoody[zZz]
04:40
<@ToxicFrog>
Tarinaky: call TTF_GetError to find out exactly what went wrong.
04:41
< Tarinaky>
ToxicFrog: 'Couldn't load font file' is what TTF_GetError reports.
04:41
<@ToxicFrog>
Oh. How helpful.
04:41
<@ToxicFrog>
Check your paths and PWD, if you're not using an absolute path to it.
04:42
< Tarinaky>
Done that.
04:42
<@ToxicFrog>
Failing that, deploy the strace.
04:42
< Tarinaky>
I'm using constants for TTF_OpenFont's arguments, so they're known-good.
04:43
<@ToxicFrog>
The conclusion doesn't follow from the premise.
04:44
< Tarinaky>
Well, I know they're not being molested with... since they're constants.
04:44
< Tarinaky>
As opposed to the path being generated by some other function.
04:44
<@ToxicFrog>
Maybe you mistyped the path. Maybe you don't have permission to read the file or one of its parent directories. Maybe you're using a relative path and PWD isn't what you expect. Maybe the file is on a corrupt filesystem.
04:45
<@ToxicFrog>
In any case, my recommendation of strace stands.
04:45
< Tarinaky>
I've verified the path is not mistyped. I've checked permissions. I've verified PWD.
04:45
< Tarinaky>
I can't remember what the view for ttf files is.
04:46
<@ToxicFrog>
What?
04:46
< Tarinaky>
*the viewer for ttf files is
04:46
< Tarinaky>
To verify that the file is uncorrupted.
04:47
<@ToxicFrog>
Neither do I. Use strace.
04:48
< Tarinaky>
(gdb) strace
04:48
< Tarinaky>
Segmentation fault
04:48 * Tarinaky sniggers.
04:48
<@ToxicFrog>
Um
04:48
<@ToxicFrog>
gdb doesn't even have an strace command
04:49
<@ToxicFrog>
And your gdb install appears to be broken
04:49
<@ToxicFrog>
I meant use the actual strace command, as in, 'strace program'
04:49
<@ToxicFrog>
Or more usefully, something like 'strace -o program.log program && grep -i ttf program.log'
04:51
< Tarinaky>
Having trouble getting it to install.
04:51
<@ToxicFrog>
...what OS are you on?
04:51
< Tarinaky>
Arch Linux.
04:51
<@ToxicFrog>
Shouldn't it just be 'aur install strace' or similar?
04:52
< Tarinaky>
Yes. It's reporting that none of the mirrors have the package.
04:52
< Tarinaky>
Which probably means that I have no choice but to perform a system update and probably reboot because something important changed.
04:52
<@ToxicFrog>
Aah :/
04:54
<@ToxicFrog>
Hrm
04:55
<@ToxicFrog>
I think I meant 'pacman -S strace'
04:55
<@ToxicFrog>
Sorry, I don't use arch
04:55
<@ToxicFrog>
If you were actually using aur, that may be why it didn't work
04:56
< Tarinaky>
Hey, you -can- you aur to install packages.
04:56
< Tarinaky>
Or rather, as part of the process.
04:57
< Tarinaky>
Aur downloads the source package for a program, which you can then build and install.
04:57
<@ToxicFrog>
AIUI, aur talks to the Arch User Repository, hence the name
04:58
<@ToxicFrog>
Which I think is kind of like the openSUSE Build Service or the Ubuntu PPAs in intent?
04:58
< Tarinaky>
Oh, misread that as abs.
04:58
<@ToxicFrog>
strace, however, is generally considered a core package
04:58
<@ToxicFrog>
Honestly, I'm surprised it wasn't installed with the system
04:58
< Tarinaky>
Arch Linux's definition of 'core' is minimalistic.
04:58
< Tarinaky>
It's installed now anyway.
04:59
< Tarinaky>
Arch Linux assumes you have broadband on tap and you're a desktop power use - so it near enough doesn't install anything.
04:59
< Tarinaky>
Anyway, I have strace now.
05:00
< Tarinaky>
[tarinaky@Eris Rontgen]$ strace -o program.log ./rontgen && grep -i ttf program.log
05:00
< Tarinaky>
Failed to open font.
05:00
< Tarinaky>
Couldn't load font file
05:00
< Tarinaky>
... Am I doing something wrong or was that hideously unhelpful?
05:01
<@ToxicFrog>
...what does program.log contain?
05:01
<@ToxicFrog>
It should contain a shitload of system call information.
05:01
< Tarinaky>
Yes. Yes it does.
05:02
<@ToxicFrog>
But none of them contain the text "ttf"? That's odd. Implies it's not even getting the point where it tries to open the font.
05:02
<@ToxicFrog>
Unless it's not named something.ttf?
05:02
< Tarinaky>
Oh wait. Yes. The program.log contains the pattern ttf
05:02
< Tarinaky>
I'm just confused why grep did nothing.
05:03
< Tarinaky>
open("/usr/lib/libSDL_ttf-2.0.so.0", O_RDONLY) = 3
05:03
< Tarinaky>
open("assets/a_d_mono.ttf", O_RDONLY) = 5
05:03
<@ToxicFrog>
a_d_mono.ttf is your font?
05:04
< Tarinaky>
Yes.
05:04
<@ToxicFrog>
Pastebin everything after that line.
05:06
<@ToxicFrog>
(it is at least succeeding in opening the font file)
05:06
< Tarinaky>
http://pastebin.com/GJqGaAzb
05:07
<@ToxicFrog>
Um
05:07
<@ToxicFrog>
read(5, "\n \n\n \n\n<!DOCTYPE html>\n<html"..., 4096) = 4096
05:08
<@ToxicFrog>
What's the output of 'file assets/a_d_mono.ttf'?
05:08
< Tarinaky>
Hmm. HTML. :/
05:10
<@ToxicFrog>
Welp.
05:10
< Tarinaky>
Don't say it.
05:10
< Tarinaky>
:p
05:10
<@ToxicFrog>
See if it works with an actual TTF.
05:13
< Tarinaky>
Thanks. Works now.
05:13 * Tarinaky curses the web page responsible for being misleading.
05:18 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
05:39 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:45 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
05:45 mode/#code [+o Attilla] by Reiver
05:46 * McMartin gets his Hex Inverter on
06:00 Netsplit *.net <-> *.split quits: simon_, @Namegduf, @Kazriko, Kindamoody[zZz], @VornicusVashicus
06:01 Netsplit over, joins: @VornicusVashicus, @Namegduf, simon_, @Kazriko, Kindamoody[zZz]
06:17 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
07:23 AnnoDomini [annodomini@D553D1.75652E.684088.472120] has joined #code
07:23 mode/#code [+o AnnoDomini] by Reiver
08:01 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
08:06 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Connection closed]
08:06 Kindamoody[zZz] [Kindamoody@35E323.4A5F05.9893B9.A684A3] has quit [Connection closed]
08:11 Kindamoody [Kindamoody@35E323.4A5F05.9893B9.A684A3] has joined #code
08:46 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
09:01 You're now known as TheWatcher
09:03 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited]
09:49 gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has joined #code
10:02 Kindamoody is now known as Kindamoody|away
10:19 Kindamoody|away [Kindamoody@35E323.4A5F05.9893B9.A684A3] has quit [Client exited]
10:22 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
10:24 Kindamoody is now known as Kindamoody|away
11:41 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
11:55
< Reiv>
IT'S A QUADRATIC
11:56
< Reiv>
AHAHAHA NOW HOW TO MAKE IT WORK
12:03
< gnolam>
?
13:40 Kindamoody|away is now known as Kindamoody
13:49
< Reiv>
gnolam: I think I may have just cracked a Bright Idea I have been screwing around in my head with for an age.
13:49
< Reiv>
Essentially, I want a cost/benefit ratio that is nonlinear in a 4X Spaceship Game.
13:50
< Reiv>
You continually tech up, meaning that what was once cutting edge is no longer - on the bright side, it's also a hell of a lot cheaper.
13:50
< Reiv>
So you find yourself striking a balance point between economy and effectiveness.
13:54
< Reiv>
So, for armor, for example
13:54
< Reiv>
(fixedwidth incoming)
13:54
< Reiv>
Hull: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
13:54
< Reiv>
Cost: 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5 6 7 9 12
13:54
< Reiv>
So you can run around with a minimal cost and still have hull of 5. Or midrange 9 or 12 for 2 or 3 times the cost.
13:55
< Reiv>
Which may well be the difference between "Law enforcement" and "Run of the mill military"; if you want a cutting bleeding edge ultra-killer ship, you have to spend up big time.
13:55
< Reiv>
Improving tech would modify this.
13:56
< Reiv>
I have yet to decide precisely how, but possibly flattening the curve.
14:06
<@jerith>
Maybe just shift the curve and have older tech fall off the bottom as "obsolete".
14:16
< Reiv>
That could also work.
14:16
< Reiv>
I suspect it depends just how fast I want things to change.
14:17
< Reiv>
Nonetheless, it is pleasing to have a setup that suggests a baseline vs the rest.
14:17
< Reiv>
Weaponry will have a similar level of stuff.
14:18
< Reiv>
The details there will be complicated slightly by energy vs ammunition and weapon sizes, but hell, it's a start.
14:21 SmithKurosaki [smith@Nightstar-7820a96a.dsl.teksavvy.com] has quit [Operation timed out]
14:25
< gnolam>
Ah.
14:26
< Reiv>
(And also just how hurting stuff works. But like I said: Hell, it's a /start/.)
14:27
< gnolam>
I always thought it was neat how MOO2 incorporated miniaturization into the tech system.
14:27
< Reiv>
Yers?
14:27
< Reiv>
... incidentally, that is a quadratic progression up there, yes?
14:27
< Reiv>
If you plotted them as X and Y.
14:27
< gnolam>
The more advanced tech you have, the smaller the old tech becomes.
14:50 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
15:03 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer]
15:03 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
15:14 Kindamoody is now known as Kindamoody|out
15:58 Attilla [Some.Dude@37647E.0E7447.22C7B1.567421] has joined #code
15:58 mode/#code [+o Attilla] by Reiver
16:02 cpux is now known as shade_of_cpux
17:07
<@Namegduf>
gnolam: That was always neat.
17:08
<@Namegduf>
Especially given without Creative you could only have one new tech of each level, but even if you didn't get a replacement for something you still got it minimised.
17:44 Kindamoody|out [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Client closed the connection]
17:44 Kindamoody|out [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
18:25 shade_of_cpux is now known as cpux
18:32
<@ToxicFrog>
Hate writing documentation
18:32
<@ToxicFrog>
Hate so much
18:35 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
19:47 Derakon [Derakon@8E7DA3.11EB2E.8356BF.B82ACB] has joined #code
19:47 mode/#code [+o Derakon] by Reiver
19:50
<@Derakon>
Mental note: when you are iteratively constructing a list of items, it is helpful to append the new items to the list after you finish making them.
19:55 Kindamoody|out is now known as Kindamoody
19:59
< celticminstrel>
Yup.
19:59
< celticminstrel>
:P
20:01 * Derakon adds his first case of "Try this some number of times, and give up if it hasn't worked by the end" to Jetblade.
20:01
<@Derakon>
I'm not terribly happy about that, but so far I haven't thought of a better approach.
20:02
<@Derakon>
The problem being that I need to create a spanning tree for a subset of nodes in a graph. I'm guaranteed that the nodes are all connected to each other, but I'm not guaranteed that all the edges are valid -- if the angle between two edges is too sharp then I can't use it.
20:02
<@Derakon>
So I just generate random spanning trees until either I manage to hit every node or I run out of tries and give up.
20:03
<@Derakon>
Any better ideas?
20:10 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
20:14 Kindamoody|away [Kindamoody@35E323.4A5F05.9893B9.A684A3] has joined #code
20:16 Kindamoody|away is now known as Kindamoody
20:20 Kindamoody [Kindamoody@35E323.4A5F05.9893B9.A684A3] has quit [Ping timeout: 121 seconds]
20:25 Kindamoody|away [Kindamoody@D553D1.68BE08.ECB34C.A3DCD7] has joined #code
20:35 Kindamoody|away is now known as Kindamoody
21:40 RichardBarrell [mycatverbs@Nightstar-f68eb197.cable.virginmedia.com] has joined #code
22:17 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited]
22:47 * Derakon amuses himself by maximizing space utilization: http://derakon.dyndns.org/~chriswei/temp2/premap-001.png
22:47
<@Derakon>
That might be a bit hard to navigate at points.
22:47
<@Derakon>
Not to mention the buggy feature generation in the grey sector.
22:51
< Alek>
and is there supposed to be a ton of separate mazes sharing one map?
22:52 RichardBarrell [mycatverbs@Nightstar-f68eb197.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
22:52
<@Derakon>
Here's a more normal map for comparison: http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen40c.png
22:54 RichardBarrell [mycatverbs@Nightstar-f68eb197.cable.virginmedia.com] has joined #code
22:59 RichardBarrell [mycatverbs@Nightstar-f68eb197.cable.virginmedia.com] has quit [Client closed the connection]
23:01
< Alek>
personally, I prefer the "normal" one.
23:01
< Alek>
but that's just me.
23:16 AnnoDomini [annodomini@D553D1.75652E.684088.472120] has quit [[NS] Quit: leaving]
--- Log closed Sun Mar 20 00:00:06 2011
code logs -> 2011 -> Sat, 19 Mar 2011< code.20110318.log - code.20110320.log >