- deep_eq returns false immediately when both sides are string-like and the bit-compare failed (strings are interned, so bit-equality IS string equality) — trims the type-check chain on the hot failed-compare path of string-tag dispatch (a.kind == "...") - pre-reserve thread stacks (value stack, scopes, calls, mes, loops) - splash_bench: string_cmp workload, arith_hostmode (instruction limit + run budget installed, the game-host configuration; measured: the two per-instruction counters cost ~nothing, branch prediction hides them), BENCH_ONLY profiler filter Tried and rejected: batching consecutive value-pushes in run_core into one dispatch iteration — the scan overhead outweighed the per-value limit/budget checks it skipped (they were already free); reverted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
Makepad Example: ChatGPT
A simple example of a Makepad Framework application that uses its network layer to interact with OpenAI's GPT model.
How to Run
-
Set up your OpenAI API key:
- Visit OpenAI's API Key page and follow the instructions to create and retrieve your API key.
- Note: Using the OpenAI API incurs costs.
-
Configure the API key as an environment variable:
export OPENAI_API_KEY=your_openai_api_keyOptionally, you can configure the model and endpoint:
export OPENAI_MODEL=your_desired_model # default is "gpt-4o" export OPENAI_BASE_URL=your_custom_api_base_url # default is "https://api.openai.com/v1" -
Run the application:
cargo run