« first day (832 days earlier)      last day (4342 days later) » 

user868935
22:01
Tough crowd
user142019
Okay I got a mining pit.
user142019
Now the pipes. :P
@EtiennedeMartel this was one of my lattest heartbreak in music. A mix of dark-ambient, and post-rock. It's soft. Hope you like it. AUN - Return To Jupiter Jazz . youtube.com/…
i find that ppl in university already know me -.-
"i know that dude. he's litb"
I don't like to be a "C promi" :/
user142019
xD
22:08
FINALLY I GOT BEER.
i got mexican vodka
johannes
user142019
Let's see.
you're an incredibly annoying pedant
user142019
I need to get some power for my mining machine.
22:09
want to look over my proposals to WG21?
@DeadMG The gloves are off!
user142019
Redstone motor.
@DeadMG lol
@DeadMG why am i an incredibly annoying pedant
what did I do
@JohannesSchaub-litb thousands of things. He's asking for your help for being pedantic and knowledgable. (in his own, insulting way)
every quiz you ever give is based on some very obscure Standard clause that virtually nobody ever uses
user142019
22:10
Steam motor looks better.
@Zoidberg How does that work?
Does it need fuel?
user142019
I don't know.
user142019
Probably water and coal?
lol @DeadMG
and with @Non-StopTimeTravel picking the quizes up
22:12
@Zoidberg Redstone engine don't require anything, it seems.
user142019
Redstone. :P
@EtiennedeMartel I can tell you all about engines :)
@LucDanton Yeah, please go ahead.
Because currently we don't have that many resources available.
Redstone engines are too weak to power most machines
I recommend a steam engine as a starter engine
user142019
Fuck.
user142019
22:14
I need normal wooden planks.
@JohannesSchaub-litb So, want to cast your pointlessly pedantic eye over my proposals?
Please do not cook all the ores into their respective bars.
user142019
Not that green wood. xD
@DeadMG yes lemme see them
@Zoidberg I think I saw a forest on the other side of the desert.
22:15
please, I promise not to do quizzes about them later when they are accepted in the IS
(If you look toward the wheat farm)
Also can you please light up the nether portal :p
@LucDanton lol, you still trapped?
Why do we need a nether portal again?
22:16
@EtiennedeMartel I'm doing magicks!
What :(
Infernal brick will also come in handy.
@DeadMG ah you are the wolfenstein guy
still bothering you with music links... (indie pop rock) Arcade Fire - Ready To Start: youtube.com/watch?v=9oI27uSzxNQ
unfortunately I am a noob on the Standards library
22:19
Today I received systematic feedback on my lecture. Turns out 94% of the students think I treat them very nicely :)
your best bet is IMO Daniel Krügler
@StephaneRolland Ah, yeah, Arcade Fire. They're from Montreal.
@JohannesSchaub-litb you saying you're noob, I must be missing something ?!
@DeadMG the committee considered allowing "extern "C"" alias templates
so that one can do externC<R, P1, P2, ..>
or extern<R(P1, P2, ...)> should be possible too then
unfortunately I don't know whether it was accepted or rejected or posted to evolution
@EtiennedeMartel and they play a lot of things powerful that I like. They're from quebec, french talking ? no ?
user142019
22:21
oooh NPC village
@StephaneRolland English-speaking side of Montreal.
They can probably speak French, but I heard they are incredibly snobbish.
@EtiennedeMartel i love them nonetheless
user142019
Here they have the wood I want.
@Zoidberg You're going to break their houses down?
22:23
@Luc Whitelist me on MC. "eue".
@DeadMG note that the assertion in the DR was found to be wrong. they do have linkage and can be used as template template arguments, so they end up in the mangling, IIRC
user142019
Oh FUCK.
user142019
I know why I couldn't make pistons.
user142019
I had tin ingot instead of iron. T_T
@R.MartinhoFernandes Firing up the client. takes some time. Do you have yours btw?
@JohannesSchaub-litb Ah, yes, but name mangling is irrelevant here. The function pointed to will never have a name.
Awesome, thanks.
You didn't wait :p
@FredOverflow now make that a 100
;)
Dead Can Dance - Sanvean : ttps://www.youtube.com/watch?v=6WdYe8Z98OI
22:29
eue?
just one of my prefered song
@Zoidberg I hope you're doing all that in our hole in the ground.
(Which I shall name "The HQ")
@R.MartinhoFernandes Oh yeah and you'll find the flint and steel in the double chest :p
user142019
Well, actually. :P
I didn't know Minecraft had pistons and steam engines.
22:31
@LucDanton Here's a tip: on both side of the portal, put a chest containing flint and steel.
@DeadMG mods. The lounge server is modded with so much stuff it's not minecraft anymore
huh
@EtiennedeMartel Waste of resourceqs
@MooingDuck Pistons are in the vanilla MC.
user142019
Pistons suck. :P
22:31
are all of you guys playing minecraft now?
@LucDanton Don't tell me we're that short on flint and iron bars and wooden planks.
@EtiennedeMartel THE STEAM ENGINE ISN'T
@DeadMG one could argue that it is a pity that your type cannot be converted to an extern "C++" function pointer on pedantic implementations
@bamboon I'm working
@MooingDuck I LOVE YOU
22:32
@JohannesSchaub-litb I didn't realize that extern "C++" actually existed.
@MooingDuck wait, were do you live?
@bamboon Western USA, it's 2:30p here
ah washington
it's going to revert an enclosing extern "C" but is otherwise the default
@bamboon well, yes
22:32
oh, so a normal function pointer.
so if someone does void(*p)() = theBoundFunctionObject; it will fail
because there only exists a conversion to extern "C" function pointers
that is true.
however, adding both conversions would surely result in a nasty ambiguity in some cases.
just adding another operator for the c++ function pointers is not enough
not to mention the need to generate more code
beause that would prevent calling the bound_function object directly (resulting always in an ambiguity)
22:34
@EtiennedeMartel We are short on flint
@JohannesSchaub-litb with std::bind isn't it possible to convert anything to extern C++ function pointer ? I'm just asking I don't know, I only think so.
@LucDanton Time to dig through gravel.
@EtiennedeMartel I can't, I'm in the nether!
@JohannesSchaub-litb Not sure I'd care that much, to be honest.
or alternatively, I could simply add an operator() overload.
@LucDanton Oh, right.
Can't you lure a ghast to open fire on the portal?
22:35
so to prevent that ambiguity, one could add a operato() like template<typename ...T> Ret operator()(T && ...t) const { Ret(*p)(Args...) = *this; return p(std::forward<T>(t)...); }
@EtiennedeMartel Dunno tbh
@DeadMG that's true, it may not be worth the effort
but a good proposal will explain this decision
@StephaneRolland no that's not possible
@JohannesSchaub-litb so I must be missing somthing. I lack the comprehension for most what you are all saying here right now.
I lie, the Standard Library offers concurrency guarantees for all SL types.
@StephaneRolland bind results in a function object, not a function pointer.
22:39
@MooingDuck but I use std::function just like function pointers, where I am mistaking ?
on the other side, if you provided an extern "C" conversion, trying to call a function that is overloaded for both function pointer kinds will given an unavoidable ambiguity so it may not be a good idea :)
@StephaneRolland function objects can be called, just like function pointers, but they are not function pointers. std::array can be used like a regular array, but it is not a regular array.
@JohannesSchaub-litb That had occurred to me.
@bamboon You can never satisfy everbody I guess...
@StephaneRolland std::function is a type that has operator(), so you can have my_function() and it calls that member function of the object.
22:41
@MooingDuck but a function pointer is a function object
@StephaneRolland std::function can be one fuck of a lot more.
@JohannesSchaub-litb yes, but try not to be confusing
6
A: What is the difference between function pointers, function object, and lambda functions?

Johannes Schaub - litbfunction object: An object f that you can call with the f(x) syntax. This includes function pointers, class objects having an overloaded operator() or conversion function to a function pointer/reference. The Standard has a straight forward definition of it A function object type is an objec...

a  = b   // assignment
a == b   // comparison
a += b   // assignment
a <= b   // comparison
a<<= b   // assignment

Make up your mind, C!
@FredOverflow that's right. I think 94% is actually pretty darn good. I even assume your students don't even value it enough what it means to have a teacher who knows that C++ is more than OOP.
22:42
@all don't wan't to distrub your reflexion. But if one can point me to a link to read to understand the difference between a std::function and a function pointer, I would be grateful.
@StephaneRolland Johanes just did...
@bamboon Actually, I didn't teach any OOP. Besides calling member functions on standard library facilities. But I never talked about encapsulation, inheritance or virtual functions.
he was faster than my typing
@StephaneRolland std::function is a function object that can hold arbitrary callable objects, whereas a function pointer is a function object that can hold only functions.
@FredOverflow what else did you teach them? Was that a beginners course or more advanced?
22:45
@bamboon Total beginners without any prior experience.
But we did manage to write a generic quicksort in week 12 :)
@FredOverflow did you go the conventional approach or the Koenig/Moo way?
@bamboon What is "the conventional way"?
Bad news. char const[] matches both <T[]> and <T const>. — Johannes Schaub - litb 48 secs ago
@JohannesSchaub-litb I think you should seriously consider renaming yourself to "templitb".
@FredOverflow teach "new" before vector
22:49
@bamboon I taught neither dynamic memory management nor pointers. But I did teach vectors, of course.
@bamboon lolno
@DeadMG errm what?
always teach vector before new[].
@DeadMG please give a link that explain the difference between a callablable thing, and callable function. My mind is short circuitung.
22:51
@DeadMG that's my opinion, too. I was just telling fred how I define the conventional way.
@StephaneRolland A callable thing can be any object. A callable function can only be a function.
@bamboon Depends on who's convention.
but std::function can only be function, unless they are std::bind which hide the calling on an opaque object ? no ?
no.
it can be any callable object
:-)
oki
sorry
lambda, bind result, function, functor, anything.
that's why it's the far superior choice
22:53
just give me something to read and learn please
i miss something
that one, and the next one, and the next one.
thx a lot, i go for your two links
@StephaneRolland a function pointer is a always a function pointer. That's straightforward and you seem to understand that. A function object is an object that can be called as if it were a function. std::function is itself, a function object (it's clearly not a function itself). A lambda is also a function object, not a function. std::function can store any callable object, including function objects or function pointers.
@MooingDuck i read what you wrote twice. It still doesnt make sense for me. In the assembly code I imagine I must be wrong. I must read again the two links I have been given tonight. Obviously I block somehwere. I'm gonna try to fix that. Thanx for your help.
23:08
@StephaneRolland oh assembly? Alright, let me try again.
@MooingDuck just do it theoritically
@MooingDuck I just imagine assembly code, I don't master it
@MooingDuck just like the debugger show me it
@StephaneRolland a "function object" is two parts: a function, and a block of variables. When you call the function object as if it were a function, it calls that function, and additionally passes a pointer to the block of variables, so the function has a block of variables associated with it. If you have two instances of the "function object", they share the same function, but each has thier own block of variables.
imagine a function object that the first time you call it, it returns zero, and then one, and then two, and then three, etc. It needs to "remember" where it was last, so it stores that number in it's block.
You can have two copies of that function object, and they count independently, because they each have their own block of variables.
more presicely a function is an adress, and the the additionnal thing you are talking of are registers
no.
23:14
the additional variables are arbitrary blocks of memory.
not registers
@StephaneRolland no, not registers. It's a struct in memory somewhere. It's probably on the stack somewhere.
and when ther are called they are not input as registers, oh my god I'm a noob
don't loose your time, I'm understanding i lack something
I got a performance warning for converting an enum class: bool to a bool. Sigh.
Meh, MSVC.
@DeadMG I prefer it[1] to *(it + 1) nowadays.
@AndreiTita Well, the compiler probably does x == true ? true : false internally ;)
@StephaneRolland how's this: ideone.com/F5UEgw
@MooingDuck Thnaks, I keep you link... Don't bother to much with me now, you've been been really kind with me. I am just trying to face what I am missing. I have things to learn. I won't do it right tonight.
@MooingDuck i just bookmark all things i need to read as soon as possible.
@StephaneRolland k. sorry it's confusing :(
@MooingDuck no you're not confusing, it's just that I don't know about this, it's still difficult so. I'm glad you told me.
@MooingDuck thx. good night.
23:30
guise guise
I just realized my tree-based-vector doesn't balance if an exception is thrown during insertion/erasure. That seems bad.
I wanna start a bounty but I'm afraid the question might get closed
what do?
0
Q: Can lambda functions be recursive?

FredOverflowHere is a plain old recursive function: int fak(int n) { return (n <= 1) ? 1 : n * fak(n - 1); } How would I write such a recursive function as a lambda function? [](int n) { return (n <= 1) ? 1 : n * operator()(n - 1); } // error: operator() not defined [](int n) { return (n <=...

hmm, I begin to see why other languages have finally. I have lots of try {X; Y;} catch(...) {Y; throw;} in my code.
16
Q: Recursive lambda functions in c++0x

weimai am new to c++0x, so please excuse me if my question is silly :). i am writing the following recursive lambda function, it doesn't compile. sum.cpp #include <iostream> #include <functional> auto term = [](int a)->int { return a*a; }; auto next = [](int a)->int { return...

23:33
I guess I could create some sort of object who's destructor calls Y, but that seems equally silly.
11
Q: Recursive call in lambda (C++11)

NawazWhy can't I call a lambda recursively if I write it as: auto a = [&] { static int i = 0; i++; std::cout << i << std::endl; if (i<10) a(); //recursive call }; It gives compilation error (ideone): prog.cpp:8:18: error: '((const main()::<lambda()>*)this)...

@MooingDuck wait, so the finally is a MS extension?
Now playing in your local theater: "The Dupe Detector", starring @LuchianGrigore
@LuchianGrigore it's part of CLI
@FredOverflow nah, whenever I find an interesting q I can't answer, I google :)
Does the standard dictate what should happen if you define an enum value outside the range of the underlying type, or is it implementation-defined?
23:37
My guess would be modulo arithmetic for unsigned types and UB for signed types.
@MooingDuck Why?
@FredOverflow I thinks it's more complicated, I think it's IB for the range of whatever the underlying type is, and compiler error for things outside that range.
@FredOverflow Case in point: stacked-crooked.com/view?id=31dc64aaabfd80cd7bcad408107d5226 (GCC errors, MSVC warns)
Do you have so many unique cleanup actions?
try {
    insert(stuff);
    balance(stuff);
} catch(...) {
    balance(stuff);
    throw;
}
23:39
@AndreiTita Why are you using std::endl?
@R.MartinhoFernandes it's in four functions, but It feels dirty
@AndreiTita I think you just get an error.
@MooingDuck If it appears more than once, it feels dirty to DRY it?
@FredOverflow Why are you looking at the not relevant part of the code? xD
That's just me :)
23:40
@R.MartinhoFernandes an object who's only purpose is to rebalance the outside container seems wierd. I guess that is cleaner though.
@LuchianGrigore Like I said: MSVC gives a warning, GCC gives an error, I want to know which one is non-standard, if any.
@AndreiTita I'll look it up
sweet dreams
@EtiennedeMartel I need so much sand, not even funny :(
§ 7.2/5 "if the initializing value of an enumerator cannot be represented by the underlying type, the program is ill-formed."
23:43
@MooingDuck Thanks.
@AndreiTita I'm still reading, there might be more...
there's more, I'm still trying to interpret it
@MooingDuck don't. It's the standard, not the bible.
there's some bizzare rules for enums who's underlying type is not fixed, but I can't find a situation where the underlying type isn't fixed. (it says that the type for enum A {b,c} is fixed, so that's not it)
@LuchianGrigore so crusades are fine, but we can't have a compiler war because of different standard interpretations? :p
it also seems to be the case that if the underlying type isn't fixed, the enumerated values don't have to be the same type.
23:47
@melak47 where are you from? I'll invade your country because your interpretation of the standard doesn't match my interpretation of the standard.
@MooingDuck No, it's not.
@LuchianGrigore I live in the uh, Switzerland, yeah, Switzlerland...
@R.MartinhoFernandes "The underlying type can be explicitly specified using enum-base; if not explicitly specified, the underlying type of a scoped enumeration type is int. In these cases, the underlying type is said to be fixed."
@LucDanton I'm going home, I should be ready to play in about 30 minutes.
@EtiennedeMartel Yay!
23:48
@MooingDuck enum A is not a scoped enumeration.
@R.MartinhoFernandes a... scoped? enumeration?
ctrl+f's
@R.MartinhoFernandes oh, ok
"The enumeration type declared with an enum-key of only enum is an unscoped enumeration, and its enumerators are unscoped enumerators."
@melak47 Didn't you say you lived in not-quite-Berlin?
shh, don't tell him that! :p
@LucDanton Make that 45 minutes.
@EtiennedeMartel No worries. Do your things.
Alright, time to go. See y'all on Mumble and Minecraft!
> Should *opt be opt[0] instead? (I'm not being sarcastic, I've really been trying to find syntax that is more container-ish).
WTF
There are some really crazy people on that std-proposals list.
Hello, World!

« first day (832 days earlier)      last day (4342 days later) »