Skip to content

Instantly share code, notes, and snippets.

View nythrox's full-sized avatar
🌊

Jason Butler nythrox

🌊
View GitHub Profile
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@perival
perival / cg-meta-graph.adoc
Last active August 4, 2023 07:03
A Simple Meta-Data Model for a Graph Database - neo4j

A Simple Meta-Data Model for a Graph Database

Setting up a Meta-Data Framework

This GraphGist is a quick exploration of a simple meta-data administration which can be used to store the structure of the nodes and relationships in a graph database like neo4j.

The data that is set up here could be used in an application layer to provide tailored

@hackwaly
hackwaly / coroutine.js
Last active October 28, 2020 02:30
Coroutine, go and call/cc implemented in javascript (use generator, less then 100 line).
var go;
var callcc;
(function () {
function noop() {}
var iteratorConstructor = function* () {}().constructor;
function isIterator(p) {
return p != null && p.constructor === iteratorConstructor;
}
@zenparsing
zenparsing / optional-chaining-proxy.js
Last active April 10, 2023 18:14
Optional chaining with JS Proxy
const unwrapSymbol = Symbol();
function unwrap(x) {
if (this == null)
return this;
let f = this[unwrapSymbol];
if (typeof f !== "function")
@Avaq
Avaq / combinators.js
Last active July 15, 2024 14:46
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@enghqii
enghqii / Program.cs
Created August 29, 2016 18:15
C# Coroutine example
using System;
using System.Collections;
using System.Collections.Generic;
namespace Generator3
{
class Program
{
// classic Generator
static IEnumerable<string> Script()

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@eiriktsarpalis
eiriktsarpalis / cont.fsx
Last active December 22, 2020 00:32
A Continuation monad with stacktrace support in F# 4.1
open System
open System.Runtime.CompilerServices
type SymbolicException =
{
Source : Exception
Stacktrace : string list
}
module SymbolicException =
@b-studios
b-studios / 01.README.md
Last active November 23, 2020 22:58
Syntactic sugar for step-by-step annotated functions in pointfree style

When defining complex functions in pointfree style, I often find myself switching to pointful style. Sometimes, I even convert to ANF and annotate the types to understand the steps.

After completing the function definition, I often convert back to pointfree style for conciseness. End of the story: To understand it again a couple of weeks later, I start expanding to annotated pointful again.

The small 10-lines library at the end of this post allows to define pointfree functions with intermediate type annotations.

Credits: Agda and EqReasoning for syntactical inspiration.