« first day (458 days earlier)      last day (4491 days later) » 

sbi
5:00 PM
@RMartinhoFernandes What's the criterion, though, which triggers oneboxing in this case? Is it the URL manpages.ubuntu.com?
 
nice avatar, @Mr.Anubis. ;)
 
@sbi Yes, only manpages from the Ubuntu site work.
 
sbi
@RMartinhoFernandes Ah, Ok, thanks. They probably introduced that for the Ubuntu site.
 
@RMartinhoFernandes what was so wrong with recommending him a book?
 
@bamboon Read the following messages :)
3 hours ago, by R. Martinho Fernandes
This is cool.
3 hours ago, by R. Martinho Fernandes
I shall recommend Accelerated C++ more.
The "sigh" is not in relation to that.
 
5:07 PM
ah ok nvm.
yeah confused that part
 
5 more boats for gold c++ :)
 
boats?
 
Xeo
@RMartinhoFernandes Wait, you didn't have that already?
 
@Xeo No. I only started answering C++ questions in April or so.
 
Xeo
ah
 
5:12 PM
@StephenCanon It's a stupid way of saying "votes".
 
@RMartinhoFernandes: Have some votes.
 
ahh, the world of professional software development where it takes fucking ages to get a branch set up so that you can deliver a fix to some very flaky code
 
hmm words with friends claims SFINAE isn't a word!
 
Words with Friends is right.
 
5:14 PM
In my book, if I can't pronounce it, it's not a word.
 
Xeo
@RMartinhoFernandes sefiney
 
It's definitely pronounceable after a few beers :)
2
 
@RMartinhoFernandes I assume then you don't have a lisp :P
 
... but no longer spellable at that point.
 
what does SFINAE present after all?
 
5:15 PM
lol
The problem with SFINAE is that it's too long to be uttered as a sequence of letters.
So there's really no choice.
 
Right.
Why didn't they just call it !ESF( not Error substitution failutre)
 
eanifs
Wait what does SFINAE stand for...
 
I prefer to use the terms "soft error" and "hard error".
 
@Gabe, Substitution failure is not an error
 
@DzekTrek Ohh... thanks
 
Xeo
5:19 PM
@RMartinhoFernandes Except that SFINAE is "no error"
 
@jalf, sup.
@Gabe, np. ;)
 
@Xeo It's a "soft error".
 
soft like your mother's fat
 
The problem is that "soft error" is not verbable.
 
@RMartinhoFernandes you soft error, I say warning :P
 
5:20 PM
@thecoshman No! That's not it!
Warnings are hard errors (I compile with -Werror).
But SFINAE seems to be verbable, even if unutterable.
 
I think warning has come to mean to big a thing in compiles, to me it is something you shouldn't do, but is ok. Error is something you shouldn't have done, and oh now look what you've done. Fatal Error, well, you never see what happens when they come along
 
no, warning means "You really need to look again at this code"
 
MSVC is good at convincing people that warnings are useless.
 
any way. Home time. I've had enough sitting around for emails to day !_!
 
@thecoshman , see you cosh
 
sbi
5:29 PM
We only had that the other day, hadn't we?
Had Yoda come up with the term, we could actually pronounce SFINAE.
 
Substitution Failure Not An Error Is?
Somehow putting all the vowels together doesn't seem to help.
 
sbi
I think "NAESFI" is almost pronounceable. And we could use "No Error Substitution Failure Is" and get "NESFI". Pretty decent, IYAM.
 
@sbi NAESFI "neyisfi", while NESFI "nisfi" or something like that
 
Substitution Failure An Error Is Not
SFAEIN.
Nope.
 
sbi
OTOH, using an innocent term for such a beast might be misleading the newbies to believe they could handle it. :-/
 
5:33 PM
An Error Substitution Failure Is Not.
@sbi But that's not correct Yodaspeak!
 
sbi
@RMartinhoFernandes Wot? "No error substitution failure is, young padawan." Sounds Yodaesk to me.
 
@all going to eat, will be back in 1 hour. ;)
 
@sbi Should end in "is not".
 
sbi
@RMartinhoFernandes Oh well, "ESFIN" then.
 
@RMartinhoFernandes are there formal and canonical rules for yodaspeak?
 
5:42 PM
@jalf Do you seriously doubt that?
 
people translate the Bible into Klingon
 
Btw, Yoda's species is known as "Yoda's species".
 
sbi
@DeadMG I think Klingon is incorporated into Unicode. Quenya and Sindarin, OTOH, were refused.
 
I've heard of Klingon but not the other two
 
can unique_ptr be used for polymorphic calls in the same inheritance hierarchy ?
 
5:47 PM
@sbi No, it's not.
pIqaD (Klingon's writing system) was refused.
 
sbi
@DeadMG Tolkien.
@RMartinhoFernandes Oh. I seem to misremember then.
 
The author of the proposal started using it in an empty part of the Unicode space, and some fonts started supporting it.
But it's not officially accepted.
 
@RMartinhoFernandes Well, it would be a mild surprise, I guess
but the star wars canon is insane, so why not
 
Hey @RMartinhoFernandes , can unique_ptr be used for polymorphic calls in the same inheritance hierarchy ?
 
@RMartinhoFernandes Unlike POO, PILE OF et al...
 
5:49 PM
Exactly!
POO, PILE OF is official, but pIqaD is not.
 
sbi
@RMartinhoFernandes Indeed!
> 2001-May-21, rejected by the UTC as inappropriate for encoding, for multiple reasons stated in L2/01-212. (Lack of evidence of usage in published literature, lack of organized community interest in its standardization, no resolution of potential trademark and copyright issues, question about its status as a cipher rather than a script, and so on.) References to UTC Minutes: [87-M3], [87-A15] — unicode.org/alloc/nonapprovals.html
 
But since there is now a much larger number of users of pIqaD (since there are fonts supporting it), it's possible that it may be included.
I mean, who uses POO, PILE OF?
 
@RMartinhoFernandes Java textbook authors?
Oh, you meant the glyph?
 
hmm, are int8_t and int16_t really used as math types for stuff like abs, pow, etc? Everything is automatically promoted to int before math happens right?
 
Here's a blog in Klingon: qurgh.blogspot.com
May not render properly, for obvious reasons.
 
5:52 PM
apparently, POO, PILE OF was pushed in for Japanese smartphone users
exactly how the two are linked, I cannot recall
 
(I don't seem to have pIaqD fonts installed)
 
can sizeof be used in enable_if's?
 
why shouldn't it be?
 
just asking
 
5:55 PM
just telling
 
It is usually used to implement enable_if, iirc
 
oh god
 
they have an EAR OF MAIZE
lol, FRIED SHRIMP
 
5:57 PM
lol wtf
 
huh, their addition to Unicode was requested by Google and Apple
 
Google Chrome can't display most of em
 
@rubenvb It's not about Chrome, it's about fonts.
 
@RMartinhoFernandes Well, Chrome should use decent fonts
there is no font that supports all of unicode, and the one that supports most of it, is friggin' ugly
 
@rubenvb It uses what is available on your system.
1
Q: Parsing a zero-width regex with a regex

Matt ChambersWe use zero-width regex strings to specify the places in a string of amino acid symbols (basically A-Z) that are valid cleavages sites. For example, the proteolytic enzyme trypsin cleaves after K or R except when followed by P ((?<=[KR])(?!P)). I want to convert these regexes to the "cut/no-cu...

So, he's parsing "cleavages" with a regex.
 
6:01 PM
This doesn't fly:
template<typename T> kiss::enable_if<(is_integral<T>() && (sizeof(T) >= sizeof(int))), T>
constexpr abs(const T);
template<> constexpr int abs<int>(const int x)
{ return __builtin_abs(x); }
 
No wait, he's parsing regexes for parsing "cleavages" with regexes. It's regexception.
 
(with RMartinho's alias templates still)
 
Damn.
@rubenvb What's the problem now? Signedness?
 
@RMartinhoFernandes I'd like to not have this template work for char and short. So I would enable it for integral int and larger types
but with that, I get:
M:\Development\Source\KISS\include\math.hxx:191:30: error: no function template
matches function template specialization 'abs'
template<> constexpr int abs<int>(const int x)
^
 
there is no law in the Standard defining that sizeof(int) > sizeof(short)
 
6:04 PM
hmmm
I'm starting to think I have to invent my own language for this
basterdz
 
sbi
@rubenvb If you only want this to work for two types, you don't want a template, you want an overloaded function.
 
sizeof(int) >= sizeof(short) if that helps.
@sbi "overloaded".
 
sbi
@RMartinhoFernandes Indeed. Thanks.
 
@sbi It'll work for int, long, long long (unsigned and signed), float, double and long double. The is_integral can be extended to also include is_floating_point.
9 function overloads
 
sbi
@rubenvb Oh, you would like this to not work for two types. I see. Sorry for misreading.
 
6:07 PM
@rubenvb void f(char) = delete; void f(short) = delete; done.
 
@RMartinhoFernandes outside a class?
 
sbi
@RMartinhoFernandes Oh. Nice new syntax.
 
Everywhere!
 
sbi
@rubenvb (Even if, you could always make them static members of some dummy struct.)
 
The point is, they still participate on overload resolution, and if they get picked, boom.
 
6:08 PM
Cool! So #include <math.h> double fabs(double) = delete; works. That's just evil
I can undeclare functions!
 
Wait, what?
 
or not?
ah wait, double declaration, nvm
I'm really screwed up more than usual today
 
sbi
@rubenvb There's no math.h, and it's std::fabs(), and I suppose it's forbidden to do that for anything in std.
 
@sbi I included the C header. To avoid the std:: problem
 
Arrrgh. I hate online journalists that post zero links on their stupid news.
I want the fucking references dammit!
 
6:12 PM
Do I really need to overload on signedness? Or will two implicit casts happen (one to the larger signed type and one back to the smaller unsigned type?)
 
Better than only having links to their other articles. I want outside sources!
 
@RMartinhoFernandes particularly when you know their summary of it is going to be wrong anyway
 
Hmm, Google is in on the SOPA protest (not blacking out though :): businessweek.com/news/2012-01-17/…
 
Hello everyone. My first day in chat !!!
 
this is GCC 4.5's fault, right? ideone.com/F4l8V
 
6:18 PM
@Roger Hi there.
 
@RMartinhoFernandes: Hi
 
@rubenvb Is __builtin_fabsf constexpr-kosher?
 
sbi
Hello @Roger, welcome to this room. You might want to read the newbie hints for this room, linked from the right-hand panel.
 
@RMartinhoFernandes yes, they implemented constexpr for _builtin math functions (I found the bug report yesterday or the day before that said so)
 
@ C:\Users\Martinho
$  g++ --version
g++.exe (GCC) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@ C:\Users\Martinho
$  g++ -Wall -Wextra -Werror -pedantic-errors -std=c++0x a.cpp
a.cpp: In function 'int main()':
a.cpp:9:5: error: static assertion failed: "uhoh"
Seems like it's a 4.5 issue.
 
6:21 PM
ok, good stuff
 
@sbi: yup. going through the same. Thanks a lot for the pointer !
 
ideone should really update
 
I hope they do when 4.7 comes out.
 
Or switch to Clang+libc++
 
No!
That has no lambdas.
 
6:22 PM
true, but it as <regex>
 
I love me some λs.
 
which libstdc++ is really really lacking
 
I'd rather have lambdas.
 
Maybe they should have both
or the Clang demo page should support -std=c++11
 
sbi
@rubenvb That is a library you can have from boost. Lambdas are a core language feature.
 
6:26 PM
<steps back slowly>
.
.
.
<quickly turns around and jumps out the window>
 
Does template <template <typename> class Cont> allow containers with N template parameters? like a map and it's four template parameters?
 
sbi
@MooingDuck No, that would require <template <typename,typename,typename,typename> class Cont>.
 
Does this work? template <template <typename...> class Cont>
 
@MooingDuck Yes, if you make an alias.
 
@Pubby not in MSVC10
 
6:30 PM
template <typename T>
using simple_vector = std::vector<T>;
Or like Pubby said.
 
Template aliases are my favorite feature so far
 
@RMartinhoFernandes I think you need a key and value for map. Sorry my example didn't make sense. vector would have been better
 
@MooingDuck Oh, right, I totally forgot that too :S
25
Q: Can I use template aliases as template template parameters?

R. Martinho FernandesCan I use template aliases as template template parameters? template <template <typename> class> struct foo {}; template <typename T> using simple_ptr = std::unique_ptr<T>; foo<std::unique_ptr> a; // this doesn't work, std::unique_ptr has two parameters foo<sim...

 
That's how I got currying to work
 
When reading C++ code I mentally equate all uses of "inline" with "didn't profile".
 
6:39 PM
that's weird. I only use inline for non-class functions defined in the header. All the rest is bullocks
 
Hmm, I have 42 questions, 42 badges, and 7142 rep.
 
There's a widespread idea that it's like "go faster stripes" for code.
 
what's the difference between C99 remainder and fmod?
 
In truth, inline really is like "go faster stripes" for code. It does nothing about speed.
6
 
@RMartinhoFernandes I still habitually mark one line functions as inline. Especially since I discovered MSVC takes inline seriously.
 
Xeo
6:45 PM
@MooingDuck Wait, what?
 
@rubenvb remainder works according to the floating point standard.
 
@Xeo I found a case where debug would compile in ~6 seconds, and run in ~30, but compiling release would cause the compiler to error "OUT OF MEMORY" after ~10 minutes.
(The example in that code is simplified, and would not run in ~30 seconds in debug)
 
@RMartinhoFernandes the opengroup docs are really not clear on hat
 
Why would you want recursive inline?
 
"Closed as Fixed" OMG How is this possible? Did you hack Connect or something?
> Hi, This bug will be fixed in upcoming VC++ Dev11 release. Thank you for reporting this bug.
Oh, wait, it's not fixed.
 
Xeo
6:49 PM
@RMartinhoFernandes "Fixed" in MS language means "fixed if you buy the next version of the product"
 
It's "never going to be fixed, but hey, look at this, we're shipping this new product that you can buy and doesn't have this problem!"
 
well, technically, MSVC is free (Windows SDK) so stop bitching
 
@rubenvb: take the opportunity. @StephenCanon here has the silver badge.
And I believe he was in the standardization comittee for the floating point standard or something. (I might be confusing with someone else)
 
@rubenvb: The C standard is fairly clear on the difference, but to summarize:
 
@Pubby in my actual code I knew the recursion depth would never be more than 8. But at each layer it called 5 other functions with the same template, and it attempted to inline EVERYTHING
 
6:52 PM
- the result of fmod(x,y) has the same sign as x, and magnitude less than y.
 
Xeo
In the meantime, I'm still awaiting a reply on this issue. :(
 
- the result of remainder(x,y) may have either sign, but has magnitude less than or equal to y/2.
 
Hmm, so remainder(20,7) is not 6?
It's 3.5?
 
that's just weird
 
No, remainder(20,7) is -1.
 
6:54 PM
Oh! I see.
 
I don't
 
Xeo
@rubenvb 3*7 = 21, 20 - 21 = -1
 
It tells you which multiple of the divisor is closest.
 
7 * 3 == 21 -1 == 20
 
aha. Reverse psychology
so fmod(x,y) = remainder(x,y)<0? remainder(x,y)+y : remainder(x,y)
 
6:57 PM
Let n = x/y rounded to the nearest integer (and rounded to even in the case of an exact halfway case). Then remainder(x) = x - ny.
 
And remquo puts n in the pointer parameter, right?
 
some number of low bits of n, correct.
only 3 bits are required by the standard, but an implementation may provide more.
 
> In the object pointed to by quo they store a value whose sign is the sign of x/y and whose magnitude is congruent modulo 2nto the magnitude of the integral quotient of x/y, where n is an implementation-defined integer greater than or equal to 3.
Why not the full thing?
 
Well, you can't store the whole thing in an int.
 
But you can store more than 3 bits, no?
 
7:00 PM
Remember, n can be huge (> 2000 bits if x and y are doubles).
3 bits is what you need to do a naive implementation of sin( )/cos( )/tan( ).
 
Ah, interesting.
 
3 bits is also what the x87 fprem1 instruction gives you.
There's really not much reason not to provide a full ints worth of bits, though.
Other than inertia.
(Note that you don't actually want to implement sin/cos/tan that way, since pi isn't representable as a floating-point number)
(That said, a lot of older math libraries did exactly that)
 
So remquo is only useful in very specific cases.
 
They're the most common specific cases, but yes.
I mean, honestly, remainder( ) isn't that generally useful to start with. Critical to have when you actually need it, but the need is rare.
 
sbi
@jaredpar http://chat.stackoverflow.com/transcript/message/2389425#2389425
 
7:07 PM
oh, I've been tweeted
 
Apparently your 15 minutes begin now. Act quickly.
 
sbi
@StephenCanon He's just one of many:
@jaredpar I'm pretty sure that every 'inline' I've ever written was of the 'ignore the ODR' variety, not the 'please make this fast' variety
 
@StephenCanon I don't have Twitter :/
 
ignore_odr void f() {
    blah().blah().blah();
}
Needs a #define ignore_odr inline, and it's ready to go!
 
@rubenvb: I'm pretty sure I have a twitter account. I'm also pretty sure I've never used it for anything.
 
sbi
7:13 PM
@rubenvb You don't have to have your own Twitter. You can share twitter.com with us. :)
 
@sbi: Well said.
 
Xeo
lol
Someone dared to say "fuck" in another chatroom - FLAAAAG
 
OMG YOU CAN SWARE ON HERE?
 
Hmm, I can't write blah() as a single function :( ideone.com/USsts
 
I see my screwed-up-ness has passed on
My duty here is done
^ game quote
the question is, which game?
 
7:19 PM
:(
swearing should be soaped!
 
@rubenvb Did you really buy Duke Nukem forever?
 
he probably pre-ordered 11 years ago
 
@CaptainGiraffe nope
if it's in there, one more reason not to buy it!
 
@rubenvb =)
 
the guy that invented "Fuck" should probably be the most wealthiest and deadiest( he passed away long time ago ) man on the world, if SOPA passes away on swearing regulations.
(little trolling is healthy for everyone here)
 
7:20 PM
SOPA is not about swearing (IANAL).
 
@DzekTrek FCUK should be out of business too
 
Of course, Giraffe!
 
ugh, you guys are hopeless
a level-1 quote of the best game ever and you guys don't even try to think
 
According to the bible, I believe Adam had some rights to inventing it.
At least an argument for prior art.
 
Man? Giraffe? Isn't that regulated by SOPA too? I mean, how would all giraffes of this world feel when someone say to them that somewhere over there exist a man that fully without any approval use their name for the benefit of himself? :D
 
7:23 PM
Sry for the /. influenced argument.
 
This case should go on the EU court of justice as we can see some cross-roll between some human rights and SOPA. ( I was talking about the ownership of the Giraffe name )
 
@rubenvb: That quote does not appear anywhere in Hello Kitty's Island Adventure.
 
@DzekTrek I talked to them all, they are all in agreement and respond to that statement with "That's my dude, that's my Captain"
 
Anyway, the best game ever is not Diablo II, it's NetHack.
 
:D
 
7:25 PM
Hi
 
@CaptainGiraffe , if that is true, then you have full right to bear that name. :)
 
@RMartinhoFernandes I just got the +5 sword excalibur =)
 
:D
 
@RMartinhoFernandes you suck
 
Actually, I'm not bad at it.
 
7:26 PM
Why is std::cout << static_cast<void*>(0) ok but std::cout << static_cast<char*>(0) is not?
 
@CaptainGiraffe Hehe, that's probably the easiest to get.
 
NetHack rocks hard
 
I guess I wasn't missed - why should I? :(
 
People, didn't you realize that this group is just growing and growing every single day. :D
nethack, what's that about, @Captian Giraffe?
 
@wilhelmtell Streams treat char* as strings to print out, but any other pointers are address.
 
7:27 PM
@wilhelmtell What do you expect from std::cout << static_cast<char*>(0) is not?
 
@DzekTrek It's a game.
It's not about hacking the Internet.
 
Oh, it's the first time I hear about it.
I will check on the google. ;)
 
It's an old one.
 
I see.
Did anyone of you play Age of Empires 2?
 
There was an old version of GCC that would try to start NetHack if it found a #pragma.
 
7:28 PM
@DzekTrek On the surface NetHack seems simple, but its very inspiring if you allow it to be. Way more complex than any game youd evver see.
 
This was one of my best games ever. ;)
 
I played NetHack regularly for about ten years. I beat it once.
 
There was a time, if you walked into pretty much any computing lab on any university campus, at least 50% of the computers were being used to play nethack.
 
:D
 
@StephenCanon I was not that 50%, now I am =)
 
Xeo
7:30 PM
@CaptainGiraffe You are a computer?
 
@StephenCanon Haha, very true scenario for this time too, except university nowadays use more complex games. ;)
 
No, they use simpler games with more complex graphics.
2
 
Xeo
Anyways, I'm afk, nopping for a bit..
 
@StephenCanon Exactly!
 
:238986 Dear Xeo, I cannot allow you to state that question at this moment.
 
7:31 PM
@StephenCanon You can tell it that way too. ;)
 
@Xeo You don't nop, you nap!
 
@DzekTrek Facebook::farmville in my experience
 
:D
come on
are you serious
playing farmville? :P
 
Well very much so. The CompSci students are playing flash games, like miniclip and its ilk
 
I have never played any flash game so far.
I just don't have so much time for that
Giraffe, where do you come from? :)
 
7:35 PM
All giraffes comes from Sweden, that should be well known in here.
 
Hmm, apparently someone linked to the memory leak question that I answered with the pictures. And now the rep for 15 upvotes was wasted because I already capped for today :(
 
@RMartinhoFernandes Link where I can downvote you?
 
62
A: Why is it a memory leak? What could I catch if I shall use such things in C++?

R. Martinho FernandesWhat is happening When you write T t; you're creating an object of type T with automatic storage duration. It will get cleaned up automatically when it goes out of scope. When you write new T() you're creating an object of type T with dynamic storage duration. It won't get cleaned up automatica...

 
@RMartinhoFernandes I can't downvote that!
 
7:39 PM
@RMartinhoFernandes Only thing I can disagree with is that RAII is "not-very-descriptive".
 
> A Concept Design for C++ (Bjarne Stroustrup and Andrew Sutton, TAMU)
Oh cool, Bjarne is going to talk about Concepts!
 
Apparently they fixed them.
And that means polymorphic lambdas are in as well!
 
It does? Awesome!
 
Concepts and polymorphic lambdas didn't play well together.
 
Variadic Templates are Funadic (Andrei Alexandrescu, Facebook)
 
7:42 PM
"Funadic" as in "Monadic"?
 
I don't know anything about C++ concepts, but are they like Haskell type classes?
 
void f(int& x);
> The parameter type int constrains the type of argument that can be passed to f: you can pass a non-const int lvalue or anything that can be implicitly converted to one, and that’s it.
@RMartinhoFernandes This is an error, lvalue references don't allow conversions, do they?
 
@FredOverflow foo::operator int&()
@Pubby Yes, they're similar.
 
I'm thinking this change will not translate well to the percieved intentions of code already written.
 
7:46 PM
And Haskell type classes are awesome.
 
@RMartinhoFernandes Oh. Has that ever occurred in real world code? :)
 
sbi
@StephenCanon Your freedom to do so is somewhat limited. The regulars here don't mind, others might, although we generally give them a hard time about it.
 
> See my comment below on your comment. – Johannes Schaub - litb 2 mins ago
I wonder what @Johannes has been smoking.
 
How can I access to the solutions on the project euler tasks?
 
7:58 PM
@DzekTrek By solving them. You cannot see a solution without providing the correct answer first.
 
user142019
They are not bound to a language.
 
It's easy! You solve them!
 
user142019
You can solve them in many different ways.
 
Yeah, but is there any way I can access them without having a solution for a specific task?
 
Not officially.
 

« first day (458 days earlier)      last day (4491 days later) »