add •Fmt, changes to readme files
This commit is contained in:
parent
a7ee8044d1
commit
305f578707
11
README.md
11
README.md
@ -3,12 +3,13 @@ Build & run (tl;dr: `make; rlwrap ./BQN`):
|
|||||||
1. (optional) Run `./genRuntime path/to/mlochbaum/BQN`; Otherwise, the necessary precompiled bytecode will be retrieved from `remotes/origin/bytecode`
|
1. (optional) Run `./genRuntime path/to/mlochbaum/BQN`; Otherwise, the necessary precompiled bytecode will be retrieved from `remotes/origin/bytecode`
|
||||||
2. If wanted, customize settings in `src/h.h`
|
2. If wanted, customize settings in `src/h.h`
|
||||||
3. `make`
|
3. `make`
|
||||||
- Options: `make o3`, `make debug` (`make rtperf`, `make heapverify` and `make rtverify` also exist for further testing/debugging)
|
- Options: `make o3` (the default), `make debug` (more presets exist for more specific debugging)
|
||||||
- Do `make clean` or `make [o3|debug|…]-clean` beforehand to force recompile
|
- `make CC=gcc` can be used to compile with gcc
|
||||||
- `./build` and `./debugBuild` compile everything at once and allow specifying extra compiler arguments, but may be slower
|
- Do `make clean` or `make t=[o3|debug|…] clean` beforehand to force recompile
|
||||||
4. `./BQN` (or `rlwrap ./BQN` for a better REPL)
|
- `make single-(o3|o3g|debug|c)` compile everything as a single translation unit and thus will compile slower, but allows specifying extra compiler arguments with `make f='…' single-…` and allows the compiler to optimize more
|
||||||
|
4. `./BQN` (or `rlwrap ./BQN` for a better REPL; see `./BQN --help` for more options)
|
||||||
|
|
||||||
Run tests with `./BQN mlochbaum/BQN/test/this.bqn` (with `-noerr` for a heapverify build).
|
Run tests with `./BQN mlochbaum/BQN/test/this.bqn` (add `-noerr` for a heapverify build).
|
||||||
|
|
||||||
Time REPL-executed safe prim tests: `./test.bqn mlochbaum/BQN -s prim > SP; time ./BQN<SP>/dev/null`
|
Time REPL-executed safe prim tests: `./test.bqn mlochbaum/BQN -s prim > SP; time ./BQN<SP>/dev/null`
|
||||||
|
|
||||||
|
|||||||
@ -75,11 +75,19 @@ B repr_c1(B t, B x) {
|
|||||||
#if FORMATTER
|
#if FORMATTER
|
||||||
return bqn_repr(x);
|
return bqn_repr(x);
|
||||||
#else
|
#else
|
||||||
thrM("•Repr: Cannot represent non-numbers");
|
thrM("•Repr: Cannot represent non-numbers without FORMATTER defined");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
B fmt_c1(B t, B x) {
|
||||||
|
#if FORMATTER
|
||||||
|
return bqn_fmt(x);
|
||||||
|
#else
|
||||||
|
thrM("•Fmt isn't supported without FORMATTER defined");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
B fill_c1(B t, B x) {
|
B fill_c1(B t, B x) {
|
||||||
B r = getFillE(x);
|
B r = getFillE(x);
|
||||||
dec(x);
|
dec(x);
|
||||||
@ -660,6 +668,7 @@ B sys_c1(B t, B x) {
|
|||||||
else if (eqStr(c, U"delay")) r.a[i] = inc(bi_delay);
|
else if (eqStr(c, U"delay")) r.a[i] = inc(bi_delay);
|
||||||
else if (eqStr(c, U"hash")) r.a[i] = inc(bi_hash);
|
else if (eqStr(c, U"hash")) r.a[i] = inc(bi_hash);
|
||||||
else if (eqStr(c, U"repr")) r.a[i] = inc(bi_repr);
|
else if (eqStr(c, U"repr")) r.a[i] = inc(bi_repr);
|
||||||
|
else if (eqStr(c, U"fmt")) r.a[i] = inc(bi_fmt);
|
||||||
else if (eqStr(c, U"glyph")) r.a[i] = inc(bi_glyph);
|
else if (eqStr(c, U"glyph")) r.a[i] = inc(bi_glyph);
|
||||||
else if (eqStr(c, U"makerand")) r.a[i] = inc(bi_makeRand);
|
else if (eqStr(c, U"makerand")) r.a[i] = inc(bi_makeRand);
|
||||||
else if (eqStr(c, U"makerepl")) r.a[i] = inc(bi_makeREPL);
|
else if (eqStr(c, U"makerepl")) r.a[i] = inc(bi_makeREPL);
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
/* sort.c*/A(gradeUp,"⍋") A(gradeDown,"⍒") \
|
/* sort.c*/A(gradeUp,"⍋") A(gradeDown,"⍒") \
|
||||||
/* everything before the definition of •Type is defined to be pure, and everything after is not */ \
|
/* everything before the definition of •Type is defined to be pure, and everything after is not */ \
|
||||||
/* sysfn.c*/M(type,"•Type") M(decp,"•Decompose") M(primInd,"•PrimInd") M(glyph,"•Glyph") A(fill,"•FillFn") M(sys,"•getsys") A(grLen,"•GroupLen") D(grOrd,"•groupOrd") \
|
/* sysfn.c*/M(type,"•Type") M(decp,"•Decompose") M(primInd,"•PrimInd") M(glyph,"•Glyph") A(fill,"•FillFn") M(sys,"•getsys") A(grLen,"•GroupLen") D(grOrd,"•groupOrd") \
|
||||||
/* sysfn.c*/M(repr,"•Repr") A(asrt,"!") A(casrt,"!") M(out,"•Out") M(show,"•Show") M(bqn,"•BQN") M(sh,"•SH") M(fromUtf8,"•FromUTF8") \
|
/* sysfn.c*/M(repr,"•Repr") M(fmt,"•Fmt") A(asrt,"!") A(casrt,"!") M(out,"•Out") M(show,"•Show") M(bqn,"•BQN") M(sh,"•SH") M(fromUtf8,"•FromUTF8") \
|
||||||
/* sysfn.c*/D(cmp,"•Cmp") A(hash,"•Hash") M(delay,"•Delay") M(makeRand,"•MakeRand") M(makeREPL,"•MakeREPL") M(exit,"•Exit") M(getLine,"•GetLine") \
|
/* sysfn.c*/D(cmp,"•Cmp") A(hash,"•Hash") M(delay,"•Delay") M(makeRand,"•MakeRand") M(makeREPL,"•MakeREPL") M(exit,"•Exit") M(getLine,"•GetLine") \
|
||||||
/*internal.c*/M(itype,"•internal.Type") M(refc,"•internal.Refc") M(squeeze,"•internal.Squeeze") M(isPure,"•internal.IsPure") A(info,"•internal.Info") \
|
/*internal.c*/M(itype,"•internal.Type") M(refc,"•internal.Refc") M(squeeze,"•internal.Squeeze") M(isPure,"•internal.IsPure") A(info,"•internal.Info") \
|
||||||
/*internal.c*/D(variation,"•internal.Variation") A(listVariations,"•internal.ListVariations") M(clearRefs,"•internal.ClearRefs") M(unshare,"•internal.Unshare")
|
/*internal.c*/D(variation,"•internal.Variation") A(listVariations,"•internal.ListVariations") M(clearRefs,"•internal.ClearRefs") M(unshare,"•internal.Unshare")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user