« first day (363 days earlier)      last day (4570 days later) » 

12:00 AM
I'm on a system with a Linux 3.0 kernel!
 
Gentoo had that for a while now.
 
ubuntu just got it with oneric today
will be upgrading my htpc when i get home
 
I feel like I'm living in the future.
 
Why?
What's so special about it?
(Btw, you're living in the present, trust me.)
 
It looks neat with three screens.
 
12:10 AM
My sever is on 3.x-grsec for 37 days, 10:57.
I need coffee and I feel bad because of that.
 
Or maybe that's that stupid deadline thing.
I just realised I haven't really done fun coding since the semester began.
What is my life turning into.
 
Weren't you toying with Erlang a few weeks ago?
I assume that was for fun.
 
@CatPlusPlus I've noticed your recent message history tends to have an ongoing 'madness' theme. Low sanity score?
 
That was before the semester.
@LucDanton Could be.
 
12:16 AM
Don't forget you can't trust the whispers.
 
I only trust the whiskers.
 
There's something funky going on with Oneiric + Eyefinity.
 
possible offtopicalizer is required again
i have been wondering whether it's really TRUE that nose grows when u lie?
 
12:31 AM
u mean "gross" he he
i think maybe old stories about Pinocchio are really just allegories, that the word "nose" was used to avoid censorship
 
Aren't those like, children stories?
 
Rule 34.
 
yes. pinocchio's nose was said to grow when he lied. but as opposed to other body part, the nose is not known for visibly growing at any time
 
But Pinocchio was not a real kid. That's why his nose grew.
And honestly, what would that be an allegory for?
 
Lying fetish.
 
12:35 AM
I don't remember any girls in Pinocchio's story.
There's Pinocchio, there's Gepetto, there's a whale (STFU about the whale).
 
Hello, ground!
 
Ok, I'm going to shut up about this and just let you go on thinking Pinocchio has some deep sexual meaning in it.
 
Are you guys into doxygen or similar?
 
Is it still about fetishes?
 
12:41 AM
I really hope not.
 
After all these years I still haven't decided about a consistent documentation style.
 
I started using Doxygen-like comments, but I have yet to install Doxygen.
 
@RMartinhoFernandes similar here.
 
I write Doxygen-style comments out of habit, but I don't really like the output.
Sphinx is much better in that regard, but isn't as integrated.
 
I always like to Poco commenting style: under the declaration. But it
is too uncommon.
 
12:42 AM
Now that's just silly.
 
It makes sense to first see the declaration and the documentation for that declaration.
 
I dunno. I don't read in a stream-like manner.
 
It'd feel unnatural in C++.
 
Comments get different highlighting (less vibrant than code), and my eyes can quickly jump to the declaration.
 
12:44 AM
You like that Poco thing a lot, don't you.
 
Tabwidth is set too high on this view though.
@CatPlusPlus It's going downhill a bit now.
 
Ugh, indenting with tabs.
 
What do you mean "downhill"?
 
I prefer to always use spaces.
@RMartinhoFernandes I think Poco sometimes has too many convenience methods.
Poco does compile very fast though. They use forward includes extensively.
 
C++ really needs to fix that.
 
12:47 AM
Actually, I don't know how they manage to make it so fast. My code always tends to compile get really slow after a while.
 
I have no hope.
 
I find ccache helpful. But it's of limited value.
 
And a hack, not really a solution.
 
The best tricks I know are PImpl/interfaces and PCH.
 
I try to use pImpl a lot. I have no experience with precompiled headers, should check it out.
 
12:50 AM
PCH is really fragile, though.
 
I can imagine.
 
And a hack.
 
Having a many cores helps a lot as well :D
 
It's a double hack. GCC segfaults when you try to use PCH with PaX enabled.
 
What's PaX?
 
12:51 AM
MSVC was once simply dumping memory contents for it, AFAIR.
 
Today I read about SCons and apparently it can compile multiple jobs without being limited to current directory.
 
is it me, or is this confusing
0
A: How to make struct type definitions visible outside a union C++

Tony The LionAFAIK you'd first need to use core c; c.bk * a; because bk is a member of your core union. So first declare an instance of your union and then use the union to access its members.

 
SCons also has ccache builtin.
 
PaX is a patch for the Linux kernel that implements least privilege protections for memory pages. The least-privilege approach allows computer programs to do only what they have to do in order to be able to execute properly, and nothing more. PaX was first released in 2000. PaX flags data memory as non-executable, program memory as non-writable and randomly arranges the program memory. This effectively prevents many security exploits, such as some kinds of buffer overflows. The former prevents direct code execution absolutely, while the latter makes so-called return-to-libc (ret2libc) a...
 
I don't really get his way of declaring those structs, looks like C to me
 
12:53 AM
What a crappy code.
 
Sorry too much to read.
It's 2 AM over here.
 
3 AM.
 
"How to make struct type definitions visible outside a union?"
..Move them out of the union?
3 AM
But not over it. Under it.
 
It's using static int cmp_bk(const void *ap, const void *bp).
 
12:55 AM
I thought so, it just horrid, I can't even get it to compile in ideone
 
It's pretty obvious it's not C++.
 
Dammit, my chrome app got a bad score by someone.
 
OMG that's really horrid (the code in the question Tony linked, not Stacked's Chrome app).
 
Revenge downvote his apps!
 
He left this comment: "not impressed DX"
He's an anonymouse.
 
12:58 AM
Then revenge downvote everyone's apps!
 
@RMartinhoFernandes I deleted my answer, cause I honestly can't make much sense of it
 
I'm not that spiteful.
 
also, who declares structs inside a union?
 
C programmers.
 
Stop talking about it! You're making my head hurt.
 
12:59 AM
It's scary if noobs start doing strange things with unions.
 
Using unions is the strange thing.
And with silly fixed-size arrays, too.
boost::variant FTW.
Hey, why variant wasn't included in C++11?
 
It's an anonymous union in global scope.
 
I once improved code at my job by using a union and apparently introduced UB.
 
@CatPlusPlus I think it's listed for TR2.
 
ok, I'll stop making your head hurt :(
 
1:01 AM
0
Q: Troubles with MySQL-python

johnthexiiiI am running into problems installing MySQL-python on windows. After looking at several other similar questions on SO the my solution seems to be to install python-dev however google isn't providing me with any clues as to what python-dev is much less how to install it. So my questions are what...

Lol.
 
I suspect that is actually code written to be C, and for some reason they're trying to port it to C++ which is as easy as compiling it with g++ instead of gcc, as everyone knows.
 
I need an off-switch for boring questions.
 
@CatPlusPlus boring_questions -off
 
Er, no. Doesn't compile as C.
 
doesn't compile as anything
 
1:03 AM
That's just code from the dark depths of R'lyeh then.
 
You know what, I'll write an answer.
It'll be glorious and full of laughing.
 
@CatPlusPlus Nooo, your precious sanity points!
 
2
Q: Using a union for multiple interpretations of IP address?

StackedCrookedAt work we have the following construct to enable interpreting an IP address as either an array of 4 bytes, or as a 32-bit integer: union IPv4 { std::uint32_t ip; std::uint8_t data[4]; }; This works fine, but I'm a little worried after reading chapter 97 "Don't use unions to reinterpr...

 
Muahahaha.
 
1:04 AM
^ Harmless UB?
 
@CatPlusPlus Sinister laughing?
Oh well.
 
There, I got it to compile as C: ideone.com/mca8O
 
There's no such thing as innocent UB.
 
(Why am I even trying this?)
 
@CatPlusPlus I changed it to harmless.
 
1:05 AM
AFAIR GCC guarantees that it'll work, but it's still not a reliable portable behaviour.
Standard explicitly says that you can only read what you last wrote to.
 
never even heard of a static union
wtf is that useful for?
 
static is for the variable, not the type.
 
It's a big fucking mess.
 
It's static anonymous_union core;
 
@StackedCrooked You know, reinterpret_cast is well-defined for that.
 
1:07 AM
meh
 
@RMartinhoFernandes The old code used reinterpret_cast but that triggered type aliasing warnings.
 
But, endianness.
 
@RMartinhoFernandes should be big-endian
responsibility of the user
@RMartinhoFernandes actually in our code this union is privately declared inside the ipv4address class. The constructor takes care of endianness.
 
@CatPlusPlus I have a potentially non-boring question: How would you model a IP address class/classes in C++ if you want to support both IPv4 and IPv6?
 
1:11 AM
Two of them?
 
You are free to design IPv4 and IPv6 as two classes, or as one class that supports both.
 
How does the underlying networking API look like?
 
I haven't wrote any networking code in C++ in quite a while.
 
@RMartinhoFernandes It should a general purpose design not tied to a specific api.
@CatPlusPlus You only need to represent the address. (Not the header or anything.) So you simply need a way to store either 4 or 6 bytes and provide a meaningful interface around it.
At my work they do it like this: abstract class IPAddress, subclasses for IPv4 and IPv6.
I don't like that.
 
class ip { bool v6; byte address[6]; }; plus member functions.
Or two classes + overloaded functions.
 
1:16 AM
@RMartinhoFernandes so you only use the first 4 bytes in case of ipv4?
 
Yes.
I hope the two byte overhead (plus padding) is acceptable, i.e., you're not handling gazillions of the things.
 
This might be nice. This would allow you to let the constructor take a IPv4/v6 string and have it fill the data accordingly.
 
IPv6 address is not 6 bytes.
 
I think the design at my current job is very poor. They hammer on performance and the they use a polymorphic base class for something as essential as an IP address.
 
Oh, silly me.
 
1:19 AM
@CatPlusPlus Right
 
It's a 128-bit space.
 
I mistyped a 1.
:P
 
And wasting 12 bytes on IPv4 doesn't seem too ideal.
 
Plus: using an abstract base class prevents you from letting the constructor detect the address type.
 
I mistyped another 1.
 
1:20 AM
@CatPlusPlus yeah.
 
Why do you need abstract base class for an IP address?
You probably need to handle them differently anyway.
 
That's what he has currently.
 
I'd just go with two distinct types.
 
If they really want to use a polymorphism then they should add use a bridge-pattern.
 
I'd just go with Boost.Asio.
 
1:21 AM
Again with the patterns. What the hell is bridge?
Apart from being a card game.
 
@CatPlusPlus They like to have a common base type.
@CatPlusPlus it's like pImpl
 
Tell them to go write Java instead.
 
But pImpl pointing to an abstract base class.
 
I thought a bridge was something to connect different APIs.
 
I thought a bridge was a fridge.
 
1:23 AM
@RMartinhoFernandes Ok, it's called the 'state pattern' when it's about state instead of behavior.
 
I wrote an answer, but nobody upvotes me. I'm sad.
 
@CatPlusPlus That works like this: you post an answer and then you post a link here in chat claiming you want something silly like a peer review or something.
There, I spilled the beans.
 
@LucDanton So would I, but this is code that dates from 2003 and boost was only introduced in the codebase recently.
 
Okay, lemme try.
 
@CatPlusPlus In the winter it can be used as a fridge.
 
1:24 AM
0
A: How to make struct type definitions visible outside a union C++

Cat Plus PlusThis is a poor attempt at compiling C code as C++. You cannot have structs named the same as variables. You also cannot define a type inside an anonymous type and expect to be able to access it. So, the code after fixing this is struct tt_type { /* Transposition table entry *...

I want upvotes!
Am I doing it right?
 
No, you don't say you want upvotes flat out.
You try to pass it off as something not greedy.
Like "Did I miss something?".
 
That bit about structs named as variables is probably silly, those would be in a different namespace after those changes anyway.
I stayed awake to work on the work code, but I'm not working on the work code.
Now I regret it a bit.
 
Instead you are trying to fix some stranger's crazy code.
 
I'm not trying, I'm doing!
 
> I dont understand whats going on here and what the problem is? I did everything right!
Sigh.
 
1:33 AM
In the Belgian news today: 18 year olds have worse spelling than 12 year olds.
 
Hey, there's a switch in Win8 to turn off that stupid Metro Start.
 
Here, the generation that is starting school now will certainly have worse spelling than the generations before.
Schools are now teaching some silly spellings.
 
Silly spellings?
You mean, like, emoticons?
 
A bunch of intellectuals decided they didn't like the language and decided to force everyone to write differently.
 
1:35 AM
Ah, the language boards.
 
Unfortunately, the government decided to play along.
Fortunately, some publishers decided to keep spelling things right.
 
What kind of changes are being proposed?
 
You know Portuguese?
I doubt it will make much sense if you don't.
 
We have one of those here, they recently tried to introduce official meanings of words used commonly in IT. Of course, they were all different than what people actually use.
 
@RMartinhoFernandes Makes sense.
 
1:37 AM
The stupids reformists claim that the language will be easier to learn.
 
Here in Flanders everyone refers to a mobile phone as "a GSM".
 
They say they'll be making the rules simpler.
Except that the new rules are also full of exceptions.
And I don't fucking want to learn my native language twice.
 
Typical.
 
Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
Value RPEnabled=0x00000000
Wooooo, it works.
 
What's that?
 
1:38 AM
I can again consider upgrading to Win8.
Disables that idiotic Metro Start thing in Win8.
 
Is the Windows 8 demo fast? Or is it a non-optimized build?
 
I just hope they don't get a brilliant idea of removing this.
Hell knows, I'm running it in VM.
 
The Metro interface starts by default even on a desktop installation? That's stupid
 
It took them years to support the UTC system clock setting.
And it was already there in the kernel as a leftover from some other time. Just a tad buggy.
 
I only recently purchased Windows 7 (OEM) and don't feel like upgrading to Windows 8 now.
 
1:40 AM
And after restarting, the Win7 Start button is all back!
 
So I wouldn't be surprised if this setting were to disappear.
 
Maybe it's on by default because it's a Dev Preview.
 
That would make sense.
 
This is what they're basing their marketing on, isn't it?
What would people say when they opened their shiny new OS and it didn't look as promised?
 
1:43 AM
@CatPlusPlus I hope so, I've also read interviews where MS has said that it'd be easy to turn off the Metro interface. Mucking with the registry is not "easy" for most people
 
They're probably going to allow using the old interface to avoid losing customers.
 
Screw most people (well, don't).
 
Screw most attractive females instead.
 
Yeah, screw the majority of your customer base :)
 
Bah, why there's still no option to turn off on-hover window previews. It's third party software all over again.
 
1:44 AM
I didn't mean majority of Windows users are attractive females ...
 
I wouldn't have believed you anyway.
 
@CatPlusPlus I use 7 Taskbar Tweaker or something.
 
Me too.
 
I wish I could recompile the universe and add more females.
 
That's what I meant.
 
1:45 AM
But he needs 8 Taskbar Tweaker
 
I need to write those fucking migrations.
 
Stop talking. Get cracking.
 
@StackedCrooked hahah :P
 
1:48 AM
@StackedCrooked That's not the change you need to make.
You need to make females more attracted to you.
 
@RMartinhoFernandes Oh right.
 
I'm pretty sure there are enough females out there.
 
more can never be a bad thing, or can it?
 
Or females that think about sex as much as @TonyTheLion does
 
@TonyTheLion How many females do you think you can handle?
 
1:49 AM
@RMartinhoFernandes Magnet Gun could prove useful.
 
In Siberia there is a vote going on to allow polygamy because of a shortage of men. guardian.co.uk/education/2009/oct/27/…
 
Bah, now I want to play RF: Armageddon.
 
@RMartinhoFernandes not sure, someday I'll have to test this :P
 
@CatPlusPlus Go write the migrations.
 
But I don't waaant to.
 
1:50 AM
@TonyTheLion I don't mean sexually only.
If there are females around, they'll want other things.
 
It would be cool if you had many females at your disposal. You could implement some sort of divide and conquer strategy in order to let them fight among themselves instead of with you.
 
Oh, it's the Insanity Wolf.
@StackedCrooked Unless they'd divide and conquer all your money.
 
That's likely. I should make sure to throw in some lawyers.
For me, not for them.
 
Lawyers.
 
Gosh.
What a world.
Females and lawyers all over?
You crazy?
 
1:53 AM
Inferno.
 
And a magician.
 
Migrations.
 
oh migrations?
female ones?
 
No.
Cat needs to write some.
 
1:55 AM
What compiler starts the errors with 1>?
 
My brain has migrated somewhere else.
Visual Studio output.
When there's multiple children.
 
Visual Studio has kids?
 
Yes, and they're ugly.
 
"1>" seems to refer to stdout
 
1:57 AM
It's what I said!
 
I didn't hear you say anything.
 
But I've seen that number count all the up to 6, I think, definitely 4
I assumed it was a count of the number of translation units being compiled in parallel
 
Arrgh, someone coaxed me into making an answer out of a comment.
 
Visual Studio 10 keeps a number of compiler processes alive so that compilation can start quickly. Perhaps the numbers refer to their id.
 
If I don't make it an answer, it's because I think it's silly and don't want rep for it.
 

« first day (363 days earlier)      last day (4570 days later) »