Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cosmo

⚠️ Work In Progress ⚠️

A graphical programming language.

Goals

The language is designed to be accessible for users who have mastered Scratch. It retains core concepts from Scratch, including its data types Truth (boolean), Number, Text, and List, while adding dictionaries, structures and first-class functions. It is intended to be a practical scripting language, enabling users to easily perform tasks such as filtering JSON, scraping websites, or manipulating spreadsheets with math, all in an intuitive and ergonomic manner. The vision is to be as hands on and visual as Scratch is, but with data instead of sprites on a canvas. This language is intended to be an ideal "in-between" language for learners transitioning from Scratch to more complex programming languages, as well as a powerful scripting tool for those who do not aim to become expert programmers.

Core features

Data types & standard library

  • None type
    • exactly one value
    • none == none
  • Truth
    • values true and false
    • logic functions (not, and, or)
  • Number type
    • represented by f64
      • weird, but most widely used
      • NaN & infinities are automatically converted to none and emit a warning
    • arithmetic functions (+, −, ×, ÷, mod), rounding; any operation with none input returns none
    • exact and approximate equality & inequality checks
  • Text
    • valid unicode string of text; parsing invalid strings is an error
    • operations:
      • interpolation, concatenation
      • contains, starts with, ends with
      • list of characters, length, substring; indexing is done to respect glyph boundaries as much as possible
      • into & from unicode code points

Interpreter

  • Step-by-step execution with rewinding, data inspection and modification
  • Warnings and errors are recoverable by rewinding & manual data modification

Non-features

  • No OOP – it's a bad mental model for abstracting the real world
  • No async/await, traits, threads, parallelization, data ownership/borrow checker – these are good and useful, but too complex for a beginner language

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages