Skip to content

Commit 40d90b0

Browse files
author
Tanmoy
committed
Release v1.0.4.3 - Cinema Edition update with 3D Animation Studio support
1 parent 5f0667d commit 40d90b0

32 files changed

Lines changed: 2131 additions & 149 deletions

README.md

Lines changed: 359 additions & 70 deletions
Large diffs are not rendered by default.

TechScript_v1.0.4.2_Setup.exe

668 KB
Binary file not shown.

TechScript_v1.0.4_Setup.exe

664 KB
Binary file not shown.

assets/demo.webp

11 MB
Loading

bin/techscriptv1.0.2.exe

-1000 KB
Binary file not shown.

bin/techscriptv1.0.4.exe

1.08 MB
Binary file not shown.

bin/techscriptv2.0.0.exe

1.09 MB
Binary file not shown.

docs/QUICKSTART.md

Lines changed: 30 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TechScript v2 — Quick Start Guide
1+
# TechScript v1.0.3 — Quick Start Guide
22

33
> **You don't need to be a programmer to use TechScript.**
44
> Just follow the steps below for your operating system!
@@ -13,106 +13,59 @@
1313
4. Open **PowerShell** or **Command Prompt** and type:
1414

1515
```
16-
tech run examples/hello.txs
16+
tech version
1717
```
1818

19-
5. Done! Your first TechScript program just ran. 🎉
20-
21-
---
22-
23-
## 🍎 macOS — Terminal Install
24-
25-
Open **Terminal** and paste this one command:
26-
27-
```bash
28-
curl -fsSL https://raw.githubusercontent.com/your-org/techscript/main/scripts/install.sh | bash
29-
```
30-
31-
After install, test it:
32-
```bash
33-
tech run examples/hello.txs
34-
```
35-
36-
---
37-
38-
## 🐧 Linux — Terminal Install
39-
40-
Open a terminal and paste:
41-
42-
```bash
43-
curl -fsSL https://raw.githubusercontent.com/your-org/techscript/main/scripts/install.sh | bash
44-
```
45-
46-
Or if you have `pip`:
47-
```bash
48-
pip install techscript
49-
```
50-
51-
Then:
52-
```bash
53-
tech run examples/hello.txs
54-
```
19+
You should see: `TechScript v1.0.3` 🎉
5520

5621
---
5722

5823
## 📱 Android (Termux)
5924

25+
See the detailed [Termux Guide](TERMUX.md) or just run:
6026
```bash
61-
pkg install python
62-
pip install techscript
63-
tech run examples/hello.txs
27+
pkg install python -y && pip install techscript
28+
tech version
6429
```
6530

6631
---
6732

68-
## 🖊️ Writing Your First Program
33+
## 🚀 New in v1.0.3 — 150+ Functions
6934

70-
Create a file called `hello.txs` and write:
71-
72-
```
73-
say "Hello, World!"
74-
say "I am learning TechScript!"
75-
```
35+
Your language just got a massive upgrade! You can now use professional tools out of the box:
7636

77-
Run it with:
78-
```
79-
tech run hello.txs
80-
```
37+
- `crypto.sha256("hello")` — Generate secure hashes
38+
- `math.sin(x)`, `math.factorial(n)` — Advanced math
39+
- `json.encode(my_list)`, `json.decode(str)` — Handle data
40+
- `fs.read("file.txt")`, `fs.write("file.txt", "hi")` — File management
41+
- `date.now`, `os.name`, `random.uuid` — And much more!
8142

8243
---
8344

84-
## 🌐 Building a Website
45+
## ⚡ Execution Modes
8546

47+
### 1. Run a File
48+
Create `hello.txs`:
8649
```
87-
use web
88-
89-
make page = WebPage("My First Website")
90-
91-
page.style("body", { "background": "#111", "color": "white", "font-family": "sans-serif" })
92-
93-
page.body([
94-
page.h1("Welcome to My Website"),
95-
page.p("Built 100% in TechScript — no HTML or CSS needed!")
96-
])
97-
98-
page.run()
50+
say "Hello, World!"
9951
```
52+
Run it: `tech run hello.txs`
10053

101-
Run it:
102-
```
103-
tech run my_site.txs
104-
```
54+
### 2. Interactive Mode (REPL)
55+
Just type `tech repl` to open a live console where you can type code and see results instantly.
10556

106-
Your browser opens automatically! 🚀
57+
### 3. Inline Execution (New!)
58+
Run code instantly without a file:
59+
`tech eval "say crypto.sha256('hello')"`
10760

10861
---
10962

11063
## 🛠️ Available Commands
11164

112-
| Command | What it does |
113-
|---|---|
114-
| `tech run file.txs` | Run a TechScript file |
115-
| `tech check file.txs` | Check for errors without running |
116-
| `tech repl` | Interactive coding mode (like a calculator) |
117-
| `tech version` | Show version |
118-
| `tech transpile file.txs` | Convert to Python |
65+
| Command | What it does | Example |
66+
|---|---|---|
67+
| `tech run file.txs` | Run a TechScript file | `tech run calc.txs` |
68+
| `tech eval "code"` | **NEW** — Run code instantly | `tech eval "say 42"` |
69+
| `tech check file.txs` | Check for errors without running | `tech check script.txs` |
70+
| `tech repl` | Interactive coding mode | `tech repl` |
71+
| `tech version` | Show version | `tech version` |

docs/STDLIB_REFERENCE.md

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# TechScript v2.0.0 — Standard Library Reference
2+
3+
> Complete reference for all 150+ built-in functions.
4+
5+
---
6+
7+
## 🌍 Global Functions
8+
9+
### I/O Functions
10+
| Function | Description | Example |
11+
|:---|:---|:---|
12+
| `say(value)` | Print with newline | `say "Hello"` |
13+
| `print(value)` | Print without newline | `print "..."` |
14+
| `write(value)` | Alias for print | `write "text"` |
15+
| `format(fmt, ...)` | Format string | `format("{} is {}", name, age)` |
16+
| `debug(value)` | Print with type info | `debug myvar` |
17+
| `warn(value)` | Print as warning (yellow) | `warn "caution"` |
18+
| `error(value)` | Print as error (red) | `error "failed"` |
19+
| `clear()` | Clear terminal screen | `clear()` |
20+
21+
### Core Functions
22+
| Function | Description | Example |
23+
|:---|:---|:---|
24+
| `assert(cond, msg)` | Panic if false | `assert(x > 0, "must be positive")` |
25+
| `panic(msg)` | Stop with error | `panic("fatal")` |
26+
| `sleep(ms)` | Pause execution | `sleep(1000)` |
27+
| `time()` | Unix timestamp (seconds) | `make t = time()` |
28+
| `time_ms()` | Unix timestamp (ms) | `make t = time_ms()` |
29+
| `exit(code)` | Exit process | `exit(0)` |
30+
| `version()` | Return version string | `say version()` |
31+
| `callable(val)` | Check if callable | `callable(my_fn)` |
32+
33+
### Type Conversion
34+
| Function | Description | Example |
35+
|:---|:---|:---|
36+
| `int(val)` | Convert to integer | `int("42")``42` |
37+
| `float(val)` | Convert to float | `float("3.14")``3.14` |
38+
| `str(val)` | Convert to string | `str(42)``"42"` |
39+
| `bool(val)` | Convert to boolean | `bool(0)``false` |
40+
| `list(val)` | Convert to list | `list("abc")``["a","b","c"]` |
41+
| `type(val)` | Get type name string | `type(42)``"int"` |
42+
| `len(val)` | Get length | `len([1,2,3])``3` |
43+
44+
### String Functions
45+
| Function | Description | Example |
46+
|:---|:---|:---|
47+
| `upper(s)` | Uppercase | `upper("hi")``"HI"` |
48+
| `lower(s)` | Lowercase | `lower("HI")``"hi"` |
49+
| `trim(s)` | Remove whitespace | `trim(" hi ")``"hi"` |
50+
| `trim_start(s)` | Trim leading | `trim_start(" hi")``"hi"` |
51+
| `trim_end(s)` | Trim trailing | `trim_end("hi ")``"hi"` |
52+
| `split(s, d)` | Split by delimiter | `split("a,b", ",")``["a","b"]` |
53+
| `join(list, d)` | Join list with delimiter | `join(["a","b"], "-")``"a-b"` |
54+
| `replace(s, a, b)` | Replace occurrences | `replace("hi", "h", "H")``"Hi"` |
55+
| `contains(s, sub)` | Check substring | `contains("hello", "ell")``true` |
56+
| `starts_with(s, p)` | Check prefix | `starts_with("hello", "he")``true` |
57+
| `ends_with(s, p)` | Check suffix | `ends_with("hello", "lo")``true` |
58+
| `find(s, sub)` | Find index (-1 if none) | `find("hello", "ll")``2` |
59+
| `chars(s)` | String to char list | `chars("hi")``["h","i"]` |
60+
| `repeat_str(s, n)` | Repeat N times | `repeat_str("ab", 3)``"ababab"` |
61+
62+
### Math Shortcuts
63+
| Function | Description | Example |
64+
|:---|:---|:---|
65+
| `abs(x)` | Absolute value | `abs(-5)``5` |
66+
| `round(x)` | Round | `round(3.7)``4` |
67+
| `floor(x)` | Floor | `floor(3.7)``3` |
68+
| `ceil(x)` | Ceiling | `ceil(3.2)``4` |
69+
| `sqrt(x)` | Square root | `sqrt(16)``4` |
70+
| `pow(x, y)` | Power | `pow(2, 8)``256` |
71+
| `min(a, b)` | Minimum | `min(3, 7)``3` |
72+
| `max(a, b)` | Maximum | `max(3, 7)``7` |
73+
| `clamp(x, lo, hi)` | Clamp to range | `clamp(15, 0, 10)``10` |
74+
| `sum(list)` | Sum of list | `sum([1,2,3])``6` |
75+
76+
---
77+
78+
## 📐 `math.*` Module (38 functions)
79+
80+
### Constants
81+
| Constant | Value |
82+
|:---|:---|
83+
| `math.PI` | 3.141592653589793 |
84+
| `math.E` | 2.718281828459045 |
85+
| `math.TAU` | 6.283185307179586 |
86+
| `math.INF` | Infinity |
87+
88+
### Trigonometry
89+
`math.sin(x)` · `math.cos(x)` · `math.tan(x)` · `math.asin(x)` · `math.acos(x)` · `math.atan(x)` · `math.atan2(y,x)` · `math.sinh(x)` · `math.cosh(x)` · `math.tanh(x)` · `math.to_radians(deg)` · `math.to_degrees(rad)`
90+
91+
### Power / Roots / Logs
92+
`math.sqrt(x)` · `math.cbrt(x)` · `math.pow(x,y)` · `math.exp(x)` · `math.log(x)` · `math.log2(x)` · `math.log10(x)`
93+
94+
### Rounding
95+
`math.floor(x)` · `math.ceil(x)` · `math.round(x)` · `math.abs(x)` · `math.sign(x)`
96+
97+
### Integer Math
98+
`math.factorial(n)` · `math.gcd(a,b)` · `math.lcm(a,b)` · `math.fibonacci(n)` · `math.is_prime(n)`
99+
100+
### Statistics
101+
`math.min(list)` · `math.max(list)` · `math.sum(list)` · `math.mean(list)` · `math.clamp(x,lo,hi)`
102+
103+
---
104+
105+
## 📁 `fs.*` Module (20 functions)
106+
107+
| Function | Description |
108+
|:---|:---|
109+
| `fs.read(path)` | Read file to string |
110+
| `fs.write(path, data)` | Write string to file |
111+
| `fs.append(path, data)` | Append to file |
112+
| `fs.exists(path)` | Check if path exists |
113+
| `fs.delete(path)` | Delete file |
114+
| `fs.rename(old, new)` | Rename file |
115+
| `fs.copy(src, dst)` | Copy file |
116+
| `fs.is_file(path)` | Check if file |
117+
| `fs.is_dir(path)` | Check if directory |
118+
| `fs.size(path)` | File size in bytes |
119+
| `fs.list_dir(path)` | List directory contents |
120+
| `fs.make_dir(path)` | Create directory |
121+
| `fs.cwd` | Current working directory |
122+
| `fs.read_bytes(path)` | Read as byte list |
123+
| `fs.write_bytes(path, bytes)` | Write byte list |
124+
| `fs.extension(path)` | Get file extension |
125+
| `fs.basename(path)` | Get filename |
126+
| `fs.parent(path)` | Get parent directory |
127+
| `fs.join(a, b)` | Join path components |
128+
| `fs.abs_path(path)` | Get absolute path |
129+
130+
---
131+
132+
## 🖥️ `os.*` Module (10 functions)
133+
134+
| Function | Description |
135+
|:---|:---|
136+
| `os.name` | OS name (e.g. "windows") |
137+
| `os.arch` | CPU architecture |
138+
| `os.pid` | Current process ID |
139+
| `os.env_get(key)` | Get environment variable |
140+
| `os.env_set(key, val)` | Set environment variable |
141+
| `os.system(cmd)` | Run command (exit code) |
142+
| `os.popen(cmd)` | Run command (get output) |
143+
| `os.args` | Command line arguments |
144+
| `os.home` | User home directory |
145+
| `os.exit(code)` | Exit with code |
146+
147+
---
148+
149+
## 📊 `json.*` Module (3 functions)
150+
151+
| Function | Description | Example |
152+
|:---|:---|:---|
153+
| `json.encode(val)` | Value → JSON string | `json.encode({"a":1})``'{"a":1}'` |
154+
| `json.encode_pretty(val)` | Value → formatted JSON | Multi-line, indented |
155+
| `json.decode(str)` | JSON string → value | `json.decode('{"a":1}')``{"a":1}` |
156+
157+
---
158+
159+
## 🔐 `crypto.*` Module (4 functions)
160+
161+
| Function | Description | Example |
162+
|:---|:---|:---|
163+
| `crypto.sha256(str)` | SHA-256 hash (real FIPS 180-4) | `crypto.sha256("hi")``"8f43..."` |
164+
| `crypto.md5(str)` | MD5-style hash | `crypto.md5("hi")` |
165+
| `crypto.base64_encode(str)` | Encode to Base64 | `crypto.base64_encode("hi")``"aGk="` |
166+
| `crypto.base64_decode(str)` | Decode from Base64 | `crypto.base64_decode("aGk=")``"hi"` |
167+
168+
---
169+
170+
## 📅 `date.*` Module (9 functions)
171+
172+
| Function | Description |
173+
|:---|:---|
174+
| `date.now` | Current date/time string (UTC) |
175+
| `date.year` | Current year |
176+
| `date.month` | Current month (1-12) |
177+
| `date.day` | Current day (1-31) |
178+
| `date.hour` | Current hour (0-23, UTC) |
179+
| `date.minute` | Current minute (0-59) |
180+
| `date.second` | Current second (0-59) |
181+
| `date.unix` | Unix timestamp (seconds) |
182+
| `date.unix_ms` | Unix timestamp (milliseconds) |
183+
184+
---
185+
186+
## 🎲 `random.*` Module (6 functions)
187+
188+
| Function | Description |
189+
|:---|:---|
190+
| `random.random` | Random float 0.0–1.0 |
191+
| `random.randint(min, max)` | Random integer in range |
192+
| `random.choice(list)` | Random element |
193+
| `random.sample(list, n)` | N random elements |
194+
| `random.uuid` | Generate UUID v4 string |
195+
| `random.shuffle(list)` | Shuffle list in place |
196+
197+
---
198+
199+
## 🎬 `anime.*` Module (New v2.0!)
200+
201+
The `anime` module provides a powerful high-level interface for creating complex motion designs and cinematic animations directly within TechScript.
202+
203+
| Function | Description |
204+
|:---|:---|
205+
| `anime.create()` | Create a new animation context |
206+
| `anime.render(anim)` | Render the animation to a window/browser |
207+
| `anime.animate(target, props)` | Standard animation call |
208+
| `anime.stagger(ms)` | Staggered timing for multiple elements |
209+
| `anime.remove(target)` | Stop and remove animation |
210+
| `anime.set(target, props)` | Instantly set properties |
211+
| `anime.path(path)` | Create a motion path |
212+
| `anime.timeline(config)` | Create complex sequenced animations |

0 commit comments

Comments
 (0)