urbit/pkg
Philip Monk e3a8cab943 khan: support inline threads
This allows you to pass a thread directly into khan, instead of passing
a filename.  This has several implications:

- The friction for using threads from an app is significantly lower.
  Consider:

    =/  shed
      =/  m  (strand ,vase)
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('there'))
      (pure:m !>('product'))
    [%pass /wire %arvo %k %lard %base shed]

- These threads close over their subject, so you don't need to parse
  arguments out from a vase -- you can just refer to them.  The produced
  value must still be a vase.

    ++  hi-ship
      |=  [=ship msg1=@t msg2=@t]
      =/  shed
        =/  m  (strand ,vase)
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg1))
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg2))
        (pure:m !>('product'))
      [%pass /wire %arvo %k %lard %base shed]

- Inline threads can be added to the dojo, though this PR does not add
  any sugar for this.

    =strandio -build-file %/lib/strandio/hoon
    =sh |=  message=@t
        =/  m  (strand:rand ,vase)
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>(message))
        (pure:m !>('product'))
    |pass [%k %lard %base (sh 'the message')]

Implementation notes:
- Review the commits separately: the first is small and implements the
  real feature.  The second moves the strand types into lull so khan can
  refer to them.

- In lull, I wanted to put +rand inside +khan, but this fails to that
  issue that puts the compiler in a loop.  +rand depends on +gall, which
  depends on +sign-arvo, which depends on +khan.  If +rand is in +khan,
  this spins the compiler.  The usual solution is to either move
  everything into the same battery (very ugly here) or break the
  recursion (which we do here).
2022-08-29 21:04:50 -08:00
..
arvo khan: support inline threads 2022-08-29 21:04:50 -08:00
base-dev khan: support inline threads 2022-08-29 21:04:50 -08:00
bitcoin bitcoin: v0.0.2 2022-08-03 14:54:06 +02:00
btc-wallet interface: fixing react-codemirror2 dep 2022-06-17 14:59:28 -05:00
docker-image docker: update documentation 2021-04-25 12:02:56 -04:00
ent repo: fix ent build on mingw 2022-03-25 15:16:39 -06:00
garden Merge branch 'next/arvo' into yu/gall-rq-global-cork-timer 2022-07-25 19:50:26 +02:00
garden-dev hark-store: fix ship parsing 2022-03-28 10:13:52 -06:00
grid ops: fixing build 2022-06-23 12:24:39 -05:00
herb Revert "Revert "Merge naive/aggregator into poprox/naive-tests"" 2021-08-19 16:09:28 -07:00
hs Merge branch 'master' into next/vere 2021-12-17 23:38:22 -05:00
interface groups: correcting package lock yet again 2022-07-06 11:37:34 -05:00
landscape meta: version bumps 2022-07-13 12:21:20 -05:00
npm meta: version bump for new changes from next/landscape 2022-06-21 14:52:20 -05:00
urbit vere: bumps version 2022-07-28 14:42:05 -04:00
urcrypt urcrypt: correct parameter ordering in urcrypt_ed_veri() 2022-05-06 22:57:57 +00:00
webterm lull: bump app kelvins to 418 2022-04-29 19:25:00 -07:00
symbolic-merge.sh pkg/symbolic-merge.sh from @Fang- 2021-08-30 20:19:16 +03:00