The SQL dump was stolen from here and imported into MySQL.
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
// ❯ bun add -d [email protected] vitest zod | |
// ❯ bun run test --watch signia.test.tsx | |
import { atom, computed, type Atom, type Computed, type Signal } from "signia"; | |
import { expect, test } from "vitest"; | |
import { z } from "zod"; | |
// repo for "signia" package: https://github.com/tldraw/signia | |
test("signia condition with atom() and computed()", () => { |
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
// ❯ bun add -d signia vitest zod | |
// ❯ bun run test --watch graph.test.ts | |
import { atom, computed, type Atom, type Computed, type Signal } from "signia"; | |
import { expect, test } from "vitest"; | |
import { z } from "zod"; | |
test("signal graph", () => { | |
const BlockProps = z.object({ | |
field1Input: zodAtom<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
@font-face { | |
font-family: 'JetBrains Mono'; | |
font-style: normal; | |
font-weight: 100; | |
src: local("JetBrains Mono Thin"), local("JetBrainsMono-Thin"), url("../fonts/webfonts/JetBrainsMono-Thin.woff2") format("woff2"); | |
font-display: swap; } | |
@font-face { | |
font-family: 'JetBrains Mono'; | |
font-style: italic; |
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
#!/usr/bin/env -S deno run --no-check --allow-env --allow-read --allow-write --allow-net isogit.ts | |
import fs from "https://deno.land/[email protected]/node/fs.ts"; | |
import path from "https://deno.land/[email protected]/node/path.ts"; | |
import git from "https://esm.sh/[email protected]"; | |
import http from "https://esm.sh/[email protected]/http/node.js"; | |
const repositoryDir = path.join(Deno.cwd(), "/../test-repository"); | |
const repositoryUrl = "https://github.com/isomorphic-git/lightning-fs"; | |
await git.clone({ |
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
// https://stackoverflow.com/questions/7487917/convert-byte-array-to-escaped-string | |
fun encodeToEscapedString(bytes: ByteArray): String { | |
// 0x00..0x1f = non-printing characters | |
// 0x20 = SPACE | |
// 0x21..0x7e = printing characters | |
// 0x7f = DELETE | |
val string = StringBuilder() | |
val intSize = 0xff | |
val byteRange = 0x20..0x7e | |
for (byte in bytes) { |
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
text = """Text attributes _italic_, **bold**, `monospace`. Some implementations may use *single-asterisks* for italic text.""" | |
expected = """<p>Text attributes <em>italic</em>, <strong>bold</strong>, <code>monospace</code>. Some implementations may use <i>single-asterisks</i> for italic text.</p>""" | |
def lookup(text, start, size): | |
return text[start:start+size] | |
token_italic = "_" | |
token_italic_alt = "*" | |
token_strong = "**" |
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
export const HomePage = () => { | |
return ( | |
<SiteLayout> | |
<div className="flex"> | |
<SitePanel></SitePanel> | |
<SiteContainer></SiteContainer> | |
</div> | |
</SiteLayout> | |
) | |
} |
The below is a breakdown / bird's eye view of how a sparse-array backed ECS like EnTT or Shipyard works.
Please see the thanks and references at the bottom - without their help I would not have been able to share this breakdown with you... everything here is really just notes and rephrasing of what they've written already :)
Also, these notes do not cover archetype systems (like unity) nor adaptations of archetypes (like in Flecs). Though there's a couple comparative footnotes at the end.
Here we go!
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 'dart:async'; | |
import 'dart:typed_data'; | |
import 'package:flutter/material.dart'; | |
import 'dart:ui' as ui; | |
void main() => runApp(MyApp()); | |
int xorshift32(int x) { | |
x ^= x << 13; |
NewerOlder