« first day (2217 days earlier)      last day (2747 days later) » 

1:00 PM
I don't like to brag, but if I time it right, I can get hungover by eating salty popcorn.
 
user559633
Replace your blood with oil and your brain with a computer. Beep boop robot comrade is now impervious to hangovers.
 
user6568562
@khajvah I cure my hangover with a bit of alcohol, then sleep
 
a bit of alcohol feels like it postpones it
 
wikipedia page Hangover uses
as an example of "Clear liquors [that] have a lower concentration of congeners".
 
@RomanLuštrik nice skill:D
 
user6568562
1:02 PM
@khajvah Just a liiittle bit to get the alcohol in your system repumping
 
user6568562
Of course there are incurable hangovers
 
I don't think you guys drink cheap vodkas
the hangover is terrible from cheap ones
 
it's vodkae
 
user6568562
I know the feel :D
 
user6568562
Cheap wine is horrible as well
 
user559633
JS wat of the day: "".split("||")
 
user559633
Guess what that returns
 
I'd rather not
 
@tristan quickly thinking of something that makes absolutely no sense
 
DSM
Trick question? Same as Python?
 
1:06 PM
@tristan ','?
 
user559633
@khajvah why make a 13.5 megapixel display and then invite people to rub their greasy paws on it
 
aka array of 2 elements
 
user559633
It returns an array consisting of an empty string: [""]
 
ah array of one element.
 
DSM
@tristan: erm.. so just like Python?
 
1:06 PM
could have been array of 2 empty strings
@DSM '||' is a regex
in javascript
ah not even :D
 
user559633
@DSM yeah like Python.
 
user559633
It can be a wat in both!
 
DSM
:-)
 
@tristan even more wat
> "".split(/aa/)
[ '' ]
> "".split(/||/)
[]
 
@tristan it's for creative people </sarcasm>
 
user559633
1:07 PM
/me adds 1 point to DSM's tally
 
@tristan are those golden star points, or deathlist score?
 
@AndrasDeak that is antidote score tab...
 
@AnttiHaapala Some of those congeners can be quite nasty, and get metabolised to even nastier chemicals, eg methanol is first metabolised to formaldehyde. However, the liver prefers to metabolise ethanol than methanol, so (if the preferred antidote fomepizole is unavailable) you can treat methanol poisoning by giving the patient ethanol, as mentioned in Wikipedia.
 
@AndrasDeak tristan will give antidote to those people with the highest score.
 
user559633
@AndrasDeak asking for you or DSM?
 
1:09 PM
@PM2Ring toxicologists actually do that to people who drink antifreeze (ethylene-glycol)
@tristan asking for a friend:D
 
user559633
Dr Science Man (DSM) is a national treasure.
 
wrong nation, eh?
 
@AndrasDeak why would people drink antifeez?
 
@khajvah by mistake...
 
@khajvah lower taxes
 
user559633
1:10 PM
@khajvah so they don't get cold, silly!!!
 
drunk/child
 
ok
 
but ethanol is a competitive antagonist of ethylene glycol, so if you drink enough liquor quick enough, you might not die
 
will I die from antifreeze?
 
user559633
I like how PM 2Ring is just casually brilliant.
 
user6568562
1:12 PM
:D True
 
about random topics
 
There was a case here in Oz a couple of years ago where a guy ended up in hospital after drinking ethylene glycol (antifreeze). They gave him heaps of high concentration ethanol to drink, to stop his liver attacking the ethylene glycol. But after a day or so they ran out of surgical spirit, so they sent out for OP vodka. The patient survived.
 
Finland <3 new gold shops were opened; 0.05 ct diamonds for free for first 100 visitors... no one interested, they rather get a free plastic bucket :D
 
Ah, I see Andras has already mentioned ethylene glycol. :)
 
user6568562
> To alcohol ! The cause and solution to all problems
 
user559633
1:14 PM
@AnttiHaapala link for that? i want to share it with others
 
@PM2Ring Why didn't they give vodka from the beginning?
 
user559633
They didn't have any limes
 
@khajvah painfully
 
@davidism Thanks for sharing. This made for a nice commute home.
 
@khajvah Because pharmaceutical grade ethanol (aka surgical spirit) is almost pure, with (virtually) no nasty congeners. And when you don't have to pay tax on it it's heaps cheaper than vodka.
 
1:16 PM
@tristan ok mistaken :P the title was written incorrectly
 
It was raining yesterday, so appropriate atmosphere for some nice piano instrumental.
 
rhubarb for now
 
what it meant is that less people lined up to get a free diamond than how many lined up a week before to get a free plastic bucket
 
user559633
@AnttiHaapala I'm still leaving my star. the scenario of "no, just the bucket" and walking away smiling makes me really happy
 
this for the gold shop
 
user6568562
1:17 PM
Laters @Andras
 
On a molecular level, plastic is much more complex than diamond. Of course you'd prefer the former.
 
You really can't get much less interesting than a regular latticework of ordinary carbon atoms.
Where's the drama? Where's the pizazz?
 
this is a continuous joke in Finland that people will wait for 3 hours in front of a new shop in -20 C to get an empty plastic bucket worth 1.5 € for free.
 
Maybe some of them would do it for nothing, just to enjoy the nice -20C weather.
 
1:19 PM
yeah :D
 
And the opportunity to queue up with their neighbors and politely ignore them
 
user6568562
@Kevin I would die for that mindset
 
Hey @AndrasDeak I just wrote an answer with some Numpy stuff. Could you check it to make sure I didn't say or do something dumb? :) stackoverflow.com/questions/40524998/…
 
user559633
Just think of all the stuff that could go into the bucket in Finland. Snow, cold water, smaller buckets?!
 
What function do I call to position a Tkinter window?
 
1:23 PM
geometry, I believe.
 
Yep, that's it.
 
@Kevin are you sure you're not a Finn
 
Hmm, some distant ancestry isn't out of the question.
 
user6568562
@Jovito I came across this question, some time ago.
 
The Kevinson family history is shrouded in mystery if you go more than three generations back.
 
1:25 PM
@randomhopeful I got it, thanks.
 
All I know about my great-grandfather is that everyone called him The Duke. I give 1/20 odds of him being an actual duke.
 
@Jovito If you're wondering why the arg to geometry is that weird string, that's an artifact of XWindows.
 
I thought it was because of Tcl.
 
I don't know if he was wondering, but I was.
 
@Jovito Well, Tcl started life on X Windows systems.
 
1:28 PM
Tcl: strings everywhere.
That's one of the things I hate in Tcl and, by extension, in Tkinter.
 
You should try writing an X Windows GUI in C. Using strings is damn handy compared to the alternative: a plethora of C structs to store parameters in. Doing GUIs in a language without OOP support tends to be rather tedious.
 
Its kinda weird though that Tkinter API returns strings in places where there was no reason for it do so.
 
DSM
Out-of-context tristan phrase of the day: "a great place to go if you're single and not icelandic".
 
user559633
haha, when did i say that?
 
DSM
During one of our occasional "all-about-Iceland" conversations, here.
 
user559633
1:39 PM
ah. amused that i didn't question "if" i wrote that, but "when." partially because i read your message out of order and thought "what, iceland?"
 
Before reading, I wager the context is "Iceland is a great place to go if you're single and not icelandic, because the gov't pays a stipend to foreigners that emigrate there and get married" (which isn't actually true but widely believed)
 
user559633
I'm paid by the Iceland Board of Giants That Feast On Smaller Humans, full disclosure.
 
user6568562
There's a very interesting-entertaining-informative-saddening chapter about Iceland in Michael Lewis's Boomerang
 
Giants feast on small humans, humans use the lifeblood of sleeping giants to power their hotsprings. (what, did you think it was geothermal vents?)
It's the ciiiiiircle of liiiiiife
 
user559633
One of my favorite stories from going to Iceland is when I was with a group of friends at a bar and this human giant just grabbed me and picked me up about a meter and a half off the ground while shouting "i love you"
 
user6568562
1:44 PM
Haha :D !
 
DSM
As startling as that would be, i guess I do prefer my giants to be good-natured.
 
@AndrasDeak ok, police investigation says that the guy who died after release from hospital some weeks ago indeed did die directly because of the cranial injury caused by the Neo Nazi guy.
 
user6568562
I remember watching or reading a piece about Icelandic body-builders. No, Iceland won't pay you to marry an Icelander indeed
 
Iceland has hired body-builders to shotput you back to your home country if you immigrate for selfish reasons.
 
DSM
I haven't been following Iceland very closely. (#understatement) Did they recover from the economic problems of a few years back?
 
1:46 PM
They did not hire additional body-builders to catch you when you arrive in said home country, so... Bring a parachute.
 
user559633
@DSM Yep. They got through their banking crisis -- having a strong tourism economy and lots of geothermal energy helped.
 
If I were single, I could marry an Icelandic girl for free.
 
user559633
Wait, would you otherwise expect to pay to marry someone?
 
Like, hypothetically? Or do you have one in mind?
 
that's why I think first and foremost that story is a hoax ^
 
DSM
1:47 PM
Good for them! (retire to Iceland by buying a small town mutter mutter)
 
@tristan hem? meaning that government of Iceland wouldn't necessarily have to pay me
 
user6568562
@DSM Yes, they did ! Even though their situation was more chaotic than that of Greece
 
Antti turns from his monitor and looks out the window. His Icelandic girl stalker is lurking in the tree, as usual. She waves enthusiastically. Antti turns back to his monitor.
 
@Kevin don't tell my wife
 
user6568562
@DSM This article is well informing
 
DSM
1:50 PM
I would think your wife should be the first to be informed if you find an Icelandic tree-stalker.
 
that's my coffee break fun, open the window blinds, lol, then shut them again.
 
I like to think they'd get along. Already they have something to talk about.
 
DSM
True. They can exchange admirations and complaints about their husband/victim.
 
Wife: Antti is so grumpy in the morning lately.
Stalker: I think it's his new toothbrush. I've compared it to his old ones and the bristles are too hard. Here, I've selected five softer ones that he might like, please give them to him with my regards.
 
:D:D:D
:D:D:D:D:D
@Kevin my stalker is a gymnast...
she can dive my used toothbrush from a Molok waste container.
 
user559633
1:59 PM
Is a Molok that monster trashcan creature from Dr Who?
 
dalek?
 
user6568562
Also famous for that Sing it back song
 
Moloch is an ancient Canaanite god associated with child sacrifice. MOLOCH'S UNBLINKING EYE SEES WHEN YOU DO NOT RECYCLE.
 
Cabbage, all
 
user6568562
Hey holdenweb [ :
 
2:04 PM
lol :D
they're now censoring Trump's campaign pages :d
 
user6568562
> ‘The crops are failing, we’re starving, God must be mad at us, let’s kill Steve.’
 
DSM
I never liked him anyway.
 
-39
A: 2016 Stack Overflow Moderator Election Q&A - Questionnaire

Sergey K. A 10k+ user regularly has their comments flagged as "rude or offensive" or "not constructive", to the tune of 4-5 flags a day. No comment by itself is particularly offensive, but their general tone causes them to be flagged by multiple users. You've contacted them privately about this, but ...

:D:D:D
that doesn't go too well for Sergey...
 
I noticed in the transcripts that people were talking about thoroughly cleaning data off hard drives, and someone mentioned that Macs have a special tool for that. I guess they were referring to the standard *nix shred command.
As already noted, it's much harder to recover wiped data from modern magnetic HDs, so a single randomising pass followed by a zeroing pass should be more than adequate. Or if you're in a hurry, don't even bother with the randomising pass, and just dd it with /dev/zero
 
If my life becomes exciting enough that I need to wipe my hard drive, I think I'd prefer an approach with a little more flair. Something with laser beams or a ray of some kind.
 
2:12 PM
Eg, dd bs=64K if=/dev/zero of=/dev/sdb
 
user6568562
That's a quote from Iddie Izzard's Force Majeure show, by the way. Unrelated to our Steve !
 
How do hard drives react to mircowaves?
 
@PM2Ring a single randomizing pass is better than zeroing pass!
 
I'm not going to use thermite because it's really hard to get out of carpet.
 
user559633
@AnttiHaapala who is "they" in this sentence? and lol
 
2:13 PM
@AnttiHaapala Sure. But zeroing makes it a little less obvious that you were trying to hide something.
 
ah yeah that
 
user559633
random data? nah, that's is a dubstep song
 
user6568562
@PM2Ring That was me ! I had a Macbook pro, sometimes ago. From the Snow Leopard era, when I formatted it, I remember giving me the option of erasing n time over
 
\o cbg hope u guys had a wonderful start to your day
 
FWIW, I used to help out at a computer recycling place. They got old computers for free from various businesses and local government offices. They had to produce a certificate for each one that showed the HD had been wiped. We used a program (whose name I can't recall) that did a 3 pass DoD 5220.22-M data wipe.
 
user6568562
2:20 PM
> 7-Pass Erase" option

Writes data over the free disk space seven times. This provides a highly secure erasure of disk data. A 7-Pass Erase takes seven times longer than a Zero Out Data erase.
 
user6568562
@PM2Ring Eyy, that's the correct term. Pass erase. I found that excerpt in this article
 
7-Pass Erase is my trademark secret finishing move, I'll see you in court Apple
I'll 7-Pass Erase your quarterly profits with my unbeatable grievance filing style
 
user6568562
@MooingRawr Hey buddy [ : How's it going ?
 
I got a wiener bun for breakfast and a cup of tea. so it's off to a good start for me xD what about you >?
 
user6568562
Everything's nice and cool, thank you [ :
 
2:35 PM
so, I was wondering how one should use a function f, which takes an argument x, and returns a boolean value, in a situation, where one wants to use f in a SQLAlchemy query as a filter, where x should be one of the columns of the given table?
I have a hunch, that it should be done via Generic Functions
 
The lazy solution is to fetch the whole table and execute f yourself on every row, but obviously that's not a great approach memorywise
 
not really
 
On second thought, I guess it depends on whether your database-interfacing library returns a regular list of data, or some nice iterable
 
@BhargavRao just saw you were up for nomination as a mod.
 
Still not a great approach to run updates on a DB client if you could don it all on the server
 
2:39 PM
Agreed
 
@PeterVaro hmm...
 
I need to put a comment and ask you some questions about your nomination
 
@PeterVaro what do you really mean?
 
s*** I didn't expect SO to become such a strong part of my life
 
@PeterVaro if it is an expression on x then just return the result on x.
 
2:41 PM
@AnttiHaapala well, the thing is, it is more complex than that, in the real life example, it takes two arguemnts, based on two different columns of the same table, and it f does a calculation on both, and then returns a value, which should be compared to a constant, and this expression should be the filter itself
 
and?
it would work.
 
Simply write an elaborate parser that analyzes the AST of f and reconstructs it into a sql query
 
@Kevin LOL
 
def my_func(a, b):
      return (a + b) / 2
.filter(my_func(Table.foo, Table.bar) >= 42).
 
That's actually something that Data Model does in C#. It's... Not comprehensive, but better than nothing
 
2:43 PM
@Kevin Jinq does that too
 
Neat.
 
@AnttiHaapala I've tried exactly that -- but that would only work, on a specific record not on the table itself..
 
table?
aggregate
 
like: .filter(f(user.foo, user.bar) >= 42))
not on: .filter(f(User.foo, User.bar) >= 42))
if you know what I mean..
 
no, I don't know what you mean because it would work for the latter.
 
2:45 PM
I swear I already tried it, let me try again ;)
 
naturally it depends on the contents of your function
 
basic math, with sin, cos, acos
 
...sin, cos acos naturally aren't basic math
 
and ... if these are coordinates, you should be using postgres and its postgis extensions
 
2:47 PM
indeed they are -- can you elaborate on those extensions?
 
you can use polygon datatypes, use "is this point contained within this polygon", map projections, distance queries, and whatnot
 
@AnttiHaapala in my situation, TypeError: a float is required is raised
 
naturally
math.cos doesn't know anything about such
 
exactly -- hence my problem :)
 
you could make a function that does not (isinstance(a, Number) and isinstance(b, Number))
 
2:49 PM
ahh, that is also a great a idea
 
if so, then sin = func.sin, cos = func.cos, acos = func.acos, otherwise math.*
 
func.sin ?
 
sqlalchemy.sql.func
also known as "func"
that way you can use the same function for constants and columns
 
that's exactly what I linked above
(which was my original hunch)
 
With PostgreSQL, of course, you can define functions inside the database instance in Python
 
Time goes by fast.
 
@Jovito I was in the room for the first time in summerish 2013...
 
@Jovito did you ever find what was up bros?
 
Never did.
It's kinda sad actually.
 
2:55 PM
New startup idea. Analyzing music to filter out all police siren and honking noises in real time
Need tristan to help me with a name
cbg o/
 
@idjaw What you've been listening to? Merzbow?
 
\o idjaw how goes it
 
@Jovito some chill/lounge/remix channel
was on the highway and heard police siren and thought "ah crap, what did I do now"
but it was the song
 
That picture used to be my wallpaper for the longest time
does anyone know the source of that picture?
I can't figure out if that is New York or Chicago. I think it is one of those?
 
2:59 PM
seems that @PeterVaro was the first person to cabbage me in the Python room.
 
@AnttiHaapala how did u find out ?
 
search
 
@Jovito I can tell you what was up: I had broken my elbow and was still on sick leave enjoying Panacods
 
oh interesting, idjaw was the one who welcomed me...... as a fellow canadian lol that stalker ... knew who I was before I said anything
 
3:02 PM
@AnttiHaapala What had happened?
 
user6568562
Sometimes to take a major step forward. You need to completely change direction. - Apple Marketing Department
 
PyCon Finland 2013 in late October in Helsinki, I was drinking beer after conference dinner, then the pub closed, I ran to a tram, managed to trip on slightly slippery stones.
If it weren't for this damn programming language I wouldn't have broken my elbow!!!
fortunately even though it was a fracture, it recovered fully, less the scar.
and it is now metal-reinforced
 
Damn, so it was pretty serious.
 
my left elbow now has this kind of setup:
 
@AnttiHaapala was I?
 
3:08 PM
 
I must have been a really long time ago :)
 
2013
(that's not my elbow in the pic) :D
 
hmm.. I think I was RO back then, and I was very active here :)
 
the fun part is that it doesn't set off the metal detectors at all...
 
anyway, I can still remember, when @Kevin and I have almost the same amount of reps :)
 
3:10 PM
Ah yes. I can remember it like it was three years ago.
 
lol
back then I had even less
 
and well.. @JonClements was only a yellow puppy, not a ninja-master :)
 
wow I didn't mention my elbow in 2013 :P
 
recbg
 
3:13 PM
I did mention it later though
May 18 '15 at 9:07, by Antti Haapala
2014 I was just plain drunk, 2013 I broke my elbow and got 1 month sick leave.
 
@AnttiHaapala that's something...
 
cabbage
 
Yeah, I had a plate and six screws in my left tibia due to an accident in my 30s.
 
@Andras Thanks for that meta answer :)
 
no worries:)
 
3:15 PM
@AndyK Yep. :)
 
@holdenweb how are the detectors
or you still have? or they removed?
 
When it came time for a knee replacement, first they had to operate to take the metalwork out and let the bone heal for six months to provide a stable basis for the prosthesis
 
ah :D
 
Did that end your adventurer profession?
 
sounds like it must have sucked
 
3:16 PM
The plate used to go through detectors just fine. The prosthesis sets them off every time
The three-month recovery period form the original injury wasn't a whole lot of fun
 
user6568562
@holdenweb Did you use to feel them in your tibia when you moved ?
 
I just told this guy "I don't know kivy, so I can't offer much advice". So what does he do? Asks for help on another Kivy question!
 
Nope
 
@PM2Ring I didn't even know apply_along_axis existed, but it all seems very reasonable, good job:)
 
3:18 PM
@PM2Ring You should have told the opposite :D
 
@holdenweb Wow... I somehow misread that as "due to an accident in the 30s"... :p
 
@AndrasDeak Thanks!
 
that tension band is a damn clever thing... perhaps in the future they will reinforce people by installing those preventively :P
 
user6568562
@holdenweb You know you can call yourself Iron Man and it wouldn't be pretentious :D
 
user559633
IronPython Man
 
3:22 PM
afternooncbg
 
Running python config content in loop effectively asks, "how can I get all the global-level variables defined in a module?" and the answers say "use dir or __dict__, filtering out double-underscore names". But this seems brittle to me. Is there any guarantee that all "behind-the-scenes" attributes will follow the double-underscore naming standard?
I'm tempted to write an answer that uses the ast module to pull out all the names that are on the LHS of an assignment.
 
@Withnail cbg
 
If you filter out dunder names then you won't get __all__, but I guess that's ok. You can ask for it explicitly if you really want it.
 
@Kevin "defined in a module" vs "imported into it"?
 
@PM2Ring I wanted to define a custom set type that overloads __eq__ such that two sets are equal if they have a non-empty intersection, then use numpy.unique on an array of these sets:D Unfortunately, the non-equivalence-relation property (non-transitivity, to be specific) of this pseudo-equality implies that the result will not be unique:/
 
3:28 PM
...basically, you can't.
 
Do we close this as dupe or typo? stackoverflow.com/q/40531038/4099593
 
In [282]: np.unique(np.array([UniSet(k) for k in all_tups]))
Out[282]:
array([UniSet({1, 2}), UniSet({3, 4}), UniSet({3, 5}), UniSet({3, 4}),
       UniSet({8, 6}), UniSet({6, 7}), UniSet({9, 7})], dtype=object)

In [285]: UniSet({1, 2})==UniSet({1, 3})
Out[285]: True

In [286]: UniSet({1, 2})==UniSet({2, 3})
Out[286]: True

In [287]: UniSet({1, 2})==UniSet({4, 3})
Out[287]: False
 
@AnttiHaapala probably I'm dumb as fudge, but it doesn't matter how hard I try. func just isn't working for me: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such function: ... .. umm.. so how exactly one should use this func generator?
 
Yeah, in the general case I think this is a hard problem. I think OP has a pretty constrained format - his config.py file appears to contain nothing but dict assignments - so in his particular case he could probably get useful data
 
waaaait a minute, that didn't filter the sets at all!
what else can np.unique use under the hood if not __eq__?
maybe __ne__?
WOW it's working:D
this is hilarious
I'm pretty sure it's not robust, and probably slower as well
 
3:32 PM
"Hmm, why does ast.parse("config.py") return just one expression, when the file has multiple lines?" Only took me ten minutes to figure out it's parsing the string "config.py", not the file config.py -_-
 
In [301]: np.unique(np.array([UniSet(k) for k in all_tups]))
Out[301]: array([UniSet({1, 2}), UniSet({3, 4}), UniSet({8, 6})], dtype=object)
but {7,9} is missing...
so much for robustness
 
@AndrasDeak :) And I don't think it'd be very fast, since it's calling a Python __eq__ method.
 
yeah, I know...but it's loopless!:D
I only did it for the heck of it
 
anyone here comfortable with autospec in mock patch to review an answer I gave? I'm trying to make sure I'm not misleading the OP with the information I provided. I find autospec can sometimes lead to some confusion, so I'm hoping I made my point.
 
hmm, snow and rain predicted for the weekend, wonder if it'll deliver
 
3:41 PM
hmmm
 
@AndrasDeak bold move, let's see how this works out.
 
@PeterVaro you can use func only for named functions that exist in the db
 
..aaand?
 
.... and this function that you just named, apparently doesn't exist.
 
:)
how should I add a function to the db, without the textual 'CREATE OR REPLACE' ?
 
@AndrasDeak I assume that's because you're testing each tuple against all the other tuples, but you should only be testing each new tuple against the elements that belong to tuples that haven't been rejected.
Eg, with all_tups = [(1, 2), (1, 3), (1, 4), (3, 4)] the output should be [(1, 2), (3, 4)]
 

« first day (2217 days earlier)      last day (2747 days later) »