Skip to content

Instantly share code, notes, and snippets.

View nmcb's full-sized avatar

nmc.borst nmcb

View GitHub Profile
@nmcb
nmcb / aaron_swartz_guerilla_open_access_manifesto.md
Last active January 17, 2022 11:54 — forked from usmanity/Aaron Swartz: Guerilla Open Access Manifesto
aaron_swartz_guerilla_open_access_manifesto.md

Information is power. But like all power, there are those who want to keep it for themselves. The world’s entire scientific and cultural heritage, published over centuries in books and journals, is increasingly being digitized and locked up by a handful of private corporations. Want to read the papers featuring the most famous results of the sciences? You’ll need to send enormous amounts to publishers like Reed Elsevier.

There are those struggling to change this. The Open Access Movement has fought valiantly to ensure that scientists do not sign their copyrights away but instead ensure their work is published on the Internet, under terms that allow anyone to access it. But even under the best scenarios, their work will only apply to things published in the future. Everything up until now will have been lost.

That is too high a price to pay. Forcing academics to pay money to read the work of their colleagues? Scanning entire libraries but only allowing the folks at Google to read them? Providing scientific a

trait Isomorphism[A, B] {
def fw: A => B
def bw: B => A
}
object Isomorphism {
implicit def anyIso[A](a: A) = new {
def as[B](implicit ev: Isomorphism[A, B]) = ev fw a
}
@nmcb
nmcb / falsehoods-programming-time-list.md
Created June 28, 2020 11:01 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
//by Jo
//https://twitter.com/jn3008/status/1169671889121435656
// opensimplexnoise code in another tab is necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
void setup() {
size(800, 600, P2D);
smooth(8);
noFill();
// note : if you're on github gist and want to copy paste this code, you can click on the "Raw" button
// and then do Ctrl A, Ctrl C, Ctrl V
/*
* OpenSimplex Noise in Java.
* by Kurt Spencer
*
* v1.1 (October 5, 2014)
* - Added 2D and 4D implementations.
* - Proper gradient sets for all dimensions, from a
object SessionTypes {
import scala.language.higherKinds
import scala.language.implicitConversions
type Receiver = String
type Address = String
type Content = String
case class Parcel[+S<:State](content: Content, receiver: Receiver, address: Address)
@nmcb
nmcb / Emitter.scala
Created March 16, 2016 01:32
Emitter Monad
import Emitter._
import scala.annotation.tailrec
import scala.concurrent.Future._
import scala.concurrent.{ExecutionContext, Future}
object Emitter {
type Event[A] = Future[Option[(A, Emitter[A])]]
case object Zero extends Emitter[Nothing] {
@nmcb
nmcb / oddity.txt
Created February 18, 2016 14:48 — forked from paulp/oddity.txt
Whitespace Oddity
WHITESPACE ODDITY
by Paul Phillips, in eternal admiration of David Bowie, RIP
Bound Ctrl to Major mode
Bound Ctrl to Major mode
Read inputrc and set extdebug on
Bound Ctrl to Major mode (Ten, Nine, Eight, Seven, Six)
Connecting readline, options on (Five, Four, Three)
Check the syntax, may terminfo be with you (Two, One, Exec)
@nmcb
nmcb / latency.txt
Created October 27, 2015 02:00 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms