Skip to content

Instantly share code, notes, and snippets.

use v5.18;
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
sub must($$) {
my ($name, $val) = @_;
View rivertile.patch
diff --git a/rivertile/main.zig b/rivertile/main.zig
index d1149b1..5e61686 100644
--- a/rivertile/main.zig
+++ b/rivertile/main.zig
@@ -66,6 +66,17 @@ pub fn main() !void {
const output_width = try std.fmt.parseInt(u32, std.mem.spanZ(args[width_arg]), 10);
const output_height = try std.fmt.parseInt(u32, std.mem.spanZ(args[height_arg]), 10);
+ // Buffering the output makes things faster
+ var stdout_buf =;
View bfvim
Place your cursor on the line 6 and type 0"qy$@q to execute brainfuck code in line 9.
Memory begins from line 22, you can add zeroes here to increase available amount.
Line 21 is output. There is no input. Negative numbers are not supported.
Plugins / remaps can break the interpreter. Run this with -u NONE.
j0"sy$jjmcjmo/^catch jmz0"_d$jmd/catch kk$s0@s
`c"cyl'o/\M^c W"cy$'d@c`clmc@s
View gist:450e3d6fb86f21e73401e4c03e0a645f
error: captured variable cannot escape `FnMut` closure body
--> components/rendering/src/
176 | let mut highlighter: Option<CodeBlock> = None;
| --------------- variable defined here
197 | .map(|event| {
| - inferred to be a `FnMut` closure
208 | / Ok(Either::Right(events.into_iter().map(|event| {
View screenshot
#!/usr/bin/env sh
bounds="$(slop -b 0 -lc 0.1,0.6,0.8,0.4 -qf '%x,%y,%w,%h' 2>/dev/null)"
[ "$?" -eq "0" ] || exit 0
filename="$(date +'%Y-%m-%dT%H.%M.%S')_$(pwgen 5 1).png"
mkdir -p "$screenshot_dir"
scrot -a "$bounds" "$screenshot_dir/$filename"
GoldsteinE /
Created Feb 24, 2021
Языки программирования, про которые вы (возможно) не знали — выпуск 2

Языки программирования, про которые вы (возможно) не знали — выпуск 2

Язык первый, практичный — Zig


Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

Официальный сайт Zig

GoldsteinE /
Created Feb 16, 2021
Языки программирования, про которые вы (возможно) не знали — выпуск 1

Языки программирования, про которые вы (возможно) не знали — выпуск 1

Язык первый, практичный — Nim


Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula.

Официальный сайт Nim

use super::suggest;
use super::MethodError;
use super::NoMatchData;
use super::{CandidateSource, ImplSource, TraitSource};
use crate::check::FnCtxt;
use crate::errors::MethodCallOnUnknownType;
use crate::hir::def::DefKind;
use crate::hir::def_id::DefId;
use std::collections::{HashSet, VecDeque};
use anyhow::Context as _;
pub type Card = usize;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Winner {
#!/usr/bin/env perl
use v5.18;
use strict;
our %rules;
sub compile_rule {
state %compiled;