remove broken generators

This commit is contained in:
Anton Dyudin 2017-11-27 12:12:43 -08:00
parent 06280f904a
commit 0057afd7e8
4 changed files with 0 additions and 443 deletions

View File

@ -1,60 +0,0 @@
::BROKEN fixme when md is properly merged
::
:::: hoon/cram/gen
::
:: test generator for the cram markdown syntax
::
:: todo: integrate with ++sail and embed in hoon compiler
::
:: ++cram is a simple markdown-inspired parser that makes
:: common html tropes easy to type. you can think of ++cram
:: as "rational markdown" or "markdown with syntax errors."
:: a document format should be easy to type and read, but
:: that doesn't mean it can't or have rigorous syntax.
::
:: tldr: ++cram is indent-oriented. indent 2 spaces for
:: a dynamic interpolation, 4 spaces for example code, 6
:: spaces for a blockquote and 8 spaces for verse. separate
:: every semantic block by a blank line. use - for
:: unordered lists, + for ordered lists.
::
:: markdown link syntax works. * means bold, _ means
:: italics, "" inserts smart quotes. all enclosed
:: strings are reparsed; escape the terminator within
:: the string, eg, *star \* in bold text*.
::
:: markdown `literal` syntax is supported, but all hoon
:: constants are automatically marked as code. also, any
:: hoon expression prefixed with # is a code literal.
::
:: (++cram is a valid hoon parsing rule, but it does a lot
:: of custom processing internally, since the language is
:: context-sensitive. we use a context-sensitive parser
:: to cut the lines into blocks, then reparse flow blocks
:: with normal hoon rules. multipass parsing is the tax
:: humans have to pay for simple but human-friendly syntax.)
::
::|= inp/cord
::=< (steam-marl (rash inp apex:(sail &)))
=< |=(pax/path (test pax))
|% ::
++ test :: test text parsing
|= pax/path
^- tape
::
:: src: text file as (list cord)
:: txt: source as tape with newlines
:: vex: parsing result
::
=/ src .^(wain %cx pax)
=. src ['---' src]
=/ txt (zing (turn src |=(@t (weld (rip 3 +<) `tape`~[`@`10]))))
=/ vex (cram:vast [1 1] txt)
::
:: print result as error or xml text
?~ q.vex
"syntax error: line {(scow %ud p.p.vex)}, column {(scow %ud q.p.vex)}"
?: [freeze=|] (poxo (snag 1 ~(shut ap p.u.q.vex)))
(poxo ;;(manx q:(slap !>(..zuse) p.u.q.vex)))
::
--

View File

@ -1,150 +0,0 @@
::BROKEN
=> |%
--
|* $: :> vinyl: historical state (including version)
:> brain: working state of the application (not including version)
:> delta: grain of change across all state
:> prize: (pair mark noun) for namespace value
:> rumor: (pair mark noun) for namespace diff
:> opera: (pair bone card) for operation (old ++move)
:>
vinyl/mold
brain/mold
delta/mold
prize/mold
rumor/mold
opera/mold
==
|_ $: :> ops: pending operations, in reverse order
:> ego: current state
:>
ops/(list opera)
ego/brain
==
:: :: ++bake
++ bake :< apply delta
|= $: :> del: change
:>
del/delta
==
:> core after change (including operations)
^- _+>
!!
:: :: ++cope
++ cope :< transaction result
|= $: :> weg: forward identity
:> het: success or error report
:>
weg/(list coin)
het/(unit tang)
==
:> actions in reverse order
:>
^- (list delta)
!!
:: :: ++fail
++ fail :< process error
|= $: :> why: error dump
:>
why/tang
==
:> actions in reverse order
:>
^- (list delta)
!!
:: :: ++feel
++ feel :< update
|= $: :> del: change
:> pex: preparsed path, inside-first
:>
del/delta
pex/(list coin)
==
:> query updates in reverse order
:>
^- (list rumor)
!!
:: :: ++hear
++ hear :< subscription update
|= $: :> weg: forward identity
:>
weg/(list coin)
==
:> actions in reverse order
:>
^- (list delta)
!!
:: :: ++pull
++ pull :< subscription cancel
|= $: :> weg: forward identity
:> het: error report, if any
:>
weg/(list coin)
het/(unit tang)
==
:> actions in reverse order
:>
^- (list delta)
!!
:: :: ++leak
++ leak :< check access
|= $: :> lec: leakset (~ means public)
:> pex: preparsed path, inside-first
:>
lec/(unit (set ship))
pex/(list coin)
==
:> if path `pex` is visible to ships in `lec`
^- ?
!!
:: :: ++load
++ look :< asynchronous read
|= $: :> pex: preparsed path, inside-first
:>
pex/(list coin)
==
:> actions in reverse order
^- _+>
!!
:: :: ++prep
++ prep :< load system
|= $: old/vinyl
==
:> core after boot
^- _+>
!!
:: :: ++peek
++ peek :< synchronous read
|= $: :> pex: preparsed path, inside-first
:>
pex/(list coin)
==
:> value at `pec`; ~ for unavailable, [~ ~] for invalid
:>
^- (unit (unit prize))
!!
:: :: ++poke
++ poke :< generic poke
|= $: :> ost: opaque cause
:> msg: message with mark and vase
:>
ost/bone
msg/cage
==
:> actions in reverse order
:>
^- (list delta)
!!
:: :: ++pour
++ pour :< arvo response
|= $: :> weg: forward identity
:> sin: response card
:>
weg/(list coin)
sin/sign
==
:> actions in reverse order
:>
^- (list delta)
!!
--

View File

@ -1,72 +0,0 @@
::BROKEN
:: Compile arvo as a pill noun, for compiler changes;
:: usage
::
:: .urbit/pill +mud
::
:::: /hoon/mud/gen
::
/? 310
/+ old-zuse
=, old-zuse
::
::::
!:
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{$~ $~}
==
:- %noun
=+ ^= must
:: virtualize, running in a nested memory ring
::
|* taq/_|.(**)
=+ muz=(mule taq)
?- -.muz
$& p.muz
$| (mean p.muz)
==
=+ top=`path`/(scot %p p.bec)/[q.bec]/(scot %da now)/sys
=+ pax=`path`(weld top `path`[%hoon ~])
=+ arp=`path`(weld top `path`[%ovra ~])
~& %mud-start
=+ txt=.^(@t %cx (weld pax `path`[%hoon ~]))
=+ rax=.^(@t %cx (weld arp `path`[%hoon ~]))
~& %mud-loaded
=+ gen=(must |.((rain pax txt)))
~& %mud-parsed
=+ one=(must |.((~(mint ut %noun) %noun gen)))
~& %mud-compiled
=+ gat=`vase`[p.one .*(0 q.one)]
~& %mud-done-hoon
=+ kyr=`(pair vase vase)`[(slap ked [%limb %p]) (slap ked [%limb %q])]
~& %mud-next-arvo
=+
%- must |.
(slam gat (slop p.kyr `vase`[[%atom %t ~] rax]))
~& %mud-done-arvo
=+ ayr=`(pair vase vase)`[(slap arv [%limb %p]) (slap arv [%limb %q])]
=+ ken=[7 q.q.kyr q.q.ayr]
~& [%mud-recompiled `@ux`(mug ken)]
:- ken
=+ all=.*(0 ken)
=+ ^= vay ^- (list {p/@tas q/path})
:~ [%$ /zuse]
[%f /vane/ford]
[%c /vane/clay]
[%g /vane/gall]
[%a /vane/ames]
[%b /vane/behn]
[%d /vane/dill]
[%e /vane/eyre]
==
|- ^+ all
?~ vay all
=+ pax=(weld top q.i.vay)
=+ txt=.^(@ %cx (weld pax `path`[%hoon ~]))
=+ sam=[now `ovum`[[%gold ~] [%veer p.i.vay pax txt]]]
~& [%solid-veer i.vay]
=+ gat=.*(all .*(all [0 42]))
=+ nex=+:.*([-.gat [sam +>.gat]] -.gat)
$(vay t.vay, all nex)

View File

@ -1,161 +0,0 @@
::BROKEN
!:
::::
::
:- %say
|= $: {now/@da * bec/beak}
*
==
=< :- %noun
%hello
|%
::
++ ap
|_ gen/twig
++ gi
=| whit
=* wit -
|%
++ gray
^- ?
|
:: on reflection, perhaps just obsessive linting
::
:: ?| ?=(^ lab)
:: ?=(^ boy)
:: |- ^- ?
:: ?~ def |
:: |($(def l.def) $(def r.def) !(~(has in use) p.n.def))
:: ==
::
++ grad
|= $: gen/twig
wit/whit
aid/$-({? twig whit} {twig whit})
==
^- (unit (pair twig whit))
=: ^gen gen
^wit wit
==
?: =([~ ~ ~ ~] wit) `[gen wit]
=< apex
|%
++ apex
^- (unit (pair twig whit))
=^ one wit prim
=^ two wit senc(gen one)
?: =(gen two)
~
`(aid & two wit)
::
:: resolve body and label issues
::
++ prim
^- (pair twig whit)
?: ?=(^ -.gen) flam
?+ -.gen flam
$halo flam
$base runk
$leaf runk
$bcpt runk
$bccb runk
$bccl runk
$bccn runk
$bchp runk
$bckt runk
$bcwt runk
$bcts flam
$bcsm runk
$brcb ((doof -.gen +>.gen) p.gen)
$brcl ((doof -.gen +>.gen) p.gen)
$brcn ((doof -.gen +>.gen) p.gen)
$brdt ((doof -.gen +>.gen) p.gen)
$brkt ((doof -.gen +>.gen) p.gen)
$brhp ((doof -.gen +>.gen) p.gen)
$brsg ((doof -.gen +>.gen) p.gen)
$brtr ((doof -.gen +>.gen) p.gen)
$brts ((doof -.gen +>.gen) p.gen)
$brwt ((doof -.gen +>.gen) p.gen)
==
::
:: resolve variable issues
::
++ senc
^- (pair twig whit)
?: ?=(^ -.gen) flam
?+ -.gen flam
$ktts ((helk -.gen +>.gen) p.gen)
$bcts ((helk -.gen +>.gen) p.gen)
$var ((hulp -.gen +>.gen) p.gen)
$rev ((hulp -.gen +>.gen) p.gen)
$sip ((hulp -.gen +>.gen) p.gen)
$aka ((humm -.gen +>.gen) p.gen)
==
::
++ flam [gen wit]
++ grif
|= {cog/term wat/what}
^- {what whit}
?: =(~ def)
?~ boy [wat wit]
[boy wit(boy ~)]
=+ yeb=(~(get by def) cog)
?~ yeb [wat wit]
[`u.yeb wit(use (~(put in use) cog))]
::
++ doof
|* {pif/@tas suf/*}
|= pac/chap
^- (pair twig whit)
:_ wit(lab ~, boy ~)
=- [pif - suf]
^- chap
:- ?~(lab p.pac [u.lab ~])
?~(boy q.pac boy)
::
++ helk
|* {pif/@tas suf/*}
|= got/toga
^- (pair twig whit)
=^ gef wit (tong got)
[[pif gef suf] wit]
::
++ hulp
|* {pif/@tas suf/*}
|= hot/toro
^- (pair twig whit)
=^ tog wit (tong p.hot)
[[pif [tog q.hot] suf] wit]
::
++ humm
|* {pif/@tas suf/*}
|= {cog/term wat/what)
^- (pair twig whit)
=^ taw wit (grif cog wat)
[[pif [cog taw] suf] wit]
::
++ runk
^- (pair twig whit)
?~ boy flam
[[%halo boy gen] wit(boy ~)]
::
++ tong
|= got/toga
^- {toga whit}
?@ got
=^ wat wit (grif got ~)
?~ wat [got wit]
[[%1 [wat got] [%0 ~]] wit]
?- -.got
$0 [got wit]
$1 =^ wat wit (grif q.p.got p.p.got)
=^ sub wit $(got q.got)
[[%1 [wat q.p.got] sub] wit]
$2 =^ one wit $(got p.got)
=^ two wit $(got q.got)
[[%2 one two] wit]
==
--
--
--
--