Welcome, Guest. Please login or register.

Author Topic: I don't think I can learn C....  (Read 10469 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline AtheistTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 820
    • Show all replies
I don't think I can learn C....
« on: April 02, 2003, 11:07:15 AM »
Found this source code example on the net...

/*
As an extreme example the following C code (mystery.c) is actually legal C code.


#include

main(t,_,a)
char *a;
{return!0main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
:t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
+1 ):0i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
*/

AmigaOne! Dumbfounded!!
\\"Which would you buy? The Crappy A1200, 15 years out of date... or the Mobile Phone that I have?\\" -- bloodline
So I guess that A500, 600, 1000, 2000, CDTV, CD32, are pure garbage then? Thanks for posting here.
 

Offline AtheistTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 820
    • Show all replies
Re: I don't think I can learn C....
« Reply #1 on: April 02, 2003, 12:06:25 PM »
Hello Frodon or Tickly,

I was wondering, how many bytes is the compiled code?

AmigaOne! Dumbfounded + Amazed!


P.S. Found it here http://www.cs.cf.ac.uk/Dave/C/node4.html#SECTION00460000000000000000
\\"Which would you buy? The Crappy A1200, 15 years out of date... or the Mobile Phone that I have?\\" -- bloodline
So I guess that A500, 600, 1000, 2000, CDTV, CD32, are pure garbage then? Thanks for posting here.
 

Offline AtheistTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 820
    • Show all replies
Re: I don't think I can learn C....
« Reply #2 on: April 02, 2003, 12:18:41 PM »
Quote

Karlos wrote:
Quote

Atheist wrote:
Hello Frodon or Tickly,



Gee, hi to you too :-D Something I said? (joking)


I didn't say hi, because, you didn't compile it, and therefore, didn't have an answer to that question, speaking of which...

Hello Crumpster,

gcc, so that would be PPC and therefore RISC, so how many bytes was it, when you compiled it?

Thanks, I just HAD to know.


AmigaOne! C(++), ...phew!! Challenging!
\\"Which would you buy? The Crappy A1200, 15 years out of date... or the Mobile Phone that I have?\\" -- bloodline
So I guess that A500, 600, 1000, 2000, CDTV, CD32, are pure garbage then? Thanks for posting here.
 

Offline AtheistTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 820
    • Show all replies
Re: I don't think I can learn C....
« Reply #3 on: April 02, 2003, 01:16:13 PM »
Quote

Crumpster wrote:

Good old Windows Bloat!!  :-D


Is it just me not understanding how these things work, or is that somwhat excessive? I wonder if it still relies on a DLL being present?

Also, as I wondered out loud in another thread, how would going to a 64 bit CPU instruction set affect the size?

AmigaOne! "What the DLL you talkin' 'bout, fool?", Mr. T?
\\"Which would you buy? The Crappy A1200, 15 years out of date... or the Mobile Phone that I have?\\" -- bloodline
So I guess that A500, 600, 1000, 2000, CDTV, CD32, are pure garbage then? Thanks for posting here.
 

Offline AtheistTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 820
    • Show all replies
Re: I don't think I can learn C....
« Reply #4 on: April 02, 2003, 10:57:52 PM »
Quote

Piru wrote:

68000, AmigaOS (SAS/C 6.58):
mystery                           1048 ----rwed Today     23:32:37

PowerPC, MorphOS (gcc 2.95.3):
mystery                           2200 ----rwed Today     23:32:42


Now, could one attribute the 1152 byte difference to RISC overhead (needing more instr, per CISC command)?

Quote

Piru wrote:
Next step: Optimize the generated asm code. :-)


Major BrainStrain could result in ones being carted away in a strait jacket, or perhaps, return sanity and clearity of the Universe for another?  :-D

AmigaOne! Has this made a point?
\\"Which would you buy? The Crappy A1200, 15 years out of date... or the Mobile Phone that I have?\\" -- bloodline
So I guess that A500, 600, 1000, 2000, CDTV, CD32, are pure garbage then? Thanks for posting here.
 

Offline AtheistTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 820
    • Show all replies
Re: I don't think I can learn C....
« Reply #5 on: April 02, 2003, 11:05:45 PM »
Quote

Karlos wrote:

Check out the winbloat! 30kb of sh*t linked just to make the exe :-D



Hello Karlos,

Could you imagine 10 or 20 commands in the C: (I mean ms-dos/windos) directory, with that kind of non-sense? NOT!!!

AmigaOne! If only it were in assembler!  :-D  :-D  :-D
\\"Which would you buy? The Crappy A1200, 15 years out of date... or the Mobile Phone that I have?\\" -- bloodline
So I guess that A500, 600, 1000, 2000, CDTV, CD32, are pure garbage then? Thanks for posting here.
 

Offline AtheistTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 820
    • Show all replies
Re: I don't think I can learn C....
« Reply #6 on: April 04, 2003, 01:52:29 AM »
I wonder how big the .exe file would be on win32 vs. 68K vs. 68020 (or higher) vs. PPC if it was just one big

printf("On the first day of Christmas my true love gave to me/n
a partridge in a pear tree./n/n
On the second day of Christmas my true love gave to me/n
two turtle dovesin a pear tree./n/n
On the third day of Christmas my true love gave to me/n.......")

I think I got the printf(" ") part right.

I ask because, on win(lose)dohs, if you go to the trouble of writing IMPRESSIVE code, it still bites you in the end.

It is VERY IMPRESSIVE code to me, at any rate.

AmigaOne! Things are gonna get REAL interesting!!!
\\"Which would you buy? The Crappy A1200, 15 years out of date... or the Mobile Phone that I have?\\" -- bloodline
So I guess that A500, 600, 1000, 2000, CDTV, CD32, are pure garbage then? Thanks for posting here.