demo sched mark

This commit is contained in:
Anton Dyudin 2015-06-16 18:06:58 -07:00
parent b845051bf6
commit 8a8055ba3a
3 changed files with 35 additions and 1 deletions

View File

@ -8,12 +8,14 @@
::::
::
|= [^ [arg=(list path)] ~]
=- tang/(flop (zing -))
=- tang/(flop `tang`(zing -))
%+ turn arg
|= pax=path
^- tang
=+ ark=;;(arch .^(%cy pax))
?^ q.ark
?: =(%sched -:(flop pax))
[>;;((map ,@da cord) .^(%cx pax))<]~
[leaf/(spud pax) (pretty-file .^(%cx pax))]
?- r.ark :: handle ambiguity
~

29
base/mar/sched.hoon Normal file
View File

@ -0,0 +1,29 @@
!:
:::: /hoon/core/sched/mar
::
|_ dat=(map ,@da cord)
++ grow :: convert to
|% ++ mime `^mime`[/text/x-sched (tact tape)]
++ tape
(zing `wall`(turn sorted-list |=([a=@da b=cord] "{<a>} {(trip b)}\0a")))
++ elem =< ;list: *{(turn sorted-list .)}
|= [tym=@da ite=cord] ^- manx
;li: ;{b "{<tym>}"}: {(trip ite)}
++ sorted-list
(sort (~(tap by dat)) |=([[l=@ @] [r=@ @]] (lth l r)))
--
++ grab
|% :: convert from
++ mime
|= [p=mite q=octs] ^+ dat
=< (mo (turn (lore q.q) .))
|= a=@t ^- [@da @t]
%+ rash a
;~ (glue ace)
(cook |=(a=coin ?>(?=([~ %da @] a) `@da`q.p.a)) nuck:so)
(cook crip (star prn))
==
--
++ grad |%
++ sted %mime
-- --

3
base/pub/test.sched Normal file
View File

@ -0,0 +1,3 @@
~1970.1.1 Hello world
~1970.2.1 Hallo world?
~1970.1.2 Reordered for goo reason