« first day (2007 days earlier)      last day (2958 days later) » 

7:02 PM
Easy to mistake to make - we're both awesome (⌐■_■)
 
That
is the most accurate observation I've ever heard.
 
(╯°□°)╯︵ ■‾■⌐
 
ugh...one of those weeks where bug hunting is >> than new feature design and development :(
 
⌐■_■ ノ( ゜-゜ノ)
 
DSM
@davidism: I'm looking at a plushy Korosensei. The temptation is very hard to resist.
 
7:12 PM
Good purchase. If anyone questions you about it and you want to hide your power level, tell them he's a factory defect octocat.
 
Canonical request - Which is the better one? 1 2
 
Just reading the Qs and not the As, I think I like 2 better.
 
@DSM do it
practice assassinations with it
 
DSM
My heart says yes, my accountant says no.
 
@Kevin I liked 2 also, but 1 had more views, Hence I was confused.
 
7:16 PM
First, because 1 uses range which doesn't have a consistent type between versions. Second, because 2's example shows what happens when l2 contains an element that l1 doesn't contain
... Whereas in 1, [2,3,7] is a subset of range(10)
 
Ah fine, understood. Thanks. I will close 1 as dupe of 2.
Isn't this just a "no longer repro-able" question? stackoverflow.com/q/6828722/4099593
 
Aaargh. Neither question's top-voted answer mentions sets, and many of the answers that do mention sets get it wrong.
 
@BhargavRao Yeah, it's your typical "overshadowing builtins" gotcha.
 
29
Q: “One frame to rule them all.” How to handle [data.frame]/[dataframes] mistagging

Procrastinatus MaximusRecently, David Arenburg posted a feature-request to warn r users from adding the dataframes tag and instead encourage them to use the data.frame tag. This issue was brought up about a year ago as well, with a request to retag all mistagged questions. In a community effort more than a week ago we...

 
Yep, No confusion from now on
 
7:27 PM
wow. I've got score 7 in Hlep and improvement
 
You're more persistent than I am, I've never been able to complete even one.
 
Library design question. I've got a project that can be used to generate randomised scientific data, generally returning an object which has an x, y, and e variable which are actually numpy arrays (so numpy is a direct requirement).
So originally I had the idea of adding matplotlib as a requirement as well and providing a plot method which obviously plots the data.
 
I think I've just edited 7 of them instead of flagging them right away as VLQ, and only CV them afterwards
@Ffisegydd just no :d
 
Does this seem like a sensible choice? Or should I aim more at Linux style (do one thing and do it well) - then people can install mpl if they want to and plot whatever they want.
 
@AndrasDeak en.wikipedia.org/wiki/… Apparently Pl used to be the symbol for Palladium.
 
7:30 PM
@Ffisegydd that's what I'd want the lib do yes
@Ffisegydd or then have an optional module that installs matplotlib
or even better have a separate package fizzygod.matplotlib
 
e.g. import yourlib.ext.plot ?
 
you're using Python 3 so you can use implicit namespace pkgs
 
user559633
going to test something, apologies if i change the room rules (i'll change it back if this happens on accident)
 
@tristan use knives room
 
user559633
going to create my own... yep!
 
DSM
7:35 PM
Making matplotlib a mandatory dependency is probably not a good idea. But having native support for plot if it's available is handy too.
 
Yeah I wasn't sure of the best way to do that as a design pattern.
 
@WayneWerner ah, thank you, then what you said finally makes sense:)
the "old" bit in your message confounded me beyond words
 
Can you specify optional requirements.txt?
 
@Ffisegydd if you do add matplotlib, you can just rely on matplotlib.pylab ;)
 
@AndrasDeak wash your mouth out with soap!
 
7:38 PM
Yes, you can add features, it's in the packaging guide somewhere.
 
pylab is an abomination.
 
@Ffisegydd I'm glad to hear that, I never use it
 
For some reason it's not in the packaging.python.org guide.
 
Personally I wouldn't make matplotlib a mandatory dependency.
 
7:41 PM
No I'm definitely removing it as a mandatory.
 
How does pandas handle it? I'd copy that. You can do df.plot() and it all just works.
 
pandas is what I was thinking of.
To the pandasmobile!
 
user559633
probably try/except as a flag of whether or not an import exception happened
 
I'd put the entire feature in a separate package, then add a feature requirement to the main package.
 
(unless you're a fussy b*gger like me and you end up using matplotlib directly anyway to tweak it)
 
user559633
7:42 PM
bugger is a naughty word?
 
And use entry points to discover what features are available.
 
DSM
Yeah, I tend to do things manually myself. Easier to configure.
 
@tristan When you don't really want people (students) searching swear words and your name together on the public web
 
This is getting way too complicated now, but I like the idea that we're making Fizzy more confused.
 
user559633
@JRichardSnape I didn't know bugger was a curse. Oops
 
7:43 PM
@tristan It's like we're two halves of the same whole, that's what I've already written just now.
 
DSM
..
 
user559633
@Ffisegydd Are you saying I complete you?
 
Sure.
 
only in the biblical sense
 
user559633
You too buddy
 
7:47 PM
@davidism I've always been confused by packaging and how imports etc work. I don't use it in anger often enough.
I re-read Qs on it and say "Oh I know that!" then forgot after a week or two until next time.
 
guys :| so much javascript fatigue
 
@corvid agreed
I started going through the Elm tutorial, it feels really nice to use.
 
why do people keep making frameworks every month. Why not just have one or two good ones and improve on them?
 
Isn't ELM like that super functional style language?
 
7:57 PM
Rhubarb all
 
user559633
@corvid why are there more than two types of ice cream?
 
well, it would still be annoying if a new flavor of ice cream came out every month, and you had to replace all the ice cream in you already have with that new flavor
 
user559633
who is putting a gun to your head?
 
user559633
oh, javascript. never mind. being able to be hired in 5 years is that gun.
 
What languages do people favor now? JavaScript still seems fine. Also, coffeescript is even worse
 
user559633
8:01 PM
You're asking in the popular Python room which languages people like?
 
user559633
PHP7 is worth a look
 
@corvid you make a framework -> present it -> gather audience -> sell it to a start up -> $$$
 
why aren't we programming space shuttles in PHP
 
@JRichardSnape: +1. Provided it is not Hack. That'd be too sane.
 
8:02 PM
Money laundering of software development :)
 
"drawing answers from credible sources":
Gotta trust Adler on this :D — Antti Haapala 11 mins ago
 
user559633
Why are startups not generally written in assembly?
 
user559633
Why did I get fired on day two of my new job as a carpenter for trying to use a floor sander as a screwdriver?
 
Hopefully in 10 years there will be no need for programmers
 
DSM
Without naming names, there are times when very, very, very credible sources have made mistakes in their SO answers.. But I grant you they usually deserve a bit of deference. :-)
 
user559633
8:05 PM
Yes, in 10 years the birds will simply anger themselves.
3
 
@tristan no, but programmers can be removed from game development
 
user559633
totally sure
 
user559633
flying cars by 2020 etc
 
Heh
 
people on Mars by 2025 ;)
 
8:09 PM
Will the flying cars be self-driving?
 
I think taking into account angry birds is still a challenge for such navigation systems
 
Will the angry birds expansions be automated by then?
 
Sure
 
Lol so funny
This post is packed with so much history and information that I feel like some citations need be added incase people try to reference this post as an information source. Though if this information is reflected somewhere with citations like Wikipedia, a link to such similar cited work would be appreciated. — ThorSummoner Oct 16 '15 at 16:29
I am the reference, having been part of all of that. This post could be cited in Wikipedia as an original source. — Mark Adler Oct 16 '15 at 16:38
 
Programming in other languages makes me miss Python. :/ I'm trying to get the last 4 elements of a list in C#, which is apparently absurdly complicated. I just wanna do while my_list[-4:] != [1, 2, 3, 4]:.
coll.Reverse().Take(N).Reverse() Really, C#?
 
8:18 PM
isn't there any slicing?
using some kind of length(coll)?
 
@Morgan'Venti'Thrappuccino GetRange and some length math would look more obvious.
 
@AndrasDeak Not that I can find.
 
unless it's fully functional programming, there should be:P
 
Oh, I hadn't seen GetRange, that could work.
 
@Morgan'Venti'Thrappuccino a lang with a collection without an easy way to get a range should be trashed immediately :)
 
8:22 PM
The real question is, what happens when I call rec.GetRange(Math.Max(0, rec.Count - 4), 4) with a rec.Count of <4. Well, time to find out. :D
 
sounds like an exception :)
 
Grrrr.
Yeah, I miss Python.
 
While using Python, I don't miss many parts of standard library :)
 
(rec.GetRange(Math.Max(0, rec.Count - 4), rec.Count >= 4 ? 4 : rec.Count) sigh.
 
8:44 PM
@idjaw oh wow
if it's true, it's very sad
 
"Mr Marsala confirmed that the code had even deleted all of the backups that he had taken in case of catastrophe. Because the drives that were backing up the computers were mounted to it, the computer managed to wipe all of those, too."
That's perhaps the "worst" part
 
that's a very good reason to explicitly write ./ in front of everything
 
I thought rm didn't traverse mounts by default by the way ... it would appear not ...
 
Comments at the bottom suggest it is a hoax.
 
Also, this is why you use set -u always, so that shells give errors on undefined variables
@Ffisegydd hmm, rm -r /* doesn't give the error, only rm -r / ... But that's not exactly what he claimed to have happened ...
 
8:50 PM
Wasn't there a serverfault page on this? Some coworkers shared this story with me.
 
it's linked in the article
 
DSM
The other year an error in a friend's makefile nearly blew away a bunch of my files, including the backup drive. The only reason it didn't was because his name came alphabetically before mine and I had read access to all those files but not delete access.
 
it must feel bad to imagine that your nicely crafted RAID is being demolished in unison
 
DSM
Moral: don't keep your backups accessible except during the backup process itself.
 
in the above story that seems to be the exact case
 
8:57 PM
I lost access to a lot of my files a while ago, I accidentally deleted some files, including my password manager database. I have backups at tarsnap, which as AES encrypted, but the randomly generated passphrase to the key to access them was in the password manager database :-/
 
at least that's how I understood the "(it's a maintenance script)" comment
 
Resulting in a catch-22
 
good old password-on-paper is what works
put it under the keyboard, nobody will find it
 
I lost all the music I wrote over the last few years for example :-/ Shucks :-/
 
(having a laptop has been devastating for my security protocols)
@Carpetsmoker :(
 
8:59 PM
I've since simply stopped using tarsnap and strong encryption, simply put, most of the data in my backups simply isn't very interesting...
 
But how simple is it really?
 
DSM
I want to ask if it's web scale but I've never quite understood that meme so I don't know when to play that card.
 
I've temporarily encrypted my home directory before leaving my laptop at a repair service. The IO overhead was awful, and I can't shake the feeling that even after having reversed it, the system seems to do more IOWAIT than usual
which is almost relevant to the discussion:)
 
@Carpetsmoker I'm simply commenting on the simple fact that you simply used the word simply many times in your previous message. Simple. :-)
 
9:08 PM
@davidism huh, I simply didn't even notice that. Simply put, I did use simple quite a lot in that one simple sentence...
 
These sentences about simple are becoming complex.
 
DSM
Better than being complicated.
 
As long as it's explicit.
 
this has to be a troll

https://www.npmjs.com/package/@radioactivehamster/has-private-filename
 
> Determine if a filename is &quot;private&quot; e.g. prefixed with a &quot;_&quot; (underscore.)
 
9:14 PM
and the code is, simply put, very complex.

https://github.com/radioactivehamster/has-private-filename/blob/master/index.js
 
Ah, another &quot;web developer&quot;.
 
sounds familiar for some reason...
 
At least it has unit tests
Consider all the things that could go wrong!
 
@idjaw planning to be the next leftpad
@idjaw even the code is not impressed: ('_')
3
 
haha. "why did you do this to me"
 
9:17 PM
I think we should submit a bug report.
OK, I take it back. Look at the dude's github avatar: he's clearly 6 years old.
 
9:53 PM
When lifetime of an object in Python is tied to some non-Python resource, is it better to have something alike file's close to free that resource or custom del is fine?
 
Hi guys, I am trying to make graphs in python and my data sets could be like reading 1500files. My boss said that the graphing library he used was really slow when viewing these graphs, especially when zooming in and out. So which library is best at giving the user a smooth interactive environment?
 
DSM
@Kentzo: __del__ isn't even guaranteed to be called. Best bet is to have an explicit free() function, possibly wrapping it in a context manager just like open.
 
@DSM It's simpler with functions, but object can outlive its with scope. Can you think of any example of such objects from standard library?
 
DSM
I'm not sure what you mean about outliving its scope. If someone tries to work with a closed file, they don't get to ask "I want to use this object outside its with block, how do I do that?" The file is closed. If you don't want it to be closed, either call the code you want inside the block, or handle the closing manually (where "manually" includes delegating it to some custom function which automatically closes registered objects.)
 
10:15 PM
I'd like to somehow ensure that object will become invalid after used with with. I guess some internal state will do it.
 
DSM
Yeah, just like files. If it's a real worry, I might even wrap the resource in an object which only delegates a method call if the resource is active.
 
Wrap the resource in a context manager class with an @property accessor function; check some internal ._closed flag before returning it
or something like that
there are a few different nice ways to do it
depends on how you want to use
 
DSM
I've had fun using ExitStack. Was very happy they introduced it.
 
@tzaman I have a number of methods associated with this resource. Other than that it's just a handle a number of C functions that accept that handle. Almost like with files
Probably instead of ._closed I can just set an invalid value to a variable that represents resource (like -1 with files)
 
DSM
Why would you downgrade to using a magic number instead of a nice named attribute?
 
10:24 PM
sure, it will be hidden behind a fancy constant :)
 
DSM
10:38 PM
I really haven't figured out the style for Docs yet. :-|
 
cbg all
Ha ha o wow.
 
10:55 PM
I don't think rm &emdash;rf will hose your servers
but it might?
 
you know what's the most exciting thing ever? Troubleshooting vlan configurations across three different systems.
 
Nice. Sounds exciting. Almost as exciting as Tom Sawyer's fence painting ;)
 
almost
 
DSM
Tradition suggests you try to get someone else to do the troubleshooting..
 
the intern is already busy with something else
:P
 
DSM
10:58 PM
I miss my interns. :-( I could foist off all sorts of nonsense on them.
 
I do have to say though. Our intern is great.
:D catching that pesky bug always feels so good. :D
 
DSM
11:29 PM
Usually the pesky bug is my own fault, so I have mixed feelings about finding it.
 
DSM
11:44 PM
> So far, I've been leftpadding in Julia by saving the text to a file, calling a Javascript program which uses npm's leftpad package, then reading the new file and deleting both of them.
Umm.
 
err
Antti? Isn't it a bit late for you to be online? :P
 
DSM
11:57 PM
He clearly sleep-logs-in.
 

« first day (2007 days earlier)      last day (2958 days later) »