« first day (1681 days earlier)      last day (3268 days later) » 
00:00 - 12:0012:00 - 00:00

12:21 PM
cabbage
@vaultah Thats evil... but I think I like it. :)
@thefourtheye: Maybe you and Vivek Sable should've waited for the OP to post a code attempt on stackoverflow.com/q/30423104/4014959 ...
I managed to infiltrate some more Python onto SE.mathematics... and score 5 upvotes. :) math.stackexchange.com/a/1295561/207316
 
user559633
Radio 1 Big Weekend (ostensibly a 2 day festival of alt-pop music)
 
12:38 PM
do I remember correctly that a[:] is the standard way to clone an array?
 
or a.copy()
 
thanks
Why are python standard functions evenly distributed between the global scope and their respective classes?
 
use deepcopy.deepcopy if you need to make deep copy of your array
 
user559633
@JanDvorak what do you mean?
 
user559633
some stdlib methods wouldn't make sense as top level methods.
 
12:40 PM
len("hello") vs "hello".upper()
 
Well len can be used on any sequence, whilst upper is for strings only.
Otherwise you'd need list.len, array.len, tuple.len, etc.
 
from the user standpoint that isn't an issue
 
user559633
Oh. That's presumably because len() can be overloaded for a number of generic options, vs upper() where it's specific to strings (what's uppercase of 1?)
 
user559633
[the answer is 1, because of encoding and the way python implements upper(), but that's not my point]
 
how about chr/ord?
 
12:43 PM
Now that is a better example :P
 
In [5]: ord('abc')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-6930e82a821d> in <module>()
----> 1 ord('abc')

TypeError: ord() expected a character, but string of length 3 found
Makes sense to have it as a standalone function
 
user559633
I'd offer that chr() is more 'low level' and expected to exist for other basic methods to build off of
 
That seems kinda artificial
 
user559633
u r
 
That probably is the cause though, thanks
 
12:46 PM
@JanDvorak You can also use a[:] on the RHS. So a[:] = some_list updates list a with the values from some_list. In contrast, a = b binds the name a to the object that's bound to b.
 
I guess [:]= also converts between different sequence types?
 
user559633
@JanDvorak Yeah, no problem. To me, it feels the builtins are a mix of the functions first available to cpython and things someone coming from C would expect to be global
 
user559633
>>> hi = [1,2,3]
>>> old_hi = hi
>>> new_hi = hi[:]
>>> id(hi), id(old_hi), id(new_hi)
(4563108064, 4563108064, 4563095352)
>>> old_hi = 'not anymore!'
>>> id(hi), id(old_hi)
(4563108064, 4562291096)
>>>
 
> CPython implementation detail: This is the address of the object in memory.
 
user559633
Yep.
 
12:52 PM
Isn't this a security hole?
 
user559633
Why would it be?
 
no
 
@JanDvorak Yep. Although it's not really conversion. It's a slice assignment which mutates the existing list object, copying values as appropriate into the slots of list a, and allocating new slots, if needed.
 
If you ever send an id to someone, if they decide to mount a buffer overflow style attack on you, they know where to sniff.
 
user559633
@JanDvorak good luck with that
 
12:54 PM
agreed
 
user559633
if you did that in any other language, same thing, unless that language implements some hilarious shell-game for all its processes
 
What's the last time a buffer overflow attack has successfully been conducted?
 
user559633
I did one a few months ago B)
 
to PHP?
 
user559633
But yeah, considerably harder on 64 bit systems and most OSes are good about it
 
user559633
12:55 PM
I did it on my router
 
I do remember heartbleed; when was that?
 
user559633
last year. also ugh silly marketing
 
Wow. What's this year's tls-bug-of-the-year? A downgrade attack, but by which name?
I love those exploit names :-D
 
user559633
Encryption is bad anyway. The only people opposed to plaintext are people with things to hide. Like terrorists.
 
Don't forget about Shellshock, discovered by SE.Unix&Linux regular Stéphane Chazelas.
 
1:00 PM
@JanDvorak Logjam is a great name
 
I'd rather not transmit my password in plaintext
 
@Ffisegydd the thing in d3 where you selectAll of an element that doesn't exist yet, then do data(stuff).enter() and inside there you create the elements you were selecting is freaking me out
 
user559633
@JanDvorak Well then, you're probably a terrorist. Time for me to make an anonymous report.
 
And by anonymous, you mean not anonymous, because what have you got to hide?
 
@RobertGrant Does that work on the same principle as Haskell's lazy lists?
 
user559633
1:02 PM
@RobertGrant Sometimes I feel like you're the only one that gets me
 
fibs = 1 : 1 : zip(+) fibs (tail fibs)
 
user559633
Pro tip: Pack a microfiber cleaning cloth (like the ones used for glasses or screens) in your travel kit.
 
@tristan :)
@JanDvorak no, it's some d3 magic that doesn't quite make sense when you read it, but is quite useful
 
Don't forget your towel either
example?
 
user559633
Most places will have towels for you to use. Towels are kind of heavy too. Maybe a pack towel?
 
1:05 PM
It's basically like this
# things is empty
for thing in things:
    data = externalsource.get_data()
    for d in data:
        things.append(thing(d))
 
O_O
 
And you get a number of things equal to the number of items in the data
 
does that essentially hoist get_data out of the outer loop?
 
I don't think so exactly, it's more that the thing that looks like a foreach doesn't actually just operate over the nodes it selects from, it also keeps the execution going
Because it's not defining a separate variable that can be hoisted
But yeah, I guess you could think of it that way
 
Even if I understand it as always entering the loop body, then lazily fetching the iteration element, this still causes a recursive definition
 
1:10 PM
Yeah :)
 
unless the argument to append itself is lazy?
 
It's just not working quite that way
It's not python; I just translated it to look like Python
It doesn't look like that at all
 
If I ignore the timing and just follow the data relation, I still get thing == thing(data)
 
But it appears to work that way, until you see what's happening
 
What's the actual syntax? I can do javascript
 
1:13 PM
@PM2Ring Hmmm, I thought that the question looks okay and might be useful for the future readers.
 
d3.select("body").selectAll("p")
	.data([4, 8, 15, 16, 23, 42])
	.enter().append("p")
	.text(function(d) { return "I’m number " + d + "!"; });
So you select the body, then select all ps in the body, the for each of the elements of data you just passed in, that don't have an equivalent in the p selection (e.g. you have 3 ps and 6 data elements, it'll look at the remaining 3 data elements), do the code after the enter() call
 
looks interesting. I like
 
Yeah that was a stumbling block for me, but now I get it it's cool
 
Haskell's recursively defined lists can be similarly puzzling at first
 
@RobertGrant Yeah. There's some good D3 books in my Dropbox folder.
 
1:17 PM
Oh yeah :)
 
It explains enter and exit properly.
 
The key here is that each specific p isn't used before it's created.
 
@Ffisegydd yeah what's weird is I normally go to "intro to X" sites before the official docs, because they're often better for explaining concepts. Here, the d3 docs explained it way better :)
 
I guess it crashes and burns if you do text before append?
 
The d3 docs are pretty fantastic.
@Bob look up bl.ocks.org as well.
Not really for docs but good for showing off examples.
 
1:22 PM
@thefourtheye The question's pretty basic, and the OP should have posted some of his own code that attempted to solve the problem. And maybe he would have in response to the right comments. But that's unlikely now, since you guys have spoon-fed him the answer...
 
Hmmm, no problem :-) I removed the answer and CVed it :-)
 
@thefourtheye I see. :) I didn't mean to harass you into removing your answer, since it's probably too late anyway, now that the OP's seen the answer. I was just offering general advice about not spoon-feeding newbies that don't post code attempts, since we don't want to reward their bad behaviour.
 
@PM2Ring No problem, I was really thinking that the question would be useful to the newbies. But then the "OP not responding" made me think again. :)
 
Oh, it's certainly useful. But even more useful is training newbies to do stuff the SO way. :)
 
1:32 PM
Yup, you are correct.
 
I feel a little bit sorry for this OP. They've posted a code attempt, and tried to describe their task, but I guess their English skills aren't very strong. I guess I should post a comment...
 
2:10 PM
It is true that I already have x and y in RAM, but they do not fit in L1 cache. This problem turns out to be dominated by cache misses, which chunked loops minimize. In the regime of large arrays x and y, element-by-element looping is substantially slower for this reason. The product(x, y) syntax does not perform the loop in chunks, but maybe there is an alternative itertools method for this purpose? — aph 2 mins ago
This guy doesn't want L1 cache miss. Do we have anything for this purpose in itertools? :'(
@JörnHees - see my comment to answer given by thefourtheye about RAM vs. cache. The chunked looping does provide benefit, and is a standard hpc trick used, e.g., in matrix multiplication. — aph 4 mins ago
Is this true? Generators will help in avoiding cache-misses?
 
I don't actually understand anything about that, but how could the RAM possibly fit in the L1 cache, or any cache for that matter?
 
@thefourtheye He didn't say that. He said chunking will help in avoiding cache-misses.
 
Oh, yeah. I meant chunking. But chunking is done by generator only right?
Okay, its a numpy question, which I don't know. I am out of there.
 
2:26 PM
He needs to process a giant rectangle. So instead of scanning the rectangle row by row, processing each cell in each row, he's breaking the giant rectangle up into a grid of squares, and then scanning within each square, row by row. The idea is that a single row of the giant rectangle doesn't fit into cache, but a single square does fit into cache.
 
how could?
unless he's transposing the rectangle, in which case chunking does help
 
2:39 PM
> It takes around 1 minuet to find them all. In your experience, is that a reasonable amount of time or can it be done in (significantly) less time?
^ an actual question...
 
@JanDvorak I guess my description is a little misleading I should've said: a whole row of the giant rectangle won't fit in the cache, but a sub-row & sub-column from each square will fit in the cache.
 
sounds plausible
 
@thefourtheye It looks like a XY Problem best way to avoid cache miss in CPython with numpy array so I chose a XY Solution: use numexpr
0
A: Efficient use of python generators in a tight double for loop over numpy arrays

Xavier CombelleIn my opinion, the creation of your generator expression is killing your running time because it is not optimized by cython. A better solution, which keep care of all cache optimization things is to use numexpr. As the manipulation of x and y are algebric it should fits your constraints very w...

 
@vaultah I wonder how fast his CPU is. I can do the primes up to 100 million in Python 2 in 55 seconds on a single core 2GHz machine.
@XavierCombelle Interesting.
And I reckon that OP deserves an upvote or two just for responding well to comments. :)
 
2:59 PM
@PM2Ring it's a 1e6 * 1e6 operations so 1000 G operations
 
Yeah, I noticed that. So he needs all the optimizations he can get. :)
 
Erasthotenes' sieve in Haskell:
let primes = map head $ iterate (\(x:xs)->filter (\p->p`mod`x/=0) xs) [2..]
Now let me time it
Too long in an interpreter; will try a compiled version when I get home
 
@JanDvorak how many primes ?
 
@XavierCombelle How many do you want? :) It's a generator.
I should have another go at learning Haskell. Maybe on the 2nd attempt it won't make my brain want to melt so much. :)
 
@PM2Ring if it's only for the second prime it's certainly fast enough
 
3:11 PM
The most advanced Haskell program I wrote was a translation of the big e calculator I posted here.
 
cbg everyone
 
cabbage
 
@vaultah What's up?
 
vtc'ing the question you've linked in the Tavern :p
 
3:20 PM
John Nash the mathematician is dead :(
 
Some blues for you, @JohanLarsson: That Did It Tedeschi Trucks, Live at the Fillmore.
 
ty ty :)
 
@PM2Ring I hear a little Janis in her voice. A good thing of course.
 
@JohanLarsson Susan's voice is a bit husky, but it's not always quite that husky. :)
Some more Tedeschi Trucks, although not strictly blues: Midnight in Harlem. And Susan without her husband Angel From Montgomery
@XavierCombelle That's sad, dying in a car crash at his age.
 
3:41 PM
What do you think, you've accepted an offer to work somewhere, and another place you'd prefer to work wants to interview you even though they know you've accepted. What do you do?
 
Speaking of Janis-like vocals, Cee Cee James - Blood Red Blues
 
Oh yeah, good morning to everyone in the US. Good afternoon to everyone in Europe. Good evening to everyone in Asia
1
Q: How can I restart an ansi-term buffer?

strugeeI have an open buffer with major mode ansi-term, and with scrollback. This buffer has crashed. I'd like to "recycle" the buffer into a new ansi-term such that scrollback is kept. How can I do this?

 
3:58 PM
rhubarb
 
spaghetti
lasagna
linguine
ravioli
 
4:16 PM
did you see:
140
Q: New navigation for Stack Overflow is in alpha testing

SklivvzAs announced 6-8 weeks ago... In a major effort to move as much UX cheese as possible in a single deployment significantly improve the site browsing experience, we have deployed a new version of the site navigation to Stack Overflow, Meta Stack Overflow and Meta Stack Exchange. The catch is t...

 
neat
so what is UX cheese?
 
4:47 PM
cbg
 
4:57 PM
cbg
 
Yo
I am here on Sunday to fulfill my promise of trying to contribute to RABBIT.
 
went to the shop a bit earlier - they've got a new guy there - if it isn't Martijn - it's his twin :)
 
So far I have overcome the hurdles of 1. downloading CabbageBot.js and 2. Installing Node.js. Only 98 hurdles more.
 
@Kevin fair play - not sure what the heck happened to the Python version of it
 
Any chance you guys can cv-pls that link above? It's getting silly answers.
 
5:00 PM
@davidism which link?
 
Cannot find module 'es6-promise'... Save me, Google!
 
the op said "thanks, that dupe solved the problem, now here's a new problem"
 
they're seriously typing that into the prompt? lmao
 
In that case, the hammer cometh
 
5:03 PM
@Kevin you'll have to hammer it - I'm too busy choking up tea while laughing :)
 
You got it
 
Wonder who's going to get the Python gold badge first - @davidism / @Ffisegydd :p
 
Ffisegydd is betting on himself:
2 days ago, by Ffisegydd
If I take this data job then my start date isn't until August. That means I'll have 2 months with nothing to do. I will destroy 20k in front of @davidism's eyes.
Oops, that's for 20k, not gold. Same principle though.
 
Fizzy was way ahead on gold badge last time I checked.
 
Bah! npm changed the color of my command prompt from green to white.
Why is technology so terrible.
 
5:11 PM
> How far can we push technology before it starts pushing back?
 
@Kevin because KevinScript isn't out yet? :p
 
That would only make all non-KS technology seem even more terrible by comparison
 
 >>> import random
 >>> print(''.join(random.sample('bcg', 3)))
 cgb
24996 rep :D
 
I might even make 60k by the end of month - woot
 
Please set up the configuration file config.js first. Nice, I guess that means I'm done wrangling dependencies
Interesting to see that chat rounds 24.996k rep to 25k.
 
5:17 PM
one of the funniest episodes ever
 
I wish I knew which one of these half-dozen http requests was causing the [Error: HTTP 404] error. Alternatively, I meta-wish that I knew how to debug node.js program/process/whatevers
I don't suppose anyone knows where, if anywhere, http://chat.stackoverflow.com/ws-auth was moved to...
Worse case scenario: they removed the functionality and everything I did for the last two hours was a waste of time
 
5:36 PM
RIP John Nash :'(
 
It's weird, I was watching a video about game theory last night, and they used the past-tense "was" when discussing John Nash. And I thought "I'm pretty sure he's not dead..."
Guess I was wrong :-(
But surely he was alive when the video was recorded. It wasn't a recent upload.
 
I felt so bad after watching the movie itself. His life would have been a nightmare.
 
6:30 PM
The film was quite dramatised.
 
6:47 PM
Greetings, All.
 
7:06 PM
@Ffisegydd HAH! I'm still loving the whole rowing thingy => I'm rowing for 30 minutes a day, which means 7145 meters (~4.44 miles) and I already lost 14 kg (~30.86 pounds)
(and ofc I created this ^ nice little ini => python => js workout-monitor stuff, to track my improvements)
 
@Peter awesome. Of course I'm more interested in the tech stack you used for the visualisation, but that's just me :P
When I get my own place I might consider getting some kind of exercise machine, will look into a rower.
 
@Ffisegydd LOL
@Ffisegydd I can only recommend a rower -- but some find it boring, but let's face it, if you are not playing a team-sport, your cardio is most likely boring anyway
(actually, because I'm monitoring myself, I'm always in a competition => trying to beat the yesterday-Peter)
 
I went on a diet at the start of the year and did something similar, weighed myself everyday and had a visualisation/analysis bit for it.
 
@PeterVaro Nice! and I agree with @Ffisegydd, I'm also interested in what you used for the visualization.
 
Highcharts?
 
7:16 PM
nope, it is chart.js
a bit limited, but has everything I needed
 
nice
 
@Ffisegydd yeah, I forgot to mention: I'm also on a diet as well.. well, you cannot loose weight eating pizza all day ;)
 
I halted my diet towards the end of my PhD/looking for jobs. Stressful enough without worrying about that too.
@Peter you may find jsgraphs.com interesting.
Great for comparing the various libraries.
 
that's also pretty nice ;)
the other thing I wanted to try is D3.js
 
Oh dude. D3.js is phenomenal.
 
7:20 PM
but that's a bit "lower-level", however, you have full control in return
 
I cannot sign its praises enough.
 
ikr? ;)
 
It is yeah. A lot of those libraries on jsgraphs.com will be built using d3.
It's just amazing.
 
but I only had like 15 minutes the other night to make my workout-monitor work, so I decided to go the easy way: that's why I chose chart.js
but one day.. :) I will change it to D3
 
Yeah definitely. D3 is amazing, but it's a chore.
You could look up C3.js, which is D3 but a bit more re-usable.
 
7:23 PM
thanks for the hint, will look at C3 as well
anywho, it's time for Stephen Universe and a nice mushroom soup ;)
rhubarb(all)
 
more upvotes on Careers than on SO today...
3
A: To interview at another company (B) after accepting an offer from company (A)

Aaron HallYou've already told company B that you've accepted company A's offer, and they still want to talk to you. It doesn't hurt your reputation or violate any system of ethics that I am aware of to talk to them, as long as you continue to state your intention to work for A. If B offers you 30% more t...

Feedback welcome on ^
 
I'm working with D3 now. You're right. It is a chore.
@AaronHall will have a look
@AaronHall Yeah, the former me would say 'you've made a deal. Your reputation is at stake.'
But now, I would lean towards "You haven't started. Go talk to the other firm and if they give you a better offer--take it. A company will lay you off in a heartbeat. Do what's best for you. They still have candidates lined up--it may be easy for them to fill the spot if you act quickly."
Tough call though.
 
7:56 PM
oh! downvoted! gnarly...
 
Sure that counts as feedback? :-D
 
boo on that feedback, I wanted positive feedback!
 
wait, were you... begging for upvotes? :-D
 
What if company A is making a below market offer? Not interviewing with B is leaving money on the table.
I presume that could be a lot more likely in the questioners case than the answerers'.
 
Yes.
 
8:17 PM
Thanks.
 
8:27 PM
ugh. after a few hours, my program is finally finished (scraping). On page 2,551 (out of 3,061) it's hanging on a page...waiting for FB!
I really don't want to shut it down and start over. Poor me.
 
Evening
 
can you just rerun it for FB?
 
it's an ad on the page.
 
Good evening @JRichardSnape
ok
Good night to people in Europe, and good morning to people in Asia.
ah, I'm used to giving good advice that's optimized to the questioner and not to myself.
 
A good skill, mentorship
 
8:32 PM
Ah, Aaron. Are you still thinking about the company question?
 
oh of course... :D
 
lol
 
Your answer there always going to be divisive as you appeal to logic in an arena that is essentially belief based for many
 
@AaronHall; if it were you, what does your gut tell you?
 
I know the market pretty well, and it would be hard to hire me away from where I'm at.
 
8:36 PM
Ah
 
Of course here, the question would fail for being primarily opinion based, but on those kind of sites, it's inevitable
 
I agree with @JRichardSnape
In my market, it's a common dilemma.
 
what's your market, @Christine
?
 
Academia
People worry about this stuff all the time
I know someone who accepted an offer at uni A - SIGNED the contract - then was offered another spot at uni B. Totally not done. Totally burned bridges.
Took the spot at uni B.
People still talk about it. But there are those on both sides of the fence. Hey-you need to look out for yourself. Or, hey-it's just not done. You've totally fried your reputation.
Ok. This program is dead. I have to rerun it. Yam.
 
@RobertGrant Nice! What scheme did you go for in the end?
 
8:57 PM
@Christine I think there's always a bit of sour grapes in that.
 
 
2 hours later…
11:18 PM
C3 is pretty ok ... but really my advice just use amcharts ... or highcharts ... even with c3.js its more trouble than its worth imho
 
11:32 PM
Hi hi hi
@JoranBeasley I'll keep that in mind.
 
11:46 PM
Python is the programming language to rule them all.
 
00:00 - 12:0012:00 - 00:00

« first day (1681 days earlier)      last day (3268 days later) »