From 828597c061c046a608aac987a86f1ccb529ca738 Mon Sep 17 00:00:00 2001 From: Maxim Sokhatsky Date: Fri, 25 Oct 2013 04:29:29 +0300 Subject: [PATCH] io doc --- doc/object.htm | 81 ++-- doc/overview.htm | 81 ++-- doc/primitives.htm | 81 ++-- fork-me.htx | 2 - index.dvi | Bin 1948 -> 0 bytes index.htm | 172 +++++--- index.tex | 44 +- language/io/bootstrap/A1_OpShuffle.io | 482 ++++++++++----------- language/io/bootstrap/A2_LoadAssemblies.io | 36 +- language/io/bootstrap/A3_Scheduler.io | 48 +- 10 files changed, 566 insertions(+), 461 deletions(-) delete mode 100644 fork-me.htx delete mode 100644 index.dvi diff --git a/doc/object.htm b/doc/object.htm index 8c2a505..76f49fc 100644 --- a/doc/object.htm +++ b/doc/object.htm @@ -2,48 +2,69 @@ "http://www.w3.org/TR/REC-html40/loose.dtd"> + + -

-

-
- -
-
- synrc research center -
-
- -
-
+
+
+ + + +
-
+
-
+
- +
- - - - + -
-

@@ -139,12 +160,18 @@

TOC

-
+

- synrc uses HEVEA
- Privacy Policy | Feedback | Brandbook
- Copyright © 2005–2012 Synrc Research Center + synrc uses HEVEA
+ Сontinuous Integration | + Events | + Erlang PaaS | + Music
+ Privacy Policy | + Feedback | + Brandbook
+ Copyright © 2005–2013 Synrc Research Center s.r.o.
@@ -165,7 +192,9 @@

TOC

})(); -

+ + +

diff --git a/doc/overview.htm b/doc/overview.htm index 0d22b19..b1c7e2d 100644 --- a/doc/overview.htm +++ b/doc/overview.htm @@ -2,48 +2,69 @@ "http://www.w3.org/TR/REC-html40/loose.dtd"> + + -

-

-
- -
-
- synrc research center -
-
- -
-
+
+
+ + + +
-
+
-
+
- +
- - - - + -
-

@@ -297,12 +318,18 @@

TOC

-
+

- synrc uses HEVEA
- Privacy Policy | Feedback | Brandbook
- Copyright © 2005–2012 Synrc Research Center + synrc uses HEVEA
+ Сontinuous Integration | + Events | + Erlang PaaS | + Music
+ Privacy Policy | + Feedback | + Brandbook
+ Copyright © 2005–2013 Synrc Research Center s.r.o.
@@ -323,7 +350,9 @@

TOC

})(); -

+ + +

diff --git a/doc/primitives.htm b/doc/primitives.htm index 2a1fa36..ed23ce9 100644 --- a/doc/primitives.htm +++ b/doc/primitives.htm @@ -2,48 +2,69 @@ "http://www.w3.org/TR/REC-html40/loose.dtd"> + + -

-

-
- -
-
- synrc research center -
-
- -
-
+
+
+ + + +
-
+
-
+
- +
- - - - + -
-

@@ -298,12 +319,18 @@

TOC

-
+

- synrc uses HEVEA
- Privacy Policy | Feedback | Brandbook
- Copyright © 2005–2012 Synrc Research Center + synrc uses HEVEA
+ Сontinuous Integration | + Events | + Erlang PaaS | + Music
+ Privacy Policy | + Feedback | + Brandbook
+ Copyright © 2005–2013 Synrc Research Center s.r.o.
@@ -324,7 +351,9 @@

TOC

})(); -

+ + +

diff --git a/fork-me.htx b/fork-me.htx deleted file mode 100644 index a42050a..0000000 --- a/fork-me.htx +++ /dev/null @@ -1,2 +0,0 @@ - -Fork me on GitHub \ No newline at end of file diff --git a/index.dvi b/index.dvi deleted file mode 100644 index 083ce6f200032d12187a80843768ca20d7669a89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1948 zcmah~U2GIp6rOH}7Ro~SG4KGAf<_ayv%BTTQd5%#h&HsfwnUHz0uP8gc6xOkATTv)h|(vU_^@IdBr!sa@r@S(^$CAsVsN9N!PIl7E!JccZ!*94 z+;hJ3o$sD|FV=8;{L0qnBp8i9ZfQM)kF-*kSuSgBPo`2za<9^!>`d<3-EkT$8id*Z zjd>UoF;^>;C;px~^Ug$UPxLzf)?69JxODUMjbHZ;3~5BiT|0<@ve-%VP{lH{J6d(U z*p-BP3GS|4?0U8x9wqUxhe=m^M@Op%BUFxcm;F7GR9koTM*oDgR@0<7z-m&BbTQR_ zxrbI(Xj(5avo3h&`+5hxaLwdQxTP^J0DM(A5&rhX<(l-@r|t%+1r~}67UNHivR;Y$k>bRQn!j0aGVDXJSTU$Rm@@n%#3t2VnjxSQ4 z2dRelKfDknJbJgb_Tb&uOHxa1XA}$k*r{YyH@$J`j`dh=i)r5U%tueqWAH5#}s-CUKnMfG7YwT(dD2vzkqfhd-H(oSd>4 z;jqXVSLFQn5iA3nkUhhhb8>#Jhw>#U1+NgBxk%@INCkr&F>wH_@j;9-0WSFSnf)+1 zV3TNh&`U)|)?y6cq|$g%Q~D1a5|WHULxF%7_}hof52m++>rP+3bt}givpN$ANWfMV zl^O{`6B*%6O;BFo*e(z}tbmyTGJDW8D-`E_^622ng>A7d+7@C_W^G}kQY8O zH6Phk4@GGsL*ODNN4k|mQH2>%ArWe4u-z%(1J0LpoE3K6W(Mdi@U+c`u#t~)=KU1V z7f7B1I$;EpeINvb57B%MF(+U0E=D1*4`L15*i`Xy90NK=4n8LzKBj`799B7aa#?_M zhYHyR)FxSCB0Uf)I{fBRJr`z`d6vL7G$JbcjBRohVQMjuN}qGQ1&`puphQGI{iMO525H`y;qt6)N0 z&}JCh`*p6am_SK|B^@!tn_Ml$mdBX^QX`*B%Lx_viiR2q68Kz(Y6dv_k97v;1*7#$ zfv5#jkvxc8Jd}tIh1%J~!rO9!q2X_nBxtuk?Auv|RNuW1xjnV~+!Civ!v*-eQfjEx j6@Oi3>UQ_~&A1-z^;&=Z6RB?duYdmh33dG}HYdhEXItcG diff --git a/index.htm b/index.htm index 04d015e..59e3c6e 100644 --- a/index.htm +++ b/index.htm @@ -5,7 +5,7 @@ Io Language CLR - + - + + + + + + - -

- -Fork me on GitHub + + -

+
- -
-
- synrc research center -
-
- -
-
- + + + +
-
+
-
+
- +
- - - - + -
-
-

+ +
-
-
- + -

-
-
- - -

-
-
1
- - -
lnx+5
sinx
 dx -
-

Io Language CLR

As some of us are fans of Smalltalk and LISP, we cannot pass the -beautiful syntaxic forth start-up. Io — one of simplest but very powerful +beautiful syntaxic forth start-up. Io — one of simplest but very powerful languages. Inspired by Smalltalk its simplified syntax free from syntax trash. We implemented Io Language Virtual Machine and Read -eval Print Loop for .NET CLR.

Io Manual: http://synrc.com/research/io/doc/overview.htm

-

Credits

Team in alphabetical order:

-Oleg Andreev
- -Semka Novikov
- -Maxim Sokhatsky -
+eval Print Loop for .NET CLR.

+
+ + +
1
π
 =  + + +
+
2 + +
2
9801
+ + +
n=0
+ + +
(4n)!(1103+26390
(n!)43964n

Io Manual: http://synrc.com/research/io/doc/overview.htm

References

Please checkout also the original Io Language sources maintained by -Io’s author — Steve Dekorte. Also you may notice +Io’s author — Steve Dekorte. Also you may notice comp.lang.io -newsgroup available at gmane news archive.

+newsgroup available at gmane news archive.

+

+ + + comments powered by Disqus + + +

-
 

+

 
+ +
-
+

- synrc uses HEVEA
- Privacy Policy | Feedback | Brandbook
- Copyright © 2005–2012 Synrc Research Center + synrc uses HEVEA
+ Сontinuous Integration | + Events | + Erlang PaaS | + Music
+ Privacy Policy | + Feedback | + Brandbook
+ Copyright © 2005–2013 Synrc Research Center s.r.o.
@@ -161,8 +209,8 @@

References

Please })(); -

- + + diff --git a/index.tex b/index.tex index e43649d..e5d24fe 100644 --- a/index.tex +++ b/index.tex @@ -1,31 +1,13 @@ -\documentclass[11pt]{article} -\usepackage{ifthen} -\usepackage{graphicx} -\usepackage{cite} -\usepackage{hevea} -\input{synrc.hva} +\input{../../synrc.hva} %HEVEA \loadcssfile{../../synrc.css} - +\renewcommand{\images}{http://synrc.com/research/io/images} \begin{document} -%HEVEA \rawhtmlinput{research/io/fork-me.htx} -%HEVEA \rawhtmlinput{templates/head-hevea.htx} - - \title{Io Language CLR} \author{Maxim Sokhatsky} %HEVEA \begin{divstyle}{nonselectedwrapper} %HEVEA \begin{divstyle}{article} -%HEVEA \begin{divstyle}{smallcol} -%HEVEA \begin{divstyle}{block} -\paragraph{} -\includeimage{images/Io.png} -\paragraph{} -\begin{displaymath} -\int_1^\infty{\frac{\ln{x}+5}{\sin{x}}}\,dx -\end{displaymath} -%HEVEA \end{divstyle} -%HEVEA \end{divstyle} +\input{toc} %HEVEA \begin{divstyle}{articlecol} \section*{Io Language CLR} @@ -35,17 +17,11 @@ \section*{Io Language CLR} syntax trash. We implemented Io Language Virtual Machine and Read eval Print Loop for .NET CLR. -Io Manual: \footahref{http://synrc.com/research/io/doc/overview.htm}{http://synrc.com/research/io/doc/overview.htm} - -\subsection*{Credits} - -Team in alphabetical order: +\begin{displaymath} +\frac{1}{\pi} = \frac{2\sqrt{2}}{9801}\sum^{\infty}_{n=0}\frac{(4n)!(1103+26390}{(n!)^{4}396^{4n}} +\end{displaymath} -%HEVEA \begin{quote} -Oleg Andreev \@br -Semka Novikov \@br -Maxim Sokhatsky -%HEVEA \end{quote} +Io Manual: \footahref{http://synrc.com/research/io/doc/overview.htm}{http://synrc.com/research/io/doc/overview.htm} \subsection*{References} @@ -54,13 +30,9 @@ \subsection*{References} \footahref{news://news.gmane.org/gmane.comp.lang.io}{comp.lang.io} newsgroup available at gmane news archive. +%HEVEA \rawhtmlinput{templates/disqus.htx} %HEVEA \end{divstyle} %HEVEA \end{divstyle} %HEVEA \end{divstyle} %HEVEA \begin{divstyle}{clear}{~}\end{divstyle} - -%HEVEA \footerfalse -%HEVEA \rawhtmlinput{templates/foot.htx} - \end{document} - diff --git a/language/io/bootstrap/A1_OpShuffle.io b/language/io/bootstrap/A1_OpShuffle.io index 4a00bdb..b56d6ff 100644 --- a/language/io/bootstrap/A1_OpShuffle.io +++ b/language/io/bootstrap/A1_OpShuffle.io @@ -1,241 +1,241 @@ - -true setSlot("and", Object getSlot("evalArg")) -false setSlot("and", false) - -nil setSlot("ifNil", Object getSlot("evalArgAndReturnSelf")) -Object setSlot("ifNil", Object getSlot("thisContext")) - -nil setSlot("ifNilEval", Object getSlot("evalArg")) -Object setSlot("ifNilEval", Object getSlot("thisContext")) - -Message do ( - - setSlot("isRightOperator", method ( - arguments size == (0) and (OperatorTable rightOperators contains(name)) - )) - - setSlot("isLeftOperator", method (OperatorTable leftOperators contains(name))) - - setSlot("operatorPrecedence", method ( - if (arguments size == (0), OperatorTable operatorPrecedence(name), nil) - )) - - setSlot("OperatorTable", - Map clone do( - setSlot("maxPrecedence", nil) - setSlot("contains", getSlot("hasKey")) - setSlot("operatorPrecedence", method(name, - rightOperators at(name) ifNilEval(leftOperators at(name)) - )) - setSlot("leftOperators", - thisContext clone do( - atPut(":=", 0) - atPut("=", 0) - updateSlot("maxPrecedence", 0) - ) - ) - setSlot("rightOperators", - thisContext clone do( - atPut("@", 0) - atPut("'", 0) atPut(".", 0) - atPut("?", 0) atPut("(", 0) atPut(")", 0) atPut(":", 0) - atPut("**", 1) - atPut("++", 2) atPut("--", 2) - atPut("*", 3) atPut("/", 3) atPut("%", 3) - atPut("+", 4) atPut("-", 4) - atPut("<<", 5) atPut(">>", 5) - atPut(">", 6) atPut("<", 6) atPut("<=", 6) atPut(">=", 6) - atPut("==", 7) atPut("!=", 7) - atPut("&", 8) - atPut("^", 9) - atPut("|", 10) - atPut("and", 11) atPut("&&", 11) - atPut("or", 12) atPut("||", 12) - atPut("..", 13) - atPut("=", 14) atPut("+=", 14) atPut("-=", 14) atPut("*=", 14) - atPut("/=", 14) atPut("%=", 14) atPut("&=", 14) atPut("^=", 14) - atPut("|=", 14) atPut("<<=", 14) atPut(">>=", 14) atPut(":=", 14) - atPut("<-", 14) atPut("<->", 14) atPut("->", 14) - atPut("return", 15) - atPut(",", 16) - updateSlot("maxPrecedence", 16) - ) - ) - ) - ) - - setSlot("Levels", - Object clone do( - - setSlot("stack", nil) - - setSlot("init", method( - reset - )) - - setSlot("reset", method( - updateSlot("stack", List clone with(Level clone setRootLevel)) - self - )) - - setSlot("nextMessage", method( - setSlot("i", stack size - (1)) - while(i>=(0), - stack at(i) finish - setSlot("i", i - (1)) - ) - reset - )) - - setSlot("currentLevel", method(stack last)) - - setSlot("currentPrecedence", method(currentLevel precedence)) - - setSlot("popDownTo", method(targetLevel, - while (currentPrecedence <=(targetLevel) and (currentLevel isNotAttachingArgs), - currentLevel finish - stack pop - ) - )) - - setSlot("attachToTopAndPush", method(msg, - currentLevel attachAndReplace(msg) - stack push(Level clone setAwaitingFirstArg(msg)) - )) - - setSlot("attach", method(msg, expressions, - if (msg isLeftOperator, - attachLeftOperator(msg, expressions), - if (msg isRightOperator, - attachRightOperator(msg), - currentLevel attachAndReplace(msg) - ) - ) - )) - - setSlot("attachRightOperator",method(msg, - if (msg argCount > (0), - currentLevel setAlreadyHasArgs(msg) - , - popDownTo(msg operatorPrecedence) - attachToTopAndPush(msg) - ) - )) - - setSlot("attachLeftOperator", method(msg, expressions, - setSlot("attaching", currentLevel msg) - attaching ifNil( - "compile error requires a symbol to its left" println - ) - if (attaching argCount >(0), - "compiler error: the symbol to left of" println - ) - setSlot("slotName", attaching name) - setSlot("quotedSlotName", Sequence clone appendSeq("\"") appendSeq(slotName) appendSeq("\"")) - setSlot("slotNameMessage", Message clone setName(quotedSlotName) setCachedResult(slotName)) - attaching appendArg(slotNameMessage) - setSlot("setSlotName", - if (msg name ==(":="), "setSlot", "updateSlot") - ) - attaching setName(setSlotName) - currentLevel setAssignment - if (msg argCount >(0), - attaching appendArg( - Message clone setName("") appendArg(msg argAt(0)) setNext(msg next) - ) - , - msg next ifNil( - "compile error" println - ) - attaching appendArg(msg next) - ) - expressions append(msg next) - attaching setNext(nil) removeCachedResult - msg setNext(nil) - )) - - setSlot("Level", - Object clone do( - setSlot("maxPrecedence", 18) - setSlot("msg", nil) - setSlot("precedence", nil) - setSlot("attach", nil) - setSlot("attachBehaviourName", nil) - setSlot("finish", method( - if (msg, msg setNext(nil)) - changeAttachBehaviour("attachNop") - )) - setSlot("changeAttachBehaviour", method(name, - updateSlot("attachBehaviourName", name) - updateSlot("attach", self getSlot(name)) - )) - setSlot("attachAttach", method(m, msg setNext(m))) - setSlot("attachArg", method(m, msg appendArg(m))) - setSlot("attachNew", method(m, updateSlot("msg", m))) - setSlot("attachNop", nil) - changeAttachBehaviour("attachNop") - setSlot("attachAndReplace", method(m, - attach(m) - updateSlot("msg", m) - changeAttachBehaviour("attachAttach") - )) - setSlot("setAwaitingFirstArg", method(m, - updateSlot("msg", m) - self updateSlot("precedence", m operatorPrecedence) - changeAttachBehaviour("attachArg") - self - )) - setSlot("setAlreadyHasArgs", method(m, - changeAttachBehaviour("attachAttach") - updateSlot("msg", m) - self - )) - setSlot("setRootLevel", method( - updateSlot("precedence", maxPrecedence) - changeAttachBehaviour("attachNew") - self - )) - setSlot("setAssignment", method(changeAttachBehaviour("attachAttach"))) - setSlot("isNotAttachingArgs", method( - self getSlot("attachArg") != (self getSlot("attach")) - )) - ) - ) - ) - ) - - setSlot("shuffleOn", method( - Message setSlot("opShuffle", method(opShuffleIo)) - "shuffle enabled" println - )) - - setSlot("shuffleOff", method( - setSlot("opShuffle", nil) - "shuffle disabled" println - )) - - setSlot("opShuffleIo", method( - setSlot("me", self) - setSlot("levels", Levels clone) - setSlot("expressions", List clone with(self)) - while (expressions size >= (1), - setSlot("n", expressions pop) - while (n, - setSlot("a", n) - while (a, - levels attach(a, expressions) - expressions appendSeq(a arguments) - updateSlot("a", a next) - ) - levels nextMessage - updateSlot("n", n next) - ) - ) - self - )) - -) - -//Message shuffleOn - - + +true setSlot("and", Object getSlot("evalArg")) +false setSlot("and", false) + +nil setSlot("ifNil", Object getSlot("evalArgAndReturnSelf")) +Object setSlot("ifNil", Object getSlot("thisContext")) + +nil setSlot("ifNilEval", Object getSlot("evalArg")) +Object setSlot("ifNilEval", Object getSlot("thisContext")) + +Message do ( + + setSlot("isRightOperator", method ( + arguments size == (0) and (OperatorTable rightOperators contains(name)) + )) + + setSlot("isLeftOperator", method (OperatorTable leftOperators contains(name))) + + setSlot("operatorPrecedence", method ( + if (arguments size == (0), OperatorTable operatorPrecedence(name), nil) + )) + + setSlot("OperatorTable", + Map clone do( + setSlot("maxPrecedence", nil) + setSlot("contains", getSlot("hasKey")) + setSlot("operatorPrecedence", method(name, + rightOperators at(name) ifNilEval(leftOperators at(name)) + )) + setSlot("leftOperators", + thisContext clone do( + atPut(":=", 0) + atPut("=", 0) + updateSlot("maxPrecedence", 0) + ) + ) + setSlot("rightOperators", + thisContext clone do( + atPut("@", 0) + atPut("'", 0) atPut(".", 0) + atPut("?", 0) atPut("(", 0) atPut(")", 0) atPut(":", 0) + atPut("**", 1) + atPut("++", 2) atPut("--", 2) + atPut("*", 3) atPut("/", 3) atPut("%", 3) + atPut("+", 4) atPut("-", 4) + atPut("<<", 5) atPut(">>", 5) + atPut(">", 6) atPut("<", 6) atPut("<=", 6) atPut(">=", 6) + atPut("==", 7) atPut("!=", 7) + atPut("&", 8) + atPut("^", 9) + atPut("|", 10) + atPut("and", 11) atPut("&&", 11) + atPut("or", 12) atPut("||", 12) + atPut("..", 13) + atPut("=", 14) atPut("+=", 14) atPut("-=", 14) atPut("*=", 14) + atPut("/=", 14) atPut("%=", 14) atPut("&=", 14) atPut("^=", 14) + atPut("|=", 14) atPut("<<=", 14) atPut(">>=", 14) atPut(":=", 14) + atPut("<-", 14) atPut("<->", 14) atPut("->", 14) + atPut("return", 15) + atPut(",", 16) + updateSlot("maxPrecedence", 16) + ) + ) + ) + ) + + setSlot("Levels", + Object clone do( + + setSlot("stack", nil) + + setSlot("init", method( + reset + )) + + setSlot("reset", method( + updateSlot("stack", List clone with(Level clone setRootLevel)) + self + )) + + setSlot("nextMessage", method( + setSlot("i", stack size - (1)) + while(i>=(0), + stack at(i) finish + setSlot("i", i - (1)) + ) + reset + )) + + setSlot("currentLevel", method(stack last)) + + setSlot("currentPrecedence", method(currentLevel precedence)) + + setSlot("popDownTo", method(targetLevel, + while (currentPrecedence <=(targetLevel) and (currentLevel isNotAttachingArgs), + currentLevel finish + stack pop + ) + )) + + setSlot("attachToTopAndPush", method(msg, + currentLevel attachAndReplace(msg) + stack push(Level clone setAwaitingFirstArg(msg)) + )) + + setSlot("attach", method(msg, expressions, + if (msg isLeftOperator, + attachLeftOperator(msg, expressions), + if (msg isRightOperator, + attachRightOperator(msg), + currentLevel attachAndReplace(msg) + ) + ) + )) + + setSlot("attachRightOperator",method(msg, + if (msg argCount > (0), + currentLevel setAlreadyHasArgs(msg) + , + popDownTo(msg operatorPrecedence) + attachToTopAndPush(msg) + ) + )) + + setSlot("attachLeftOperator", method(msg, expressions, + setSlot("attaching", currentLevel msg) + attaching ifNil( + "compile error requires a symbol to its left" println + ) + if (attaching argCount >(0), + "compiler error: the symbol to left of" println + ) + setSlot("slotName", attaching name) + setSlot("quotedSlotName", Sequence clone appendSeq("\"") appendSeq(slotName) appendSeq("\"")) + setSlot("slotNameMessage", Message clone setName(quotedSlotName) setCachedResult(slotName)) + attaching appendArg(slotNameMessage) + setSlot("setSlotName", + if (msg name ==(":="), "setSlot", "updateSlot") + ) + attaching setName(setSlotName) + currentLevel setAssignment + if (msg argCount >(0), + attaching appendArg( + Message clone setName("") appendArg(msg argAt(0)) setNext(msg next) + ) + , + msg next ifNil( + "compile error" println + ) + attaching appendArg(msg next) + ) + expressions append(msg next) + attaching setNext(nil) removeCachedResult + msg setNext(nil) + )) + + setSlot("Level", + Object clone do( + setSlot("maxPrecedence", 18) + setSlot("msg", nil) + setSlot("precedence", nil) + setSlot("attach", nil) + setSlot("attachBehaviourName", nil) + setSlot("finish", method( + if (msg, msg setNext(nil)) + changeAttachBehaviour("attachNop") + )) + setSlot("changeAttachBehaviour", method(name, + updateSlot("attachBehaviourName", name) + updateSlot("attach", self getSlot(name)) + )) + setSlot("attachAttach", method(m, msg setNext(m))) + setSlot("attachArg", method(m, msg appendArg(m))) + setSlot("attachNew", method(m, updateSlot("msg", m))) + setSlot("attachNop", nil) + changeAttachBehaviour("attachNop") + setSlot("attachAndReplace", method(m, + attach(m) + updateSlot("msg", m) + changeAttachBehaviour("attachAttach") + )) + setSlot("setAwaitingFirstArg", method(m, + updateSlot("msg", m) + self updateSlot("precedence", m operatorPrecedence) + changeAttachBehaviour("attachArg") + self + )) + setSlot("setAlreadyHasArgs", method(m, + changeAttachBehaviour("attachAttach") + updateSlot("msg", m) + self + )) + setSlot("setRootLevel", method( + updateSlot("precedence", maxPrecedence) + changeAttachBehaviour("attachNew") + self + )) + setSlot("setAssignment", method(changeAttachBehaviour("attachAttach"))) + setSlot("isNotAttachingArgs", method( + self getSlot("attachArg") != (self getSlot("attach")) + )) + ) + ) + ) + ) + + setSlot("shuffleOn", method( + Message setSlot("opShuffle", method(opShuffleIo)) + "shuffle enabled" println + )) + + setSlot("shuffleOff", method( + setSlot("opShuffle", nil) + "shuffle disabled" println + )) + + setSlot("opShuffleIo", method( + setSlot("me", self) + setSlot("levels", Levels clone) + setSlot("expressions", List clone with(self)) + while (expressions size >= (1), + setSlot("n", expressions pop) + while (n, + setSlot("a", n) + while (a, + levels attach(a, expressions) + expressions appendSeq(a arguments) + updateSlot("a", a next) + ) + levels nextMessage + updateSlot("n", n next) + ) + ) + self + )) + +) + +//Message shuffleOn + + diff --git a/language/io/bootstrap/A2_LoadAssemblies.io b/language/io/bootstrap/A2_LoadAssemblies.io index 0c4bd13..1cfc1e8 100644 --- a/language/io/bootstrap/A2_LoadAssemblies.io +++ b/language/io/bootstrap/A2_LoadAssemblies.io @@ -1,18 +1,18 @@ - -CLR loadAssembly("System.Windows.Forms") -CLR loadAssembly("mscorlib") -CLR loadAssembly("System.Drawing") -CLR loadAssembly("IoVM") - -CLR using("System.Windows.Forms") -CLR using("System.Drawing") -CLR using("io") -CLR using("System.Collections") - -setSlot("form", Form new) -setSlot("button", Button new) -button set_Text("MyButton") -button set_Location(Point new (10,10)) -form get_Controls Add(button) - -Message shuffleOff + +CLR loadAssembly("System.Windows.Forms") +CLR loadAssembly("mscorlib") +CLR loadAssembly("System.Drawing") +CLR loadAssembly("IoVM") + +CLR using("System.Windows.Forms") +CLR using("System.Drawing") +CLR using("io") +CLR using("System.Collections") + +setSlot("form", Form new) +setSlot("button", Button new) +button set_Text("MyButton") +button set_Location(Point new (10,10)) +form get_Controls Add(button) + +Message shuffleOff diff --git a/language/io/bootstrap/A3_Scheduler.io b/language/io/bootstrap/A3_Scheduler.io index 64d1fcb..3e0d491 100644 --- a/language/io/bootstrap/A3_Scheduler.io +++ b/language/io/bootstrap/A3_Scheduler.io @@ -1,24 +1,24 @@ - -setSlot("fac", method(n, if(n == (0), 1, n * (fac(n - (1)))))) -setSlot("linearAsyncBlock", method(1 println; yield; 2 println; yield; 3 println; 42)) -setSlot("Test", Object clone) -setSlot("yieldAll", method(while (yieldingCoros>(0), yield))) - -Test do ( - setSlot("a", 10) - setSlot("t", 10) - setSlot("wh2", method(wh)) - setSlot("wh", method( - while( - t > (0), - a print; " " print; yield; updateSlot("a", a + (1)); - updateSlot("t", t - (1)); - self - ) - ) -) - -setSlot("x", 100000) -while (x > (0), Test clone @@(wh); setSlot("x", x - (1)) ; self) - -Message shuffleOn + +setSlot("fac", method(n, if(n == (0), 1, n * (fac(n - (1)))))) +setSlot("linearAsyncBlock", method(1 println; yield; 2 println; yield; 3 println; 42)) +setSlot("Test", Object clone) +setSlot("yieldAll", method(while (yieldingCoros>(0), yield))) + +Test do ( + setSlot("a", 10) + setSlot("t", 10) + setSlot("wh2", method(wh)) + setSlot("wh", method( + while( + t > (0), + a print; " " print; yield; updateSlot("a", a + (1)); + updateSlot("t", t - (1)); + self + ) + ) +) + +setSlot("x", 100000) +while (x > (0), Test clone @@(wh); setSlot("x", x - (1)) ; self) + +Message shuffleOn