2015-11-26 01:39:24 +03:00
|
|
|
::
|
2015-12-20 14:48:17 +03:00
|
|
|
:::: /hoon#ask#ape
|
2015-11-26 01:39:24 +03:00
|
|
|
::
|
|
|
|
/? 314
|
|
|
|
/+ sole
|
|
|
|
[. sole]
|
|
|
|
|%
|
|
|
|
++ card
|
2015-12-15 03:45:52 +03:00
|
|
|
$% {$diff $sole-effect sole-effect}
|
2015-11-26 01:39:24 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
!:
|
2015-12-20 23:50:45 +03:00
|
|
|
|_ {bow/bowl adr/(set cord) sos/(map bone sole-share)}
|
2015-11-26 01:39:24 +03:00
|
|
|
++ peer-sole
|
|
|
|
|= path
|
2015-12-15 03:45:52 +03:00
|
|
|
^- (quip {bone card} +>)
|
2015-11-26 01:39:24 +03:00
|
|
|
~| [%not-in-whitelist src.bow]
|
|
|
|
?> (~(has in (sa (limo ~zod our.bow ~talsur-todres ~))) src.bow)
|
|
|
|
:_ +>.$(sos (~(put by sos) ost.bow *sole-share))
|
2015-12-20 14:48:17 +03:00
|
|
|
=- [(effect %mor pro#[& %$ "<listening>"] -)]~
|
2015-11-26 01:39:24 +03:00
|
|
|
=+ all=adrs
|
2015-12-20 14:48:17 +03:00
|
|
|
[tan#(turn all message) (turn all put-mail)]
|
2015-11-26 01:39:24 +03:00
|
|
|
::
|
|
|
|
++ adrs (sort (~(tap by adr)) aor)
|
2015-12-20 23:50:45 +03:00
|
|
|
++ effect |=(fec/sole-effect [ost.bow %diff %sole-effect fec])
|
|
|
|
++ message |=(ask/@t leaf#"ask: {(trip ask)}")
|
|
|
|
++ put-mail |=(ask/@t =+(pax=(rash ask unix-path) [%sav pax '']))
|
2015-11-26 01:39:24 +03:00
|
|
|
++ unix-path :: split into path of "name" and "extension"
|
|
|
|
;~ (glue dot)
|
|
|
|
(cook crip (star ;~(less dot next)))
|
|
|
|
;~(plug (cook crip (star next)) (easy ~))
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ poke-ask-mail
|
2015-12-20 23:50:45 +03:00
|
|
|
|= ask/@t
|
2015-12-15 03:45:52 +03:00
|
|
|
^- (quip {bone card} +>)
|
2015-12-20 14:48:17 +03:00
|
|
|
~| have-mail#ask
|
2015-11-26 01:39:24 +03:00
|
|
|
?< (~(has in adr) ask)
|
|
|
|
:_ +>.$(adr (~(put in adr) ask))
|
|
|
|
=+ [mez=[(message ask)]~ sav=(put-mail ask)]
|
|
|
|
%+ turn (prey /sole bow)
|
2015-12-20 23:50:45 +03:00
|
|
|
|=({ost/bone ^} (effect(ost.bow ost) %mor tan#mez sav ~))
|
2015-11-26 01:39:24 +03:00
|
|
|
::
|
|
|
|
++ poke-sole-action
|
2015-12-20 23:50:45 +03:00
|
|
|
|= act/sole-action
|
2015-12-15 03:45:52 +03:00
|
|
|
^- (quip {bone card} +>)
|
2015-11-26 01:39:24 +03:00
|
|
|
?- -.act
|
2015-12-15 03:45:52 +03:00
|
|
|
$clr `+>.$
|
2015-12-20 14:48:17 +03:00
|
|
|
$ret [[(effect tan#(turn adrs message))]~ +>.$] :: re-print list
|
2015-12-15 03:45:52 +03:00
|
|
|
$det :: reject all input
|
2015-11-26 01:39:24 +03:00
|
|
|
=+ som=(~(got by sos) ost.bow) :: XX this code belongs in a library
|
|
|
|
=^ inv som (~(transceive sole som) +.act)
|
|
|
|
=^ det som (~(transmit sole som) inv)
|
|
|
|
=. sos (~(put by sos) ost.bow som)
|
2015-12-20 14:48:17 +03:00
|
|
|
[[(effect det#det)]~ +>.$]
|
2015-11-26 01:39:24 +03:00
|
|
|
==
|
|
|
|
--
|