2015-02-09 00:22:33 +03:00
|
|
|
::
|
|
|
|
:::: /hook/core/console/sur
|
|
|
|
!:
|
|
|
|
|%
|
|
|
|
++ console-action :: console to app
|
2015-02-24 21:57:47 +03:00
|
|
|
$% :: [%abo ~] :: reset interaction
|
2015-02-22 01:37:35 +03:00
|
|
|
[%det console-change] :: command line edit
|
2015-02-09 00:22:33 +03:00
|
|
|
[%ret ~] :: submit and clear
|
|
|
|
== ::
|
|
|
|
++ console-buffer (list ,@c) :: command state
|
|
|
|
++ console-change :: network change
|
|
|
|
$: ler=console-clock :: destination clock
|
|
|
|
haw=@uvH :: source hash
|
|
|
|
ted=console-edit :: state change
|
|
|
|
== ::
|
2015-02-24 21:57:47 +03:00
|
|
|
++ console-dialog :: standard dialog
|
2015-03-08 23:19:39 +03:00
|
|
|
|* out=$+(* *) :: output structure
|
2015-03-12 19:35:06 +03:00
|
|
|
$+(console-input (console-result out)) :: output function
|
2015-03-08 23:19:39 +03:00
|
|
|
:: ::
|
2015-03-20 01:19:19 +03:00
|
|
|
++ console-result :: conditional result
|
2015-03-08 23:19:39 +03:00
|
|
|
|* out=$+(* *) :: output structure
|
2015-03-20 01:19:19 +03:00
|
|
|
$|(@ud (console-product out)) :: error position
|
|
|
|
:: ::
|
|
|
|
++ console-product :: success result
|
|
|
|
|* out=$+(* *) ::
|
|
|
|
%+ pair (list tank) ::
|
2015-02-25 19:57:43 +03:00
|
|
|
%+ each (unit out) :: ~ is abort
|
|
|
|
(pair console-prompt (console-dialog out)) :: ask and continue
|
2015-03-08 23:19:39 +03:00
|
|
|
:: ::
|
2015-03-12 19:35:06 +03:00
|
|
|
++ console-so :: construct result
|
|
|
|
|* pro=* ::
|
2015-03-20 01:19:19 +03:00
|
|
|
[p=*(list tank) q=[%& p=[~ u=pro]]] ::
|
2015-03-12 19:35:06 +03:00
|
|
|
:: ::
|
|
|
|
++ console-yo :: add output tank
|
|
|
|
|* [tan=tank res=(console-result)] ::
|
2015-03-20 01:19:19 +03:00
|
|
|
?@ res res ::
|
|
|
|
[p=[i=tan t=p.res] q=q.res] ::
|
2015-03-12 19:35:06 +03:00
|
|
|
:: ::
|
2015-03-17 20:56:54 +03:00
|
|
|
++ console-lo :: construct prompt
|
|
|
|
|* [pom=console-prompt mor=(console-dialog)] ::
|
2015-03-20 01:19:19 +03:00
|
|
|
[p=*(list tank) q=[%| p=pom q=mor]] ::
|
2015-03-17 20:56:54 +03:00
|
|
|
:: ::
|
2015-03-12 19:35:06 +03:00
|
|
|
++ console-no :: empty result
|
2015-03-20 01:19:19 +03:00
|
|
|
[p=*(list tank) q=~] ::
|
2015-03-12 19:35:06 +03:00
|
|
|
:: ::
|
|
|
|
++ console-go :: parse by rule
|
|
|
|
|* [sef=_rule fun=$+(* *)] ::
|
|
|
|
|= txt=console-input ::
|
2015-03-20 01:19:19 +03:00
|
|
|
=+ vex=(sef [0 0] txt) ::
|
|
|
|
?: |(!=((lent txt) q.p.vex) ?=(~ q.vex)) ::
|
|
|
|
q.p.vex ::
|
|
|
|
(fun p.u.q.vex) ::
|
2015-03-12 19:35:06 +03:00
|
|
|
:: ::
|
2015-02-09 00:22:33 +03:00
|
|
|
++ console-clock ,[own=@ud his=@ud] :: vector clock
|
|
|
|
++ console-edit :: shared state change
|
|
|
|
$% [%del p=@ud] :: delete one at
|
|
|
|
[%ins p=@ud q=@c] :: insert at
|
|
|
|
[%mor p=(list console-edit)] :: combination
|
|
|
|
[%nop ~] :: no-op
|
|
|
|
[%set p=console-buffer] :: discontinuity
|
|
|
|
== ::
|
|
|
|
++ console-effect :: app to console
|
|
|
|
$% [%bel ~] :: beep
|
|
|
|
[%blk p=@ud q=@c] :: blink/match char at
|
|
|
|
[%clr ~] :: clear screen
|
2015-02-22 01:37:35 +03:00
|
|
|
[%det console-change] :: edit command
|
2015-03-19 21:53:05 +03:00
|
|
|
[%err p=@ud] :: error point
|
2015-02-18 06:30:53 +03:00
|
|
|
[%mor p=(list console-effect)] :: multiple effects
|
2015-02-22 01:37:35 +03:00
|
|
|
[%nex ~] :: save, clear command
|
2015-02-09 09:25:00 +03:00
|
|
|
[%pro console-prompt] :: set prompt
|
2015-02-24 21:57:47 +03:00
|
|
|
[%sag p=path q=*] :: save to jamfile
|
|
|
|
[%sav p=path q=@] :: save to file
|
2015-02-09 00:22:33 +03:00
|
|
|
[%tan p=(list tank)] :: classic tank
|
|
|
|
:: [%taq p=tanq] :: modern tank
|
|
|
|
[%txt p=tape] :: text line
|
|
|
|
== ::
|
2015-02-22 01:37:35 +03:00
|
|
|
++ console-command :: command state
|
2015-02-09 00:22:33 +03:00
|
|
|
$: pos=@ud :: cursor position
|
|
|
|
say=console-share :: cursor
|
2015-02-09 09:25:00 +03:00
|
|
|
== ::
|
|
|
|
++ console-prompt :: prompt definition
|
2015-02-22 01:37:35 +03:00
|
|
|
$: vis=? :: command visible
|
|
|
|
tag=term :: history mode
|
2015-03-19 22:58:54 +03:00
|
|
|
cad=tape :: caption
|
2015-02-09 09:25:00 +03:00
|
|
|
== ::
|
2015-02-24 21:57:47 +03:00
|
|
|
++ console-input tape :: prompt input
|
2015-02-09 00:22:33 +03:00
|
|
|
++ console-share :: symmetric state
|
|
|
|
$: ven=console-clock :: our vector clock
|
|
|
|
leg=(list console-edit) :: unmerged edits
|
|
|
|
buf=console-buffer :: console state
|
|
|
|
== ::
|
|
|
|
++ dill-belt :: console input
|
|
|
|
$% [%aro p=?(%d %l %r %u)] :: arrow key
|
|
|
|
[%bac ~] :: true backspace
|
|
|
|
[%cru p=@tas q=(list tank)] :: echo error
|
|
|
|
[%ctl p=@ud] :: control-key
|
|
|
|
[%del ~] :: true delete
|
|
|
|
[%met p=@ud] :: meta-key
|
|
|
|
[%ret ~] :: return
|
|
|
|
[%rez p=@ud q=@ud] :: resize, cols, rows
|
|
|
|
[%txt p=(list ,@c)] :: utf32 text
|
|
|
|
[%yow p=gill] :: connect to app
|
|
|
|
== ::
|
|
|
|
++ dill-blit :: console output
|
|
|
|
$% [%bel ~] :: make a noise
|
|
|
|
[%clr ~] :: clear the screen
|
|
|
|
[%hop p=@ud] :: set cursor position
|
2015-03-25 01:56:11 +03:00
|
|
|
[%mor p=(list dill-blit)] :: multiple blits
|
2015-02-09 00:22:33 +03:00
|
|
|
[%pro p=(list ,@c)] :: show as cursor/line
|
|
|
|
[%out p=(list ,@c)] :: send output line
|
|
|
|
[%sag p=path q=*] :: save to jamfile
|
|
|
|
[%sav p=path q=@] :: save to file
|
|
|
|
== ::
|
2015-03-23 01:46:42 +03:00
|
|
|
++ gill (pair ship term) :: general contact
|
2015-02-09 00:22:33 +03:00
|
|
|
--
|