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

fizzbuzz

Name: übermench 2011-12-26 15:04

just wanted to post my awesome fizzbuzz implementation
#include <stdio.h>
#include <stdlib.h>

void main(int j) {
  printf(((char*[]){"%d\n","fizz\n","buzz\n","fizzbuzz\n"})[!(j%3)+!(j%5)*2], j);
  (&main + (&exit - &main)*(j/100))((j+1)*(1-j/100) );
}

Name: Anonymous 2011-12-27 22:50

>>36
Any compiler that compiles that is not a real C compiler, those are not valid identifiers for a macro, hate to tell you but your compiler is shit.

Name: Anonymous 2011-12-28 3:21

>>17

proggles.c:12:9: error: macro names must be identifiers

Name: Anonymous 2011-12-28 3:37

>>42
get a better compiler with a better preprocessor

>>41
u jelly that my own compiler has a better preprocessor than your shitty default gnu one?


god forbid we allow more customization.

Name: Anonymous 2011-12-28 3:43

>>43
Name a better compiler, then.

Name: Anonymous 2011-12-28 3:43

>>43
It's not a valid preprocessor, it does not comply to the standard, therefore it's shit, anyone can make a non-conformant piece of crap.

Name: VIPPER 2011-12-28 4:48

Why not make perl the preprocessor?

Name: Anonymous 2011-12-28 5:02

>>44
my own compiler

I'm amazed people on /prog/ aren't capable of making their own preprocessor for their own compiler or hell even a preprocessor that then pipes into gcc,tcc,etc

>>45
standard is shit

Name: Anonymous 2011-12-28 5:05

>>47
You are shit

Name: Anonymous 2011-12-28 5:07

>>47
standard is shit
And who are you? Which language committees have been in?

Name: Anonymous 2011-12-28 5:09

>>47
Take your toy language elsewhere.

Name: Anonymous 2011-12-28 5:31

>>50
Are you calling C a toy language now?

>>49
I am someone clearly smarter than you

>>48
u mad?

Name: Anonymous 2011-12-28 5:59

>>51
Are you calling C a toy language now?
No, the language you're using a silly toy language, it's not C.
C is a good language.

Name: Anonymous 2011-12-28 7:48

>>51
u mad

And that's how all arguments of >>51-san became meaningless.

back to /b/ with you

Name: Anonymous 2011-12-28 8:07

>>51,53
/polecat kebabs/

Name: Anonymous 2011-12-28 9:14

The reason using a non-compliant C compiler is wrong is because non-standard code will not compile on a compliant compiler. If your code is only going to compile on your compiler on your machine then go ahead and use non-standard stuff, but if you're posting it on the Internet where everyone uses different compilers, and you expect people to not be annoyed by your use of non-standard 'features', then you're a retard.

Name: Anonymous 2011-12-28 11:59

>>53-54 fuck off and die you fucking fagstorm

>>55
A useful subset of GNU C is followed by gcc itself, clang and tcc.

Name: Anonymous 2011-12-28 13:28

>>56
A useful subset of GNU C is followed by gcc itself, clang and tcc.
ICC as well, and that's because most of the GNU extensions are sane and useful, your shitty broken preprocessor isn't, it's fucking harmful and retarded. So fuck off with your toy language you piece of shit moron.

Name: Anonymous 2011-12-28 13:40

Check your lips at the door woman, shake your hips like battleships.

Name: Anonymous 2011-12-28 14:19

>>57
Post >>56 was the first one I made in this thread, ``fatflaps''.

Name: Anonymous 2011-12-28 14:21

>>59
Inconsequential, you're still a fucking retard.

The discussion was about a non-compliant compiler, the ones you posted are compliant, just to another language, GNU-C.

Name: Anonymous 2011-12-28 14:24

>>1..1000
fuck off, fuckfucks.

Name: Anonymous 2011-12-28 14:25

>>60
Fuck you man, I'm high and trolling your faggot ass is my highlight of the day.

Name: Anonymous 2011-12-28 15:02

not enough python

Name: Anonymous 2011-12-28 15:17

This thread?

PROG QUALITY!

Name: Anonymous 2011-12-28 15:43

for i = 0,99 do print(({"fizz","buzz","fizzbuzz"})[math.floor(0x30490610/2^(i*2%30)%4)] or i+1) end
Terrible! back to javascript!

Name: Anonymous 2011-12-28 16:06

I ran this code and it hacked my virus.

Name: Anonymous 2011-12-28 16:31

>>62
>>60
>>55
Y'all niggas so mad. I use gcc just like you, but I pipe my files through my perl preprocessor script which then compiles via gcc. Keep on hatin

Name: Anonymous 2011-12-28 16:32

>>67
That still doesn't make it C, or non-shit.

Name: Anonymous 2011-12-28 16:37

>>68
Changing preprocessor rules =/= making a new language

To you anyone that uses non-standard C is then using some silly toy language.

Name: Anonymous 2011-12-28 16:41

>>69
Standard C preprocessor is a separate language to Standard C. You are using non-standard C preprocessor, which is yet another language; the third language referenced in this post.

Name: Anonymous 2011-12-28 16:43

>>70
Reference my anus.

Name: Anonymous 2011-12-28 16:55

>>71
________________________________
[1] ISO/IEC 9899:1990
[2] ISO/IEC 9899:1999
[3] http://en.wikipedia.org/wiki/C_preprocessor -- The
language of preprocessor directives ...

Name: Anonymous 2011-12-28 17:33

I hope you guys don't use that toy language that's gnu gcc C with their non-standard preprocessor abilities.

Name: Anonymous 2011-12-28 17:34

>>73
fuck you M$ fag$torm

Name: Anonymous 2011-12-28 18:01

>>74
if you're going to whine about someone elses non-standard use then don't be a hypocrite and do it yourself with GNU gcc shit.

I'm ashamed to even hear that /prog/iganites are using gcc freedom at all costs

Name: Anonymous 2011-12-28 18:22

>>75

It's ok if your code remains within the standard, and you can give gcc options to only accept standard C (although in my experience, it still accepts things like nested functions in ansi mode).

Name: Anonymous 2011-12-28 19:54

Name: Anonymous 2011-12-28 20:09

>>77

                  / ̄∧_∧ ̄ ̄ ̄ // ̄\\
           __ ⊂/__(´∀` )__  /_⊃___| |\フ ヽ  CFLAGS JUST KICKED
       ,  ´_  /   / ̄ ̄ __ / ̄ ヽ    __ヽ ̄ ̄ |  IN, YO!
      /∠__/―/-。―/――∠_/__∧  |       | ∧_.| 
      ,========――´=============/⌒ヽ=|.=====| | ヽ ̄〕 
      | _   |GENTOO|    _  ″  |⌒| |/   __ /|  )ノ    vroom
      )_旧_∈≡≡≡≡∋_旧_″_|| ノ丿_ -――┘ 丿      vroom!
       \ \_ノ  ̄ ̄ ̄三三三\ \_ノ    三三三三 
        三三三三三三三三三三三三三三三三三三三三三三三三
           三三三三三三三三三三三三三三三三三三三三三三三
              三三三三三三三三三三三三三三三三三三三三三三三三三三
                      三三三三三三三三三三三三三三三三三三
                            三三三三三三三三三三三

Name: Anonymous 2011-12-28 20:58

>>78
Nice kopipe, ``faggot''.

Name: Anonymous 2011-12-28 21:03

>>77

it was around three years ago.

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