« first day (1411 days earlier)      last day (3523 days later) » 

3:00 PM
All of QtNetwork needs to die in a fire. They clearly have no fucking clue what they're doing in that area
 
How so. What could they possibly have...
 
@sehe Their blocking API (waitForReadyRead, waitForConnected etc) plain doesn't work. Their SSL implementation gives false negatives when trying to verify certificates (and not just with one single root cause. We've found two separate bugs with that effect so far)
 
Xeo
@jalf Fuck today
I haven't achieved anything in the last 6 hours. Fuck fuck fuck.
 
procrastinator ^
 
@sehe seems like you didn't go unnoticed ;-)
 
3:09 PM
@rubenvb ...just un-voted (at least in the case of that answer).
 
Guise
24 distinct gifts to give to 12 kids so that each kid has 2 gifts: 24! possibilities?
 
right.
Google accepted my helpout listing
 
Xeo
@Abyx I have no motivation whatsoever
 
@Jefffrey I don't think so.
I'd probably be more inclined to go with 2^24, perhaps.
 
Xeo
@Jefffrey Factorial has nothing to do with that
 
user3010322
3:20 PM
@Puppy Helpout listing?
 
@Jefffrey isn't this the usual 24 choose 2 for combinations of gifts, times something for assigntment to kids?
 
24bin2 * 22bin2 * ... * 4bin2 * 1, no?
 
@ThePhD It's kinda like SO, but it's more personal one-on-one, and also you get paid.
@Jefffrey That is considerably smaller than 24!.
24! is about 4000 times bigger according to WA.
 
Yes, I just realized 24bin1 * 23bin1 != 24bin2.
 
wat, you can only use Hangouts with Chrome?
 
3:29 PM
No
 
hm
if you go to the Hangouts page, and click to download for your computer, it takes you to the download page for Chrome.
 
:v
 
The plugin installs when you go into the convo
 
It is me, I am the horror. I am making yet another C++ tutorial.
 
why would you do that? D:
 
3:35 PM
Because I want to create one that A) is in my native tongue B) doesn't teach you C with iostreams C) is tailored towards students of CTU in Prague, because most research projects (ie what most thesis are about) are in C++ or work heavily with C++ libraries and our C++ courses suck.
 
@Puppy That was quick.
 
@R.MartinhoFernandes I probably didn't mention that they rejected my description for being too vague and I submitted a revision in the meantime.
 
@Xarn That is a noble purpose :-)
 
they seem to get back to you in like, an hour.
 
Hint: teach C++11.
 
3:36 PM
@rubenvb Duh, I am definitely planning on using C++11 + 14
 
Oh right, I'm preaching to the choir :-P
 
And to stop stupid shit from happening. Like how one of my classmates who graduated today spent year working on C++ project heavily using some CV library or another. Most of that year was spent not getting anything done, because the beginning of the actual research required first duplicating known good results.
 
@Xarn Nobody will read it hth
 
Which he couldn't duplicate. What I found out while having a beer with him is that he still doesn't know what is virtual destructor or why would you need it...
@CatPlusPlus TBH I would be more surprised if someone actually did read it. But I have to try. :-D
 
If you're really bored for like a year
 
3:43 PM
I probably will be... I literally have only one course to finish this year.
At least it will be hilarious to read in couple of years.
 
So the dealio with drinking is that you feel great when drunk and you feel depressed the day later. Now, I get it.
It's like the thing with MDMA that flushes all the happiness in your body and leaves you without when the effect wears off.
With "happiness" being those things that sometimes our brain naturally releases and make us feel happy.
Why am I saying this shit here?
 
why not
 
@Jefffrey Endorphins
 
it's science and we all love science
 
@Xarn Yes, those.
 
3:52 PM
In mathematics, a combination is a way of selecting members from a grouping, such that (unlike permutations) the order of selection does not matter. In smaller cases it is possible to count the number of combinations. For example given three fruits, say an apple, an orange and a pear, there are three combinations of two that can be drawn from this set: an apple and a pear; an apple and an orange; or a pear and an orange. More formally, a k-combination of a set S is a subset of k distinct elements of S. If the set has n elements, the number of k-combinations is equal to the binomial coefficient...
 
Endordolphins.
 
@Jefffrey I thought Endor was all forested?
 
@MartinJames Thats what the dolphins want you to think.
 
Oh god, not the ewoks, please
 
"A LEGION OF MY BEST TROOPS!" < "Cuddly little bears"
 
3:55 PM
They are actually cute, but I'm supposed to hate them in order to be an official SW fan.
 
I keep forgetting what strstr does.
 
The Ewoks themselves aren't really problematic, it's the part where they defeat a bunch of the Empire's best troops with no equipment or training that's problematic.
 
Like any true libc function, introduces 3 random vulnerabilities into your program
 
@MartinJames Endor is a gas giant.
 
@TonyTheLion Good start. Now work on forgetting all the other C 'string' calls.
 
3:56 PM
wtf
why did I go to Wikipedia to find out what strstr did.
 
@MartinJames Code I'm looking at is littered with them, so unfortunately I can't forget them yet
 
Because you're a butte
 
a buttcake.
 
The ewoks live(d) in what is only known as "the forest moon of Endor".
 
@MartinJames Agreed, if it thinks that strings are char* terminated with \0, then it is stupid.
 
3:58 PM
@Xarn In C a string is char* null terminated
 
Next bike trip: radreise-wiki.de/Elbe (just Prag-Berlin, not the whole thing)
 
so if a C style cast fails, does it just return NULL?
@R.MartinhoFernandes that's a lot of cycling, my feet hurt just thinking about doing that
 
C-style casts cannot fail.
 
@Puppy oh, so what if you cast something that's not castable?
 
Reinterpret
 
4:00 PM
inb4 compiler won't allow it
 
compiler error.
 
user3010322
@R.MartinhoFernandes I like how cycling in german is "Radreise"
 
user3010322
Looks like Rad Race
 
but in C most things are castable to nearly anything else.
 
eeeek
 
user3010322
4:01 PM
Eek?
 
user3010322
That's hawt.
 
user3010322
Squee.~
 
Assume C has no type system and it makes more sense
 
Oh good idea
 
@ThePhD "Reise" is travel and "Rad" is short for "Fahrrad", bycicle, from "fahren", to drive, and "Rad", wheel. Yes, "Rad" is short for a word formed from the word "Rad".
 
user3010322
4:03 PM
Aww.
 
user3010322
So it's Wheel Travel?
 
user3010322
That's exceptionally more boring. :c
 
No, bycicle travel.
 
it threw a std::boring_exception
 
your_momma_exception.
 
user3010322
4:05 PM
@R.MartinhoFernandes But Rad is wheel...
 
user3010322
Oh, except it's the short form of bicycle here.
 
user3010322
So I guess Bicycle Wins.
 
user3010322
So the colloquialism for bike in German is "Rad"?
 
user3010322
That's still pretty Rad.
 
4:06 PM
@ThePhD Yes.
 
Abandon all puns ye who enter here.
 
@Deduplicator I don't think a reference to an array of unknown bounds exists. At least g++ refuses to compile int a[10]; int (&r)[] = a;FredOverflow 12 secs ago
right?
 
it's called int*
you're right that you can't literally use a reference as in T&, but T* serves the exact same purpose here.
 
Big respect to people who wrote C in the early days. Imagine compiling your code and having to dodge a T-Rex simultaneously.
 
I disagree; they had it easy.
 
4:09 PM
This one I'll probably end in Berlin instead of starting; that way it is primarily downhill.
 
Fuck those people
Now we have to deal with that shit code
 
What does "wrote C" mean? Wrote C code? Or wrote the C compiler?
 
both.
 
I think both. While goto wasn't named as such in most assembly languages, the principle is the same - avoiding dinosaurs while avoiding code refactoring.
 
@TonyTheLion My estimate puts the stretch I'll do around 430km, which is more or less the same I did last time.
 
4:12 PM
welp, that's a lot of km
 
user3010322
IsNullOrEmpty should've been an extension method.
 
@TonyTheLion Prolly more like 500km once you factor in the getting losts.
 
@ThePhD What for
 
@MartinJames heheh
 
user3010322
@CatPlusPlus Just less typing / ease of use.
 
user3010322
4:15 PM
blah.IsNullOrEmpty() is less type than String.IsNullOrEmpty(blah)
 
OH NOES! TYPING THINGS
 
user3010322
OH WAIT STYLE COP WOULD COMPLAIN ABOUT THAT I have to use string.IsNullOrEmpty(blah) ._.
 
user3010322
Style cop has me afraid of my own typing.
 
typing is effort
 
@ThePhD Extension methods kinda have to work like instance methods.
 
user3010322
4:17 PM
@EtiennedeMartel Do they?
 
unless extension methods can be virtual, I don't see why you shouldn't be able to call them on a null this.
 
It's the principle of least surprise
 
user3010322
/// <summary>
/// Checks whether a given string is null or empty.
/// </summary>
/// <param name="str">The string to check.</param>
/// <returns>Whether or not the string is null or empty.</returns>
public static bool IsNullOrEmpty(this string str)
{
    return string.IsNullOrEmpty(str);
}
 
user3010322
I mean.. I think that covers things.
 
user3010322
It's pretty obvious what it will do. :c
 
4:19 PM
@CatPlusPlus Honestly, when it's named "IsNullOrEmpty", it's hard for me to see how being able to be called on null is a surprise.
hmm
if I throw an array out of bounds exception, I should include the array and the index.
 
user3010322
The typical convention is that C# throws if you call a method on null, though.
 
a convention that any extension method can choose to mimic if it wants to, if you permitted calling on null.
the user could not distinguish between the current behaviour and public static T method(this U obj) { ThrowIfNull(obj); return dostuff(); }.
hmm
should I automatically add location info to exception throw sites?
 
user3010322
Location info?
 
user3010322
Like.... line number, stack trace?
 
yes.
 
user3010322
4:22 PM
I dunno.
 
ah
I'll think about it later when I add debug symbols.
 
@Puppy You can, but there's a reason all LINQ methods throw an exception if you do that.
It's some kind of "best practice".
 
well, sure, I get that you probably shouldn't permit calling on null in the general case.
 
Don't use extension methods like they're static methods, you silly fish.
 
correct me if I'm wrong, but the whole goddamn point of extension methods is that they're static.
if they were instance, you'd just make them regular members.
 
4:24 PM
@Puppy Yes, but that's because every C# 3.0 features were compiler-only features.
The fact that they're static is an implementation detail stemming from how they couldn't (or didn't want to) change the CLR.
 
well, I'd argue that it's an interface advantage, when considering the possibility of methods like IsNullOrEmpty.
 
Also, it doesn't make sense.
An object is never null.
A reference can be.
Conceptually, it doesn't make sense to have an instance method "apply" on a reference.
 
forgive me if I'm missing something here
but in C#, it's totally impossible to ever have an actual object, you can only refer to them.
 
never
 
and every instance method I've ever seen used is used on a reference.
at least, ignoring structs/value types/whatevers.
isn't the whole point of structs/value types that for classes, you can only ever refer to them and act on references to them?
 
Xeo
4:36 PM
yay, time for Star Wars
 
Last one, I swear. 24 distinct kind of gifts (each kind has infinite amount of copies and every gift of the same kind is identical), 12 kids; in how many ways can I distribute the gifts so that each kid hasn't 2 or more copies of the same kind of gift?
 
(2^24) * 12.
 
I was thinking: for each kid you can give him 0 gift (1 possibility) or 1 gift (24 different possibilities), 2 gifts (24bin2 possibilities), 3 gifts (24bin3 possibilities), etc...
 
user3010322
What.
 
I always avoid problems like that by hating kids
 
4:39 PM
Which ends up with this: wolframalpha.com/input/…*+12
 
user3010322
Kid 0 has 24 choices. Kid 1 has 23 choices. Kid 2 has 22 choices.
 
@Jefffrey Model it in binary. 0 is "Didn't give gift", 1 is "Gave gift", one bit for each kind of gift.
 
@Puppy Yes, I get the same result: wolframalpha.com/input/?i=%282+%5E+24%29+*+12
 
so each kid has a 24-bit integer telling you which kinds he got.
12 24-bit integers.
oh wait, that's incorrect because the total number of ways of distributing it is 12 24-bit integers, which is 12 * 24 bits.
so 2^(12 * 24).
 
4:41 PM
@ThePhD wat
The choices of 1 kid do not influence the choices of another.
 
@ThePhD He has an infinite number of copies, so he can give the same gift to all the kids if he wants. The next kid doesn't have reduced choices.
 
All kids could get all 24 different kid of gifts
 
so yes, my original modelling was the simplest- 1 bit for whether X kid gets Y gift.
gives you 12 * 24 bits, which can store 2^(12 * 24) states.
 
user3010322
Ooh, each kid doesn't have 2 or more of the same gift.
 
at least they're not qubits.
 
user3010322
4:43 PM
So then you just get 0 or 1 of each of the 24 gifts.
 
@ThePhD yes
 
conveniently modelled as 1 bit.
 
user3010322
So an order-matters, all-permutations of a 24-digit bit string.
 
@ThePhD And from there one of my colleagues gave me this answer: (2 ^ 12) * 24
He says: "for each of the different kinds I ask all 12 kids if they want that kind or not (string of 0/1 for their possible answer)"
 
@Jefffrey Which is incorrect.
 
user3010322
4:46 PM
There's 2 choices
 
@Puppy Let me understand why is that correct so that I can explain it to him.
Because I don't really see the problem.
 
we all agree that, for each kid, you can represet their gifts with 24 bits.
so representing the gifts of 12 kids requires 12 * 24 bits.
 
yeah, it's a simple problem.
the hard part was finding it up there :P
 
or to put it another way
if you say (2 ^ 24) * 12
then you are saying, "Once I have determined the gifts for the first kid with my first 24 bits, then there are only eleven further states possible per state."
 
user3010322
2 choices for each of the 24 gifts, and each child has to make those 24 choices.
 
4:48 PM
that's blatantly not true because there are 11 kids left with 24 bits each that all need gifts.
 
@Puppy more like "each kid as 2^24 combinations of gifts, and there are twelve kids "
but I suspect there is meant to be more to that problem
 
@thecoshman No, that gives 2^(24 * 12).
 
@ThePhD no
 
@ThePhD Puppy's way is more like: each kid can set 1 in the corresponding ith cell of the 24 long bit string to define if they want the ith gift kind.
 
the total length of 12 24-bit integers is 12 * 24.
clearly.
 
user3010322
4:50 PM
I'm confused now.
 
So for kid #1 if we have: 001011... then he wants the gift kind C, E, F; but not kind A, B, D.
 
for every possible state of the first kid, the second kid can have 2^24 totally independent choices.
 
im not a number im a free butte
 
Found nearest bar..
 
4:51 PM
and for every possible state of the first two kids, the third kid can have 2^24 totally independent choices.
 
@Puppy maybe I said it wrong. each kid is 2^24, and it is that times twelve (as there are that many kids) which is what you said.
 
this leads to 2^(24 * 12).
@thecoshman It's totally and completely different.
(2^24) * 12 != 2^(24 * 12).
 
@Puppy that leads to 2 ^ 24 choices for each of the 12 kids which is: (2 ^ 24) * 12
 
@Jefffrey It's not that at all.
 
You lot still stuck on combinations of 24 items taken two at a time, (where the order does not matter)?
 
4:52 PM
it's (2 ^ 24) ^ 12.
 
wat
lol
 
user3010322
<_>
 
2^24 states for the second kid per 2^24 states for the first kid.
 
Are we clear that if we had 1 kid then the result would be: 2 ^ 24?
 
that's (2^24) * (2^24)
yes.
 
4:54 PM
yes
@Puppy exactly
No wait
 
user3010322
So just multiply that by 12 and there's your answer. <_>
 
@Jefffrey Which is (2 ^ 24) ^ 2.
 
@ThePhD Gosh
So much fail.
 
@ThePhD No! It's exponentiation by twelve.
 
user3010322
Oh, wait.
 
user3010322
4:55 PM
It's the possibilities over all
 
user3010322
Not for each kid.
 
yeah, puppys right. for every N combinations child one has, child two also has N. that's N*N, for 12 kids, that N*N*N*... or N^12
 
right.
 
user3010322
One whole set is all 12 kids
 
Fuck you all and your combinatorics I hate combinatorics
 
4:55 PM
or to put it far more simply, 12 kids can have 12 * 24 choices, 1 bit per choice gives 2^(12 * 24).
 
user3010322
@R.MartinhoFernandes Hey, I came to the right conclusion. D:
 
user3010322
So in other words, it's 24 bits for one kid, but one set is all 12 kids
 
user3010322
so it's 24 * 12 bits
 
16 mins ago, by Puppy
oh wait, that's incorrect because the total number of ways of distributing it is 12 24-bit integers, which is 12 * 24 bits.
 
user3010322
For one whole set
 
user3010322
4:57 PM
@Puppy "One whole set" is clearer! D:
 
the "integer" way of thinking about it is the best.
 
@Puppy that's not putting it simply though
 
it led me to the correct conclusion right away.
 
yes
puppy is right
3
if you see it my way it's like this
which gives the same result as his answer
 
@Jefffrey That is rare enough to be star-worthy! :-)
 
4:58 PM
:)
 
@JerryCoffin never!
 
@JerryCoffin I starred it but some fucker erased the star.
 
why are we talking about giving kids choice any way?
 
I demand a pin as compensation.
 
4:59 PM
@Jefffrey Woah, that's messy.
 
@Puppy Bribe me
 
@Puppy I don't respond well to demands.
 
@JerryCoffin You'll be hearing from my lawyer!
 
@JerryCoffin I feel there is only one way to deal with such demands, and threats
 
puppy is left
 
5:00 PM
no im left
 
@CatPlusPlus He can teach you the half wonders of wide
@CatPlusPlus no, you should have left
 
and you're all dick haha ha hha get it
 
@Puppy Oh good. My wife makes a great shark-fin soup.
 
user3010322
I don't get it actually.
 
oh gawd.
 
5:01 PM
@CatPlusPlus I... I should get in you!
 
@Jefffrey Though it seems hard to just ask WolframAlpha about permutations with repetition.
 
@thecoshman Do you mean a nice shirt for a child, or a shirt for a nice child (either way, you're wrong, but I want to be clear, unambiguous, and specific in how I tell you you're wrong).
 
Ell
@R.MartinhoFernandes quite the contrary imho
educating is necessary
 
@JerryCoffin I am using the ambiguity to cover both cases. It is a nice shirt, and it a shirt for nice children.
 
@thecoshman In that case you're wrong twice!
 
5:05 PM
So, he's left?
Wait, that's not how it goes.
 
No we've been through this
 
@CatPlusPlus I just need come out of you
 
@R.MartinhoFernandes Two wrongs don't make a right. Three lefts do.
 
Haha 'watched issues' is still broken on our Redmine instance
I wish we nuked that stupid thing
I finally learned how to use Trello
 
@thecoshman not funny, really.
 
5:08 PM
@R.MartinhoFernandes It's easier for me. If you think that for every guy you can give him from 0 up to 24 distinct gifts and for each of these cases you have different possible combinations (1 possibility for 0 gifts, 24 possibilities for 1 gift, (24 bin 2) possibilities for 2 gifts, etc...).
 
I think the binary model is the simplest by miles.
 
Oh well. It gets the job done so...
Anyway, thanks.
Also for some reasons I find SUM[ i = 1..24 ](24 bin i) == 2 ^ 24 to be fairly cool.
 
known binary fact :P
 
SUM[ i = 1..x ](x bin i) == 2 ^ x
p cool indeed
 
user3010322
@CatPlusPlus You did? I had been considering both Asana and Trello.
 
user3010322
5:23 PM
Mind telling me some about Trello? I've only registered and kicked around with Asana.
 
We still have one project that uses Redmine for client support
Everything else we've migrated to Trello
 
user3010322
How is it?
 
inb4 "not completely terrible"
 
@CatPlusPlus o_0 it's trivial
 
Better write std::string s = std::move(std::string(std::move("Hello"))); to be on the safe side. — FredOverflow 25 secs ago
Let's see if someone takes this seriously.
 
5:29 PM
@thecoshman It's weird
 
@CatPlusPlus you have notes, they are in stacks. done.
it's simple
 
'simple' as in doesn't make you do a hole load of shit, but has a hole load of shit if you need/want it
 
@FredOverflow Hmm...you think those suggestions about "(((x==true)!=false)==true)` are funny too, don't you?
 
Actually, Bar bar( std::move( Foo() ); does make sense, because Bar bar( Foo() ); is just a function declaration :) — FredOverflow 27 secs ago
@JerryCoffin Yeah, it really wasn't that funny. removed
 
5:33 PM
@FredOverflow Nice job, dear language.
 
@EtiennedeMartel shouldn't shops selling food that would otherwise not be sold reduce the overall cost as farmers yields will now have more profitable output?
 
@FredOverflow Oh, I wasn't saying you should do that. I think the ==true)!=false)==true kinds of suggestions are funny too... :-)
 
hmmm
I guess that, if you have an array of size X, and the integer type you're using to index into it is unsigned and the max value is less than X, there's no point in checking the bounds.
ah screw it, I'll let LLVM worry about that.
 
@Puppy Remember the primary legacy of Common Lisp standardization: "A sufficiently advanced compiler can cover up for [whatever inefficiency we're introducing here]".
 
true, but I think that in this case, you don't have to be a very advanced compiler.
I can code it myself trivially if it turns out to be necessary and LLVM can't handle it.
 
5:52 PM
@Puppy Certainly if you mean that your index is of a type with a maximum value <= X, then I think you're correct--it shouldn't take much, and LLVM can probably already handle it.
 
yep.
I figure that, if I name a function "UnsafeUncheckedIndex", it should be pretty damn clear to anyone what's going on.
 
I'm so tired someone I was interacting with thought I'm high.
I'm high on exertion.
 
lol
 
@R.MartinhoFernandes runner's high
 

« first day (1411 days earlier)      last day (3523 days later) »