summaryrefslogtreecommitdiff
path: root/desk/mar/hoon.hoon
blob: 428e1056d9a05d0f94617d5d1cb7fb986e94ec06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
::::  /hoon/hoon/mar
  ::
/?    310
::
=,  eyre
|_  own=@t
::
++  grow                                                ::  convert to
  |%
  ++  mime  `^mime`[/text/x-hoon (as-octs:mimes:html own)] ::  convert to %mime
  ++  hymn
    ;html
      ;head
        ;title:"Source"
        ;script@"//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js";
        ;script@"/lib/syntax/hoon.js";
        ;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
          "codemirror/4.3.0/codemirror.min.css");
        ;link/"/lib/syntax/codemirror.css"(rel "stylesheet");
      ==
      ;body
        ;textarea#src:"{(trip own)}"
        ;script:'CodeMirror.fromTextArea(src, {lineNumbers:true, readOnly:true})'
      ==
    ==
  ++  txt
    (to-wain:format own)
  --
++  grab
  |%                                            ::  convert from
  ++  mime  |=([p=mite q=octs] q.q)
  ++  noun  @t                                  ::  clam from %noun
  ++  txt   of-wain:format
  --
++  grad  %txt
--