code logs -> 2011 -> Wed, 16 Mar 2011< code.20110315.log - code.20110317.log >
--- Log opened Wed Mar 16 00:00:01 2011
00:00 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
00:00 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
00:01 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
00:01 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
00:03 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
00:05 Derakon[AFK] is now known as Derakon
00:06 shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
00:06 shade_of_cpux is now known as cpux
00:34 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
00:36 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
00:40 Kindamoody|away [Kindamoody@35E323.4A5F05.9893B9.A684A3] has joined #code
00:40 Kindamoody [Kindamoody@35E323.4A5F05.9893B9.A684A3] has joined #code
00:43 gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has quit [[NS] Quit: Z?]
00:49 Kindamoody|away [Kindamoody@35E323.4A5F05.9893B9.A684A3] has quit [Ping timeout: 121 seconds]
00:51 Kindamoody [Kindamoody@35E323.4A5F05.9893B9.A684A3] has quit [Ping timeout: 121 seconds]
00:52
<@Derakon>
I finally decided that maybe all the modules related to map generation should get their own sub-package in Jetblade.
00:52
<@Derakon>
So what should I call that package?
00:52
<@Derakon>
"map" seems a poor choice, seeing as it is also a builtin function.
00:53 SmithKurosaki [smith@Nightstar-7820a96a.dsl.teksavvy.com] has joined #code
00:54 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
00:54 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
00:59
< celticminstrel>
What about "maps" or "mapgen" or something?
01:00
<@McMartin>
"geo"
01:01
<@Derakon>
mapgen works.
01:01
<@Derakon>
Thanks.
01:14 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
01:14 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
01:17 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
01:17 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
01:37
< Tarinaky>
Okay. How do you do singletons in python? My attempt crashed and burned with spiderous errors and I can find conflicting information on google.
01:38
< Tarinaky>
Derakon: You code games in Python right?
01:38
<@Derakon>
Yes.
01:38
<@Derakon>
A singleton is simply a class that you instantiate only once.
01:38
<@Derakon>
And, presumably, you keep that instance around in an easy-to-find fashion.
01:39
< Tarinaky>
Yes. I'm aware.
01:39
< Tarinaky>
I attempted to do it by giving the module a global and having a factory function that initialised the singleton and put it in that global.
01:39
<@Derakon>
Here's my handmade logger, which functions as a simple singleton. http://code.google.com/p/jetblade/source/browse/logger.py
01:39
< Tarinaky>
But this gave me an error that didn't make sense... so I'm having to go back and rethink.
01:40
< Tarinaky>
Well, I'll be specific:
01:40
< Tarinaky>
When I tried to access that global from another module it appeared to be uninitialised.
01:40
<@Derakon>
Ah ha.
01:40
<@Derakon>
I bet I know what's happening.
01:40
<@Derakon>
You did this:
01:40
< Tarinaky>
I'm assuming this is a common newbie trap :p
01:40
<@Derakon>
singletonInstance = None
01:41
<@Derakon>
def makeInstance():
01:41
<@Derakon>
singletoneInstance = Singleton()
01:41
<@Derakon>
Er, except spelled correctly.
01:41
< Tarinaky>
Exactly that.
01:41
<@Derakon>
The problem being that you cannot assign to globals unless you declare them beforehand.
01:41
<@Derakon>
Otherwise, you get a function-scoped variable named "singletonInstance" and the module-scoped variable is untouched.
01:41
< Tarinaky>
Oh, no.
01:41
< Tarinaky>
I had a global instance line.
01:41
<@Derakon>
So do "global singletonInstance" at the top of the function.
01:41
<@Derakon>
Oh.
01:42
<@Derakon>
Okay, paste your code so I can see what you're doing.
01:43
< Tarinaky>
Lemme see if I can get it. git is being uncooporative of late.
01:46
< Tarinaky>
https://github.com/Tarinaky/coulomb/blob/master/py/engine.py
01:47
< Tarinaky>
I should probably start a new prototype anyway, now I have a better idea what I'm doing and what patterns to use :/
01:47
<@Derakon>
Try ditching the "global" on line 9.
01:47
<@Derakon>
Just say "instance = None" or something.
01:48
< Tarinaky>
Yeah, sorry. That's what I was doing.
01:48
< Tarinaky>
That file's the commit I made when I went "You know what, sod it I'll start again >.<"
01:49
<@Derakon>
Dunno then, looks fine to me.
01:49
<@Derakon>
Unless __name__ is not in fact "__main__".
01:49
< Tarinaky>
Hmm :/
01:49
<@Derakon>
In which case init() doesn't run.
01:50 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
01:50 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
01:50
< Tarinaky>
I stepped through in a debugger. init() got run.
01:50
<@Derakon>
You could modify init() to check if instance has been created already, and if it has do nothing; then you can invoke init() as many times as you like harmlessly.
01:50
< Tarinaky>
Oh well. New prototype ho!
01:50
< Tarinaky>
Derakon: I'm not sure I can. engine wraps around an sdl window... Which I'm not sure can be initialised multiple times harmlessly.,
01:51
<@Derakon>
That's the point. It won't be.
01:51
<@Derakon>
def init(): if instance is None: instance = Engine()
01:52
< Tarinaky>
I stepped through in a debugger. An SDL window had been created, init called etc... And it was still reporting instance == None in a different module.
01:52
<@Derakon>
You mean, engine.instance?
01:52
< Tarinaky>
Yes.
01:52
<@Derakon>
Beats me man.
01:52
<@Derakon>
I'd have to be able to bash on it myself.
01:53 * Tarinaky starts again >.>
01:53 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
01:53 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
01:56
< Tarinaky>
Although I'm a little annoyed with the python debugger not handling unhandled exceptions in a very helpful way.
01:56
< Tarinaky>
It'd kindof be handy if, when an assertion failed, it hung on the
01:56
< Tarinaky>
*held onto the stack for me to examine it.
01:57
<@Derakon>
Check the traceback module.
01:57
< celticminstrel>
Or the debugger.
01:57
< celticminstrel>
I think it's called pdb or something.
01:58
< Tarinaky>
No idea to be honest. At the moment I'm using the one built into Eclipse.
01:58
< Tarinaky>
I think.
01:59
< Tarinaky>
I don't really know. It's only asked me for one interpretter... not a debug one :/
02:01 Derakon is now known as Derakon[food]
02:03
< Tarinaky>
The closest I can find in my package manager is python-ipdb, but that's for python 3... which I'm not using.
02:10
< celticminstrel>
I have no idea whether the Eclipse one is based on pdb. I know pdb is amongst the standard modules installed with Python.
02:16
< Tarinaky>
Well, I have no program called pdb as far as I can tell.
02:16
< Tarinaky>
And I can't see one in my package manager either.
02:16
< Tarinaky>
unless it's hiding behind python2 through some obscure switches.
02:16
< celticminstrel>
It's a python module, not a program.
02:16
< Tarinaky>
Doh.
02:17
< celticminstrel>
But you can run it as a program using the command-line switch to run a module - I think it's -m
02:17
< celticminstrel>
3
02:17 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Client exited]
02:17
<@McMartin>
Argh, overloading
02:17
<@McMartin>
I'm used to PDB being MS's name for its standalone debugging symbols
02:24 cpux is now known as shade_of_cpux
02:40 Derakon[food] is now known as Derakon
03:09 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
03:10 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
03:16 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
03:23 KiMo[away] [Kindamoody@Nightstar-c78b3dae.cust.tele2.se] has joined #code
03:24 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
03:24 KiMo[away] is now known as Kindamoody
03:25
< Tarinaky>
I'm getting it again!
03:25
< Tarinaky>
Fffu- :/
03:25
<@Derakon>
Reduce it to as simple a program as you can get that still reproduces the problem.
03:25
< Tarinaky>
Yeah :/
03:33
< Tarinaky>
I have a test case.
03:33
< Tarinaky>
Uploading.
03:37
< Tarinaky>
https://github.com/Tarinaky/coulomb/tree/testcase
03:40
< Tarinaky>
Derakon: I have a test case. Run singleton.py as the main module.
03:40
<@Derakon>
Yeah, I see it.
03:41
< Tarinaky>
What am I doing wrong?
03:43
<@Derakon>
Good question.
03:46
<@Derakon>
I have to say I'm stumped. I suggest going onto Freenode.net and asking in #python.
04:43
<@Derakon>
Tarinaky: try making a third module be the one that you invoke Python on.
04:43
<@Derakon>
I.e. move the stuff gated by the __name__ check into a third module that imports singleton.
04:45
< Tarinaky>
Trouble is that the __name__ check is a convenience to allow me to run the program from any file.
04:46
<@Derakon>
You want convenience, or you want a working program?
04:46
< Tarinaky>
Both.
04:47
<@Derakon>
Life is hard.
04:47
< Tarinaky>
I'm not entirely sure python is actually giving me any gains :/
04:49
<@Derakon>
Tsk.
04:49
<@Derakon>
We work with the reality we are in, not the one we want to be in.
04:51
< Tarinaky>
Like I said. I'm not sure Python is really giving me any gains.
04:51 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!]
04:52
<@Derakon>
Don't use it then.
04:55
< Tarinaky>
The only python help I can find for singletons consists of: "don't". :p
04:59 Kindamoody is now known as Kindamoody|away
05:34 Derakon is now known as Derakon[AFK]
06:07
<@jerith>
Tarinaky: Singletons are, in general, a bad idea.
06:10
< Tarinaky>
jerith: They're only globals.
06:34 Netsplit *.net <-> *.split quits: @Derakon[AFK], simon_, Reiver, Reiv, @PinkFreud, Tarinaky, @Kazriko, @McMartin, @jerith, Alek, (+5 more, use /NETSPLIT to show all of them)
06:35 Netsplit over, joins: ~Reiver, @jerith, Tamber, Reiv, @PinkFreud, SmithKurosaki, @Derakon[AFK], @McMartin, @Kazriko, Rhamphoryncus (+5 more)
06:35 mode/#code [+o TheWatcher[zZzZ]] by Reiver
06:36 mode/#code [+o Syloqs-AFH] by Reiver
06:47 AnnoDomini [annodomini@D553D1.41311B.9272E3.B53B4A] has joined #code
06:47 mode/#code [+o AnnoDomini] by Reiver
07:04 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited]
07:51
< Tarinaky>
Nyyyyrgggh - Why does this hippy on TV seem to be claiming that the UK's Nuclear Industry is at risk of Tsunami...
07:52
<@McMartin>
Didn't you notice?
07:52
<@McMartin>
Tsunamis come from the OCEAN
07:52
< Tarinaky>
Whoops. Wrong channel.
07:52
<@McMartin>
The UK is SURROUNDED by OCEAN!
07:52
<@McMartin>
EVERYBODY PANIC
07:53
< Tarinaky>
Japan is a country that encounters regular earth quakes and related events... England has periodic flash flooding.
07:53
< Tarinaky>
I do not see the relationship.
07:57
< Tarinaky>
Anyway. It's a good thing I decided to have a look at c++ again. I seem to have forgotten how to write a makefile :/
07:57
< Tarinaky>
I shall poke people later about that though.
07:57
<@McMartin>
Tabs and spaces aren't equivalent in Make. ;_;
09:17 Kindamoody|away is now known as Kindamoody
09:27 Kindamoody is now known as Kindamoody|away
09:52 You're now known as TheWatcher
10:02
< Tarinaky>
Okay. What's wrong with this Makefile: https://github.com/Tarinaky/Rontgen/blob/master/Makefile
10:04 AnnoDomini [annodomini@D553D1.41311B.9272E3.B53B4A] has quit [[NS] Quit: leaving]
10:05 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.]
10:10
<@TheWatcher>
Tarinaky: the fact that it looks like a makepp makefile rather than a gnu make one?
10:11
< Tarinaky>
TheWatcher: I've never used makepp... I'm mostly going on memory because I can't remember where I put my UNIX manual >.<
10:12
<@TheWatcher>
`info make` ¬¬
10:17
< Tarinaky>
Pfft, Make is made of spiders and magic >.>
10:27
< Tarinaky>
Hmmm... The error I'm getting is it's reporting that it can't find the rule to make object files.
10:45 AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code
10:46 mode/#code [+o AnnoDomini] by Reiver
10:48 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
11:14 AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [Ping timeout: 121 seconds]
11:23 AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code
11:23 mode/#code [+o AnnoDomini] by Reiver
11:24 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
11:57 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
12:54
< gnolam>
Blargh. Bureaucracy.
12:55 * TheWatcher gives gnolam the Petrol Can of Righteousness, and the Lighter of Bureaucratic Conflagration.
12:58 AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: Going home.]
13:09
< gnolam>
I have to fill out and hand in not just one but /two/ forms, together with a copy of my passport. To get a freaking account. :P
13:12
<@TheWatcher>
O.o
13:13
<@TheWatcher>
That seems somewhat excessive... although, I suppose that depends on what the account is for...
13:14
< gnolam>
Parallell programming course. We'll run the heavy stuff on the the National Supercomputer Centre.
13:15
<@TheWatcher>
Ah-hah
13:20
< Reiv>
That sounds the kind of job where it's almost justified.
13:21 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
13:21 mode/#code [+o Attilla] by Reiver
13:21 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
13:31 AnnoDomini [annodomini@D553D1.41311B.9272E3.B53B4A] has joined #code
13:31 mode/#code [+o AnnoDomini] by Reiver
13:43 * TheWatcher ponder Reiver
13:46 * Reiv innocents?
13:48
<@TheWatcher>
Just really O.oing at your autoopery there, as it seems peculiarly selective
13:48
<@TheWatcher>
(in fleet, I've seen it op some people, but not others)
13:50
< Reiv>
I am honestly baffled by it.
13:50
< Reiv>
There are no scripts on my computer to do it.
13:51
< Reiv>
In fact, what it is auto-opping is the autoop list
13:51
< Reiv>
As in, what I have told nightstar to auto-op!
13:51
< Reiv>
Then I end up doing it.
13:51
< Reiv>
I have no freaking clue, man.
14:35 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
14:55 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
15:00 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Client closed the connection]
15:01 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
15:26 Kindamoody|away [Kindamoody@Nightstar-c78b3dae.cust.tele2.se] has quit [Ping timeout: 121 seconds]
16:59
< Tarinaky>
Okay. So I'm getting somewhere with my makefile now.
16:59
< Tarinaky>
I'm getting the error: gcc: test.o: No such file or directory
16:59
< Tarinaky>
<command-line>:0:1: error: macro names must be identifiers
16:59
< Tarinaky>
make: *** [test.o] Error 1
17:00
< Tarinaky>
(Make file is here: https://github.com/Tarinaky/Rontgen/blob/master/Makefile )
17:03
< gnolam>
Any reason you're using gcc instead of gpp if you're using c++? You have the link the C++ standard library yourself if you're using gcc.
17:03
< celticminstrel>
Isn't it g++?
17:03
< celticminstrel>
I dunno, maybe both work...
17:04
< gnolam>
Yeah, g++
17:04
< gnolam>
It's been a while.
17:05
< gnolam>
Also... is an empty -D even legal?
17:11 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Ping timeout: 121 seconds]
17:19
<@ToxicFrog>
Tarinaky: -D on its own is illegal; it's -pedantic, not --pedantic; use g++ for compiling C++ code, not gcc
17:23 Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code
17:25
<@ToxicFrog>
I have a new appreciation for Scala's override keyword.
17:31
< celticminstrel>
Well, I think 'gcc -lstdc++' or something like that will work too, but 'g++' is shorter.
17:33
<@ToxicFrog>
g++ has some other behavioural changes, too
17:34
<@ToxicFrog>
Mostly relating to default language selection
17:34
< celticminstrel>
But still, you can get the same effect with gcc. It's just more verbose.
17:34
<@ToxicFrog>
Yes.
17:40
< Tarinaky>
Wait, what's the flag to preserve debug symbols if it's not -D?
17:40
<@ToxicFrog>
Per 'man gcc', -g
17:41
<@ToxicFrog>
-D is used for preprocessor defines on the command line, as in -DWIN32 or -DLUA_VERSION="5.1.4"
17:42
< Tarinaky>
Thanks. It's working now.
17:57
<@ToxicFrog>
Hrm.
17:57
<@ToxicFrog>
Visibility is hard.
17:57
<@ToxicFrog>
And I can't make the simplifying assumption that anything picked up is visible to the person holding it, either.
17:59
<@ToxicFrog>
Hrm.
18:00
<@ToxicFrog>
I could have each object know its own visibility state, and update this (by looking at the parent) when it is reparented.
18:00
< gnolam>
What're you making?
18:01
<@ToxicFrog>
This is probably the simplest, because it means methods can just check (self.concealed) as needed, but means that reparenting something with lots of children implies updating that flag on all of the children, which may be expensive. At least it happens client-side.
18:01
<@ToxicFrog>
Felt. Networked card table.
18:03
<@ToxicFrog>
My original thought was just to emit different events for render (concealed) and render (revealed), but this breaks down when you pick something up (it gets rendered twice, once outside the normal heirarchy) and when getting names (poker breaks down if you reorganize your hand and everyone else sees "ToxicFrog picks up Ace of Diamonds" in the log)
18:04
<@ToxicFrog>
So I think objects pretty much have to record their own visibility state.
18:10
<@ToxicFrog>
Now I just need to name it.
18:12
<@ToxicFrog>
The problem is that we basically have to flags, one that controls whether the object draws at all, and one that controls whether it draws "face up" or "face down".
18:12
<@ToxicFrog>
The first of those is currently called "visible".
18:12
<@ToxicFrog>
For the latter I'm considering "hidden" or "concealed"
18:13
<@ToxicFrog>
Thoughts?
18:18
< Tarinaky>
Hurderp. I can't seem to get syntax highlighting to work in vim. I've tried set syn=auto and set syn=c.
18:18
< Tarinaky>
Neither seem to do anything.
18:29
<@ToxicFrog>
Hrglflrgh.
18:29
<@ToxicFrog>
I really want to get these names right before I have a shitload of code that depends on them.
18:38
< celticminstrel>
Concealed makes sense to me... is there any reason not to just call it "faceDown" or something, though?
18:39
<@ToxicFrog>
Because it's a more general concept than that; for example, dice can't really be said to be "face down" or "face up", but it might still be useful to have a set of dice that are visible to some players but show up as [?] to others.
19:03
< celticminstrel>
Ah, well, "concealed" seems to make sense though, and if you think it's not descriptive enough you can always add a comment.
19:17
<@ToxicFrog>
Hmm.
19:17
<@ToxicFrog>
Can I safely assume that if an object is concealed, I do not have to render its children?
19:18
< celticminstrel>
No idea.
19:18
<@ToxicFrog>
Yeah, neither do I.
19:28
<@ToxicFrog>
I think this is a safe assumption to make.
19:28
<@ToxicFrog>
Certainly it's not safe to assume that you can always draw the children.
19:31
<@ToxicFrog>
Ok.
19:32
<@ToxicFrog>
render() will now call draw_concealed if self.concealed is set, and draw otherwise. draw_concealed is by default a wrapper for draw.
19:32
<@ToxicFrog>
__tostring will now call __tostring_concealed if it exists.
19:42
< Tarinaky>
Okay. Am I forgetting something really stupid. How do you set the initialisation value of a static member?
19:44
<@ToxicFrog>
Isn't it just 'static type name = value;'?
19:44
< gnolam>
Yes.
19:44
< gnolam>
Wait, static /member/.
19:44
< Tarinaky>
Member of a class.
19:44
< Tarinaky>
Err... in C++
19:44
< gnolam>
type CFoo::Bar = value;
19:45
< Tarinaky>
Oh, that easy?
19:45
<@ToxicFrog>
gnolam: you can't do inline initializers in the class declaration? You have to declare it uninitialized and then put the initializer afterwards?
19:45
< Tarinaky>
gnolam: Does it matter that it's a generic class?
19:47
< gnolam>
ToxicFrog: Yep. Unless it's a const int or enum.
19:48
<@ToxicFrog>
Huh.
19:48
< gnolam>
But you still have to define it outside the class at some point.
19:48
<@ToxicFrog>
C++, ladies and gentlemen~
20:50
< celticminstrel>
Or use C++0x. <_<
20:51
<@McMartin>
I tried to look at some C++0x-specific code, but every time I try my brain rebels
20:51
< celticminstrel>
XD
20:51
< celticminstrel>
Well, if I recall correctly, one of the less major changes is allowing inline initialization of static members.
20:52
<@McMartin>
That's less painful
20:53
<@McMartin>
I was looking at stuff like inline function definitions and there is not enough :gonk: in the world to cover it
21:07 Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
21:09 Kindamoody|away is now known as Kindamoody
21:22
<@ToxicFrog>
Why, what does inline definition look like in C++0x?
21:26
<@McMartin>
Line noise, basically.
21:26
<@McMartin>
These are used like lambda expressions.
21:29 Attilla_ [Some.Dude@37647E.0E7447.22C7B1.567421] has joined #code
21:31 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
21:33 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
22:18 Derakon [chriswei@8E7DA3.11EB2E.8356BF.B82ACB] has joined #code
22:18 mode/#code [+o Derakon] by Reiver
22:18
<@Derakon>
Rrgh, really not a fan of this file format.
22:18
<@Derakon>
It's the standard format that all our data is collected in though, so not really like I have a choice.
22:18
<@McMartin>
CSV =(
22:18
<@Derakon>
"But surely," you say, "in the long and storied history of this lab, someone has already written a program to save data in this format!"
22:19
<@Derakon>
Yes, they have.
22:19
<@Derakon>
When you run it with five-dimensional data (3 spacial dimensions, time, and light wavelength), you get the error "FIXME TODO: 5D".
22:19
<@Derakon>
And their code is, naturally, an illegible mess.
22:19
< Tamber>
....fun.
22:19
<@Derakon>
McM: thing is, by all rights this should be straightforward. Just a giant array and some metadata at the front to tell you the size of each axis.
22:21
<@Derakon>
My main bugbear right now is that the ordering of each axis in the file is more or less arbitrary -- there's a bit of metadata to tell you the ordering too. Which ends up making the file read/write process absurdly complicated.
22:21
<@Derakon>
(That and the fact that when you read a file, axes of length 1 are automatically omitted)
22:24
<@Derakon>
In unrelated news, did you know that "Ellipsis" is a builtin keyword in Python?
22:24
< celticminstrel>
I think it's a type, not a keyword...
22:25
<@Derakon>
Fair.
22:26
< celticminstrel>
Not sure though.
22:26
<@Derakon>
type(Ellipsis)
22:26
<@Derakon>
<type 'ellipsis'>
22:27
<@McMartin>
varargs marker?
22:27
<@Derakon>
I'm using it to take slices of numpy arrays.
22:28
<@Derakon>
I have a function that says "Given this 4D array and positions along two axes, return the plane that passes through those two positions".
22:28
<@Derakon>
Which requires slicing the array programatically.
22:29
<@Derakon>
So if you say "I want axis 0 to be at 5 and axis 2 to be at 15" then I can generate the list [5, Ellipsis, 15, Elllipsis] and use it as an index into my 4D array to get the resulting plane.
22:29
<@Derakon>
(Which you would normally get by going array[5,Ellipsis,15,Ellipsis])
22:34
<@Derakon>
Blargh. Trying to figure out why my file writing is broken without knowing how the file reader works is not a winning combination.
22:34
<@Derakon>
But I really don't want to dive into the file reader either.
22:43
< celticminstrel>
It's not a varargs marker, no.
22:48
< Tarinaky>
What order do object files need to be passed into g++? It's complaining it can't find my main function.
22:49
< Tarinaky>
Nevermind. Silly error.
22:52
< celticminstrel>
Order doesn't matter.
22:53 shade_of_cpux is now known as cpux
22:56 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
22:57 Derakon [chriswei@8E7DA3.11EB2E.8356BF.B82ACB] has quit [[NS] Quit: leaving]
23:22
<@ToxicFrog>
:D :D :D
23:22
< gnolam>
It does when you're linking, if you're using GCC.
23:22
<@ToxicFrog>
vstruct just got its first actual formal bug report
23:22
< gnolam>
+libraries
23:30
< gnolam>
(That's one of the things that annoy me with GCC; having to worry about the link order of all your libraries)
23:30
< celticminstrel>
I've never had to do that, though I also never used it from the command-line for anything that required more than just the standard libraries, so maybe my IDEs do it for me.
23:31
< Tarinaky>
Wow. I'd forgotten how much extra work c++ was over python, lol.
23:37
<@McMartin>
It really is.
23:37
<@McMartin>
It is, very occasionally, under special circumstances, worth it
23:43 AnnoDomini [annodomini@D553D1.41311B.9272E3.B53B4A] has quit [[NS] Quit: leaving]
--- Log closed Thu Mar 17 00:00:02 2011
code logs -> 2011 -> Wed, 16 Mar 2011< code.20110315.log - code.20110317.log >