Merge branch 'm/chat-eval' (#2009)

* m/chat-eval:
  chat: include .^ paths in its eval failure case
  chat: improve eval implementation

Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
Jared Tobin 2019-12-07 16:48:42 +08:00
commit 27b5ded1d2
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4

View File

@ -2,15 +2,22 @@
++ eval
|= [=bowl:gall =hoon]
^- (list tank)
=/ subj=[our=@p now=@da eny=@uvJ]
=/ fowl=[our=@p now=@da eny=@uvJ]
:+ our.bowl
now.bowl
(shaz (cat 3 (mix [now eny]:bowl) %eny))
::
;; (list tank)
=< +>
%+ mong
:- mute
|.([(sell (slap (slop !>(subj) !>(..zuse)) hoon))]~)
|=(^ ~)
=/ subject [fowl ..zuse]
=/ minted=(each [=type =nock] (list tank))
%- mule |.
(~(mint ut -:!>(subject)) %noun hoon)
?: ?=(%| -.minted) p.minted
=/ =toon
(mock [subject nock.p.minted] |=(^ ~))
?- -.toon
%0 [(sell type.p.minted p.toon) ~]
%1 :- leaf+".^ unsupported in chat eval"
(turn ;;((list path) p.toon) smyt)
%2 [leaf+"crash!" p.toon]
==
--