Better handling of .^ in ames and ++mink

This commit is contained in:
C. Guy Yarvin 2016-02-18 13:44:17 -08:00
parent 259eb79cb8
commit 90efa87743
3 changed files with 29 additions and 30 deletions

View File

@ -1605,21 +1605,14 @@
?~ tyl [~ ~]
=+ hun=(slaw %p i.tyl)
?~ hun [~ ~]
=- ?~ old ~
[~ ~ u.old]
^= old
?. =(`@`0 ren) ~
?+ lot ~
{$$ $ud @}
%+ bind
(perm who u.hun q.p.lot [syd t.tyl])
|=(a/* [%noun !>(a)])
(perm who u.hun q.p.lot [syd t.tyl])
::
{$$ $da @}
?. =(now q.p.lot) ~
%+ bind
(temp who u.hun [syd t.tyl])
|=(a/* [%noun !>(a)])
(temp who u.hun [syd t.tyl])
==
::
++ stay fox
@ -1730,15 +1723,13 @@
::
$wine
:_ fox
=+ nym=(temp p.p.bon q.p.bon /name)
=+ fom=~(rend co %$ %p q.p.bon)
:~ :- hen
:+ %slip %d
:+ %flog %text
;: weld
"; "
?: |(?=($~ nym) =(%$ u.nym)) fom
:(weld fom " " (trip ((hard @) u.nym)))
fom
q.bon
==
==
@ -1839,49 +1830,50 @@
::
++ perm
|= {our/ship his/ship mar/@ud tyl/path}
^- (unit)
^- (unit (unit cage))
?~ tyl ~
?: ?=({$name $~} tyl)
=+ wul=$(tyl [%will ~])
[~ ?~(wul (scot %p his) (gnow his q.q.q:((hard deed) -.u.wul)))]
``[%noun !>(?~(wul (scot %p his) (gnow his q.q.q:((hard deed) -.u.wul))))]
?: ?=({$gcos $~} tyl)
=+ wul=$(tyl [%will ~])
[~ ?~(wul ~ [~ `gcos`q.q.q:((hard deed) -.u.wul)])]
?~(wul ~ ``[%noun !>(`gcos`q.q.q:((hard deed) -.u.wul))])
=+ gys=(~(us go ton.fox) our)
?~ gys ~
?. =(our his)
?: ?=({$will $~} tyl)
=+ fod=(~(get by hoc.saf.u.gys) his)
?~ fod ~
(rick mar his lew.wod.u.fod)
%+ bind (rick mar his lew.wod.u.fod)
|=(a/will `[%noun !>(a)])
?: ?=({$tick $~} tyl)
?. =(our (sein his)) ~
[~ (end 6 1 (shaf %tick (mix his (shax sec:ex:q:sen:u.gys))))]
``[%noun !>((end 6 1 (shaf %tick (mix his (shax sec:ex:q:sen:u.gys)))))]
~
?: ?=({$buck $~} tyl)
=+ muc=(rice mar sex:u.gys)
=+ luw=(rick mar our law.saf.u.gys)
?. &(?=(^ muc) ?=(^ luw)) ~
[~ `buck`[u.muc u.luw]]
``[%noun !>(`buck`[u.muc u.luw])]
?: ?=({$code $~} tyl)
[~ (end 6 1 (shaf %pass (shax sec:ex:q:sen:u.gys)))]
``[%noun !>((end 6 1 (shaf %pass (shax sec:ex:q:sen:u.gys))))]
?: ?=({$will $~} tyl)
(rick mar our law.saf.u.gys)
(bind (rick mar our law.saf.u.gys) |=(a/will `[%noun !>(a)]))
~
::
++ temp
|= {our/ship his/ship tyl/path}
^- (unit)
^- (unit (unit cage))
?: ?=({?($show $tell) *} tyl)
?^ t.tyl ~
?^ t.tyl [~ ~]
=+ gys=(~(us go ton.fox) our)
?~ gys ~
?~ gys [~ ~]
=+ zet=zest:(ho:(~(um am [now fox]) our) his)
[~ ?:(=(%show i.tyl) >zet< zet)]
``[%noun ?:(=(%show i.tyl) !>(>zet<) !>(zet))]
?: ?=({$pals $~} tyl)
?. =(our his)
~
[~ pals:(~(um am [now fox]) our)]
``[%noun !>(pals:(~(um am [now fox]) our))]
?. ?=({$life $~} tyl)
=+ muc=$(tyl [%life ~])
(perm our his ?~(muc 0 (@ud u.muc)) tyl)
@ -1891,9 +1883,9 @@
=+ fod=(~(get by hoc.saf.u.gys) his)
?~ fod ~
?~ lew.wod.u.fod ~
[~ `@ud`p.p.q.i.lew.wod.u.fod]
``[%noun !>(`@ud`p.p.q.i.lew.wod.u.fod)]
?~ val.saf.u.gys ~
[~ `@ud`p.i.val.saf.u.gys]
``[%noun !>(`@ud`p.i.val.saf.u.gys)]
::
++ wegh
^- mass

View File

@ -4609,7 +4609,7 @@
?. ?=($0 -.ref) ref
?. ?=($0 -.ben) ben
=+ val=(gul p.ref p.ben)
?~(val [%1 p.ben ~] ?~(u.val !! [%0 u.u.val]))
?~(val [%1 p.ben ~] ?~(u.val [%2 [[%hunk (mush p.ben)] tax]] [%0 u.u.val]))
==
::
++ mock
@ -4672,6 +4672,13 @@
leaf+"<[{(ud p.p)} {(ud q.p)}].[{(ud p.q)} {(ud q.q)}]>"
== ==
::
++ mush :: sane name to leaf
|= val/*
^- tank
:+ %rose
[['/' ~] ['/' ~] ~]
(turn ((list @ta) val) |=(a/@ta [%leaf (trip a)]))
::
++ mong
|= {{gat/* sam/*} gul/$-({* *} (unit (unit)))}
^- toon

View File

@ -13,5 +13,5 @@
:- %noun
?> =(1 (met 5 p.bec))
=+ mon=(mix (lsh 5 1 (end 5 1 eny)) p.bec)
=+ tic=.^(@p /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p mon))
"moon: {<`@p`mon>}; ticket: {<tic>}"
=+ tic=.^(@ /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p mon))
"moon: {<`@p`mon>}; ticket: {<`@p`tic>}"