code logs -> 2010 -> Thu, 30 Sep 2010< code.20100929.log - code.20101001.log >
--- Log opened Thu Sep 30 00:00:58 2010
00:01
< gnolam>
It's Matlab.
00:01
< gnolam>
M code is instant SAN loss.
00:20 shade_of_cpux is now known as cpux
00:34 Anno[Laptop] [annodomini@Nightstar-458eddb6.adsl.tpnet.pl] has quit [[NS] Quit: Bedwards.]
00:55 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
01:11 Vornicus-Latens [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
01:13 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:13 mode/#code [+o Vornicus] by Reiver
01:23 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
02:11 celmin [celticminstre@1AB00B.855209.A256BB.FEA948] has joined #code
02:15 celmin [celticminstre@1AB00B.855209.A256BB.FEA948] has quit [Ping timeout: 121 seconds]
02:22 celmin [celticminstre@1AB00B.855209.A256BB.FEA948] has joined #code
02:22 Derakon[AFK] is now known as Derakon
02:26 celmin [celticminstre@1AB00B.855209.A256BB.FEA948] has quit [Ping timeout: 121 seconds]
02:32 celmin [celticminstre@1AB00B.855209.A256BB.31F733] has joined #code
02:33 celmin [celticminstre@1AB00B.855209.A256BB.31F733] has quit [[NS] Quit: Augh! I have died! Someone help me, quick!]
02:33 cpux is now known as cpux[barf]
02:46 cpux[barf] [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [[NS] Quit: ChatZilla 0.9.86 [Firefox 3.6.10/20100914125854]]
03:11 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
03:21 cpux[barf] [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
03:29 cpux[barf] is now known as cpux
04:10 kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has joined #code
04:47 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
05:10
<@Vornicus>
Kaura!
05:12
< kaura>
Vorn!
05:12
<@Vornicus>
Let us continue in our Adventures In Polishing Code!
05:12
< kaura>
Yes, let's!
05:13
<@Vornicus>
ALl right! Where the heck were we!
05:13
< kaura>
Lesse...
05:14
< kaura>
Yesterday, we developed the "soft_draw" function, which basically allowed us to draw x from the deck without going over the deck quantity.
05:14
<@Vornicus>
And as I recall we also did a lot of cleanup work on the draw and user_draw functions.
05:15
< kaura>
Indeed, including adding something to raise a ValueError.
05:15
<@Vornicus>
All right then.
05:15
<@Vornicus>
Let's now do... hm.
05:16
<@Vornicus>
Some small things. Make top, bottom, and shuffle report what they have done; make examine print the same way draw does...
05:19
<@Vornicus>
So for shuffle, instead of returning, um. Whatever it returns, have it return "Deck shuffled."
05:20
< kaura>
It actually doesn't return anything as of right now. So just "return 'Deck shuffled.'"?
05:20
<@Vornicus>
Yep. Same sort of thing with top and bottom.
05:20
< kaura>
Right, plenty easy.
05:21
<@Vornicus>
Then when you're done with that just paste what we've got; I need to see it to tell what the heck's next on our list.
05:23 * Vornicus has two pieces of Crazy Stuff.
05:23
< kaura>
http://pastebin.starforge.co.uk/386
05:24 * Vornicus also has two functions that he thinks still need work even without the crazy, and two new user function.
05:27
<@Vornicus>
Okay, yes. All right. What's Examine do right now?
05:27
<@Vornicus>
Oh. You did that already. Talk about Dan Not Listening.
05:28
<@Vornicus>
Anyway, what else was there. Ah, Search.
05:29
<@Vornicus>
So, if you get the search string wrong and there are no, uh, Basil Thrulls, in the deck, what does it tell you?
05:30
<@Vornicus>
(sic)
05:30
< kaura>
...lemme check...
05:30
< kaura>
"None."
05:31
<@Vornicus>
(we'll not get into the oregano elves, the thyme thallids, or the smoked spanish paprika goblin.)
05:31
< kaura>
Those damn goblins. Too spicy.
05:31
<@Vornicus>
That's kind of a silly response, isn't it. How about we change that.
05:32
< kaura>
Just change the Return line, right?
05:34
<@Vornicus>
Not quite that simple; we need to hang on to the value, check it against None (use "if thing is None:" to compare to None).
05:34
< kaura>
Ah.
05:35
<@Vornicus>
And then return something like "Card found and taken from the deck" for success and then "Card not found!" for None.
05:35
<@Vornicus>
(you can have two return lines if you want; but the thing is that once one is encountered -- and things inside, f'rinstance, an if, get skipped if the if fails)
05:36
< kaura>
Right.
05:40
<@Vornicus>
Anyway show me that when you think you're done.
05:41
< kaura>
...hrn. The search edit's harder than I thought...
05:41
<@Vornicus>
You had better not be editing search; the target is user_search.
05:42
< Tarinaky>
This some kind of MtG thing?
05:42
< kaura>
The edits are in user_search, yeah.
05:42
< kaura>
Tari: Yes, kinda.
05:43
<@Vornicus>
Tarinaky: we're making a deck simulator, with command line interface.
05:43
< Tarinaky>
Is the kinda at the 'mtg' or the 'thing'?
05:43
< Tarinaky>
:p
05:43
< Tarinaky>
Ahhh/
05:43
<@Vornicus>
the former.
05:43
<@Vornicus>
Technically you can use it with any deck-shaped thing.
05:44
<@Vornicus>
Actually I should explain to kaura why we have the separation that we do between the functions that do stuff and the functions that report stuff. Assuming he hasn't figured it out already; it's actually a pretty simple reason.
05:49
<@Vornicus>
kaura: what have you got /right now/
05:51
< kaura>
Vorn: http://pastebin.starforge.co.uk/387
05:51
< kaura>
Stuck on the first If condition. Not sure how to word it.
05:52
<@Vornicus>
...is not None:
05:52
< kaura>
..
05:52 * kaura headdesks
05:52
<@Vornicus>
And don't forget the quotes in the next line. :)
05:53
< kaura>
In my defense, I didn't actually know "is not" was legitimate.
05:53
<@Vornicus>
True, I didn't mention that.
05:54
<@Derakon>
Yeah, "is None" and "is not None" are basically the only times you use the 'is' operator.
05:54
<@Vornicus>
There are ...very occasional other situations, but they're extremely rare.
05:54
< kaura>
Alright, works now.
05:54
<@Derakon>
Hence, "basically"~
05:55
<@Vornicus>
"in" and "not in" are more common but we haven't used them yet.
05:56
<@Vornicus>
(Actually one of the polish things we have to do involves them, but I'm gonna hold off, cuz we need to build another pair of functions first.
05:56
<@Derakon>
"in" can also get you into efficiency problems if you aren't careful when dealing with large datasets.
05:57
<@Vornicus>
By "large datasets", der means "more than a couple thousand"
05:57
<@Derakon>
Yeah.
05:57
<@Vornicus>
and only if those datasets are stored in a list; dictionaries are almost O(1) even for ridiculously large things.
05:58
<@Derakon>
Yep!
05:58
<@Derakon>
Got a factor of 10 speedup on one of my projects by switching from a list to a set.
05:59
<@Vornicus>
we also haven't talked about sets, but we haven't had a situationwhere we needed them.
05:59
<@Vornicus>
Anyway, our next two functions: user_load, and user_reload.
06:01
< Tarinaky>
So. After breakfast do I work on the IF or on the space shooter. Decisions, decisions :/
06:01
<@Vornicus>
user_load will, appropriately, call load, save the deck we get off to the global namespace, and also save the filename off. Oh, and it will catch any errors that load raises! Which are many.
06:01
<@Vornicus>
Iiiiiiiiiin spaaaaaaaaaace
06:01
< kaura>
...>_x Load's gonna do a lot of work, huh?
06:02
<@Vornicus>
Not as much as it sounds like.
06:02
<@Vornicus>
Anyway, now I introduce you to a new keyword: "global"
06:03
<@Vornicus>
Remember how I said that the things you do in a function don't really affect the outside world? But then we went around and did stuff to the outside world /anyway/, using stuff like list.append and random.shuffle?
06:03
< kaura>
Right.
06:04
<@Vornicus>
There is one thing you can't normally do from within a function: assign.
06:04
< kaura>
I was wondering how we were assigning the load_deck value if it was already set...
06:04
< Tarinaky>
(What language is Vorn teaching Kaura?)
06:04
< kaura>
Python.
06:04
<@Vornicus>
Specifically: if I do deck = something in a function, it'll only happen inside the function.
06:04
<@Vornicus>
UNLESS
06:06
<@Vornicus>
we say "global deck" before we do any assigning.
06:07
< kaura>
Ah... so declaring "global (object)" tells Python to make these changes universal in the program.
06:07
<@Vornicus>
yeah. no need for parens.
06:10
<@Vornicus>
So user_load_deck and user_reload will use global to assign to deck.
06:11
<@Vornicus>
user_load_deck will /also/ use global to set a deck file name for later use by reload.
06:12
<@Vornicus>
So, let's start with user_load_deck. Obviously we'll be taking in a string; this we'll call filename.
06:13
< kaura>
Right.
06:14
< kaura>
...I have a feeling it reuses a lot of code from load_deck()
06:14
<@Vornicus>
No, it will /just call/ load_deck.
06:15
< kaura>
...ooooh, I think I see where this is going.
06:15
<@Vornicus>
anyway, before we call anything, say "global deck" and "global deck_filename"
06:15
<@Vornicus>
...actually I'm not sure but I suspect "global deck, deck_filename" works too, but I've never done it that way.
06:16
< kaura>
Eh, just to play it safe...
06:17
<@Derakon>
Vorn: it does.
06:18
<@Vornicus>
ah good.
06:18
<@Derakon>
Kaura: if you ever have a question about how something works, just try it!
06:18
<@Derakon>
This is how I was able to answer authoritatively: http://paste.ubuntu.com/503027/
06:18
<@Vornicus>
yeah, I was poking at it in my terp and getting distracted by AC/DC.
06:21
<@Vornicus>
Anyway, then we call load_deck with filename, and assign that to deck. And then assign filename to deck_filename. /DO THESE IN THIS ORDER/ or you'll encounter an interesting and subtle bug.
06:23
<@Vornicus>
And then wrap all that madness in a try.
06:24
< kaura>
...now that makes me want to try and elicit that interesting and subtle bug. Though I can guess at its form. If you assign deck_filename first, then assign load_deck(filename) to deck, you get the program confused as to where to look, right?
06:24
<@Vornicus>
Nope.
06:24
<@Vornicus>
It's subtler than that, and it involves that try I just told you to wrap it in.
06:24
< kaura>
Alrighty...
06:25
<@Vornicus>
(also, the bug doesn't show up until you've got reload, too.)
06:28
<@Vornicus>
Anyway, in the except (actually it's gonna look like the one in user_draw), just return "Error loading file: " + e. We don't really want to unpack every single error and try to figure out what the
06:28
<@Vornicus>
nice message should be.
06:30
< kaura>
+ e?
06:30
<@Vornicus>
e being the exception; it gets munged into a string when you do that.
06:31
< kaura>
Ah.
06:33
<@Vornicus>
RIght, so show me user_load when you think you've got it together.
06:33
<@Vornicus>
(and also, add it to the dispatch dict)
06:40
< kaura>
...guah, brb.
07:01 Derakon is now known as Derakon[AFK]
07:13
< kaura>
...right. Brainstuck. Pretty sure I'm not comprehending your directions correctly. Brain's kinda pickled in the heat. http://pastebin.starforge.co.uk/388
07:13
<@Vornicus>
Good so far, actually.
07:14
<@Vornicus>
well, mostly.
07:14
<@Vornicus>
we want to use filename, not deck_file in the load_deck; then we want to set deck_file to be filename.
07:14
<@Vornicus>
Then the except: should be the same line we used in user_draw.
07:15
<@Vornicus>
(we set deck_file /after/ loading the deck because doing it /before/ does odd things with reload.)
07:17
< kaura>
Hrm. Getting an error message again. "name 'deck' is local and global."
07:17
<@Vornicus>
Show me
07:18
<@Vornicus>
(and, congratulations: you've now seen an error message that I never have.)
07:18
<@Vornicus>
(so now I'm trying to figure out how you got it.)
07:18
< kaura>
O_o
07:19
< kaura>
Here's the specific bit of code. http://pastebin.starforge.co.uk/389 Here's the full code. http://pastebin.starforge.co.uk/390
07:21
<@Vornicus>
And could you quote me the /exact/ error message.
07:22
< kaura>
There's an eror in your program: ***name 'deck' is local and global (MTGSimulator.py, line 50)
07:22
< kaura>
er, error
07:22
< kaura>
Syntax error
07:23 * Vornicus has a look, tries to trace it.
07:24
<@Vornicus>
...50? What the everloving shit?
07:25
< kaura>
...oh, hold on. Bunch of comments I didn't add to that.
07:25 * Vornicus has no idea how the error ends up showing up in /top/
07:26
< kaura>
There. Now it's... still bizarre. Triggers now on line 45. http://pastebin.starforge.co.uk/391
07:38 * Vornicus cuts stuff out.
07:39
< kaura>
I get the feeling that "global" causes all sorts of changes.
07:40
<@Vornicus>
Shouldn't be that many!
07:43
<@Vornicus>
whaaaat the hellll
07:43
< kaura>
Is this something specific to 2.7? I get the feeling you've definitely used global before, to no problem~
07:46
<@Vornicus>
This isn't specific to... to...
07:48
<@Vornicus>
http://www.fpaste.org/x5vv/ <--- what. the fuck.
07:51
< kaura>
...wat
07:52
< kaura>
There's no actual difference there, huh?
07:52
<@Vornicus>
I see no difference.
07:53
< kaura>
It can't be that specific bit of code, then. Or, rather, some other mention of "deck" is screwing with it...
07:53
< kaura>
...hrm.
07:56
< kaura>
...egh. Can't figure it out.
08:00
<@Vornicus>
dude, I can't figure it out, and I'vebeen doing this for coming up on 9 years.
08:02
< kaura>
...that is weird.
08:03
<@Vornicus>
I have no idea at all what's going on.
08:04 * jerith looks in.
08:05
<@Vornicus>
...what...
08:05
<@Vornicus>
Renaming "top" removes the error.
08:07
<@jerith>
bottom() needs to take a deck as a parameter.
08:07
< kaura>
...that's the conclusion a friend of mine just came to.
08:07
< kaura>
Is "top" a preexisting function?
08:07
<@Vornicus>
Except that completely removing bottom doesn't remove the error.
08:08
<@Vornicus>
It's not!
08:08
<@McMartin>
Are you getting some kind of wacky namespace collision?
08:08
<@Vornicus>
http://codepad.org/Un0VDK7J and http://codepad.org/tRVYGJo7
08:08
< kaura>
Maybe?
08:08
< kaura>
...it's not a preexisting function. And yet changing "top" fixes it.
08:08
< kaura>
Just...
08:08 * kaura eyes Python
08:10
< kaura>
...could it be interfering with this? Friend of mine did a search-up on what "top()" might be used for... http://docs.python.org/library/poplib.html#pop3-objects
08:10
<@Vornicus>
We're not importing pop
08:11
<@Vornicus>
And renaming it to a known existing function ("any") doesn't cause the error either!
08:11
< kaura>
...man, I'm so far out of my depth on this issue...
08:12
<@Vornicus>
Dude, I think everyone in the goddamn /room/ is out of their depth on this issue.
08:12
<@jerith>
Try renaming "deck" inside functions that take it as a parameter.
08:12
<@Vornicus>
A good idea anyway.
08:13
<@Vornicus>
In all the function that take a deck as a parameter, call it my_deck instead.
08:13
<@jerith>
I don't have a new enough Python on this box to test with.
08:13
<@Vornicus>
2.5 or later it works on.
08:13
<@McMartin>
So, uh
08:14
<@McMartin>
In that first codepad
08:14
<@McMartin>
What hapens if you make user_top declare deck global?
08:14
<@McMartin>
Because it doesn't
08:14
<@jerith>
Exception handling is 2.6+, at least.
08:14
<@Vornicus>
No help.
08:16
<@McMartin>
Wait
08:16
<@McMartin>
This works on 2.5+, but not on 2.4-?
08:16 * McMartin wasn't paying attention
08:18
<@McMartin>
Because if so...
08:18
<@McMartin>
From http://www.python.org/download/releases/2.5.5/NEWS.txt
08:18
<@McMartin>
Oops wait
08:18
<@McMartin>
Not that
08:19
<@McMartin>
Bug #1501934: The scope of global variables that are locally assigned using augmented assignment is now correctly determined.
08:19
<@McMartin>
Doesn't seem relevant after all
08:19
<@Vornicus>
Yeah, we're not using augmented assignment.
08:19
<@Vornicus>
(For Kaura: "augmented assignment" is like this: a += 1 is equivalent to a = a + 1)
08:22
<@jerith>
Renaming deck fixes it.
08:22
<@Vornicus>
http://codepad.org/zI2v5xfK <--- error reduced to 4 lines.
08:26
< kaura>
Damn. I can't understand why renaming it fixes it, or why the error came up in the first place. =/ Is "deck" used elsewhere?
08:26
<@McMartin>
I think I know why renaming it fixes it, but I have a test to do first
08:27
<@Vornicus>
Why renaming /top/ fixes it?
08:27
<@McMartin>
No, why renaming deck fixes it
08:27
<@McMartin>
It's because declaring something global anywhere wrecks the whole module's namespace.
08:28
<@jerith>
That would do it, yeah.
08:28
<@jerith>
Because Depp Magic needs to happen.
08:29
<@McMartin>
Renaming top does fix it, though, and I have no idea why.
08:29
<@jerith>
Maybe it's an interaction with something in the module __dict__ and renaming it shoves it into a different hash bucket?
08:30
<@McMartin>
That's 100% wacky right there.
08:30 * jerith puts some clothes on and heads to work.
08:30
<@McMartin>
We should probably tell the devs.
08:30
<@Vornicus>
No, that's 120% wacky.
08:32
< kaura>
@_@ All I wanted was a deck simulator...
08:33
<@McMartin>
You have to realize that this is *awesome*~
08:34
<@Vornicus>
Actually it does bring up something I should have taught a while earlier, but somebody in #python insists I can live completely without globals and I'm pretty sure he's off his gourd there.
08:35
<@McMartin>
You can cheat
08:35
<@McMartin>
class global_vars: pass
08:35
<@McMartin>
def user_top(card): top(global_vars.deck, card)
08:35
<@McMartin>
^_^
08:35
<@Vornicus>
(I do want to make a Deck class though)
08:35
<@Vornicus>
Yeah, that's actually more evil than global.
08:36
<@McMartin>
I know entirely too many people who consider it superior because OBJECTS HOORAY
08:37
<@McMartin>
Anyway, Kaura, we seem to have plausibly found a language bug, which is good, and we have a workaround so you can continue developing, which is good.
08:39
< kaura>
It's like an emergency rope just as the riptide hits~
08:40
<@Vornicus>
But anyway. I need sleep because fighting with a /language bug/ at 3:30 in the morning is not good for my mental health and also because i have to get up tomorrow.
08:41
< kaura>
Haha. Alright. Thanks again, Vorn.
08:41
<@McMartin>
"One of the easiest and most common bugs to be found in IF story worlds is the unexpectedly portable thing. My own work has seen testers happily walking around carrying pneumatic tube systems, bonfires, or in one case, an entire beach."
08:42
< kaura>
I would guess not a few games actually exploit that as a feature.
08:43
<@McMartin>
Wellllll
08:43
<@McMartin>
Objects are either portable or not, and you can pick at will
08:43
<@McMartin>
Picking wrong is the problem.
08:43
<@McMartin>
Having things that shouldn't be taken showing up in mass commands is also problematic.
08:44
<@McMartin>
One unfortunate case killed the player when you typed TAKE ALL out of doors, which included TAKE SUN as a subcommand, which the game would kill the player for entering.
08:45 * kaura winces
08:46
<@Vornicus>
Apparently swapping the order of the functions in the 4-line version fixes the error as well!
08:46
<@McMartin>
AHA.
08:47
<@McMartin>
Sounds like "globalness" is being snuck into the evaluator somewhere
08:47
<@McMartin>
So by one order, deck is just a local and all is well, while in the other order, deck is already a global so you can't name locals that.
08:47 You're now known as TheWatcher
08:47
<@Vornicus>
08:47
<@Vornicus>
08:48
<@Vornicus>
From the source code (svn.python.org/projects/python/trunk/Python/symtable.c), it seems that the parser somehow thinks the body of b is part of the function body of top (i.e. that the parameter and the global are in the same scope). - Aaron Digulla 1 min ago
08:48
<@McMartin>
What are you quoting from?
08:48
<@Vornicus>
http://stackoverflow.com/questions/3828611/strange-python-behaviour-with-mixing- globals-parameters-and-function-named-top/3828673#3828673
09:00
<@Vornicus>
Right, slep.
09:01
<@Vornicus>
Congratulations, kaura: you have found a bug.
09:01
< kaura>
First bug~ Maybe I ought to stencil my laptop. >_>
09:02
<@Vornicus>
It's a /doozy/, too.
09:03
<@Vornicus>
Ni.
09:03 Vornicus is now known as Vornicus-Latens
09:04
< kaura>
G'night
09:17
< kaura>
So, yeah. top is a keyword. An obfuscated one. O_<
09:45 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
09:45 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
09:59 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
10:08 Anno[Laptop] [annodomini@Nightstar-ee9444e9.adsl.tpnet.pl] has joined #code
10:12
< gnolam>
Huh. OpenOffice separates itself from Su... Oracle.
10:12
< gnolam>
I wonder if this means that it can start becoming usable? :P
10:22
< Orthia>
I see you've played knifey-spoonie before.
10:24
< Namegduf>
XD
10:29
<@McMartin>
"now the player is a window"
10:35
<@McMartin>
Ahahahahaha oh god
10:35
<@McMartin>
It's a C preprocessor bug in Python.
10:36
<@McMartin>
Half of the horrors C++ commits are solely so that there is no excuse to ever use the preprocessor for anything ever except #include... and sometimes not that.
10:38
< Namegduf>
Ouch.
10:48
< Orthia>
preprocessor?
10:49
< kaura>
To quote a friend, "a glorified find and replace."
10:50
<@McMartin>
Any line in a C or C++ program that starts with # is actually a command to the preprocessor.
10:52
< gnolam>
And it's the preprocessor because it's run before the actual compilation.
10:54
<@McMartin>
This is not intrinsically a bad thing - in the extreme it becomes a kind of compiler called a "source-to-source translator"
10:56
< Tarinaky>
It has its uses.
10:57
< Tarinaky>
Platform targeting comes to mind.
10:57
<@McMartin>
Conditional debugging statements
10:57
<@McMartin>
But it's not mandatory for either - you can use OBJECTS OMG to get around it, along with Makefile trickery.
10:58
<@McMartin>
(Side note: I have not drunk the OO Kool-Aid. Does it show~)
10:58
< Tarinaky>
The 'glorified find+replace' comes in when you use the preprocessor for Macros and Constants.
10:59
< Tarinaky>
Although C++ makes this somewhat obsolete with the 'inline' keyword.
10:59
< Namegduf>
You can also just leave it to the compiler in C.
11:00
<@McMartin>
Templates cure #i nclud e abuse
11:00
< gnolam>
Although I curse Source on a daily basis, it has some absolutely /beautiful/ macro usage.
11:00
< Tarinaky>
Beautiful?
11:02
< gnolam>
Yup.
11:02
< Tarinaky>
Is this Lovecraftian terrible beauty?
11:02
<@McMartin>
Seraphim are beautiful and terrifying.
11:03
< gnolam>
Want a class member variable to be accounted for on save/load? Just add a DEFINE_FIELD( foo, FIELD_bar ) in the data description.
11:03
<@McMartin>
Oh. Yeah, that's also nice.
11:04
< gnolam>
Want it to be exported and modifyable in Hammer? DEFINE_KEYFIELD( foo, FIELD_bar )
11:04
<@McMartin>
At the C++ level, Qt does that to add proper signal/slot architectures "for free" to C++
11:04
<@McMartin>
(Though they don't use cpp to do it; they use their own "meta-object compiler")
11:05
< gnolam>
Want to replicate a variable from the server to the client? SendPropBool(SENDINFO(fooBool)) in the send table.
11:05
< gnolam>
Etc.
11:06
< gnolam>
Oh, and the whole server/client representation of entities is also entirely macro-based. DECLARE_SERVERCLASS() and DECLARE_CLIENTCLASS() in the server and client, respectively.
11:07
< gnolam>
To summarize: with C's preprocessor comes great responsibility.
11:10 Anno[Laptop] [annodomini@Nightstar-ee9444e9.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
11:10
< Tarinaky>
Unless it's a code obsfucation contest.
11:11
< Tarinaky>
Then feel free to use #defines to implement your code as: 'a b r a c a d a b a r a'
11:22 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
11:22 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
12:00 kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has quit [[NS] Quit: HydraIRC -> http://www.hydrairc.com <- It'll be on slashdot one day...]
12:12 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code
12:19 gnolaptop [wintermute@Nightstar-751bb461.eduroam.liu.se] has joined #code
12:23 cpux is now known as shade_of_cpux
13:36 Orthia [orthianz@Nightstar-12d7c337.xnet.co.nz] has quit [[NS] Quit: brb]
13:39 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: leaving]
13:39 Orthia [orthianz@Nightstar-e7c35db4.xnet.co.nz] has joined #code
13:41 gnolaptop [wintermute@Nightstar-751bb461.eduroam.liu.se] has quit [[NS] Quit: Blargh?]
14:00 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [Ping timeout: 121 seconds]
14:15 Orthia [orthianz@Nightstar-e7c35db4.xnet.co.nz] has quit [Connection reset by peer]
14:15 Anno[Laptop] [annodomini@Nightstar-ee9444e9.adsl.tpnet.pl] has joined #code
14:21 Orthia [orthianz@Nightstar-e7c35db4.xnet.co.nz] has joined #code
14:21 Orthia [orthianz@Nightstar-e7c35db4.xnet.co.nz] has quit [Connection reset by peer]
14:23 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
14:30 Orthia [orthianz@Nightstar-e7c35db4.xnet.co.nz] has joined #code
15:13 Ortiha [orthianz@Nightstar-b3a57fa9.xnet.co.nz] has joined #code
15:15 Orthia [orthianz@Nightstar-e7c35db4.xnet.co.nz] has quit [Ping timeout: 121 seconds]
18:01
< gnolam>
https://lists.internet2.edu/sympa/arc/shibboleth-users/2010-09/msg00304.html
18:04
< gnolam>
I hate it when my error is vomit at goat-time install.
18:19 Vornicus-Latens is now known as Vornicus
18:31
< PinkFreud>
At often, the goat-time install a error is vomit. To how many times like
18:31
< PinkFreud>
the wind, a pole, and the dragon? Install 2,3 repeat, spank, vomit blows
18:31 * PinkFreud collapses to the floor, crying
18:34
< Namegduf>
I've never had a problem with my goat-time install, myself.
18:37
< gnolam>
Well, did you have the dragon intercourse dependency?
18:37
< Namegduf>
...no.
18:37
< Anno[Laptop]>
http://www.jwiltshire.org.uk/content/2010/09/30/locusts/
18:38
< gnolam>
Well, there you go. There's just no way to insult father's stones without it.
18:45
< Tarinaky>
I like "Please apologize for your stupidity."
18:53
< PinkFreud>
Tarinaky: that one makes me wonder if it's just not an epic troll.
18:53
< Tarinaky>
I dunno, it's less of a mistranslation than dragon vomit.
18:56
< PinkFreud>
dragon vomit, father's stones, and please apologize for your stupidity
19:07 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
19:07 mode/#code [+o Derakon] by Reiver
19:07 * Derakon eyes this CLI program he's working on making a pretty front-end fo.
19:07
<@Derakon>
Er, for.
19:08
<@Derakon>
14 parameters that can easily be represented by a text box or checkbox. 15 that can't be.
19:08
<@Derakon>
The documentation is 9192 words of fairly dense optics.
19:09
<@Derakon>
(In contrast, the other two programs I'm frotning have 6 and 11 parameters, with 1 and 4 specials, respectively)
19:12 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Client closed the connection]
19:13
< Anno[Laptop]>
I'm trying, unsuccessfully, to unrar a multipart archive. Under Debian. Help?
19:17
< ToxicFrog>
(un)rar x archive.rar
19:17
< ToxicFrog>
Or archive.001 or whatever the first segment is named.
19:19
< PinkFreud>
Derakon: don't let that stop you. I once came across a wireless router with an amazing web interface. Whomever wrote it *loved* drop-down boxes, going so far as to use them for seperate hour, minute, and second fields to set the time.
19:19
< Anno[Laptop]>
They are named weirdly. SOMETHING.partX.rar"
19:20
< ToxicFrog>
So...unrar x something.part1.rar?
19:20
< Anno[Laptop]>
Extracting failed.
19:20
< Anno[Laptop]>
It doesn't elaborate why.
19:20
<@Derakon>
PF: I'm mostly just annoyed that the awesome makeForm function I made is only sufficient for half of this particular project, instead of most of it as it was for the other two.
19:20
< PinkFreud>
of course, the drop down boxes for setting the time weren't the most amusing part - that was reserved for the contents of the Hour drop-down, which had 01-23. If you tried to set the time on the device between midnight and 12:59:59, you were SOL.
19:20
< ToxicFrog>
unrar t?
19:21
<@Derakon>
PF: ...I don't follow.
19:21
< Anno[Laptop]>
I got a list of stuff that's in there, being that one file.
19:22
< ToxicFrog>
That's odd. t is test; if it succeeds with t it should succeed with x.
19:22
< PinkFreud>
Derakon: Imagine drop-down listboxes used for setting the hours, minutes, and seconds field on a device.
19:22
<@Derakon>
Sure.
19:22
< ToxicFrog>
You're sure there's no other output? Mine is quite verbose.
19:22
< PinkFreud>
Now, imagine the Hours listbox contains numbers 01 - 23.
19:22
<@Derakon>
Yes.
19:22
< PinkFreud>
How many hours are there in a day?
19:22
<@Derakon>
Oh, right.
19:22
< PinkFreud>
:)
19:23
<@Derakon>
Sorry, my brain is a bit fuzzed from reading optics stuff I barely understand.
19:23
< Anno[Laptop]>
Extracting WinLite.iso Failed
19:23
< Anno[Laptop]>
1 Failed
19:23
<@Derakon>
You could have just said that it should start from 0~
19:23
< Anno[Laptop]>
That's the meaningful output.
19:23
< PinkFreud>
Derakon: sorry, thought that'd be obvious. :)
19:23
< PinkFreud>
... then again, it wasn't obvious to whoever WROTE the damn thing.
19:23
< ToxicFrog>
But unrar t succeeds with "All OK"?
19:24
< ToxicFrog>
Try 'unrar t -v'
19:24
< Anno[Laptop]>
It doesn't go "All OK". It lists the files within the archive.
19:24
< ToxicFrog>
If that fails, tell me what your version line is.
19:25
< Anno[Laptop]>
unrar 0.0.1 Copyright (C) 2004 Ben Asselstine, Jeroen Dekkers
19:25
< ToxicFrog>
Because t should extract all files in the archive to memory, reporting each one as "OK" or "FAILED", and then provide a summary
19:25
< ToxicFrog>
.......um
19:25
< ToxicFrog>
My copy is terribly out of date. It's 3.90 released 2009.
19:26
< Namegduf>
Debian stable is on 3.8.2
19:26
< Namegduf>
"WTF" seems appropriate.
19:27
< ToxicFrog>
Try installing "unrar" or "unrar-nonfree"; "unrar-free" hasn't been updated in six years and didn't work properly even when it was under development.
19:27
< ToxicFrog>
And, in particular, does not and never has supported 3.x format archives.
19:27
< Anno[Laptop]>
Okay. I don't have "unrar" or "unrar-nonfree" in my repositories. Which one is it in?
19:27
< ToxicFrog>
Which at this point is "all of them".
19:28
< ToxicFrog>
I don't know. On SUSE and Mint it's available by default.
19:29
< ToxicFrog>
Is 7zip available?
19:29
< PinkFreud>
shouldn't 7zip handle rar?
19:29
< ToxicFrog>
That will also handle RAR files.
19:29
< PinkFreud>
ToxicFrog: ahh, heh
19:29
< Namegduf>
Hold on a sec.
19:30 * Anno[Laptop] checks contrib and non-free in Synaptic, tries to find.
19:30
< Namegduf>
Edit /etc/apt/sources.list
19:30
< ToxicFrog>
7z shouldn't be in nonfree.
19:30
< Namegduf>
Add "contrib non-free" to the end of the line ending in /debian/
19:30
< ToxicFrog>
Here it's called "p7zip" and "p7zip-full"
19:30
< PinkFreud>
7z with rar support may be in nonfree
19:30
< Namegduf>
After "main"
19:30
< ToxicFrog>
It Mint it's in universe/utils
19:30
< Anno[Laptop]>
Namegduf: I've found that using Synaptic is easier for managing repositories.
19:31
< ToxicFrog>
...aah, but it suggests p7zip-rar
19:31
< ToxicFrog>
Which is in multiverse
19:31
< ToxicFrog>
And described as "non-free rar module for p7zip"
19:32
< Namegduf>
Anno[Laptop]: Well, at any rate, the lack of the right repository is your problem.
19:32
< Anno[Laptop]>
I know. I've fixed this problem.
19:33
< Namegduf>
Okay, good.
19:33
< Anno[Laptop]>
And now archive manager properly extracts this.
19:33
< Namegduf>
Hmm, which program is that?
19:33 * Namegduf lacks one, is lazy and just uses a terminal for everything.
19:34
< ToxicFrog>
The ultimate lazy for unpacking things from the terminal is 'unp'~
19:34
< ToxicFrog>
For GNOME it's fileroller, which is just a graphical frontend to the command line programs AIUI.
19:35
< Anno[Laptop]>
Namegduf: The one that came pre-installed. It's called Archive Manager.
19:36
< Namegduf>
Hmm.
19:36
< Namegduf>
That's probably file-roller.
19:36 * Namegduf didn't have X preinstalled, so he lacked this stuff.
19:37
< Namegduf>
Thanks.
19:45 NSJavaGuest-6237 [nsJChat@D67F99.6F373B.E88B12.2EFA7F] has joined #code
19:47 * ToxicFrog pokes MPI with a stick
19:48 NSJavaGuest-6237 [nsJChat@D67F99.6F373B.E88B12.2EFA7F] has left #code []
20:01 Ortiha [orthianz@Nightstar-b3a57fa9.xnet.co.nz] has quit [Connection reset by peer]
20:05 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
20:08 Orthia [orthianz@Nightstar-b3a57fa9.xnet.co.nz] has joined #code
21:14
< ToxicFrog>
Hrm.
21:15
< ToxicFrog>
At some point since I last used it my openMPI install has stopped working.
21:15 * Derakon mutters at vim.
21:16
<@Derakon>
Any time I want to comment out an indented line that's at the start of its own block, vim insists on putting the comment right before the first non-whitespace character in the line, instead of at the start of the line like I want.
21:16
<@Derakon>
(When I'm in insert mode, anyway)
22:25 ProbNotTentacleBot [nsJChat@83BF1D.D1B1BC.945C80.50A791] has joined #code
22:28 ProbNotTentacleBot [nsJChat@83BF1D.D1B1BC.945C80.50A791] has quit [[NS] Quit: Nightstar's Java Chat http://www.nightstar.net]
22:30 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
23:06 Rhamphoryncus [rhamph@FFAAA3.3FB6E7.D3A0EC.A9CC80] has joined #code
23:09 * Derakon eyes the documentation for this particular field, glazes over.
23:10
<@Derakon>
If you use a measured CTF to characterize the imaging system, the CTF will
23:10
<@Derakon>
generally include the effects due to the non-zero size of the pixels; however if
23:10
<@Derakon>
you use a pupil function to characterize the imaging system, it will not include
23:10
<@Derakon>
those effects. The deconvolution application can model the effects of the
23:10
<@Derakon>
non-zero pixel size and combine them with the input CTF or pupil function for use
23:10
<@Derakon>
in the deconvolution. The model for the pixels is that they are all rectangles
23:10
<@Derakon>
with the same dimensions and that they are uniformly sensitive across their
23:10
<@Derakon>
surface. The values in the "Detector fill factor" set the x and y dimensions for
23:10
<@Derakon>
the modeled pixels. The dimensions are set as multiples of the pixel spacing
23:10
<@Derakon>
reported in the input volume's header. If you use a CTF to characterize the
23:10
<@Derakon>
imaging system, the default values for the dimensions are both zero: no modeled
23:10
<@Derakon>
effects of non-zero detector size will be included since a measured CTF normally
23:10
<@Derakon>
includes those effects. If you use a pupil function to characterize the imaging
23:10
<@Derakon>
system, the default values for the dimensions are both one: there are no
23:10
<@Derakon>
insensitive areas on the CCD at the edges of pixels.
23:10
<@Derakon>
...oops.
23:10
<@Derakon>
Meant to paste this: http://paste.ubuntu.com/503538/
23:10
<@Derakon>
Mea culpa.
23:11
< Anno[Laptop]>
How did you do perpetrate this without floodkick?
23:15 Orthia [orthianz@Nightstar-b3a57fa9.xnet.co.nz] has quit [Ping timeout: 121 seconds]
23:17
< ToxicFrog>
Because his client throttles the rate at which it sends commands so as not to exceed the recvq limit?
23:21 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Connection closed]
23:21
<@Derakon>
Okay, this form is getting out of control. http://derakon.dyndns.org/~chriswei/temp2/processor.png
23:27
< Anno[Laptop]>
Deconvolve?
23:27
<@Derakon>
It's a method for removing out-of-focus light from collected microscopy data.
23:28
< Anno[Laptop]>
Sounds depraved.
23:28
<@Derakon>
Spoken like a man who doesn't know what he's talking about.
23:28
<@Derakon>
Or woman.
23:28 * Derakon shrugs.
23:28
<@McMartin>
Convolution is a matrix operation.
23:29
<@McMartin>
I assume deconvolution is its inverse
23:29
<@Derakon>
I'm not actually all that familiar with the specifics, but basically it guesses what the actual sample is shaped like, runs that guess through a series of transforms that mimic the optics of the microscope, and compares that to the image data.
23:29
< Anno[Laptop]>
Derakon: Relax. I'm only joking. Also, male.
23:29
<@Derakon>
Then it uses the difference between the guess and the data to refine the guess.
23:50 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving]
23:51 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
23:57 shade_of_cpux is now known as cpux
23:59 Anno[Laptop] [annodomini@Nightstar-ee9444e9.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
--- Log closed Fri Oct 01 00:01:00 2010
code logs -> 2010 -> Thu, 30 Sep 2010< code.20100929.log - code.20101001.log >