[00:05] cmaloney: in your blog you're referring to https://chrome.google.com/webstore/detail/web-timer/ggnjbdfgigejghknieofeahaknkjafim ? [00:08] * greg-g assumes so [00:09] * greg-g can't find a surrogate for Fx [02:40] greg-g: yeah, i think that's the one [03:59] <_stink_> jayis: NO [04:02] AH [14:18] morning all [14:18] morning one [14:18] party [14:19] tgif [14:20] friday++ [14:21] Civic Hackathon for Code Across America tonight [14:21] and tomorrow [14:39] sounds too much like hands across america and I don't think webster is going to be there. [14:41] This wind is nuts today [14:59] 32F feels like 17F 45mph winds [15:05] Yeah, that wind is brutal, but I will take it after the last 2 months. [15:05] Oh, and good morning. [15:08] I'd prefer 20F and calm [15:08] heh, polar vortex coming, how about -20? [15:08] that's close right? [15:11] That's too cold [15:12] 20F feels nice now. I was on the roof 2 days ago in a tshirt shoveling and breaking ice dams [15:44] RED ALERT! Old World Python Class Sighted! [15:44] ruh roh...run for the hills! [15:48] i lolled for a good 10 seconds. [15:59] good morning [16:01] I just love that they call it a polar vortex. Sounds like some star wars shit [16:02] looks like it right now [16:02] mrgoodcat: To me it sounds like a Canadian Secret Weapon [16:02] Reagan had his Star Wars Program, but Canada has unleashed the Polar Vortex [16:16] jrwren: they should flip it. Want an old object? you need to do class MyUser(oldobject) [16:16] :) [16:34] rick_h__: ha! that would be an interesting python 2.8 hack ;p [16:35] rick_h__: I like the way you think. :) [17:09] poll: open() or file() in python and why. [17:11] with open() as fh: [17:11] because that's just what I've known/used. [17:11] i'm pretty sure the file class has enter/exit, but I like your because the best. [17:12] yea, i mean if you go to file stuff in the docs it's all open [17:12] http://docs.python.org/2/tutorial/inputoutput.html [17:12] I'm trying to find file() to compare api/args and such [17:13] http://docs.python.org/2/library/functions.html?highlight=file#file [17:14] When opening a file, it’s preferable to use open() instead of invoking this constructor directly. file is more suited to type testing (for example, writing isinstance(f, file)). [17:14] I wouldn't expect a class constructor to be a context manager as well, but maybe it is. [17:15] yea, don't see it in the api docs for File objects [17:15] so context mgr ftw [17:18] rick_h__: YES! thankyou. [17:20] thanks for bringing it up. Never really thought about it [18:29] for someone with experience in multiple programming languages what would you suggest as a good resource to learn idiomatic python? I'm not so much worried about the syntax because that shouldn't be difficult, but more about the "python way" of solving any particular problem. [18:30] mrgoodcat: Sit behind rick_h__ and watch him work [18:30] haha [18:30] failing that, are there any books you might suggest? [18:30] i have a few, but don't know which to start with [18:31] there's a few 'python way' books. The best thing is to look at code from devs you respect, check out pyohio this summer, etc [18:31] ask someone to review the code [18:32] Follow PEP8 [18:32] yea, pep8 and pylint your stuff [18:33] does pylint check for errors or style? [18:33] well, sanity check vs style. [18:34] usused variables, imports, proper use of exceptions, etc [18:34] got it [18:34] If I can open it without my editor yelling at me you're on the right track :) [18:35] i was going to do clojure but i recently did haskell and i've been told by too many people that i have to try python [18:35] clojure is worth looking at as well [18:35] as someone that does python [18:37] which would you suggest first? assuming i'll do both eventually (which i likely will) [18:38] if you do ruby already I think clojue will be more enlightning [18:38] python is ruby done right, so if you're looking at doing more of what you do but with cleaner tools then go python :) [18:38] enlightening in what way? because of the functional aspect of it? [18:38] yea, it's different. It'll open your mind some more [18:39] i've done functional before [18:39] there are tools you learn because you want a better tool and tools you learn that expand how you think [18:39] I happen to really like haskell [18:39] clojure, for me at least is more about expanding how I think. [18:39] does clojure offer any real advantage over haskell? [18:39] ask waf he tinkers with them more [18:40] I think clojure is more real-world usable than haskell [18:41] and pyflakes. [18:41] I've found just having a pyflakes vim plugin helps me be pythonic a bunch. [18:42] jrwren: yea, I used flake8 which is that + pep8 [18:42] yes, that. [18:42] I think I used that too [18:42] I know I have both. [18:42] there's a new one that's more maintained [18:42] right [18:43] pep-0463 looks crazy [18:45] This looks interesting http://stephensugden.com/crash_into_python/ [18:45] 3.5 is getting 0463 [18:45] jrwren: yea, that is. One side of my brain goes "oooh cool that reads nice" [18:45] x=[] [18:45] and the other side goes "wtf" [18:46] x[0] except IndexError: None [18:46] expr or else default if Exception [18:46] ? [18:46] it will be nice for some things which are too verbose right now [18:46] yea [18:46] some of those are hard to read at intent though [18:47] * rick_h__ will have to look for some personal use cases of it [18:48] interesting that bare except is not allowed. [18:49] you have to except BaseException: [18:49] hehe [18:49] ON ERROR RESUME NEXT [18:49] i'm going to write a script which adds " except BaseException: pass" to every statement in my python file [18:50] functional programming just seems fundamentally broken to me when there needs to be user interaction. maybe i just don't understand it well enough [18:51] it seems to me that programs that depend on user interaction depend on mutable state [18:52] it seems sometimes too theoretical. difficult to apply to real world problems [18:52] great for things like project euler though [18:52] mrgoodcat: functional and immutability are orthoginal. [18:52] don't let the uneducated functionistas tell you otherwise. [18:52] hey, not saying otherwise [18:53] functional might make it easier to embrace immutability - easier being subjective and up to you. [18:53] functional can be a lot about design/layout/communication contracts [18:53] that said, I find nothing challenging about user interaction and functional constructs. [18:53] by orthogonal you mean...? [18:53] mrgoodcat: exactly perpendicular [18:54] i mean one does not have to do with the other. they are not parallels [18:54] you can implement your code in terms of functional design just fine without getting into immutibility [18:54] rick_h__: exactly [18:55] we're working to make our large JS app more functional in structure and api design, but not dealing or worrying about immutible datatypes/etc. [18:58] server side JS app? [18:58] or browser side? [18:59] browser, juju gui [18:59] browser side you are typically more concerned with not shadowing the DOM too much [20:32] i'd just like to reiterate how much I hate php [20:32] and specifically, wordpress plugins [20:51] mrgoodcat: I'd also check out the "Writing Idiomatic Python" book [20:51] It's a little spartan but should give you some good pointers on what is idiomatic with Python [22:42] curious what it looks like to be the one to press the "push all the code" at Wikimedia? https://asciinema.org/a/7798 [22:43] macbook pro 01? [22:45] not me