mirror of
https://github.com/urbit/shrub.git
synced 2025-01-04 10:32:34 +03:00
chat: Move eval logic into lib
This commit is contained in:
parent
c7fbad61ee
commit
9532857ef5
@ -12,8 +12,7 @@
|
||||
/- *chat-store, *chat-view, *chat-hook,
|
||||
*permission-store, *group-store,
|
||||
sole-sur=sole
|
||||
/+ sole-lib=sole
|
||||
/= seed /~ !>(.)
|
||||
/+ sole-lib=sole, chat-eval
|
||||
::
|
||||
|%
|
||||
+$ state
|
||||
@ -681,16 +680,7 @@
|
||||
::
|
||||
++ eval
|
||||
|= [txt=cord exe=hoon]
|
||||
=; tan=(list tank)
|
||||
(say %code txt tan)
|
||||
;; (list tank)
|
||||
=< +>
|
||||
%+ mong
|
||||
:- mute
|
||||
=- |.([(sell (slap (slop !>(-) seed) exe))]~)
|
||||
^- [our=@p now=@da eny=@uvI]
|
||||
[our-self now.bowl (shas %eny eny.bowl)]
|
||||
|=(^ ~)
|
||||
(say %code txt (eval:chat-eval bowl exe))
|
||||
:: +lookup-glyph: print glyph info for all, glyph or target
|
||||
::
|
||||
++ lookup-glyph
|
||||
|
@ -1,4 +1,5 @@
|
||||
/- *chat-store, *chat-view
|
||||
/+ chat-eval
|
||||
|%
|
||||
::
|
||||
++ slan |=(mod/@tas |=(txt/@ta (need (slaw mod txt))))
|
||||
@ -39,7 +40,7 @@
|
||||
=/ res ((ot output+(ar dank) ~) a)
|
||||
?^ res
|
||||
u.res
|
||||
p:(mule |.([(sell (slap !>(..^zuse) (ream u.exp)))]~)) ::TODO oldz
|
||||
(eval:chat-eval *bowl:gall (ream u.exp))
|
||||
::
|
||||
++ lett
|
||||
|= =letter
|
||||
|
16
pkg/arvo/lib/chat/eval.hoon
Normal file
16
pkg/arvo/lib/chat/eval.hoon
Normal file
@ -0,0 +1,16 @@
|
||||
|%
|
||||
++ eval
|
||||
|= [=bowl:gall =hoon]
|
||||
^- (list tank)
|
||||
=/ subj=[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))]~)
|
||||
|=(^ ~)
|
||||
--
|
Loading…
Reference in New Issue
Block a user