Remove eyre console code to save memory.

This commit is contained in:
C. Guy Yarvin 2014-07-25 09:38:22 -07:00
parent 2f42a419ea
commit d8b3c5f7d5
2 changed files with 53 additions and 305 deletions

View File

@ -1624,265 +1624,13 @@
(yoku num +.som.pip)
::
%con
:_ +>.$
=+ cal==+(cal=(~(get by cow) p.som.pip) ?^(cal u.cal *clue))
=+ ^= obj
%- jobe
:~ sent/(jone ino.cal)
recv/(jone ono.cal)
ownr/[%s (rsh 3 1 (scot %p our))]
==
=+ sez=:/("seq={(pojo obj)}")
=+ jqu="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"
=+ ^= sac
;script
;
; var hist = []
; var hind = 0
; $(
; function() {
; $input = $('#input .line')
; $prompt = $('#input .prompt')
; $output = $('#output')
; $input.focus()
;
; path = document.location.pathname
; if(path.slice(-1) == "/")
; path = path.slice(0,-1)
; seq.prom = path.split("/").pop()
;
; $('body').click(function() {
; $input.focus()
; })
;
; send = function(com) {
; if(com.line !== undefined &&
; com.line.indexOf('error') != -1) {
; com = {error:true}
; }
; console.log('sending')
; console.log(com)
; $.ajax('/'+seq.ownr+'/toc/'+seq.prom+'/'+seq.sent, {
; type: 'PUT',
; contentType: 'text/json',
; data: JSON.stringify(com),
; success: function(data,status,xhr) {
; seq.sent++
; },
; error: function(data,status,xhr) {
; if(data.responseJSON.lines !== undefined)
; addLines(data.responseJSON.lines)
; seq.sent++
; }
; })
; }
;
; recv = function() {
; $.ajax('/'+seq.ownr+'/goc/'+seq.prom+'/'+seq.recv, {
; type:'GET',
; success: function(data,status,xhr) {
; console.log(data);
; seq.recv = data[0];
; seq.send = data[1];
; msg = data[2];
; if(msg.text !== undefined) {
; addLines(msg.text)
; $('body').scrollTop($('.line').position().top)
; }
; if(msg.helo !== undefined)
; changePrompt(msg.helo)
; recv()
; },
; error: function(data,status,xhr) {
; console.log('error')
; seq.recv++
; }
; })
; }
;
; recv()
;
; send({hail:true})
;
; addLines = function(lines) {
; $output.append(lines.join("<br />")+"<br />")
; }
;
; changePrompt = function(helo) {
; $prompt.text(helo.prod[1]);
; }
;
; ctrl = false
;
; $input.on('keydown', function(e) {
; console.log('keydown')
; console.log(e.keyCode)
; if(e.keyCode == 17) {
; ctrl = true
; return;
; }
; if(e.keyCode == 88 && ctrl == true) {
; console.log('ling')
; send({ling:true})
; return;
; }
;
; if(e.keyCode == 69 && ctrl == true) {
; console.log('^e')
; $input[0].selectionStart =
; $input[0].selectionEnd =
; $input.val().length;
; return
; }
; if(e.keyCode == 65 && ctrl == true) {
; console.log('^a')
; $input[0].selectionStart = $input[0].selectionEnd = 0
; return
; }
;
;
; if(e.keyCode == 40) {
; if(hist.length > 1) {
; hind++
; if(hind > hist.length-1) {
; hind = hist.length-1
; }
; }
; }
; if(e.keyCode == 38) {
; if(hist.length > 1) {
; hind--
; if(hind < 0) {
; hind = 0
; }
; }
; }
; if(e.keyCode == 38 ||
; e.keyCode == 40) {
; console.log('set from hist')
; $input.val(hist[hind])
; setTimeout(function() {
; console.log(hist[hind].length)
; $input[0].setSelectionRange
; (hist[hind].length,hist[hind].length)
; }, 0)
; return;
; }
;
; if(e.keyCode == 13) {
; val = $input.val()
; send({line:val})
; $output.append($('.prompt').text()+" "+val+"<br>")
; hind = hist.length-1
; if(hind<0)
; hind = 0
; hist[hind] = val
; hist.push('')
; hind = hist.length-1
; $input.val('')
; $('body').scrollTop($('.line').position().top)
; return;
; }
; if(hind == hist.length-1)
; hist[hind] = $input.val()
; });
;
; $input.on('keyup', function(e) {
; if(e.keyCode == 17) {
; ctrl = false
; }
; });
; }
; )
==
=+ ^= ham
;html
;head
;title: urbit {<our>}/{<p.som.pip>}
;script(type "text/javascript", src jqu);
;style
; body {
; margin: 60px 120px;
; font: normal 12px "Menlo" monospace;
; background-color: #000;
; color: #fff;
; }
;
; #output {
; line-height: 18px;
; white-space: pre;
; }
;
; #input .prompt {
; display: inline-block;
; margin-right: 12px;
; }
;
; #input .line {
; outline: none;
; width: 80%;
; border: 0;
; background-color: transparent;
; color: #fff;
; font: normal 12px "Menlo" monospace;
; }
==
==
;body
;div#output;
;div#input
;div.prompt;
;input.line(type "text");
==
;+ [-.sac `marl`[sez +.sac]]
==
==
[~ pip(pez [%fin %ham ham])]
!!
::
%cog
=+ cal==+(cal=(~(get by cow) p.som.pip) ?^(cal u.cal *clue))
?. (lth q.som.pip ono.cal)
:- [~ pip(pez %way)]
%= +>.$ cow
%+ ~(put by cow)
p.som.pip
=+ val=(~(get by voy.cal) q.som.pip)
cal(voy (~(put by voy.cal) q.som.pip ?~(val [num ~] [num u.val])))
==
:_ +>.$
=+ ^= jon ^- json
:~ %a
(jone ono.cal)
(jone ino.cal)
(snag (sub ono.cal q.som.pip) out.cal)
==
[~ pip(pez [%fin %mid /text/json (tact (pojo jon))])]
!!
::
%cop
=+ cal==+(cal=(~(get by cow) p.som.pip) ?^(cal u.cal *clue))
?. =(q.som.pip ino.cal)
=. cow (~(put by cow) p.som.pip cal)
:_ +>.$
[~ pip(pez [%err 500 [%leaf "cop: {<q.som.pip>}, {<ino.cal>}."]~])]
=+ ^= fuv ^- (unit note)
?. ?=(%o -.r.som.pip) ~
=+ lin=(~(get by p.r.som.pip) %line)
?^ lin ?.(?=(%s -.u.lin) ~ [~ %b %line p.u.lin])
=+ syc=(~(get by p.r.som.pip) %hail)
?^ syc [~ %b %hail ~]
=+ lig=(~(get by p.r.som.pip) %ling)
?^ lig [~ %b %ling ~]
~
:_ %_ +>.$
cow (~(put by cow) p.som.pip cal(ino +(ino.cal)))
mow
?~ fuv mow
:_ mow
:- hen
:+ %pass [%cons (scot %p our) ses (scot %ud p.som.pip) ~]
u.fuv
==
[~ `pimp`pip(pez `pest`[%fin %raw 200 ~ ~])]
!!
::
%det
:- [~ pip(pez %way)]

View File

@ -484,17 +484,17 @@
;~ pose
(stag %toy ;~(sfix sym fas))
(stag %and ;~(pfix and:sign and:read))
:: (stag %but ;~(pfix but:sign and:read))
:: (stag %day ;~(pfix day:sign day:read))
:: (stag %dub ;~(pfix dub:sign dub:read))
:: (stag %fan ;~(pfix fan:sign fan:read))
:: (stag %for ;~(pfix for:sign for:read))
:: (stag %hub ;~(pfix hub:sign day:read))
:: (stag %man ;~(pfix man:sign man:read))
:: (stag %nap ;~(pfix nap:sign day:read))
:: (stag %now ;~(pfix now:sign day:read))
:: (stag %see ;~(pfix see:sign see:read))
:: (stag %sic ;~(pfix sic:sign sic:read))
(stag %but ;~(pfix but:sign and:read))
(stag %day ;~(pfix day:sign day:read))
(stag %dub ;~(pfix dub:sign dub:read))
(stag %fan ;~(pfix fan:sign fan:read))
(stag %for ;~(pfix for:sign for:read))
(stag %hub ;~(pfix hub:sign day:read))
(stag %man ;~(pfix man:sign man:read))
(stag %nap ;~(pfix nap:sign day:read))
(stag %now ;~(pfix now:sign day:read))
(stag %see ;~(pfix see:sign see:read))
(stag %sic ;~(pfix sic:sign sic:read))
==
==
::
@ -509,45 +509,45 @@
(ifix [sel ser] (stag %cltr (most ace wide:vez)))
;~(pfix gap tall:vez)
::
:: ++ day
:: %+ rail
:: apex(tol |)
:: ;~(pfix gap apex)
:: ::
:: ++ dub
:: %+ rail
:: ;~(plug sym ;~(pfix tis apex(tol |)))
:: ;~(pfix gap ;~(plug sym ;~(pfix gap apex)))
:: ::
:: ++ fan
:: %+ rail fail
:: ;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
:: ::
:: ++ for
:: %+ rail
:: ;~(plug (ifix [sel ser] hath) apex(tol |))
:: ;~(pfix gap ;~(plug hath ;~(pfix gap apex)))
:: ::
:: ++ man
:: %+ rail fail
:: %- sear
:: :_ ;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
:: |= fan=(list ^horn)
:: =| naf=(list (pair term ^horn))
:: |- ^- (unit (map term ^horn))
:: ?~ fan (some (~(gas by *(map term ^horn)) naf))
:: ?. ?=(%dub -.i.fan) ~
:: $(fan t.fan, naf [[p.i.fan q.i.fan] naf])
:: ::
:: ++ see
:: %+ rail
:: ;~(plug (ifix [sel ser] have) apex(tol |))
:: ;~(pfix gap ;~(plug have ;~(pfix gap apex)))
:: ::
:: ++ sic
:: %+ rail
:: ;~(plug (ifix [sel ser] toil:vez) apex(tol |))
:: ;~(pfix gap ;~(plug howl:vez ;~(pfix gap apex)))
++ day
%+ rail
apex(tol |)
;~(pfix gap apex)
::
++ dub
%+ rail
;~(plug sym ;~(pfix tis apex(tol |)))
;~(pfix gap ;~(plug sym ;~(pfix gap apex)))
::
++ fan
%+ rail fail
;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
::
++ for
%+ rail
;~(plug (ifix [sel ser] hath) apex(tol |))
;~(pfix gap ;~(plug hath ;~(pfix gap apex)))
::
++ man
%+ rail fail
%- sear
:_ ;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
|= fan=(list ^horn)
=| naf=(list (pair term ^horn))
|- ^- (unit (map term ^horn))
?~ fan (some (~(gas by *(map term ^horn)) naf))
?. ?=(%dub -.i.fan) ~
$(fan t.fan, naf [[p.i.fan q.i.fan] naf])
::
++ see
%+ rail
;~(plug (ifix [sel ser] have) apex(tol |))
;~(pfix gap ;~(plug have ;~(pfix gap apex)))
::
++ sic
%+ rail
;~(plug (ifix [sel ser] toil:vez) apex(tol |))
;~(pfix gap ;~(plug howl:vez ;~(pfix gap apex)))
--
::
++ sign