EkBass commited on
Commit
f753e5a
·
verified ·
1 Parent(s): c18531e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +175 -3
README.md CHANGED
@@ -1,3 +1,175 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ language:
7
+ - en
8
+ license: mit
9
+ multilinguality:
10
+ - monolingual
11
+ pretty_name: BazzBasic Language Reference
12
+ size_categories:
13
+ - n<1K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-generation
18
+ - question-answering
19
+ task_ids:
20
+ - language-modeling
21
+ - closed-domain-qa
22
+ tags:
23
+ - basic
24
+ - programming-language
25
+ - interpreter
26
+ - sdl2
27
+ - game-development
28
+ - bazzbasic
29
+ - code
30
+ - language-reference
31
+ ---
32
+
33
+ # Dataset Card — BazzBasic Language Reference
34
+
35
+ ## Dataset Summary
36
+
37
+ This dataset contains the official language reference and AI guide for **BazzBasic**, a modern BASIC interpreter built on .NET 10 with SDL2 graphics and SDL2_mixer audio support. The guide is intended to enable AI models to accurately understand, explain, and generate valid BazzBasic code.
38
+
39
+ BazzBasic is an original BASIC dialect — not a clone of any existing implementation. It aims to make programming accessible and enjoyable while providing modern capabilities such as sprite rendering, sound playback, HTTP networking, fast trigonometry lookup tables, and standalone executable compilation.
40
+
41
+ - **Version covered:** BazzBasic 1.0 (released February 22, 2026)
42
+ - **Author:** Kristian Virtanen (krisu.virtanen@gmail.com)
43
+ - **License:** MIT
44
+ - **Platform:** Windows x64 primary; Linux/macOS possible with effort
45
+ - **Homepage:** https://ekbass.github.io/BazzBasic/
46
+ - **GitHub:** https://github.com/EkBass/BazzBasic
47
+ - **Manual:** https://ekbass.github.io/BazzBasic/manual/#/
48
+
49
+ ---
50
+
51
+ ## Intended Use
52
+
53
+ This dataset is designed for:
54
+
55
+ - **AI training and fine-tuning** — teaching models to understand and generate BazzBasic syntax correctly
56
+ - **RAG (Retrieval-Augmented Generation)** — providing accurate language reference at inference time
57
+ - **AI assistant context** — enabling assistants to guide new programmers through BazzBasic or generate working code on request
58
+
59
+ ### Out-of-scope use
60
+
61
+ This reference is specific to BazzBasic 1.0. It should not be used to represent other BASIC dialects (QBasic, FreeBASIC, Liberty BASIC, etc.), as BazzBasic has its own distinct syntax and conventions.
62
+
63
+ ---
64
+
65
+ ## Dataset Structure
66
+
67
+ The dataset consists of a single comprehensive Markdown document covering the full BazzBasic language. Major sections:
68
+
69
+ | Section | Content |
70
+ |---------|---------|
71
+ | Syntax Fundamentals | Variables (`$` suffix), constants (`#` suffix), scope, operators |
72
+ | Arrays | Dynamic arrays, associative arrays, multi-dimensional, mixed indexing |
73
+ | Control Flow | IF/ELSEIF/ENDIF, FOR/NEXT, WHILE/WEND, GOTO, GOSUB, labels |
74
+ | User-Defined Functions | DEF FN, isolated scope, recursion, libraries (.bb) |
75
+ | I/O Commands | PRINT, INPUT, LINE INPUT, INKEY, KEYDOWN, LOCATE, COLOR |
76
+ | Math Functions | ABS, SIN, COS, TAN, LERP, CLAMP, DISTANCE, MOD, POW, and more |
77
+ | Math Constants | PI, HPI, QPI, TAU, EULER |
78
+ | Fast Trigonometry | FastTrig lookup tables (~20x faster than SIN/COS), 1° precision |
79
+ | String Functions | MID, LEFT, RIGHT, SPLIT, REPLACE, INSTR, and more |
80
+ | File I/O | FileRead, FileWrite, FileExists, FileDelete, FileList |
81
+ | Network | HTTPGET, HTTPPOST |
82
+ | Sound | LOADSOUND, SOUNDONCE, SOUNDREPEAT, SOUNDSTOP, SOUNDSTOPALL |
83
+ | Graphics | SCREEN, SCREENLOCK, LINE, CIRCLE, PSET, PAINT, RGB |
84
+ | Sprite System | LOADSHAPE, LOADIMAGE, LOADSHEET, MOVESHAPE, ROTATESHAPE, DRAWSHAPE |
85
+ | Mouse Input | MOUSEX, MOUSEY, MOUSEB |
86
+ | Built-in Constants | Full key constant tables (arrows, function keys, numpad, alphabet, etc.) |
87
+ | Source Control | INCLUDE, compiled libraries (.bb) |
88
+ | Common Patterns | Game loop, HTTP, save/load, sound with graphics |
89
+ | Code Style | Naming conventions, program structure, subroutine indentation |
90
+
91
+ ---
92
+
93
+ ## Key Language Characteristics
94
+
95
+ An AI model should understand these BazzBasic-specific rules to generate correct code:
96
+
97
+ **Variable and constant suffixes**
98
+ - `$` suffix = mutable variable (numbers or strings, typeless)
99
+ - `#` suffix = immutable constant
100
+ - Arrays declared with `DIM`, accessed with `arr$(index)`
101
+
102
+ **LET usage**
103
+ - `LET` declares a variable; use only once per variable
104
+ - Subsequent assignments use bare `var$ = value` syntax (no LET)
105
+ - Declaring all variables upfront in an `[inits]` subroutine is best practice
106
+
107
+ **Scope**
108
+ - Main program has a single flat scope
109
+ - `DEF FN` functions have completely isolated scope — no access to global variables, only global constants (`#`)
110
+
111
+ **Graphics**
112
+ - Always use `SCREENLOCK ON / SCREENLOCK OFF` for flicker-free animation
113
+ - `LINE (x1,y1)-(x2,y2), color, BF` (filled box) is faster than `CLS` for clearing
114
+ - Sprites are positioned by their **top-left point**
115
+ - `SCREENLOCK` blocks `GETCONSOLE` — use array-based collision detection instead
116
+
117
+ **FastTrig**
118
+ - `FastTrig(TRUE)` enables degree-based lookup tables for sin/cos
119
+ - Use `FastCos(angle)` / `FastSin(angle)` — angles in degrees, auto-normalized 0–359
120
+ - ~20x faster than `SIN`/`COS` — essential for raycasting, particle systems, etc.
121
+
122
+ **Naming conventions**
123
+ - Variables: `camelCase$`
124
+ - Constants: `UPPER_SNAKE_CASE#`
125
+ - Arrays: `camelCase$`
126
+ - Functions: `PascalCase$` (called with `FN` prefix)
127
+ - Subroutine labels: `[sub:name]`
128
+
129
+ ---
130
+
131
+ ## Example Programs
132
+
133
+ Real BazzBasic programs available at the official repository:
134
+
135
+ | Program | Description | URL |
136
+ |---------|-------------|-----|
137
+ | raycaster_3d_optimized | 3D raycaster using FastTrig | https://raw.githubusercontent.com/EkBass/BazzBasic/refs/heads/main/Examples/raycaster_3d_optimized.bas |
138
+ | voxel_terrain | Voxel space terrain renderer | https://raw.githubusercontent.com/EkBass/BazzBasic/refs/heads/main/Examples/voxel_terrain.bas |
139
+ | countdown_demo | Sprite sheet loading demo | https://github.com/EkBass/BazzBasic/blob/main/Examples/countdown_demo.bas |
140
+ | Eliza | Classic AI chatbot port | https://github.com/EkBass/BazzBasic/blob/main/Examples/Eliza.bas |
141
+
142
+ More examples: https://github.com/EkBass/BazzBasic/tree/main/Examples
143
+
144
+ ---
145
+
146
+ ## Data Collection
147
+
148
+ The reference document was authored directly by the BazzBasic interpreter developer, Kristian Virtanen. It represents authoritative, hand-written documentation of the language — not scraped or machine-generated content.
149
+
150
+ ---
151
+
152
+ ## Community and Support
153
+
154
+ | Channel | URL |
155
+ |---------|-----|
156
+ | GitHub Discussions | https://github.com/EkBass/BazzBasic/discussions |
157
+ | Discord | https://discord.com/channels/682603735515529216/1464283741919907932 |
158
+ | ThinBasic subforum | https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic |
159
+
160
+ ---
161
+
162
+ ## Citation
163
+
164
+ If you use this dataset, please credit:
165
+
166
+ ```
167
+ Kristian Virtanen, "BazzBasic Language Reference", 2026.
168
+ https://github.com/EkBass/BazzBasic
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Dataset Card Authors
174
+
175
+ Kristian Virtanen (krisu.virtanen@gmail.com)