Skip to content

Instantly share code, notes, and snippets.

View kpmy's full-sized avatar
🐾
пора валить

κρμγ kpmy

🐾
пора валить
View GitHub Profile
$> ipfs dht get -v /ipns/QmSTrsVtTga3jHpVseY79DeFuWMwRP7SwpKei6EkrfqL9L
17:58:58.197: adding peer to query: <peer.ID PCSxso>
17:58:58.197: adding peer to query: <peer.ID doxVqa>
17:58:58.197: adding peer to query: <peer.ID XWEhAy>
17:58:58.197: adding peer to query: <peer.ID PkFbxA>
17:58:58.197: adding peer to query: <peer.ID bqE6Uf>
17:58:58.197: adding peer to query: <peer.ID aCpDMG>
17:58:58.197: adding peer to query: <peer.ID QmNwMp>
17:58:58.197: adding peer to query: <peer.ID YMdi1e>
function UnitTest(rts) {
const mod = this;
mod.$bool = new rts.Obj(new rts.Type("BOOLEAN"));
mod.$int = new rts.Obj(new rts.Type("INTEGER"));
mod.$any = new rts.Obj(new rts.Type("ANY"));
mod.$a0 = new rts.Obj(new rts.Type("ANY"));
mod.$a1 = new rts.Obj(new rts.Type("ANY"));
mod.$str = new rts.Obj(new rts.Type("STRING"));
mod.$ch = new rts.Obj(new rts.Type("CHAR"));
mod.$ch0 = new rts.Obj(new rts.Type("CHAR"));
TYPE
ObjList* = LIMITED RECORD
list: ListsLinear.List;
END;
VAR
objList-: ObjList;
PROCEDURE (VAR l: ObjList) ForEach* (s: Service; VAR action: Action), NEW;
VAR i: INTEGER; x: ANYPTR;
function UnitTest(rts) {
const mod = this;
mod.ImportLog = rts.load("Log");
mod.ImportTest0 = rts.load("Test0");
mod.$w = new rts.Obj(new rts.Type("ANY"));
mod.$x = new rts.Obj(new rts.Type("ANY"));
mod.$y = new rts.Obj(new rts.Type("ANY"));
mod.$z = new rts.Obj(new rts.Type("ANY"));
mod.$ret = new rts.Obj(new rts.Type("ANY"));
UNIT Test
IMPORT Log
VAR x, y, z ANY
BLOCK Do
VAR i, j, k ANY
BEGIN
1 -> y
function Test (rts){
this.x = new rts.Obj(new rts.Type("ANY"));
this.y = new rts.Obj(new rts.Type("ANY"));
this.z = new rts.Obj(new rts.Type("ANY"));
this.start = function(){
this.x.value = (new rts.Value("INTEGER", 0));
};
};
module.exports = function(rts){
(module
(memory 1 1)
(import $print "spectest" "print"
(param i32))
(func $start
(local $p i32)
(local $v i32)
(set_local $v
(i32.load8_u
(get_local $p)))
;; my little module
( module
(import $print "spectest" "print" (param i64))
(func $get (result i64) (return (i64.const 1)))
(func $start
(call_import $print (call $get))
)
(start $start)
)
name: TestLogic
variable:
a:
uuid: 01FH
type: BOOLEAN
modifier: none
b:
uuid: 020H
type: BOOLEAN
modifier: none
<?xml version="1.0" encoding="UTF-8"?>
<unit name="Logic">
<reg name="c" builtin="true" type="BOOLEAN">
<becomes>
<dyadic-expression op="|">
<dyadic-expression op="|">
<dyadic-expression op="&amp;">
<monadic-expression op="~">
<selector-expression unit="Logic" variable="a" inner="none" />
</monadic-expression>