Skip to content

28dayslater/pinp

Repository files navigation

PINP — Pinp Is Not Python

A toy programming language with longer-term ambitions of growing beyond a simple toy.

This project serves as a showcase of what an experienced human dev could achieve using AI tools.

Real world pro dev workflow:

  • TDD red → green → refactor
  • Iterative development with specs
  • Proper git workflow and scope control
  • Human oversight throughout

Quick syntax example:

g = 0                              // global variable

sign(x: int) is                    // function args must be typed
    if x > 0
        return 1
    if x < 0
        return -1
    0                              // last expression is the return value

clamp(x: int, lo: int, hi: int) [:int] is
    a = x
    if a < lo
        a = lo
    if a > hi
        a = hi
    a

log_call(x: int) [:void] is       // void: no return value
    ::g = ::g + 1                  // ::name writes to global scope

greet(name: str) [:str] is
    f'hello {name}, sign={sign(clamp(x, -1, 1))}'

is_positive(x: int) [:bool] is x > 0   // bool return type

i = 0
total = 0
while i < 5
    total = total + i
    i = i + 1

for n in 1..5
    total = total + n

See tests/ for more syntax samples.

In a very unlikely case that you do decide you want to bother yourself with this thing, there will be docker files to be run for a few OSes (Linux only, sorry). TBD

Disclaimer: This is Human + AI generated documentation. Treat it with a little bit of salt — it may not always reflect reality.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages