Skip to content

Instantly share code, notes, and snippets.

View benhid's full-sized avatar
⚙️
@ home

Antonio benhid

⚙️
@ home
View GitHub Profile
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active October 24, 2025 14:23
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for(...;...;...) or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@casualjim
casualjim / channel_example_test.go
Created July 9, 2017 05:12
examples of golang context and channels
package channel
import (
"fmt"
"sync"
"time"
)
func ExampleUnbufferedSend() {
c1 := make(chan string)