An Anki note type with 5 audios and 5 transcriptions for a single word/phrase, from which one is selected randomly whenever the card is shown. The card has only a front side with the audio, and a collapsible section with the audio's transcription and more info (e.g., definitions, image, etc).
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
/* | |
* C program that implements the pipeline | |
* | |
* ls -l /tmp/ | wc -l | |
* |
Original document: http://www.wall.org/~larry/natural.html Author: Larry Wall
Editor's Note: No changes to this document, aside for converting it to Markdown.
Working with binary data is kind of like solving a puzzle. You’re given clues by reading a specification of what the data means and then you have to go out and turn that data into something usable in your application.
— Young and Harter’s NodeJS in Practice
Text files, images, videos and anything you can store in a computer have a thing in common: all of them are stored as binary data. We make sense of what a sequence of binary data refers to purely based on how we interpret the binary data, and whether it conforms to what we expect it to be. If some chunk of binary data holds any meaning, we can tell it apart from another chunk by using a binary format specification, which describes how some binary data ought to be interpreted. For example, in the dBASE specification the first 32 bytes make up the header, which contains information such as date of last update, number of records in the database file, etc. Every binary file format you can ima
The JsonLineParser
class implements a transform stream (using Node.js v20.2.0's Stream API) to parse a file that contains JSON objects separated by newlines (See data.ndjson
). It's adapted from Young and Harter's Node.js in Practice book, especifically Technique 31: Implementing a readable stream.
The best way to get the right answer on the Internet is not to ask a question; it's to post the wrong answer.
Without a clear indicator of the author's intent, any parodic or sarcastic expression of extreme views can be mistaken by some readers for a sincere expression of those views.
There are several differences between sigilless and sigilled variables, which are already documented in the Raku docs. This is simply my attempt at consolidating them in a single place.
At the surface, a sigil or lack thereof is the most apparent difference between sigilless and sigilled variables. As their names imply, sigilless variable don't have sigils while sigilled variables do.
my \degrees = pi / 180;
You can get collapsible blocks in Github Markdown by using the <details></details>
and <summary></summary>
tags. For example,
<details>
<summary>Poe's Law (click to expand)</summary>
A humorous law of Internet forums, stating that "The best way to get the right answer on
the Internet is not to ask a question; it's to post the wrong answer."
NodeJS handles raw binary data with the classes Buffer
and Blob
, while Raku does so with the roles Buf
and Blob
, which are mutable and immutable buffers respectively. In Raku, a Buf
composes a Blob
so all Blob
methods are available to Buf
objects.
The following table summarizes the similarities and differences between buffer constructs in NodeJS and Raku:
NodeJS | Raku | |
---|---|---|
Buffer /Buf |
Fixed-length sequence of bytes (No methods such as push , pop , etc.) |
Sequence of bytes that can grow or shrink dynamically. You can use methods such as push , pop , etc. |
Iterable using the for..of syntax |
It cannot be iterated over using a looping construct. Use the method list to get hold of an iterator. |