/srv/irclogs.ubuntu.com/2014/02/21/#ubuntu-us-mi.txt

greg-gcmaloney: in your blog you're referring to https://chrome.google.com/webstore/detail/web-timer/ggnjbdfgigejghknieofeahaknkjafim ?00:05
* greg-g assumes so00:08
* greg-g can't find a surrogate for Fx00:09
cmaloneygreg-g: yeah, i think that's the one02:40
_stink_jayis: NO03:59
jayisAH04:02
mrgoodcatmorning all14:18
brouschmorning one14:18
rick_h__party14:18
rick_h__tgif14:19
mrgoodcatfriday++14:20
brouschCivic Hackathon for Code Across America tonight14:21
brouschand tomorrow14:21
jrwrensounds too much like hands across america and I don't think webster is going to be there.14:39
brouschThis wind is nuts today14:41
brousch32F feels like 17F 45mph winds14:59
JonEdneyYeah, that wind is brutal, but I will take it after the last 2 months.15:05
JonEdneyOh, and good morning.15:05
brouschI'd prefer 20F and calm15:08
rick_h__heh, polar vortex coming, how about -20?15:08
rick_h__that's close right?15:08
brouschThat's too cold15:11
brousch20F feels nice now. I was on the roof 2 days ago in a tshirt shoveling and breaking ice dams15:12
jrwrenRED ALERT!  Old World Python Class Sighted!15:44
rick_h__ruh roh...run for the hills!15:44
jrwreni lolled for a good 10 seconds.15:48
cmaloneygood morning15:59
mrgoodcatI just love that they call it a polar vortex. Sounds like some star wars shit16:01
brouschlooks like it right now16:02
cmaloneymrgoodcat: To me it sounds like a Canadian Secret Weapon16:02
cmaloneyReagan had his Star Wars Program, but Canada has unleashed the Polar Vortex16:02
rick_h__jrwren: they should flip it. Want an old object? you need to do class MyUser(oldobject)16:16
rick_h__:)16:16
jrwrenrick_h__: ha! that would be an interesting python 2.8 hack ;p16:34
cmaloneyrick_h__: I like the way you think. :)16:35
jrwrenpoll: open() or file() in python and why.17:09
rick_h__with open() as fh:17:11
rick_h__because that's just what I've known/used.17:11
jrwreni'm pretty sure the file class has enter/exit, but I like your because the best.17:11
rick_h__yea, i mean if you go to file stuff in the docs it's all open17:12
rick_h__http://docs.python.org/2/tutorial/inputoutput.html17:12
rick_h__I'm trying to find file() to compare api/args and such17:12
rick_h__http://docs.python.org/2/library/functions.html?highlight=file#file17:13
rick_h__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
rick_h__I wouldn't expect a class constructor to be a context manager as well, but maybe it is.17:14
rick_h__yea, don't see it in the api docs for File objects17:15
rick_h__so context mgr ftw17:15
jrwrenrick_h__: YES! thankyou.17:18
rick_h__thanks for bringing it up. Never really thought about it17:20
mrgoodcatfor 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:29
brouschmrgoodcat: Sit behind rick_h__ and watch him work18:30
mrgoodcathaha18:30
mrgoodcatfailing that, are there any books you might suggest?18:30
mrgoodcati have a few, but don't know which to start with18:30
rick_h__there's a few 'python way' books. The best thing is to look at code from devs you respect, check out pyohio this summer, etc18:31
rick_h__ask someone to review the code18:31
brouschFollow PEP818:32
rick_h__yea, pep8 and pylint your stuff18:32
mrgoodcatdoes pylint check for errors or style?18:33
rick_h__well, sanity check vs style.18:33
rick_h__usused variables, imports, proper use of exceptions, etc18:34
mrgoodcatgot it18:34
rick_h__If I can open it without my editor yelling at me you're on the right track :)18:34
mrgoodcati was going to do clojure but i recently did haskell and i've been told by too many people that i have to try python18:35
rick_h__clojure is worth looking at as well18:35
rick_h__as someone that does python18:35
mrgoodcatwhich would you suggest first? assuming i'll do both eventually (which i likely will)18:37
rick_h__if you do ruby already I think clojue will be more enlightning18:38
rick_h__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
mrgoodcatenlightening in what way? because of the functional aspect of it?18:38
rick_h__yea, it's different. It'll open your mind some more18:38
mrgoodcati've done functional before18:39
rick_h__there are tools you learn because you want a better tool and tools you learn that expand how you think18:39
mrgoodcatI happen to really like haskell18:39
rick_h__clojure, for me at least is more about expanding how I think.18:39
mrgoodcatdoes clojure offer any real advantage over haskell?18:39
rick_h__ask waf he tinkers with them more18:39
rick_h__I think clojure is more real-world usable than haskell18:40
jrwrenand pyflakes.18:41
jrwrenI've found just having a pyflakes vim plugin helps me be pythonic a bunch.18:41
rick_h__jrwren: yea, I used flake8 which is that + pep818:42
jrwrenyes, that.18:42
jrwrenI think I used that too18:42
jrwrenI know I have both.18:42
rick_h__there's a new one that's more maintained18:42
rick_h__right18:42
jrwrenpep-0463 looks crazy18:43
brouschThis looks interesting http://stephensugden.com/crash_into_python/18:45
jrwren3.5 is getting 046318:45
rick_h__jrwren: yea, that is. One side of my brain goes "oooh cool that reads nice"18:45
jrwrenx=[]18:45
rick_h__and the other side goes "wtf"18:45
jrwrenx[0] except IndexError: None18:46
rick_h__expr or else default if Exception18:46
rick_h__?18:46
jrwrenit will be nice for some things which are too verbose right now18:46
rick_h__yea18:46
rick_h__some of those are hard to read at intent though18:46
* rick_h__ will have to look for some personal use cases of it18:47
jrwreninteresting that bare except is not allowed.18:48
jrwrenyou have to except BaseException:18:49
jrwrenhehe18:49
jrwrenON ERROR RESUME NEXT18:49
jrwreni'm going to write a script which adds " except BaseException: pass" to every statement in my python file18:49
mrgoodcatfunctional programming just seems fundamentally broken to me when there needs to be user interaction. maybe i just don't understand it well enough18:50
mrgoodcatit seems to me that programs that depend on user interaction depend on mutable state18:51
mrgoodcatit seems sometimes too theoretical. difficult to apply to real world problems18:52
mrgoodcatgreat for things like project euler though18:52
jrwrenmrgoodcat: functional and immutability are orthoginal.18:52
jrwrendon't let the uneducated functionistas tell you otherwise.18:52
rick_h__hey, not saying otherwise18:52
jrwrenfunctional might make it easier to embrace immutability - easier being subjective and up to you.18:53
rick_h__functional can be a lot about design/layout/communication contracts18:53
jrwrenthat said, I find nothing challenging about user interaction and functional constructs.18:53
mrgoodcatby orthogonal you mean...?18:53
jrwrenmrgoodcat: exactly perpendicular18:53
jrwreni mean one does not have to do with the other. they are not parallels18:54
rick_h__you can implement your code in terms of functional design just fine without getting into immutibility18:54
jrwrenrick_h__: exactly18:54
rick_h__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:55
jrwrenserver side JS app?18:58
jrwrenor browser side?18:58
rick_h__browser, juju gui18:59
jrwrenbrowser side you are typically more concerned with not shadowing the DOM too much18:59
mrgoodcati'd just like to reiterate how much I hate php20:32
mrgoodcatand specifically, wordpress plugins20:32
cmaloneymrgoodcat: I'd also check out the "Writing Idiomatic Python" book20:51
cmaloneyIt's a little spartan but should give you some good pointers on what is idiomatic with Python20:51
greg-gcurious what it looks like to be the one to press the "push all the code" at Wikimedia? https://asciinema.org/a/779822:42
rick_h__macbook pro 01?22:43
greg-gnot me22:45

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!