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 / λ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
@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 / dcdc.v
Last active April 27, 2020 13:34
Daily Clock Drift Correction (DCDC)
import (
math
os
strconv
)
fn dcdc(x f64) f64 {
return (x/(math.round(x/60)*60)-math.round(x/(math.round(x/60)*60)))*60*60*24*-1
}
@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 / keybase.md
Created December 21, 2018 23:12
Keybase proof

Keybase proof

I hereby claim:

  • I am andrcmdr on github.
  • I am commandr (https://keybase.io/commandr) on keybase.
  • I have a public key whose fingerprint is 3A2D 77D5 72D9 729A 0A82 C26D 3F14 B3B7 4890 C15F

To claim this, I am signing this object:

@andrcmdr
andrcmdr / kotlinask_13.kt.txt
Last active December 16, 2018 00:47
Questions for #kotlinask_13 about #Kolin features
Here some questions for #kotlinask_13 about #Kolin features:
⦁ Possibilities of compiling Kotlin/JVM code (with using of Vert.x project, for example) with GraalVM/SubstrateVM AoT Compiler - possible time/memory overhead during compile-time phase
⦁ Possibilities of applying project Loom and using of JVM fibers for Kotlin coroutines and suspend functions (for optimisation purposes maybe) in the future
⦁ Possibilities and abilities of writing (preemptive) thread dispatcher/scheduler/monitor for coroutines management, i.e. M:N mapping pool of concurrent fibers (coroutines) to thread-pool of system threads - for Kotlin/JVM and Kotlin/Native
⦁ Garbage collecting and reference counting (ARC?) mechanisms/algorithms in Kotlin/Native - possible overhead
@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 / main.css
Created August 23, 2018 07:35
DartPad
{}