I

I built a programming language, inspired by Golang

Hacker News

I built a programming language, inspired by Golang

Hello, I'm the author of the nature programming language, which has reached an early usable version since its first commit in 2021 until today. --- Why implement such a programming language? go is a programming language that I use for my daily work, and the first time I used golang, I was amazed by its simple syntax, freedom of programming ideas, ease of cross-compilation and deployment, excellent and high-performance runtime implementations, and advanced concurrency style design based on goroutine, etc. But, golang also has some inconveniences - The syntax is too concise, resulting in a lack of expressive power. - The type system is not perfect - Cumbersome error handling - The automatic GC and preemptive scheduling design is excellent, but it also limits the scope of go. - Package management - interface{} - ... nature is designed to be a continuation and improvement of the go programming language, and to pursue certain differences. While improving the above problems, nature has a runtime, a GMP model, an allocator, a collector, a coroutine, a channel, a std, and so on, which are similar to those of go, but more concise. And nature also does not rely on llvm, with efficient compilation speed, easy cross-compilation and deployment. Based on the features already implemented in the nature programming language, it is suitable for game engines and game development, scientific computing and AI, operating systems and the Internet of Things, the command line, and web development. When nature is fully featured and optimized, it is expected that nature will be able to replace golang in any scenario (converting to readable golang code, using nature with minimal trial-and-error costs, and switching back to golang at any time). And as a general-purpose programming language, nature can compete with any other programming language of its type. [Note that this is not yet complete.] --- I know, it's a little late, I spent too much time, just to bring another programming language, after all, the world is not short of programming languages. But when I really think about questions like "Should I continue? Can I do it well?", I realized I had already come a very, very long way. --- Feel free to give me feedback, I'll answer any questions you may have. Website: https://nature-lang.org The home page contains some examples of syntax features that you can try out in the playground. Get started: https://nature-lang.org/docs/get-started contains a tutorial on how to install the program and advice on how to use it. Syntax documentation: https://nature-lang.org/docs/syntax Playground: https://nature-lang.org/playground Try it online --- Contribution Guide https://nature-lang.org/docs/contribute I have documented how the nature programming language is implemented. nature has a proprietary compiler backend like golang, but the structure and implementation of the nature source code is very simple. This makes it easy and fun to contribute to the nature programming language. Instead of just a compiler frontend + llvm, you can participate in SSA, SIMD, register allocation, assembler, linker, and other fun tasks to validate your learning and ideas. You can express your ideas through github issues and I'll guide you through the contribution process. --- These are some of the smaller projects I've implemented with nature, and I really like the feel of writing code with nature. https://github.com/weiwenhao/parker Lightweight packaging tool https://github.com/weiwenhao/llama.n Llama2 nature language implementation https://github.com/weiwenhao/tetris Tetris implementation based on raylib, macos only https://github.com/weiwenhao/playground playground server api implementation --- Lastly, I'm looking for a job, so if you think this project is okay, I hope you'll give me a star, it would help me a lot

Share card

Actual performance

7points
2comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: started · Missing: supports, reddit linkedin, podcasting
98%98% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: llama, ide, game engine · Missing: https docs, excited, just released
72%72% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: mac, macos, model · Missing: agents, agent, cursor
70%70% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface, efficient · Missing: plus, platform, intuitive
47%47% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
36%36% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

A
A new programming language inspired by Go, no LLVM67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A new programming language inspired by Go, no LLVM

Hacker News82
Bu
Built a Hindi inspired programming language71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Built a Hindi inspired programming language

Hacker News4
Go
Goto: A dynamically typed interpreted programming language built in go61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Goto: A dynamically typed interpreted programming language built in go

Hacker News1
An
Anansi – a NoWeb-inspired literate programming preprocessor62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Anansi – a NoWeb-inspired literate programming preprocessor

Hacker News57
Ar
Arturo – REBOL-inspired programming language and VM written in Nim74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Arturo – REBOL-inspired programming language and VM written in Nim

Hacker News324
I
I built an online programming language69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I built an online programming language

Hacker News67
I
I built an online programming language.69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I built an online programming language.

Hacker News5
I
I built an online programming language69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I built an online programming language

Hacker News8
An
An Easy Programming Language – Built with WebAssembly80%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An Easy Programming Language – Built with WebAssembly

Hacker News144
Me
Memkash - My Programming Inspired Trance Music60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Memkash - My Programming Inspired Trance Music

Hacker News1