Once upon a time there lived a guy named STEPANOV. STEPANOV was a JOKER. That was his nature. He loved to MAKE JOKES. Unlike STROUSTRUP and ALEXANDRESCU he was mentally healthy, and, naturally,
hated C++ with all his heart. Once STEPANOV MADE a really tough JOKE.
He drugged himself hard and wrote STL. STL turned out to be comically
absurd. STEPANOV spent a great deal of time laughing at the miserable
and stupid fecal matter that is C++, and considered his STL merely a
grotesque joke.
STEPANOV had already forgotten about STL, but suddenly he was summoned
to a session of Standartisation Committee. When STEPANOV left the
building he started laughing like crazy. ``These fucktards!'' ---
thought STEPANOV, convulsing in laughter. ``They included STL into
the standard, holy fucking shit''. He couldn't stop laughing and fell
to the floor. The laughter didn't leave him even on the floor. Its
sound shifted from normal human laughter to a dreadful mix of crows
croaking and rhinos vomiting. Because of the laughter STEPANOV got
arrhythmia and had to call a doctor. When he returned home, he didn't
laugh anymore, because he imagined the terrible consequences of his JOKE. It finally occured to STEPANOV that actual living humans will
be writing STL code. And what if someone gets inspiration from STL
and invents something even more idiotic? STEPANOV knew that STL is a JOKE, but there definitely are people who can take it seriously. STEPANOV didn't know what to do. But, being a JOKER, he decided to
play his classic: KNOCK-ON-STROUSTUP'S-DOOR-AND-RUN-AWAY. STEPANOV
giggled at the thought of such COMEDY, because STROUSTUP, like a
retarded cow, always bought it. He went to STROUSTRUP's house and hid
behind a bush. Nobody saw him, and he was ready to walk up to the
house and knock, but suddenly he saw LAMBDA approaching the house. STEPANOV liked LAMBDA. They often had a drink together, and were good
friends. But STEPANOV didn't want to spoil his JOKE and didn't reveal
himself. Amusingly, LAMBDA flew up to the house, knocked on the door,
and then hid herself under the stairs. When STEPANOV saw it he was
slightly disappointed because LAMBDA stole his trademark trick. But
then he recalled that LAMBDA promised to do so to avenge her inclusion
into the STANDARD. STEPANOV crawled out of the bushes and went home.
He was in a dark mood. He knew that STROUSTROP does evil things, but
couldn't make himself do something about it. ``At least this son of a
bitch ALEXANDRESCU is in the mental clinic'' --- thought STEPANOV. He
felt that something will have to be done now that the STL is included
into the STANDARD. He needed only a single spark. But, suddenly, he
saw his friends, PAUL GRAHAM and PETER NORVIG. The three started
discussing something furiously, looking around cautiously. They
traded news. STEPANOV now knew that ALEXANDRESCU was discharged from
the mental clinic, GRAM and NORVIG found out that STL was included
into the STANDARD. They expected these times long ago, and it was
decided that it is the time for extreme measures.
Name:
Anonymous2012-06-04 5:46
>>1
but uses 5 times the memory STL uses
dat feeeel
>>5
you do realize however that your solution does STL-tier times.
Name:
Anonymous2012-06-04 6:19
that feel when you realize you can safely throw away a shitton of useless code that took your colleagues months to assemble.
Name:
Anonymous2012-06-04 7:26
STROUSTRUP posted a story to 4chan and climbed onto his mommy. He
didn't yet find out that she is long gone. The only thing he noticed
is that she started smelling funny, but it only turned him on. Also,
his mommy was moaning passionately when he was furiously fucking her.
He did not understand that these ``moans'' are actually sounds of
putrefaction gases escaping through various orifices. STROUSTRUP felt
a hit to his head and lost consciousness.
ALEXANDRESCU, beaten up and covered in excrement, approached his
house. Suddenly, three masked men grabbed him. The last thing he saw
was a gauze soaked in chloroform near his face. Then everything went
dark.
Name:
Anonymous2012-06-04 7:33
that feel when black jewish feminist pythonistas on proggles
STROUSTRUP and ALEXANDRESCU woke up in a dark wet basement. STEPANOV
noticed it and turned on the light. NORVIG walked up to them and
yanked cloth potato bags from their heads. STROUSTRUP and ALEXANDRESCU understood everything. Awareness of imminent end
instantly came to them. STEPANOV and GRAHAM held a brief dialogue:
--- Bring out the ugly bastard.
--- The ugly bastard is asleep.
--- Then wake him up, duh.
GRAHAM went up to a door and opened it. Behind the door there was a
1x1 m space with a man in a leather costume and a mask. GRAHAM
casually kicked the person, who woke up and asked for water. ``Here
you go, drink it!'' --- said GRAHAM and urinated on the person's face. STEPANOV kicked the person out of the small enclosure into the center
of the basement room and said: ``Dig, bitch.'' The person started
digging. After 10 minutes the pit was ready. STEPANOV took out a
large caliber Magnum and pointed it at the person. STEPANOV told GRAHAM to take the leather mask off the person. STROUSTRUP and ALEXANDRESCU inhaled loudly in fear. They knew this man. STEPANOV
aimed carefully at the person's head and pulled the trigger. Brains
were thrown out of his head and all over the walls, and the lifeless
body fell into the pit. STEPANOV observed it all with a smile of a
true JOKER. Then he looked at NORVIG and GRAHAM and said:
--- Bury SUTTER while I finish these two shits.
NORVIG and GRAHAM started working. STEPANOV, mimicking the gait of
Madsen from Reservoir Dogs, walked up to STROUSTRUP and ALEXANDRESCU.
Both were gazing at the floor in silence. STEPANOV took out a KATANA
and, with the zeal of the author of STL, sliced up both of them.
STEPANOV, NORVIG and GRAHAM stood above the bodies.
STEPANOV broke the silence and suggested feeding the corpses to pigs. STEPANOV then walked up the stairs to the first floor and continued to
write a DSL in COMMON LISP.
Name:
Anonymous2012-06-04 12:07
who want a may tricks? it will trick you if you not careful. you'll think you got a rectangular may trick and it turn out you got a triangle on your hands.
that feel when you smoke weed everyday because it makes programming less annoying
Name:
Anonymous2012-06-05 10:49
>>24
Never thought about it. Programmers aren't tested for drugs in my company, so it might even make me a better employee, as I will spend less time raging.
Allocation of nodes is outside of the scope of the library, it's left up to the user, that way they can use different allocation strategies. Concrete implementations have their node structs inherit the base list_node type. I use templates and lambda functions to generalize a few algorithms where the actual node type needs to be known.
struct log_sink_node : list_node
{
log_handler handler;
void* user_data;
unsigned int min_level;
unsigned int max_level;
char category[196];
};
>>29
The problem is that both the libstdc++ and Dinkumware (used by MSVC/ICC) Standard C++ Library implementations are shit, full of slow as fuck code-paths, and it results in bloated code. STLport and Apache stdcxx don't support C++11. Clang's libc++ is much better, but it's still incomplete and a work in progress.
Why? That's the C way of doing things, with a few extra C++ language features. Everything other way of doing it is bloated as fuck. Even Lisp, it's slow as shit underneath.
Name:
Anonymous2012-06-05 14:51
>>32
You forget that C and the C subset of C++ are essentially a ``portable assembler.'' It's not supposed to look good, it's supposed to run fast with no or little overhead, once compiled for the target platform. That's what his code does. It's not supposed to look pretty or elegant like Lisp. Just because your sexprs look so clean doesn't mean that it runs fast.
Sometimes you need raw performance, and that's when you get your hands dirty with C or C++ and even a bit of assembly or compiler intrinsics for hardware specific instruction sets.
Name:
Anonymous2012-06-05 16:21
>>34
When I want to use assembler, I use assembler.
Name:
Anonymous2012-06-05 16:28
>>23
well you haven't really decide what kind of list you want, and at the same time you are trying to semi-sort nodes.Which is kinda weird