Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Stylish code, meet INTERCAL
Old 10-17-2008, 04:22 AM Stylish code, meet INTERCAL
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
You know the Hello World program. It takes different numbers of "lines" of code in different languages, to execute instructions printing the text "Hello World" to the screen. In C, for example, you had to #include "stdio.h" whereas in VB you just start printing.

I found out about INTERCAL, perhaps the most accurate, real world programming language of all.

Code:
DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #234
DO ,1 SUB #2 <- #112
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
Note that if you don't say "please," the compiler will think your code is rude, and not run it.
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #214
PLEASE READ OUT ,1
PLEASE GIVE UP
Anything the compiler doesn't understand, it ignores. Purists (like me) say this is bad, because it makes finding the source of a bug very difficult. But, hey, it's easier to program like that. But this has the side effect that, if you want to comment your code, you just write stuff the compiler won't understand right into the code.

Some of the keywords are IGNORE, REMEMBER, FORGET, ABSTAIN. There can be modifiers, like PLEASE, MAYBE, and I think my favorite is that you can put a percentage at the end of a line of code - this becomes the chance that that line will be run. If you give an instruction followed by %50, that translates to 100 % chance of that line running. The XOR operator is coded as ? because, frankly, this is how most people react when exclusive or is explained to them. The MINGLE operator is represented as $, naturally. ' is a spark, and " is (are?) rabbit ears.

I prefer this style of code to Malbolge (named, appropriately, for the 8th layer of Hell in Dante's Inferno), whose Hello World is written as

Code:
 (=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk**
 hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCAA@98\6543W10/.R,+O<
Makes PHP not seem so bad!
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-17-2008, 04:29 PM Re: Stylish code, meet INTERCAL
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
I dig that David Deutch video in your signature. Almost over...Movie is over, was pretty good. I like those.
__________________
Made2Own

Please login or register to view this content. Registration is FREE

Last edited by Brian07002; 10-17-2008 at 04:37 PM..
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 10-21-2008, 06:51 PM Re: Stylish code, meet INTERCAL
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
I really liked the video, too. Very eloquent.

Somebody - a human! - wrote Malbolge code.

http://www.lscheffer.com/malbolge.shtml

begin 666 copy.mb
M1"="04 _/CT\.SHY.#<V-30S,C$P+RXM+"LJ*2@G)B4D(R(A?GU\>WIY>'=V
M=71S<G%P;VYM;&MJ:6AG9F5D8V)A8%]>75Q;6EE85U955%-245!/3DU,2TI)
M2$=&141#0D% /SX]/#LZ.3@W-C4T,S(Q,"\N+2PK*BDH)R8E)",B(7Y]?'MZ
M>7AW=G5T<W)Q<&]N;6QK:FEH9V9E9&-B86!?7EU<6UI96%=655134E%03TY-
M3$M*24A'1D5$0R9?O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]
MO;V]Y+V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]
MO;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]
MO;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]
MO;V]O>2]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]
DO;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;V]O;T*

end
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Stylish code, meet INTERCAL
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42453 seconds with 12 queries