[02:26] http://clientsfromhell.net/post/25594840666/i-was-meeting-with-a-potential-client-who-had-a [11:31] Good morning [11:33] yessir [11:54] morning all [11:54] TGIF everyone [11:55] rough week? [11:56] yea, busy as all can be. [11:57] that and 90s ugh! [12:26] Good morning [12:26] party [12:26] friday party [12:26] already disagreeing with people woot! [12:26] Yeah, no kidding [12:26] rick_h_: I thought that was every day? :) [12:27] well, I usually wait until closer to lunch [12:27] Hah [13:01] I have a feeling I'll be buying my next computer from whichever vendor offers computers without secureboot [13:09] brousch: Good luck with that [13:10] Maybe by that point I will just have a VPS and a tablet [13:10] hah [13:10] secure boot at its best [13:11] We'll all have a virtual desktop on Amazon and an iPad [13:14] What I love is we've come full circle [13:14] we grew up in the PC age, when the PC was democratizing the usage of computers [13:15] and everyone was figuring out how to get off of the expensive mainframes and time-sharing systems [13:15] and now we're moving things into the cloud, and locking down our PC machines so a single vendor can tell us what to do [13:16] Hate to say it, but RMS is dead right on this [13:16] indeed [13:17] rick_h_: i don't quite grok that yui node library. is it just nicer functions for dom manipulation? [13:17] jrwren: yea, it's kind of the jquery part of YUI [13:18] but the idea is that I was in my code checking if you give my method a string, then I'd Y.one(string) [13:18] and get a node instance so I could do stuff to it [13:18] but if you gave me an already loaded node, I skipped it [13:18] so lots of if checks/etc [13:18] but Y.one() already checks if you gave it anode [13:18] so I got to delete a bunch of conditional code this morning [13:22] ah, cool. [13:22] function behavior overloaded on input parameter type. [13:23] right [13:23] I am using that a tiny bit in python, and I think I don't like it. [13:23] I think in python I should prefer named params [13:23] yea, it's not generally done in python world [13:23] named and default I mean [13:23] yea, **kwargs and all that [13:23] its not pythonic IMO [13:23] i was going to ask you about it yesterday... [13:23] today is good, I'll fix that ugly [13:24] cool sure thing [13:24] yea, JS doesn't have some of that ability that python does so it has to do more manual cruft [13:24] makes sense. [13:24] in js I"d be doing this code VERY differently :) [13:24] I'm sure [13:25] I've been having a tough time getting python devs to do good JS lately so I know that battle [13:25] JS is annoying. semicolons, too many braces, no default arguments [13:25] i love all those things about js [13:25] functional [13:26] awesome [13:26] functional [13:26] the lack of default args is messy because you end up just with a single argument cfg [13:26] prototypical inheritence, yay [13:26] and doing a lot of var val = cfg.val || 'default' [13:26] that isn't so bad. [13:26] i do the same damn thing in python [13:26] prefixed by a var config = cfg || {} [13:26] yea, but for each value, ugh [13:27] def foo(arg=None):if arg is None: arg = blah [13:27] barbaric [13:27] yea, but it should be more [13:27] I'd rather have to type self. for the rest of my life than var = function{ [13:27] not me. [13:27] def foo(**kwargs): arg = kwargs.get('arg', 'default') [13:27] at least [13:27] and that's only if you have a bunch of possible kwargs [13:28] but then you HAVE to use kwargs [13:28] I've come to actually like self [13:28] It's self mutilation. ;) [13:28] or self love [13:28] jrwren: right, because 95% of the time you don't need kwargs because you're not passing more than 3-4 args to a method [13:28] take your pick [13:28] right, but if you hare 3-4 args, each with defaults, that is a lot of checking the defaults [13:29] no, you don't have to check defaults, that's the point of defaults [13:29] * rick_h_ is confused...pastebin! [13:29] you do if you are assigning mutable defaults [13:29] well stop that :P [13:29] right. [13:29] you use None and then assign a new mutable instance [13:29] then the default is None and yes, you have to check for None [13:29] but objects are mutable by default [13:30] right, but default objects? that seems strange I guess [13:30] why? [13:30] i don't discriminate between primitives and other types [13:31] I'm thinking, it just strikes me as odd, but yea I don't have a good reason atm [13:31] guess I just haven't run into a ton of that and when I have it's not seemed odd [13:31] you're right, lack of discrimination ftw [13:31] its very common when you inject dependencies but then optionally allow non-injected instantiation [13:32] yea, and I guess my stuff I've worked on just tends to enforce you inject the right thing [13:32] I'll have to look up depeendency injection one of these days. I have no idea what it is, but I see people saying it often [13:32] its DEAD trivial. [13:32] i recommend asking rick_h_ rather than look it up [13:33] becuase looking it up tends to confuse people and there is WAY too much poor writing out there on it. [13:33] or ask me, but you see me rarely :p [13:33] ugh, welcome to zope [13:33] bad docs zope? [13:33] bad DI...waaay to much [13:33] jrwren: I see you every day, right here [13:33] hah [13:34] Ahahahahahahahah: Dependency injection From Wikipedia, the free encyclopedia Not to be confused with Code injection. This article may be too technical for most readers to understand. Please help improve this article to make it understandable to non-experts, without removing the technical details. The talk page may contain suggestions. (January 2010) [13:35] i have to wonder if zope wasn't largely written by people who did a lot of java and then started writing java in python [13:35] jrwren: yea, I can't help but put that label on our devs [13:35] brousch: i'll try a description when I get to the office, in a bit :) [13:35] Doesn't Zope pre-date java? [13:35] and when they get to writing JS it's so horrid [13:35] no, zope is old, but not THAT old. [13:36] I'd say DI at a simple level is that rather than pass a User object into a method, you have a DI container that holds a "Person" [13:36] somewhere in your code you pass in a LoggedInUser into that Person container [13:36] that is one sweet thing about my new job... they use review board, if someone doesn't do things the right way, people talk about it on the patch and things get done the right way [13:36] and when the code wants to access it, it asks the DI container for whatever is currently in the container for "Person" [13:36] no! [13:36] containers are not part of DI at all. [13:36] see... confusing topic! [13:37] Zope Corp formed in 1995, Java released in 1995 [13:37] yea, it is hard to break down into a "3 line" thing [13:37] right [13:38] a container typically does the injection for you, but you can do DI entirely manually and its definition can stand alone without containers. [13:38] zope is very like this; http://en.wikipedia.org/wiki/Dependency_injection#Automatically_injected_dependency [13:38] yea, true. [13:38] where DI is nice is in testing [13:38] but outside of that I find it just compliated [13:39] and with the flexibility of langs like Python/JS I prefer mock/patch over DI ime [13:39] brousch: DI is simple: say type A needs a type B. Instead of instantiating B itself by calling constructor, it asks for a B to be sent to it, usually via constructor param. [13:39] so you've injected the dependency B into type A [13:39] its also called inversion of control [13:40] thus jrwren's issues with needing to allow for a mutable object as a default value in an arg [13:40] because now instead of A controlling instantiation of that B instance, the control is inverted to the instantiator of A [13:40] where it really belongs [13:40] right. [13:40] since A cannot possibly know all cases of how B shold come to be [13:40] exactly. [13:40] I do that all the time [13:40] and if you try to make it do that, A and B are so tighly coupled they might as well be one class [13:41] its really OO 101, but sadly a lot of OO folks don't learn it and keep on newing up spagetti dependency [13:41] exactly. [13:41] reduce tight coupling [13:41] Damn complicated pattern names [13:41] and testing is nice because you can create a stub/mock B and pass it to A and check that it does what it should [13:42] in java and C# it enabled interface development, in python it enabled duck typing, because now B can be anything that quacks the way A needs B to quack [13:42] where if A was creating B, you don't have control of B and have a harder time testing A [13:42] ok, i drive to office now :) [13:42] enjoy [13:43] Thanks [13:43] I think I get it, and have been doing it for a while [13:43] yea, it can get very complicated though [13:44] but yea, the idea is pass in what something needs vs creating it inside [13:44] but then you can end up with long lists of args, default values issues, etc [13:44] I see [13:48] what's the bash variable to reuse the result of the last command? [13:48] locate something [13:48] [get result] [13:48] vim $? or something to open that result [13:49] $? i think [13:51] ended up cheating, vim `!!` [14:08] but the longs lists can be good things. [14:08] its a warning sign that maybe there is too much responsibility in that type [14:08] $? is the error code. [14:08] not sure what other result there is in a bash command. [14:12] I think it's $(!!) [14:13] bash captures stdout and lets you reuse it? [14:13] no, !! is just rerunning the last command [14:14] I think I was just recaling the !! tricks [14:15] ls /etc/hosts && cat $(!!) seems to work for me (simple test) [14:15] right, and `!!` does a similar thing [14:15] ah ok, nevermind I see [14:16] no fooling with ls! [14:16] if you had picked any command other than ls it owuld have been obious [14:16] yeah [14:16] echo /etc/hosts && cat $(!!) [14:16] :) [14:16] $() is just subshell [14:17] right [14:17] so combining it with !! won't get you much. [14:17] i fancy myself a bash master, but I've never mastered ! commands [14:17] seems like every other area of bash I have a handle on [14:19] kind of ugly but what about capturing the output to a variable? [14:21] only way I know is that. [14:21] but I think he long since moved on. [14:22] anytime I've needed last output instead of redirection I've been doing something in Perl anway. Hadn't really thought of that in bash. [14:22] perl, nom nom [14:23] hah [14:23] yea, I just felt like there had to be a better way to fire vim off a locate command result [14:23] without copy/paste/etc [14:30] well subshell, jus tlike you said. [14:30] but once you ran the locate once, it is too late. [14:30] you'll have to run again [14:30] yea, but it's off a cached state so no worries [14:31] <3 locate [14:31] right [14:31] yeah <3 locate [14:31] <3 locate more on ssd [14:31] its one of the first things I turn on. [14:31] yup, on ssd it is amazing. [14:31] which is rather telling [14:31] AFAIK locate just finds all teh files on your system then greps a text file [14:32] it could REALLY be made faster if it hashed storage [14:32] or indexed [14:32] but I guess that is challenging because how do you index on *blah* ? [14:32] right [14:32] i'd like to read some research on that if anyoen knows [14:32] i guess ngram indexes *sigh* [14:32] all the rage [14:32] is it? [14:33] i've never heard of it, hehe [14:33] well, there was a couple diff fulltext talks at pycon [14:33] and everyone doing fulltext is going to ngrams since you get better non-english and partial match support [14:33] Search: foobar [14:34] match indexes on foo oob oba bar [14:34] I see you wanted 'food' yay [14:34] excellent. [14:34] :P [14:34] i never knew that full text search was doing ngrams [14:34] not all, but it's a big option these days [14:35] helps with non-english since you're more likely to hit matches with a few characters, takes less natural language processing to do [14:36] thanks rick_h_ you rock as always [14:36] I find that stuff interesting. One day I'll get off my butt and tinker with it [14:36] me too. [14:36] got into it a litle bit when trying to setup fulltext search for bookie [14:36] *nod* [14:36] and lucene is great, except for the jvm part [14:37] i'd love something else. [14:37] a rethinking of hte problem. [14:37] i think it is about time [14:37] http://packages.python.org/Whoosh/api/analysis.html?highlight=ngram#whoosh.analysis.NgramAnalyzer [14:38] so you can see there are several different analyzers available to use [14:38] interesting. [14:38] i've only done ngram analysis in the context of nucleotides and amino acids [14:38] but tokenizing is easy [14:38] compare the ngram to the stemming and you kind of see a little bit the common bits [14:39] building results is not [14:39] yea, exactly. This is all about tokenizing the content and the query terms [14:39] and you get vastly different sized data sets to go through based on these [15:11] anybody here speak fluent german? [15:11] my wife, but she's at work [15:11] ok [15:12] rick_h_: whoa, didn't know that[5~ [15:12] greg-g: she was a german major at UM, spent a year abroad for school. Med students get to have fun undergrad degrees [15:13] her family and my grandmother come from germany so thanksgiving is usually a bunch of sentences started in english and ending in german so I just smile and nod my head [15:13] oh nice :) [15:16] nvm, my buddy from Deutschland came through [15:16] cool [16:38] I always want it to be #ubunutu-mi-us for like ubuntu.mi.us [16:39] I'm sortof sad you never see .mi.us anymore [16:40] i used to have an email in high school that was like derek@mhs.bloomfield.k12.mi.us or somesuch [16:41] I had freytag@archbold.k12.oh.us [16:42] ohhh memories [16:43] they have such a terrible site [16:55] Most educational sites are only one step removed from a geocities site [16:56] everything you hated about geocities, without the geocities [17:48] ohio! [17:49] abentley: huh? [17:58] jrwren: yeah, born and raised. just moved here a year ago [17:59] MaskedDriver: You some kind of Buckeye fan? [18:02] graduated from OSU and then worked there for 2 years [18:02] so you could say that [18:05] *gasp* [18:05] so you secretly hate us all. [18:05] depends [18:06] are you an UM fan or MSU? [18:06] both [18:06] then I only hate half of you ;) [18:06] would you shake my hand? [18:06] does the left side of your brain like UM or MSU? [18:06] or would you spit in my face and turn around and walk away like an OSU nut? [18:06] I'd shake your hand [18:06] I'm not one of the nut jobs [18:07] oh, ok. [18:07] we lose a game, I shrug and go back to my video games [18:07] welcome to michigan [18:07] pure michigan [18:07] I am scared in Columbus. I park my van with my U-M license plate against the wall so hooligans don't vandalize me [18:08] eh, yeah probably wise [18:08] Where I come the the closest rivalry we have that anywhere near the fanaticism that UM vs MSU fans have is Navy vs Army. [18:08] even then it's no where near as bad, I don't understand it [18:09] what I love is that UM and MSU hate each other more than UM hates OSU, but we hate UM with every fiber of our being [18:09] it doesn't make sense [18:09] we should hate Florida more than UM. They beat us in the national championship TWICE in one year! [18:10] football and then basketball [18:10] MaskedDriver: Everybody wants us to be their rival: MSU, OSU, Notre Dame, Penn State [18:10] That is because we are the most awesome [18:10] lol [18:11] we've got Meyer now... he's going ot make the Tressle era look like the Cooper era [18:11] I have no idea what that means [18:12] Urban Meyer.. our new coach [18:12] I really don't give a crap about sports. I'm just stirring the pot [18:12] ^ [18:13] ah [18:13] Urban Meyer has a 104-23 overall record and a 7-1 bowl game record [18:13] he's kinda a big deal [18:13] I don't really care abotu sports either, but all my friends are, so I know a thing or two [18:14] High end World of Warcraft Guild Progression: Now that's a competative sport! [18:15] One that matters too [18:15] That matters even less than real sports [18:15] Milyardo: or SWTOR end-game PVP stats [18:15] As if SWTOR has a end game [18:16] it does [18:16] just whiney kids complain that it's too repetitive....... [18:16] gear up and quit your bitchin' [18:17] you mean I have to PVP over and over again to get PVP gear?! NO WAY! [18:17] why can't I just buy it for credits?! [18:17] Bioware: le'sigh.. fine, here's some starter PVP gear you can buy with credits [18:18] whiners: BUT I'M NOT GOOD! We should be able to buy Battlemaster gear with credits! [18:18] Bioware: le'sigh.. fine, you can buy schematics to craft PVP gear for credits [18:18] whiners: But it doesn't come with any enhancements and I have to be Rank level 50!!! [18:18] Bioware: diaf [18:19] I know nothing about SWTOR PVP, but people whine in everygame [18:19] yeah [18:19] "casuals" ruining stuff for everybody [18:35] i'm hating on pthon again. [18:35] i'm setting ElementTree.Element instance's text attr and then writing and its not working! [18:35] i want ot punch python in the face. [18:36] such a waste [18:36] Blame XML [18:36] how can I when teh same dom manip calls work in every other language/lib I"ve used [18:37] Starcraft2 > SWTOR for esports. [18:39] Python and XML are not the best of buddies [18:40] yay, works in bpython. WTF [18:40] jrwren: Are you sure you're using the right version of Python? [18:40] You might have escaped your venv [18:41] nah, i'm just an idiot. [18:41] write bad code, get bad results. simple h? [18:41] i take it all back. [18:41] of course it si PEBCAK [18:41] well, that saves me from apologizing for Python. ;) [18:41] i'm sorry python. [18:41] i'm sorry for calling you waste and wanting ot punch you in teh face [18:42] Python forgives you [18:42] as opposed to PHP, which thinks you're a dirty whore. [18:42] php knows its own kind [18:42] hah [18:43] I don't know what it is about Daft Punk's Tron Legacy Soundtrack, but I feel like a programming badass when it's on. [18:45] you should try mind in a box's R.E.T.R.O. [18:50] jrwren: Will do [18:51] XML is not the best of buddies with clear thinking, or getting things done [18:52] XML gets in the way of creating software [18:54] I get in the way of creating software [18:56] snap-l: the album (and all their albums) are suposed to tell a story [18:56] i don't really grod it a lot, but 8 bits and i love 64 are awesome. [18:56] i love 64 is espeically fun, its about an 8 bit wanting to upgrade to 64 "something I couldn't even comprehend" :) [19:03] I'm currently liking nervous testpilot [19:06] what is that? [19:17] if someone has a better name than "android bookie" or "bookie for android" lemme know [19:19] AndBookie [19:19] BookieDriod [19:20] If it works out I'd say you could just go for Bookie [19:22] I needs to get it to log in [19:22] then upload bookmarks [19:22] cool [19:23] don't actually need login, just a form to store your username/api key [19:23] and then you build the urls with those params in mind [19:23] yea [19:23] so on first use you'd have to store those to values, bonus points for the api url so that it can be used with your own install [19:26] damn, spent a couple of hours tracing a test failure only to find out it's because I wasn't clearing the fulltext index. [19:26] Bmark app is free. Use your own server version is $9.99 [19:26] whoosh won't return results for words that are too common, so as we built up a bunch of the same bookmark, phrases got too common and just stopped returning [19:27] that took a bit to figure out [19:27] rick_h_: Ahahahah, that is funny [19:27] currently it does work, it just pulls the most recent bookmarks from the main feed and displays them in a list [19:27] oh [19:27] yea [19:27] I spent over an hour to find a capatalization error in an xml config file [19:27] absolutely no error or warning about it anywhere just failing to read the configuration [19:27] what's funny is that I'd runthe failing test and it'd pass [19:27] so I started working backwards enabling tests one at a time [19:28] and suddenly it'd fail, just as it crossed that threshhold [19:28] and I couldn't find any connection between the most recently added test and the failing one [19:28] still, glad the code is fine, just need better test cleanup [19:28] rick_h_: That deserves a blog post [19:29] that requires effort :P [19:29] but yea [19:31] meanwhile ... one preferences activity coming up [19:31] woot! [19:32] derekv: you get something working and make sure you update that amazon wishlist :) [19:33] =p [19:33] derekv: You using plain old Android or something like PhoneGap? [19:33] Java baby [19:33] brousch, native [19:33] native java [19:33] * rick_h_ is excited [19:34] I don't want to bother learning phonegap etc [19:34] for one thing [19:34] Just not the route I want to go. [19:34] Well if you already know Java that makes sense [19:34] I wouldn't tell someone else not to learn phonegap (I don't know I've never used it) [19:35] Or to just put the effort into their mobile site [19:35] But i'm more of a low level guy [19:35] Good people to have around [19:36] I like going into kernel source sometimes [19:37] getting close, 86/90 passing tests [19:37] derekv: join the dark side. We have cookies. [19:37] lol [19:38] devinheitmueller: What's the dark side? [19:38] brousch: kernel development. [19:38] Ah! [19:38] devinheitmueller: used to come to CHC where he'd bring cool usb-tv devices to hack on [19:39] then he went back to NY...traitor! [19:39] devinheitmueller, I thought you meant the opposite. like Join the Web Development side, we have cookies [19:39] :) [19:39] hah [19:39] The Morlocks of programmers [19:39] It's true, the web development side does have cookies, in a different pun-like manner. [19:39] less yummy [19:39] rick_h_: Thanks. In fairness, the New York people thought I was being a traitor by going to Michigan. [19:40] oh hell yea! All tests pass with the new alembic based migrations and such [19:42] rick_h_, should I set default server to bmark.us or let people enter it [19:43] derekv: so it needs to be the api endpoint which I default to https://bmark.us/api/v1 [19:44] I figured on appending /api/v1 to what they entered [19:44] well, honestly at this point they can't change anything [19:44] but one of the bugs we've got is following proper domain subdirs and such [19:44] so I just keep the whole endpoint as people might have their points be strange [19:45] derekv: you're probably good either way [19:45] hmm, so it might not be /api/v1 ? [19:45] there will be time to fiddle with that [19:46] i just figured out why my test was passing when I thought it should fail. [19:46] derekv: yea, I guss that would be consistant until we change the version one day [19:46] confused x with self.x in a test. i'm so sick of my python nubness [19:46] if they were at mysite.com/bookie/ you'd still be cool with $url/api/v1 [19:46] don't use single letter variable names? :) [19:47] what I do is use single variable names but different numbers of underscores based on the scope context [19:47] like ___y is a global [19:48] * derekv ducks [19:48] five is for a goto label [19:48] goto _____z [19:49] haha [19:50] by limiting myself to 26 variables per scope I end up with cleaner code [19:53] ah, a damn good branch: Showing 48 changed files with 572 additions and 1,154 deletions. [19:53] wow [19:54] merge those branches more often! [19:54] ;) [19:54] well, rolling up all the db migrations in bookie into two fresh ones using alembic vs sqlalchemy-migations [19:54] so it's cheating, but does mean a lot fewer lines of code/simpler/etc [19:56] cool [20:15] woot! https://crate.io/packages/breadability/ vs https://crate.io/packages/readability-lxml/ I'm coming after you [20:15] ok, so 1 day of a package vs my 5 isn't fair :P [21:02] hmm maybe a swipe left/swipe right to go between different feeds [21:02] like how some twitter apps work [21:02] I got a prefs screen up now [21:02] Not wired to anything yet [21:41] derekv: cool [21:41] derekv: yea, I'd imagine maybe defaulting to mine, swipe to all, swipe to search or something? [21:46] and then the ability to select an item and load the readable view [21:56] bah, fixed the docs, missed that they weren't building correctly