HN user

weiwenhao

117 karma
Posts8
Comments32
View on HN

I'm currently using Nature to replace Tauri for developing desktop applications, which will allow me to conduct more thorough testing later. Since the linker succeeded in linking, it indicates that all symbols were successfully located. Both libruntime and libuv are highly complex code systems. The fact that the scheduler and coroutine system are already running successfully confirms that all core functions are functioning properly.

Nature's runtime architecture draws heavily from Go, with its GC similarly referencing Go's allocator and collector approaches. However, the use of mark-and-sweep GC inevitably leads to memory fragmentation issues. Virtual memory usage tends to advance progressively. In contrast, the span-based memory allocator avoids significant fragmentation problems during frequent memory releases and allocations.

---

I also believe predictable memory management is crucial. An arena-based supplementary memory allocator could be the next key feature.

So far it does, just inspired by golang, which doesn't support FFI and calling golang related code is not an easy task.

But the situation will improve soon, in order to make nature more useful, I've decided to translate nature into readable golang code and parse the golang code to utilize the golang code.

zig ld should be the only cross-linker out there, and I'm considering migrating to zig, for zig ld's sake .

All programming languages that claim to be alternatives to C eventually become themselves, zig is good enough and different enough to not care about being an alternative to C!

I apologize for not being clear in my previous statements. As of now, Nature does not even have a version that is community-ready. In my opinion, talking about various ideas and innovations is meaningless and deceptive if the programming language itself cannot be used by the community.

Additionally, my design philosophy is also included in the GitHub README.

This is the first-phase goal for the Nature programming language, as outlined in the first section of the README on https://github.com/nature-lang/nature. To summarize:

- Type system, null safety, generics, and union types

- An in-house compiler/assembler/linker that is not reliant on LLVM and supports compilation for amd64, riscv64, and wasm architectures

- Non-intrusive interaction with C for efficient and high-performance development

- Progressive Garbage Collection, supporting both automatic and manual GC

- Built-in vec, map, set, and tup data structures

- Package and module management

- Function tags, closures, error prompts, runtime stack traces, and coroutines

- Integrated SSA, linear scan register allocation, reflection, and an assembler & linker

We anticipate that these key features will be completed around version 0.7.0, at which point a community-ready version will be released. By "community-ready," we mean that there will be stable and backward-compatible syntactic API support.

https://nature-lang.org/docs/prologue/release-notes Record the core features that have not yet been completed in the version release notes.

After the MVP (Minimum Viable Product) version of Nature is released, I plan to use it for game engine and game development. But that's probably not the answer you were looking for.

I have experience with many programming languages like PHP, Python, Golang, JS, C, Scheme, etc. Each of these languages has its shortcomings that bother me. Taking C as an example, it lacks package management and doesn't support generics. In contrast, Nature is designed to improve upon C by featuring generics, package management, and null safety, among other things.

Moreover, what drives me is simply the joy of the process.

Thank you for the heads-up! I'll be more careful with the details in the future. I am sorry about that, because all the current English documentation has been translated by GPT-4. It seems I wasn't fully prepared, but I'm still thrilled that someone shared the Nature project on Hacker News.

I'm the creator of the Nature programming language, and I'm incredibly thrilled to see my project featured on the front page of Hacker News. I've been developing this project in my spare time; initially, I focused on building the compiler back-end, which is something I'm deeply passionate about. That alone took me roughly 3 years of part-time effort. Only in the past year have I started to design and implement the front-end of the programming language.

I'm not one to give up halfway, and even though breaking into the programming language market is exceedingly difficult, I'm still committed to investing my enthusiasm and time into making this work.

The first goal for Nature right now is to reach a minimum viable product stage. The second goal is to "stand on the shoulders of giants"(go/rust). The third goal is to incorporate more innovative ideas and possibilities.

Even if Nature doesn't gain a user base, I will still use it to build interesting things.

This executable is actually a lightweight container based on cgroup + namespace.

Moreover, this tool is implemented in a new system-level programming language called Nature that is about to be released. I hope I can create meaningful and valuable tools with Nature. Thank you for your encouragement.