- Library – DSL here
- Object
- AbstractMemory – Manager for a blob of memory
- Pointer – C pointer of a blob of memory
- AutoPointer – with customizable GC
- Function – C function with fixed args (
Library#attach_function
) - MemoryPointer – with Ruby-managed memory
- Pointer – C pointer of a blob of memory
- Enum – C Enum (
Library#enum
)- Bitmask – bitmask-style (
Library#bitmask
)
- Bitmask – bitmask-style (
- AbstractMemory – Manager for a blob of memory
- **[Struct](https:/
… because Google gave me no results when this curiosity came to me.
Testing method:
I generated a .gd
script using Ruby’s [Array#permutation
] and [Array#product
].
Then I let Godot 4.1.0’s code editor (statically?) check for errors. I have not run any of the GDScript.
- First – Between
Variant
and anything (i.e. dynamic typing support) - Between
int
,float
andbool
(Betweenfloat
andbool
? Interesting.)
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<link rel="styelsheet" href="https://necolas.github.io/normalize.css/8.0.1/normalize.css"> | |
<link rel="stylesheet" href="styles.css"> | |
<script src="script.js"></script> | |
</head> | |
<body> |
cmake_minimum_required(VERSION 3.26) | |
project("Arduino Sketches") | |
set(CMAKE_CXX_STANDARD 11) | |
# Path to Arduino Package | |
set(ARDUINO [PATH/TO/%LOCALAPPDATA%]/Arduino15/packages/arduino/hardware/avr/1.8.6/) | |
# Microcontroller | |
add_compile_definitions(__AVR_ATmega328P__) # Arduino UNO | |
set(ARDUINO_HARDWARE ${ARDUINO}/hardware/avr/1.8.6/) |
BOARD = { | |
nil => %q[SCARY?!], | |
'🎃' => %q[BDEFGH ], | |
'👻' => %q[IJKLMN'], | |
'🍬' => %q[OPQTUV,], | |
'💀' => %q[WXZ.#$:] | |
} | |
row = BOARD[nil] | |
File.foreach 'input.txt', chomp: true do|line| |
The Legend of Zelda games presented gorgeous fantasies of the Hyrulean universe. Regrettably, Nintendo has officially declared that the events of Ocarina of Time fork the timeline into three distinct branches, only one of which develops into the Switch hits. Severing the continuity of the series’s rich lore is poor news for me and other supporters of self-consistent causality.
Fortunately, as the developers abandon the parallel universes and focus on an age over a millennia after the world’s creation, there is enough consistency and timing between the stories to realign the different sequences to a single continuous chronology. The following is my take on the Hyrule history as a singular timeline.
$* << [//=~'', /$/=~'$'] << () << ->() { | |
$*[~(/$$/=~'$$')][ | |
( $*[~(/$/=~'$')] += (/$/=~'$') ) - (/$/=~'$') | |
] ||= ( | |
$*[~(/$/=~'$')] -= (/$$/=~'$$') | |
$*[~(//=~'')][] + $*[ ~(/$$/=~'$$') ][ $*[~(/$/=~'$')] - (/$$/=~'$$') ] | |
) | |
} | |
# Test |
def answer1(n) = n.succ | |
def answer2(str) = str.upcase | |
def answer3(n) = (0..n).to_a | |
def answer4 = yield + 42 | |
def answer5(a, b = 1) = a + b | |
def answer6(n) = n.positive? ? (n - 1) % 9 + 1 : n | |
def answer7(x) = x.succ | |
def answer8(n) = n.digits(2).sum | |
def answer9(s) = s.gsub 'u-g0t-me', 'yikes' | |
def answer10(x = false) = @data10 = x ? 0 : @data10 ? @data10 + 1 : 1 |
# frozen_string_literal: true | |
class CellularAutomaton | |
def initialize(grid) | |
@grid = grid | |
# Back Buffer | |
@grid2 = grid.map(&:dup) | |
@rules = yield self | |
end | |
def self.load(file, ...) = new(file.each_line(chomp: true).map(&:chars), ...) |