Skip to content

Instantly share code, notes, and snippets.

View ParadoxV5's full-sized avatar
🎮

ParadoxV5

🎮
View GitHub Profile
@ParadoxV5
ParadoxV5 / Symbolic Fibonacci
Created November 28, 2023 05:28
Fibonacci calculator implemented with only `\W`s (and without realizing `Range%` is a block-taking thing)
$* << [//=~'', /$/=~'$'] << () << ->() {
$*[~(/$$/=~'$$')][
( $*[~(/$/=~'$')] += (/$/=~'$') ) - (/$/=~'$')
] ||= (
$*[~(/$/=~'$')] -= (/$$/=~'$$')
$*[~(//=~'')][] + $*[ ~(/$$/=~'$$') ][ $*[~(/$/=~'$')] - (/$$/=~'$$') ]
)
}
# Test

The Hyrulean History as a Singlular Timeline

Preface

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.

BOARD = {
nil => %q[SCARY?!],
'🎃' => %q[BDEFGH ],
'👻' => %q[IJKLMN'],
'🍬' => %q[OPQTUV,],
'💀' => %q[WXZ.#$:]
}
row = BOARD[nil]
File.foreach 'input.txt', chomp: true do|line|
@ParadoxV5
ParadoxV5 / Arduino.CMakeLists.txt
Last active August 20, 2023 23:00
`CMakeLists.txt` to work with Arduino Sketches in CLion (only IDE insignts, still need Arduino IDE or CLI to build/upload)
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/)
@ParadoxV5
ParadoxV5 / index.html
Created August 4, 2023 17:09
a plain HTML boilerplate
<!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>

… 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 and bool (Between float and bool? Interesting.)
@ParadoxV5
ParadoxV5 / 砍后鬼灵贼学习笔记.md
Last active May 8, 2024 00:54
砍后鬼灵贼学习笔记(未完待续)

(注:爬天梯肯定没戏啦,摸来益智而已)

随从

核心七随从

正好塞满七个格子;以重要性排列:

  • 魂缚、暗月、鬼灵:必需品,没了就凉办
  1. 鲨鱼:砍后也成了必需品(TODO:沙箱能分担吗?)
  2. 刀油:双连减费

魔塔游戏,在英文社区应该叫什么?就用粉丝们草拟的Magic Tower

我带着这个问题,打开了[原始魔塔《Tower of the Sorcerer》的公认主页][英文网页])。

玩过英文版或访问过这个网站的盆友们都注意得到,作者的英文水平特别……小学生,强烈暗示游戏的英文是从某其它语言(粗糙)翻译来的。 而这个原语言极有可能是日文——网页左上角有个去日文版网页的链接,且俩版本都托管于同一个.jp顶级域的日文网站。 聪明好奇的我想到在日文网页上转转。如果猜想属实,作者的日文原文绝对比用英文写得清。

游戏的日文正名为《魔法の塔》。 嗯,正同中文取名《魔塔》,不知是洞若观火还是异曲同工。

@ParadoxV5
ParadoxV5 / My insights on a Pipeline Operator for Ruby.md
Last active October 1, 2024 20:31
a follow-up miniblog to ParadoxV5/ruby-pipeline

According to https://bugs.ruby-lang.org/issues/17353#note-1, there were (if not still are) consistent posts requesting adding Elixir’s Pipeline Operator |> to Ruby.

However, unlike Lisp-1 languages like Python or JavaScript, Lisp-2s like Ruby face the additional challenge of namespace disambiguation. In addition to rightward calling, the Pipeline Operator would also change the call of the RHS to include the LHS. Therefore, its syntax is incompatible with the traditional designs for message passing programming and introduces a never-before-seen mental load.