瀏覽代碼

add foreign

txlyre 2 周之前
父節點
當前提交
4935e3aace
共有 3 個文件被更改,包括 134 次插入1 次删除
  1. 1 1
      build.sh
  2. 132 0
      jk.c
  3. 1 0
      readme.md

+ 1 - 1
build.sh

@@ -1 +1 @@
-cc -lm -lgc jk.c -o jk
+cc -lm -ldl -lgc -lffi jk.c -o jk

File diff suppressed because it is too large
+ 132 - 0
jk.c


+ 1 - 0
readme.md

@@ -271,6 +271,7 @@ r. monadic deal          yield random elt of x
 r. dyadic  roll          roll xdy (note: y is 0-based, so >xr.y for 1-based)
 e. monadic eval          eval expression, yields udf on parse error
 i. monadic import        load and eval source file
+i. dyadic  foreign       call external function (lhs is array of arguments), e.g. .5i.'libm.so:dd:sin'
 y. monadic system        exec system command (yields output)
 y. dyadic  system2       exec system command with input
 E. monadic exit          exit with exit code

Some files were not shown because too many files changed in this diff