Add extern **environ (to make musl happy)

parent fd80f4f4
......@@ -42,15 +42,33 @@ I've got a fancy Gitlab Pipeline that compiles and tests the program on both
Ubuntu and Alpine Linux. Mostly because it would slow things down if I had to
always compile against Alpine Linux when my dev environment is Bash for Windows.
## Agenda
- [ ] An event loop. Like `libuv` but... not `libuv`. Something small and manageable.
I was very tempted to use `nanomsg` to create a queue (still might if I can ever get it
to compile). But I am currently thinking [OpenMP]( is the dead simplest
way to go. Combine that with `duk_suspend` and `duk_resume` for C code and there
you have it. Then we just need to write an ethernet driver in assembly. ;)
- [ ] Pure `musl`? Or whatever? We need to eventually isolate all OS kernel calls
since we won't need no stinkin' operating system.
## Module strategy
Still working on it. Current thoughts:
1. No magic. Node made a mistake when it decided to automatically wrap files
in an IIFE to make it "easier". It's a deceptive abstraction.
in an IIFE to make it "easier". It's a deceptive abstraction.\*
2. No globals. Implicit globals are mistakes waiting to happen.
3. Given 1 and 2, I'm leaning towards Modules are Functions. End of Story.
(Since functional programming is superior anyway, why encourage anything else?)
4. Modules as functions might not work with async-ish stuff. We might need a postMessage
type of structure. We'll see. We could make each module a thread and modules
communicate using `nanomsg`. Or just some ZMQ compatible
\* We'll need to make a compatibility layer though, which will probably involve
automatically wrapping files in a magical IIFE.
### Packages vs Modules
......@@ -71,7 +89,7 @@ People should love it because it
- is less typing. You never have to `require('./some/local/file')`
- enforces consistancy. You always know what filename goes with what function.
- is simple to browserify. `cat **.js` and wrap in an IFFE.
What about subfolders? Indeed that is sometimes very convenient for organizational purposes.
I'm gonna break with the stupid `index.js` convention (because having 20 tabs open
in your editor that all say `index.js` is not helpful. At all.) and say that
......@@ -11,6 +11,7 @@
#include <fcntl.h>
extern char **environ;
#include "app_push_argv.c"
#include "app_push_environ.c"
#include "app_push_dir.c"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment