aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--elymas/lib/sys.ey8
2 files changed, 5 insertions, 4 deletions
diff --git a/TODO b/TODO
index 83b46da..a27f07b 100644
--- a/TODO
+++ b/TODO
@@ -16,3 +16,4 @@
* input prompt
* better interactive error handling when interpreting from stdin
* document ALL THE LIBRARIES
+* consider https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system and finally make the stuff typed correctly
diff --git a/elymas/lib/sys.ey b/elymas/lib/sys.ey
index 8f128cb..fe4f4b6 100644
--- a/elymas/lib/sys.ey
+++ b/elymas/lib/sys.ey
@@ -49,7 +49,7 @@
# 0 -> a shell command
{ ==cmd
- "/bin/sh" [ "sh" "-c" cmd "\0" cat ] [ ] +execve ??proc.exec
+ "/bin/sh" [ "sh" "-c" cmd ] { "\0" cat } '*0.0 [ ] +execve ??proc.exec
} /shell sys .deff
# 0 -> function to execute in the child
@@ -79,9 +79,9 @@
child < ==pid
{ pid 0 +waitpid -- } =*wait
{ pid -01 +kill -- } =*kill
- writeA sys .fdToFile _ .writeonly ==in
- readB sys .fdToFile _ .readonly ==out
- readC sys .fdToFile _ .readonly ==err
+ writeA _ ==inFd sys .fdToFile _ .writeonly ==in
+ readB _ ==outFd sys .fdToFile _ .readonly ==out
+ readC _ ==errFd sys .fdToFile _ .readonly ==err
>
} ? *
} /spawn sys .deff