Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
brendanfh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
brendanfh
3y ago
The issue right now is how all WebAssembly modules in general are executed. WASM modules currently must contain everything need to run them when they are built. There is no way to dynamically define a new function or variable after they hav
2.
▲
by
brendanfh
3y ago
Onyx does not really support a REPL environment at the moment because of the way it is compiled. Its execution cannot be paused in the same way as Python or JS. If you want to give it a try without committing to installing anything, I would
3.
▲
by
brendanfh
3y ago
That is a planned feature because I really want that too! I believe it should be possible and not take years to develop, especially because Onyx does have its own WASM runtime that I can completely control how and when certain things happen
4.
▲
by
brendanfh
3y ago
I totally agree the auto-advancing carousel was a bad idea. I wanted to add something with movement to the page, but that was definitely not the right idea. The carousel has been removed!
5.
▲
by
brendanfh
3y ago
Thanks for the feedback! I agree my documentation is very lacking in that department. I hope in the next few days to have a page in the documentation that describes my rationale, and the tradeoffs made during development.
6.
▲
by
brendanfh
3y ago
I found it relatively easy. I planned a lot of things out of whiteboards and notebooks, but the actual code writing was mostly straight forward. For Onyx, I went straight from AST to WASM. The trickiest part was probably deciding how non-pr
7.
▲
by
brendanfh
3y ago
That is a good point. I don't do a lot of embedded bare metal work, so I kind of forgot that is possible. I guess it's something that is not unique to Onyx, but a good thing to know nonetheless.
8.
▲
by
brendanfh
3y ago
I haven't directly measured any throughput or latency numbers. I know it is relatively fast, but I know it is not as seamless as I would like. Currently, for WASM to call any imported function, its arguments have to be formatted in a p
9.
▲
by
brendanfh
3y ago
Currently, it does not. But it is written in C with a reasonable separation between the OS things and the compiler things, so compiling with Emscripten should be possible without too much modification. This is similar to what the Onyx Playg
10.
▲
by
brendanfh
3y ago
That is exactly the way that I see it too. While Onyx does have core library support for doing standard POSIX things like stdin/stdout/stderr, file operations, and networking, Onyx can be used in an entirely different environment
11.
▲
by
brendanfh
3y ago
The example in the blog post could have been written a little bit better, but in Onyx ":=" is actually a combination of two operations: defining a new variable with ':', and assigning the value with '='. If the
12.
▲
by
brendanfh
3y ago
The compiler does not have many optimizations currently implemented. Currently, the compilers just uses constant folding and generally reducing unneeded operations if possible. There are plans to do function inlining and better tree-shaking
13.
▲
by
brendanfh
3y ago
The largest project I have in Onyx is currently around 30000 lines (not all that large I know). That project on my Intel i7-1165G7 laptop compiles in about 80ms. There are currently no large Onyx projects that can really test how this numbe
14.
▲
by
brendanfh
3y ago
Those are all great questions. I will add to the docs to explain more details later, but for now: 1. It is value based, like C. There is obviously passing by pointer, but you do that explcitly. 2/3. Memory is manually managed. To make
15.
▲
by
brendanfh
3y ago
Onyx is entirely independent from Wasmer. It is a separate project developed by me, over the past 3 years. It does however use Wasmer for running on Windows, MacOS, and optionally on Linux. I started making Onyx because I simply wanted to c