[CSDN Editor's Note] Looking at the rankings of major programming languages, it is almost difficult to see domestic programming languages. With the development and catching up of my country's basic software and hardware, especially in the accumulation of operating systems, databases and other technical fields, we have gradually I have seen the birth of some domestic programming languages, such as the Ao language initiated by a group of Go language enthusiasts. It was prepared in 2018 and then officially open sourced in July this year. What is the story behind it? What progress has been made 3 months after it was open sourced? What about improvement and enhancement?
Editor | Meng Yidan
Produced | Official contribution from Ao Language technical team
A quarter has passed since Ao Language was officially open sourced. This is an informal summary of the first quarter of Ao Language being open sourced, as well as plans and prospects for the future.
What is concave language
The concave language (concave pronunciation "wā") is a general programming language designed by Gopher in China for the WASM platform. As the native programming language of WASM, the concave language is naturally friendly to the browser environment and supports mainstream operating systems such as Linux, macOS and Windows. In addition, it provides support for local applications and microcontroller environments through the LLVM backend.
Official website: https://wa-lang.org/
Warehouse: https://github.com/wa-lang/wa/
Play:https://wa-lang.org/playground/
Below is the Logo of Concave Language:
From the shape point of view, the shape of "concave" is similar to the WASM icon (there is a gap in the upper part of the square); from the pronunciation point of view, "concave" is exactly the first half of WASM; from the structure point of view, the solid "concave" character is approximately equal to the letter " C" is rotated 90 degrees counterclockwise - C can be understood as C language or Coder, then "concave" can also imply C lying flat/Coder lying flat...
sponsor
The initiators of this project, Chai Shushan, Ding Ernan, and Shi Bin, are all senior Gophers in China. Among them, Chai Shushan is the author of several Go best-selling books such as "Advanced Programming in Go Language". He is currently engaged in the design and development of KusionStack and KCL language at Ant. Ding Ernan is the author of several WASM monographs such as "Introduction to WebAssembly Standards". He has been engaged in 3D development for many years and is keen on performance optimization. He is currently in charge of 3D-related product development at Aerospace Vision Technology Co., Ltd. Shi Bin is an expert in the field of compilers. He has submitted 127 optimization patches for the Go compiler. He has been among the top 50 global contributors in Go for a long time. He also has submission permissions for the official Git repositories of Go and LLVM. He is also the author of "Go Language" Author of the Customization Guide book.
In development practice, the idea of developing a new language came up for different reasons. The restrained style of Go language is our biggest common denominator for the aesthetics of programming languages, so we chose it as the initial blueprint. Needless to say: when this project started, it drew heavily on Go’s design ideas and specific implementations - this was a compromise that had to be made with limited investment. We hope that as the project develops, we will accumulate more original designs and provide the basis for independent innovation. The tide contributes a little.
The design philosophy and development plan of concave language
The overall design of the concave language is centered around "developer-friendliness". Strings/slices as basic types, no need (and inability) to manually manage memory, more visually noticeable variable type definitions, etc. are all embodiments of this core idea.
In July 2022, Ao Language was officially open sourced and announced its semi-annual roadmap:
With the publicity of the project, more students have joined the concave language development group, and the discussion group community has gradually formed and remained active. Thanks to the collaborative efforts of the students in the development team, all the goals for the first quarter were achieved!
what progress has been made
First of all, after many discussions, the development team carefully decided to adopt the AGPLv3 open source agreement for Ao Language and formulated a corresponding Ao Language contribution agreement. Currently, external students have contributed code through the new process. In addition, the following major advances have been made:
Release third version of website
Since 2018, the website has undergone three major updates. Initially, the first version of the website had only one static page (2018). The second version was built based on MDBook when it was first open sourced (July 2022). The latest version was developed from September 2022 to officially launched at the end of October.
This version of the website was developed by Hu Mengming, the sub-project leader, who is also the person in charge of the Ao language VSCode plug-in and Playground.
Publish the Playground of the pure browser environment
Playground is an environment for online compilation and execution of concave source code. The compilation and execution of this environment does not call back-end services and runs entirely on the page; it is a very convenient entrance to experience and test the concave language.
Playground address: https://wa-lang.org/playground/
Create highlight plugins such as VSCode/Fleet/Vim
The VSCode plug-in provides functions such as syntax highlighting, code snippet completion, and completion suggestions, and supports installation in a pure Web environment:
In September, JetBrains Fleet released a preview version, and Ao Language immediately developed a highlight plug-in:
Of course, traditional Vim plugins are also indispensable:
We hope that community students will participate in the co-construction of more plug-ins and improved functions.
WASM backend prototype released as scheduled
The WASM backend prototype was released as scheduled and already supports common features such as numerical/string basic types, structures, methods, arrays, and slices. The project team began to develop web games with interactive functions such as Snake based on this.
Can be tested with:
`go install github.com/wa-lang/wa@latest`
`wa init -name=_examples/hi`
`wa run _examples/hi`
Or create a `hello.wa` file containing the following code
fn main {
println("你好,凹语言!")
println(add(40, 2))
}
fn add(a: i32, b: i32) => i32 {
return a+b
}
Run and output the results:
$ go run main.go hello.wa
你好,凹语言!
42
The program will be compiled and executed based on the WAT backend by default. Seeing the above output means everything is normal!
As an embedded Go program script
The concave language can also be imported as a Go language package and then executed as a script:
package main
import (
"fmt"
"github.com/wa-lang/wa/api"
)
func main() {
output, err := api.RunCode("hello.wa", "fn main() { println(40+2) }")
fmt.Print(string(output), err)
}
LLVM backend starts early
The LLVM backend, originally scheduled to be launched after the Spring Festival in 2023, has been launched ahead of schedule. The main battlefield of the LLVM backend is in the local and embedded environment. The following is the effect of translating the concave program to LLVM-IR:
The implementation of the prime number example is currently supported:
Update roadmap
Outlook
Currently, Ao Language is a side project built by enthusiasts and has no KPIs set. The amount of work required for a new language to be truly practical is extremely huge. We sincerely hope that more interested students can participate in the co-construction, especially taking on the responsibilities of sub-project leaders.
Compared with ordinary contributors, sub-project leaders can directly participate in decision-making and gain unlimited say in project development. Since it is still in its infancy, modules that can become separate sub-projects are everywhere: a set of heap management functions, a package from wat to binary wasm, an interface for interacting with other languages...
You need to be famous early, and you need to participate in open source early. You are welcome to participate in co-construction.
— Recommended reading —
☞中国联通与腾讯共同设立新公司;苹果被曝已冻结招聘,直至2023年9月;Apache Flink 1.16发布|极客头条
☞元宇宙与AI热度不减,Gartner 2023 年十大战略技术趋势完整解析
☞吴峰光杀进 Linux 内核