Skip to content

Instantly share code, notes, and snippets.

View Jules-Bertholet's full-sized avatar

Jules Bertholet Jules-Bertholet

View GitHub Profile
@joboet
joboet / 0000-pattern-types.md
Last active April 27, 2024 01:47
Pattern types RFC

Summary

This RFC introduces pattern types, which are subtypes of matchable types that are statically restricted to a subset of the variants of the original type.

@Manishearth
Manishearth / scribing.md
Last active June 19, 2023 10:08
Tips for effective scribing from the W3C

W3C teams have a tendency of scribing everytihng they do, and they're pretty effective at it.

This is not due to individuals being great at scribing: the system is set up such that even new group members will be able to scribe reasonably effectively. It's also set up such that new group members will get that opportunity soon enough.

The main thing is that "anyone can scribe": most teams avoid a designated scribe and instead designate a scribe per meeting and discussion. This works with some of the following additional structure:

  • Nobody is expected to scribe and take minutes simultaneously. if the scribe wants to say something, someone else will take over. You pre-agree to who that person will be before the scribe actually says something
    • Before the discussion starts, scribe asks for an alternate
  • During the discussion, scribe may use chat to say "anyone want to scribe for me when I talk in a bit" and then call out that person before speaking.
@huytd
huytd / wordle.md
Last active May 16, 2024 20:39
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@pdarragh
pdarragh / _cookies.md
Last active December 14, 2021 01:35
Cookie Recipes
@brendanzab
brendanzab / gist:d41c3ae485d66c07178749eaeeb9e5f7
Last active July 19, 2023 04:28
My personal list of Rust grievances (September 2021)

September 2022:

This has spread to a far wider audience than I had anticipated - probably my fault for using a title that is in hindsight catnip for link aggregators. I wrote this back in 2021 just as a bunch of personal thoughts of my experiences using Rust over the years (not always well thought through), and don't intend on trying to push them further, outside of personal experiments and projects.

Managing a living language is challenging and difficult work, and I am grateful for all the hard work that the Rust community and contributors put in given the difficult constraints they work within. Many of the things I listed below are not new, and there's been plenty of difficult discussions about many of them over the years, and some are being worked on or postponed, or rejected for various good reasons. For more thoughts, please see my comment below.

My personal list of Rust gr

About variadics in Rust

This is an analysis of how variadic generics could be added to Rust. It's not a proposal so much as a summary of existing work, and a toolbox for creating an eventual proposal.

Introduction

Variadic generics (aka variadic templates, or variadic tuples), are an often-requested feature that would enable traits, functions and data structures to be generic over a variable number of types.

To give a quick example, a Rust function with variadic generics might look like this:

@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active May 24, 2024 23:25
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@seanjensengrey
seanjensengrey / octal_x86.txt
Last active May 24, 2024 04:23
x86 is an octal machine
# source:http://geocities.com/SiliconValley/heights/7052/opcode.txt
From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@nicowilliams
nicowilliams / fork-is-evil-vfork-is-good-afork-would-be-better.md
Last active May 18, 2024 14:10
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid

I recently happened upon a very interesting implementation of popen() (different API, same idea) called popen-noshell using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.

This is not a paper. I assume reader familiarity with fork() in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou