Skip to content

Instantly share code, notes, and snippets.

View andrcmdr's full-sized avatar
:octocat:
=(^",..,"^)= 🐧 🦀

Andrew Bednoff andrcmdr

:octocat:
=(^",..,"^)= 🐧 🦀
View GitHub Profile
@andrcmdr
andrcmdr / huawei_e8372_config.md
Created September 26, 2021 19:50 — forked from guseppiguliano/huawei_e8372_config.md
Huawei E8372 Linux Configuration and Setup

Dependencies

  1. usb_modeswitch, usb_modeswitch-data
  2. libusb1
  3. libusb-devel(Fedora), libusb-dev(Debian based)

Configuration

By default, your linux box would register your Huawei E8372 as a Mass Storage device and not (somehow) as a modem. First, make sure you have the exace same device we're talking about. This can be confirmed by looking at 2 values. Give the following command (while the dongle is plugged in):

    sudo su
    lsusb | grep Huawei
@andrcmdr
andrcmdr / async_swift_proposal.md
Created February 11, 2020 22:40 — forked from lattner/async_swift_proposal.md
Concrete proposal for async semantics in Swift

Async/Await for Swift

Introduction

Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.

This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.

Rust/Haskell: Higher-Kinded Types (HKT)

A higher kinded type is a concept that reifies a type constructor as an actual type.

A type constructor can be thought of in these analogies:

  • like a function in the type universe
  • as a type with a "hole" in it
@andrcmdr
andrcmdr / AsyncXMLParser.java
Created December 13, 2018 15:26 — forked from shvalb/AsyncXMLParser.java
Async XML Parser using Aalto and Vertx
/**********************************************
* LICENSE
* --------
* https://github.com/georocket/georocket#license
* http://www.apache.org/licenses/LICENSE-2.0
**********************************************/
package xml;
@andrcmdr
andrcmdr / OwnershipTLDR.md
Created August 9, 2018 06:56 — forked from Gankra/OwnershipTLDR.md
Swift Ownership Manifesto TL;DR

Swift Ownership Manifesto TL;DR

Most of the manifesto is background and detailed definitions -- if you're confused or want details, read the manifesto!

https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170213/032155.html

Note also that manifestos aren't complete proposals -- syntax and details may change!

One piece of background: inout is kinda complicated because it can be used on computed properties -- foo(&val.x) might be sugar for

@andrcmdr
andrcmdr / json.lua
Created March 30, 2018 23:24 — forked from tylerneylon/json.lua
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@andrcmdr
andrcmdr / programming-languages.csv
Created November 25, 2017 06:47 — forked from turicas/programming-languages.csv
Download list of programming languages from Wikipedia
name wikipedia_url
A# .NET https://en.wikipedia.org/wiki/A_Sharp_(.NET)
A# (Axiom) https://en.wikipedia.org/wiki/A_Sharp_(Axiom)
A-0 System https://en.wikipedia.org/wiki/A-0_System
A+ https://en.wikipedia.org/wiki/A%2B_(programming_language)
A++ https://en.wikipedia.org/wiki/A%2B%2B
ABAP https://en.wikipedia.org/wiki/ABAP
ABC https://en.wikipedia.org/wiki/ABC_(programming_language)
ABC ALGOL https://en.wikipedia.org/wiki/ABC_ALGOL
ABSET https://en.wikipedia.org/wiki/ABSET
@andrcmdr
andrcmdr / latency.markdown
Created July 22, 2017 03:29 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@andrcmdr
andrcmdr / gnome-tracker-disable.md
Last active December 4, 2017 23:00 — forked from vancluever/gnome-tracker-disable.md
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@andrcmdr
andrcmdr / λcube.md
Last active July 25, 2022 01:59 — forked from brendanzab/λcube.md
Lambda λ Cube (by Hendrik 'Henk' Pieter Barendregt)

System λ

The untyped Lambda Calculus

e ::=             terms:
  x               variable
  e e             application
  λ x . e         abstraction