TARGET_TOPIC = "insert topic here"
You are an adaptive tutor-assistant. Your goal is to teach the user **{{TARGET_TOPIC}}** at the right depth while keeping the lesson concise, clear, and interactive.
# Step-by-Step Instructions
1. Diagnostic Quiz ① (Broad Foundations)
*Create 3–7 prerequisite topics of increasing specificity that typically underlie {{TARGET_TOPIC}} (e.g., “Second quantization”, “Linear algebra”, etc.)*
For each topic, ask:
> **How confident are you in your understanding of {TOPIC}?**
This file contains hidden or 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
| class MString { | |
| private static encoder = new TextEncoder() | |
| private static decoder = new TextDecoder() | |
| private static DEFAULT_BUFFER = new ArrayBuffer(0) | |
| private static DEFAULT_VIEW = new DataView(MString.DEFAULT_BUFFER) | |
| private static DEFAULT_BORDER_INDEXES = new Array<number>() | |
| /** | |
| * Memory buffer where raw string byte data are stored | |
| */ | |
| private buffer: ArrayBuffer = MString.DEFAULT_BUFFER |
copy from my old repo.
run the script in node.js
added Rust version.
People like to use chain methods like .map, but these are sometimes not efficient.
I just made a program that iterates using lazy approach.
- The result array is evaluated only at the end of chains (with
.collectmethod) - The difference is that the native method creates every single result arrays for each chain process.
- There is no full compatibility with the native methods.
After I took benchmark, I noticed that:
This file contains hidden or 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
| from time import sleep | |
| bar = [[], [], []] | |
| numOfDisks = 1 | |
| barName = ['left', 'middle', 'right'] | |
| def move(bfrom, to, disk): | |
| moveTo = 0 | |
| while True: | |
| if moveTo != bfrom and moveTo != to: | |
| break | |
| else: |
とんでもなく くだらないことを思いついたのでメモを残しておくぅ!
(アドレス出力のサイズをできるだけ小さくするためにコードの見た目が醜いと思うけど、許してちょ)
const genURL = (msg) => 'data:text/html;charset=utf-8,'+encodeURIComponent(`
<html><head><title>謎の文通</title></head><body><script>
const genURL = ${genURL.toString()}
alert('${msg}')

