« first day (1724 days earlier)      last day (3224 days later) » 

6:00 PM
I mean the voice guy
 
Oh, Justin Roiland.
 
He's done tons of cartoons which baiscally the same animation style, same kind of jokes, same-ish voices.
 
I've seen Adventure Time, but that's the only other stuff of his I've seen.
 
Rick and Morty s02e01 leaked a week ago, you can find it online
 
Don't remind me. :/ I'm trying to be good and not watch it.
 
E02 leaked too.
 
Yeah, I haven't watched it yet
 
No spoilers please, I must remain pure
 
I feel like SO is just one giant Meeksees box.
 
That would explain my deep sense of dissatisfaction.
You can never really "finish" helping the truth-seekers
 
6:18 PM
Is it possible to do exception handling inside a list comprehension? For example (pseudocode) `[i for i in myList if myFunc(i) raises exception]
 
No, unless you define a helper function
 
try:
    [i for i in my_list]
except Exception:
    handle()
 
There were some proposals on PI ML to allow this
 
what about def myFunc(i, checkException=None): try: something except: return i, and put that inside the list comprehension?
 
6:22 PM
well, I'm pretty sure it would work. My question is whether that's a better or worse approach than using a helper function
 
I think the whole idea smells.
 
+1
 
why's that?
Basically, I'm reading data in from an Excel worksheet. Need to gather a list of cells that will raise exceptions when xlrd tries to read them, so that I can tell the end user which cells they need to correct.
 
I'd be inclined to do it like
def raises_exception(f, *args, **kargs):
    try:
        f(*args, **kargs)
    except:
        return True
    return False
seq = [i for i in myList if raises_exception(myFunc, i)]
... Although then you lose the ability to check for only certain kinds of exceptions
 
yeah
I'm raising my own exception but would also like to log the message from xlrd's exception. So, kind of annoying.
 
6:26 PM
Pass the exception type as the first arg or raises_exception.
 
Can't you have the raises exception return the type of exception it raises, then check that in the list comprehension?
 
That sounds complicated enough that you may as well not do a list comprehension at all
 
So it'd be (f, e, *args, **kwargs)
 
for loops are less concise but more powerful.
 
why not log the exception when you raise it, rather than assuming some other code can be made to do that?
 
DSM
6:27 PM
Coming in late, but since you can catch a collection of exceptions, why not pass the ones you want? (Oh, looks like that might have been corvid Fizzy's suggestion.)
 
yeah I could do a for loop, and if an exception is raised then add the cell to a list of bad cells
and nix the comprehension
thanks for your help, everyone
 
Every time someone writes an unnecessary list comp, a puppy dies.
Hopefully one of these days my list comp will finish off Jon...
 
Not if the list is ordered by number of legs, descending
 
DSM
I think proper listcomp usage is a good proxy for how Pythonic your style is. If you're trying to cram too much into one, you haven't yet mastered the Zen.
@riley: are you making that an answer?
 
@Ffisegydd [puppy.die() for puppy in puppies]? :(
 
6:36 PM
@DSM who?
 
If puppy.die() returns None then that is an inappropriate use of an LC meaning you just killed a puppy, OH THE IRONY.
 
DSM
@davidism: weren't you there the day vaultah chose a name?
 
Yeah I assumed you meant vaultah, I even refreshed the page in case he'd changed it.
 
Um, not that one. I can't keep track.
 
DSM
Oh, for those following, it turned out unutbu's name change to HappyLeapSecond was intended to be temporary, but he got bitten by the usual time limit. :-)
 
6:40 PM
PUPPIES DON'T HAVE A .die() METHOD!
(or at least, I'm going to pretend they don't for now, okay!)
 
kill(puppies)
:P
 
It's actually a special method that implicitly accepts soul as the first argument.
 
DSM
Puppies don't die; they only use Jikūkan Ninjutsu to translate themselves elsewhere.
 
@DSM I did even though that question is a dupe
:(
 
I upload the user control that cantain this code dynmin, and I upload also the viewmodel dynamic, so I cann'd define the veiw modle in local resourses — sari k 10 hours ago
^ I don’t even.
 
DSM
6:44 PM
Ehh, it was the right answer, so you should be happy. :-)
 
@DSM LOL
 
@DSM so if you'd like to answer these as the resident astrophysicist that'd be just swell
 
I'm not quite sure what the time limit on changes is
 
@BhargavRao I knew I should've just made it an answer. :P
 
@MorganThrapp Haha. Did not see your comment though :P
Till next time.
 
6:47 PM
Rb!
 
DSM
@Fizzy: "Why does the Kuiper belt stop" is actually vaguely related to my master's thesis. (My supervisor was important in outer solar system dynamics.) And right now New Horizons has me all giddy.
 
@JonClements yeah, they just have a move_to_farm() method
 
@davidism just don't mention the V word!
 
All my astro-friends do/did planetary or solar physics as opposed to more "out there" stuff.
I think if it was past Mars we didn't really care.
 
DSM
Most of the fun is outside Mars, though..
 
6:50 PM
If fun correlates with mass then yes, most of the fun is outside Mars' orbit.
 
@DSM I wonder why he changed it in the first place - it's actually made me laugh quite a bit :)
 
DSM
@Ffisegydd: more than just mass, interesting dynamics. And for that you really need multiple objects (moons, rings, etc.) and because of the timescales involved the inner solar system is mostly cleared of fun stuff.. IMHO. A friend who works on NEO dynamics feels otherwise. ;-)
 
cbg
 
@DSM oh - it's 30 days lmao
 
I support the study of parts of space farther away than Mars, because that's where the deadly gamma ray bursts will come from
 
6:53 PM
:P By planetary I meant more atmospheres/magnetic fields/things like that, as opposed to planets moving about.
 
I'm pretty keen on preventing total extinction events.
 
And especially the solar bit is still heavily researched.
 
@DSM that's quite a long "leap second" :p
 
DSM
@JonClements: it was even weirder for me -- when I first saw the name I didn't even associate it with an upcoming leap second.. I just thought it was the same weirdness that gave us the name "unutbu". :-)
 
Well, if he flagged himself, he could get it changed back sooner - but I just find it funny the way it is now... so I'm staying sthmm :p
 
7:04 PM
Man this git plugin for vim is awesome
 
Flagging himself as in flagging one of the posts?
 
@vaultah yeah... he could just flag himself and request a change - whether it'd be honoured or not is another matter
 
I tried once but my flag was declined
 
Well - you've had a few name changes over your time here :)
 
yeah :D
 
DSM
7:07 PM
Can't you change it on another site and have that propagate? I think someone recommended that when tristan was video for a while or whatever.
 
@DSM - yeah... that's a hack... join a new site... then sync that back to your network wide profile
 
I did that a few times, so it's possible
Anyone want to flag/delete/downvote my link-only crap answer? link
 
your link only?
 
Yep, that's one of my old accounts
(I don't use it for sock puppeting)
 
Why'd you abandon it?
 
7:12 PM
Jul 3 '14 at 17:02, by frostnational
I was angry coz the mods blocked my other account and I couldn't ask questions anymore
Please don't ban me, vaultah has no ties with that one
 
DSM
Wait, you're frostnational too? I can't remember if I knew that.
 
I remember that one.
 
Think there was an "abc" off the top of my head?
 
stupid this in javascript is a pain to debug.
 
DSM
raise TooManyNames
 
7:14 PM
abc, warlord, thejsb, 61612, traceur, Crystal and possibly more
 
@vaultah 14 changes in total :)
 
@corvid I don’t think it’s that bad..
 
@JonClements haha cool
 
I think it's really just the debugger more than this really
 
@vaultah Everytime add a serial number before the name. Like 15vaultah
 
DSM
7:15 PM
I do that with my PIN. Every time I have to change it, I bump the number by one.
 
@DSM What was it to start with, and how many times have you changed it? smiles innocently
 
DSM
I don't mind admitting I've changed it four times. More than that you'll have to wonder about. :-)
 
Feb 9 '14 at 13:59, by ThiefMaster
Moderator's rhombus = instant upvotes from strangers. Good job! — Crystal 2 mins ago
I was such an a**hole
Sorry :(
 
@vaultah I think most members of this room will say you've turned out okay and are welcome here :p
 
Huh, what did I miss?
 
7:20 PM
Thank you guys :)
 
DSM
@poke: depends on how long you've been gone. The Yankees beat the Nadeshiko?
 
Who? What?
 
Switch from IE to a better browser :P
 
Nope
 
7:21 PM
:D
 
I didn't know what would be the reaction
 
I’m super confused.
 
@poke we all are... it's the greatest state to be in!
 
:(
 
DSM
The road to wisdom passes through the wilds of confusion. #inspirationalposter
 
7:23 PM
Well, @vaultah I think you're a credit to our community.
 
\o/
 
7:36 PM
I don't really get sock-puppet accounts. I understand you can have them merged into your main account. Maybe I'd create one if I wanted to start posting on other subjects to minimize the halo-effect of the rep count, or if I just wasn't confident enough on the tag subject-matter to risk associating the answer with a personal account. But the temptation to vote for my own stuff would probably be too great. Or maybe I just fear it would be too great. I'm fairly disciplined in such matters, though.
So this is the only account I've ever had here.
 
The Baader-Meinhof Phenomenon really messes with me I think
 
googling...
 
I would not define an account that you just use for avoiding your personal reputation as a sock-puppet account.
 
I was talking to R&D about making commercial drones for large scale ag on Thursday ... and ever since then Ive seen like a million articles about it
 
I'd say that a sock-puppet account has the connotation of using it for dishonest means.
 
7:39 PM
I had a bit of frequency illusion last week... I learned about the word "Ptarmigan" for the first time while doing a crossword puzzle, and the next day I saw it in a webcomic
 
I get that a lot with words.
 
Yeah, "sock puppet" seems to have those connotations, but I've seen it used strictly without a negative denotation here (Pekka?) so I'm going to go with that.
 
Just go with “secondary account”
 
It's funny how euphemisms work...
Same denotations, different connotations.
 
DSM
I was thinking about weird word frequency just the other day. I don't ever remember seeing "bespoke" growing up. Now it's every-the-bloody-where.
 
7:43 PM
just use "custom"
 
I don't think bespoke is particularly rare, but maybe it's just more UKish.
 
I blame hipsters for popularizing "bespoke", due to the intersection of "have lots of disposable income" and "like locally sourced home-made crap"
 
And people putting on upper-class airs, like in the Financial Planning trade-mags.
Maybe I could find a hipster market for $500 bespoke raspberry pi's.
I do live in Brooklyn...
 
I wish I could find the site that was selling bespoke USB cables.
They were hand braided and 10k for a 6 foot cable.
 
My ones and zeroes must have the utmost clarity and warmth
 
7:48 PM
it's more authentic.
 
The zeros are made from 100% recycled post-consumer O's
 
@Kevin I though it was made from eights that were pressed into the shape…
 
Yeah, if you want the deluxe model with the crossbar
 
I made a FIFO deque-style (maxlen argument) dict out of a OrderedDict this morning. I've always wanted one. Yay.
 
7:55 PM
Time to listen to some "chill out" radio: bbc.co.uk/programmes/b060bwds
 
Why a fifo dict?
 
Yeah basically "What's wrong with using list, collections.Deque, heapq to manage a LIFO
queue?"
 
DSM
@JonClements: cheers!
 
Rhubarb @Jon
 
7:56 PM
rbrb Jon
 
@vaultah no values to the keys?
a FIFO dict could hang on to the last n key-value pairs in memory.
 
Hm
 
When you have a FIFO, why do you need a dict-access though?
 
similar to the cache for re's compiled regex's
well, they're named items
 
Ohh, so you basically want a lookup with a limited size and some strategy to clean up older items?
 
7:59 PM
that's what I wanted.
 
I see
 
It sounds like a LRU Hash.
 
Least Recently Used?
 
DSM
Yeah, like in lru_cache.
 
looks like that sort of thing.
 
8:06 PM
stdlib has no linked list implementation, right?
 
Not if you are referring to stdlib.h
 
Python stdlib :P
 
collections.deque
 
Is there a way to do strptime without a format string? Something where it just tries different formats until it finds something?
 
8:09 PM
I think my dict is a little more elegant.
 
I'm trying to go from user input to a datetime object.
 
dateutil can do this afaik
 
DSM
Since you always need to be specific about how you want to interpret 3/4/2015, it's a little dangerous to rely on convention anyway.
 
Eh, it's intra-office. It'll always be US dates.
And yes, I know that just doomed me to failure.
 
> Generic parsing of dates in almost any string format;
 
8:13 PM
an __init__ that delegates to the OrderedDict.__init__ with super, a property, maxlen with a sensible setter and deleter, and a __setitem__. __setitem__ and maxlen.setter check len(self) and self.popitem(last=False) until sized right.
 
Yeah as vaultah said, dateutil.parser.parse
When you try to pip install it, it might fail, as it's actually called python-dateutil in PYPI.
 
and I think that's way more elegant than anything else I've seen or thought of.
 
@Ffisegydd Yeah, I ended up doing it through PyCharm. It ends up being a lot easier that way a lot of the time.
 
DSM
I wrote this code to throw a barrage of statistical outlier detection algorithms at the output of a friend's model, and it's working pretty well so far -- finding lots of weirdness. May have been the most useful thing I've done in months.
 
That's because PyCharm is all a growing Pythonista needs.
 
8:18 PM
I really do like it.
 
class LLItem:
    __slots__ = ('next', 'value')
    def __init__ (self, value, next = None):
        self.value = value
        self.next = next
    def __iter__ (self):
        yield self.value
        if self.next:
            yield from self.next
    def append (self, other):
        cur = self
        while cur.next is not None:
            cur = cur.next
        cur.next = other
        return self
    def prepend (self, other):
        return other.append(self)
 
LRU is a bit of a misnomer, I think.
your cache keeps the most recently used.
 
@AaronHall LRU is a replacement algorithms for caching. It’s pretty well named, and one of the most classic examples of cache algorithms.
 
"LRU is a replacement algorithm. You replace the Least Recently Used." ok so that makes sense. But I think about it in terms of keeping. and you don't keep the Least Recently Used.
 
DSM
But there's not really an action associated with "keeping", though.
 
8:23 PM
And btw. “Most Recently Used (MRU)” is also a cache invalidation strategy that selects which entry to remove; and as bad as it may initially sound, it’s surprisingly useful too (because cache situations are complicated).
Hm, I actually wanted to give building a LRU dict/lookup a try too, but now that I think about it, it makes just zero sense to use a Python dictionary as its base container to store the data…
 
Bleh, is there any good way to create queues and such when using mongodb?
 
The OrderedDict used to use a linked list instead of a native Python list. Not sure why. hg.python.org/cpython/rev/1f5da55ee7d7
Removing it did save cut 9 lines of code too...
 
@AaronHall Instead of having an object with the whole object overhead for each list item, it’s now just a 3-element list. Oddly enough, in Python 3, it uses the linked list again, so I guess the reasons were not that strong…
(essentially a revert because of memory leaks)
 
8:40 PM
the fix never got back into 2.7...
 
well I don't get the divergence.
 
… because you refuse to update to Python 3?
 
A lot of people are on the "It's not broke, so don't fix it" model.
 
It’s more like “We have limited resources, so we focus on the present, instead of the past”
You’re probably free to submit patches for 2.7 if you’re willing to spend your time on it.
 
8:46 PM
Sounds like fun. I'll have to sign the contributor agreement...
 
Python 3 also has a native implementation of OrderedDict, so yeah, it gets all the new nice things.
 
3 also has support past the next 5 years :P
 
Hm?
 
@poke Yeah, isn't that because dict is going to get an implementation based on insertion order?
 
Python 2 support is being suspended in 2020.
 
8:49 PM
so dict's will be ordered dicts anyways...
 
@Ffisegydd Oh, misunderstood the “past” part
@AaronHall I highly doubt that. That would kill the performance.
 
@Aaron are you thinking of the new dicts they've implemented in pypy? If so, then I know they're sorted but not sure what the inherent mechanism is.
I believe it was Raymond Hettinger that developed them.
 
DSM
@poke: not necessarily. Hettinger made a proposal broadly similar to the pypy
@Ffisegydd: I see. Kevin's away, so you're picking up the slack?
 
I don't know if they're going to bring those across to CPython yet.
 
nice if they do, right?
 
8:50 PM
Don't want you to get used to being first to speak or anything :3
 
DSM
De gustibus non est disputandum, I guess.
 
@DSM @Ffisegydd Caught up with that idea now. Interesting, didn’t know about it, thanks :)
@AaronHall I can’t come, I’m still trapped in vim, not knowing how to exit…………
 
No vim meetup for the same reason :D
 
I wonder what they do. Whether they just get tanked and then throw rocks at the vim meetup... I hope that's what they do...
 
9:01 PM
I actually imagine more like a anonymous alcoholics-like thing…
“Hello, my name is Tom, and I’m using Emacs” – “Hi Tom…”
 
Yeah, they actually rarely deliver on the beer. It's best if you expect to not have any.
Then you might be pleasantly surprised.
They host at WeWork, which is supposed to have kegerators everywhere...
 
Well, I won’t go to New York just for an Emacs meeting. Not in hundred years… :P
 
It's kinda an intersection of convenience and interest for me.
 
re-cbg
 
cbg @Bhargav
 
9:16 PM
Oh, @BhargavRao did you have that meetup yet?
 
@Aaron I am thinkin of attending meetups after I get back to India.
Coz here I've become damn busy :(
 
Yeah, good idea, you wouldn't want to make any friends or connections in Canada, it's too cold there anyways. :P
 
Haha. Yeah. Thank god that it is summer now :D
 
I'm being facetious.
 
The problem is that I have two parallel projects. One from the present university and the other from my original university. (One in R and other in Python). So I'm not able to make up time for anythin
 
DSM
9:21 PM
Odd fact about the word facetious: it contains all five vowels in alphabetical order.
 
Even my activity on SO has decreased.
 
DSM
And with that, time to flee. rhubarb!
 
Rbrb DSM
(also aerious) :D
 
bye DSM
 
Last encouragment: Make time. Get out and meet people. It just might change your life.
 
9:23 PM
Does anyone have experience of building binary extensions on Windows? The Python guide to packaging gives up at this point packaging.python.org/en/latest/…
 
@AaronHall I tried my best for that meetup on 26th. Coz that was like very near and one of my fav topics (cloud arch). :(
 
Oh, you did go?
 
tried my best :(
 
I had meeting with my prof from India on Skype so it clashed.
 
9:28 PM
Rhubarb :)
 
Rbrb poke
 
9:56 PM
I don't know why I bother reading articles complaining about SO. The amount of misunderstanding in the article and comments is impossible to respond to.
 
That's awful ;(
Why did I read it
 
10:18 PM
@davidism what're they talking about? Stack overflow seems like a pretty friendly community in general (tags may vary)
 
rhubarb
 
rbrb
 

« first day (1724 days earlier)      last day (3224 days later) »