Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language INTERCAL

Date:04/20/05
Author:Matt Dimeo
URL:n/a
Comments:5
Info:n/a
Score: (3.03 in 90 votes)
INTERCAL is a real language, apparently created with the 
notion that programming ought to be hard. Program courtesy Matt Dimeo.

PLEASE DO ,10 <- #1
PLEASE DO ,10SUB#1 <- #176
PLEASE DO ,11 <- #30
PLEASE DO ,11SUB#1 <- #76
       DO ,11SUB#2 <- #190
       DO ,11SUB#3 <- #80
       DO ,11SUB#4 <- #200
PLEASE DO ,11SUB#5 <- #256
       DO ,11SUB#6 <- #248
       DO ,11SUB#7 <- #144
       DO ,11SUB#8 <- #216
PLEASE DO ,11SUB#9 <- #202
       DO ,11SUB#10 <- #14
       DO ,11SUB#11 <- #144
       DO ,11SUB#12 <- #98
PLEASE DO ,11SUB#13 <- #190
       DO ,11SUB#14 <- #160
       DO ,11SUB#15 <- #256
       DO ,11SUB#16 <- #88
PLEASE DO ,11SUB#17 <- #74
       DO ,11SUB#18 <- #14
       DO ,11SUB#19 <- #128
       DO ,11SUB#20 <- #114
PLEASE DO ,11SUB#21 <- #214
       DO ,11SUB#22 <- #24
       DO ,11SUB#23 <- #112
       DO ,11SUB#24 <- #162
PLEASE DO ,11SUB#25 <- #22
       DO ,11SUB#26 <- #104
       DO ,11SUB#27 <- #80
       DO ,11SUB#28 <- #256
PLEASE DO ,11SUB#29 <- #2
       DO ,11SUB#30 <- #228
PLEASE DO ,12 <- #49
PLEASE DO ,12SUB#1 <- #76
       DO ,12SUB#2 <- #190
       DO ,12SUB#3 <- #80
       DO ,12SUB#4 <- #200
PLEASE DO ,12SUB#5 <- #256
       DO ,12SUB#6 <- #248
       DO ,12SUB#7 <- #144
       DO ,12SUB#8 <- #216
PLEASE DO ,12SUB#9 <- #202
       DO ,12SUB#10 <- #14
       DO ,12SUB#11 <- #144
       DO ,12SUB#12 <- #98
PLEASE DO ,12SUB#13 <- #190
       DO ,12SUB#14 <- #160
       DO ,12SUB#15 <- #256
       DO ,12SUB#16 <- #88
PLEASE DO ,12SUB#17 <- #218
       DO ,12SUB#18 <- #36
       DO ,12SUB#19 <- #38
       DO ,12SUB#20 <- #164
PLEASE DO ,12SUB#21 <- #176
       DO ,12SUB#22 <- #48
       DO ,12SUB#23 <- #162
       DO ,12SUB#24 <- #14
PLEASE DO ,12SUB#25 <- #128
       DO ,12SUB#26 <- #208
       DO ,12SUB#27 <- #162
       DO ,12SUB#28 <- #222
PLEASE DO ,12SUB#29 <- #48
       DO ,12SUB#30 <- #8
       DO ,12SUB#31 <- #120
       DO ,12SUB#32 <- #66
PLEASE DO ,12SUB#33 <- #48
       DO ,12SUB#34 <- #246
       DO ,12SUB#35 <- #136
       DO ,12SUB#36 <- #184
PLEASE DO ,12SUB#37 <- #256
       DO ,12SUB#38 <- #202
       DO ,12SUB#39 <- #110
       DO ,12SUB#40 <- #104
PLEASE DO ,12SUB#41 <- #42
       DO ,12SUB#42 <- #126
       DO ,12SUB#43 <- #56
       DO ,12SUB#44 <- #88
PLEASE DO ,12SUB#45 <- #72
       DO ,12SUB#46 <- #56
       DO ,12SUB#47 <- #80
       DO ,12SUB#48 <- #242
PLEASE DO ,12SUB#49 <- #228
PLEASE DO ,13 <- #31
PLEASE DO ,13SUB#1 <- #76
       DO ,13SUB#2 <- #190
       DO ,13SUB#3 <- #80
       DO ,13SUB#4 <- #200
PLEASE DO ,13SUB#5 <- #256
       DO ,13SUB#6 <- #248
       DO ,13SUB#7 <- #144
       DO ,13SUB#8 <- #216
PLEASE DO ,13SUB#9 <- #202
       DO ,13SUB#10 <- #14
       DO ,13SUB#11 <- #144
       DO ,13SUB#12 <- #98
PLEASE DO ,13SUB#13 <- #190
       DO ,13SUB#14 <- #160
       DO ,13SUB#15 <- #256
       DO ,13SUB#16 <- #88
PLEASE DO ,13SUB#17 <- #74
       DO ,13SUB#18 <- #14
       DO ,13SUB#19 <- #128
       DO ,13SUB#20 <- #114
PLEASE DO ,13SUB#21 <- #214
       DO ,13SUB#22 <- #24
       DO ,13SUB#23 <- #112
       DO ,13SUB#24 <- #162
PLEASE DO ,13SUB#25 <- #22
       DO ,13SUB#26 <- #104
       DO ,13SUB#27 <- #80
       DO ,13SUB#28 <- #256
PLEASE DO ,13SUB#29 <- #194
       DO ,13SUB#30 <- #36
       DO ,13SUB#31 <- #256
PLEASE DO ,20 <- #10
PLEASE DO ,20 SUB #1 <- #76
       DO ,20 SUB #2 <- #196
       DO ,20 SUB #3 <- #4
       DO ,20 SUB #4 <- #132
PLEASE DO ,20 SUB #5 <- #36
       DO ,20 SUB #6 <- #164
       DO ,20 SUB #7 <- #228
       DO ,20 SUB #8 <- #100
PLEASE DO ,20 SUB #9 <- #52
       DO ,20 SUB #10 <- #180
PLEASE DO ,21 <- #10 BY #10
PLEASE DO ,21SUB#1#1 <- #248
PLEASE DO ,21SUB#1#2 <- #120
PLEASE DO ,21SUB#1#3 <- #184
PLEASE DO ,21SUB#1#4 <- #56
PLEASE DO ,21SUB#1#5 <- #216
PLEASE DO ,21SUB#1#6 <- #88
PLEASE DO ,21SUB#1#7 <- #152
PLEASE DO ,21SUB#1#8 <- #24
PLEASE DO ,21SUB#1#9 <- #232
PLEASE DO ,21SUB#1#10 <- #104
       DO ,21SUB#2#1 <- #128
       DO ,21SUB#2#2 <- #256
       DO ,21SUB#2#3 <- #64
       DO ,21SUB#2#4 <- #192
       DO ,21SUB#2#5 <- #96
       DO ,21SUB#2#6 <- #224
       DO ,21SUB#2#7 <- #32
       DO ,21SUB#2#8 <- #160
       DO ,21SUB#2#9 <- #112
       DO ,21SUB#2#10 <- #240
       DO ,21SUB#3#1 <- #64
       DO ,21SUB#3#2 <- #192
       DO ,21SUB#3#3 <- #256
       DO ,21SUB#3#4 <- #128
       DO ,21SUB#3#5 <- #32
       DO ,21SUB#3#6 <- #160
       DO ,21SUB#3#7 <- #224
       DO ,21SUB#3#8 <- #96
       DO ,21SUB#3#9 <- #48
       DO ,21SUB#3#10 <- #176
       DO ,21SUB#4#1 <- #192
       DO ,21SUB#4#2 <- #64
       DO ,21SUB#4#3 <- #128
       DO ,21SUB#4#4 <- #256
       DO ,21SUB#4#5 <- #160
       DO ,21SUB#4#6 <- #32
       DO ,21SUB#4#7 <- #96
       DO ,21SUB#4#8 <- #224
       DO ,21SUB#4#9 <- #176
       DO ,21SUB#4#10 <- #48
PLEASE DO ,21SUB#5#1 <- #32
PLEASE DO ,21SUB#5#2 <- #160
PLEASE DO ,21SUB#5#3 <- #224
PLEASE DO ,21SUB#5#4 <- #96
PLEASE DO ,21SUB#5#5 <- #256
PLEASE DO ,21SUB#5#6 <- #128
PLEASE DO ,21SUB#5#7 <- #192
PLEASE DO ,21SUB#5#8 <- #64
PLEASE DO ,21SUB#5#9 <- #16
PLEASE DO ,21SUB#5#10 <- #144
       DO ,21SUB#6#1 <- #160
       DO ,21SUB#6#2 <- #32
       DO ,21SUB#6#3 <- #96
       DO ,21SUB#6#4 <- #224
       DO ,21SUB#6#5 <- #128
       DO ,21SUB#6#6 <- #256
       DO ,21SUB#6#7 <- #64
       DO ,21SUB#6#8 <- #192
       DO ,21SUB#6#9 <- #144
       DO ,21SUB#6#10 <- #16
       DO ,21SUB#7#1 <- #96
       DO ,21SUB#7#2 <- #224
       DO ,21SUB#7#3 <- #32
       DO ,21SUB#7#4 <- #160
       DO ,21SUB#7#5 <- #64
       DO ,21SUB#7#6 <- #192
       DO ,21SUB#7#7 <- #256
       DO ,21SUB#7#8 <- #128
       DO ,21SUB#7#9 <- #80
       DO ,21SUB#7#10 <- #208
       DO ,21SUB#8#1 <- #224
       DO ,21SUB#8#2 <- #96
       DO ,21SUB#8#3 <- #160
       DO ,21SUB#8#4 <- #32
       DO ,21SUB#8#5 <- #192
       DO ,21SUB#8#6 <- #64
       DO ,21SUB#8#7 <- #128
       DO ,21SUB#8#8 <- #256
       DO ,21SUB#8#9 <- #208
       DO ,21SUB#8#10 <- #80
PLEASE DO ,21SUB#9#1 <- #16
PLEASE DO ,21SUB#9#2 <- #144
PLEASE DO ,21SUB#9#3 <- #208
PLEASE DO ,21SUB#9#4 <- #80
PLEASE DO ,21SUB#9#5 <- #240
PLEASE DO ,21SUB#9#6 <- #112
PLEASE DO ,21SUB#9#7 <- #176
PLEASE DO ,21SUB#9#8 <- #48
PLEASE DO ,21SUB#9#9 <- #256
PLEASE DO ,21SUB#9#10 <- #128
       DO ,21SUB#10#1 <- #144
       DO ,21SUB#10#2 <- #16
       DO ,21SUB#10#3 <- #80
       DO ,21SUB#10#4 <- #208
       DO ,21SUB#10#5 <- #112
       DO ,21SUB#10#6 <- #240
       DO ,21SUB#10#7 <- #48
       DO ,21SUB#10#8 <- #176
       DO ,21SUB#10#9 <- #128
       DO ,21SUB#10#10 <- #256
PLEASE DO ,22 <- #10
PLEASE DO ,22 SUB #1 <- #8
       DO ,22 SUB #2 <- #136
       DO ,22 SUB #3 <- #72
       DO ,22 SUB #4 <- #200
PLEASE DO ,22 SUB #5 <- #40
       DO ,22 SUB #6 <- #168
       DO ,22 SUB #7 <- #104
       DO ,22 SUB #8 <- #232
PLEASE DO ,22 SUB #9 <- #24
       DO ,22 SUB #10 <- #152
       DO .10 <- #9
       DO .11 <- #9
PLEASE DO ,10 <- #1
PLEASE DO ,10SUB#1 <- #176
       DO READ OUT ,10		
       DO COME FROM (999)	
       DO (500) NEXT		
PLEASE DO ,11SUB#1 <- .5	
       DO READ OUT ,11
       DO (500) NEXT		
       DO ,12SUB#1 <- .5	
PLEASE DO READ OUT ,12
PLEASE DO .6 <- '?"!10~.10'~#1"$#1'~#3
       DO (50) NEXT
PLEASE DO .7 <- '?"!11~.11'~#1"$#1'~#3		
       DO (70) NEXT
       DO .2 <- #1
       DO .1 <- .11
PLEASE DO (1010) NEXT		
       DO .11 <- .3
       DO (600) NEXT		
       DO (101) NEXT		
(70)   DO (71) NEXT
       DO .11 <- #9		
       DO .2 <- #1
PLEASE DO .1 <- .10
       DO (1010) NEXT		
       DO .10 <- .3
       DO (600) NEXT		
       DO (101) NEXT		
(71)   DO RESUME .7		
(50)   DO (51) NEXT
PLEASE DO FORGET #1
       DO .2 <- #1
       DO .1 <- .11
PLEASE DO (1010) NEXT		
       DO .11 <- .3
       DO (600) NEXT		
PLEASE DO .7 <- '?"!11~.11'~#1"$#1'~#3		
       DO (80) NEXT
       DO (101) NEXT
(80)   DO (81) NEXT
       DO GIVE UP
(81)   DO RESUME .7
(51)   DO RESUME .6		
(101) DO FORGET #1
(999) DO FORGET #1		
(600)  DO (500) NEXT		
       DO ,13SUB#1 <- .5	
       DO READ OUT ,13	
       DO RESUME #1
(500)  DO ,30 <- #1		
       DO .1 <- .10		
       DO (1020) NEXT		
PLEASE DO ,30SUB#1 <- ,20SUB.1  
       DO READ OUT ,30		
       DO .3 <- .1		
       DO .1 <- .11		
       DO (1020) NEXT		
PLEASE DO ,30SUB#1 <- ,21SUB .3 .1  
       DO READ OUT ,30		
       DO .5 <- ,22SUB.1	
PLEASE DO RESUME #1

Download Source | Write Comment

Alternative Versions

Comments

>>  Stewart Gordon said on 06/01/05 13:39:52

Stewart Gordon Actually, INTERCAL is designed to be unlike any other language. It's Malbolge that's created with the notion that programming ought to be hard.

>>  Sillyman said on 08/05/05 07:59:01

Sillyman Yes, Intercal is a very silly language. (That's good) In fact, the manual looks like it could have been written by Monty Python. (That is also very good)

>>   said on 06/04/09 22:48:41

I love the notion of "COME FROM" instead of "GO TO". It makes the program so much harder to understand.

>>  Matt DiMeo said on 07/19/10 22:45:30

Matt DiMeo I'm the author of this...thing. In my defense, I was young, and needed the money. Or something.

I remember writing about three perl scripts just to generate the arrays, and another to make the code come out polite enough to satisfy the compiler, without being too polite. Good times.


-m@

>>  Georg said on 09/14/10 15:54:35

Georg Using COME FROM because "GOTO is considered harmful" is only the first step.
Using two COME FROM statements to spawn a thread is much better:
http://www.cse.unsw.edu.au/~malcolmr/intercal/threaded.html

And intercal's unique synchronization mechanisms make multithreaded programming a child's game!

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: