Provides a word called dump.
Output looks like this:
> [ 'Hello,_world! s:put nl ] dump
3B9F: 0x801
3BA0: 0xE5D
3BA1: H
| 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| *:focus { | |
| outline: 4px solid #FFD700; | |
| outline-offset: 4px; | |
| } | |
| html { | |
| font-size: 118%; | |
| } | |
| body { |
| #!/usr/bin/env bash | |
| # requires pandoc | |
| # coreutils | |
| # uuidgen | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| if [[ "${TRACE-0}" == "1" ]]; then |
| #lang racket | |
| ;; let's try to make a pokedex in racket! | |
| (require net/url | |
| net/url-connect | |
| json | |
| slideshow/pict | |
| racket/draw) |
| ( POMO POMO POMO ) | |
| VARIABLE POMO-TIME | |
| 1500000 POMO-TIME ! | |
| VARIABLE REST-TIME | |
| 600000 REST-TIME ! | |
| ( TODO: Consider using VALUE instead of VARIABLE ) |
This is a derivative work based on suggestion from @crc -- http://forth.works/share/6e7967060cc12336fb4cd7cd0474fed1
My goal here is to make a basic text-based game loop that can serve as a starting point for a full game.
To accomplish this I'll implement a few core features:
| interface Dice { | |
| numberOfDice: number; | |
| sidesOfDice: number; | |
| diceModifier: number; | |
| } | |
| interface LogEntry { | |
| timestamp: string; | |
| input: string; | |
| result: number; |
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
| /******************************************************************************* | |
| * | |
| * A minimal Forth compiler in C | |
| * By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com | |
| * Release 2014-04-04 | |
| * | |
| * Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial | |
| * | |
| * PUBLIC DOMAIN | |
| * |