Underload interpreter

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Write an interpreter for the programming language Underload; you need not implement quoting with ", because no other Underload implemntation does so either. . The spec for the language is at http://esolang.org/wiki/Underload, but in short, it's a stack-based language with the current commands:

(anything with matched parens, the parens are part of the command) push whatever is between the outermostparens on the stack

: duplicate the top of stack

! pop the top of stack

^ evaluate the top of stack as an Underload program, popping it

~ swap the top two stack elements

* concat the top stack element to the end of the second stack element

S output the top stack element, popping it

a enclose the top stack element in parents

Underload is a good language for writing quines in, as it happens. It is also Turing-complete.

You do not need to handle errors; only completely perfect Underload code need be evaluated correctly.

Options

now post-mortem time, all source codes will be revealed

Sample input:_

(:aSS):aSS

Sample output:

(:aSS):aSS

Sample input:_

(:::::):(:((^:()~((:)*~^)a~*^!!()~^))~*()~^^)~(^a(*~^)*a~*()~^!()~^)a~**^!!^S

Sample output:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Sample input:_

(x)(::**)(::**)^^S

Sample output:

xxxxxxxxxxxxxxxxxxxxxxxxxxx

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid300.09042008/01/24 21:02:590B / 9B / 21B
2ozy4dm(unko code)350.10312008/01/24 17:26:342B / 9B / 24B
3yvl350.08602008/02/11 04:02:530B / 13B / 21B
4eban360.20862008/01/24 17:32:110B / 10B / 24B
5tabasa6080.13762008/01/21 11:05:0846B / 237B / 154B

Perl _

RankUserSizeTimeDateStatistics
1ott(embed)340.06022008/01/21 01:10:550B / 12B / 22B
2nuko340.10812008/01/21 20:15:390B / 12B / 22B
3ais523(cheat)370.05992008/01/19 06:18:170B / ?B / ?B
4ais5232680.30022008/02/06 06:15:250B / ?B / ?B
5tails310.00412010/12/15 18:23:260B / 14B / 17B

Python _

RankUserSizeTimeDateStatistics
1kt3k430.20412008/01/22 17:47:270B / 24B / 19B
2hirose430.16402008/01/24 09:31:490B / 22B / 21B
3elb440.22912008/01/19 18:07:340B / 21B / 23B
4boo440.07842008/01/21 04:05:020B / 22B / 22B
5zetamatta610.11512008/02/10 07:46:360B / 32B / 27B
6Erik the Outgolfer470.09112020/10/24 06:09:420B / 26B / 20B

Python3 _

RankUserSizeTimeDateStatistics
1Erik the Outgolfer450.13542020/10/24 06:09:080B / 23B / 21B

PHP _

RankUserSizeTimeDateStatistics
1o-cn700.06432009/12/06 02:13:440B / ?B / ?B
2pooq790.41402008/10/07 00:15:090B / 42B / 37B

Pike _

RankUserSizeTimeDateStatistics
1pooq620.15942014/03/04 20:11:360B / 31B / 30B

Scheme _

RankUserSizeTimeDateStatistics
1murky-satyr980.05432008/07/04 01:28:570B / 58B / 34B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima(embed)950.26452008/01/21 18:59:560B / 50B / 42B
2kozima(embed)770.12832008/02/26 14:30:540B / 37B / 38B

Arc _

RankUserSizeTimeDateStatistics
1pooq6612.13102009/10/11 00:29:220B / 36B / 24B

Io _

RankUserSizeTimeDateStatistics
1poop933.04942008/01/28 17:44:250B / 68B / 21B
2poop862.59912008/04/29 20:16:570B / 65B / 18B
3tabasa882.74582008/02/17 14:11:110B / ?B / ?B

JavaScript _

RankUserSizeTimeDateStatistics
1FizzyTea640.04002014/12/10 18:07:340B / 40B / 23B
2murky-satyr680.08182008/04/03 05:07:290B / 41B / 24B

Lua _

RankUserSizeTimeDateStatistics
1murky-satyr600.06922008/06/05 04:55:240B / 28B / 32B

Tcl _

RankUserSizeTimeDateStatistics
1pooq820.00802009/11/23 11:54:590B / 51B / 19B

Icon _

RankUserSizeTimeDateStatistics
1pooq740.04522012/04/02 16:52:520B / 43B / 28B

Smalltalk _

RankUserSizeTimeDateStatistics
1murky-satyr930.39472008/06/27 00:56:330B / 62B / 26B

BASIC _

RankUserSizeTimeDateStatistics
1poop900.09782008/01/21 20:57:470B / 55B / 23B
2pooq890.40752008/09/15 15:04:460B / 54B / 24B

J _

RankUserSizeTimeDateStatistics
1poop380.17322008/01/27 01:19:580B / 16B / 22B
2pooq370.21922008/09/15 14:00:280B / 14B / 23B

A+ _

RankUserSizeTimeDateStatistics
1pooq530.04052009/12/06 04:19:572B / 25B / 25B

K _

RankUserSizeTimeDateStatistics
1teebee(pooq)250.03962012/08/09 09:52:150B / 9B / 16B
2pooq290.08452012/03/18 18:46:280B / 9B / 20B

C _

RankUserSizeTimeDateStatistics
151b(embed)610.05372008/01/19 08:19:120B / 35B / 26B
2ozy4dm(hidoi)610.06902008/01/22 22:32:033B / 27B / 31B
351b650.09192008/01/19 08:16:220B / 37B / 28B
4hinoe(mugoi)3250.06262008/02/05 06:18:070B / 141B / 184B
5%20(exec)600.01282016/08/21 08:27:530B / 31B / 26B

D _

RankUserSizeTimeDateStatistics
151b1000.08252008/01/26 17:39:050B / 68B / 29B

OCaml _

RankUserSizeTimeDateStatistics
1ksk830.22632008/01/26 15:48:330B / 50B / 32B
2m.ukai950.12792008/01/25 19:48:190B / 55B / 40B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa(embed)670.02232008/01/26 18:08:390B / 40B / 25B

Ada _

RankUserSizeTimeDateStatistics
1D1370.07662008/01/29 10:42:520B / 92B / 39B
2yt1450.05872008/02/15 13:50:180B / 94B / 47B

Pascal _

RankUserSizeTimeDateStatistics
1uru1270.14702009/07/09 23:52:130B / 79B / 38B
2pooq1350.05062009/01/25 07:50:110B / 89B / 36B

Curry _

RankUserSizeTimeDateStatistics
1pooq670.04732009/11/14 03:02:040B / 40B / 25B

Maxima _

RankUserSizeTimeDateStatistics
1pooq960.64092009/02/25 23:32:540B / 59B / 37B

AWK _

RankUserSizeTimeDateStatistics
1eban460.04542008/01/24 17:27:420B / 16B / 29B
2nn370.03152009/09/05 15:08:290B / 12B / 25B

sed _

RankUserSizeTimeDateStatistics
1eban620.05982008/01/20 04:36:270B / 23B / 34B
2ehird1670.04382008/01/19 06:49:121B / ?B / ?B
3ehird(CHEAT)1670.01662008/01/19 06:49:481B / ?B / ?B
4ais523(genuine)2600.47762008/02/11 21:02:260B / ?B / ?B
5eban570.01132011/01/07 16:52:060B / 23B / 29B

jq _

RankUserSizeTimeDateStatistics
1pooq280.03272014/12/10 19:10:570B / 13B / 15B

Postscript _

RankUserSizeTimeDateStatistics
1yshl(embed)(bin)590.53482008/02/01 22:36:2732B / 19B / 8B
2yshl(bin)1610.54562008/02/01 22:27:5256B / 54B / 49B
3yshl2600.55972008/02/01 22:27:450B / 185B / 45B

R _

RankUserSizeTimeDateStatistics
1pooq703.60872008/05/31 15:34:120B / 36B / 34B

Brainfuck _

RankUserSizeTimeDateStatistics
1nuko1080.05822008/01/23 19:10:230B / 0B / 108B

GolfScript _

RankUserSizeTimeDateStatistics
1leonid200.24642008/01/24 21:22:410B / 11B / 9B

gs2 _

RankUserSizeTimeDateStatistics
1whio120.25672017/02/04 07:08:086B / 5B / 1B

FlogScript _

RankUserSizeTimeDateStatistics
1zzo38(embed)220.13382011/06/07 15:54:360B / 7B / 15B
2zzo38(genuine)610.71812010/12/15 17:50:380B / 11B / 43B
3zzo38640.80482010/05/16 00:48:210B / 12B / 45B

Burlesque _

RankUserSizeTimeDateStatistics
1AndoDaan380.03372014/12/10 18:54:470B / 13B / 25B

Vim _

RankUserSizeTimeDateStatistics
1nn290.07072009/12/13 12:33:323B / 18B / 5B
2pla390.07152009/12/11 01:11:063B / 21B / 14B

goruby _

RankUserSizeTimeDateStatistics
1leonid220.17752008/01/24 22:10:300B / 11B / 10B
2tabasa880.15642008/01/24 10:46:377B / 47B / 25B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr5110.94932008/04/29 23:13:130B / 30B / 21B

Scala _

RankUserSizeTimeDateStatistics
1murky-satyr5310.31992011/02/10 18:09:480B / 32B / 19B
2pooq5410.35242011/02/10 16:58:550B / 34B / 19B

Language Ranking_

RankLangUserSizeScore
1gs2whio1210000
2GolfScriptleonid206000
3gorubyleonid225454
4FlogScriptzzo38(embed)225454
5Kteebee(pooq)254800
6jqpooq284285
7Vimnn294137
8Rubyleonid304000
9Perltails313870
10Jpooq373243
11AWKnn373243
12BurlesqueAndoDaan383157
13Pythonkt3k432790
14Python3Erik the Outgolfer452666
15Groovymurky-satyr512352
16A+pooq532264
17Scalamurky-satyr532264
18sedeban572105
19Postscriptyshl(embed)(bin)592033
20Luamurky-satyr602000
21C%20(exec)602000
22Pikepooq621935
23JavaScriptFizzyTea641875
24Arcpooq661818
25Haskellnotogawa(embed)671791
26Currypooq671791
27Rpooq701714
28PHPo-cn701714
29Iconpooq741621
30Common LISPkozima(embed)771558
31Tclpooq821463
32OCamlksk831445
33Iopoop861395
34BASICpooq891348
35Smalltalkmurky-satyr931290
36Maximapooq961250
37Schememurky-satyr981224
38D51b1001200
39Brainfucknuko1081111
40Pascaluru127944
41AdaD137875

return to the top page