Skip to content

Commit 6a8d3f0

Browse files
committed
initial commit
0 parents  commit 6a8d3f0

36 files changed

Lines changed: 86910 additions & 0 deletions

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Node.js dependencies & logs
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Bun
11+
bun.lockb
12+
13+
# Next.js build output
14+
.next/
15+
out/
16+
.turbo/
17+
18+
# Testing & coverage
19+
coverage/
20+
.nyc_output/
21+
22+
# TypeScript
23+
*.tsbuildinfo
24+
25+
# IDE/editor files
26+
.idea/
27+
.vscode/
28+
*.swp
29+
*.swo
30+
*~
31+
32+
# Env files
33+
.env
34+
.env.local
35+
.env.*.local
36+
37+
# Misc
38+
dist/
39+
tmp/
40+
temp/
41+
42+
/lib/
43+
.bsb.lock

.source/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// @ts-nocheck -- skip type checking
2+
import * as docs_1 from "../content/docs/test.mdx?collection=docs&hash=1760316941584"
3+
import * as docs_0 from "../content/docs/index.mdx?collection=docs&hash=1760316941584"
4+
import { _runtime } from "fumadocs-mdx/runtime/next"
5+
import * as _source from "../source.config"
6+
export const docs = _runtime.docs<typeof _source.docs>([{ info: {"path":"index.mdx","fullPath":"content/docs/index.mdx"}, data: docs_0 }, { info: {"path":"test.mdx","fullPath":"content/docs/test.mdx"}, data: docs_1 }], [])

.source/source.config.mjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// source.config.ts
2+
import {
3+
defineConfig,
4+
defineDocs,
5+
frontmatterSchema,
6+
metaSchema
7+
} from "fumadocs-mdx/config";
8+
var docs = defineDocs({
9+
docs: {
10+
schema: frontmatterSchema,
11+
postprocess: {
12+
includeProcessedMarkdown: true
13+
}
14+
},
15+
meta: {
16+
schema: metaSchema
17+
}
18+
});
19+
var source_config_default = defineConfig({
20+
mdxOptions: {
21+
// MDX options
22+
}
23+
});
24+
export {
25+
source_config_default as default,
26+
docs
27+
};

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# betterscript-docs
2+
3+
This is a Next.js application generated with
4+
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
5+
6+
Run development server:
7+
8+
```bash
9+
npm run dev
10+
# or
11+
pnpm dev
12+
# or
13+
yarn dev
14+
```
15+
16+
Open http://localhost:3000 with your browser to see the result.
17+
18+
## Explore
19+
20+
In the project, you can see:
21+
22+
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
23+
- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
24+
25+
| Route | Description |
26+
| ------------------------- | ------------------------------------------------------ |
27+
| `app/(home)` | The route group for your landing page and other pages. |
28+
| `app/docs` | The documentation layout and pages. |
29+
| `app/api/search/route.ts` | The Route Handler for search. |
30+
31+
### Fumadocs MDX
32+
33+
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
34+
35+
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
36+
37+
## Learn More
38+
39+
To learn more about Next.js and Fumadocs, take a look at the following
40+
resources:
41+
42+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
43+
features and API.
44+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
45+
- [Fumadocs](https://fumadocs.dev) - learn about Fumadocs

bun.lock

Lines changed: 767 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

content/concept.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# BetterScript
2+
3+
A new programming language that is native for LLMs.
4+
This repository contains a proof-of-concept reference and examples of the language.
5+
6+
## Goal
7+
1. MUST Include as much as best practices from the CS field as possible.
8+
2. SHALL Be easy to learn and use for LLMs. Don't optimize for humans, optimize for LLMs.
9+
3. CAN optimize for token usage, but determinism and quality has priority, so verbosity is ok if needed.
10+
4. MUST be able to run on any platform, so compiling to JavaScript and/or TypeScript is a must.
11+
5. CAN use ReScript as starting point and even use/modify its compiler, so we can include all its features.
12+
6. SHALL be able to use along React and Svelte too.
13+
7. MUST include a standard library that includes concepts from the best practices and libraries (Think of Effect, Immer, etc)
14+
8. SHALL include all the tooling, linting, pre-commit hooks.
15+
9. CAN use Biome as starting point for linting, or just the ReScript.
16+
10. SHALL embrace parallel programming and concurrency at any level, including agents.
17+
11. CAN use all the best recent modern practices:
18+
12. EXAMPLE: Use Jujutsu workspaces for developing features in parallel, and assing feature flags for each part of the code.
19+
13. MUST have all the features shall be native to this language, lets use as most concise, terse and beautiful syntax as we can.
20+
14. CAN have the flow: Idea -> Design -> Generate signatures -> Create workspace -> Create granular feature flags -> Implement in parallel -> Test in parallel -> Deploy in parallel
21+
22+
23+
## Some features to expect
24+
Intents based programming
25+
Signatures like DSPy
26+
Verbosity
27+
Contracts
28+
Purity
29+
Proof
30+
Test-Driven Development
31+
Spec-Driven Development
32+
Dependency Injection
33+
State Machines
34+
Determinism
35+
Pre-Commit Hooks
36+
100% Code Coverage
37+
Build Speed
38+
Errors with Suggestions
39+
Embeded Open Telemetry

content/docs/index.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Hello World
3+
description: Your first document
4+
---
5+
6+
Welcome to the docs! You can start writing documents in `/content/docs`.
7+
8+
## What is Next?
9+
10+
<Cards>
11+
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
12+
<Card title="Learn more about Fumadocs" href="https://fumadocs.dev" />
13+
</Cards>

content/docs/test.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Components
3+
description: Components
4+
---
5+
6+
## Code Block
7+
8+
```js
9+
console.log('Hello World');
10+
```
11+
12+
## Cards
13+
14+
<Cards>
15+
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
16+
<Card title="Learn more about Fumadocs" href="https://fumadocs.dev" />
17+
</Cards>

0 commit comments

Comments
 (0)