Skip to content
forked from nilq/hugorm

๐Ÿ A mission-critical scripting language

License

Notifications You must be signed in to change notification settings

nilsabdi/hugorm

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

74 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

hugorm

Hugorm

MIT License

What is Hugorm?

It is a dynamically typed programming language. Hugorm strives to be better version of the other snake language, with a heightened focus on <good things here>. The syntax is designed to be easy to read and easy to write, and runs on a constantly improving bytecode virtual machine.

Selling points

"Sssssss ..." - hugorm

  • Decently fast
  • Easy-to-learn syntax
  • Made in Rust
  • The REPL has colors
  • Absolutely massive community
  • Surprising bugs, maybe

Examples

Everyone loves examples. Below are some rather useless example programs, showcasing the raw syntax of Hugorm.

Functions

Literally fun.

fun hello(name):
    print("hello " ++ name)

let name = prompt()
hello(name)

Loops

fun banana(n):
  let i = 0
  while i < n:
    if i == 0:
      print("hey")
    else:
      print("hey again")
  
    i = i + 1
    
banana(1000)

Exotic loops

let i = 0

loop:
    unless i > 1000:
        i = i + 1
        print(i)
    else:
        break

Data

The code below will print 200.

let player = {
  x: 100
  y: 100
}

let foo = {
    x: player.x + 100
}

player = foo

print(player.x)

The future

Interfaces

An interface will work like a set of pre-made functions that can be bound to new objects. Kinda like the way you implement traits on a struct in Rust.

interface Moving:
  fun move(self, x, y):
    self.x += x
    self.y += y

let snake = {} with Moving

TO-DO

  • Shunting-yard to be reviewed
  • For-loops and iterators
  • Interfaces

License

MIT

About

๐Ÿ A mission-critical scripting language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%