diff options
| author | Ibrahim Muftee <ibrahim@muftee.net> | 2026-07-14 22:18:38 -0500 |
|---|---|---|
| committer | Ibrahim Muftee <ibrahim@muftee.net> | 2026-07-14 22:21:59 -0500 |
| commit | baa37871d9b71d3f94cc8acca8d375ee1232d7f0 (patch) | |
| tree | d74f48479d28380fb2f53cb61c91727d0b6632ec /main.odin | |
chapter 01
Diffstat (limited to 'main.odin')
| -rw-r--r-- | main.odin | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/main.odin b/main.odin new file mode 100644 index 0000000..8a4e1cb --- /dev/null +++ b/main.odin @@ -0,0 +1,17 @@ +package main + +import "core:fmt" +import "core:os" +import "repl" + +main :: proc() { + user, ok := os.lookup_env_alloc("USER", context.allocator) + if !ok { + fmt.eprintln("Could not determine username") + return + } + + fmt.printf("Hello %s! This is the Monkey programming language!\n", user) + fmt.println("Feel free to type in commands") + repl.start(os.to_stream(os.stdin), os.to_stream(os.stdout)) +} |
