code logs -> 2010 -> Wed, 03 Nov 2010< code.20101102.log - code.20101104.log >
--- Log opened Wed Nov 03 00:00:26 2010
00:33 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [Connection closed]
00:38 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
00:43 Attilla [Some.Dude@Nightstar-31ae674d.threembb.co.uk] has quit [[NS] Quit: ]
00:47 Orthia [orthianz@Nightstar-83bdff96.xnet.co.nz] has quit [Connection reset by peer]
00:52 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has joined #code
00:54 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code
01:02 Derakon[AFK] is now known as Derakon
01:39
< celticminstrel>
Okay, why does making my prompt bold break linewrapping?
01:40
< celticminstrel>
And history navigation, too.
01:40
< celticminstrel>
This is Mac Terminal, if anyone is wondering.
01:48
<@ToxicFrog>
Probably you've made a mistake while making it bold.
01:48
< celticminstrel>
I used $(tput bold) and $(tput sgr0).
02:00
< celticminstrel>
No suggestions?
02:07 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:10
< celticminstrel>
This is entirely unrelated, but how do I get a link error in a .o file whose name corresponds to none of the input source files? :|
02:11
<@ToxicFrog>
I have no experience with tput, sorry
02:12
<@ToxicFrog>
What's the name?
02:13
< celticminstrel>
It's an insanel-- oh wait, you mean the object file name.
02:14
<@ToxicFrog>
Depending on what you're building and on one system, there may be one or more .o files that are linked in automatically, for example, the pre-main function
02:14
< celticminstrel>
It seems to vary each time the compiler is run.
02:14
< celticminstrel>
Most recent was cch5BGuT.o
02:14
<@ToxicFrog>
Oh, that looks like a randomly generated temporary filename!
02:15
<@ToxicFrog>
Are you using seperate compile and link steps?
02:15
< celticminstrel>
The missing symbols are insanely long template names. (I'm compiling Boost.Wave manually here, for info.)
02:15
<@ToxicFrog>
Or just going straight from source to binary?
02:15
< celticminstrel>
Um, I'm going from source to .o?
02:15
< celticminstrel>
And this happens on that step.
02:15
<@ToxicFrog>
That's not possible.
02:15
< celticminstrel>
Huh?
02:15
<@ToxicFrog>
Source -> .o is compilation, not linking; it is not possible for link errors to occur during this step.
02:15
< celticminstrel>
I know!
02:16
<@ToxicFrog>
Either it's not a link error, or you aren't doing what you think you are.
02:16
< celticminstrel>
That's partly why I'm confused.
02:16
<@ToxicFrog>
Paste the command you're using.
02:16
< celticminstrel>
Well, it says "undefined symbols".
02:16
< celticminstrel>
g++ $(WARNINGS) $(INCLUDES) cpp.cpp -o cpp.o 2>> error.log
02:17
<@ToxicFrog>
That's not compile, that's compile+link
02:17
< celticminstrel>
I thought you just said it's compiling. 9_9
02:17
<@ToxicFrog>
You said that you were going from source to .o
02:17
< celticminstrel>
Which is what I'm doing.
02:17
<@ToxicFrog>
I am telling you that that's not what you're doing; you're going from source to program which you have a .o extension on.
02:17
<@ToxicFrog>
You're telling gcc to compile the file cpp.cpp, then link it into a program called "cpp.o"
02:17
< celticminstrel>
...oh.
02:18
<@ToxicFrog>
As opposed to compile cpp.cpp to object code stored in cpp.o, which will be used for linking later.
02:18
<@ToxicFrog>
Try using the "-c" option.
02:18
< celticminstrel>
In any case, the problem still occurs when I specify the libraries to link to.
02:18
<@ToxicFrog>
I'm heading out now, but I can go into detail in an hour or so
02:19
< celticminstrel>
Still have the errors on the link stage... but now they are in cpp.o as I would expect.
02:20
< celticminstrel>
I would assume this means I just need to figure out which library I'm missing.
02:20
< celticminstrel>
...or more likely it's that I haven't compiled the Wave source files.
02:21 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
02:24 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has quit [Client closed the connection]
02:25 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has joined #code
02:25 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has quit [Client closed the connection]
02:33 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has joined #code
02:41
< celticminstrel>
Well, I got undefined symbols down to just one. That's always good.
02:41
< celticminstrel>
I'm not sure what I did differently than last night, but it seems to be working a lot better now.
02:42 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has quit [Client closed the connection]
02:44 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has joined #code
03:08
<@ToxicFrog>
celticminstrel: is there a reason you're not using whatever build system (make, etc) Wave comes with?
03:08
<@ToxicFrog>
But yes, generally this means either you haven't compiled all the parts of the program you need to link, or you have but you're forgetting one or more libraries.
03:09
< celticminstrel>
Apparently, the final link error is because one one of the source files only includes the crucial part if a constant is 0, and the constant is defined as 1 in a header.
03:10
<@ToxicFrog>
This really does sound like "I'm trying to compile it by hand, but there is additional stuff that needs to be done that the build system normally handles"
03:10
< celticminstrel>
At least, it looks that way.
03:12
< celticminstrel>
Unless I read it wrong.
03:13
<@ToxicFrog>
-that- sounds like an optional feature that some files were compiled with and some without.
03:13
<@ToxicFrog>
<ToxicFrog> celticminstrel: is there a reason you're not using whatever build system (make, etc) Wave comes with?
03:13
< celticminstrel>
Yeah.
03:14 Kaura [kaura@A2BA3E.5613D5.A7C357.372C7B] has joined #code
03:14
< Kaura>
Teh Vorn
03:14
<@Vornicus>
Teh Kaura
03:14
<@Vornicus>
I have actually forgotten where we were.
03:15 Roscoe [Roscoe@5CB9D8.0096B4.EDCEE2.CEC675] has joined #code
03:15
< Kaura>
I have too, but you have really bad timing on this. I just did another round of Pills, like, five minutes ago. =/
03:16
<@Vornicus>
Whups
03:16
<@Vornicus>
Sowwy
03:16
< Kaura>
Eh, nobody's fault but the damn drugs~
03:20
<@ToxicFrog>
celticminstrel: And that would be?
03:20
< celticminstrel>
I want to fiddle with it.
03:23
<@Vornicus>
With the build setup?
03:23
<@Vornicus>
Because if you're just changing code, you don't need to change the build setup, unless you're doing drastic changes.
03:24
< celticminstrel>
I'm not entirely sure what changes I'm doing yet.
03:26
<@Vornicus>
Then use the already-built build system. There's no point trying to fuck with it until you know the system inside and out.
03:26
<@Vornicus>
Or, you know, it's obviously busted.
03:26
< celticminstrel>
I guess I can try that...
03:27
< celticminstrel>
Hm, duplicating the code from that one file results in a duplicate symbol error, so why do I get undefined symbol otherwise?
03:28
<@ToxicFrog>
...
03:28
<@ToxicFrog>
Start with a clean source tree, commit it to version control, use the included build system to verify it builds, then start fiddling with it.
03:29
< celticminstrel>
Working on this.
03:57
< celticminstrel>
Well, I got it to link without using the Boost build system.
04:00
<@ToxicFrog>
Why are you so insistent on not using the build system it comes with?
04:01
< celticminstrel>
Because there's no easy way to isolate just the one library from the build system; if using the Boost build system it insists on also compiling the Boost libraries upon which it depends rather than just dynamically linking to them.
04:02
< celticminstrel>
I see no reason to rebuild Boost.Filesystem (for example) when it's already build on my system and I'm only fiddling with Boost.Wave.
04:04
<@ToxicFrog>
Aah.
04:06
< celticminstrel>
I did try, but I gave up after a few attempts.
04:06
< celticminstrel>
The only remaining issue (as far as I know) is that dyld can't find them.
04:11
< celticminstrel>
Which is probably because they're in an unusual location, which is easily fixed.
04:13
<@ToxicFrog>
...what OS are you building on?
04:14
< celticminstrel>
Mac
04:14
< celticminstrel>
I installed them manually though.
04:17
<@ToxicFrog>
celticminstrel: also, you didn't try, say:
04:17
<@ToxicFrog>
./bootstrap.sh --with-libraries=wave
04:17
<@ToxicFrog>
./bjam
04:17
< celticminstrel>
...true.
04:18
< celticminstrel>
I only tried bjam, having recently installed the latest version.
04:19
<@ToxicFrog>
I believe bjam itself also supports --with-libraries, going by its --help
04:19
<@ToxicFrog>
(presumably if you, say, ran bootstrap to prepare everything but don't want to build everything just yet)
04:21
< celticminstrel>
Yeah, I tried that, but it tried to build filesystem anyway.
04:21
< celticminstrel>
(Because Wave depends on Filesystem.)
04:22
<@ToxicFrog>
Aah.
04:24
<@Vornicus>
what's Wave?
04:58 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
05:14 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:28 Ortiha [orthianz@Nightstar-3e40c65b.xnet.co.nz] has joined #code
05:31 Orthia [orthianz@Nightstar-a885237f.xnet.co.nz] has quit [Ping timeout: 121 seconds]
05:36 Derakon is now known as Derakon[AFK]
06:11 Ortiha [orthianz@Nightstar-3e40c65b.xnet.co.nz] has quit [[NS] Quit: Going dooooown...]
06:15 cpux is now known as shade_of_cpux
06:20 Orthia [orthianz@Nightstar-3e40c65b.xnet.co.nz] has joined #code
06:33 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [Client closed the connection]
06:34 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code
08:27 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
08:35 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
08:52 Vornicus is now known as Vornicus-Latens
09:10 Kaura is now known as Kaura|zzz
09:17 You're now known as TheWatcher
09:23 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Ping timeout: 121 seconds]
09:53 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
10:02 Roscoe [Roscoe@5CB9D8.0096B4.EDCEE2.CEC675] has quit [[NS] Quit: ]
11:33 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
11:41 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code
11:46 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has quit [Ping timeout: 121 seconds]
13:43 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
14:19 * ToxicFrog ponders event handling
14:19
<@ToxicFrog>
So, it works like this: when an event E is received by an object, it does the following:
14:19
<@ToxicFrog>
- call self:E_before
14:20
<@ToxicFrog>
- foreach child, repeat this process on the child
14:20
<@ToxicFrog>
- call self:E
14:20
<@ToxicFrog>
- if any of the above return true, immediately return true (without making further calls)
14:20
<@ToxicFrog>
- return false
14:21
<@ToxicFrog>
So, event handlers return true to mean "I've handled this" or false for the converse.
14:21
<@ToxicFrog>
Now, however, I find myself needing a third option: "my children shouldn't see this event, but I haven't handled it myself"
14:22
<@ToxicFrog>
At present I've just rigged it so that a return of "skip" means this, but that feels ugly and hackish.
15:48 Anno[Laptop] [annodomini@Nightstar-09acd4e7.adsl.tpnet.pl] has joined #code
15:49 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
15:49 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
16:25 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
16:26 mode/#code [+o Derakon] by Reiver
16:28 * Derakon mutters at printf, tries to get right-justification on floats.
16:28
<@Derakon>
"%4d" % 12 prints " 12", but "%4.4f" % 12.34 prints "12.3400"
16:28
<@Derakon>
Oh wait, right.
16:28
<@Derakon>
The first number is the width allocated to the entire number, not to the bits to the left of the decimal sign.
16:29
<@Derakon>
Thanks~!
16:29
< celticminstrel>
First number is width. Second number is precision.
16:29
< celticminstrel>
...who're you thanking?
16:29
<@Derakon>
The channel in general.
16:30
< celticminstrel>
I don't remember whether right-justification is default or '-'.
16:30
<@Derakon>
Never underestimate the value of an audience when you have a problem to solve.
16:30
<@Derakon>
Right-justified is default.
16:30
<@Derakon>
Putting a '-' after the % makes it left-justified.
16:31 kwsn [kwsn@Nightstar-1def9d24.dyn.centurytel.net] has quit [[NS] Quit: BEEP BEEP IMMA JEEP]
16:31
< celticminstrel>
See, I just look it up on cplusplus.com or man when I need to use it.
16:32
<@Derakon>
It's important to know the basics off the top of your head, though, so you at least know what is possible.
16:32
< celticminstrel>
I do know the basics.
16:32
<@TheWatcher>
Ah, #code: problem solving via Genius Loci >.>
16:32
< celticminstrel>
Hehe.
16:41
< celticminstrel>
Does 'port list' always return an up-to-date list or is there a command to update the list?
16:48
< Anno[Laptop]>
I'm trying to use a third-party application to connect to the internet using a cellular USB modem. It *seems* to work, since the application reports no errors when I select the configuration I believe to be correct, but I don't get a ppp interface from ifconfig when I check, and the last time I disconnected from my LAN to check, I couldn't browse the internet. Could it be that wicd or something is interfering with the cellular ...
16:48
< Anno[Laptop]>
... access?
17:03
<@ToxicFrog>
Hrm.
17:03
<@ToxicFrog>
The chess module is written so that it creates a bunch of objects, then assembles them into a heirarchy with add().
17:03
<@ToxicFrog>
This created problems because add() wasn't propagating, so if chess was loaded, no-one else saw the board or pieces - they were created but unattached.
17:05
<@ToxicFrog>
I made add() propagate, but that broke drop, because drop uses moveto which uses add/remove.
17:06
<@ToxicFrog>
I could resolve this by making add() not propagate again, and having the chess module assemble the tree leaves-first, but this can get ugly, especially for larger modules.
17:07
<@ToxicFrog>
I could make add/remove propagate and rewrite drop instead to call those from the server, which may be a better approach - or rather, the general principle that "things that alter the gamestate always propagate, this is not transitive"
17:07
<@ToxicFrog>
(although this may greatly increase network traffic)
17:08
<@ToxicFrog>
Or I could add new API functions for propagated add or similar.
17:24 Attilla [Some.Dude@Nightstar-869518dc.threembb.co.uk] has joined #code
17:24 mode/#code [+o Attilla] by Reiver
17:26
<@Derakon>
Anyone care to examine the slides I've made for my presentation? http://derakon.dyndns.org/~chriswei/temp2/slides/
17:26
<@Derakon>
(Click on the image to go to the next)
17:29
<@Derakon>
The overall goal is to provide examples of some basic operations in Python, to people who may know how to program but have never been formally trained in the art.
17:31 * TheWatcher notes a problem on the first slide
17:31
<@TheWatcher>
it should be 'SCIENCE!' ¬¬
17:31
<@Derakon>
Right.
17:31
<@TheWatcher>
Ahem.
17:31
<@Derakon>
Maybe I should write "Wissenschaft" in there?
17:31 * TheWatcher continues
17:32
< celticminstrel>
The slide entitled "Array Slices" is in fact about string formatting.
17:32
<@Derakon>
Oh, I forgot to change the title when I copied the slide boilerplate. Thanks.
17:33
< celticminstrel>
Or the slide about string formatting is entitled "Array Slices". Either way works.
17:34
<@TheWatcher>
I assume the slide on MRC files will actually involve a definition of what MRC files are?
17:35
< celticminstrel>
The output on the actual slide on Array Slices includes the full array, but there is no corresponding print statement.
17:35
< celticminstrel>
That is, there is no "print foo" before the "print foo[0:5]".
17:35
<@Derakon>
TW: it's something my audience will know about.
17:36
<@TheWatcher>
fairynuff
17:36
<@Derakon>
They're the file format used to store images taken by our microscope.
17:36
<@Derakon>
Celtic: whups.
17:36
<@Derakon>
Thanks again.
17:37
<@Derakon>
...unfortunately, I don't have room to insert a "print foo" line. ?.?
17:40 * Derakon just removes the first line in the output section.
17:44
<@Derakon>
Hm, don't think I'll include any detailed commandline argument handling.
17:44
<@Derakon>
Also, Python's new string formatting system is nifty but only in 2.7 and later.
17:45
< celticminstrel>
What?
17:45
< celticminstrel>
The {} stuff?
17:45
<@Derakon>
Yeah.
17:45
<@Derakon>
As opposed to the printf-style formatting.
17:45
< celticminstrel>
I thought it was available in 2.6
17:46
<@Derakon>
Oh, you're right.
17:46
<@Derakon>
Still, most of the code around here runs on 2.5. :\
17:46
< celticminstrel>
Yeah, looks like it's not in 2.5.
17:46
<@ToxicFrog>
Hmm.
17:47
<@ToxicFrog>
Building the tree leaves-first result in it not rendering.
17:47
< celticminstrel>
Huh, I have five separate versions of Python installed, apparently.
17:47
<@ToxicFrog>
I think have a bug somewhere else now.
18:00 * Derakon tries to figure out why his slides are 808x616 pixels instead of 800x600 pixels.
18:03
<@Derakon>
Ehh, nothing a little imagemagick cropping can't fix.
18:08
<@Derakon>
Anyway, any topics you think I should be covering that I missed?
18:36 Orthia [orthianz@Nightstar-3e40c65b.xnet.co.nz] has quit [Connection reset by peer]
18:40 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
18:44
<@Derakon>
Hey, Rhamph, care to take a look at the slideshow for the presentation I'm giving this Friday? It's introducing biologists to Python.
18:44
<@Derakon>
http://derakon.dyndns.org/~chriswei/temp2/slides/
18:44
<@Derakon>
Click on each slide to advance to the next.
18:44
< Rhamphoryncus>
alright
18:45
< Rhamphoryncus>
python's REPL is usually called the interactive interpreter
18:47
< Rhamphoryncus>
if n < 0: return None? That's bizarre
18:47
<@Derakon>
What should I return?
18:48
< Rhamphoryncus>
It's a different type. Either it should be a well-defined numeric value or it should be an exception, ValueError
18:48
<@Derakon>
Hm.
18:48
<@Derakon>
You've a point, but I wanted to introduce the None type...
18:48
< Rhamphoryncus>
introducing None should involve "is"
18:48
<@Derakon>
Fair point. Hm.
18:50
< Rhamphoryncus>
I'd use test2.py, not test-2, as the latter can't be imported
18:50
<@Derakon>
Fair.
18:50
< Rhamphoryncus>
And unlike integer division (which also made me twitch) that's not something useful to know about :)
18:51
<@Derakon>
Heh.
18:51
<@ToxicFrog>
Hrm.
18:51
< Rhamphoryncus>
Any back button in the slideshow?
18:51
<@ToxicFrog>
Ok, I now have a working leaves-first approach, but it's so ugly and so fragile that I don't feel at all comfortable committing to this design.
18:51
<@Derakon>
No, sorry.
18:51
<@Derakon>
But it'll loop around, or you can hit refresh to start over.
18:53
< Rhamphoryncus>
Files and strings shadows id and type
18:53
<@Derakon>
I don't follow...
18:54
<@Derakon>
Oh, the id and type variables are reserved names?
18:54
< Rhamphoryncus>
id and type are both builtin functions. You use them for local variables
18:54
<@Derakon>
Will change, danke.
18:55
< Rhamphoryncus>
String formatting makes me wonder about str() and repr(). For that matter, .format()
18:55
<@Derakon>
I'm sticking to features available in 2.5.
18:55
<@Derakon>
So .format() isn't available.
18:55
< Rhamphoryncus>
alright
18:56
<@Derakon>
str() and repr() (and type conversion in general) would probably be useful though.
18:56 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
18:56
< Rhamphoryncus>
yeah. Might need an extra slide though
18:56
<@Derakon>
Very likely.
18:58
< Rhamphoryncus>
For instance, list doesn't provide __str__ so str() falls back to __repr__, which is why the contents of the list also use repr()
18:58
<@Derakon>
That's pretty detailed, though.
18:58
<@Derakon>
Very likely I'll only mention str(), int() and float().
18:58
< Rhamphoryncus>
and there's the x == eval(repr(x)) contention, but that's explicitly something people should NOT use personally
18:58 * Rhamphoryncus nods
18:58
<@Derakon>
Similarly I'm not mentioning dicts.
18:58
<@Derakon>
And tuples are getting finessed.
18:59 * Derakon changes id => num, type => flavor.
19:00
< Rhamphoryncus>
oi, took me a minute to parse the numpy array example. Probably okay if you're explaining it though
19:00 * Derakon nods.
19:01
< Rhamphoryncus>
Blank lines in the output would help
19:01
<@Derakon>
I'm fitting each slide into 800x600.
19:01
<@Derakon>
I suppose I could split across slides...
19:01
< Rhamphoryncus>
eh
19:03
< Rhamphoryncus>
Array slices numpy style has an out of place )
19:04
< Rhamphoryncus>
line 3 of output
19:04
<@Derakon>
Whoops, where'd that come from? Good eye.
19:06
< Rhamphoryncus>
I've no clue about mrc or priithon stuff
19:07
<@Derakon>
Yeah, that's specific to our labs.
19:07
<@TheWatcher>
I was amused at the note about documentation there, though >.>
19:07
< Rhamphoryncus>
The outline is kinda deceptive
19:08
<@Derakon>
Yeah, some of the items there only get one slide.
19:10
< Rhamphoryncus>
aww man, 3 days downloading a video and it uses a codec I don't have x_x
19:14
<@Derakon>
Okay, so: work "is" into None example, add type conversion. Already got the id/type, test-2.py, and parentheses fails.
19:15
<@Derakon>
Thanks, Rhamph!
19:15
< Rhamphoryncus>
np
19:16
<@Derakon>
And now, lunch.
19:24
< gnolam>
http://www.ymacs.org/demo/
19:44
<@Derakon>
Oh, Gnolam!
19:44
<@Derakon>
I have an OpenGL problem I've been wrestling with.
19:44
<@Derakon>
I don't suppose you'd be interested in taking a look?
19:44
<@Derakon>
There's a description here with screenshots: http://www.gamedev.net/community/forums/topic.asp?topic_id=586323
19:44
< gnolam>
Will look as soon as I get back from the grocery store.
19:45 * Derakon nods.
19:57
<@Derakon>
There, new type-conversion slide: http://derakon.dyndns.org/~chriswei/temp2/slides/06b.png
19:59 * Tarinaky blinks.
20:09
<@Derakon>
Yes?
20:12
< Tarinaky>
I don't get the slide.
20:12
< Tarinaky>
I -assume- this is because I'm missing the rest of the presentation plus the lecture notes :p
20:13
<@Derakon>
Heh.
20:13
<@Derakon>
Here's the entire slideshow: http://derakon.dyndns.org/~chriswei/temp2/slides/
20:13
<@Derakon>
It's basically "Okay, you know the basics of how to program. Here's how to program in Python."
20:14
<@Derakon>
With a side-dish of "Here's some domain-specific stuff for the data you're manipulating."
20:16
< Tarinaky>
Ahhh. Python.
20:16
< Tarinaky>
That'll be why it all looks horribly wrong :p
20:16
<@Derakon>
Ahh, I'm guessing you're one of those people that thinks that semantically-void curly braces and semicolons are the sign of a proper language. :p
20:17
< celticminstrel>
Semantically-void?
20:17
<@ToxicFrog>
celticminstrel: "without semantics", ie, having no effect on the behaviour of the program and existing only as hints for the parser
20:17
<@Derakon>
As a matter of practice, curly braces are redundant when combined with sensible code styling.
20:18
< celticminstrel>
TF: Oh, when you put it that way, it makes sense.
20:18
<@jerith>
Syntactic sugar causes cancer of the semicolon.
20:18
< Tarinaky>
Derakon: I prefer not to assume sensible code styling :p
20:18
< celticminstrel>
I was going to say "how are the semantically void?"
20:18
<@Derakon>
Tarinaky: I prefer not to work with people who can't manage sensible code styling. :p
20:18
<@ToxicFrog>
That said, you need something to delimit blocks; python uses indentation, C uses curlybraces, Lua uses do..end
20:18
<@jerith>
Tarinaky: That's why it's nice to have it syntactically enforced.
20:19
< Tarinaky>
Anyway. Nothing to do with 'proper languages' It's just not the languages that I'm most comfortable-in/first learned.
20:19
<@Derakon>
Yeah, curly braces in C have meaning for the parser, but no meaning for the user, was my point.
20:19
< Tarinaky>
Anything that's not C++ doesn't look like C++ and therefor I have to think a little bit more about it.
20:19
<@Derakon>
Heh, fair enough.
20:19
< Tarinaky>
No more, no less.
20:19
< celticminstrel>
What about JavaScript?
20:19
<@jerith>
They have meaning for the user because they have meaning for the parser.
20:19
<@Derakon>
My first language was...BASIC on the C64, but I never made it further than very small programs on that.
20:20
<@Derakon>
After that, C, with some Angband hacking.
20:20
<@jerith>
I used to refuse to mark assignments submitted without readable indentation.
20:20
<@Derakon>
All of my courses marked you down for not commenting your code.
20:20
<@ToxicFrog>
Derakon: they do, in fact, have meaning for the user, even if they are -in some cases- redundant.
20:21
<@Derakon>
TF: permit me my hyperbole.
20:21
< celticminstrel>
Dashes are not parentheses!
20:21
<@ToxicFrog>
Alright. :P
20:21
<@ToxicFrog>
celticminstrel: and I wasn't using them as such.
20:21
<@Derakon>
He was using them to infix a parenthetical.
20:22
<@ToxicFrog>
I was actually using them as a cross between emdash and boldface, which is not uncommon usage on IRC.
20:22
< celticminstrel>
Well, he spaced them like parentheses, anyway.
20:22
<@jerith>
I never marked people down for not commenting, but I marked down liberally for lack of sensible identifier names.
20:22
< Tarinaky>
The indentation thing gets in the way of using Python as an interactive prompt though.
20:22
<@ToxicFrog>
That is to say, the enclosed text should be read as though separated out from the main text - like this - but also as emphasized, like this but not as dramatically.
20:22
< celticminstrel>
I see.
20:22
<@jerith>
Tarinaky: I manage in ipython quite well.
20:23
< Tarinaky>
jerith: As a full bash replacement?
20:23
<@Derakon>
Indendations in the REPL are a bit annoying solely because the REPL doesn't auto-indent for you.
20:23
<@jerith>
No. I use bash as a full bash replacement.
20:23
< celticminstrel>
XD
20:23
<@Derakon>
...oh, you meant as a shell replacement. Yeah, no.
20:23
<@ToxicFrog>
Tarinaky: that's not what people usually mean by "an interactive prompt"
20:23
< celticminstrel>
Interactive prompt ? shell
20:23
<@ToxicFrog>
They mean a REPL, which python does quite nicely at.
20:23
<@Derakon>
If I want to do heavy programming on the commandline, I break out Perl.
20:23
< Tarinaky>
Yeah. My bad.
20:23
<@jerith>
I haven't yet found anything that does bash's job better than bash.
20:24
<@Derakon>
Jerith: not even emacs~?
20:24
<@jerith>
Even emacs.
20:24
< celticminstrel>
Emacs is too obtuse.
20:24
<@jerith>
Although I have been known to use bash from inside emacs.
20:24
< Tarinaky>
I meant for quickly hacking out something that only needs to work once and therefor doesn't need to be legible beyond being written.
20:24
<@jerith>
Tarinaky: I find ipython very handy for that.
20:24
<@Derakon>
Tarinaky: ls *png | perl -ne 'chomp; $i = `identify $_`; $i =~ /PNG (\d+)x(\d+)/; $x = ($1-800)/2; $y = ($2-600)/2; `convert -crop 800x600+$x+$y $_ cropped/$_`'
20:24
<@jerith>
I used it that way three times today, actually.
20:25
< Tarinaky>
Derakon: Exactly.
20:25
< celticminstrel>
That's pretty obtuse too.
20:25
< Tarinaky>
The strict white space gets in the way of things like that imo :/
20:25
<@Derakon>
So don't use it for that purpose then.
20:25
< celticminstrel>
It kind of does, yes.
20:26
<@Derakon>
Not every language needs to be suited to every task.
20:26
< celticminstrel>
Though, you could probably use \n and \t to "fake" indentation.
20:26
<@jerith>
I occasionally write Python one-liners as part of a shell pipeline.
20:26
<@Derakon>
I'd hate to think what our cockpit program (my main responsibility here) would be like if written in Perl or Bash.
20:42
<@ToxicFrog>
So. I've decided that the only way to do this properly is to make everything that updates the gamestate synchronized (or only callable from synchronized methods).
20:43
<@ToxicFrog>
But now I'm running into situations where it would be really handy to be able to call the non-synchronized versions, as it avoids a message roundtrip and splitting something into client and server halves.
20:44 Orthia [orthianz@Nightstar-0f7d3eab.xnet.co.nz] has joined #code
20:56 Kaura|zzz is now known as Kaura
21:42 * Derakon digs through his lab's massive collection of miscellaneous computer parts, is able to find three analog DVI to VGA adapters but no digital DVI to VGA adapters.
21:43
<@Derakon>
Which means that in order to run my presentation, I'll first have to go shopping. >.<
21:49 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving]
22:02 Stalker is now known as Someone_Else
22:02 Someone_Else [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.]
22:28
< gnolam>
Derakon: sorry, there's just too much code in there.
22:33 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!]
22:49 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
22:52 McMartin_ [mcmartin@Nightstar-87302fbb.pltn13.sbcglobal.net] has joined #code
22:52 shade_of_cpux is now known as cpux
22:53 McMartin [mcmartin@Nightstar-0daf5087.pltn13.sbcglobal.net] has quit [Operation timed out]
22:56 McMartin_ [mcmartin@Nightstar-87302fbb.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds]
23:03 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
23:15 McMartin [mcmartin@Nightstar-92a860e2.pltn13.sbcglobal.net] has joined #code
23:15 mode/#code [+o McMartin] by Reiver
23:21
< Rhamphoryncus>
Derakon is going to be mightily disappointed when he finds out DVI-D to VGA adaptors don't exist as a "miscellaneous computer part". I've got one open on google for $230
23:25
< gnolam>
Also: what kind of laptop doesn't have VGA out?
23:26 McMartin [mcmartin@Nightstar-92a860e2.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds]
23:29 McMartin [mcmartin@Nightstar-4268be89.pltn13.sbcglobal.net] has joined #code
23:29 mode/#code [+o McMartin] by Reiver
23:32 Anno[Laptop] [annodomini@Nightstar-09acd4e7.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
23:51 Derakon[AFK] is now known as Derakon
23:51
<@Derakon>
Rhamph: yeah, ended up having to settle for mini-DVI to VGA.
23:52
< Rhamphoryncus>
How much?
23:52
<@Derakon>
Which works fine for me but is problematic for my coworker, whose laptop has mini-DisplayPort instead.
23:52
<@Derakon>
$18.
23:52
<@Derakon>
What I don't get is why, if there's mini-DVI to DVI-D and mini-DVI to VGA, there can't be DVI-D to VGA.
23:53
< Rhamphoryncus>
oh that's quite decent
23:53
< Rhamphoryncus>
is mini-DVI DVI-I or DVI-D?
23:54
<@Derakon>
Um, no idea.
23:54
<@Derakon>
My laptop's a 2005 Macbook, if that helps any.
23:55
< Rhamphoryncus>
looks like DVI-D
23:55 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
23:55
< Rhamphoryncus>
I suspect it's an economy of scale thing. Apple created a decent market for mini-DVI to VGA
23:56
<@Derakon>
Thing is, there's tons of DVI-A to VGA adapters.
23:56
<@Derakon>
Why no DVI-D to VGA?
23:56
<@Derakon>
Rep at Best Buy said it was impossible because one was digital and the other analog, but then again, he's a rep at Best Buy.
23:57
< Rhamphoryncus>
DVI-A to V GA is just a rewiring. The signal is compatible, by design
23:58
< Rhamphoryncus>
but digital to VGA requires you to process and emit an entirely new VGA signal
23:58
<@ToxicFrog>
Derakon: because DVI-A and VGA are the same protocol with different pinouts, whereas DVI-D to VGA requires an actual device to translate the digital protocol into an analog one.
23:59
<@Derakon>
TF: again, then why does mini-DVI => VGA work just fine?
23:59
<@Derakon>
Along with mini-DVI => DVI-D.
23:59
< Rhamphoryncus>
mini-DVI -> DVI-D is just as trivial. Same protocol again
23:59
<@ToxicFrog>
Because the video card interrogates the monitor to see whether it's expecting a digital or analog signal, and switches accordingly.
--- Log closed Thu Nov 04 00:00:15 2010
code logs -> 2010 -> Wed, 03 Nov 2010< code.20101102.log - code.20101104.log >