stack overflow-inducing dill

This commit is contained in:
Philip C Monk 2015-05-06 15:55:47 -04:00
parent 99451fa4af
commit c53d71fc33

View File

@ -59,12 +59,27 @@
++ gill (pair ship term) :: general contact
-- ::
=> |% :: console protocol
++ axle :: all dill state
++ old-axle :: all dill state
$: %2 ::
ore=(unit ship) :: identity once set
hey=(unit duct) :: default duct
dug=(map duct axon) :: conversations
== ::
++ mass (each noun (list (pair cord mass))) :: XX del after reset
++ axle :: all dill state
$: %3 ::
ore=(unit ship) :: identity once set
hey=(unit duct) :: default duct
dug=(map duct axon) :: conversations
$= hef :: other weights
$: a=(unit mass) ::
c=(unit mass) ::
e=(unit mass) ::
f=(unit mass) ::
g=(unit mass) ::
t=(unit mass) ::
== ::
== ::
++ axon :: dill per duct
$: ram=term :: console program
tem=(unit (list dill-belt)) :: pending, reverse
@ -94,8 +109,9 @@
[%sav p=path q=@] :: save to file
== ::
++ flog :: sent to %dill
$% [%crud p=@tas q=(list tank)] ::
[%text p=tape] ::
$% [%crud p=@tas q=(list tank)] :: error with trace
[%heft ~] :: system memory
[%text p=tape] :: print text
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
@ -105,6 +121,7 @@
[%blit p=(list blit)] :: terminal output
[%init p=@p] :: set owner
[%logo ~] :: logout
[%mass p=mass] :: memory usage
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
@ -117,6 +134,7 @@
[%flog p=flog] :: wrapped error
[%flow p=@tas q=(list gill)] :: terminal config
[%hail ~] :: terminal refresh
[%heft ~] :: system memory
[%hook ~] :: this term hung up
[%harm ~] :: all terms hung up
[%init p=ship] :: after gall ready
@ -143,6 +161,7 @@
== ::
++ note-dill :: note to self, odd
$% [%crud p=@tas q=(list tank)] ::
[%heft ~] ::
[%init p=ship] ::
[%text p=tape] ::
[%veer p=@ta q=path r=@t] :: install vane
@ -184,12 +203,13 @@
$% [%wake ~] ::
== ::
++ sign :: in result $<-
$? [?(%a %c %e %f %g %t) %mass p=mass] ::
$% [%a sign-ames] ::
[%c sign-clay] ::
[%d sign-dill] ::
[%g sign-gall] ::
[%t sign-time] ::
== ::
== == ::
:::::::: :: dill tiles
--
=| all=axle
@ -215,6 +235,7 @@
%crud :: (send `dill-belt`[%cru p.kyz q.kyz])
(crud p.kyz q.kyz)
%blew (send %rez p.p.kyz q.p.kyz)
%heft heft
%veer (dump kyz)
%vega (dump kyz)
%verb (dump kyz)
@ -260,6 +281,14 @@
(dump %logo ~)
(done %blit [bit ~])
::
++ heft
%_ .
moz
:* [hen %pass /heft/ames %a %wegh ~]
moz
==
==
::
++ init :: initialize
~& [%dill-init our]
=+ myt=(flop (need tem))
@ -300,10 +329,54 @@
:_(moz [hen %pass ~ %g %took [our [ram ~]] our])
==
::
++ wegh
^- mass
:- %|
:~ ore/`ore.all
hey/`hey.all
dug/`dug.all
==
::
++ wegt
|= [lal=?(%a %c %e %f %g %t) mas=mass]
^+ +>
=. hef.all
?- lal
%a ?~(a.hef.all hef.all(a `mas) ~|(%double-mass-a !!))
%c ?~(c.hef.all hef.all(c `mas) ~|(%double-mass-c !!))
%e ?~(e.hef.all hef.all(e `mas) ~|(%double-mass-e !!))
%f ?~(f.hef.all hef.all(f `mas) ~|(%double-mass-f !!))
%g ?~(g.hef.all hef.all(g `mas) ~|(%double-mass-g !!))
%t ?~(t.hef.all hef.all(t `mas) ~|(%double-mass-t !!))
==
?. ?& ?=(^ a.hef.all)
?=(^ c.hef.all)
?=(^ e.hef.all)
?=(^ f.hef.all)
?=(^ g.hef.all)
?=(^ t.hef.all)
==
.
%+ done(hef.all [~ ~ ~ ~ ~ ~])
%mass
=> [hef.all d=wegh]
:- %|
:~ ames/u.a
clay/u.c
dill/u.d
eyre/u.e
ford/u.f
gall/u.g
time/u.t
==
::
++ take :: receive
|= sih=sign
|= [tea=wire sih=sign]
^+ +>
?- sih
[?(%a %c %e %f %g %t) %mass *]
(wegt -.sih p.sih)
::
[%a %nice *]
:: ~& [%take-nice-ames sih]
+>
@ -311,14 +384,14 @@
[%a %init *]
+>(moz :_(moz [hen %give +.sih]))
::
[%c %mere *]
[%c %mere *] :: i don't think we get these anymore
?: ?=(%& -.p.sih)
+>.$
~| %dill-mere-fail
~| p.p.p.sih
|-
?~ q.p.p.sih !!
~> %mean.|.(i.q.p.p.sih) :: interpolate ford fail into stack trace
~> %mean.|.(i.q.p.p.sih) :: interpolate ford fail into stack trace
$(q.p.p.sih t.q.p.p.sih)
::
[%c %note *]
@ -425,7 +498,9 @@
~
::
++ load :: trivial
|= old=axle
|= old=?(old-axle axle)
?: ?=(%2 -.old)
$(old [%3 ore hey dug ~ ~ ~ ~ ~ ~])
..^$(all old)
:: |= old=* :: diable
:: ..^$(ore.all `~zod)
@ -454,6 +529,6 @@
[~ ..^$]
=+ our=?>(?=(^ ore.all) u.ore.all)
=^ moz all
abet:(~(take as [~ hen our] (~(got by dug.all) hen)) q.hin)
abet:(~(take as [~ hen our] (~(got by dug.all) hen)) tea q.hin)
[moz ..^$]
--