« first day (1600 days earlier)      last day (3346 days later) » 

3:00 AM
@Pris Maybe it's like a type of imaginary animal.
 
> luc dalton
 
Lucky Luc Dalton
 
man the power keeps flickering in my house
im paranoid that the computer's gonna shut off and I'll lose all my work
 
How about saving it then
 
@Pris You have a UPS?
 
3:07 AM
@MarkGarcia Clearly not; I wouldn't be worried if I did
 
@ParkYoung-Bae That's more dangerous in those situations.
@Pris You have a quality PSU?
 
@MarkGarcia It's an okay PSU
 
@Pris That's okay-ish. I currently have a 500W PSU that can sometimes survive ~half-second power loss.
 
Yeah, my PSU is pretty good in terms of that. The TV, router, etc will all shut off but I guess my psu has enough juice in the caps to keep going for a 'micro' outage
 
lol I bought a plane ticket monday for 5500 HK$. Now the price is 11332 HK$. ~lel~
lean management
 
3:19 AM
1 way 5500, return 11000?
Magic.
 
user3010322
Damn.
 
user3010322
SSL taking hits everywhere.
 
Yet-another-backronym-security-bug
I should make a backronym for that.
 
@Nooble what're the themes for today/tomorrow/whatever?
 
4:03 AM
is there some way to view the most-starred post(s)?
looking for something funny
 
4:39 AM
@Blob I am also looking for something funny. If you find the way please let me know
 
5 hours ago, by orlp
user image
 
@Blob I didn't get this
 
@LightnessRacesinOrbit dots ??
 
> Smart Dev
> Smart
 
4:42 AM
@ParkYoung-Bae Hey
 
@SmartDev Nothing gets by you, does it?
 
@SmartDev Sup
 
watch out guys
this dev is smart
 
@LightnessRacesinOrbit No it does not
 
he's capable of recognizing the shape "dot" and pretends to be above racial humor
 
4:44 AM
What racist humour?
 
i've been attempting a bunch of proving-trig-identities crap. so fucking hard. urgh. did 3 in a couple of hours -.-
 
@orlp I was asking why dots?
 
@ParkYoung-Bae I don't know, I'm not smart
 
@orlp Even I am not..Just my name is..lol
 
> I've heard i++ isn't thread safe, is ++i thread-safe?
Dunno why this question title trips me up
 
4:47 AM
@ParkYoung-Bae try +i+ to use hyper-thread supersymmetry
 
@ParkYoung-Bae Yes ++i is...i++ will create one temp variable
 
@SmartDev But is that superscalar and out of order?
 
@SmartDev Either both of them or neither of them are 'thread-safe', whatever that might mean, without context.
 
yup ++ operator is not atomic
so none of this thread safe
 
again you're talking out of your ass
 
4:50 AM
is it webscale?
 
but only half
what "thread-safe" is supposed to mean in this context is not well-defined
 
@LucDanton You'd have to use the webscale operator for that, ++@i
Also I don't think the standard mentions anything about the atomicity of operator++ on integral types
Hence unspecified
 
It is actually more than 1 instruction being executed under the hood (don't be fooled by seeing just a simple ++i; it is load/add/store) and since there is more than 1 instruction involved without synchronization you may have various interleavings with wrong results.
 
Oh? Can you make an example to illustrate that? I cannot believe it
 
@SmartDev that's why I said you were half right
 
4:53 AM
@orlp why half?
 
@SmartDev yes, it's not atomic - however, in order to have things interleave you need stuff to interleave with - a context
without a context there is nothing to interleave, so it's perfectly safe
 
@orlp Yes perfect. Thanks for clearing me.
79
Q: I've heard i++ isn't thread safe, is ++i thread-safe?

samozI've heard that i++ isn't a thread-safe statement since in assembly it reduces down to storing the original value as a temp somewhere, incrementing it, and then replacing it, which could be interrupted by a context switch. However, I'm wondering about ++i. As far as I can tell, this would reduce...

 
0
Q: Is there any faster way to compare double in c++?

user1024I have many double to compare, here is what i know: double a=2.4,b=8.2; bool m=a>b;//my current way m=isgreater(a,b);//c++11 I want to know which way is faster, or is there any faster way to compare double in c++, such as bitwise operations. By the way, i want to know how computer compares do...

 
you know
questions like those, I hate them
 
@ParkYoung-Bae lol
 
5:00 AM
because it's questions like those that cause the "optimization is the root of all evil" mantra
 
 
I'm voting to close this question as off-topic because it asks for details on behaviour of a specific version of a specific compiler on a specific platform with specific flags on a particular day.... without telling any of us what any of those things are. And then asks us to perform manual labour on it. — Lightness Races in Orbit 24 secs ago
 
now with readme!
 
5:15 AM
Needs benchmarks!
 
you mean that I should include a graph of the benchmarks in the readme?
no hi for me? :(
 
um... Why are you spamming pings?
If you weren't a regular I would've insta-kicked you.
 
I'm not your bro
yes
I literally changed name once
in over 8 years
 
Hi @Scott
 
you know, in dutch, we actually have a plural for "your"
oh lol
haha
ik kan nooit bijhouden wie hier nederlands spreekt
het ene moment lijkt iedereen het te spreken, dan weer niemand
this room is kinda filled with dutchies
or belgians
or surinamers
 
5:25 AM
one Indian as well
 
7 mins ago, by orlp
you mean that I should include a graph of the benchmarks in the readme?
@ParkYoung-Bae ^
 
@ScottW Hi Scott (sorry for the delay--was out walking).
@ScottW No snow or freezing rain here, but yes walking nonetheless.
 
@JerryCoffin that's racist - today no snow or freezing, tomorrow no black people?
war on drugs -> war on black people
 
@orlp Um....seems like there are more Asians around here than Caucasians.
 
@orlp Yes
@JerryCoffin Here too, amazingly
 
5:31 AM
@ParkYoung-Bae Strange how that works sometimes.
 
makes sense
 
@ScottW Could have been worse.
 
No I sent a mail to help@puns-foundation.org
 
ah
5 hours late
but it did get flagged
my comment on how gassing jews was pretty cool 70 years ago
that's apparently offending someone
by a whopping 2 users!
 
5:51 AM
My pet chickens get jealous if I pay more attention towards one chicken than the other ... 🌹✨💖🐣🐥🐓
 
> Your branch is ahead of 'origin/develop' by 35 commits.
eeeeh I should push sometimes
 
 
2 hours later…
7:30 AM
@ParkYoung-Bae updated graphics! ^
 
I have a doubt : If I use ios::app and use seekp(), it shows 0, whereas if I use ios::ate, seekp() shows correct position. Why does this happen?
 
@FredOverflow Unfortunately for the pun, it's pronounced Ehf-Ehl (a bit like spelling F-L)
 
7:49 AM
@Rerito The english pronunciation is "I fell" or "ey fell"
@orlp That's very nice, upvoted your github
 
@ParkYoung-Bae yes, I pushed the graph into the repo
although I'm not certain what "upvoting my github" means
 
It's humor
Of the finest quality
 
@BartekBanachewicz Haha, /sarcasm. Sheesh.
 
sscce of what I was on about last night. Seems you do get compiler warnings... and seems this example does get the right int value... I thought I did have -wall... but I mustn't have. @Xeo
 
why is not having a return statement in a function not returning void not an error?
there's literally 0 chance of it ever having defined behaviour
 
Xeo
8:06 AM
@thecoshman well well well
 
maybe I got annoyed some of them and just turned them all off :\
 
Xeo
fail
 
god
spent 20 minutes debugging a faulty bitshift
 
it's not the bitshift that's faulty
it's the programmer who put it there who's to blame
 
@ParkYoung-Bae more like 'I full'
 
8:09 AM
@orlp that was me
 
or maybe 'I fall'
 
moaning
 
Morning andy
I got a lot of pings
W/o context
 
@BartekBanachewicz
 
@Park my colleague replied to me on Twitter before I wrote to him, apparently your answer is alright
 
8:18 AM
ofc it is
it's my answer after all
 
@BartekBanachewicz huh? you mean from me?
 
Nah, from people
 
@BartekBanachewicz In all seriousness, it's because Vulkan mimics the working of OpenCL/CUDA :) Hence why I was confident with my guess
 
ah all right
 
8:19 AM
Now, loads of upvotes pls
 
I already upvoted. I'll give it a few hours, then accept... But there's still mapbuffer issue.
 
lol "distributed computing" course at my uni is so bad
 
lol I read the Mona Lisa message on the starboard several times without getting the joke, then today I finally noticed the "d"
 
they use void main()
 
It would seem mapbuffer can't work directly on your data
 
8:20 AM
@BartekBanachewicz It's ok, we can wait until Gabe confirms this
> today I finally noticed the d
Sounds like what Bartek's GF would say
 
lol
 
Hihi unreleased APIs are so fun
 
user1804599
@milleniumbug in D!
 
user1804599
@ScottW hi
 
@райтфолд in C, with BCC32
 
user1804599
 
user1804599
@milleniumbug lol C
 
@райтфолд Yeah, precisely
 
@milleniumbug go cry me a river: liacs.leidenuniv.nl/~kosterswa/AI/aitetris.cc
 
user1804599
lol Leiden University
 
Also wtf FREAK
 
user1804599
8:25 AM
This knäckebröd is bugged. It crumbles too much.
 
@orlp Gratuitous DRY violations, retarded class design, rand(), using namespace std;, inconsistent indentation... yeah, that's bad.
 
hi
 
user1804599
@milleniumbug No use of <algorithm>.
 
user1804599
for ( j = 0; j < w+2; j++ ) cout << "-"; should be a call to iota_n with std::ostream_iterator.
 
user1804599
8:30 AM
C++ y u no std::iota_n.
 
@райтфолд .. just my thought.
I always want to use iota with back_inserter
 
user1804599
I should find out how well transducers work with iterators.
 
They box nicely, you know :P
 
user1804599
@Griwes lol the tooltip
 
8:51 AM
 
Yo
 
sup bb
 
user1804599
why the fuck was this downvoted
 
user1804599
Are C++ programmers WET?
 
user1804599
8:58 AM
lol the std::list answer.
 
@райтфолд because it is silly
 
user1804599
std::list and C++03 foreach.
 
to be fair
your answer is stupid
because the question is
 
user1804599
Never waste time by writing the same code twice.
 
@райтфолд Never be dogmatic, and never force yourself to jump through dumb hoops when coding
 
9:03 AM
instead, write this 6 line template function to replace your one liner
3
 
Never write functions that make the code less readable than just expanding the body at the call site.
 
you can say what you want, but I find if (a < b) std::swap(a, b); more readable than swap_if_less(a, b);
I don't want to have to track down swap_if_less's implementation whenever I'm looking for a bug, write tests for it, document it, blablabla
 
vtc as opinion based
nah not really
all the arguments are dumb
the function is perfectly fine
just complain about the name
it's not immediately obvious what it does
if I kept copy pasting the same 3 lines of code over multiple functions then I'd refactor that into a function with a sane name
 
@Rapptz I'd write it as one line.
 
irrelevant
 
9:09 AM
whatever
it's not interesting either way
we're all capable here to deal with whatever this is trying to solve
my previous graph didn't go so well here, what do you think about my new design?
 
@orlp You don't have to write tests for it. It's an implementation detail
 
 
I think that removing duplication (especially if massive, as it seems to be in this case) tends to be healthy, but I agree with the readability arguments. In this case though, as Rapptz says, picking a better name would probably suffice to solve readability issues
swap_if is actually fine as it is, but I would not use a default argument for the predicate. Instead, I would write another function called swap_if_less() or something that invokes swap_if() with an std::less comparer.
This way it would be easier to understand what the calling actually code does as you read it
probably I wouldn't even write swap_if() until the flexibility of the custom comparer becomes necessary
 
9:25 AM
> QML elements[3] shipped with Qt are a sophisticated set of building blocks, graphical (e.g., rectangle, image)
> sophisticated
> rectangle
Wait until they see a fucking pentagon
COMPLEXITY BEYOND REASON
> These elements can be combined to build components ranging in complexity from simple buttons and sliders, to complete internet-enabled programs.
> internet-enabled programs
Enough
 
@Jefffrey mm
 
@ParkYoung-Bae wow
 
Guys, when you organize code reviews at work, how much code do you inspect and how long does it take?
 
Code revwhats?
 
9:28 AM
You review all the code and it should usually take avg ~15 minutes per change set. Not counting discussion
 
How big is a changeset
 
OK. Here we do code review basically offline, everyone gets a chunk of the code, has about a week time to write notes etc., then we organize a meeting and there we discuss everyone's notes. Last week I submitted a ~3kLoC project for review, and everyone's telling me it's too much
 
@AndyProwl Yeah that's too much
 
hm, all right
that's a scalable approach
I bet you can handle million-LoC reviews without too much effort
 
@orlp you know, that's actually the reason to factor it out; if you anticipate that it could have bugs, it's worth writing as a unit
@ParkYoung-Bae Preferrably not large. Although if it happens (and it does happen), I do not usually resolve it by spending much more time. In my wisdom experience I'll just realize that the code cannot be effectively reviewed anymore so "best effort glances" are all that can be done.
Pro tip: change sets have to be crafted to allow for code review
 
9:35 AM
I was asking for numbers :D
 
(Corollary: well crafted changesets can lure the reviewer into adopting the same train of logic as the implementor during implementation, leading to similar oversights :(... This is what we have QA for)
@ParkYoung-Bae I was not giving numbers :D
 
Hence my disappointment
 
Hence my uppity indifference
@AndyProwl lol. No kidding. It's impossible. You could potentially give some feedback on the design/organization only
 
I see
 
@AndyProwl But then it should take a comparer, defaulting to std::less<>? Or std::less<T>? What if a and b are not of the same type? Generic code is hard. Good names with generic code even harder (cf. random_shuffle, shuffle, is_sorted_until, iota etc.)
 
9:40 AM
does_something_with_stuff_until_predicate_is_of_some_value
 
@AndyProwl Now, if the whole thing was changesets on some known code base, people could still review one changeset at a time, and I'd still estimate the average 15 minutes per changeset. Again, assuming you factored the changesets well
 
@sehe It's a greenfield project
There's design documents and everything
My expectation was that people would focus on the little code details rather than the design though
Providing feedback like, I don't know, "this function could have a better name", "this function is way too long", "you could use a lambda here", "here's a coding standard violation", etc.
> I would not use a default argument for the predicate
I'd have swap_if(T a, T b, BinaryPredicate cmp) and a swap_if_less(T a, T b) that invokes swap_if() with a std::less<T> comparer. There is no hint that flexibility of different types is necessary, so I wouldn't bother with that for the time being. In fact, as I mentioned, I would probably not even write a swap_if() until it proves necessary, and only have a swap_if_less().
 
what the hell
is this discussion still going on
 
9:56 AM
You just killed it
rip
 
@AndyProwl how on earth would you approach the review task on a greenfield thing with 3kloc written by someone else? Unless it's split up in logically isolated changesets ?
 

« first day (1600 days earlier)      last day (3346 days later) »