Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Additions to C

Name: Anonymous 2009-11-10 4:15

What do you want in the next C standard? For me it's namespaces, damn they make libraries simple.

Name: Anonymous 2009-11-12 18:15

HAXHAXHAXHAXHAXHAXMYANUSANUSANUSANUSANUSANUS

Name: Anonymous 2009-11-12 18:16

>>116
[quote]Somebody convert me![/quote]
>>119
[quote]I love C.[/quote]

Mission accomplished.

Name: Anonymous 2009-11-12 18:17

>>119
>But when I need a map data type, I know it's far more readable to use the STL

std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> >
  >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >


How about no?

Name: Anonymous 2009-11-12 18:27

>>123
Now I am become Death, the destroyer of worlds

Name: Anonymous 2009-11-13 0:43

>>123
Your convoluted expression only matters in the context of errors with templates, which is a big verbosity/useless error problem.

However,

std::map<std::string, std::string, std::less<std::string> > is not as verbose and can even be decreased.

map<string, string, std::less<string> >

Pretty sure IHBT.

Name: Anonymous 2009-11-13 2:08

>>119
So let me get this straight. Is std::map really the only thing the STL has going for it? The map is the only goddamn thing everyone brings up over and over, so here, courtesy of google, some red-black tree maps in C:

http://www.mit.edu/~emin/source_code/red_black_tree/index.html
http://en.literateprograms.org/Red-black_tree_%28C%29
http://www.cs.utk.edu/~plank/plank/rbtree/rbtree.html
http://semanticvector.blogspot.com/2008/05/red-black-tree-in-2-hours.htm

Every goddamn fucking time the C/C++ debate comes up, everyone says over and over how you're going to waste time reimplementing stuff that's already in STL. Do you think C programmers are incapable of re-using code?

Because if I statically link one of the above into my app, it's going to be a fuck of a lot more portable than 'whatever broken STL implementation the platform supports', and it will be smaller anyway without all that template bullshit. And is it really the end of the world if I have to do map_at(mymap, "key") instead of mymap["key"]??

Name: Anonymous 2009-11-13 2:17

>>126
Oh even better, check this bitch out:

http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/tree.h?rev=1.12;content-type=text%2Fplain

OpenBSD's tree, a full red-black tree implementation in a single header file.

You may also be interested in uthash, a hash-table capable of holding any C struct, also in a single header file. Recall the STL doesn't actually have a hash table.

Remind me, why the fuck do I want STL again?

Name: Anonymous 2009-11-13 4:38

It makes me upset that a thread about a shitty new programming language from Google is the best thread on /prog/'s front page right now.  :(

Name: Anonymous 2009-11-13 6:33

AHAHAH YEAH TEMPLATE FAGGOTS ARE SUCH FAGGOTS, WHEN VOID* IS ALL YOU NNEED

Name: Anonymous 2009-11-13 6:53

>>129
I love void pointers. They are so beautiful.

Name: Anonymous 2009-11-13 7:11

Is "removing many features of C99 that really suck" an addition?

Name: Anonymous 2009-11-13 10:17

>>127
Except it does; std::tr1::unordered_map. That tree implementation is also bad. It's either impossible or extremely painful to debug macros. Luckily the people that designed it know precisely how to use it with no errors.

Name: Anonymous 2009-11-13 10:34

>>132
tr1 doesn't count; it's not widely implemented.

Only the OpenBSD tree is built with macros; you generate tree code for each type, template style. There are plenty of other implementations to choose from if you don't like it.

Name: Anonymous 2009-11-13 11:29

>>133
MY ANUS IS WIDELY IMPLEMENTED

Name: Anonymous 2009-11-13 11:33



_________________
posting from my ANSI C compiler

Name: Anonymous 2009-11-13 11:56

Albert Einstein, when asked to describe radio, replied: 'You see, wire telegraph is a kind of a very, very long cat.  You pull his tail in New York and his head is meowing in Los Angeles.  Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there.  The only difference is that there is no cat.'



[This fortune brought to you by AndroidFortune on the Google phone]

Name: Anonymous 2009-11-13 11:57

MY ANUS TRAVELS FASTER THAN THE SPEED OF LIGHT

Name: Anonymous 2009-11-13 12:24

>>131
What would you remove?

Name: Anonymous 2009-11-13 12:31

>>137

Is so? Then I'll book a seat on YOUR ANUS to Satori Station

Name: Anonymous 2009-11-13 13:50

>>137
So I guess it's infinitely dense? OH YEAH TIGHTEN UP

Name: Anon. MIT Prof. 2009-11-13 14:02

>>139
Your message was perhaps one of the strangest pieces of email I have ever received. Although it is flattering to have a ``faster-than-light anus'', in fact, it is a very bad idea. Unlike most of human society, science and engineering are based on the idea that each of us is capable of evaluating evidence and thinking on our own. Each of us can do experiments, work out the reasoning, and determine the truth for ourselves. There is no room in science or engineering for ``FTL anii'' representing group approval over individual thought. One of my heros, Galileo, put it very well:
In questions of science, the authority of a thousand is not worth the humble reasoning of a single individual.
I am pleased to talk with people about matters of science or engineering, so you and your colleagues may certainly send me mail. I hope to learn as much from your experiences as you may learn for me. But please get rid of the ``FTL anus'' way of thinking. The cult of the flying anus is unscientific and ultimately destructive.

Name: Anonymous 2009-11-13 14:24

>>141
But please get rid of the ``FTL anus'' way of thinking. The cult of the flying anus is unscientific and ultimately destructive.

it is was allways my dream to become a asstronaut and fly to mars.
why do you have to destroy my dream like this?

Name: Anonymous 2009-11-13 14:25

>>142
s/fly/fart

Name: Anonymous 2009-11-13 14:25

Say superluminal instead of FTL, makes you sound smarter.

Also, I lol'd at >>142's
asstronaut

Name: Anonymous 2009-11-13 15:46

HAX MY ANII, ANONYMOUS

Name: Anonymous 2009-11-15 1:26

>>99
I am now writing executables manually.

themacbook:~ haxus$ xxd mach-ex
0000000: cefa edfe 0700 0000 0300 0000 0200 0000  ................
0000010: 0200 0000 8800 0000 0100 0000 0100 0000  ................
0000020: 3800 0000 5f5f 5445 5854 0000 0000 0000  8...__TEXT......
0000030: 0000 0000 0000 0000 0010 0000 0000 0000  ................
0000040: c100 0000 0700 0000 0700 0000 0000 0000  ................
0000050: 0000 0000 0500 0000 5000 0000 0100 0000  ........P.......
0000060: 1000 0000 0000 0000 0c00 0000 b500 0000  ................
0000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000080: 0000 0000 0000 0000 0000 0000 a400 0000  ................
0000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000a0: 0000 0000 31d2 4053 5150 5204 03cd 8053  ....1.@SQPR....S
00000b0: 31c0 40cd 8068 656c 6c6f 2077 6f72 6c64  1.@..hello world
00000c0: 0a                                       .
themacbook:~ haxus$ ./mach-ex
hello world


Unfortunately getting the linker to do anything like this seems impossible.  It always wants to make (at least) 4 separate 4k-aligned segments.

Name: Anonymous 2009-11-15 5:27

>>147
macfag

Name: Anonymous 2009-11-15 8:49

>>148
phanboi

Name: ​​​​​​​​​​ 2010-10-22 3:28

Name: Anonymous 2010-12-17 1:37

This post brought to you by the Gay Nigger Association of America

Name: Anonymous 2011-02-03 6:57

Name: Anonymous 2011-02-17 19:25

check 'em

Name: Anonymous 2011-02-17 19:47

check 'em dubz

Name: Anonymous 2012-03-02 17:32

I would add one to C and return the original unmodified value.

Name: Anonymous 2012-03-02 18:23

GC and the only data type is Lua style tables.

Name: Anonymous 2012-03-02 18:53

>>157
Also forced flushing of the L1/L2 cache.

Name: Anonymous 2012-03-02 19:32

>>157
Why not conses?

>>158
Fuck off.

Name: Anonymous 2012-03-04 17:05

There are third party libraries for everything mentioned here. SAGE!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List