Skip to content

Instantly share code, notes, and snippets.

@grossbart
grossbart / nix.md
Last active February 28, 2025 04:15
Nix on macOS

Nix

Nix is a powerful package manager that makes package management reliable and reproducible. It provides atomic upgrades and rollbacks, side-by-side installation of multiple versions of a package, multi-user package management and easy setup of build environments.

Installation

import { Observable } from "rxjs";
Observable.prototype[Symbol.asyncIterator] = createAsyncIterator;
async function* createAsyncIterator() {
const promise = [];
const values = [];
let done = false;
let error = null;
@VictorTaelin
VictorTaelin / dependently_typed_syntaxes.md
Last active February 5, 2018 06:02
Syntaxes for dependently typed languages

Syntaxes for dependently typed languages

Luna's proposed syntax:

forall : @name arg_type return_type
lambda : #name arg_type return_body
rec    : %name recursive_term
apply  : $function argument
let    : name body
@JamieMason
JamieMason / es6-partial-application.md
Last active September 19, 2020 20:41
ES6 Partial Application in 3 Lines

ES6 Partial Application in 3 Lines

const pApply = (fn, ...cache) => (...args) => {
  const all = cache.concat(args);
  return all.length >= fn.length ? fn(...all) : pApply(fn, ...all);
};

Example

@skabber
skabber / exportOptions.plist
Last active February 25, 2025 01:10
Export Options Plist Example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>XXXXXXXXXX</string>
<key>uploadBitcode</key>
<true/>
@busypeoples
busypeoples / PhantomTypeReasonML.md
Last active February 6, 2024 21:29
Phantom types in ReasonML

Phantom types in ReasonML

Introduction

"A phantom type is a parametrised type whose parameters do not all appear on the right-hand side of its definition..." Haskell Wiki, PhantomType

The following write-up is intended as an introduction into using phantom types in ReasonML.

Taking a look at the above definition from the Haskell wiki, it states that phantom types are parametrised types where not all parameters appear on the right-hand side. Let's try to see if we can implement a similar example as in said wiki.

@joshdholtz
joshdholtz / .env
Last active July 10, 2025 15:46
Using Dotenv and environment variables with fastlane
STUFF = this is some stuff
@appetizermonster
appetizermonster / WebAssembly on EOS 번역.md
Created July 9, 2017 02:11
WebAssembly on EOS 번역

EOS에서의 Web Assembly - 초당 50,000회 전송

우리는 EOS용 컨트랙트 작성용으로 작으면서도 견고한 스크립트 언어를 사용하길 원했습니다. 첫 선택은 Wren(프로그래밍 언어)이었습니다. 몇 주 전, 저는 빈 컨트랙트를 이용해서 Wren의 성능을 테스트해봤습니다, 대략 초당 1000 트랜잭션 정도의 퍼포먼스를 보여주였으나, 우리의 목표를 달성하기에는 너무 느린 퍼포먼스였습니다.

그래서 지난 몇 주 동안, EOS 개발팀은 Wren을 버리고, 새롭게 Web Assembly를 차용했습니다. 그리고 오늘, 현재까지의 진행 상황과 성과에 대해서 알려드리고자 합니다.

Web Assembly에 대해서

Web Assembly는 Microsoft, Google, Apple의 지원을 받아 최근에 개발된 웹 표준 기술입니다. Web Assembly의 목표는 신뢰할 수 없는 고성능 코드(네이티브 수준의 코드)를 브라우저에서 실행할 수 있게 만드는 것입니다.

@VictorTaelin
VictorTaelin / promise_monad.md
Last active October 24, 2024 01:25
async/await is just the do-notation of the Promise monad

async/await is just the do-notation of the Promise monad

CertSimple just wrote a blog post arguing ES2017's async/await was the best thing to happen with JavaScript. I wholeheartedly agree.

In short, one of the (few?) good things about JavaScript used to be how well it handled asynchronous requests. This was mostly thanks to its Scheme-inherited implementation of functions and closures. That, though, was also one of its worst faults, because it led to the "callback hell", an seemingly unavoidable pattern that made highly asynchronous JS code almost unreadable. Many solutions attempted to solve that, but most failed. Promises almost did it, but failed too. Finally, async/await is here and, combined with Promises, it solves the problem for good. On this post, I'll explain why that is the case and trace a link between promises, async/await, the do-notation and monads.

First, let's illustrate the 3 styles by implementing

@voluntas
voluntas / webrtc_for_work.rst
Last active July 6, 2025 15:40
仕事で WebRTC

仕事で WebRTC

日時:2023-01-15
作:@voluntas
バージョン:2023.1
url:https://voluntas.github.io/

この資料は以下の製品の宣伝を含みます。