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

12:00 AM
Bacon is amazing. It can even do rendering.
 
Feb 21 at 23:16, by sehe
This guy is doing crazy stuff: he compiles C++ code into a javascript library. that he uses directly in the browser. That is awesome stuff. See Emscripten
@DomagojPandža But fails at being culled
 
Anybody want to ask a question on the c++ grammar?
 
I want molten cheese wrapped in bacon topped with chili sauce. Much better than a question about C++ grammar.
 
Yeah, what about it?
(that was also the question)
 
@sehe, are you c++ expert?
 
12:03 AM
@KirillVKobelev Does it matter? If you have a question, ask away
Non-tiny questions go here: stackoverflow.com
 
What is the meaning of life?
 
sehe is a C++ extraordinaire.
 
@JimNorton purple
 
Some say 42.
 
@DomagojPandža That could mean so many things :)
 
12:04 AM
ok. One of the forms of template parameter is template.
 
I need a format to store configuration for Hexapoda that users can edit (port number, db information, etc). Anybody knows a good format for this? Yaml, perhaps?
 
@KirillVKobelev Erm. I think you mean template<template <typename> class X> class Y?
 
Rembinds me of VVTTs.
 
@RadekSlupik Use boost property tree. It does Ini, XML, JSON IIRC
 
they are called template template parameters
 
12:05 AM
@RadekSlupik Similar, just variadic
 
@sehe Oh that's cool. Thanks.
 
Yes. Neverthless standard is saying the an argument for this params can be "id-expression".
 
@KirillVKobelev It is an id expression. What about it?
It means, the class need not be declared/defined yet. It is an implicit forward declaration
 
Hexapoda will use XML configuration files! Hooray!
 
But this non term is very wide, it includes dectors, overloaded operaors, etc.we
 
12:06 AM
@RadekSlupik Huzza
 
For me only a name of a template, i.e. only an identifier (maybe qualified) is applicable here.
Do you agree with this?
 
@KirillVKobelev I don't know precisely what you mean, but this might be of help: http://ideone.com/NzSD4
 
There is a piece of code there. what is next?
 
@KirillVKobelev You can indeed do funny stuff like std::vector<int(std::string, double&, int(a const&)[13])> a;
@KirillVKobelev Assuming you were confused about valid declaration syntax.. that code compiles
 
Variadic variadic variadic variadic variadic variadic template template template template template templates.
 
12:12 AM
@sehe This declares a vector a of function references
@KirillVKobelev Perhaps you should show us what exactly you are referring to. In case that id-expression thing is conclusive, consider me too lazy to scout in the specs
 
Ok. thanks/
 
You're referring to this part, I guess: nongnu.org/hcb/#template-parameter
 
You know, it's funny that when writing C++ I'm constantly thinking "no, I should pass this by value, this by reference" and "no, a loop might be too slow here" and stuff, while in Ruby, Objective-C, JavaScript or whatever language I completely don't care about performance.
 
12:19 AM
@RadekSlupik Try to get back in the highlevel mode. C++ is nice in that you can distinguish. Most often, just stick to default idioms
 
^ Aarg my head...
 
I needed an std::vector<std::tuple<Method, std::regex, std::function<void(Request const&, Response&)>>> and I was looking for a way to use a map instead because lookup would be faster. Of course you cannot have a map with a regex as key and expect it to work properly.
 
@KirillVKobelev In my mind, it basically means: name a function/class template , that the compiler doesn't have to know about on the first pass. It will have to know about it when instantiating the template only.
 
@StackedCrooked Lolz.
 
@KirillVKobelev I think one thing that might clarify this two-phase lookup for you is to look at the other uses of id-expresson
@RadekSlupik You can expect everything. Just not effectively
77
Q: Where and why do I have to put the "template" and "typename" keywords?

MSaltersIn templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway? I have the following code: template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail { // ... template<typen...

@KirillVKobelev ^ look at that one. The object.template method(...) way of invoking is also a case of id-expression (method is the id-expression here)
 
12:23 AM
@StackedCrooked take the one"s compliment sum of the pseudo header of info from the IP header etc and then of that sum take the 16bit's one's compliment. Done easy peasy :)
 
AAARGH!
 
@TonyTheLion compliment :)
 
Hexapoda segfaults when the user requests a non-existing file, instead of responding with a 404 page.
 
Thanks for the compliment, lol.
 
12:24 AM
@sehe lol
spelling nazis :P
 
Grammar nazis*
 
@TonyTheLion Sadly, that was just outside the bell for Lame Pun Friday, and your contribution will not be considered a prize candidate
 
The subphylum Hexapoda (from the Greek for six legs) constitutes the largest (in terms of number of species) grouping of arthropods and includes the insects as well as three much smaller groups of wingless arthropods: Collembola, Protura, and Diplura (all of these were once considered insects). The Collembola (or springtails) are very abundant in terrestrial environments. Hexapods are named for their most distinctive feature: a consolidated thorax with three pairs of legs. Most other arthropods have more than three pairs of legs. Hexapod morphology Hexapods have bodies divided into an ant...
 
@sehe. These rules describe template instantiation of definitng part of template partial specialization outside... My question is essentially about instantiation only.
 
@RadekSlupik are your insects segfaulting?
 
12:27 AM
@Tony no, it's just that I don't return a Response object from a function that doesn't return void when Router::handle fails to find a valid handler for the HTTP request, yielding UB.
 
Question that you metioned speaks about different topic. Do you agree with my statement that this seems to be a bug in the standard?
 
@RadekSlupik I googled Hexapoda, and that wiki post is the first result I got :P
 
The robot came up with the name. :P
 
So "one's compliment" is short for "one its compliment".
 
Yeah
 
12:29 AM
Why don't they simply say "compliment of one" then..?
 
@KirillVKobelev I can't say yes or no, because all we've established is that we are talking about different things :)
@StackedCrooked complement, complement
@StackedCrooked complement
 
@StackedCrooked well, operator~ is also called the one's compliment operator.
 
@RadekSlupik complement
 
@StackedCrooked complement
it should be
 
12:29 AM
:)
 
What e ever.
 
Complement. Complement. Complement. I get it now.
 
The ones' complement of a binary number is defined as the value obtained by inverting all the bits in the binary representation of the number (swapping 0's for 1's and vice-versa). The ones' complement of the number then behaves like the negative of the original number in most arithmetic operations. However, unlike two's complement, these numbers have not seen widespread use because of issues like negative zero, end-around borrow, etc. A ones' complement system or ones' complement arithmetic is a system in which negative numbers are represented by the arithmetic negative of the value. In...
 
I'll never forget.
 
invert all bits
behaves like the negative of original value
 
12:30 AM
0x0000 becomes 0xFFFF
 
@StackedCrooked Hey don't look at me. I didn't repeat it so much. It was you. I just corrected some of the instances. No more. No less
 
@TonyTheLion Yeah, but that doesn't explain the "Add all 16-bit sections using one's complement arithmetic." However I found a good explanation here.
@sehe I'm not looking at you. I was practicing.
 
@Scarlet basically yes, if the bits are 0 they become 1 and if they are 1 and you add one they overflow and become 0.
 
@StackedCrooked Good :)
 
12:32 AM
@StackedCrooked seems fairly simple
 
@TonyTheLion Yes it is.
 
I'm wondering if there is a decent Twitter API client library for C++ that I can use with HP.
 
@KirillVKobelev Perhaps it is time to post at Stack Overflow. Be sure to post a snippet that shows exactly where in the code you think you are encountering that syntax element. Just referring to a syntax element in the grammar is not going to provide much clue about where/when you think is out of place.
@RadekSlupik HP? Hewlett? Hardcore Porn? (in know i know, just CNR)
 
Hexapoda.
 
dafuq is that thing?
 
12:34 AM
Hardcore Porn is too soft.
 
Maybe you are right.
 
@Tony a bug tracker written in C++ that uses MongoDB.
 
oh I see
 
@KirillVKobelev Sounds like it might be an interesting question. I think LucDanton/RMartinhoFernandez/JohannesSchaublitb/David Rodr./Kerrek/Xeo/Cat/... the rest will be better able to explain. I've got so much to learn in that department. These guys are real standards masochists, you see (especially, the first three).
 
Yup, I can confirm. RMartinhoFernandez IS A MANIAC! :)
 
12:39 AM
@ScarletAmaranth Well, to be honest I think the same goes (perhaps even further) for LucDanton and litb, but I tend to think that the Robot has a special gift for explaining stuff in simple terms.
@ScarletAmaranth For this specific question, I wouldn't be surprised if der Schaub knew the asnwer immediately - just from grokking the grammar before, but I frequently fail to understand his answers. I have learned to just accept them on authority in such cases.
 
Folks.
 
Dudes.
 
Hmmm.
 
GUYS
 
Oh boy.
 
12:42 AM
lol
you guys
 
Summoning litb
 
@RMartinho, your help is required
 
@JohannesSchaublitb DUDE
 
@LucDanton please come help
 
@sehe The only person I can confirm maniacalness about is only the robot, though :)
 
12:43 AM
@TonyTheLion I'm here.
 
oh, well you'll meet litb someday
 
Lads.
Pals.
 
4 mins ago, by sehe
@ScarletAmaranth Well, to be honest I think the same goes (perhaps even further) for LucDanton and litb, but I tend to think that the Robot has a special gift for explaining stuff in simple terms.
 
@TonyTheLion Really? I think @KirillVKobelev can write that question by himself. And when it's posted it will automatically bubble to the front in
 
someone had a question that none of us can explain the answer to
 
12:44 AM
Kameraden.
 
@sehe ah well
I thought I would be helpful, but that was fail then
 
@TonyTheLion To be fair, I don't the question was all that clear, due to being posed in chat, and without context
 
ah lol
 
Kornuyten
Belhamels, kwarekels, bengels, deugnieten, kwajongens, luitjes, rakkers, knapen
 
I guess that was all for nothin then :P
 
12:45 AM
Yeah it was a waste of time.
 
@TonyTheLion Ah well, at least they know something interesting might be coming their way. Not much difference, IYAM
 
@TonyTheLion Where's that?
 
In the song I'm listening to, the woman sings "give me answers to my friends". Does that sentence make no sense, or is it just me?
 
@LucDanton Scroll up for @KirillVKobelev:
41 mins ago, by Kirill V Kobelev
Yes. Neverthless standard is saying the an argument for this params can be "id-expression".
 
12:47 AM
fixing* FIXED
 
oh he"s from Seattle
cool
 
(dammit. I always do that)
@TonyTheLion Sleepless?
 
it's desiGN and fixiNG
 
@sehe lol
 
@RadekSlupik Well it was a placeholder only, to get rid of the profile onebox temporarily
1 hour ago, by sehe
Your resident pundit is going to bed. Have fun
 
12:49 AM
I'm thirsty as somebody from a continent I shall not mention.
 
41 mins ago, by Kirill V Kobelev
For me only a name of a template, i.e. only an identifier (maybe qualified) is applicable here.
That it?
 
@sehe heard that before :P
 
pundid. a lot actually.
really going now
 
@LucDanton it was something about that
room topic changed to Lounge<C++>: We're the bestest! [c++] [c++11] [c++-faq] [c++-fuq]
 
@LucDanton Basically. I was unable to figure out at what particular time in code he meant, but I'm a bit tired. Perhaps you can see the specific point he is questioning
 
12:50 AM
is missing.
 
@RadekSlupik but is present
 
room topic changed to Lounge<C++>: We're the bestest! And Bacon! [c++] [c++11] [c++-faq] [c++-fuq]
 
Should be .
 
Well I think the point is that whatever the grammar is requiring might not be the tightest requirement.
 
12:51 AM
Fuck. Now I want bacon.
 
@RadekSlupik Wrapped in bacon ?
 
@sehe I created that tinyurl.
 
@LucDanton In that case, it might be 'sloppy'? That's what he was suggesting, at least
@RadekSlupik I noez
 
@sehe I mouth
 
12:54 AM
mowth
 
@Luc, I fully agree with " whatever the grammar is requiring might not be the tightest requirement".
 
27 mins ago, by Kirill V Kobelev
Question that you metioned speaks about different topic. Do you agree with my statement that this seems to be a bug in the standard?
 
@KirillVKobelev This is not my opinion though, I was paraphrasing you.
 
But in this case it makes sense to mention this in the text of the standard. Paragraph 143.3 (C++2003) is silent on this point.
 
and bacon
 
12:56 AM
Wonder if this is overkill. Likely incorrect since it's gettin late.
 
Paragraph 14.3.3.
 
Simone Simons can sing better than bacon.
 
ok fellow chatters, I'm going to bed
 
bacon beckons us to the beacon of beggars beginning to beget beguiled beguines.
becoz...
@TonyTheLion yellow yapperz :) cheers
 
baguette with bacon
 
12:58 AM
lol
 
@Tony tot ziens
 
tot later
tot morgen
 
Vandaag*
 
oh lolz
honestly, I should go to bed, but I can't be arsed really
 
I'm eating ketchup-flavored crisps.
 
12:59 AM
I'm not feeling up to the task
lol
 
Scumbag English is fucking inconsistent.
 
why sleep?.. its only 9PM EST
 
It's three o'cock (Tonyspeak) AM.
 
hmm, sounds like you're in france
 
Funny. I can't delete that message even though the menu still shows the link etc.
 
1:01 AM
lol France. Fortunately not. You're looking for @Cicada.
I'm from the Dutchlands.
If you ain't Dutch, you ain't much.
 
I'm not in mainland Europe
 
As a finishing touch, God created the Dutch.
 
What's a suggested alternative to id-expression here?
 
in DeadMG land
 
that's what they said in Rembrandt Square :)
 
1:02 AM
@LucDanton Plink the guy?
 
@sehe I think I'll be going back to my business instead.
 
@LucDanton I suggested him to expose the question in a bit more detail on Stack Overflow proper. So yeah, that will work probably out
Cheers
 
@Cicada will come in tomorrow and ask who the fuck plinked her again without reason. :P
 
Only, this time she'll know. Again.
 
1:04 AM
Meh I haven't had any stars today.
Sehe's puns were too good.
 
Didn't pun enough.
Oh wait, I punned _moar_ than enough and I didn't get stars. It was a bit quiet, most of the time
 
It's quite because Kyrostat.
 
In any case keep in mind that a compiler already has to deal with id-expression s in template-id's (e.g. bar in foo<bar, baz, foo>), so allowing it in default parameters comes for free and is consistent.
 
No more annoying cats and puppies.
 
@RadekSlupik Well, two of them were actually quite Zing! but the rest was just in the name of LPFriday
 
1:06 AM
Schreeuw!
 
dafuq not sure what to think about this?
 
That news is so fucking old.
 
but there's no one on the IRC channel either
 
It was on nu.nl about two weeks ago.
 
@RadekSlupik was on Reddit's front page, maybe a repost
dated 15 June
 
1:07 AM
On nu.nl was much earlier.
In May.
Also /r/frontpage sucks.
/r/ginger is much better.
And /r/spacedicks.
I'm going to sleep.
See read you guys!
 
Don't talk about spacedicks
and r/ginger sounds iffy
 
Spacedicks isn't that bad. At least it's better than /r/picsofdeadkids (don't open).
 
I'm not even going there
to neither
 
+1
I did once and I regret everything.
 
why? the title says enough
no need to go further
 
1:13 AM
Yeah did I know it was real.
 
it's the interwebs
just remember that
 
Don't fall asleep now
that would be a waste of time
 
@sehe I'm done with high school. I can waste my time now. :)
 
lol, I've half my life on here
the next half to come :P
when I'm 80 i'll prob still be a regular in the C++ lounge
 
Waste ALL the time :)
haha
 
Semblance of Liberty would have been a great song if they didn't quote George Bush in it with his promise about not raising taxes.
@StackedCrooked by typing.
 
@StackedCrooked T sum(T head, T... tail)
 
@TonyTheLion Doesn't work.
 
you shouldn't try to expand the parameter pack, but make the pack
 
Call sum(tail...) in the first place.
 
1:16 AM
Ah wait.
 
quack
 
Wtf that code doesn't even make sense. There is no call to operator+.
 
@TonyTheLion Can you fix it on Ideone and post the link?
@RadekSlupik Very good catch! I think I oversimplified my code a little :D
 
Also do class T, class... U
Two template params cannot have the same name.
 
WOW......

Tech Support: "All right. Now click 'OK'."
Customer: "Click 'OK'?"
Tech Support: "Yes, click 'OK'."
Customer: "Click 'OK'?"
Tech Support: "That's right. Click 'OK'."
Customer: "So I click 'OK', right?"
Tech Support: "Right. Click 'OK'."
Pause.

Customer: "I clicked 'Cancel'."
Tech Support: "YOU CLICKED 'CANCEL'???"
Customer: "That's what I was supposed to do, right?"

It goes on...
 
1:19 AM
Huh wtf
Do this
 
template<class T, class... U> T sum(T head, U... tail) {
  return head + sum(tail...);
}
 
@RadekSlupik That's what I posted. However, I don't want to allow two different types.
 
@StackedCrooked use static_assert with type traits then.
Don't make it too complicated.
 
1:22 AM
@StackedCrooked I think two types is the simplest way, because the parameter pack has to have it's own Type.
 
C has _Static_assert too, btw. :P
template<class T> struct are_same { static constexpr bool value = true; }; template<class T, class U> struct are_same : public std::is_same<T, U> {}; template<class T, class U, class... V> struct are_same { static constexpr bool value = std::is_same<T, U>::value && are_same<V...>::value; };
 
this room
soon to be renamed to
Lounge<C++...>
 
LOUNGE_C
 
(with bacon)
 
Lounge<C++, Bacon>
 
1:32 AM
perfect
 
Lounge<C++... bacon>
 
1:44 AM
nite kids
 
panic trap
 
@TonyTheLion Like this I can still enforce sameness. The compiler error will be triggered a little beyond the original error though...
 
Customer: (screaming) "Well I bought this damn computer from this guy who says he bought it from you and he came to my house and hooked it up. Now while he's explaining to my daughter how to use it, she's telling him 'yeah, yeah,' she knows what he's talking about. I'm in the kitchen cooking peppers and onions while my daughter is going 'yeah, yeah,' then this guy leaves, and I ask my daughter if she knows how to use the computer, and she says she was too embarrassed to tell him she didn't understand and just told him 'yeah, yeah.' Now I paid over $1000 for this thing and I don't even know
 
2:05 AM
and Bacon, oh boy.
Nothing like sitting in front of your computer scream with your hand on the mouth going "clit, clit, clit". A handshake and a cold one to whoever can tell me where that's from.
 
2:15 AM
"No, sir...clicking on 'Remember Password' will NOT help you remember your password."
 
 
1 hour later…
3:36 AM
 
4:35 AM
Ok. Downvoted!
J/k.
Upvoted instead!
 
5 upvotes!
 
@RMartinhoFernandes I like your TraitOf alias. However have you considered that you could have used CRTP (AFAICT)? E.g. template<typename T> struct foo_trait: meta::trait<foo_trait<T>> { /* put different test overloads here */ };? I'm worried that TraitOf<foo_tester, T> might lead to more obscure error message, but you're the one with the experience here.
 
4:50 AM
@LucDanton Where is this code you are referring to? I find this interesting.
 
@StackedCrooked Here is the definition but it's a bit obscure unless you have a usage example.
I think that instead of writing a 'tester' with an alias you can instead write a CRTP-powered trait. Not trying until I have an actual trait to write though (which might be the case in 10 minutes).
 
hey, does DosBox emulator (16 bit system) has shellExecute() function?
 
Ah, it's tricky because the type is incomplete inside the CRTP base.
 
What does this syntax mean: ar.template register_type<T>(); ? Is it any different from ar.register_type<T>();? (From boost serialization docs.)
 
register_type is dependent so it has to be disambiguated.
 
5:03 AM
I never encountered a situation where I need to do this.
Ah, I see.
 
Boost.Tuple has a member get, so inside function templates you may have to write some_tuple.template get<0>() or the like.
 
I see. So it's in code where not all types have been instantiated yet.
 
Nope, it's where it's dependent.
 
does anybody know the answer to my question?)
 
5:06 AM
I think you can construct an example where a type inside a class template is constructed from a dependent template (foo::template bar) and won't necessarily need to instantiate anything.
I don't think that would be the correct counter-example though. Ah well, in any case it's orthogonal to instantiation.
 
I'm not good with definitions. In my experience it's just that std::vector<int>::iterator is fine and std::vector<T>::iterator requires disambiguation. So I figured "dependent" things exists when something has not yet been instantiated.
 
'Instantiation' has a very precise meaning. I don't find it very interesting to consider when or if a type is instantiated or not.
Also the rules that govern that are insane.
Man, CRTP is weirder than I remembered.
 
5:22 AM
Members in the most-derived class always hide those of the bases.
 
So it's a valid way of overriding behavior?
 
What is? And what is overridden here?
 
I suppose 'overridden' is the wrong word. I mean that Item::foo replaces Base::foo.
But it seems like it can be used as an alternative to virtual functions, if called from the most derived object. It looks like it could be useful with a policy based design.
 
It's not an alternative. It's the vanilla behaviour. Dynamic dispatch and overriding are here to subvert that.
So the behaviours are opposite in a sense, and that's by design (of dynamic dispatch).
Although of course that's the historical perspective. You can spin that on its head and consider that they are opposite, by design of static dispatch.
But what's the point?
 
5:32 AM
Shadowing is often considered to be suspicious.
 
lol, apparently compiling produces more cpu heat (-j8) bulldozer than prime95 8 threads
i got 42.4 degC @ 132 W (AM3+ boards export power meter usage)
only occtpt topped that, and for brief periods of time only
this is a fx-8150 @4 ghz air cooling, if anyone's curious
 
@StackedCrooked If you mean hiding, then that's arguably more a matter of syntax than true semantics (the real semantics would be static dispatch). A language could instead decide to leave the base members visible by default and provide the opposite of a using declaration to explicitly hide those.
Mmh, I can't quite write a trait for narrowing conversions. Can't get GCC to SFINAE, it emits a warning instead (and goes on compiling).
 
how do i initialize a multidimensional vector
like if i want it to be [[1,2],[3,4],[5,18],[7,2]] or something
 
5:48 AM
DosBox emulator, that emulates 16 bit DOS system, does it has ShellExecute() function?
or CreateProcess() ?
 
@ddacot ask on SO
 
the question is too short, can't submit.
 
Add a pointless link
 
@ddacot lemme untar and grep; gimme a few mins
 
@moshbear english please.
 
5:58 AM
extract the source tarball and use grep to search for the function names of interest
@ddcacot nope, neither ShellExecute nor CreateProcess
that sounds like win32, in which case it's better to use wine
 
can you give an example of "wine" ?
 
it's an API translator between windows and posix+X
though parts of directx and msi are definitely incomplete
 
can you show me an example?
 
in most cases, third-party patches add enough missing functionality to make programs like the Adobe CS3 Installer work
user@host$ wine /path/to/program.exe
 
i'm on windows, using dosbox..
i'm not using linux..
 
6:04 AM
why aren't you just using WoW16 or whatever that's called or are you on 64-bit?
 
'cause i need in dosbox.
 
dosbox doesn't do 16-bit windows
 
it is an emulator
to 16 bit dos
 
and ShellExecute, CreateProcess are windows functions
maybe there's a library that does the implementation, but dosbox neither supports win16 nor is it obligated to
 
i understood, now what should i use to start a proces?...
system() will work?
 
6:07 AM
system is a C api
you need a C library for that
does DOSBOX> start "path\to\program" not work?
as in, use "START" in a batch file
 
ok..
 
O_o "START" isn't supported in dosbox
why can't you just type the program name, as in DOSBOX>X:\my\program or similar?
last time i checked, dos wasn't designed for multiple simultaneous apps unless you made use of the TSR hack
 
 
2 hours later…
8:27 AM
Actually, the number 10 (and all other integers up to 16777216) can be represented exactly as a float. — FredOverflow 32 secs ago
 
8:40 AM
> I need you to tell me what browser I am using. Is it Netscape 2.0? The reason I need to know is that I have read that Netscape 2.0 distributes a virus called Java.
 
hi
 
hmm
 
hi
 
for some reason, binutils 2.22 failed to add -ldl in its CFLAGS
2.21 worksed
worst case, external CFLAGS override to add libdl
 

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