« first day (877 days earlier)      last day (4070 days later) » 

Xeo
5:00 PM
@LucDanton Too bad he's UTC-8, though
I only have ~3 hours where I can easily chat with him without cutting into my sleep
Anyways, time to head home
See ya in a bit
 
I am rather hungry
 
Nope -- that's exactly how I live (or would, if I drank coffee, anyway). I just wish they'd let me eat the birds that live near my house:
http://i1212.photobucket.com/albums/cc452/jcoffin01/_DSC0805.jpg
Canada geese and a duck or two -- yummy!
 
@R.MartinhoFernandes Hee hee.
 
@DeadMG There's a solution for that.
 
@R.MartinhoFernandes Solutions cure thirst, not hunger (well, mostly, anyway).
 
5:11 PM
template<typename T, USAGE([](T& t) { t.bar += 3; })>
constexpr std::true_type test(int)
{ return {}; }
Starting to look cute already.
 
@R.MartinhoFernandes It won't be cooked for half an hour.
 
Lol.
 
There are way too many stars in here.
 
@StackEverybody youtube.com/…
 
5:17 PM
Whoa, five stars in one screen. What the hell.
And six if you scroll a bit up -.-"
 
lol, 6, buy bigger screen
 
Star trolls.
 
Oh, the good old for each delete.
To whoever's cleaning up the stars: thank you.
 
user1182183
Lol why do you guys care so much about stars XD
 
Xeo
Yay, home
@LucDanton If only one could ditch the [](T& t) part~
 
5:24 PM
Funny you should mention that, I had USAGE( lvalue.bar += 3; lvalue. baz(4); ) working right now.
rvalue doesn't quite work unless it is itself a macro though.
 
@EtiennedeMartel You're welcome.
 
Xeo
@LucDanton Yeah, I had that too
 
(Also this is not serious. I still want something closer to BOOST_CONCEPT_USAGE.)
 
Xeo
@LucDanton What exactly does that thing do?
Insert a hard-error if T is not usable like that?
 
Yeah it's one of the earliest trick to constrain templates, Bjarne mentions it (possibly in one of his books, and at least on his personal page). The original trick is writing a member of a template, and forcing instantiation by e.g. taking the address in some destructor body.
 
5:26 PM
who the fuck calls a library xrandrx
oh, there's no x at the end. nvm.
 
I think I'll take a break from thinking about that stuff right now. Hunger interfering with my thinky bits.
 
Ell
what does xrandr stand for anyway?
I always read "x random resolution"
 
Xeo
lol?
 
I don't know if it's true, but it's not that surprising.
 
5:31 PM
Reading about the reactions it feel like one of those "Okay everyone, let's all be creative" exercise. Or maybe they just kept the actually useful employee conclusions to themselves.
 
Game developers play games all the time.
 
> One employee was fired after they said that “the ease from going to point A to B on the world map” was one of the top features of the game.
 
Or rather, play test.
 
NOT WORLD-MAPPY ENOUGH D:<
 
Xeo
@LucDanton Any reason you want to ditch that form, or are you just exploring options?
One reason I could see is improved diagnostics.
Well, maybe.
 
5:37 PM
Soft-errors can be turned into hard-errors but not vice-versa.
I want EnableIf<Foo<T>> and Requires<Foo<T>> to both work off the same Foo. Well, not really. I want it to be convenient to write some Foos for both to work. But concepts in the style of Boost are verbose and not reusable for EnableIf.
 
Xeo
Ah, k
 
-4
Q: explicit operator + in C++

David Faizi'm just playing with the + operator & i cannot figure out how to declare it and use it 'explicitly' please help the code is below : class compex{ int real; int img; public: compex(); compex(int,int); compex& explicit operator + (const compex& P1) friend os...

 
Welped.
I just watched* almost all of that talk that R.Martinho sent me.
For one, I DO NOT REINVENT THE STANDARD LIBRARY. D:<
For two, it almost makes me want to drop out of university. D:
Because everything he talks about is in university. ;~;
And the workplace is a nightmare too q___q but I have to get paaaaid.
 
Xeo
@ThePhD Wait, what?
 
Anyone proficient with SCons here?
 
Xeo
5:39 PM
@BartekBanachewicz Robot, likely
 
@Xeo i meant right now
 
Watched, sorry.
 
I need to link linux shit to my .a
 
Hm.
Maybe the compiler is generating a copy-constructor for me somewhere.
But I have no idea where it is generating it because VC++ is an asshole like that.
 
wow.
Minicraft just built.
it was unexpected
of course, got a segfault.
 
5:42 PM
@BartekBanachewicz How so?
 
@R.MartinhoFernandes I don't want a user of my engine to need to -lXrandr.
 
Hm.
I need to do up-swizzling now.
 
Can you link that statically?
 
... Ergh.
 
5:44 PM
Can I?
 
Anyone know the syntax for returning an array from a function?
 
@ThePhD std::array<shit> foo()
 
I meant a basic array.
I have that overload already.
 
don't use a basic array.
 
=l
 
5:45 PM
simple as that.
 
@ThePhD You can't return arrays by value.
 
Well that's shitty.
 
48 secs ago, by Bartek Banachewicz
don't use a basic array.
 
Yes, thank you for repeating.
 
5:46 PM
@ThePhD since basic arrays aren't copiable or movable....
 
But a struct with int arf[50] is copiable.
 
@ThePhD if it's passed in as a param you could return it by reference. Or, as a pointer/reference to dynamic memory, but that's moving from bad to insane quickly.
 
Sometimes, dese rules.
 
2 mins ago, by Bartek Banachewicz
don't use a basic array.
 
They confuse me.
 
5:47 PM
@ThePhD I forgot that loophole. But yes, that is a loophole.
 
@BartekBanachewicz Yes, thank you, I can read.
 
I sometimes doubt that honestly :P
why do you have to do everything the hard way?
 
Okay. "I'm going to use std::array, but I'm going to talk about why I think that's a really stupid implementation/standard decision to not have int[] copiable".
Does that sufficiently explain my motives for you to shut up?
 
T[] is C
are you really asking about C subset?
 
@MooingDuck If you ever recommend std::array over arrays, then no you didn't forget anything because the former is a 'reification' of that fact!
 
5:50 PM
Damn this segfault is coming from X insides.
this is gonna be messy :/
 
> Returns an iterator pointing to the first element in the range [first, last) that is not less than value.
 
Xeo
2
Q: Call lambda without binding it to an identifier

user1233963Browsing some internet board I encountered this little challenge: "Implement a recursive anonymous function in your favorite language" Obviously this is easy using a std::function/function pointer. What I'm really interested in is if this is possible without binding the lambda to an ident...

 
The description for lower_bound is confusing.
 
Xeo
This is not even possible in C++Next with polymorphic lambdas. :/
 
You cannot copy int[] because it is not a complete type.
 
Xeo
5:51 PM
@EtiennedeMartel Yeah, it's basically >=.
While upper_bound is just >.
 
@EtiennedeMartel yes. It returns an iterator to the first element greater than or equal to.
 
Xeo
So with pair(lower_bound(), upper_bound()), you get equal_range().
 
I got a vector with sorted elements. I cannot use set or priority_queue or make_heap or whatever.
I want to keep it sorted when I insert something.
 
Xeo
v.insert(upper_bound(v), stuff); should do
 
@EtiennedeMartel usually you're going to want lower_bound
 
5:53 PM
Why can't you use make_heap?
Oh, sorted.
 
@EtiennedeMartel are there duplicates?
 
Xeo
I think.
 
They're sorted by priority, with highest priority first.
 
lower_bound can easily detect duplicates, upper_bound can't as easily (IMO). Otherwise, they're the same.
 
5:54 PM
Does that matter? If they're truly duplicates, how can you tell where it was inserted after the fact anyway?
 
Xeo
Yeah, v.insert(std::upper_bound(v.begin(), v.end(), stuff, std::greater<>{}), stuff); should do it.
 
if you don't need to detect duplicates, either works.
 
Xeo
@MooingDuck If you want it to be stable, though, you need upper_bound.
 
NVidia site already allows 700M series drivers download
 
5:56 PM
@LucDanton I was remembering for when I was wrapping a vector in a map interface, I realize now that I needed to detect duplicates, he doesn't. Do what Xeo said.
@Xeo depends on if "newer" goes "toward the back" or "toward the front".
 
@MooingDuck Don't the insert members do the check for you?
I'm really confused right now.
 
@LucDanton I was implementing the insert member, atop a vector<pair<key,val>>
 
Xeo
@MooingDuck boost::flat_map? :)
 
@Xeo yeah, I didn't know about that at the time :(
 
5:57 PM
@Xeo Where's that from?
 
Xeo
Boost.Container, I think
 
@Xeo yes
 
sup all
 
Xeo
We also have a hand-made flat_map somewhere in our codebase
0
A: Call lambda without binding it to an identifier

M M.Close enough or not !? struct A { void operator()() { [&]() { (*this)(); }(); } }; To call (*(new A))();

> (*(new A))()
 
some guy was downvoted on askubuntu because he recommended driver source download
ugh crap.
 
6:06 PM
yay free of work and Linux
2
 
how is it my fault that Intel drivers suck :/
oh wait...
 
Xeo
@MooingDuck: A()() for C++03 :P
 
@ScottW what?
I didn't understand though.
hm, you know what
I will boot my workstation from this pendrive
and see how it goes there
 
@Xeo I was concerned about Most vexing parse
 
if it segfaults, its my fault
if not, it's driver's
 
Xeo
6:09 PM
@MooingDuck That only applies to declarations
 
I told my mother the worst thing about work was Linux. She said, "I thought you worked with C++?".
 
Xeo
Oh wait.
 
@DeadMG lol
 
Xeo
:8203857 Well, if you had A(bar);, then that would also trigger the MVP
I think A(bar)() too.
 
@DeadMG lol
 
Xeo
6:11 PM
But A()() can only be seen as a temporary + invokation, as far as I can tell.
 
she's got the point
 
Xeo
@Xeo: We can call it in the way you said, but an identifier should not has parentheses. So, it's just a way to call it. But operator() is not an identifier. — M M. 35 secs ago
 
user142019
@sehe lol
 
user142019
6:12 PM
@BartekBanachewicz I can confirm my dick is fairly large.
2
 
user142019
Also, lol.
 
@Xeo he's got a point, there's no identifier.
 
Xeo
No he doesn't, operator() is the identifier.
Same as operator[] or operator+ is an identifier.
 
@Xeo operator() is not an identifier.
it is a name, but not an identifier.
 
@Xeo no, it's a name, identifier's cant contain ().
 
6:13 PM
it is a keyword, an openparen, and a closeparen.
 
user142019
operator() is a reserved word followed by an opening parenthesis followed by a closing parenthesis.
 
wait, operator() can't be static? "error: ‘static void A::operator()()’ must be a nonstatic member function"
 
No, because static operator() is the ctor
Or: you can't overload () on a class, because that's ctor syntax
 
@CatPlusPlus ctors aren't static either.
 
Yeah that might've been badly phrased
 
Xeo
6:17 PM
Okay, let me be more specific: It's the operator-function-id.
 
@CatPlusPlus A::operator() seems unambiguous, but I see
 
@Zoidberg classic
 
@CatPlusPlus Yeah, I get what you mean (they can be invoked without a preexisting instance of the object (otherwise they'd be pretty useless).
 
@MooingDuck But then there's no need for it to be called operator()
 
how do I close X server?
 
6:18 PM
@CatPlusPlus true enough
 
Xeo
Names for syntactic categories have generally been chosen according to the following rules:
    — [...]
    — X-id is an **identifier** with no context-dependent meaning (e.g., qualified-id).
 
@BartekBanachewicz What for?
 
user142019
@BartekBanachewicz send SIGKILL.
 
sudo /etc/init.d/gdm stop
 
@CatPlusPlus Wouldn't operator() be a call operator or something like that?
 
6:19 PM
NVidia driver install @Cat
 
Xeo
@MooingDuck @DeadMG ^
 
Ell
I thought ubuntu had ldm?
 
@BartekBanachewicz Just restart it afterwards
 
Yay, I solved all the problems!~
 
@ShotgunNinja In non-static context, yes
 
6:20 PM
I even have upward-expanding swizzlers.
 
The issue is with static operator() because it's impossible to overload
 
@CatPlusPlus Yeah, then why would you even try to overload static operator()? Is someone not reading the language specs again?
 
@Xeo there's also a whole chapter on identifiers that says otherwise.
 
It's that whole "How come operator"" _foo is fine" all over again.
 
yea
i was damn stupid to think it will just run
 
Xeo
6:23 PM
@LucDanton Oh, there was a discussion on that?
 
lol
3
Q: Underscores, names and literal operators

thbMy question regarding underscores in names is partly answered here, but either the answer is incomplete or I do not fully understand it. Sect. 2.14.8.7 of the C++11 standard declares this literal operator as an example: long double operator "" _w(long double); Besides declaring the operator, ...

 
Xeo
Oh, I thought in here.
 
Ell
@BartekBanachewicz are you on ubuntu trying to install nvidia drivers?
 
@Ell i give up on this shit
if you want to try it, latest version is buildable
 
Ell
@BartekBanachewicz There is a gui tool for it
 
6:33 PM
@Ell i am done, at least for a few days
 
Ell
@BartekBanachewicz I'll try next time I'm in ubuntu, but atm am busy with windows
actually I'll go in vm
 
k
vm won't help
i doubt it supports 4.0 OpenGL
 
Ell
Hmm.
Worth a try
Do I have to use Sehe's one?
 
no
I wrote my scripts for Engine and minicraft
Engine requires Scons, minicraft as for now uses regular make
 
Xeo
Damn, I should go shopping for food. :|
Somebody wanna go for me? :)
 
6:42 PM
@Zoidberg What texture coordinates did you use for Vector3?
uvw?
or tuv?
 
I should really be replacing these indices with iterators in those for loops.
But without auto, it's such a pain.
@Xeo If you pay for Fedex, sure.
 
You're working in not-C++11 ?
 
@ThePhD how about xyz?
 
@BartekBanachewicz That's what I was gonna say...
 
@ThePhD Well, here's the thing.
We're still stuck on VS2008, but there's a great desire to move to VS2012.
 
6:44 PM
... o_O
2008?
 
For the engine, yes.
 
What the hell kind of nonsense are you doing to yourself?
 
Tools are on VS2010.
 
.... O___o;
 
It's a great blend of C++03 and C# 4.
 
6:45 PM
Migration should not be hard from 2008 to 2010. The code shouldn't be incompatible.
 
huh
 
That said, here's the problem.
We have to support iOS, Android and Flash (and PC, but that's for testing).
 
VS spontaneously decided that I can't start my application with debugging.
 
Oh.
 
Android uses GCC, iOS uses Clang, and PC uses MSVC.
So we could move to C++11.
(At least, once we switch to 2012).
So, you might be wondering "what's the issue, then?"
 
6:46 PM
MSVC is the lowest common denominator there. Switching to 2012 would put you at the bracket-lowest with GCC and Clang.
 
The issue is Flash.
 
... Oh. Flash.
 
@EtiennedeMartel exactly
 
What the hell, Flash ?
 
that's what Steve Jobs said long ago
 
6:46 PM
... Flash ?
 
We're using Adobe's FlasCC thingy, which is a LLVM backend that outputs ActionScript.
 
Fuck Flash
 
Oh.
Dear lawd.
 
Problem is, they use LLVM 2 for their front end.
 
if it's an LLVM backend, you can use Clang with it.
 
6:47 PM
So, until they update their shit, no dice.
 
oh, seriously?
 
That's pretty dickles right there.
 
let's now laugh at Etienne for a while
 
Ell
@BartekBanachewicz are there makefiles for Engine too? I can't see any atm
 
@ThePhD Whose dickles are pretty?
 
6:49 PM
Think I'm gonna with UVW
@ShotgunNinja Yours, honeybunches. <3
2
 
@Ell SConstruct :P
 
Ell
is that sehes one? :3
 
@ShotgunNinja Question, TU or UV for Vector2 texture coordinates? And, TUV or UVW for Vector3 texture coordinates?
 
@DeadMG To be fair, it's a "kinda still in development" thing.
 
@Ell no, it's mine. There are no sehe files there. I based on them at first, but fuck make
 
6:51 PM
@ThePhD UV and UVW, afaik
 
> FlasCC uses a version of LLVM-GCC 4.2 with a custom LLVM backend that generates ActionScript bytecode capable of running within the Flash Runtime.
 
@BartekBanachewicz No target fuck found.
 
make love !war
 
No rule to make target 'love'.
 
can you assign a member function to std::function?
 
6:52 PM
@TonyTheLion bind
 
posted on March 11, 2013 by Eric Battalio

The Advanced Developers Conference 2013 takes place May 7-8 this year with sessions on building modern device apps, drivers, graphics development, debugging, creating and consuming cloud services, performance and much more. Here are a couple session descriptions cribbed from the ADC site to whet your appetite: Building Modern Device Apps with C++. C++ is ideal for mobile device applications b

 
@TonyTheLion You need to bind it.
 
Ell
I see no scons file :3
 
Ell
6:54 PM
Damn sorry, I forgot about the branch again, my bad
 
> Make absolutely sure you got develop-2.0 branch of Engine
 
This answer needs some downvotes.
 
@GeorgeEdison why?
 
> "So u cant generate using 32bit compiler a 64bit code as u r asking for upward compatiblity."
 
@GeorgeEdison wtf
 
6:55 PM
isn't it true?
 
I don't know, my face is a squirrel.
 
He can't type for shit but jesus it's a 2-year old answer
 
exactly my point here
 
@CatPlusPlus 2-year-old answer, or an answer written by a 2-year-old?
 
that should be edited, not downvoted
 
6:57 PM
@CatPlusPlus Well, I guess @GeorgeEdison decided to go and check out his old questions.
 
user142019
@ThePhD uvw.
 
Hokay.
Up and down swizzling so complete, it hurts.
 
What's the best way to insert at the beginning of a vector? insert(begin(), ...)?
 
push_front ?
 
Ell
@BartekBanachewicz meh sorry ima give up too until I boot into it proper. cc1plus: error: unrecognized command line option '-std=c++11' xD
 
6:58 PM
Albeit it's a really bad idea.
Because you're going to be shifting the contents of the vector down by one.
 
@ThePhD It's a vector of pointers, and it's not a very large one at that.
 
Oh, then go nuts.
You may want to consider iterating in reverse order, however.
 
@ThePhD Vector doesn't have.
 
Just to keep push_back instead of push_front.
@DeadMG Oh. I thought it did have it.
How horribru. :c
insert(begin(), ...) it is.
 

« first day (877 days earlier)      last day (4070 days later) »