Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

silver-machine/crowbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

45 Commits

Repository files navigation

Crowbar

Overview

Crowbar (named after Crowbar)is a stack-based interpreted language inspired by FORTH and Python. Originally, it was meant to be for ASCII roguelike games (the clearscr keyword is a remnant of that), but over time it has become a sort of general purpose/toy language.

Keep in mind that it is still a work in progress, and that I have much to add and much to fix!

Example Code

;; hello world x times
"How many times? " ask toint store x
x for i
 i tostr ": Hello, World" && .
end

Usage

crowbar - opens crowbar REPL
crowbar run <file> - runs <file>
crowbar add <source> <name> - adds <source> to libraries with name <name>
crowbar list - lists registered libraries

Learning Crowbar

examples/ has a few simple examples that show how to use Crowbar. The cheatsheet is useful for quick references. The help library (WIP) is can help with learning the base keywords.

Speed

Running this in the REPL:

!time 10000 for i
 pass
 end 
!time

Gives this output: Execution time: 0.018350 seconds

TODO

  • Improve examples/
  • Finish help library
  • Add transpiler
  • Syntax highlighter
  • Change syntax for file keywords
  • Create editor
  • Add bytecode support
  • Fix import

About

stack-based interpreted programming language

Topics

Resources

License

Stars

Watchers

Forks

Languages

AltStyle によって変換されたページ (->オリジナル) /