« first day (1136 days earlier)      last day (3823 days later) » 

5:02 PM
blargh. boost::function_types stops working on x64
 
@TonyTheLion what do you think of domain squatters?
 
user3010322
@melak47 Pat pat There, there.
 
user3010322
You'll be okay.
 
@EtiennedeMartel Yeah I figured something like that ;-)
 
@ThePhD I guess it's okay, no need to detect calling conventions on x64, and I'll just have to make my own function argument stringifier template thing >_>
 
user3010322
5:07 PM
Wat.
 
user3010322
Function argument stringifier?
 
I need the function signature as a string
 
Xeo
@LightnessRacesinOrbit Well fuck you, too.
 
I was returned as a string, and that's how I got here today
 
@Pawnguy7 ugh
 
user3010322
5:07 PM
@melak47 y
 
@ThePhD so I can pass it to this API so it can bind a script function to a C++ function :v
 
user3010322
@melak47 typeid( function_typedef ).name();
 
user3010322
It doesn't have to be human-readable. Just specific.
 
Bin is why.
 
@screenmutt it's largely the same benefit as reading the newbie hints before barging in with inane questions
(it's a way to keep sane)
 
5:09 PM
@ThePhD It doesn't have to be specific- at least, not typeid(x).name();.
 
user3010322
Then typeid is more than good enough, yeah?
 
@ThePhD it kinda does have to be human readable. the API needs to parse it, and expects it in a more or less valid C++ syntax
 
@ThePhD Er, no.
 
user3010322
o.0
 
user3010322
What weird API are you using? :c
 
5:10 PM
@sehe I did actually read those.
 
typeid(x).name() doesn't have any useful guarantees at all.
except that it exists.
 
@screenmutt Woot. Then, search SO for the obvious answer to your faq!
 
@sehe I did, but can't seem to come up with the right terms.
 
not our problem
 
@ThePhD an API that wants a declaration for the script function to which it should be bound. I'd like to generate that automatically :p
 
user3010322
5:11 PM
It doesn't just take a function pointer or a functor?
 
user3010322
That's bizarre as fuck.
 
for the C++ function, yes
but it wants to know how the function should be declared in the script
 
most APIs just take a function type as signature, if they require one at all.
 
how do you let a script call a function when it doesn't know what parameters it takes, or what it returns
 
Xeo
Take a look at Boost.Python for interface ideas?
 
5:13 PM
@Xeo :D
 
Xeo
@LightnessRacesinOrbit Don't even expect any upvotes from me.
 
well, usually, the function is passed a predefined signature that's flexible enough to describe virtually any actual signature.
 
@Xeo You refuse to upvote your own question
It's okay — I don't need yours. Got plenty.
 
Xeo
SO doesn't allow me to upvote my own posts.
 
5:14 PM
for example, Lua functions are always int(*)(lua_State* L), where the C function inspects the Lua stack to determine the arguments, and then errors if they are incorrect.
 
Xeo
:P
 
And, really, they're all "from you" anyway...
 
@DeadMG hm. well this one wants "int func(float, bool)" :/
 
well, you can't automatically generate that in C++
 
user3010322
The fact that it asks for that in string form is slightly.... retarded, on it's part. o.0
 
user3010322
5:17 PM
@DeadMG You can sort of generate it with variadic tempaltes
 
user3010322
You can get the function return type, and all the argument type names separately
 
you can't really get the argument type names.
not for arbitrary argument types.
 
@screenmutt This and this are at least closely related. The latter probably does more to hint at (one reason) why: to support separate compilation, so you don't have to re-compile all your code every time you change anything.
 
Wow, 3 hours and 17 minutes... and that's only part 1 :D
 
you could special-case some more common ones but that's about it.
 
5:17 PM
@FredOverflow FFS Typo in the title.
@melak47 lol, haha
Tells us what is this thing, so we can all avoid it in the future.
 
AngelScript :E
 
@FredOverflow So it's about as interesting and concise as Haskell, then
 
user3010322
I almost considered AngelScript
 
user3010322
And then I jumped ship.
 
user3010322
Just use Lua instead. :3c
 
5:20 PM
D:
 
Why do you put up with it? School assignment?
 
haha. I haven't had any programming assignments for a year.
it's just math and management crap now ._.
 
Then drop it?
Oh, haha, that is a C++ library? lol
 
Just because you know qualifications don't mean anything doesn't mean employers do
 
but I don't like Lua :(
 
5:22 PM
I thought it was some C crap.
 
@R.MartinhoFernandes they have a separate C interface, which they don't maintain
this IS the C++ interface. :E
 
@melak47 C has been formally deprecated by ISO
in my dreams
 
lol
 
@LightnessRacesinOrbit ? (Not expressing agreement or disagreement, just wondering why this random assertion came up)
@melak47 To be honest, even in a C API that would be a horrible interface.
If your program includes a parser that will mostly consume string literals, that's a sign something might be wrong.
@LightnessRacesinOrbit Oh, I think I get it. I didn't mean for him to drop his course, but to drop the library.
 
user3010322
@melak47 Maybe try Terra instead.
 
5:27 PM
@R.MartinhoFernandes now you tell me! I just disenrolled ;_;
 
Xeo
@FredOverflow Argh, I just can't listen to that guy
 
@Xeo Total fanboy?
 
Xeo
No, his voice n stuff
And how he talkes
 
@Xeo I can imagine listening to him, but at least in this video the sound is pretty poor (at times) so you can barely hear or understand him, no matter how badly you might want to.
 
@Xeo You didn't even make the first 17 minutes, did you? :)
 
Xeo
5:30 PM
@FredOverflow I didn't even make the first minute :|
 
whats that video about ?
 
> C++ template metaprogramming is hard to use, analyze, or debug. The main reason is that compile-time C++ is a functional language with abominable syntax. The key to successful metaprogramming is to become familiar with functional programming and develop a language to describe C++ metaprograms in pseudocode.
> Such a pseudo-code language already exists and is called Haskell. I will introduce Haskell in parallel with equivalent C++ meta-code. I will show how to read and write complex metaprograms in C++ using Haskell. Finally, I will show what a monad is and how to use it to explain "runnable templates" in C++.
 
@R.MartinhoFernandes Oh.
Well, okay then.
Kate Gregory retweeted one of my tweets. Now I'm fucking famous
3
 
(inb4 "infamous :laffo:")
 
5:40 PM
Enjoy your twelve minutes.
 
Hey, did you hear, my Twitter got compromised a few weeks ago
 
Too late now:)
 
@LightnessRacesinOrbit Which one?
 
@FredOverflow The One In Which I Linked To An Answer About Using Iterators Not For Iteration
"Always use iterators for loops!" No, don't... #cplusplus #stackoverflow http://stackoverflow.com/a/20196136/560648?stw=2
Meanwhile, thank heavens:
14
A: Clicking on `Add Comment` used to focus on the comment area but it doesn't anymore

OdedIn the effort to add the add comment link to low rep and anonymous users, I flipped a Boolean condition around, but forgot to make the change down the line to the call that focuses the textarea. The textarea will gain its focus on display once we build out (should be rev 2013.11.25.1177, but wit...

 
5:46 PM
@LightnessRacesinOrbit Is the "for" in "Always use iterators for loops" the C++ for?
 
@FredOverflow No
 
Ell
meh youtube doesn't work for me anymore :S
 
@FredOverflow For the record, I try to delimit keywords with backticks, even in tweets and such. Unfortunately, since most people don't, the absence of backticks in my posts goes unrecognised as important.
 
@Ell That's good, right?
 
The original text was "always use iterators for iteration! No, don't..." but this was wrong in an ironic way
 
Ell
5:51 PM
@R.MartinhoFernandes not when I want to listen to lectures :(
 
@LightnessRacesinOrbit What else would you use for iteration? Hint: Algorithms are one level above iteration.
 
@FredOverflow The point is that his loop was not really performing iteration.
 
I don't know what to do tonight.
 
Okay, not at that level.
 
@R.MartinhoFernandes You should get drunk.
 
5:53 PM
Iterating at the loop level with a counter enables his [non-iterating] algorithm layer to make sense
 
@FredOverflow Would need to call friends at the last minute. Not gonna happen.
 
@R.MartinhoFernandes One needs to be with friends to get drunk? Shit..
 
Drinking alone is depressing.
Besides, I don't have any decent alcoholic beverages at home.
 
Not after a couple of drinks.
 
Only a couple of beers that belong to my flatmates.
 
5:54 PM
You have flatmates? Just drink with them!
 
Ell
your flatmates aren't your friends? :/
 
They moved out.
 
Ell
aww now I feel sad :(
 
I haven't gotten to know the new ones much.
Still, I would have to go and buy some alcohol for myself.
Not in the mood for that.
 
@R.MartinhoFernandes You'd be drinking in the Lounge. That's either more or less depressing, depending on how you look at it, but I don't think it ever feels depressing at the time
score some drunk repz
 
6:00 PM
Anyway, off I go.
 
int x = 0;
while (x >= 0) ++x;
What value does x have after the loop in Java?
7 out of 8 students get this wrong :-/
 
gonna be INT_MIN I'm guessing.
 
right
INT_MIN was the only possible answer with a negative value.
 
@StackedCrooked sometimes colirus' text editor stops being editable after compiling for me :/
 
What do the students say?
@melak47 It's telling you that you already won. The game's over.
 
6:05 PM
The other possible choices were 0, INT_MAX, some exception, infinite loop.
 
@melak47 you mean it stays yellow?
 
I can't say I'd know offhand what Java's overflow behaviours are for signed integers. But this makes sense
 
@StackedCrooked no, it goes back to normal colors, but I can't edit anyway
 
@melak47 Browser? OS? (yeah, it makes a difference)
 
@melak47 Could it just be because you bashed your head on the keyboard too hard upon seeing the results of attempting to compile your pitiful code? Give it a minute to recover.
@StackedCrooked No it doesn't
 
6:07 PM
Ok.
 
I've used Firefox on my washing machine for years with no problems
 
@StackedCrooked Chromium, Win7
 
Chromium, not Chrome, right?
 
yes. (yeah yeah my fault for using unstable shit :p)
 
I'm going homium
Chromium
bye
 
Ell
6:08 PM
Bai
 
@melak47 ok. wontfix :D
refreshing should always work
 
yeah, it does :p
 
I'm considering to add a new Coliru feature.
 
Ell
mobile support?
 
/1, /2, ... would load Coliru with its own memory
So if you want to keep multiple programs in Coliru you can assign them a number.
Maybe names would be better.
But it would only be localStorage (not server side).
 
Ell
6:20 PM
lets just write a compiler in javascript xD
 
@StackedCrooked do you have MSVC on coliru?
 
nope, it's just an Ubuntu Server with apt-get packages
 
@Ell javascript -> javascript?\\
 
user3010322
6:35 PM
@melak47 They'd have to legit install VS on the computer, or find the VC++ compilers and know the compiler arguments to give it. It'd be really tough.
 
user3010322
LiveWorkSpace has VC++, though, I think.
 
user3010322
Not sure how they're running it though.
 
meh, it was not that important :)
@DeadMG typeid is actually good enough on MSVC, since it produces readable stuff :)
 
user3010322
Seee
 
user3010322
I told you. :c
 
6:38 PM
0
Q: Fifteen close votes on one question in low-quality queue

Kevin PankoFor this particular review: http://stackoverflow.com/review/low-quality-posts/3437631 The question got fifteen close votes over the course of an hour. Seems like that's a lot. This could indicate a bug.

^^ lol
 
user3010322
@melak47 DOesn't it produce mangled stuff, though, for classes?
 
user3010322
Then again, if it's a script I highly doubt it's going to directly use your classes.
 
user3010322
Ah well.
 
@ThePhD float testme (class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)
 
user3010322
Well, that's not mangled but it's got some extra "class" and "struct" in there.
 
6:41 PM
also, I'm not using the function name from the typeid
 
user3010322
Shrug.
 
having to pass the name the function should be exposed as as a string isn't too bad :p
 
user3010322
Yeah.
 
user3010322
This is the kind fo stuff my reflection system would take care of...
 
user3010322
.... IF CLANG WASN'T SUCH A CUNT.
 
6:43 PM
lol
 
Ell
@ThePhD did that get anywhere?
 
user3010322
When I downgraded to VS 2012 and built part of my reflection system, I could properly enumerate every type within a translation unit, get offsets, function names, etc.
 
user3010322
Even of identifiers made with Unicode (like melak's example with the bananas)
 
user3010322
But, then I tried setting it all up to work with VS 2013.
 
user3010322
And yet again, it didn't work out.
 
user3010322
6:53 PM
And I refuse to not having variadic templates. :3
 
user3010322
@melak47 The Borderless window almost works.
 
user3010322
There's a few issues that're making me pull out my hair, like not being able to move the damn thing. =[
 
There were only five close votes. The rest were all flags that got misrecorded. — animuson 15 mins ago
^ I fail to see how that explains anything
 
@ThePhD I have a line for that in WndProc :/
 
user3010322
I see it.
 
user3010322
6:56 PM
It might not be working because I'm doing RAWINPUT
 
user3010322
Which interecepts all input calls, so.
 
I have raw input for mouse stuff too
 
user3010322
And the BOrderless INput is still ticking for you?
 
yeah
well, no, but yeah (I don't get mouse clicks, but still get all messages that normally occur when the cursor is moving over the window)
like NCHITTESTTHINGY
 
user3010322
Hm
 
6:57 PM
do you have show()s in all the right places?
 
user3010322
Nah, it was a derp in my code.
 
user3010322
if ( NoFlags( window.GetStyle( ), WindowStyle::Border ) )
	break;
 
@sehe Or rather, they were miscategorized "recommend close" votes from the review queue.
 
user3010322
Should be "if it has the border flag, then do NCHITTEST regularly"
 

« first day (1136 days earlier)      last day (3823 days later) »