« first day (1149 days earlier)      last day (3814 days later) » 

9:00 PM
they're made in Germany
 
@Rapptz Oh my.
 
well you need some PU to connect to USB
dunno what's so strange about it
 
What's strange is that it is not a feature.
 
unless you could reprogram it I guess
 
> USB charging cable. It has wires inside!
 
why you'd want to reprogram your keyboard I don't know
 
how about this?
 
@Rapptz I think the stuff under the space bar would bother me :/
 
user3010322
Your fingers nor eyes would ever have to behold it. Christ, you're all picky. <__>
 
lol
I'm glad I'm not picky about my keyboards
makes searching 100x easier
 
9:03 PM
@DeadMG to be able to plug it into any computer and still be able to use custom macros
 
How interesting.
 
I have a question about C. Is this the right place?
 
I'm not picky. standard keyboard layout, no extra keys in odd places and I'm happy :D
 
@GregRos Absolutely not.
 
@GregRos no
 
user3010322
9:04 PM
Who takes their keyboard to someone else's house and plugs it in for a game of CoD?
 
@ThePhD people who have social lifes?
 
pro gamers.
 
@BartekBanachewicz lol?
 
@BartekBanachewicz Poe's Law?
 
@R.MartinhoFernandes I think gaming with friends IRL is social
@Rapptz ?
 
9:05 PM
Oh you're serious
 
well I am
 
our lan parties are a great way for a meetup
 
@BartekBanachewicz And why would not doing that mean you don't have a social life?
 
yeah
 
9:05 PM
there :)
 
but you'd need to bring your whole machine with you
not just the keyboard.
 
@R.MartinhoFernandes it wouldn't?
 
@DeadMG But then they mix and match.
@BartekBanachewicz Then your reply was either meant as a joke or stupid.
 
user1804599
for (Dog dog = animal as Dog; dog != null; dog = null)
{
    ...
}
 
user1804599
lol
 
9:07 PM
@R.MartinhoFernandes both
@rightfold what the fuck
 
> Black key switches (Keystroke feedback: none, Force required: 60 g)
 
@Rapptz linear. Kinda bad for typing.
Good for shooters and games requiring you to hold keys pressed.
Also my friend started making random pull requests to Harvest :3
 
I'm done looking at keyboards
it's been an hour
I'm bored
 
@Rapptz Now you know how I feel when I shop for one :P
 
well I saw maybe 30 decent keyboards that I wouldn't have minded.
 
9:09 PM
 
user3010322
@TonyTheLion What the fuck. <_>
 
Oh noo, design patterns. People usually remember just the singletons anyway.
 
@Rapptz lounge disapproves.
 
Can I ask a question?
 
user3010322
9:10 PM
That's soem SERIOUS abstraction.
 
user3010322
@TonyTheLion YES, I WILL MARRY YOU.
 
user1227304
Hey guys! Is the Arduino coded in C or C++?
 
@ThePhD I'm already married
 
user3010322
@AnalyticalInsanity Neither.
 
user3010322
@TonyTheLion q_q
 
user1804599
9:11 PM
@TonyTheLion lol
 
user3010322
My hopes and dreams, shattered.
 
user1227304
@ThePhd you know what I mean! :P
 
@ThePhD oh baby, I still love you.
 
> Currently non-standard event.x and event.y properties are used which do work on Chrome but do not work on Firefox.
The same result can be obtained using event.clientX and event.clientY.
interesting
 
user3010322
@AnalyticalInsanity The Arduino can be programmed in C, C++, and Java-like Processing language.
 
9:12 PM
@ThePhD with gcc 4.2 prolly
so much for c++
 
user3010322
Just get a C++2C compiler if you want to program embedded in C++.
 
user3010322
But be careful of ~~~~bloat~~~~
 
@ThePhD FFS
just get rPi :P
or galileo
 
or that keyboard
 
user1227304
9:15 PM
Oh god. Arduino >> rPi
 
user1227304
At least imo
 
Ell
@AnalyticalInsanity different purposes really
 
I only know about Arduino because of SO.
 
user1227304
@Ell Ya
 
Ell
I bought an arduino uno the day it came out
 
user1227304
9:17 PM
I might be biased. I only have experience with an Arduino
 
user1227304
What is the Pi better for?
 
user3010322
Arduino's cost a lot of money. <.>
 
You just gotta love Skeet
 
user3010322
@AnalyticalInsanity IIRC, Pi is friendlier with networking?
 
Ell
@ThePhD they are cheap as chips!
 
user3010322
9:17 PM
@Ell Maybe where you're from. >.>
 
user1227304
@ThePhd Not really. $30 for an Uno, 16$ for a Micro
 
@TonyTheLion I don't get it :/
 
user3010322
Charging me 40 USD, 20 USD, and 60+USD for the bigger ones.
 
Ell
get a basic stamp
or make your own microcontroller, that would certainly be a learning experience
 
@AnalyticalInsanity Yes, those 16MHz are going to take over the same uses as the RPi, no doubt.
 
user1227304
9:18 PM
@ThePhD Like the mega?
 
user3010322
@AnalyticalInsanity Yeah, I have a Mega.
 
user1227304
@R.MartinhoFernandes What do you mean?
 
user1227304
@ThePhD How is it? I've got a Leo.
 
I mean that when someone says the RPi is cheaper, mentioning the Arduino Micro is silly.
 
user3010322
@AnalyticalInsanity Slow. Programming and building this door unlocker is tough.
 
user3010322
9:20 PM
I really wish there was a true tinkerer/hackerspace in my area. There probably is, but a lot of them are snoody-tooty high-collar ones. Having a hard time finding a regular one that I can get to. :c
 
Ell
Okay. Stupid question here. Can 0.0 be represented in floating point? Of course it can, right?
just all 0s?
 
user3010322
Yes.
 
@Ell That's zero...
 
Ell
@R.MartinhoFernandes I'm just insane because I have this cray cray bug
 
user3010322
ALl number systems can represent 0. That's like a fundamental, universal property.
 
Ell
9:21 PM
it looks as if 0 is going to 6.95336e-310
 
@ThePhD Erm, no.
 
user3010322
@R.MartinhoFernandes Okay, most.
 
user1227304
@Ell Whoa how is that happening?
 
Ell
@AnalyticalInsanity I don't know o.O there is obviously something funky happening
 
user3010322
IIRC I remember some book putting that as a cornerstone of societal development: "Concept of 0"
 
user1227304
9:22 PM
@Ell What expression is returning that?
 
user3010322
Next cornerstone: "Concept of void*" <3
 
user1227304
@ThePhD "It's not zero, but it is."
 
user1227304
:P
 
Ell
@AnalyticalInsanity just the regular variable after being passed into a function
But I'm passing a double as an argument to a double parameter so there isn't even casting o.O
 
user1227304
@Ell What does the function do?
 
Ell
9:24 PM
@AnalyticalInsanity bilinear interpolation
but this is before all of that :S
 
user1227304
@Ell Wait are you saying to set it to zero, and then immediately read it as 6.95336e-310? Or you did a bunch of stuff and it should be 0, but it's not?
 
Ell
@AnalyticalInsanity set it to zero before function call, pass to function, it reads as 6.9....e-310 inside the function
double rel_x = (1.0 / density.x) * x;
double rel_z = (1.0 / density.y) * y;
std::cout << "before height: [" << rel_x << ", " << "rel_y" << ", " << rel_z << "]\n";
> before height: [0, rel_y, 0]
 
Don't trust cout.
 
user3010322
printf is more accurrate IIRC?
 
user3010322
cout does formatting.
 
9:26 PM
The way to test for 0 is == 0, not printing and visual inspection.
@ThePhD Meh, don't trust that either.
 
user3010322
Tru.dat
 
@Ell: cout << (rel_x == 0.0), try that.
 
user1227304
@Ell Ya try if (var == 0) cout << "0" << endl;
 
user3010322
Ell, I think you should try == 0.
 
Nov 20 at 16:08, by R. Martinho Fernandes
Don't trust std::cout.
 
user3010322
9:27 PM
</bandwagon>
 
Aug 8 at 16:10, by R. Martinho Fernandes
(Proving shit with std::cout feels so wrong; assert is where it's at)
 
user1227304
Good grief, if it gets the job done... right?
 
user1227304
Plus, it
 
user1227304
's just debugging code
 
@AnalyticalInsanity The point is that it doesn't get the job done.
 
user1227304
9:28 PM
if (var == 0) cout << "0" << endl; would get the job done quite nicely.
 
great. Have fun!
 
user1227304
or cout << (var == 0) << endl;
 
user1227304
I mean, wouldn't it?
 
(var == 0) && cout << 0
 
Ell
Something very sneaky is happening... in a debugger, it's able to print a variable that isn't in scope
whaat.
 
9:33 PM
@ThePhD Street-wise Débussy (1st half) meets low-brow Jazz Suite (think Shostakovitch)
 
@Ell Happens all the time in Visual Studio. Does it matter?
 
user1227304
Is it any different if you pass it as a reference?
 
user1227304
@Ell Is it any different if you pass it as a reference?
 
Ell
@FredOverflow It makes me think it's using old debug info
so I cleaned and recompiled :)
 
Did that fix things?
 
Ell
9:34 PM
@AnalyticalInsanity Not sure, just trying something atm but I'll check in a sec
 
user3010322
@sehe I wish I could think Shostakovitch. But now I have things to learn!
 
@Ell MSVC infers different stack frames from where in the code you hover
 
Ell
ah god I made the stupidest mistake ever.
UB!
double rel_y = terrain.height(rel_x, rel_y);
 
uninitialized variable?
 
Ell
@FredOverflow indeedy
it's meant to be double rel_y = terrain.height(rel_x, rel_z);
 
9:37 PM
The compiler can't know that.
 
Ell
I know yeah
 
Unless C++ was designed in such a way that you could only use a variable after the semicolon of its definition.
Which would be sane. But that's not the C++ philosophy :)
 
Ell
No wonder I was getting -nan when rounding down :P
 
user3010322
Sanity is for the weak.
2
 
Sanity would forbid funny nonsense like void* p = &p; though.
 
9:38 PM
@FredOverflow Hold on, that's actually not a great idea now is it?

The "basic" example of

struct Node {
Node* next;
};

sort of thing (not that I manually write my forward lists, hell, not that I use them at all)
 
@FredOverflow does that compile with Warnings == Errors?
 
@ScarletAmaranth What does that have to do with the issue? You're not initializing next to point to itself, which wouldn't even be possible, since it would be a type error.
 
Xeo
Wheee
 
@bamboon I don't know, try it out.
 
@FredOverflow You said that it would be sane to only be able to use the type after the semicolon of its definition.
 
9:40 PM
@ScarletAmaranth No, I wasn't talking about the type. I was talking about the variable.
 
@FredOverflow Oh, my bad, nvm.
 
user1227304
You can't have void type variables... right?
 
user1227304
Oh god right?
 
void is incomplete, so no.
 
user1227304
Thank god.
 
Xeo
9:40 PM
void() says hi
 
But you can have void* variables such as p above.
 
user1227304
What does it do?
 
Xeo
You can't have void variables, but you can have void "objects" :D
 
It's a "generic" pointer in the C sense of generics.
@Xeo No you can't.
 
Ell
haha. all of my height values are 82.3529 with a few -nan's anyway :P
This code is littered with bugs xD
 
Xeo
9:41 PM
51 secs ago, by Xeo
void() says hi
 
user3010322
@Rapptz So yeah, it's definitely because of the function's lifetime and storage (with the shared_ptr), because I managed to make this compile and run:
 
user3010322
sol::state lua;
	lua.open_libraries( sol::lib::base, sol::lib::os );
	/*lua.get<sol::table>( "os" ).set_function( "fun", [ ] ( ) {
	return "test";
	} );
	*/
	lua.get<sol::table>( "os" ).set_function( "fun", &free_func_yo );
	lua.get<sol::table>( "os" ).set( "name", "windows" );
	lua.script("assert(os.fun() == \"test\")\n"
		"assert(os.name == \"windows\")" );
 
@FredOverflow hmm, doubt it
 
user1227304
@Ell Post it? I would love to read it... is it long?
 
@ThePhD :(
 
user3010322
9:42 PM
The bright side here is,
 
@Xeo auto v = void(); does not compile due to incomplete type. What exactly do you propose?
 
user3010322
you can avoid the problem by using free functions and member functions on non-owned types.
 
user3010322
I've got template specializations for r-values and temporaries, which invokes the owning-container issues.
 
Xeo
@FredOverflow foo(), void(), bar(); for example.
Or just void(/*whatever*/);
 
user1227304
When I learned C++ I was promised that it was going to be just like writing a list of instructions... I was lied to.
 
Xeo
9:43 PM
I specifically didn't say void variables exist.
 
user1227304
Why does C have to be so damn theoretical?
 
@bamboon void* p = &p; compiles perfectly on my machine with -Werror.
 
Xeo
And I also put "objects" in quotes.
It was meant to be rather tongue-in-cheek.
 
@Xeo Oh sure, you can have expressions of type void.
 
Ell
@AnalyticalInsanity I'll make a gist in a sec
 
9:44 PM
@FredOverflow indeed
 
@AnalyticalInsanity C is meant to be easier to read, write and port than various assembly languages. In that, it clearly succeeded.
 
Ell
(it's terrible code though, be warned!)
 
user1227304
@Ell Haha probably much better than my average code! :P
 
@AnalyticalInsanity Imperative programming is more or less like writing a list of instructions, isn't it? First do this, then do that... throw a bunch of variables and a bit of control flow in the mix, and you got pretty much every imperative language out there.
@ThePhD You have two cases, one for rvalues, one for temporaries? I don't believe it.
 
user3010322
@FredOverflow Er. It's meant to be "r-values and temporaries" all in the same boat.
 
9:47 PM
@bamboon And there's nothing wrong with a void pointer that points to itself.
 
user3010322
E.g. if you pass T& and T*, it assumes you don't want the function you just called to do ownership for the T.
 
@FredOverflow Yeah, was thinking the same just right now
@FredOverflow Still it feels weird, can you think of a usecase?
 
user3010322
This is meant to work for lambdas, who pass by mlamba&& or mlambda when you make one directly in a function argument.
 
@bamboon lol no, what would you cast the void pointer to? :)
 
user3010322
(If you name the lambda is becomes an lvalue you pass explicitly to the function, in which case storage is not the function's concern).
 
@FredOverflow void* ^^
 
Oh noes, lambdas.
 
user3010322
Listen, lambdas are different this time!
 
user3010322
Well... lambdas and state-owning callable structs.
 
user3010322
9:51 PM
Which reminds me, I need a specialization for is_empty
 
Ell
oh gosh
I have something terrible
 
user3010322
Because if the lambda is empty or the struct is empty, it can be passed through and I also don't have to do any storage.
 
user1227304
What?
 
Ell
two functions both called height in the same class
 
@bamboon Well, you could use it as a canary value for arrays on the stack to detect accidental overwrites.
 
user3010322
9:51 PM
This is getting fucking complicated. <_>
 
user1227304
@Ell This is a problem?
 
@Ell You can overload on parameters and constness of this.
 
user1227304
@Ell This is where I would say: "F--- it use Python" :P
 
@AnalyticalInsanity You're in a wrong lounge for this kind of attitude! :)
 
user1227304
@ScarletAmaranth Hahaha touche
 
user1227304
9:54 PM
But I do love me some Python
 
user1227304
So much higher up in the levels of abstraction
 
auto F = 42;
auto it = 97;
F--- it;
 
@AnalyticalInsanity not as much as you might think probably
 
@AnalyticalInsanity ^ this compiles :)
 
user1227304
@FredOverflow Damn it Fred! :P
 
user1227304
9:55 PM
@ScarletAmaranth Does
 
user1227304
@ScarletAmaranth n't Python run on a VM?
 
lol
So is C++.
 
@R.MartinhoFernandes But C++ is so cloes 2 da METALZ!!!
 
user1227304
@R.MartinhoFernandes C++ compiles to binaries...
 
@FredOverflow yeah, hacky stuff
 
9:56 PM
I have a project about the Multiverse.
 
> The semantic descriptions in this International Standard define a parameterized nondeterministic abstract machine.
 
Starting it 10 minutes before midnight. Best idea ever.
 
I don't think I need more proof than that.
 
user1227304
@MohammadAliBaydoun Oh let me hear this. Please.
 
It doesn't get any more authoritative.
 
user3010322
9:57 PM
@R.MartinhoFernandes It's wrong!
 
Yeah, it's not like real world compilers matter.
 
user3010322
</sophmoric-bravery>
 
@FredOverflow Compilers merely provide implementations of the abstract machine.
 
user1227304
@R.MartinhoFernandes </Philosophy>
 
user3010322
That said, I'm not sure anyone's brave enough to make a full implementation of a C++ virtual machine.
 
9:58 PM
@AnalyticalInsanity I doubt the C++ standard is philosophic.
 
user1227304
@R.MartinhoFernandes But what you said was. :P
 
@ThePhD Erm, what do you think people working on compilers are trying to do?
@AnalyticalInsanity What I said is also in the standard, right after the sentence I quoted first.
 
user3010322
@R.MartinhoFernandes I meant at the level of something like a Python or Java VM.
 
> This International Standard places no requirement on the structure of conforming implementations. In particular, they need not copy or emulate the structure of the abstract machine. Rather, conforming implementations are required to emulate (only) the observable behavior of the abstract machine as explained below.
 
Hello, Lounge!
 

« first day (1149 days earlier)      last day (3814 days later) »