2022-01-17 06:36:52 +03:00
|
|
|
/- *story
|
2022-01-31 00:01:45 +03:00
|
|
|
/+ *story
|
2022-01-16 07:37:51 +03:00
|
|
|
!:
|
2022-01-17 06:36:52 +03:00
|
|
|
|_ tale=story
|
2022-01-31 00:02:47 +03:00
|
|
|
+$ story-diff [additions=story deletions=story]
|
2022-01-26 19:39:18 +03:00
|
|
|
::
|
2022-01-16 07:37:51 +03:00
|
|
|
++ grad
|
|
|
|
|%
|
|
|
|
++ form %story-diff
|
|
|
|
++ diff
|
|
|
|
|= tory=story
|
|
|
|
^- story-diff
|
2022-01-31 00:03:10 +03:00
|
|
|
:: Given new story (tory), old story (tale), compute the diff
|
|
|
|
:: additions = new - old
|
|
|
|
:: deletions = old - new
|
|
|
|
[(dif-ju tory tale) (dif-ju tale tory)]
|
2022-01-16 07:37:51 +03:00
|
|
|
++ pact
|
|
|
|
|= dif=story-diff
|
2022-01-31 00:03:10 +03:00
|
|
|
:: compute the new story after applying dif to tale
|
2022-01-16 07:37:51 +03:00
|
|
|
^- story
|
2022-01-31 00:03:10 +03:00
|
|
|
=. tale (uni-ju tale additions.dif)
|
|
|
|
=. tale (dif-ju tale deletions.dif)
|
2022-01-26 19:39:18 +03:00
|
|
|
tale
|
2022-01-16 07:37:51 +03:00
|
|
|
++ join
|
|
|
|
|= [ali=story-diff bob=story-diff]
|
|
|
|
^- (unit story-diff)
|
2022-01-31 00:03:10 +03:00
|
|
|
=/ joined-additions (uni-ju additions.ali additions.bob)
|
|
|
|
=/ joined-deletions (uni-ju deletions.ali deletions.bob)
|
2022-01-26 19:39:18 +03:00
|
|
|
::
|
2022-01-16 07:37:51 +03:00
|
|
|
:: in a true join, we'd do an intersection and see if the vals are not exactly the same
|
|
|
|
:: which means we have a conflict, then we'd produce null, kick the flow to mash
|
|
|
|
%- some
|
2022-01-31 00:03:10 +03:00
|
|
|
[joined-additions joined-deletions]
|
2022-01-16 07:37:51 +03:00
|
|
|
++ mash
|
|
|
|
:: called by meld, force merge, annotating conflicts
|
|
|
|
|= $: [als=ship ald=desk ali=story-diff]
|
|
|
|
[bos=ship bod=desk bob=story-diff]
|
|
|
|
==
|
|
|
|
^- story-diff
|
|
|
|
(need (join ali bob)) :: XX temporary, only because join doesn't fail
|
|
|
|
--
|
2021-11-19 22:49:49 +03:00
|
|
|
::
|
|
|
|
++ grow :: convert to
|
|
|
|
|% ::
|
|
|
|
++ mime :: to %mime
|
|
|
|
[/text/x-urb-story (as-octs:mimes:html (of-wain:format txt))]
|
|
|
|
++ txt
|
|
|
|
^- wain
|
2022-02-04 20:53:13 +03:00
|
|
|
%- snoc :_ '' :: ensures terminating newline is present
|
2022-01-21 19:50:05 +03:00
|
|
|
%+ murn ~(tap by tale)
|
2022-01-30 23:59:58 +03:00
|
|
|
|= [[=tako:clay =proses]]
|
2022-01-26 19:41:08 +03:00
|
|
|
^- (unit cord)
|
|
|
|
?~ proses ~
|
2022-01-21 19:50:05 +03:00
|
|
|
%- some
|
2022-01-26 19:41:08 +03:00
|
|
|
%- crip
|
|
|
|
;: welp
|
2022-01-30 23:59:58 +03:00
|
|
|
(tako-to-text tako)
|
|
|
|
(proses-to-text proses)
|
2022-01-26 19:41:08 +03:00
|
|
|
"---"
|
|
|
|
==
|
2021-11-19 22:49:49 +03:00
|
|
|
--
|
|
|
|
++ grab
|
|
|
|
|% :: convert from
|
2022-01-17 06:36:52 +03:00
|
|
|
++ noun story :: clam from %noun
|
2021-11-20 00:10:47 +03:00
|
|
|
++ mime :: retrieve form %mime
|
|
|
|
|= [p=mite q=octs]
|
|
|
|
=/ story-text `@t`q.q
|
2022-02-05 14:16:59 +03:00
|
|
|
`story`(rash story-text parse-story)
|
2021-11-19 22:49:49 +03:00
|
|
|
--
|
|
|
|
--
|