Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
glebbash
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
Mshc – Minimal Self-Hosted Compiler
(github.com)
2 points
by
glebbash
2y ago
|
0 comments
2.
▲
by
glebbash
2y ago
It's funny yeah but it makes sense and is not really a problem. You would write a compiler in the language that is the closest to your perfect. Trying to fix the original language by making a "clone" of it and adding/rem
3.
▲
by
glebbash
2y ago
Well the goal for this project is to go dependency free so, yep, it's not a good fit here.
4.
▲
by
glebbash
2y ago
Cool project you too :) It's fun to see how the language of the first compiler affects a lot of the syntax of the languages we build.
5.
▲
by
glebbash
2y ago
Absolutely. The memory management is manual like in C, but with addition of defers it is actually quite good to work with. Here is the source for the allocator: https://github.com/glebbash/LO/blob/81f96bb09e3a
6.
▲
by
glebbash
2y ago
Yay a first user :) Added the license.
7.
▲
by
glebbash
2y ago
Fixed the link, forgot that markdown references use double square brackets. Hmm, I haven't thought about it the license actually, I would default to MIT, but wanted to keep the number of files minimal in repo, hehe. Will figure it out
8.
▲
by
glebbash
2y ago
Alright, will take a look at it sometime. But the more interesting proposal for me right now is the component model.
9.
▲
by
glebbash
2y ago
Yes. Compiling single files is supported by calling the exported `compile` function, example setup here: https://github.com/glebbash/LO/blob/60b80d1b325136ce1ceaf4dc... . For includes to work compiler uses WAS
10.
▲
by
glebbash
2y ago
I don't see a need for it. Maybe for some higher level scripting, but I don't have any plans for that.
11.
▲
by
glebbash
2y ago
Mostly for recreational programming. And then for exploring what the languages with minimal infrastructure could look like.
12.
▲
by
glebbash
2y ago
That was how it started actually, I wanted to make a superset of WAT. But then I switched to a more familiar C-like constructs and that gave me a big boost in productivity. I think the superset of WAT idea is very viable and someone more co
13.
▲
by
glebbash
2y ago
Thanks, I will definitely do that once the feature set will get stable enough. Don't want to update docs constantly :) As for now, you can check the examples folder and explore the compiler sources, tried to keep everything simple.
14.
▲
by
glebbash
2y ago
Hi, it's my first time posting here, just wanted to share the language I was working on for some time now. I've been working on integrating it with WASM-4 runtime this past week. And with minimal changes to the compiler I created
15.
▲
LO – simple WASM native language
(github.com)
221 points
by
glebbash
2y ago
|
63 comments