« first day (788 days earlier)      last day (4160 days later) » 

4:00 PM
@R.MartinhoFernandes sqrt(1u)?
 
user142019
No fuck I do. ;_; Well reference counting it will be then.
 
@R.MartinhoFernandes Sorry, I wasn't considering literals.
 
What do race conditions have to do with reference counting?
 
@FredOverflow well also his minimal copy-input-to-output program only works in *nix
 
Why would you ever want to compute the square root of 1? :)
 
4:01 PM
@FredOverflow How else will you find out? Oh, wait..
 
@FredOverflow because you want -1
it is amazing that the roots of 1 (to various root degrees) form the unit circle
 
@gnzlbg is this worth buying? (is it C++11?)
 
i think that is something very deep,
 
TBH, I never realized that -1 can be implicitly converted to unsigned.
 
@BartekBanachewicz If you don't have the first edition, sure.
 
4:03 PM
@FredOverflow okey, I am eating potatoes to the end of december.
 
perhaps causing the pythagorean theorem rather than a result
 
@BartekBanachewicz Or I could sell you my old edition. Where do you live?
 
@StackedCrooked Fundamental types are as promiscuous as porn stars.
 
@FredOverflow Isn't the new one really required for C++11? In Poland.
 
What do you mean "required"? The old one certainly isn't C++11.
 
4:06 PM
@Bar
 
Shipping to Poland would probably be too costly, anyway. It's a heavy book.
 
@FredOverflow that's the point. I will buy digital edition, anyway
 
I can rent it for $42, or buy it for $50
 
@Collin $32.
 
Have fun. Eating potatoes right now, by the way :)
What exactly does it mean to rent digital books? :)
 
4:07 PM
@BartekBanachewicz kindle edition?
 
@BartekBanachewicz i haven't read the new edition so I can't say.
 
@Collin yup
@FredOverflow you can rent the paper one
 
@FredOverflow This one is renting the physical one
amazon ships it to you, you use it for you semester at school, and send it back
 
What if you do not?
 
@FredOverflow I've told my dad I'm short on cash for food in december, I think he won't mind if I'll buy a book for it.
 
4:08 PM
Can't you just order it from your library?
 
been here a while and haven't seen anyone with homework yet... what does one has to do to get some homework?
 
@BartekBanachewicz Here's an idea, your parents buy you the book for Christmas!
 
@gnzlbg you mean in questions?
 
Busted! http://math.stackexchange.com/questions/256816/if-n-the-order-of-a-group-and-gcdk-n-1-then-there-exists-an-element-in?__=650705013#comment562583_256816
 
no, i mean real school homework
 
4:10 PM
Haha, that processor busted him on two questions actually.
 
@gnzlbg what for?
 
It's near the top of Hacker News.
At this rate the processor is gonna get answer banned because he has 1 rep and is posting comments as answers and they're getting mod-deleted.
 
@FredOverflow I can just not give back the cash my parents will send me :P
 
Oh wow...
I see what's going on.
 
@Mysticial ?
 
4:12 PM
The professor DID probably get answer banned from posting those comments as answers.
So he created a sock. To post more comments as answers.
And now they're getting aggressively mod-deleted.
 
wooopsie.
"Andrei Alexandrescu, Ph %@! D" (actual citation)
 
I must not have enough rep for this
 
The professor has at least two accounts on Math.SE
all with no rep.
 
How do we know he's legit?
 
@FredOverflow We don't.
That's why the mods can only do what they're supposed to do.
 
user142019
4:13 PM
You cannot comment without rep so he cannot do much.
 
Delete non-answers.
They already converted two of them to comments.
One got linked on Hacker News.
Then cleared by a mod.
So here's the deal.
 
user142019
However, if the professor is not real, it’s an epic troll.
 
The professor probably has no evidence to link the name of the OP to the actual person.
 
user142019
For me they do. :P
 
So he's trying to get the OP to submit a confession letter by threatening him in comments.
 
user142019
4:15 PM
So if I did such things I’d be screwed to death.
 
*of course he can't post comments so he's posting them as answers- which are getting mod-deleted.
This is hilarious.
 
user142019
Not that I don’t call this school moronic on the chat, but oh well. I don’t really care.
 
@Mysticial i cannot see the deleted answer(s), nor do i know any group theory, but the question does sound like homework. contrived, trivial for the knowledgable, imperative form
 
And of course we don't know if the professor is real or a troll.
@Cheersandhth.-Alf I saw the answers before they disappeared.
And no, I don't have 10k on math.se.
 
0
Q: Giving a singleton a thread C++11?

Josh EliasI'm very new to threading and am trying to write my first app. This is the flow I was thinking of so far: At the beginning of my app detect the number of threads and spawn a pool of that size. I was thinking of having a one thread run in a loop for input for the entire lifetime of the app. Thi...

 
user142019
4:18 PM
What? Mysticial doesn’t have 10k rep on a Stack Exchange site?
 
What the fuckety fuck.
 
@Mysticial I don't know how it works in US/UK/Germany/W.e., but in Poland, even if the professor won't prove it, if he gets angry at the guy, he's going to have a bad time.
 
I don't even have a Math.se account.
 
user142019
oh lol
 
@BartekBanachewicz That's kinda the case everywhere.
Although in the US, you could bring it up to court for "damages" if you are "unfairly" treated.
 
4:19 PM
@R.MartinhoFernandes what does he mean by "assign thread to singleton"?
 
And why he is using thread and singleton in one sentence?
 
@BartekBanachewicz How the fuckety fuck should I know?
 
user142019
Richard Stallman*
 
@Mysticial You could try -- but if he's been around long enough to be a full professor, chances are pretty good that he can come up with reasoning that will be nearly impossible for a student to beat.
 
@JerryCoffin Professors have a lot of influence to "scare" the student.
 
user142019
@BartekBanachewicz haha cool
 
@BartekBanachewicz Why is he using the word "singleton" at all without apologizing? (and yes, I'm sorry).
 
But if there if there really is no evidence of a link, and the student doesn't fall for the traps. Then it's possible.
 
user142019
Java makes me poop.
 
4:22 PM
You also have to consider the case of the actual cheater framing another student.
The professor should be aware of that as well.
 
@JerryCoffin I got fcked on tech talk in recrutation when the guy asked me about Meyer's singleton
 
So the prof better make sure before he picks on someone.
 
user142019
valgrind y u no Mountain Lion.
 
@R.MartinhoFernandes LMAO
"windows-1256 character set? Dude..."
"Are you sure, like, really really sure, you want JavaScript 1.2?"
 
4:26 PM
@R.MartinhoFernandes What.
 
@Griwes did you see the first one? :)
 
I don't think so.
 
@Griwes It was for Wordpress, IIRC
 
@Griwes Yes, people are that stupid...
Go figure.
 
1911990 xD Please use sha512 xD
I don't get it. Someone's intelligent enough to learn at least basics of coding (which most of society can't), yet still so dumb to act like this
 
Why hello friends
 
template<typename ForwardIterator>
std::map<typename std::iterator_traits<ForwardIterator>::value_type, size_t>
count_elements_(ForwardIterator begin, ForwardIterator end)
{
    std::map<typename std::iterator_traits<ForwardIterator>::value_type, size_t> result;
    for (; begin != end; ++begin)
    {
        ++result[*begin];
    }
    return result;
}
 
@BartekBanachewicz What?
 
4:32 PM
^ Any way to simplify this, especially the lengthy type declarations?
 
Why are you making these assumptions?
These are script kiddies, and bad ones at that.
 
@R.MartinhoFernandes yet still, i believe their hacks would at least try to work
(nvm)
 
That won't work for the return type.
 
@FredOverflow Add a defaulted template parameter.
 
But hey, I can replace the declaration of result with decltype(count_elements_(begin, end)) result; :)
 
4:35 PM
template<typename ForwardIterator,
         typename Result = std::map<ValueType<ForwardIterator>, size_t>>
Result count_elements_(ForwardIterator begin, ForwardIterator end)
{
    Result result;
    for (; begin != end; ++begin)
    {
        ++result[*begin];
    }
    return result;
}
 
Oh, nice. What's the name of that pattern? :)
 
template <typename Iterator>
using ValueType = typename std::iterator_traits<ForwardIterator>::value_type;
 
@R.MartinhoFernandes oh, funny enough, it was quite similar to what I wanted to do.
 
@R.MartinhoFernandes Part of your library?
 
Not sure.
I think I haven't extracted it into it yet.
@FredOverflow Never thought of naming it.
 
4:40 PM
@R.MartinhoFernandes why does that happen?
 
Because you did not pass an argument to it?
 
why hello friends
 
Seriously, is this why you people complain that GCC error messages are bad?
> error: invalid use of template-name ‘uT’ without an argument list
Seems pretty clear to me.
 
@R.MartinhoFernandes uT<T> does not work. Remember, I'm still years behind unfortunately
Or am I missing something terribly stupid?
 
4:43 PM
Oh for fcks sake. Terribly stupid (I am)
My code won't work, the computer must hate me.
 
@R.MartinhoFernandes That looks confusing.
 
Let's go shopping.
 
@BartekBanachewicz New computer?
 
@StackedCrooked It's perfectly what I was trying to do
@StackedCrooked Nah, I was just expressing my non-knowledge of C++
anyway It's great that you've made sure that non-breaking space is read right to left, your readers would have been screwed otherwise.
 
4:47 PM
:)
 
Where is that from?
 
Where else could it be from? I'm still laughing (enter on behalf of shitty logitech keyboard instead of my BlackWidow)
 
Anyone familiar with third normal form in databases?
 
4:49 PM
Dude.
 
yesterday, by R. Martinho Fernandes
room topic changed to Lounge<C++>: If you come to annoy us with your homework, duck you. [c++] [c++11] [c++-faq]
 
@Crowz Something about transitive dependencies?
 
Aww yeah, dim sum on the company's dime.
 
@FredOverflow I don't know what is
 
@R.MartinhoFernandes Duude.
 
4:52 PM
@BartekBanachewicz What?
 
@R.MartinhoFernandes was in connection to the previous "Dude" by stackedcrooked
 
@Crowz "Every non-prime attribute of R is non-transitively dependent (i.e. directly dependent) on every superkey of R."
 
@FredOverflow Duuuuuude.
 
Aren't data bases fun? :)
 
I think I really need to get the fuck out of here
 
4:54 PM
@FredOverflow That seems very mathematical. I dunno.
 
> A memorable statement of Codd's definition of 3NF, paralleling the traditional pledge to give true evidence in a court of law, was given by Bill Kent: "[Every] non-key [attribute] must provide a fact about the key, the whole key, and nothing but the key."[6] A common variation supplements this definition with the oath: "so help me Codd".[7]
@Crowz Data base theory is quite mathematical.
 
@FredOverflow Almost as good as bamboo under your fingernails.
 
So, I'm talking to the colleague I will be working with, and I'm like, C++ is kewl, do you do much C++11 here? and he is like I dunno, I like Java. And I'm like, yeah, I think about you folks every time I overload an operator.
 
When was the last time you overloaded an operator?
 
Today, when I wrote an iterator.
 
4:57 PM
@FredOverflow yesterday? ( I wrote that cryptic bitset coder )
 
I never wrote my own iterator, except for toy examples.
 
Actually, I am lying. I write iterators with boost's iterator facade, so I don't overload operators meself.
 
@BartekBanachewicz Is is cryptic because of the overloaded operators? ;)
 
@FredOverflow I am soooooo tired of doing it.
 
@FredOverflow It's cryptic because it just adds additional row and column to bitset of size n squared, and fills it with parity
 
4:58 PM
@FredOverflow Don't like
 
That said, I don't think about Java devs THAT much
 
Why does everyone bring up Java's lack of operator overloading when it's the fucking crap generics that is the real issue?
 
Forgot to set the font color to blue and underline it, to make the "click here" work...
 
@EtiennedeMartel Because lack of overloading produces results that are more visible?
 
k, im going home. Doubt will get in today, so see ya till 2morrow.
 
5:02 PM
@JerryCoffin Actually, I guess the main reason is that C++ programmers don't use reflection, so when they come to Java, they don't realize that reflection doesn't work on generics and instead focus on the operator overloading.
 
I don't care that much about operator overloading. Sometimes it is nice, sometimes it is ugly. For example, + is much nicer than add, but << is much uglier than a simple toString.
 
@EtiennedeMartel Wut.
 
Yeah, I'm not making lots of sense here.
 
Reflection does not work on generics?
 
Not in Java.
 
5:03 PM
There are no Generics at runtime in Java.
 
Generics are type erased in Java, didn't you know that?
 
For example, you cannot create an array of T :(
 
You can still reflect on them.
 
How?
 
With .class as with anything else.
 
5:04 PM
If T is a generic type, you cannot do T.class.
In C#, you can do typeof(T).
But the Java equivalent does not work.
 
@EtiennedeMartel You mean a type parameter
 
@R.MartinhoFernandes Yeah, that's what I meant.
 
ArrayList.class works fine.
 
@R.MartinhoFernandes List<String>.class is just List in Java, the String part is gone.
 
That's far from claiming it does not work.
 
5:05 PM
It feels half assed.
The way they implemented it.
 
@FredOverflow Giving you anything else would be silly because it would contradict the actual behaviour.
 
Care to elaborate?
In C#, you can ask a List what T is, and you cannot in Java. That's all we're saying, right?
 
user142019
Isn’t List an interface in Java?
 
So? It's still a type.
 
@Zoidberg'-- Same thing happens with ArrayList.
 
5:08 PM
@FredOverflow What type would be List<?>.class?
 
@R.MartinhoFernandes Haven't done Java Generics in a while, I don't know, sorry.
 
Ah, found it.
Shut up about it.
@FredOverflow You can in Java too.
 
@R.MartinhoFernandes Nice patch they got there.
 
user142019
I hate Java generics. You cannot even use them with primitive types.
 
5:11 PM
@EtiennedeMartel It's not a patch. It has been there since 1.5, which is when they introduced generics.
You guys make me feel ashamed that I know so much Java.
3
 
@R.MartinhoFernandes Wait a minute... how do you know so much about Java?
 
user142019
TIL that if it’s 17:43 and I go to the frontside of the train there is actually place to sit.
 
Still, you cannot say new T[42] or x instanceof T or overload on List<T> and List<U>.
 
This one works in Germany.
 
user142019
Rage against the JVM.
 
5:14 PM
Rage against the machine tought you Java?
 
@FredOverflow I used Java a lot in university.
 
user142019
This bottle of water says it contains Ca++.
 
user142019
Free promotion if you call your proprietary language Ca++.
 
@FredOverflow "Know Your Enemy"
:P
 
Ok ok, I get it :)
 
user142019
5:17 PM
You feel ashamed you know so much about Java? Then I hope people won’t ever ask me things about Objective-C in here.
 
What is so objective about it, except its suck factor?
 
user142019
The Objective-C layer is object-oriented.
 
user142019
It has classes and interfaces and inheritance. :P
 
user142019
They call interfaces “protocols” but whatever.
 
user142019
Oh God, this train’s Internet connection is terrible.
 
user142019
5:22 PM
 
@FredOverflow What I meant was: you can write new ArrayList<?>() (or something like that). With this .class cannot work as you desire, nor can you use on the T in the implementation of ArrayList, because there isn't one.
 
user142019
Dutch railways y u German ISP.
 
5:38 PM
hey, doesn't it say "telekom dutchland"
 
Oh wait.
Here assuming it the same person as this one
 
"Reynolds has said that he does not plan any further work in the universe of Terminal World" :(
 
5:47 PM
@StackedCrooked :) (So I am actually in two, ooops)
 
I would be interested in that.
 
6:10 PM
what humours me more is that he actually has an idea as to how to automatically convert one from a C compiler written in an LLVM-able language.
 
@StackedCrooked If emscripten does what it says on the tin, and clang/llvm are self-hosting... shouldn't it be just a matter of building it?
shudder
 
@je4d I guess.
 
@StackedCrooked I'm sure there's a good reason why it wouldn't work OOTB
 
It would be big.
 
not to mention slow
 
6:14 PM
Make it a C++ compiler and nobody will notice a difference
(Also it wouldn't be that much slower probably)
 
would you guys say C is a simple language?
 
No.
 
@bamboon Define "simple language". It's much more complex than Pascal, but much simpler that English.
 
@JerryCoffin ^^. I mean in terms of complexity. How many gotchas are there etc... How many features does the language have.
 
It's definitely primitive.
It's also not expressive at all, and full of corner cases and silly design
Some of those points matter for implementation, some for use
 
6:26 PM
@bamboon It's a minefield. Think of C++, but with far fewer features, so everything you do involves all the areas you'd normally stay away from in C++. Just for example, just to read in a string safely, you're pretty much stuck defining and implementing your own code for a dynamic string.
 
user142019
6:58 PM
Crap. I need a template lambda.
 
You're shit out of luck
(Well, not really, there's Phoenix)
 
@bamboon there's very few gotchas, it's like building a castle from legos. Lots of freedom. Lots of code. Lots of places for mistakes.
 
user142019
template<class R, class... Args>
void foo(R(Args...) g);
// or something like this, but I have no idea how to do that
 
user142019
I know how to do it with class templates, but not with functions. Or is it impossible?
 
Xeo
template<class F> void foo(F f); ?
 
user142019
7:03 PM
No, I need the return type and argument types later.
 
decltype(f()) is return type
What do you need argument types for?
 
user142019
The return type is no problem, but the argument types is difficult because it’s variadic.
 
@StackedCrooked I can't seem to make that fit in my head. Martinho is a robot.
 
user142019
@CatPlusPlus For the argument types of a lambda.
 
Xeo
What Cat says, there are not many good reasons why you'd need parameter types.
@Zoidberg'-- Really, if worst comes to worst, go with a non-local class.
 
user142019
7:05 PM
@Xeo Of course. You’re awesome.
 
user142019
No wait. How would I do that with variadics?
 
Xeo
Do what exactly?
 
user142019
template<typename Signature> struct baz;
template<typename Ret, typename... Args> struct baz<Ret(Args...)> {
    using R = Ret;
    using Args = Args; // ???
};
 
@Zoidberg'-- same way you do it with variadics? Variadics don't change anything here, except that you can use decltype(f()) to get the return type.
@Zoidberg'-- what do you need Args for? You don't need that.
 
Xeo
@Zoidberg'-- Well, except that you don't typedef Args.
 
user142019
7:06 PM
@MooingDuck return f([] (Args&&... args) -> R {
 
@Zoidberg'-- what does should the lambda do?
 
Xeo
I think I'm missing the context of this whole discussion.
 
user142019
I’m trying to write a function that allows me to pass a capturing lambda as a function pointer to a C function. The only requirement is that it’s called synchronously, and it may break std::current_exception. stacked-crooked.com/view?id=2fb21c6babe1275a650e4812466d57f9
 
template<typename Ret, typename... Args> struct baz {
    Ret operator()(Args...Vs) const
    {return function(transform(Vs)...);}
};
 
user142019
I know my code sucks, and maybe it’s impossible what I’m trying to do. :P
 
7:09 PM
@Zoidberg'-- a functionoid or a function-pointer? Because function-pointers can't have state, and are thus very easy or impossible.
actually... is it?
 
user142019
I’m using exceptions and std::current_exception to carry that state.
 
Xeo
@Zoidberg'-- You need to keep state on the heap at a specific place for that, don't you?
@Zoidberg'-- are_you_serious.jpg
 
user142019
@Xeo not if the C functions don’t store the function pointer anywhere.
 
@Zoidberg'-- what is the prototype for the C function? Or do you get to decide that?
 
7:13 PM
Don't use exceptions with C callbacks for anything
Just put it in global std::function
It's much less horrible than whatever you're doing right now
 
user142019
Ah you’re right.
 
user142019
This is terrible.
 
@Zoidberg'-- why do your C functions have templates?
can he do that? It's specialized, so it could be a C-compatable function...
 
user142019
Of course. I can use a thread-local std::function!
 
7:18 PM
std::stack<std::function>
else it's non-reentrant
 
@EtiennedeMartel "Anal Sex: The Complete Reference", by Herbert Schit.
5
 
@JerryCoffin Interestingu.
 
"Safeseach off" got removed :(
 
@Pubby No way would they make it impossible to search for adult content.
 
@DeadMG The shortcut has been removed, you can still switch Safesearch off in the Search Settings page. :)
 
7:34 PM
In order to use search settings you probably need cookies or logging in, fuck that
 
@Pubby what was safesearch actually?
 
@bamboon Censors image results so you don't get porn or gore
Probably other offensive stuff is blocked too
 
@bamboon Google's attempt at placating the "think of the children" types, would be my guess.
 
@Pubby ah ok
@JerryCoffin well, but I think it would also be good in office
 
@JerryCoffin Na, they'll just go to porn sites instead to learn about "human anatomy". Much better.
 
7:37 PM
@bamboon Depending on the office, yeah, I suppose.
 
Who want's safesearch anyways?
 
user142019
People who need to use Google Images at work.
 
Who's that
 
@Pubby I seem to recall reading of at least some of those blocking quite legitimate medical sites and such. Not sure if Google's was among those or not though.
 
@TonyTheLion I always turn it off at work for extra thrills.
 
7:39 PM
heheh
 
user142019
I have a new pair of pyjamas.
 
Because life isn't exciting enough as it is.
@Zoidberg'-- Do they have cute animals on them?
Cute animals are cool.
 
user142019
@EtiennedeMartel they are plain and striped blue.
 
pyjamas are what van rossum wears. The correct spelling is pajamas!
 
user142019
7:41 PM
Which of the one thousand Van Rossums?
 
Guido
 
user142019
He is also Dutch, maybe that’s why.
 
user142019
Pyjama is the Dutch word for pairs of pajama.
 
since when are pyjamas spelled pajamas
 
user142019
@melak47 since Oxford Dictionary.
 
7:43 PM
@EtiennedeMartel I always thought one animal on the pajamas was the right number. Specifically, one female animal sitting or laying on the pajamas, and working at removing them.
 
user142019
No wait.
 
Actually, the original spelling was "paijama"
 
user142019
@Pubby merkin.
 
user142019
pajamas
plural noun
US spelling of pyjamas.
 
@JerryCoffin Are you refering to homo sapiens?
 
7:44 PM
Okay, has anybody here used cpplinq or a comparable library and can comment on that?
 
@EtiennedeMartel Of course.
 
I don’t want to write loops
 
ah, US spelling. pfft
 
Wait, so how do you pronounce "pyjamas"? pie-jamma or pahh-jamma?
 
7:45 PM
pih-jahma
 
p'jama
 
@Pubby I pronounce them "underwear".
 
PJs (if I may chime in)
 
user142019
Is your answer to this question a lie?
 
@EtiennedeMartel you wear pyjamas under your regular clothes?
 
7:47 PM
@melak47 No, I mean I sleep in my underwear.
 
How barbaric!
 
why would you do that?
 
Why wouldn't I?
 
bceause then you have to wash additional underwear
 
What
On the second thought, don't answer
 
7:49 PM
lol
I burned my mouth
 
That'll teach ya.
 
That filthy mouth.
 
fuckshitballnuggets
 
PJs (regardless of how you choose to spell the name) are a throwback to sleeping on dirt next to a fire. Given the comforts of civilization, why would you wear clothes in bed?
 
user142019
I never sleep in pyjamas. I sleep in my underpants.
 
7:57 PM
@JerryCoffin That said, sleeping naked is uncomfortable.
 
buy better quality bedding
 
user142019
Sleeping is only comfortable in underpants.
 
Naked is more comfortable
 

« first day (788 days earlier)      last day (4160 days later) »