« first day (1320 days earlier)      last day (3645 days later) » 

12:04 AM
hey
 
12:17 AM
@StackedCrooked Can you confirm that you just sent me an email? I just want to make sure it isn't someone impersonating you.
 
yep :)
 
k :)
Especially on that topic. :)
0
Q: Efficient ways to sleep?

Matteo MontiI am developing a simple C++ application that does some networking. I need it to send UDP packets to another application over the Internet, but in order to prevent any congestion I need to tune the send rate at a specific speed. Therefore, I need my program to sleep between two consecutive packet...

^^ nice title
 
> Efficient ways to kill?
I'd like to kill a process and I'm not sure about...
 
unplug the power
 
@StackedCrooked Ha! Now I know your real name. :)
 
12:25 AM
yep
There are many ways to figure it out though.
 
... woah there, relationship improved to a personal level!
 
I think you can find Stacked's real name in his clojure notes
or at least his email
 
there are about 100 ways if you care ...
 
I wonder who'd care enough to hunt down Mysticial and torture him just to get Stacked's name out of him
this has to be in those 100 ways
 
It seems I am generally more unhappy hanging around with my high maintanence friends. I have managed to lose a few, I plan to lose more. Too much effort, although half of those problem were caused by myself, because it's not all them.
 
12:34 AM
Mysticial has made a change to the feeds posted into this room
 
I just pulled a feed from the Maid Cafe.
It's the SE status twitter feed.
Apparently, we're going into read-only mode soon.
 
But as a rule to happiness: if you want to be happy and there is someone or something in the long run that would cause you unhappiness - cut connection to them, you will be happier
 
We will be performing a read-only test of Stack Overflow Careers in a few minutes.
 
woah... that's too many.
4 messages moved to bin
 
On the upper hand, I also have plenty of long term friends who are easy going
 
user3010322
12:43 AM
@Mysticial Pssst.
 
user3010322
I need to get a backup HDD, at least 1 TB.
 
user3010322
Do you have any recommendations?
 
Anything smaller than 3TB is a waste of money.
 
user3010322
Oh. Well, please do guide me.
 
In any case, HDs have sucked lately. Prices haven't gone down at all every though it's several years after the Thai floods.
3TB for 100 USD is a good target.
 
12:45 AM
@ThePhD What are you backing up? Anime collection?
 
Any less than 3TB and you're paying for the metal more than the space.
 
I just stopped someone from getting one of the Kingston V300 SSDs
I'm a true hero :'(
 
I bought a pair of 4 TB internals for about 130 USD each this time last year.
Those were fast Hitachis too. Now the cheapest internal 4 TB is like 170 USD.
 
I wish someone stopped me from buying mine
 
I recently got a 2TB Western Digital. (product name is "My Book")
With USB 3.0 it's nice.
 
user3010322
^ Lowest price I could find, 109 ish for 3 TB seagate
 
You can get them cheaper than that.
 
user3010322
Probably. That's just the cheapest newegg handed to me.
 
I had two seagates fail on me. I don't really trust the brand anymore. (Probably being irrational, statistically.)
 
Seagate does in fact suck.
As of 7 - 2 years ago. I don't know about recently.
Every single one of them died from reallocated sectors.
 
user3010322
12:51 AM
I'm not willing to take a chance on Seagate.
 
user3010322
I had one before and it did indeed die.
 
user3010322
Western Digital has not failed me yet.
 
Hm, 3.2TB SSD for 18000 EUR. I guess I'll pass :)
 
user3010322
But they usually come with weird amounts of bloatware.
 
If you're just using it for backups, it's fine. It's only when you repeatedly stress it does it accumulate bad sectors and eventually die.
That's the reason why internals are more expensive than externals.
Internals need to be more reliable since people tend to boot off of them.
 
12:52 AM
@ThePhD It has not failed me either.
 
Externals are usually just to store low traffic stuff - like Anime.
 
user3010322
It's not a good idea to watch things off the external is it?
 
@ThePhD no problem
 
I've only had two WDs fail on me. a 200GB from a long time ago - natural causes. And a 160 GB from 7 years ago - damaged in shipping.
 
user3010322
Is 150 for 4 TB bad?
 
12:53 AM
@Mysticial Damaged in shipping. That sucks.
 
user3010322
150 USD, that is.
 
@ThePhD Looks like a normal price.
 
I've never had a Hitachi fail on me in the last 10 years. I have 12 of them - all of them are more than 4 years old. One of them is starting to have CRC errors. The rest are still all healthy.
These 12 Hitachis are the ones that I abused the most heavily when I was still developing y-cruncher.
@StackedCrooked Yeah. I shipped my desktop to school. Of the two HDs, one died.
After that, I never shipped an HD again.
 
user3010322
Always carry HD in person.
 
user3010322
 
12:56 AM
@ThePhD That's a good deal.
 
user3010322
130 for 4 TB, Best Buy is having a sale. Western Digital too.
 
It'd be even better if it was internal.
 
user3010322
Yeah, but I don't need to get new internal laptop HDs: I have an old MSI computer I'm going to scrape parts from to replace the dying D drive of my current laptop.
 
I'm still looking for a pair of 4TB internals to backup my current 2 x 4TB Anime drive.
But I'd willing to go with externals if they were really cheap.
I prefer internals since I can shove them into a box.
 
@Mysticial Thai flood made companies realize people are willing to pay more for their HDDs so they're not going back down because now they know they can get away with it.
 
1:00 AM
8TB wow
and here I am not needing more than 200GB on my PC
and 1GB on my dropbox
 
@AlexM. My steam folder is bigger than that
 
Isn't an external HD the same as an internal one? (They look the same if you remove the fancy cover.)
 
@Borgleader lol I just delete what I don't play or I finished watching
 
@Borgleader They definitely made a lot less money off of me. I used to buy an HD every month. After the floods I buy more like 2 a year.
I think Shigeru Kondo sends me more hard drives than I buy myself.
Which makes me feel bad since HDs are expensive.
 
user3010322
Good news, the Best Buy 40 minutes walk from my place is selling that exact HDD.
 
user3010322
1:02 AM
At that exact low price. Guess I'm walking tomorrow.
 
@AlexM. Speaking of which. I have less than 1TB free on my 2 x 4TB. So I should be looking at larger than 2 x 4TB to back it up. Something like 2 x 5TB. But that's expensive. And I'd hate to go to more than 2 since I can't fit them into a small box anymore.
 
@Mysticial Googled his name and found this. Nice.
 
He sends me the digits after each record. Multiple (large) internal drives.
I convert the digits to a different format and move them to my externals. That frees up those (fast) internals for me to use for other purposes.
I feel bad accepting them. But in return he gets my developer builds of y-cruncher to use and test. lol
 
Btw, how come the 2013 version is so much faster than 2011? Did you reuse the data?
 
@StackedCrooked Better hardware. Better software. :)
 
1:09 AM
Cool.
 
@Mysticial sounds like a neat trade to me
 
Hardware went from dual 6-core Westmere to dual 8-core Sandy Bridge.
y-cruncher was rewritten between the 2011 and 2013 records and picked up some new algorithms and optimizations.
 
user3010322
:O
 
Do you find that multi-cpu machines are slower than single-cpu multicore when performing synchronizations? (Like atomic increment, cas, etc..?)
 
Is there a place I can find (good) information on why C++ has "soft" guarantees on the size of integral types? (This questions asks if, I want why)
 
1:11 AM
god damnit mysticial is hardcore as fuck
2
 
user3010322
I just realized if I had accepted the offer from Northwestern, I could have met Mysticial in person. o_o
 
@AlexM. took you long enough
 
@StackedCrooked There's hardly any synchonization in y-cruncher. I designed it that way. So aside from NUMA effects, nope. The # of cores can go up and the program will scale with it if the memory is fast.
 
Reducing the number of synchronizations offers great performance improvements in my tests at work and at home (1.5x to 2x speed improvement) But it's hard to untangle the production code.
And it seems that the multi cpu machine suffers more from the syncing.
 
@StackedCrooked Didn't Sean Parent present a slide on the performance decrease as the amount of synchronizatin increases?
it was quite astounding (im pretty sure it was him, at the last GN)
 
1:14 AM
As far as super-scaling goes, NUMA is the #1 killer for y-cruncher.
 
Man. Wii U Pro Controllers are expensive.
 
There isn't really a good solution other than to redesign it using MPI. But then that gets into lot of arch-specific stuff.
 
@Mysticial Maximizing parallellism and reducing synchronizations seems to be key in modern hardware.
 
1:15 AM
@Borgleader Oh gawd... that song.
 
@Mysticial Killer? you mean it's bad?
Kinda ambiguous :)
 
@StackedCrooked yes it's bad - really bad.
Think: 10% performance improvement going from quad-opterons to 8-operatons.
 
Without numa it would be worse, not?
 
@StackedCrooked Depends on how you define it. If you got rid of the NUMA by making all the nodes equally slow at accessing all the memory, then yes, it would be bad.
 
I have only dabbled with it.
But there's no real alternative to numa is there?
 
1:18 AM
@ScottW but gold
 
Apart from CPU cache of course.
 
In y-cruncher, I solved all the small-scale scalability problems:
- Max data parallelism
- Synchonization
- Load Balance
- False sharing
Solving those will let you scale indefinitely with fast memory.
After that, the next barrier is NUMA.
NUMA is much harder to do since now it matters where your data is.
 
Yeah, I find it hard to reason about.
Or I just need to get used to it.
 
What sucks even more is that the optimal data-layout will differ depending on how many nodes there are and what the network topology is.
And anything that isn't "optimal" is almost always worst case.
 
I guess you are working with pretty big data structures.
 
1:24 AM
The small-scale scalability problems are actually pretty easy to solve. Just pick the right algorithms.
Use a few hacks to break up dependencies and you're set.
I've found that vectorization is much harder than parallelization.
 
Haven't really looked at that yet.
ATM that's too hard-core for me.
And probably don't need it. Maybe for checksum calculation, but I can find code online for that.
 
Vectorization is definitely a separate field. That counts as low-level optimization and involves very different techniques from multi-threading.
@StackedCrooked Actually, if NUMA behaved like a cache, it would scale fine.
Since the algorithms are mostly cache-oblivious and have the locality to exploit any number of cache levels.
 
So using NUMA is more intrusive in the code design?
 
Very
 
@ThePhD Do not buy Seagate.
They make the worst HDDs.
 
1:33 AM
I'm surprised at why they don't build NUMA systems that have caching behavior. I try to access this piece of memory and it's remote. Then bring into local memory.
 
Man I'm bored.
 
Without that layer, all there is is the CPU cache - which isn't large enough.
bbl, dinner
 
user3010322
@Rapptz Yeah, I know. Sticking to Western Digital.
 
@Rapptz my Seagate started to corrupt crap periodically after 4 years of usage
it doesn't matter that much now since I only store games and anime on it, everything else going on my SSD
but yeah
I have an almost 10 yo WD still going
 
video game controllers so expensive :(
the millions of chinese counterfeits aren't helping
 
1:40 AM
I saw a wireless gamepad today and immediately remembered about my wireless keyboard experiment
and how it wasn't laggy yet still had enough lag to make me feel uncomfortable playing CS
 
Video game controllers? ..Just get a good one?
 
I use a wired X360 controller on my PC
and I use it mostly on emulated console titles
 
I'm trying to buy a Wii U Pro Controller :v
but they're like $50
 
I got my gamepad for free from an ex-client
I worked on a game prototype for him and he wanted to get the gamepad controls right, which meant I had to have one
the wii u pro controller looks like something you'd use to play gamecube titles
 
I already have one
It's pretty good.
 
Could use it for like ~4 months w/o charge.
Sometimes I bid on stuff on eBay just to make the other people pay more. I'm glad I haven't actually won anything.
 
speaking of eBay, I wonder how long my fellow Romanians are going to keep my package at the customs office before sending it over
shouldn't be long if one considers they stopped asking you to move your ass over to the customs office to get your package because everyone stopped using their services in favor of using DHL's
I love my country from this POV
even the state has to up their game due to competition
I wonder how long it'll last
 
2:08 AM
If objects of a class need to retain some kind of heavy resource for their entire lifetime, is it appropriate to pass that resource in as a shared_ptr<HeavyResource> instead of as a HeavyResource&? I'm trying to avoid the possibility of the resource becoming a dangling reference.
 
use a (raw, non-owning) pointer
 
Why would I favor that over shared_ptr?
 
shared_ptr is shared ownership, do you really want that?
 
I think I do. Hang on, let me put together an example.
 
@Maxpm It will work. But using shared_ptr for this is sloppy programming.
 
2:17 AM
On branch master
Your branch is ahead of 'origin/master' by 50 commits.
:v
 
@Rapptz Okay. Here are the use cases that lead me to believe that the ownership needs to be shared.
 
You have a dangling reference.
:v
There's no shared ownership here.
This looks like exclusive ownership, i.e. std::unique_ptr.
 
I know there's a dangling reference, and I know there's no shared ownership there.
The dangling reference is how things are now. It's what I'm trying to fix. Either shared ownership or exclusive ownership of a pointer is how I plan to fix it, and // Case 2 is why I think it should be shared ownership.
 
Well.
Either std::unique_ptr or use a raw pointer for your references.
Remove the returnAWrapper function because it'll never work unless you have exclusive ownership or shared ownership and you don't seem to have much shared ownership, just references.
 
Well, that's what I would be changing.
returnAWrapper could work if I were using exclusive or shared ownership instead of a reference.
I'm just deciding between exclusive or shared. The reference is going away no matter what, because returnAWrapper represents a fairly major use case that needs to work.
 
2:34 AM
Damn. I broke things.
Interesting.
 
breaking things sucks
 
Hmm.. maybe it's because the number of arguments is an odd number.
Hmm.. I have no idea.
 
?
 
nuffing
just waiting for 24 to download and had nothing else to say
it's done now
BAI!
 
2:43 AM
bb
Removing the trailing return type makes it work automagically in C++14.
:( what am I doing wrong here
 
@Rapptz This is how I'm proposing to support both case 1 and case 2 through shared ownership. What's wrong with this?
 
there's no shared ownership there
it's exclusive ownership
 
How so?
 
what are you sharing? lol
 
Well, in general, a Wrapper should not be able to delete its heavyResource if that heavyResource will continue to be used on its own after the Wrapper's destruction. That would be the case with exclusive ownership, wouldn't it? I'm looking at case 2, specifically.
 
2:54 AM
gimp suddenly becomes 1000x more usable when you run it in single window mode
 
@Maxpm your main issue is the silly factory function
 
@Rapptz returnAWrapper(), you mean?
 
yes
 
I'm simplifying it. In actual usage, it'll be less trivial.
 
feels like an anti-pattern to me
 
2:59 AM
Returning an object that owns another object is an anti-pattern?
 
creating a local named object and then returning it is an anti-pattern :v
 
You should implement variadic min so that it will expand to min(min(a, b), min(c, d)) instead of min(a, min(b, min(c, d))). (The former enables parallel execution.)
 
@Rapptz What? Why?
 
@Rapptz did you invent this rule?
 
@StackedCrooked Nope.
@StackedCrooked I could do that I guess.
 
3:03 AM
Has anyone here ever done Universal Apps in VS2013?
 
lemme see
 
also enough time passed since X-COM's first release for people to describe X-COM as a blend between full spectrum warrior and dawn of war 2 :(
 
@StackedCrooked Doesn't fix the compiler error with decltype but I'll keep it.
 
that's enough facebook comments for today
 
@Maxpm I generalised it too much :v
 
3:06 AM
I think part of the issue is that shared_ptr implies that the resource is always being shared between multiple threads or multiple objects or something, which isn't really what I'm using it for. I'm using it just for its reference counting.
 
shared_ptr in combination with weak_ptr can be very useful for preventing lifetime issues in multithreaded code.
 
This isn't even multithreaded code, though.
 
In my experience that's one of the most common use cases for shared_ptr.
 
travis-ci sucks
 
It does? I thought people liked Travis CI.
 
3:10 AM
I hate Travis CI
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
lol
 
Lol?
 
Only thing I like about travis CI is its github integration
otherwise it's pretty bad
What in God's name..
I didn't even change the implementation for this ._.
 
We have a CI, why do you bother with Travis
 
cause I made this before we had CI :v
too lazy to migrate
 
Who's we?
 
3:21 AM
I'll do it after I migrate from SCons to ninja
 
Travis CI is too slow now for my liking
There must be an open-source self-hostable version somewhere
 
omg having 24 back is amazing
 
It's called Buildbot
 
it's like travelling back in time
 
@LightnessRacesinOrbit What’s that?
It’s very hard to search for
 
3:32 AM
the show probably
| creator = Joel SurnowRobert Cochran | executive_producer = Joel SurnowRobert CochranBrian GrazerHoward GordonEvan KatzKiefer SutherlandJon CassarManny CotoDavid FuryBrad TurnerBrannon BragaAlex GansaChip JohannessenTony Krantz | starring = Kiefer SutherlandMary Lynn RajskubCarlos BernardDennis HaysbertElisha CuthbertJames MorrisonReiko AylesworthKim RaverD. B. WoodsidePenny Johnson JeraldRoger CrossGregory ItzinCherry JonesLouis LombardiAnnie WerschingSarah ClarkeBob GuntonJayne AtkinsonCarlo RotaEric BalfourXander BerkeleySarah WynterLeslie HopeJames Badge DaleJean SmartPeter MacNicol...
 
@false are you even serious?
where have you been for the last 15 years man :/
 
haven't heard of that either
 
He's like 16.
:v
 
what srs
omg i feel so old
 
3:33 AM
Oh, so it was actually the first Google result
 
how have you not heard of 24
 
I’m going to go sit in the corner now
 
> Premiering on November 6, 2001
not sure what I was watching back then
 
hi guys, i remember seeing once an article on optimization for speed, with a -i think - c++ example being optimized, maybe someone recognizes it?
 
@AdrianPanasiuk Ah, I think I know the one you’re talking about
… er, no, wait, there appear to be several hundred
Could you narrow it down
 
3:39 AM
I always planned to read, unfortunately that's pretty much what I remember
 
What would be useful is you reading the bloody documentation. — Lightness Races in Orbit 13 secs ago
oh, and this one
-1
Q: The best and simplest way to get data from table

AanWhat is the best and simplest way to get data (and then write them to a database, for example) from an HTML table filled dynamically with rows. The table I have is: <table id="myTable"> <tbody> <tr>...</tr> <tr>...</tr> </tbody> </table> and I use the jQuery to add data: $('#myTa...

Stack Overflow is so full of brilliant, inspired questions.
Fucking Crap Overflow, more like.
 
@LightnessRacesinOrbit Yeah! You said it
 
you can still use the .ini format, include/require etc. will still parse it as PHP — serakfalcon 1 min ago
Jesus Christ.
 
Like all good things in life, this is kind of funny, and also kind of sad.
 
more the latter than the former, I'm afraid
 
3:49 AM
7AM already, no sleep for me today it seems
 
> Photos With Mario Trailer v12 h264 2
 
4.50am, fortunately
 
good title, Nintendo.
 
@AlexM. Just go to sleep 9 hours ago
 
I say "fortunately" because (following a power cut a couple of days ago) I finally set my deskphone's clock before I went out, and it turns out I set it wrong. so when I got home I thought it was 7am and freaked the fuck out
on the downside it is still far too late
 
3:51 AM
include,require doesn't care what extension you use. Try it sometime. — serakfalcon 35 secs ago
It’s true, @LightnessRacesinOrbit, I just tried it
 
well done
what sort of dumbfuck dipshit puts a PHP script in a file whose name ends in .ini
fuck me
 
hmmm
 
A PHP developer
 
> I'm asking if you know about any class that does what I'm asking
 
Don't you know the format of the file is determined by its extension???
If it's .ini IT'S FUCKING INI
 
3:53 AM
I'm trying to think of a scenario in which mass renaming *.cpp files to *.java could cause large amounts of funnies
but I can't
 
@serakfalcon: A PHP script written in a file whose name ends in .ini is hardly a file in ".ini format". It's a file in ".php format" with the wrong filename. Don't be an idiot. Try logic sometime. The OP is obviously talking about actual INI files, not misnamed PHP scripts. If you take the time to do just a modicum of research, you'll find that parse_ini_file doesn't give a flying f~~~ about the file extension but expects an actual INI file as input. — Lightness Races in Orbit 2 mins ago
I think that's reasonable.
morons
 
No, it’s too uptight
Now go to sleep
 
;)
@serakfalcon: Troll elsewhere, please. — Lightness Races in Orbit 27 secs ago
You're right; I should.
 
Yes I'm sure OP chose INI files for their extension
 
I forgot what I was doing.
:(
 
3:57 AM
Anyway, request-for-library => close-vote
@Rapptz Trolling.
> Would there be any issues using xml files as opposed to Json?
Jesus
Seriously
Fuck this
 

« first day (1320 days earlier)      last day (3645 days later) »