This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Queue } from "queue"; // https://gist.github.com/LeafChage/c271d5aee7ba3bf0156e2633c00c7f63#file-queue-ts | |
import { sleep } from "bun"; | |
type Config = { | |
/** | |
* @description (ms) | |
*/ | |
checkInterval: number | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { expect, test } from "bun:test"; | |
import { Queue } from "."; | |
test("enqueue", () => { | |
const queue = new Queue([1]); | |
queue.enqueue(2); | |
expect(queue["items"]).toEqual([1, 2]); | |
}); | |
test("dequeue", () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package espeak | |
// #cgo LDFLAGS: -lespeak-ng | |
// #include <stdio.h> | |
// #include <stdlib.h> | |
// #include "wrap-espeak.h" | |
import "C" | |
import "unsafe" | |
func Speak() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { parser } from '.'; | |
describe("parser", () => { | |
describe("token", () => { | |
it("ok", () => { | |
expect(parser.token("t")("token")).toEqual([true, "t", "oken"]); | |
}) | |
}) | |
describe("any", () => { | |
it("ok", () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// | |
/// Thank you! | |
/// ref: https://mbuffett.com/posts/bevy-snake-tutorial/ | |
/// | |
/// rustc 1.66.0 (69f9c33d7 2022-12-12) | |
/// | |
/// ```Cargo.toml | |
/// [package] | |
/// name = "bevy_tutorial" | |
/// version = "0.1.0" |