Here's an example that works with J802/JQt
(mind line wrapping)
".@(('utm=. '),,)@(];._2)@(noun=. ".@('(0 : 0)'"_))_ NB. Fixed tacit
universal Turing machine code...
(((":@:(]&:>)@:(6&({::)) ,: (":@] 9&({::))) ,. ':'"_) ,. 2&({::)
>@:(((48 + ]) { a."_)@[ ; (] $ ' '"_) , '^'"_) 3&({::))@:([ (0 0 $
1!:2&2)@:('A changeless cycle was detected!'"_)^:(-.@:(_1"_ =
1&({::))))@:((((3&({::) + 8&({::)) ; 1 + 9&({::)) 3 9} ])@:(<@:((0:
0&({::)@]`(<@(1&({::))@])`(2&({::)@])} ])@:(7 3 2&{)) 2}
])@:(<"0@:(6&({::) (<@[ { ]) 0&({::)) 7 8 1} ])@:([ (0 0 $
1!:2&2)@:(((":@:(]&:>)@:(6&({::)) ,: (":@] 9&({::))) ,. ':'"_) ,.
2&({::) >@:(((48 + ]) { a."_)@[ ; (] $ ' '"_) , '^'"_) 3&({::))^:(0 =
4&({::) | 9&({::)))@:(<@:(1&({::) ; 3&({::) { 2&({::)) 6}
])@:(<@:(3&({::) + _1 = 3&({::)) 3} ])@:(<@:(((_1 = 3&({::)) {::
5&({::)) , 2&({::) , (3&({::) = #@:(2&({::))) {:: 5&({::)) 2}
])^:(-.@:(_1"_ = 1&({::)))^:_)@:((0 ; (({. , ({: % 3:) , 3:)@:$ $
,)@:(}."1)@:(".;._2)@:(0&({::))) 9 0} ])@:(<@:('' ; 0"_) 5} ])@:(5&(] ,
a: $~ [))@:(,~)
)
QS=. (noun _) ; 0 NB. Reading the transition table and
setting the initial state
0 1 0 _1 1 1 0
)
TPF=. 1 1 1 ; 0 ; 1 NB. Setting the tape, its pointer and the
display frequency
TPF utm QS
0 1:111
0 :^
0 1:111
1 : ^
0 1:111
2 : ^
0 0:1110
3 : ^
0 0:1111
4 : ^
On 18-07-14 18:34, Raul Miller wrote:
What is your definition of "noun"?
Here's what I get in a fresh j802 session:
noun _
|syntax error
Thanks,
--
Met vriendelijke groet,
@@i = Arie Groeneveld
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm