--- Log opened Mon Nov 01 00:00:24 2010 |
00:03 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has joined #code |
00:21 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [Ping timeout: 121 seconds] |
01:18 | | Attilla [Some.Dude@Nightstar-b998a78c.threembb.co.uk] has quit [[NS] Quit: ] |
01:59 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
02:11 | | AnnoDomini [annodomini@Nightstar-aa39fd47.adsl.tpnet.pl] has quit [[NS] Quit: Winding down.] |
02:39 | | Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code |
03:54 | | TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
03:56 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has quit [Client closed the connection] |
04:10 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has joined #code |
04:11 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has quit [Client closed the connection] |
04:20 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has joined #code |
04:25 | | cpux is now known as cpux[barf] |
04:40 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has quit [Connection reset by peer] |
04:56 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has joined #code |
05:00 | | cpux[barf] is now known as cpux |
05:15 | | 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:26 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
05:42 | | Derakon is now known as Derakon[AFK] |
05:44 | | cpux is now known as shade_of_cpux |
06:30 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code |
07:15 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
07:25 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
07:28 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.] |
07:31 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
07:37 | | kwsn is now known as kw-sleep-n |
07:55 | | Orthia [orthianz@Nightstar-76cea18f.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
08:33 | | Vornicus is now known as Vornicus-Latens |
09:05 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
09:05 | | You're now known as TheWatcher |
09:24 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
09:26 | | Syloqs_AFH is now known as Syloqs-AFH |
09:30 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
09:34 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
09:35 | | Syloqs_AFH is now known as Syloqs-AFH |
10:56 | | Orthia [orthianz@Nightstar-382ae01c.xnet.co.nz] has joined #code |
11:02 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
12:19 | | Anno[Laptop] [annodomini@Nightstar-fee51580.adsl.tpnet.pl] has joined #code |
12:26 | | Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited] |
12:57 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
12:59 | | kw-sleep-n [kwsn@Nightstar-1def9d24.dyn.centurytel.net] has quit [Ping timeout: 121 seconds] |
13:50 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
13:59 | | Orthia [orthianz@Nightstar-382ae01c.xnet.co.nz] has quit [Connection reset by peer] |
14:07 | | Orthia [orthianz@Nightstar-11e0001f.xnet.co.nz] has joined #code |
14:54 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
16:08 | | Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code |
16:08 | | mode/#code [+o Derakon] by Reiver |
16:09 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
16:10 | <@Derakon> | I get to lead our group meeting this Friday. |
16:10 | <@Derakon> | My current plan is to give a talk on Python, numpy, and wx. |
16:11 | <@Derakon> | In other words, basic array manipulation and GUI programming, with a sidebar on how to program in Python (assuming that everyone already knows how to program to a greater or lesser extent). |
16:12 | <@Derakon> | So I figure I'll start off with Hello World, then have a slide showing basic program constructs (function definition, if/else/for/while, import statements). |
16:12 | <@Derakon> | Then move into numpy and array manipulations. |
16:12 | <@Derakon> | Hmm...basic program constructs may need to be multiple slides, actually, but they can be covered pretty quickly. |
16:14 | < celticminstrel> | Numpy is the library that makes use of all that obscure extended slice syntax... |
16:14 | <@Derakon> | Yes, it does. |
16:14 | <@Derakon> | foo[a:b,c:d] |
16:14 | <@Derakon> | I'm not going to cover numpy in detail, though. Just go over common operations. |
16:18 | <@Derakon> | Talk title: Common Scientitfic Programming Practices. Sound good? |
16:18 | < celticminstrel> | Sure. |
16:27 | <@ToxicFrog> | \o/ I have successfully run Felt on a machine I didn't develop it on! |
16:27 | <@ToxicFrog> | Still no windows support though. |
16:27 | <@Derakon> | Hooray! |
16:28 | <@Derakon> | What's breaking cross-platform compat? |
16:28 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
16:28 | <@Derakon> | Hmm...the Ackermann function ought to be a good example of while loops, if statements, and function declarations. |
16:30 | <@Derakon> | Actually, no. Let's not go there. |
16:30 | <@Derakon> | ...argh, what's that classic sequence called? 1,1,2,3,5,8,13, etc.? |
16:31 | < celticminstrel> | Fibonacci? |
16:31 | <@Derakon> | That's it, thanks. |
16:37 | <@ToxicFrog> | Derakon: not breaking per se, but to run it on windows I need windows binaries for glib, gdk, gtk, cairo, lua, luagnome, luasocket, and luafilesystem. |
16:37 | <@ToxicFrog> | Not all of these are readily available; in particular, I need to build the windows version of luagnome myself. |
16:37 | <@ToxicFrog> | Which actually has support in the build scripts for a linux-host, mingw32-target cross compile, but also assumes that everyone's cross-compile setup is identical to Debian's in every respect. |
16:38 | <@Derakon> | Ahh, dependency hell. |
16:38 | <@Derakon> | Good luck. |
16:40 | | * Derakon tries to think of a function that demonstrates while loops and if statements without being horridly contrived or having any other dependencies. |
16:41 | <@ToxicFrog> | Isn't A a good example of recursion, because it was specifically designed not to be easily expressible non-recursively? |
16:42 | <@Derakon> | Yeah. |
16:42 | <@Derakon> | Which is why I realized I didn't really want to use it as an example. |
16:42 | <@Derakon> | Recursion is interesting as a programming concept, but not for purposes of demonstrating how Python works if you can already program. |
16:42 | <@Derakon> | I'm just looking for concise examples that people can use to quickly start writing their own programs. |
16:44 | <@ToxicFrog> | You could always due iterative factorial, but I think that may count as "horribly contrived" |
16:44 | <@ToxicFrog> | s/due/do/ |
16:44 | <@Derakon> | Heh. |
16:45 | <@Derakon> | Actually, that works rather nicely. |
16:45 | <@Derakon> | def factorial(n): |
16:45 | <@Derakon> | if n < 1: |
16:45 | <@Derakon> | return None |
16:45 | <@Derakon> | accumulator = 1 |
16:45 | <@Derakon> | while n > 1: |
16:45 | <@Derakon> | accumulator *= n |
16:45 | <@Derakon> | n -= 1 |
16:45 | <@Derakon> | return accumulator |
16:45 | < celticminstrel> | Uh, 0! = 1 |
16:45 | <@Derakon> | ...right, thanks. |
16:45 | | * ToxicFrog installs 150MB of cross-compile dependencies |
16:47 | <@Derakon> | Okay, what other basic programming constructs should I cover? So far I have for loops, lists, while loops, if statements, function declarations and calling. |
16:47 | <@Derakon> | Keeping in mind these people should already know how to program. |
16:49 | < celticminstrel> | What about non-basic novelties like "with" <_< |
16:49 | <@Derakon> | ...I don't think I've ever used with. |
16:49 | < celticminstrel> | Meh. |
16:50 | < celticminstrel> | It's like Java's "synchronized" statement, but more flexible. |
16:50 | < celticminstrel> | Or possibly like the new try-with-resources construct in Java. I dunno. |
16:50 | < celticminstrel> | Still, it's not really necessary for files, which is the most obvious use of it. |
16:51 | <@Derakon> | Hm, File I/O. |
16:51 | <@Derakon> | Could be useful. |
16:52 | < celticminstrel> | Did I just "accidentally" suggest something? :P |
16:52 | <@Derakon> | If it helps you sleep at night, sure. :p |
16:53 | <@Derakon> | I need a fruit whose name begins with 'c'. |
16:53 | < celticminstrel> | cranberry? |
16:53 | <@Derakon> | Sure. |
16:53 | < celticminstrel> | Or currant. |
16:53 | <@Derakon> | Currants are a bit British. |
16:53 | < celticminstrel> | Are they? |
16:54 | < celticminstrel> | Also cherry. |
16:54 | <@Derakon> | They certainly aren't very common on the west coast of the USA where I'll be giving this talk. |
16:55 | < celticminstrel> | Okay, whatever. |
17:00 | <@Derakon> | Cherries work nicely though. |
17:09 | <@ToxicFrog> | What does 'with' do? |
17:17 | | Attilla [Some.Dude@Nightstar-ffc9e28d.threembb.co.uk] has joined #code |
17:17 | | mode/#code [+o Attilla] by Reiver |
17:35 | < celticminstrel> | Automatic cleanup, basically. |
18:25 | | Orthia [orthianz@Nightstar-11e0001f.xnet.co.nz] has quit [Connection reset by peer] |
18:31 | | Orthia [orthianz@Nightstar-11e0001f.xnet.co.nz] has joined #code |
18:37 | | Orthia [orthianz@Nightstar-11e0001f.xnet.co.nz] has quit [Connection reset by peer] |
18:41 | <@ToxicFrog> | ...how is that anything like "synchronized"? |
18:43 | | Orthia [orthianz@Nightstar-11e0001f.xnet.co.nz] has joined #code |
18:44 | <@ToxicFrog> | Wow. The openSUSE cross compile setup is way more civilized than trying to build stuff on windows itself. |
19:10 | | Orthia [orthianz@Nightstar-11e0001f.xnet.co.nz] has quit [Connection reset by peer] |
19:28 | <@Derakon> | Ahh, I have an introductory quote for my talk. |
19:28 | <@Derakon> | "The purpose of every programmer is to render himself obsolete." |
19:29 | < celticminstrel> | Mainly because one of the uses of "with" is the same as the use of "sunchronized". |
19:33 | | * Derakon eyes this email subject: "Shapr the Furue - Vote on Tuesday!" |
19:35 | <@ToxicFrog> | |
19:36 | <@ToxicFrog> | celticminstrel: except "synchronized" enables automatic locking for multithreaded programs. |
19:36 | <@ToxicFrog> | It has nothing to do with resource lifetime control. |
19:36 | < celticminstrel> | You can use "with" for locking for multithreaded programs. |
19:36 | <@ToxicFrog> | How? |
19:36 | < celticminstrel> | The "resource" is a mutex, or something. |
19:37 | <@ToxicFrog> | A lock held on a mutex, you mean? |
19:37 | < celticminstrel> | That's probably what I mean, yes. |
19:37 | <@ToxicFrog> | (I'm operating on the assumption that "with" is basically a way of introducing block scope to python?) |
19:48 | | Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code |
19:49 | <@Derakon> | TF: why not ask Rhamphoryncus? ;) |
19:50 | | * Rhamphoryncus hides behind jerith |
19:55 | < Rhamphoryncus> | 'sup? |
20:07 | < celticminstrel> | It's sort of like that, yes, TF. |
20:07 | < celticminstrel> | ...my terminal's linewrapping is broken. :| |
20:14 | <@Derakon> | Rhamph: discussing the "with" keyword. |
20:14 | < Rhamphoryncus> | ah |
20:15 | < Rhamphoryncus> | 's a good word. Nice firm feel to it |
20:23 | < Rhamphoryncus> | Got a specific question? |
20:23 | < celticminstrel> | About the terminal's linewrapping? :P |
20:23 | <@Derakon> | TF was just wondering what it was, and then arguing with Celtic over his explanation. |
20:26 | | * celticminstrel is updating Boost. |
20:39 | <@ToxicFrog> | Rhamphoryncus: I was asking about it in Python |
20:39 | <@ToxicFrog> | CM said that "it's like synchronized in Java", which turns out to be not at all the case. |
20:39 | < Rhamphoryncus> | sorry, didn't realize you replied |
20:40 | < Rhamphoryncus> | It *can* be used for synchronized in java, but it's really more like RAII in C++ |
20:40 | <@ToxicFrog> | Yeah, that's the impression I'm getting - it creates a new scope and guarantees that stuff local to that scope is collected at scope exit, or similar |
20:41 | < Rhamphoryncus> | with open('blah', 'w') as f: # Do stuff and be sure it'll be closed and flushed when this scope is exited, whether it's normally or with an error |
20:41 | <@ToxicFrog> | Which means you can use it for synchronization (by acquiring a lock at scope entry) but it is nothing at all like synchronized (which is a function annotation) |
20:41 | < celticminstrel> | Synchronized also has a block form, but yeah, "with" is a superset of it. |
20:41 | < Rhamphoryncus> | It's just the one thing it closes, not everything in that scope |
20:42 | <@ToxicFrog> | celticminstrel: synchronized also always locks on this |
20:42 | < Rhamphoryncus> | And technically the file object still exits, it's just the os-level handle that's closed |
20:51 | <@Derakon> | In that example, how do you know that the object will be closed? Don't you need to call close() on it? |
20:51 | <@Derakon> | Or is there some kind of implicit destructor? |
20:51 | <@Derakon> | (In which case, how would you invoke that implicit destructor properly for custom objects that need to handle their own cleanup?) |
20:52 | < celticminstrel> | Pretty sure synchronized can lock on any arbitrary object. |
20:53 | < celticminstrel> | Yes, yes it can. |
20:54 | < celticminstrel> | For "with", you need an object that has the __enter__ and __exit__ member functions; __enter__ is called before the block executes, and __exit__ is called afterwards even if an exception is thrown. |
20:55 | < celticminstrel> | So, for custom objects, you just need to define those two methods. |
21:54 | | * Derakon eyes his presentation outline. |
21:54 | <@Derakon> | 11 slides and one demo. |
21:54 | <@Derakon> | Is that gonna be enough to fill an hour? |
21:55 | <@Derakon> | http://derakon.dyndns.org/~chriswei/temp2/outline.txt |
21:57 | <@TheWatcher> | HArd to say from slides - I've known people give hour long presentations with two slides, and some who can't fill 10 minutes with 30 |
21:57 | <@Derakon> | It's also going to depend heavily on how much back-and-forth I get. |
22:00 | <@TheWatcher> | hm |
22:02 | <@TheWatcher> | I'd suggest timing your presentation as-is, assuming no audience interaction, and see where it comes to - if it comes out less than 40 minutes, I'd think about adding material if possible |
22:03 | <@Derakon> | That in turn depends on how thoroughly I feel like preparing for this talk~ |
22:03 | <@TheWatcher> | heh |
22:03 | <@Derakon> | (Last time I just took some screenshots of the microscope program and walked through them) |
22:04 | <@Derakon> | If you've taken a look at the outline -- anything you think I'm missing? |
22:05 | <@Derakon> | My basic goal being to show people who already know some programming how Python programs work. |
22:07 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
22:23 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
22:31 | | RichardB [user@Nightstar-3b2c2db2.bethere.co.uk] has joined #code |
22:39 | | RichardB [user@Nightstar-3b2c2db2.bethere.co.uk] has quit [Connection closed] |
22:42 | | shade_of_cpux is now known as cpux |
22:53 | | Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving] |
22:53 | <@ToxicFrog> | FUCK YOUUUUUUUUUUUUUU WINDOWS AND YOUR ANCIENT ASS-BACKWARDS WAY OF LINKING DYNAMIC LIBRARIES |
22:53 | <@ToxicFrog> | DIE |
22:53 | <@ToxicFrog> | DIEEEEEEEEEEEEEEE |
23:03 | < EvilDarkLord> | That sounds exciting. What are you up to exactly? |
23:10 | | * TheWatcher patpats TF, hands him the Pitchfork of Retribution |
23:14 | <@ToxicFrog> | I am trying to build a windows version of luagnome |
23:15 | <@ToxicFrog> | This is made difficult by the fact that windows expects you to statically link against a stub library that provides proxies for the real functions in the dynamic library (or something like that) |
23:20 | <@ToxicFrog> | So, luagnome doesn't link against any of the gtk libraries by default, assuming that dlopen() or your local equivalent can find it (and all of the necessary functions therein) at runtime. |
23:20 | <@ToxicFrog> | Meanwhile, the windows build of glib and friends assume they can do whatever the fuck they want with the DLL because all of the functions were resolved at compile time when you linked against libglib-2.0-0.dll.a. |
23:22 | <@ToxicFrog> | I'm trying to work around this, but I may end up building all of fucking GTK from scratch without static stub libraries to get this to work. |
23:42 | | You're now known as TheWatcher[T-2] |
23:44 | | You're now known as TheWatcher[zZzZ] |
23:55 | | kwsn [kwsn@Nightstar-1def9d24.dyn.centurytel.net] has joined #code |
--- Log closed Tue Nov 02 00:00:25 2010 |