Skip to content

Instantly share code, notes, and snippets.

View ELD's full-sized avatar

Eric Dattore ELD

View GitHub Profile
@edmundsmith
edmundsmith / writeup.md
Created July 7, 2019 20:47
Method for Emulating Higher-Kinded Types in Rust

Method for Emulating Higher-Kinded Types in Rust

Intro

I've been fiddling about with an idea lately, looking at how higher-kinded types can be represented in such a way that we can reason with them in Rust here and now, without having to wait a couple years for what would be a significant change to the language and compiler.

There have been multiple discussions on introducing higher-ranked polymorphism into Rust, using Haskell-style Higher-Kinded Types (HKTs) or Scala-looking Generalised Associated Types (GATs). The benefit of higher-ranked polymorphism is to allow higher-level, richer abstractions and pattern expression than just the rank-1 polymorphism we have today.

As an example, currently we can express this type:

@ladinu
ladinu / encryptedNixos.md
Last active March 1, 2024 07:19
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
@chriselsner
chriselsner / nix-on-macos-catalina.md
Last active January 24, 2024 18:35
Nix on macOS Catalina

Nix on macOS Catalina

I'm writing this gist for my own records but it might help someone else too.

Installing Nix

Support for Catalina has improved a lot since the update was first rolled out.

Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume option.

@rajinwonderland
rajinwonderland / Guide.md
Last active November 28, 2022 20:58
VS Code Syntax Highlighting on Keynote

A more detailed guide for copying VSCode themed syntax highlighting over to Keynote. Original Article

Prerequisites

  • VSCode Installed
  • Your favorite or theme installed and configured in your settings.
  • Keynote Installed
@brendanzab
brendanzab / reactive_systems_bibliography.md
Last active October 10, 2022 06:36
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@bonsi
bonsi / laravel-dusk-docker.md
Last active January 21, 2022 05:34
Get Laravel Dusk running within (lara)dock

NOTES

Working solution for laradock

  • spin up the selenium image (selenium/standalone-chrome) as included with laradock
  • in .env.dusk.local set APP_URL=http://nginx to point to the docker nginx image
  • in tests\DuskTestCase.php replace the line 'http://localhost:9515', DesiredCapabilities::chrome() with 'http://selenium:4444/wd/hub', DesiredCapabilities::chrome()
  • run php artisan dusk
  • ...
  • PROFIT
@taylorotwell
taylorotwell / gist:db67dd369b00022850b4
Last active November 16, 2021 08:33
Mac Yosemite Dev Machine Setup

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

Follow-up to Method on Emulating Higher-Kinded Types (HKTs) in Rust

First off, thanks for all the comments and kind words on the original writeup; I've been meaning to follow up on some of the suggestions and write about the different ways to represent monads (and functors, HKTs, etc) that now exist, but a month of being busy has kind of gotten in the way (mainly with three new kittens!).

And for sure, I do not expect (nor do I want) this to become the norm for production-level Rust: rather, I hope that this can contribute to the foundations of programming with higher-level abstractions in Rust, somewhat like how early template metaprogramming in C++ and typeclass-constraint-unification metaprogramming in Haskell have contributed, perhaps indirectly, to later innovations in their respective languages and ecosystems that were much more reasoned, sound and usable.

Changes, Edits, Refinements

One of the things suggested in the com

Looking into the Future

futures-rs is the library which will hopefully become a shared foundation for everything async in Rust. However it's already become renowned for having a steep learning curve, even for experienced Rustaceans.

I think one of the best ways to get comfortable with using a library is to look at how it works internally: often API design can seem bizarre or impenetrable and it's only when you put yourself in the shoes of the library author that you can really understand why it was designed that way.

In this post I'll try to put down on "paper" my understanding of how futures work and I'll aim to do it in a visual way. I'm going to assume you're already somewhat familiar with Rust and why futures are a useful tool to have at one's disposal.

For most of this post I'll be talking about how things work today (as of September 2017). At the end I'll touch on what's being proposed next and also make a case for some of the changes I'd like to see.

If you're interested in learning more ab

@ELD
ELD / ksp_mods.md
Last active August 29, 2015 14:00
ELD's Space Program Mod List

KSP Mod List

No links, yet, but they will be added in the future

  • Adjustable Landing Gear
  • Animate Emissive Module
  • Animated Decouplers
  • Atmospheric Sound Enhancement
  • BahamutoD Animation Modules
  • Chatterer
  • Collision FX
  • Community Resource Pack