Conflicts:
	urb/urbit.pill
This commit is contained in:
pcmonk 2014-07-03 11:17:57 -07:00
commit 24fb18fe73
3 changed files with 88 additions and 44 deletions

View File

@ -1926,8 +1926,8 @@
:: ::
+- add :: adds key-list pair +- add :: adds key-list pair
|* [b=* c=*] |* [b=* c=*]
=+ d=(get(a +>) b) =+ d=(get(+< a) b)
(~(put by a) [d c]) (~(put by a) b [c d])
-- --
:: ::
++ ju :: jug engine ++ ju :: jug engine

View File

@ -922,57 +922,62 @@
++ adze :: adze:ze ++ adze :: adze:ze
|= may=(list nori) :: reverse nori |= may=(list nori) :: reverse nori
%- flop %- flop
|- ^- (list nori) ^- (list nori)
?~ may ~ %+ murn may
=+ yam=$(may t.may) |= n=nori
?- -.i.may ?- -.n
& [[%& (bind p.i.may acai) (curl q.i.may)] yam] & [~ u=[%& (bind p.n acai) (curl q.n)]]
| yam | ~
== ==
:: ::
++ alar :: alar:ze ++ alar :: alar:ze
|= may=(list nori) :: nori to tako |= may=(list nori) :: nori to tako
^- (list tako) ^- (list tako)
?~ may ~ %- zing
?- -.i.may %+ turn may
& (weld q.q.i.may $(may t.may)) |= n=nori
| $(may t.may) ?- -.n
& q.q.n
| ~
== ==
:: ::
++ alda :: alda:ze ++ alda :: alda:ze
|= hoe=(list tako) :: deconstruct |= hoe=(list tako) :: deconstruct
|- ^- (map path (list miso)) ^- (map path (list miso))
?~ hoe ~ %+ reel hoe
=+ hom=$(hoe t.hoe) |= [rak=tako hom=(map path (list miso))]
%+ ~(put by hom) p.i.hoe %+ ~(add ja hom) p.rak q.rak
=+ vue=(~(get by hom) p.i.hoe)
[q.i.hoe ?~(vue ~ u.vue)]
:: ::
++ alot ++ alot :: alot:ze
|= yop=(map path (list miso)) |= yop=(map path (list miso)) :: construct, inverse alda
^- (list tako) ^- (list tako)
=+ puy=(~(tap by yop) ~) =+ puy=(~(tap by yop) ~)
|- ^- (list tako) %- zing
?~ puy ~ %+ turn puy :: map on pair -> list tako
(weld (turn q.i.puy |=(a=miso [p.i.puy a])) $(puy t.puy)) |= yup=[p=path q=(list miso)]
%+ turn q.yup :: map on miso -> tako
|= mis=miso
[p.yup mis]
:: ::
++ alto :: alto:ze ++ alto :: alto:ze
|= $: wek=waks |= $: wek=waks
yop=(map path (list miso)) :: yop before peq yop=(map path (list miso)) :: yop before peq
peq=(map path (list miso)) peq=(map path (list miso)) :: aka miso commute
== ==
^+ [wek peq]
=+ puy=(~(tap by (~(gas by yop) (~(tap by peq) ~))) ~) =+ puy=(~(tap by (~(gas by yop) (~(tap by peq) ~))) ~)
|- ^+ [wek peq] %+ roll puy
?~ puy [wek peq] |= $: yup=[p=path q=(list miso)]
=+ wof=(~(get by wek) p.i.puy) $: kew=_wek
=+ yoq=(~(get by yop) p.i.puy) qep=_peq
=+ peb=(~(get by peq) p.i.puy)
=+ lyr=(lyre wof ?~(yoq ~ u.yoq) ?~(peb ~ u.peb))
%= $
wek ?~(-.lyr wek (~(put by wek) p.i.puy u.-.lyr))
puy t.puy
peq (~(put by peq) p.i.puy +.lyr)
== ==
==
=+ wof=(~(get by kew) p.yup)
=+ yoq=(~(get by yop) p.yup)
=+ peb=(~(get by qep) p.yup)
=+ lyr=(lyre wof ?~(yoq ~ u.yoq) ?~(peb ~ u.peb))
:- ?~ -.lyr kew (~(put by kew) p.yup u.-.lyr)
(~(put by qep) p.yup +.lyr)
:::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
++ lisp :: transform urge ++ lisp :: transform urge
@ -1122,18 +1127,19 @@
++ lyre :: put yeb before zeq ++ lyre :: put yeb before zeq
|= [wof=(unit woof) yeb=(list miso) zeq=(list miso)] |= [wof=(unit woof) yeb=(list miso) zeq=(list miso)]
^- [(unit woof) (list miso)] ^- [(unit woof) (list miso)]
?~ yeb %- |= fow=(unit woof) :: postprocess roll
?~ wof [wof zeq] ?~ fow [fow zeq]
=+ alw=(alho u.wof zeq) :- fow +:(alho u.fow zeq)
[wof +.alw] %+ roll yeb
?~ wof |= [mis=miso waf=(unit woof)]
?: &(?=(%mut -.i.yeb) ?=(%c -.q.p.i.yeb)) ?~ waf
$(wof (some (lith p.q.p.i.yeb)), yeb t.yeb) ?: &(?=(%mut -.mis) ?=(%c -.q.p.mis))
?: ?=(%mut -.i.yeb) (some (lith p.q.p.mis))
?: ?=(%mut -.mis)
~| "Cannot generate merge with non textfile changes" ~| "Cannot generate merge with non textfile changes"
!! !!
$(yeb t.yeb, wof (some %know)) (some %know)
$(wof (some (lobo u.wof i.yeb)), yeb t.yeb) (some (lobo u.waf mis))
:: ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
++ amor :: amor:ze ++ amor :: amor:ze

38
try/bin/flopp.hoon Normal file
View File

@ -0,0 +1,38 @@
!:
:: /=main=/bin/app/hoon
::
=> %= .
+
=> +
|%
++ sii !:
=| *
|%
+- $
?~ +<
+<
$(+< +<+)
--
++ flopp
=| *
=| *
|%
+- $
?~ +<
?~ +>- ~
+>-
?~ +>-
$(+< +<+, +>- [+<- +<+(. ~)])
$(+< +<+, +>- [+<- +<+(. +>-)])
--
--
==
|= *
|= ~
^- bowl
:_ ~ :_ ~
:- %$
!>
=+ x=[i=1 t=[i=2 t=[i=3 t=[i=4 t=~]]]]
=+ y=(limo [1 2 3 4 ~])
(flopp x)