neo: improve accel

This commit is contained in:
Liam Fitzgerald 2024-06-04 10:56:00 -04:00
parent 19d7d32bde
commit 09000d0379
12 changed files with 141 additions and 70 deletions

View File

@ -1288,13 +1288,15 @@
=+ .^(src=@t %cx `path`(welp root pax))
?. (has-modified src (pave:neo (snip pax)))
run
~? >>> ripe
[%update pax]
=/ =file:ford:neo
~| parsing/pax
%- need :: XX: weird memory shit
%- mole |.
=; res=(each file:ford:neo tang)
?: ?=(%& -.res)
p.res
(mean p.res)
%- mule |.
(scan (trip src) (rein:ford:neo [our.bowl (pave:neo (snip pax))]))
~& [lib=lib pro=pro]:file
=/ has-imports=?
@ -1910,6 +1912,7 @@
=/ =wave:neo (~(got of:neo tide) here)
=| cards=(list card:neo)
=/ =kook:neo ~(kook husk code.wave)
=. dock.wave ~(dock husk code.wave)
|%
++ su-core .
++ su-emil |=(caz=(list card:neo) su-core(cards (welp cards caz)))

View File

@ -3,48 +3,63 @@
:- [%accel-conf %$ %htmx]
|= conf=accel-conf
|= =bowl:neo
|^
|^ ^- manx
::
;div.fr
;form.fr.af.js.hf
=hx-post "/neo/hawk/{(en-tape:pith:neo here.bowl)}?stud=hoon"
=hx-trigger "input changed delay:0.4s from:find textarea, input changed delay:0.4s from:[name='a']"
=hx-swap "outerHTML"
=hx-target "#spinner .loading"
=hx-target-400 "#error-{id}"
=hx-indicator "#spinner"
;div.fr.trans-root.grow
;form.fc.grow
=hx-post "/neo/hawk{(en-tape:pith:neo here.bowl)}?stud=hoon"
=hx-trigger "input changed delay:0.4s from:[name='text'], input changed delay:0.4s from:[name='a']"
=hx-swap "none"
=hx-target "#code-spinner .loading"
=hx-target-400 "#error-code-{id}"
=hx-indicator "#code-spinner"
=row (scow %ud +:x)
=col (scow %ud +:y)
;div.fc.border.grow.basis-half.wf
;+ conf-header
;+ input
;+ code-input
;+ (spinner "code")
==
==
;div.fc
;h3: Add
;form.fr.af.js.hf
=hx-post "/neo/hawk/{(en-tape:pith:neo here.bowl)}?stud=deps"
=hx-trigger "input changed delay:0.4s from:find textarea, input changed delay:0.4s from:[name='a']"
=hx-swap "outerHTML"
=hx-target "#spinner .loading"
=hx-target-400 "#error-{id}"
=hx-indicator "#spinner"
=row (scow %ud +:x)
=col (scow %ud +:y)
;div.fc.border.grow.basis-half.wf
;+ conf-header
;+ input
;div.fc.border
;+ conf-header
;div.fc.p2
::
;+ deps
;form.fr.js.hf
=hx-post "/neo/hawk{(en-tape:pith:neo here.bowl)}?stud=add-dep"
=hx-swap "none"
=hx-target "#conf-spinner .loading"
=hx-target-400 "#error-add-{id}"
=hx-indicator "#conf-spinner"
=row (scow %ud +:x)
=col (scow %ud +:y)
;div.fc.grow.basis-half.wf
;div.fr
;input
=type "text"
=placeholder "name"
=autocomplete "off"
=oninput "this.setAttribute('value', this.value);"
=name "name"
;
==
;input
=type "text"
=placeholder "/{(scow %p our.bowl)}/demo/cell/5"
=autocomplete "off"
=oninput "this.setAttribute('value', this.value);"
=name "pith"
;
==
==
;button
=type "submit"
; Add dep
==
;+ (spinner "conf")
==
==
==
;h3: Dependencies
;div#config.grow.border.basis-half.fc.scroll-x.scroll-y
;+ spinner
;*
%+ turn ~(tap by crew.conf)
|= [=term =pith:neo]
(deps (trip term) pith)
==
==
==
++ id
@ -58,24 +73,27 @@
++ x (rear (snip (snip here.bowl)))
++ y (rear (snip here.bowl))
++ spinner
;div#spinner.b1.loader.p1.s-2.f2
|= =tape
;div.b1.loader.p1.s-2.f2
=id (welp tape "-spinner")
;span.loaded: saved
;span.loading: ---
==
++ conf-header
;div.b1.border.fr.ac.jb.p1
;span.p1.mono.s-1: /{(scow %ud +:x)}/{(scow %ud +:y)}
=/ pit=tape (en-tape:pith:neo (snoc (snip here.bowl) %out))
;div.b1.border.fr.jb
;span.p1.mono.s-1: {pit}
;button.br1.border.b1.hover
=style "padding: 4px 8px;"
=type "button"
=pith "/{(scow %p our.bowl)}{(en-tape:pith:neo here.bowl)}"
=pith pit
=onclick "navigator.clipboard.writeText(this.getAttribute('pith'));"
; copy path
==
==
++ input
++ code-input
;textarea#input.wf.p2.pre.mono.grow
=name "code"
=name "text"
=placeholder "code"
=spellcheck "false"
=value (trip hoon.conf)
@ -83,23 +101,30 @@
; {(trip hoon.conf)}
==
++ deps
|= [term=tape =pith:neo]
;label.fc.p1
;input.border.wf
=value term
=placeholder "var-name"
=autocomplete "off"
=oninput "this.setAttribute('value', this.value);"
=name term
;
==
;input.border.wf
=placeholder "/{(scow %p our.bowl)}/path/to/dep"
=value (en-tape:pith:neo pith)
=autocomplete "off"
=oninput "this.setAttribute('value', this.value);"
=name :(welp term "-" "value")
; {(en-tape:pith:neo pith)}
^- manx
?: =(~ crew.conf)
;div.fr: No dependencies
;div.fc
;div.s1.p1: Dependencies
;*
%+ turn ~(tap by crew.conf)
|= [=term =pith:neo]
=/ tap (trip term)
;label.fr.p1
;div.border.wf
=name "name"
; {tap}
==
;label.border.wf: {(en-tape:pith:neo pith)}
;button.border
=hx-post "/neo/sky{(en-tape:pith:neo here.bowl)}?stud=del-dep"
; Delete
;label.hidden
=name "name"
=value tap
;
==
==
==
==
++ error

View File

@ -40,8 +40,9 @@
;*
%+ turn (gulf 1 10)
|= y=@
^- manx
=/ pax=pith:neo #/[ud/x]/[ud/y]
=/ kid bowl
=/ kid=bowl:neo bowl
=. kids.kid [~ ~]
=. here.kid :(welp here.bowl pax)
=. deps.kid ~
@ -61,7 +62,7 @@
=id "cell-{id}-{<x>}-{<y>}"
=hx-get "/neo/hawk{(en-tape:pith:neo here.bowl)}/{<x>}/{<y>}/in"
=hx-target "#dashboard-{id}"
=hx-select "form"
=hx-select ".trans-root"
=hx-swap "innerHTML"
=morph-retain "class"
=onclick "$('.cell-btn').removeClass('toggled');$(this).addClass('toggled');"
@ -75,8 +76,7 @@
==
==
++ dashboard-stub
;div.b0.fc
=style "grid-area: dashboard;"
;div.b0.fr
=id "dashboard-{id}"
;
==

View File

@ -0,0 +1,13 @@
/@ node
/@ add-dep
/- manx-utils
:- [%node %$ %add-dep]
|= nod=node
^- add-dep
=/ mu ~(. manx-utils nod)
::
=/ =pith:neo (pave:neo (rash (vol:mu "pith") stap))
=/ name=term (vol:mu "name")
?> ((sane %tas) name)
[name pith]

View File

@ -0,0 +1,11 @@
/@ node
/@ del-dep
/- manx-utils
:- [%node %$ %del-dep]
|= nod=node
^- del-dep
=/ mu ~(. manx-utils nod)
=/ name=term (vol:mu "name")
?> ((sane %tas) name)
name

View File

@ -0,0 +1,14 @@
/@ htmx
:- [%tang %$ %htmx]
|= tan=tang
|= =bowl:neo
=/ =wall (zing (turn tan |=(t=tank (~(win re t) [0 80]))))
=/ =tape (zing (join "\0a" wall))
;textarea#input.wf.p2.pre.mono.grow
=name "text"
=placeholder "code"
=spellcheck "false"
=value tape
=oninput "this.setAttribute('value', this.value);"
; {tape}
==

View File

@ -67,7 +67,7 @@
^- kook:neo
|%
++ state pro/%accel-conf
++ poke (sy %hoon %accel-dep %accel-conf %ack ~)
++ poke (sy %hoon %add-dep %accel-conf %ack ~)
++ kids *kids:neo
++ deps *deps:neo
++ form
@ -81,9 +81,10 @@
=. conf
?+ stud !!
%hoon conf(ready |, hoon !<(@t vax))
%accel-dep conf(ready |, crew (~(put by crew.conf) !<([term pith] vax)))
%add-dep conf(ready |, crew (~(put by crew.conf) !<([term pith] vax)))
%add-dep conf(ready |, crew (~(del by crew.conf) !<(term vax)))
%accel-conf !<(accel-conf vax)
%ack ((slog leaf/"ack" (sell vax) ~) conf(ready &))
%ack conf(ready &)
==
?: ready.conf
`accel-conf/!>(conf)

View File

@ -40,6 +40,7 @@
++ idt `tape`(zing (scan +:(scow %da id) (most dot (star ;~(less dot prn)))))
++ slot 0 :: XX fix sky positional saving
++ lift
^- manx
;div.hawk.fc.wf.hf
=id "hawk-{idt}"
=hx-params "id,slot"
@ -202,7 +203,7 @@
:+ ~ %y
%- ~(gas by *lads:neo)
:~ :- &
`lash:neo`[any/~ ~]
`lash:neo`[pro/%htmx ~]
==
==
::
@ -227,7 +228,7 @@
:: ;div: 403
:: ==
?~ src=(~(get by deps.bowl) %src)
=/ main
=/ main=manx
;div.wf.hf.fc.jc.ac: nothing here
=/ raw
;div.wf.hf.fc.jc.ac: raw view

View File

@ -29,7 +29,7 @@
:+ ~ %y
%- ~(gas by *lads:neo)
:~ :- &
`lash:neo`[any/~ ~]
`lash:neo`[pro/%htmx ~]
==
==
::

View File

@ -0,0 +1 @@
,[=term =pith:neo]

View File

@ -0,0 +1 @@
,term

View File

@ -0,0 +1 @@
tang