[00:00] Yeah, I know. Health insurance is great as long as you don't get sick. [00:03] but then you feel like a schmuck for paying so much each month [02:44] Good evening [03:16] <_stink_> hi [03:44] Gah, I'm feeling really dumb about these sessions [03:44] Trying to update an episode to be downloaded [03:45] and figuring out the special syntax sauce for this is driving me nuts. [03:45] I can see why people don't like SQLAlchemy [03:46] I mean, I'd like to have it just do episode.downloaded = True [03:46] and just have it work [03:47] But instead I have to wrap it in a manager class, and blah blah blah blah [03:49] just write an update statement :) [03:49] I only have a very basic knowledge of sqlalchemy, but isn't the manager pattern self-imposed? [03:50] I'd think you'd do somethig like session.update(episode) to actually do the update [03:50] after setting episode.downloaded = true [03:51] I don't have the vocabulary to explain [03:52] https://github.com/craigmaloney/Piddlepodder-Python [03:52] awesome project name :P [03:52] piddlepodder was the original. ;) [03:53] made it really easy to do a google-alert. [03:59] ok, it seems like if you get the episode from the db via some query, you should be able to say something like episode.downloaded = True [03:59] then maybe you have to flush the session / commit the transaction [03:59] Right. [04:00] and I'm not sure how to get that to happen [04:00] but if it's just an individual episode you're updating, I don't see any reason to deal with a manager [04:00] does session.flush() not work? [04:00] Asking in sqlalchemy if there's a way to make it so that if that flag changes, it'll just write it [04:01] I'm not sure where to put the session-handling code [04:01] Frankly, this manager pattern is a pain in the ass. :) [04:01] if you want to get fancy you could make a transaction decorator that would handle everything for you [04:01] I understand why it's needed, but it's really making things annoying. ;) [04:02] I think I like the manager pattern, assuming it's no different from the repository pattern. [04:04] ah, when you commit(), flush() happens automatically [04:05] Yeah, [04:06] bloody hell, even setting autocommit=True in the session_maker doesn't manage to do the commits [04:09] <_stink_> hah, 30 seconds ago i was screwing with the same thing in sqlalchemy :P [04:09] <_stink_> but mine's in a fabfile in a pyramid project and i had a nice example in bookie. [04:09] so what would it do ideally for you? issue a sql statement after every single property change? [04:10] yes [04:10] Reason being that once a file is downloaded, that's the last time I want to download it [04:11] was the whole reason for piddlepodder in the first place (vs. bashpodder) [04:11] I'd be surprised if that functionality existed, generally for ORMs I think the pattern is `get object, manipulate the hell out of object, save object` [04:11] so it issues an update statement after you're done making _all_ your changes [04:11] THat's not my use case at all [04:11] I don't need a cache, I just need persistence [04:12] in the future could you potentially add a 'last retrieved date' ? [04:12] that would make your use case more align with the orm [04:12] we should ping rick_h_ :) [04:12] I'm not sure that would help [04:12] Here's the scenario: [04:13] start up session, get latest feeds, start processing [04:13] deedle deedle dee [04:13] suddenly, power cuts out [04:13] or program aborts... something [04:13] what's the state? do I have to download those files again? [04:14] ideally, once the file is downloaded, I just tick it off, and that's the end of it [04:14] ok, so can you just commit after each download? [04:14] If I knew how, yes. ;) [04:15] But this session bullshit is making me think that nbody writes sqlalchemy that passes between files. [04:15] Or you have to be a rockstar like rick_h_ to figure it out. [04:16] I tried putting it in the manager class, but that didn't seem to work out too well. Seemed more complicated than it needed to be. [04:16] so if in __init__.py you said "from models import Session" [04:16] then called Session.commit(), what happens? [04:16] since Session is defined in your models.py [04:17] called "Session.commit()" immediately after you set downloaded=True)( [04:17] Hah, no transaction is begun. [04:18] do you still have autocommit=True? [04:18] try making that False, if so. autocommit=True does transaction funniness. [04:18] Oh FFS. [04:19] OK, added the session [04:19] and added "Session.begin()" and "Session.commit() to wrap the transaction. [04:19] and that seemed to work. [04:19] ok, that's with autocommit=True, right? [04:19] yes [04:20] so you should be able to remove autocommit=True (so it's false), and remove your Session.begin() [04:20] if I'm reading the docs right [04:20] Trying that now [04:20] I'm sure rick_h_ will yell at us for this in the AM. [04:21] Awesome. That appears to work [04:21] well, I'll be asleep when that happens, so you'll take brunt of the force :P [04:21] Going to commit the code I have. [04:21] ;) [04:21] Thanks for the assist! [04:22] no problem. it's kind of fun to compare this to the C#/Java world of ORMs. [11:06] g'morning [11:24] morning [11:24] looks like I missed all the fun [11:26] me too, apparently [11:42] Hood moening [11:42] hah [11:42] Nice. I can type [11:45] wow [11:45] snap-l: so let me know when you're ready for the sqlalchemy discussion to resume. I'll let you get your coffee first [11:46] ho boy [11:47] :) [11:47] coffee's not strong enough [11:47] go for shots of espresso [11:47] dammit, my talk still isn't up [11:48] Trying to get a zit off of my eyelid [11:48] So typing w/ one hand while holding a microwaved washcloth [11:49] with one eye open [11:49] eww [11:49] I cannot imagine a worse place to have a zit [11:50] seriously wtf man [11:50] TRust me, not my idea [12:02] I don't know... [12:02] Is this the "it wasn't my idea" that comes after something in your plan goes awry? [12:02] I've seen that before... [12:04] Har har [12:08] "You know what'd be hard core? A zit on my eyelid. That's be so badas-ow! Ow, ow, ow! Who's idea was this?" [12:08] :-) [12:34] I can't believe I typed that.... s/who\'s/whose/ [12:34] maybe I should actually sleep tonight. :-p [12:41] ok, Identica is dead to me. [12:41] can't log in, can't log in with OpenID, can't recover password [12:43] they kicked you out for not being freetarded enough [12:43] quite possibly [12:55] :( [12:57] Wolfger: They have a support channel. [12:57] http://identi.ca/doc/contact [12:59] http://decafbad.net/2011/08/04/internet-explorer-users-and-mass-media-prove-theyre-all-dumb/ [13:07] What some people don't get, is that everybody is dumb (about certain things) [13:08] Lots of people are dumb about computers. Others are dumb about sports. I'm pretty dumb about cars (and I work where?)... [13:09] When you're a professional in a field, lots and lots of other people look dumb. But when you step into their field of expertise, chances are that you look dumb too. [13:33] I don't think IE users are dumb, ignorant...maybe [13:33] then there are the thousands who are forced to use IE because their company forces them adhear to policy [13:34] It's a hoax. You're OK. [13:34] Nobody is calling you dumb [13:34] hahahaha [13:34] unless you're suing that hoaxer, in which case I'm calling you dumn [13:35] I understand that [13:36] but I was citing my opinion rather than a rebuttal [13:38] ignorant is just another word for "too dumb to know better" :-D [13:39] now being forced to use IE is different. In those cases, the policy maker is dumb :-) [13:39] but they are still an IE user [13:39] they are dumb for working at a company that enforces an IE-only policy [13:39] I think it's pretty clear that broad sweeping generalizations are half truths at best [13:40] brousch: if they paid you enough I don't think you'd care [13:40] true dat [13:40] my price to be foreced to use IE is quite high [13:41] it is hard to give up freedom once you've tasted it [13:42] * Wolfger continues to work with the underground resistance [13:42] IE 9 isn't so bad, they are following standards now [13:43] but you also have to use Windows [13:43] you try setting up a L2TP IPSEC VPN client on linux [13:44] windows has it's place just as linux does [13:51] oh man what was the name that symantic gave their network based anti-virius suites [14:10] .cloud or something like that? [14:24] rick_h_: The student is ready. Will the master appear? :) [14:25] heh, ok [14:26] http://paste.mitechie.com/show/370/ [14:26] snap-l: ^^ that's basically what it boils down to [14:27] oh, and never do auto anything, it's a sure sign of trouble since you don't really understand/konw what's going on [14:27] Right, but wasn't sure how to get the session into the file that i'm using. [14:27] you can just import it [14:27] syntax [14:27] from models import Session [14:27] I was just having trouble with syntax [14:27] you can add it to the top with the rest of the models [14:27] https://github.com/craigmaloney/Piddlepodder-Python/commit/da7b380f6d59917f4df11d6844f8a22ac30202e3 [14:28] right, but you're commiting in a loop [14:28] commit() basically finishes the transaction [14:28] Which is what I want [14:28] naw, a flush will do [14:28] with a Session.commit() at the end of your script [14:29] If the loop fails for whatever reason I don't want to lose the work I've done [14:29] try: finally: Session.commit() [14:29] (why is this hard to explain to people) [14:29] snap-l: that's fine, but then you need to manually manage the transaction [14:29] If there is a power failure, I don't want to have to redownload everything [14:31] And by "manually manage the transaction", how is my commit in the loop not doing that? :) [14:32] you session auto creates a transaction. .commit() finishes it [14:32] so you'll hit stuff where you need to start a new one each time [14:32] Right, and the unit of work is episode downloaded, write to the database. [14:32] http://www.sqlalchemy.org/docs/core/connections.html#using-transactions [14:33] and it's at this point that I'm starting to think that ORMs are a huge pain in the ass. [14:34] or at least not fitting my idea of what should be going on with my data. [14:37] http://www.mail-archive.com/pylons-discuss@googlegroups.com/msg17220.html or http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.Session.__init__ for autocommit [14:38] the thing is that usually people don't want to do this. [14:38] the download should be outside of this, async, and a trigger to mark the record updated on it's own [14:38] but yea, you can do things the way you want, but it's not the default because it's poor porformance for most workloads [14:40] rick_h_: Right, that's a tradeoff I'm willing to take. :) [14:41] worst case for even the best case of download transfer is a commit a second. [14:43] Thanks for the pointer. I'll make this a little more sane. :) [14:44] "reality TV" has jumped the shark... http://sportsillustrated.cnn.com/multimedia/photo_gallery/1107/bearding.whisker.wars/content.1.html [14:47] Wolfger: dude, I am so excited for that show! The first time ever since Real World (the first season) was over! [14:48] Seriously? I'm a fan of facial hair, but a TV show about a facial hair competition? [14:49] :) [14:50] Wolfger: If this is the first time you think that reality TV has jumped the shark, you haven't been paying attention [14:50] I'm pretty certain I've said it's jumped the shark before, too [14:51] you've jumped the shark! [14:51] doh! [14:51] actually, that'd be pretty sweet if you pulled a fonzie [14:53] what, do something totally out of character that makes no sense? [14:53] hmm [14:54] no, ski jumping over a fricking shark, man [14:54] well, that would count as something out of character that makes no sense... [14:55] and it would be cool, I guess [14:55] as long as I don't break a limb on landing [14:58] if you can't tell, I'm seriously checked out from my job right now, even though I keep getting these damned requests to do lots of work before I leave [15:00] greg-g, the lame-duck librarian [15:01] greg-g: When are you leaving the mitten? [15:09] Aug 10th [15:09] last day of work is Aug 9th [15:10] brousch: my boss even called me today (she is traveling right now) and said "Sorry about all these things we're asking you to do, you should be doing nothing right now" [15:10] and you probably would be if you didn't actually care about your job ;) [15:12] yeah, damn my sense of responsibility! [15:13] it helps that you're not working for a soulless corp of evil [15:13] * brousch glances at snap-l [15:15] brousch: Sorry, I would care about that statement had I not checked my soul in at the door. [15:38] bazinga [16:01] rick_h_: any interest in helping orgnaize a barCamp at i3 this coming Fall? [16:16] nullspace: sorry, not this fall. Getting conference'd out [16:18] uh-oh. I never realized rick_h_ was a scarce resource. We've been taking it for granted. :-( [16:21] just bookie needs some serious love. Too distracted over pyohio [16:21] and we're going to try to refire lococast, so some work there [16:21] and then I've got to talk at this 1devday in Nov [17:19] great, im getting refired on lococast [17:19] lol [17:19] refired? [17:19] wasn't getting fired once enough for you? [17:40] I'm not sure if I can collect unemployment. ;) [17:45] no lococast? [17:45] jrwren: More of a reboot than anything [17:46] it will focus on Mac OS X this time around [17:46] oh no! [17:46] THough i don't think it's as much of a reboot because we're just doing what we've always done [17:46] just not focusing as much on the Ubuntu Loco foo [17:53] poop on that. i'm unsubscribing [18:06] yea, snap-l and I are arguing semantics [18:06] It's going to turn more into the lococast dev show [18:06] screw the loco, who cares about that any more :P [18:06] :( [18:07] sorry greg-g :/ [18:07] I'm lacking the 'care about ubuntu' spirit these days [18:09] s'ok, but we're so much more than just Ubuntu in here! [18:09] traitor [18:09] no definitely :) [18:09] not /wc'ing here [18:09] :) [18:10] jsut not going to try to find podcast material out of hte ubuntu world any more [18:10] * greg-g nods [18:10] woot [18:10] the ubuntu world is too small and inbred [18:10] hah [18:10] hard to find anything that hasn't already been talked to death, or soon will be [18:12] true of anything [18:12] yea, that's not it [18:12] just that if you're going to keep up with new, sift through it, and add meaningful twist to it, you have to care [18:12] ouch [18:13] <_stink_> i feel the same way about ubuntu... i love *this* community in this chan [18:13] <_stink_> and i use it [18:13] <_stink_> but i don't really care what's done with it. [18:13] <_stink_> since i'll just install my own stuff anyway [18:14] <_stink_> if someone asked me what the benefit is... i guess i'd say PPAs [18:15] I toss around the idea of just using plain debian sometimes, but I like that, at least compared to when I used to use deb unstable, Ubuntu is a little more polished, etc [18:16] even in kde land? [18:16] the blue headed stepchild? [18:16] yeah, back then at least, deb unstable was sometimes living up to its name, seemed like [18:17] and stable was still using 1.0.0 kernel or something [18:17] I may exaggerate a little. [18:17] <_stink_> hah [18:17] I think the real problem is that it's become too forma [18:17] l [18:17] Kubuntu was nicely polished before KDE4... [18:17] I like KDE4 fine [18:17] Now it's like we have to be excited and shit just to keep our resgistration [18:17] * Wolfger considers going back to Mepis [18:17] I don't have a problem with ubuntu, just don't really use the main thing, since 90% of the hype of it is Gnome [18:18] I'm sorry, but I can't get too excited about the changes. [18:18] snap-l: considering the words I'm hearing, they'll probably blacklist us rather than re-up our registration :-p [18:18] That's fine. [18:18] oooooh, a rogue loco? [18:19] ColonelPanic001: KDE4 is fine now that it's a little more mature, but Kubuntu never recovered to its previous state. [18:19] I guess I'm having a hard time getting excited anymore. [18:19] i find kubuntu quite easily used [18:19] ./join #mi-loco [18:19] snap-l: there are drugs for that [18:19] brousch: Maybe I need them [18:20] check your spam folder [18:20] Feeling pretty meh lately. [18:20] jjesse: maybe it's just my hardware then. Kubuntu blows hard on my laptop [18:20] Maybe it's that the pendulum is about to swing back [18:20] and Ubuntu does not [18:21] but Unity does [18:21] I'm not particularly excited about Ubuntu, but I'm more excited about it than any other distro [18:21] brousch: That's definitely true [18:21] why should i be excited about a particular distro? shouldn't i care about shit working correctly? [18:21] brousch: come with me to Gentoo. You'll get excited all over again. :-) [18:21] jjesse: And we have a bingo [18:22] Wolfger: suicidal is not the same as excited [18:22] Wolfger: "Holy fuck, it compiled and worked, and only broke half of the shit on my laptop" [18:22] who compiles? [18:22] brousch: Gentoo [18:22] Gotta suck the marrow from your CPU one cycle at a time [18:23] man... brousch dissed Gentoo without even knowing it compiled everything from source? [18:23] there is a lot of cool kde stuff coming out though [18:23] that's exciting, but i don't care what distro it runs on [18:23] jjesse: I'll get excited about any distro that gives me a good KDE experience again [18:24] Also, I have a headache and am on Claritin, which makes me even more bitchy [18:24] <_stink_> at least it's not 95 degrees. :) [18:24] but I've been feeling that a lot lately [18:24] _stink_: true, that really makes me bitchy [18:24] Another big factor is feeling the need to get rid of a lot of cruft [18:24] snap-l: is it the change of life? [18:24] it is, aside from being overcast, beautiful weather outside [18:24] maleopause? [18:25] brousch: This pirate is definitely looking at 40, yes [18:25] you should've kicked me when you had the chance [18:25] brousch: Told you, I was probably supposed to hit you for something, but I was too excited to see you. :) [18:28] awww, that is the best male2male "I love you" I've ever seen! [18:28] <_stink_> /join #male2male [18:30] <_stink_> anyone? no? [18:33] * greg-g is there [18:33] * _stink_ gives greg-g one cookie. [18:34] <_stink_> now that's going to be in my history for a while [18:34] heh [18:36] it lives on the internet forever [18:36] <_stink_> good thing no one i know knows how to use the internet. [18:37] greg-g: :P [18:42] it's so lonely in #male2male [18:43] I have a feeling it might stay that way until I least expect it [18:43] I would be there in a heartbeat if I wasn't at work [18:44] <_stink_> haha [18:44] <_stink_> it could be an advice for new fathers [18:44] <_stink_> advice chan [18:44] sure it could [18:45] hah, awesome [18:45] but then it would be called #dad2dad [18:45] <_stink_> #dad2dad?? that clearly has an alternate meaning. [18:47] i'm getting major props at work for an app i built yesterday [18:47] brousch: cool! [18:48] http://utils.vdiw.net/leed500/ [18:48] good job [18:48] <_stink_> i just tried it [18:48] the mill we buy steel from has to be within 500 miles of the job site for certain hippie green credits [18:48] <_stink_> i confess i don't get it. [18:48] <_stink_> ah, ok [18:49] yeah, not much explanation on there. [18:49] what does it have to do with LEED? [18:49] nm, just read it [18:49] it's quite silly when you think about it, but hey, that's the govt for you [18:49] nice brousch [18:49] oh, that is neat looking when you search the address, but shouldn't it center the view of the map to the center of the circle (where the star is) each time? [18:50] greg-g: thanks, now i have 3 bugs ;) [18:50] greg-g is so negative [18:50] do not look at the source code. you will cry [18:50] <_stink_> and sort by miles, smallest to largest? [18:50] brousch: I'm not allowed, bitbucket is asking for a user/pass [18:51] heh, it's javascript [18:51] oh, well, there is that [18:51] all of the mills are hard-coded in the javascript [18:51] so if i put my address w/ no city and no zip it still generates a list of places for me [18:51] how does it now that? [18:51] jjesse: it's based on whatever google's geocoding api returns [18:52] so probably google's best guess at what you meant [18:52] but if i put in a bogus address it still works [18:52] btw, #dad2dad is also lonely [18:53] so 4079 Park East Grand Rapids UT still reports [18:53] and puts the cirlce in UT [18:53] <_stink_> hah, i just put in "hargle bargle lane" [18:53] right, so google's best guess [18:54] <_stink_> closest mill: Kalamazoo [18:54] looks like you can't do any jobs in Anchorage, AK [18:55] well, no jobs that qualify for that LEED level/credit/whatever [18:55] * greg-g nods [18:55] the mill list is not complete [19:10] anyone ever heard of anything in here? https://docs.google.com/a/mitechie.com/document/pub?id=1X5JAReZ-VM1DrD8BY-RsY9UCsT5so4IeLlTlYaYbeLI&pli=1 [19:10] the companies/etc? [19:16] I've heard of Quicken Loans [19:17] Fathead does wall graphics (I think they're local) [19:18] http://www.redenvelope.com/ [19:18] Fathead is local (livonia) [19:19] Ho boy [19:19] David Katzman David is the founder and Managing Partner of Camelot Venture Group. He also is a member of the Board of Directors for Sharper Image online, CleanRest, ePrize, and Simplex Diabetics. [19:37] i've heard of sharper image, quicken loans, 1-800-contacts, fathead, [19:53] ouch. $10,000/yr to put that app behind a paywall or move off the public internet [19:54] brousch: huh? [19:54] that leed app [19:55] who's charging $10k? [19:55] $10,000/yr for a license from google to allow for-pay service or firewall it [19:55] oh, gotcha [19:55] ugh [19:55] the boss got big dollar signs in his eyes, i had to crush them [19:56] can you use openstreet view or whatever ? [19:56] <_stink_> rewrite google maps! [19:56] _stink_: that's definitely high on my priority list [19:57] jjesse: that's a good question [19:57] <_stink_> o/ [19:57] <_stink_> put me on your corporate board please [19:57] me too, I use maps so I'm totally qualified to help guide your new startup [19:57] i like to get paid for doing nothing so put me on your board [19:58] oooh, leedtools.us isn't taken [20:00] openstreetmap is CC-BY-SA [20:01] i think that means i can't sell it [20:02] As long as there isn't a NC in there, you should be OK, as long as you attribute, and share [20:04] Can I charge for distributing OSM data or data derived from OSM data?Yes. You can charge any amount of money you want for any service or data you provide. However, since the data (or service) that is derived from OSM data must be licensed as above, other people may then redistribute this without payment. [20:05] so, you can use it commercially [20:06] the only real data i'm using is the geocoder to get a lat/lng from an address, and then map tiles [23:43] hhhh [23:43] iii [23:43] shhh [23:45] docs docs docs [23:49] <_stink_> holy jeebus, unicode in python 2.7 is ANNOYING [23:49] lol, well it's gotten better [23:49] but it's prepping for 3 [23:51] <_stink_> any advice on generating a random unicode string? mostly curious at this point. [23:52] <_stink_> i can generate all kinds of random bytes, but of course, most of it is not unicode. [23:54] http://docs.python.org/tutorial/introduction.html#unicode-strings [23:54] some example strings in there [23:55] <_stink_> well, i think i get unicode ok. [23:55] <_stink_> i mean, how it's handled. [23:55] what's the issue? [23:55] <_stink_> i was trying to see if i could generate a random unicode string. [23:56] <_stink_> i can generate all kinds of random bytes, but of course, most of it is not unicode. [23:56] well, you want utf-8 bytes? [23:56] <_stink_> yeah [23:58] http://en.wikipedia.org/wiki/UTF-8#Description [23:58] so you'd want to do 'x\uxxxx' [23:59] where xxxx is a random hex value from 0000 through FFFF [23:59] <_stink_> ahh [23:59] <_stink_> ok [23:59] <_stink_> that clicks [23:59] <_stink_> thanks, man. [23:59] np, had to look it up myself