« first day (873 days earlier)      last day (4077 days later) » 

8:00 PM
Also, while taking a shower, I've realized that I should be able to pass const char* to that :3
super cool.
 
@BartekBanachewicz Yes and no. It can bind to an lvalue, but it's up to the underlying type to actually implement the move semantics -- the rvalue reference just gives an opportunity to use that if available.
 
@BartekBanachewicz Yep.
 
@JerryCoffin so it won't certainly harm?
 
Xeo
@BartekBanachewicz Universal reference...
 
T&& where T is a template parameter will bind to any-fucking-thing, ever.
 
8:01 PM
kewl.
it should be default then :P
 
Xeo
@DeadMG And it will even go as far as to steal from other overloads.
 
@BartekBanachewicz No, at worst it should do no harm.
 
user142019
@LucDanton are oil sands of any use?
 
@Xeo But has anyone really been far even as decided to use even go want to do look more like?
 
....
What the fuck sentence was that? o_O
 
8:10 PM
I dunno - I've only read it four times so far.
 
@ThePhD Meme.
 
Working as intended.
 
@LucDanton You’ve got to be kidding me. I’ve been further even more decided to use even go need to do look more as anyone can. Can you really be far even as decided half as much to use go wish for that? My guess is that when one really been far even as decided once to use even go want, it is then that he has really been far even as decided to use even go want to do look more like. It’s just common sense.
 
Right. OK. So it's decided - time for beer.
 
@R.MartinhoFernandes roboticus, help me.
I have to implement lexer putback and it's the suck.
can u send me the codez
 
8:13 PM
What.
 
s/h//
 
@DeadMG std::queue<token> putbacklist;
 
@MooingDuck No, a different putbacklist. For characters I read from my input iterators. Since they're only input iterators.
 
std::list<token> putbackvector;
 
Btw, I'm tired and need to get up early tomorrow.
 
8:13 PM
oh, then ignore me
 
Hm.
 
but then I have to put my position back as well
it's the unfortunate
 
I should have a namespace for predefined shaders.
Or, I should elevate the entire Shading namespace into Graphics.
 
@DeadMG std::queue<char> putbacklist;
 
Nah, just a namespace for all predefined shaders. That should help...
 
8:15 PM
I'm gonna ignore everyone except Eddie and Jan behind the bar. Bye for now..
 
@MooingDuck It's a little more complex than that.
I wrote a Position class that keeps the lexer's position, and then explicitly wrote in a function so that the current iterator and the position can only ever move forwards together.
 
if ( e ) {
  // e is true
} else {
  // e is false
} maybe {
  // can't tell whether it is true or false
}
 
now I have ten billion call sites that are *it to read the current value, and advance to move both forward simultaneously.
 
@R.MartinhoFernandes elseelse
 
@BoltClock Ooops, sorry about that.
 
I don't get it
Also I'm cleaning my bookmarks
Some of them are from 2008
"Yeah I'll read that later"
Welp I guess
 
lol
That's the advantage of mental bookmarks: if I forget them, they are automatically deleted.
 
Brain-based RAII.
 
@R.MartinhoFernandes lol - looks like DB tri-state logic
 
Oh god wikihow
 
8:31 PM
ummm
assume T is noncopyable
why can't I return move(T);?
 
Because T is a type and move(T) doesn't make sense
 
Is it movable?
 
(Real code)
 
@CatPlusPlus <3
 
static T Load (Range range)
	{
		T temp;

		temp.m_source = std::string(boost::begin(range), boost::end(range));
		temp.m_id = glCreateShader(T::_getType());

		return std::move(temp);
	}
 
8:32 PM
@EtiennedeMartel <3
What's the error
 
-3
Q: Segmentaion fault calling method the second time C++

Patrick MayerIf I add a second call to setColor I am getting a segmentation fault. I think maybe that method is changing the array pointer somehow, but I'm not sure why. #include <iostream> using namespace std; struct Color { int red; int blue; int green; }; void setColor(Color **arr, in...

 
Also ew
 
Error 1 error : class "engine::VertexShader" has no suitable copy constructor
 
Btw, Boost ranges are supposed to be passed by const&.
 
@R.MartinhoFernandes uhwh, puppy and jerry said &&
 
That should work too, but it's not what you have there.
 
Also where do you have this function and why your shader type doesn't simply take range in the ctor
 
@CatPlusPlus ctor is calling this function
 
@Mysticial arg, screen please
 
8:34 PM
@R.MartinhoFernandes yea, I forgot to change
 
@bamboon it says that you're moron.
 
> Stackoverflow is the worst piece of crap. They edit your post, delete the ones they dont like, point you to old questions that dont help you, then block your account when you tell them how it actually is. The moderators on this site have no life.
AHahaha
 
@Mysticial He still censors the word "fuck". Uh.
 
8:34 PM
> I can create accounts all day long to post garbage and tell the moderators to F Off.
FOFF
FOOF
 
FOOF EVIL MODERATORS FOOF
 
in 2013 Stack Overflow Moderator Election, 44 mins ago, by Anna Lear
> I can create accounts all day long to post garbage and tell the moderators to F Off.
 
8:35 PM
WOOP
 
Also who doesn't have a life in that picture
 
WOOT
MOOT
MOOD
 
The moderators doing their job or the moron creating accounts all day long to post garbage
 
btw
 
@Abyx Yeah, he's giving us C# programmers a bad name.
 
8:36 PM
Fuck you infinite loop.
 
SO should charge for new accounts
 
@CatPlusPlus +1
 
@R.MartinhoFernandes *Foof FTFY
 
@R.MartinhoFernandes Floop
3
 
@CatPlusPlus Like SA does?
 
8:37 PM
The mighty :tenbux:
 
hmmm
 
@CatPlusPlus I love how you managed to bash me, say Ew a few times and totally evade solving my problem
n00b.
 
for syntax highlighting, should I emit comment tokens?
 
@BartekBanachewicz I don't know what's wrong
 
@BartekBanachewicz Stop taking everything so seriously.
 
8:37 PM
Also I'm busy cleaning my bookmarks
 
@EtiennedeMartel well, I am not angry, just pointing that out
 
@DeadMG Yeepers.
 
@EtiennedeMartel It does get rid of many idiots
 
so, in theory, move should work?
 
And makes the rest of them look funny
 
8:38 PM
@DeadMG probably not. it's whitespace after all
 
It should work without move.
 
@BartekBanachewicz Weird, you always seem like you're a hair's breadth away from going apeshit.
 
Especially that there are stars reregistering over and over again and paying every time
 
@BartekBanachewicz Is the type movable?
 
@R.MartinhoFernandes Endlessly checking for and discarding them in the parser would be ... unfortunate.
 
8:38 PM
@R.MartinhoFernandes how can I tell?
 
perhaps instead I should have a special callback for comments?
 
@BartekBanachewicz MSVC?
 
@MooingDuck ICC
 
@BartekBanachewicz Does it have valid move ctor?
 
@BartekBanachewicz A constructor that takes a &&?
 
8:39 PM
Default or otherwise
 
I didn't create one
 
(gdb) p r
$11 = 0xe2bac0 U"▒▒▒▒▒▒▒"
(gdb)
 
@DeadMG you can have a different stream (channel) for comments and whitespace. ANTLR use that IIRC.
 
@CatPlusPlus Does the compiler always create one for you?
 
@EtiennedeMartel Only when all data members are movable I think
 
8:40 PM
I want to shoot whoever thought printing strings without escapes in a debugger was a good idea.
 
That would make the most sense
 
@CatPlusPlus Hmm.
 
@BartekBanachewicz make one and it will probably tell you what the real problem is
 
@R.MartinhoFernandes Hey, it's a great way to print a brick wall in your debugger.
 
@MooingDuck okay
 
8:40 PM
@CatPlusPlus and if you wrote no copy/move constructors yourself IIRC
 
It shouldn't look for a copy ctor, but I don't know what standard says
 
@EtiennedeMartel No -- the list of when it won't create one for you is disturbingly long and complex (and still really incomplete -- there are still cases where it can break things).
 
@R.MartinhoFernandes BUT BUT
 
@CatPlusPlus I think it's considered so it wont break old code. Not sure.
 
Reminds me of people complaining about GHCi
 
user142019
8:41 PM
BOO
 
I don't really remember what it was all about though
 
Jul 31 '12 at 14:06, by rubenvb
@CatPlusPlus gdb is a debug tool. It should show raw data. GHCi is not a debug tool.
So hilarious.
 
@tohecz your "solutions" suck moar than bananas. It makes users try to clean their screen — PeeHaa 54 mins ago
 
user142019
let?
 
^^ lololol
 
8:42 PM
@R.MartinhoFernandes :ironicat:
 
If the definition of a class X does not explicitly declare a move constructor, one will be implicitly declared
as defaulted if and only if
— X does not have a user-declared copy constructor,
— X does not have a user-declared copy assignment operator,
— X does not have a user-declared move assignment operator,
— X does not have a user-declared destructor, and
— the move constructor would not be implicitly defined as deleted.
 
@MooingDuck Copying can also be used for exception safety. If you have an exception in the middle of copying data, the original remains intact -- but moving leaves the original data partly destroyed, with no assurance you can move things back to restore the original.
 
hmm
there's ten million places in my lexer where I didn't correctly check for the end.
 
Woa Grooveshark still exists
 
Q: How can I fstream into range?
 
8:50 PM
std::istream_iterator(stream), std::istream_iterator().
 
is there a boost for that?
 
dunno
 
@BartekBanachewicz boost::iterator_range?
 
but you can make a Boost.Range from a pair of iterator.
 
@DeadMG also have to have the explicit type
 
8:52 PM
@R.MartinhoFernandes Sad, actually.
 
oyeah
 
repeating istream_iterator 2nd time seems redundant, innit?
 
@BartekBanachewicz Can make a utility for it if you want.
 
@DeadMG template<class T, class S> using my_make_range = boost::make_iterator_range(T(S), T());?
 
8:53 PM
Y?
 
@BartekBanachewicz Yes and no -- it's redundant to the extent that you're really going to iterate as long as the first one remains valid. It's necessary to the extent that it lets istream_iterators provide the same interface as any other iterator, so you can use standard algorithms on them with no modifications.
 
@BartekBanachewicz You can't template alias a function like that.
 
ah I see...
 
why static_cast<T>(x) is so verbose? (T)x in C# is way better.
 
@Abyx It's a lot harder to grep for.
 
8:55 PM
Why do the windows created by R# are always so fucking small?
 
@DeadMG why would I want to grep static_cast<int> ?
 
@Abyx by design
 
@Abyx (T)x is legal in C++ too. The verbosity of static_cast (and const_cast, dynamic_cast) is at least semi-intentional, to discourage their use.
 
@Abyx Casts are evil, so they want you to pay for them.
 
"discourage their use"? that's just stupid.
 
Ell
8:56 PM
Was gonna say, It's a style cast
*c
 
@Abyx why?
 
Yes you shouldn't cast
 
unnecessary casts are bad
 
@JerryCoffin works differently though
 
@Ell style_cast<post_modern>(impressionist)
 
8:57 PM
    ok. here is teh code:
            virtual Value& get(int id) override
            {
                assert(id >= 0 && static_cast<unsigned>(id) < m_globals.size());

    I shouldn't cast here? bullshit.
 
Why not pass an unsigned int there?
 
@Abyx function should take an unsigned param obviously
 
Wouldn't id get promoted to unsigned anyways?
 
@Pubby gives warnings, because strange things can happen.
 
Conversion to unsigned is not a promotion
Promotions cannot be lossy
 
8:59 PM
@MooingDuck So you can now call it as get(-12432423)?
 
@MooingDuck it's overridden virtual function. it takes int.
 
@Abyx you, to be honest, suck.
 
1 min ago, by Etienne de Martel
Why not pass an unsigned int there?
 
It's fucked up anyway.
 
@Abyx if it takes a positive offset, then change the type.
 
8:59 PM
static_cast is not good for signed<->unsigned conversion anyway
 
btw robot
 
Changing the type won't change anything!
 
I was thinking for type inference
 

« first day (873 days earlier)      last day (4077 days later) »