Skip to content
/ hatsune Public

computercraft i/o library for people who like vocaloid

License

Notifications You must be signed in to change notification settings

tmpim/hatsune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hatsune

computercraft i/o library for people who like vocaloid

(also it's cute like miku)

what's in the box?

  • hatsune - cute event loop and coroutine scheduler
  • miku - future/promise implementation
  • async - create a miku from a yielding/awaiting function, instead of using miku callbacks
  • await - await a miku, also available as miku:await
  • awaitSafe - await a miku, catching errors and returning boolean, result, also available as miku:awaitSafe

hatsune also provides a few optional modules:

  • rin - async http
  • rana - generator functions

examples

the preferable language for hatsune is moonscript, since it allows for much more concise code. here are some examples:

as a lua library, hatsune is a bit more verbose (but still easy to use!). here are some examples:

installation

from computercraft, run the following command:

wget https://github.com/tmpim/hatsune/raw/main/hatsune.lua

# additionally, if you want a few optional modules (for example rin):
wget https://github.com/tmpim/hatsune/raw/main/modules/rin.lua

building

you can build hatsune from source using moonscript externally, or using moonscript-cc in computercraft.

# if you're in computercraft (thanks to emma)
wget https://github.com/emmachase/moonscript-cc/raw/main/build/moonc.lua

moonc .

todo

  • websocket library
  • krist library
  • more examples

About

computercraft i/o library for people who like vocaloid

Resources

License

Stars

Watchers

Forks

Packages

No packages published