Sign inSign up

100hellos/wren

By 100hellos

•Updated 4 months ago

"Hello World!" Written in wren

Image
0

4.1K

100hellos/wren repository overview

⁠Hello World! From wren.

Language page⁠ — context, influences, and learning notes on the 100hellos site.

Source on GitHub⁠ (100hellos/wren)

⁠Trying it

docker run --rm --platform="linux/amd64" 100hellos/wren:latest

⁠Modifying it

Read the repo README⁠, or fork the project⁠ and customize it.

For an interactive shell:

docker run --rm --platform="linux/amd64" --entrypoint="" -it 100hellos/wren:latest zsh

⁠Wren

Wren is a small, fast, class-based concurrent scripting language that combines the simplicity of Lua with the power of class-based object-oriented programming. It was created by Bob Nystrom, who is also known for his work on the Dart programming language and the book "Game Programming Patterns".

⁠Language Features

  • Class-based Object-Oriented: Unlike prototype-based languages like JavaScript, Wren uses traditional class-based inheritance
  • Fiber-based Concurrency: Built-in support for cooperative multitasking using fibers
  • Small and Fast: The entire VM is only a few thousand lines of C code
  • Statically-typed Methods: Method calls are resolved at compile time for better performance
  • Clean, Readable Syntax: Influenced by languages like Ruby and Python
  • Embeddable: Designed to be embedded in applications, similar to Lua

⁠Hello World Explanation

The Wren Hello World program is remarkably simple:

System.print("Hello World!")

The System class provides basic system functionality, and print is a static method that outputs text to standard output. Unlike many languages, Wren doesn't require a main function or any boilerplate code.

⁠History

Wren was created by Bob Nystrom and first released in 2013. It was designed to be a modern alternative to Lua for game development and other embedded scripting needs. The language combines the simplicity and small footprint of Lua with more familiar class-based object-oriented programming concepts.

⁠Further Exploration

Tag summary

Content type

Image

Digest

sha256:baaee3836…

Size

146.3 MB

Last updated

4 months ago

docker pull 100hellos/wren