Skip to content

Commit bcc3953

Browse files
committed
Polish docs by Claude
1 parent c152f51 commit bcc3953

File tree

3 files changed

+46
-44
lines changed

3 files changed

+46
-44
lines changed

docs/guide/getting-started/introduction.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
# Introduction
22

3-
AIScript is a combination of interpreter programming language and web framework both written in Rust dedicated to help people build AI applications effortlessly. The language syntax learn from Python, JavaScript and Rust, combine its good parts and designed to be easy to learn and use.
3+
AIScript is a unique combination of interpreter programming language and web framework, both written in Rust, designed to help developers build AI applications effortlessly. The language syntax draws inspiration from Python, JavaScript, and Rust, combining their strengths to create something that's intuitive, powerful, and easy to use.
44

55
:::warning
6-
`AIScript` is in early development, please do not use it in production yet.
6+
`AIScript` is in early development. Please do not use it in production yet.
77
:::
88

99
## Programming Language
1010

11-
As a programming language, AIScript write it interpreter from scratch.
11+
As a programming language, AIScript is built with a custom interpreter from the ground up:
1212

13-
- Function is the first class citizen and object oriented programming paradigm
14-
- Builtin AI primitive, including prompt, ai function, and agent
15-
- Dynamic typing with limited static type checking
16-
- Buitlin data validation like Python's [Pydantic](https://docs.pydantic.dev/latest/)
17-
- Simple and elegant error handling, inspired from Rust, Golang and Zig
18-
- Rich standard library backed by Rust's standard library and ecosystems underneath
19-
- Garbage collection
13+
- Functions are first-class citizens with support for object-oriented programming paradigms
14+
- Built-in AI primitives, including prompt, AI functions, and agent capabilities
15+
- Dynamic typing system with targeted static type checking for improved safety
16+
- Built-in data validation similar to Python's [Pydantic](https://docs.pydantic.dev/latest/)
17+
- Simple yet powerful error handling, inspired by Rust, Go, and Zig
18+
- Rich standard library leveraging Rust's ecosystem underneath
19+
- Automatic garbage collection for memory management
2020

2121
## Web Framework
2222

23-
- Elegant and intuitive route DSL
24-
- Auto params validation
25-
- Auto generate OpenAPI schema and docs
26-
- Backed by Rust's best practices, use [axum](https://github.com/tokio-rs/axum) and [sqlx](https://github.com/launchbadge/sqlx) underneath,
27-
- Rust's axum performance but with Python's flask-like syntax
28-
- Buitlin database modules ([`std.db.pg`](/std/db/pg) and [`std.db.redis`](/std/db/redis))
29-
- Buitlin auth and social login
30-
- Battery-included features with simple configuration to enable them
23+
AIScript isn't just a language—it's a complete web development solution:
24+
25+
- Elegant and intuitive route DSL for defining endpoints
26+
- Automatic parameter validation with clear error messages
27+
- Automatic OpenAPI schema and documentation generation
28+
- Built on Rust's best practices, using [axum](https://github.com/tokio-rs/axum) and [sqlx](https://github.com/launchbadge/sqlx) under the hood
29+
- Combines Rust's axum performance with Python's Flask-like simplicity
30+
- Built-in database modules ([`std.db.pg`](/std/db/pg) and [`std.db.redis`](/std/db/redis))
31+
- Built-in authentication and social login capabilities
32+
- Battery-included features easily enabled through simple configuration
3133

3234
## How AIScript works
3335

@@ -74,6 +76,6 @@ $ curl http://localhost:8000?question=What is the capital of France?
7476
}
7577
```
7678

77-
You can open [http://localhost:8080/redoc](http://localhost:8080/redoc) to see the API docs.
79+
You can open [http://localhost:8080/redoc](http://localhost:8080/redoc) to see the automatically generated API documentation.
7880

7981
![](/guide/open-api.png)

docs/guide/getting-started/why-aiscript.mdx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ import { Tab, Tabs } from "rspress/theme";
22

33
# Why AIScript
44

5-
AIScript is my experimental project to explore a new way to build web application in AI era. It isn't an oh-another-language built by a guy who just want to learn how to write an interpreter. My ambient is bigger than that.
5+
AIScript is an experimental project exploring a new approach to building web applications in the AI era. This isn't just another language created by someone learning interpreter design—my ambition is much greater.
66

7-
Not matter what language you use to build web API, you need a web framework. These web framework essentially does the same thing. They all parse HTTP requests, execute SQL queries, and response the result with JSON or render HTML templates. Some framework can do more, validating request params, generate OpenAPI spec, etc. However, different framworks from different languages have totally different develope experience to build an web app. When you switch from one to another, you can't escape to learn the syntax and docs again. That why I want to adopt an brand-new intuitive apporach combine language with web framework to bring the modern experience to build web apps.
7+
Regardless of which language you use to build web APIs, you need a web framework. These frameworks essentially perform the same functions: parsing HTTP requests, executing database queries, and returning results as JSON or rendered HTML. Some frameworks offer additional features like request validation or OpenAPI spec generation. However, frameworks across different languages provide vastly different development experiences. Switching between them inevitably requires learning new syntax and documentation. That's why I wanted to create an intuitive approach that combines language with web framework to deliver a modern experience for building web applications.
88

9-
## Intuitive first
9+
![](/guide/web-framework.png)
1010

11-
What I want is write a code like this to run a web API with single command, no need to learn a new web framework, no need to struggle choose which framework to use, no need to install the dependencies to run. Just run `aiscript serve`.
11+
## Intuitive First
12+
13+
My vision is to write code that runs a web API with a single command—no need to learn a new framework, struggle with choosing which one to use, or install dependencies to run it. Just execute `aiscript serve` and you're up and running.
1214

1315
<Tabs>
1416
<Tab label="route.ai">
@@ -45,11 +47,11 @@ $ curl -X GET http://localhost:8080/guess?n=999
4547
</Tab>
4648
</Tabs>
4749

48-
Here are just a small poart of cool ideas come to my brain. I always seek for it if someone already built it. But I cannot find one, so I decided to build one.
50+
This is just a small part of the ideas that have come to mind. I've searched to see if someone has already built something similar, but finding nothing, I decided to build it myself.
4951

50-
## Out-of-box first
52+
## Out-of-box First
5153

52-
When build a web app, almost the rest besides the core business logic is the same. How can I support JWT authentication? How to integrate Google or GitHub login? How to query database or validate data? For those reraly changed standard, I wish it built into the language or framework, give me an out-of-box experience.
54+
When building a web app, most components beyond the core business logic are standard across projects. How do you implement JWT authentication? How do you integrate Google or GitHub login? How do you query databases or validate data? For these rarely changing standards, I believe they should be built directly into the language or framework, providing an out-of-box experience.
5355

5456
<Tabs>
5557
<Tab label="jwt_auth.ai">
@@ -146,17 +148,15 @@ scopes = ["email"]
146148
</Tab>
147149
</Tabs>
148150

149-
## AI first
150-
151-
People we'll ask:
151+
## AI First
152152

153-
:::info
154-
"Do we really need a new programming language in the age AI can write code for us?".
153+
:::info People often ask
154+
"Do we really need a new programming language in an age when AI can write code for us?".
155155
:::
156156

157-
In my own opionion, I think yes, at least for web application.
157+
In my opinion, for web applications at least, the answer is yes.
158158

159-
In the one hand, most of mainstream language designed two-decades ago, `prompt`, `agent` isn't a primitive features in the language, it is in AIScript. Your don't need to install a package to call LLM API or orchestrate multiple agents.
159+
Most mainstream languages were designed decades ago—features like `prompt` and `agent` aren't primitives in these languages, but they are in AIScript. You don't need to install packages to call LLM APIs or orchestrate multiple agents.
160160

161161
<Tabs>
162162
<Tab label="prompt.ai">
@@ -201,32 +201,32 @@ api_key = "YOUR_API_KEY"
201201
</Tab>
202202
</Tabs>
203203

204-
In the other hands, many features is out-of-box and batter-included in the standard library. It's helpful for AI code generation.
204+
Additionally, AIScript includes many out-of-box features in its standard library, which is particularly helpful for AI code generation.
205205

206-
:::info Thought on AI code generation era
206+
:::info Thoughts on the AI Code Generation Era
207207

208-
#### Building web app is not that easy
208+
#### Building Web Apps Is Not That Easy
209209

210-
- Solid coding experience is required, from programming languages to web frameworks and libraries. You need a lot of hands-on experience to build software with confidence.
210+
- Solid coding experience is still required, from programming languages to web frameworks and libraries. You need substantial hands-on experience to build software with confidence.
211211

212-
- Even though AI code generation is pretty helpful, you still need expertise in coding if you're not going to build a toy project.
212+
- Even with AI code generation, you still need expertise if you're building anything beyond a toy project.
213213

214-
- Finishing the code is just the beginning; deploying, observability, security, there are a bunch of things waiting for you. AI is not that helpful for these right now.
214+
- Finishing the code is just the beginning; deployment, observability, and security present additional challenges that current AI tools don't fully address.
215215

216216
#### Code Generation: Just the Tip of the Iceberg
217217

218-
- For any serious piece of software that makes it to production, 80% or more of the cost is in the phase after initial development. That's the phase called Day-2 operations.
218+
- For any serious production software, 80% or more of the cost comes after initial development—in what's called "Day-2 operations."
219219

220220
- Day-2 operations present the biggest challenges.
221221

222-
- Can Cursor and WindSurf solve the deployment problem, make the whole Day-2 easy and effortless? No, I don't think so, neither can Devin.
222+
- Tools like Cursor, WindSurf, or even Devin can't fully solve deployment problems or make Day-2 operations effortless.
223223

224224
:::
225225

226226

227-
## Best practice first
227+
## Best Practice First
228228

229-
I hope I don't need to learn serveral methods to compare and figure out which one is the best practice. What I hope I only need one solution which is the best practice, free myself from such a choose struggeling.
229+
Developers shouldn't need to learn several approaches to the same problem just to determine which is best. Ideally, there should be one solution representing best practices, freeing you from decision paralysis.
230230

231-
AIScript choose Rust's best practice of web developement, and encapsulate those best practices into the language and framework.
231+
AIScript adopts Rust's web development best practices and encapsulates them directly into the language and framework, letting you focus on what matters most—your application's unique value.
232232

docs/public/guide/web-framework.png

258 KB
Loading

0 commit comments

Comments
 (0)