Skip to content

GPTScript/AiScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AjScript (ˈā•ī ˈskript)

(it's a roman swash letter i, but also for JIT)

A Minimal, Full-Stack, Tool-Assisted Language.
Strictly & Strongly-Typed, for Browsers and Bun.

var msg = `Hello, World!`;

async function main() {
  for (;;) {
    console.info(msg);
    break;
  }
}

main();

Language Spec

See #43.

Why

No matter how [simple] the API, the world will produce [those] capable of misusing it.
~ Lawrence Dol

(but that doesn't mean we shouldn't try our best to provide one)

We're facing a new age of programming - a nexus of two delimmas:

  • far more programmers are junior than are senior
  • AI (tool-assisted) programming is quickly becoming unavoidable

This produces a paradox:

  • most code is written by the inexperienced
  • most training models are therefore trained to be inexperienced
    (and training models are far less actually intelligent than humans)

AjScript solves this by providing a small, less-expressive (but familiar) language that can be learned in a weekend (a la Go), and encourages readability above all else.

Most importantly, we take make the best use of capabilities that Browsers have to offer, in the fastest way possible, with the most correct type system, and the best tools imaginable - to make our everyday lives better as programmers who (by choice or otherwise) use Browsers and Bun as development platforms.

Values

Perfection is Achieved Not When There Is Nothing More to Add, But When There Is Nothing Left to Take Away
~ Antoine de Saint-Exupery

We follow the Unix Philosophy, the Zen of Python, the Go Proverbs, the Prettier Rationale, the Zen of Zig and the Axioms of AJ.

In summary:

Write Correct, Safe Programs that span across Time and Developers

  • Readable > Writable
  • Less > More
  • Necessary > Expressive
  • Tool-Assisted > Manual
  • Macros > Transpiling
  • Hueristics > Statistics
  • Standard Library > Packages
  • Tooling Ecosystem > Popular Opinions
  • Engineering > Development
  • Just-in-Time Re-learning > A Human's Working Memory
  • JIT > Never
  • Top to Bottom > Left to Right

Compatibility with Browsers & Bun

Small language, Robust Standard Library

AjScript is it's own language with its own ethos, syntax, design patterns, and standard library - some of which varies wildly from some of the most popular frontend and backend frameworks today. \

That said, one of the design constraints is that it must remain natively compatible with Browsers and Bun
(and by extension Node and Deno) without transpiling.

This means that, from a syntax perspective only, it is a strict subset (of the common subset) of the language defined by what Browsers and Bun implement. To be more specific: AjScript will not adopt any syntax that has not existed in all mainstream browsers for at least 18 months.

And while AjScript adopts much of what Browsers provide as "the standard library", it also extends it with a small set of syntax-compatible additions that are necessary to write correct, safe programs - things like RegExp._escape(str) and Promise._parallel(qty, arr, fn)).

About

A Minimal, Full-Stack, Tool-Assisted Language. Native to Browsers and Bun. Strictly & Strongly-Typed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages