Post by twetch#7335

1AKHVi…MfPE Key · twetch

deos :: b : readme.txt

What the chain says
Block
594 464
Time
2019-08-07T00:33:19Z
Signer
1AKHViYgBGbmxi8qiJkNvoHNeDu9m3MfPE
App
twetch
Type
post
Content type
text/plain
Name in tx
twetch#7335

Fields the transaction did not carry are omitted. Open the payload to see the bytes as stored.

Signed by 1AKHViYgBGbmxi8qiJkNvoHNeDu9m3MfPE Verified

Replies (11)

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

b is interactive. much better error reporting and development potential.

b code is smaller(shrug?) and uses much less stack(shrug?).

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

b generated code is fast. already matches the fastest gcc/llvm.

b is fast. 1000 times faster than gcc/llvm/visualc. game changer.

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

notes:
A.S kernel interface (map unmap ..)
a.c replaces libc (fp and pf need more work)
b.c compiles b code

p() parse(this would change for c89 etc. minor. the rest is the same.)
d() to register, constant or global
e() to register
f() force
..

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

argtypes(for x,y,z) declared.

result and local types are automatic.

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

for arm, llvm, etc. just need to replace:
jmp tst cmp o2
ret cll psh pop

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

e.g. binary search

b: b[Ii]{h:#x;l:0;while(h>l)$[y>x[i:/l+h];l:i+1;h:i];l}

c: I b(I*x,I y){I h=x[-1],i,l=0;while(h>l)if(y>x[i=l+h>>1])l=i+1;else h=i;R l;}

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

b parses and compiles a language isomorphic to c.

same types. same ops. same control. more compact. (no precedence)

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

fast c compiler (called b: isomorphic to c)

computer language benchmarks: t.b and t.c

     run  compile(ms) runsize
 b   230     .06       1K

gcc-O1 320 60.00 3K
gcc-O2 230 90.00 3K
gcc-O9 230 200.00 8K

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

todo:

align, inline, unroll (we win)
arm, llvm, ..
c89, c99, .. (not interesting right now since i already prefer b and there is no c code we care about)

1AKHVi…MfPE Key · twetch
Replying to@1AKHVi…MfPE

b : +-*%^&|<> = / \ $[c;t;f]

c = +-*/^&|<> == << >> if(c)t;else f;