Skip to content

Instantly share code, notes, and snippets.

Dan Minshew newswim

Block or report user

Report or block newswim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View list-applicative.md
@Kazark
Kazark / NotNotLEM.idr
Last active Nov 13, 2018
Intuitionist logic is by no means denying the law of excluded middle!
View NotNotLEM.idr
module NotNotLEM
%default total
%access public export
notDistributesOverEither : Not (Either a b) -> (Not a, Not b)
notDistributesOverEither neither = (notLeft neither, notRight neither) where
notLeft : Not (Either a b) -> Not a
notLeft neither x = neither (Left x)
@busypeoples
busypeoples / HashTrie.js
Last active Jul 16, 2018
Implementing persistent data structures with HashTries
View HashTrie.js
// @flow
// Immutable Data Implementation
// Based on Hash Tries
// (NOTE: The actual implementation is based on hashed mapped tries!)
// But this can be seen as a basis for the actual implementation.
// This is only for learning purposes!
// Hash Trie or Hash Tree is a persistent data structure, commonly used
// to implement immuable maps.
View questions-for-your-interviewer.md

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com

Onboarding and the workplace

https://blog.vcarl.com/interview-questions-onboarding-workplace/

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
View 16.3-blogpost-signatures.js
class Example extends React.Component<
Props,
State,
Snapshot
> {
static getDerivedStateFromProps(
nextProps: Props,
prevState: State
): $Shape<State> | null {
// ...
View super-preliminary-elm-wasm-research.md

Super Preliminary Elm - Web Assembly Research

Back in December 2017, I started working on something I called Elmish-Wasm, which was just an experimental repo to compile something Elm-like to Wasm. I made some progress, but the helpful people I talked and I came to the conclusion that most of what I had so far (Haskell and Regex to interpret .elm files into rudimentary wasm) was something the Elm compiler and the Elm AST already did. Writing that code was a lot of fun, but maybe not the most valuable way to explore Elm and WebAssembly. Before jumping back into this project I would like to record the important facts and questions related to compiling Elm to Wasm.

What is Wasm?

A lot of people talk about Web Assembly as if its C++ that runs in the browser. Thats not the case. This belief must come from that fact that C can currently compile to web assembly. Wasm is human-unreadable bytecode. There is a human-readable version of wasm, called wat. It looks like this..

;; A function that adds two numbe
@bvaughn
bvaughn / eager-prefetching-async-data-example.js
Last active May 12, 2019
Advanced example for eagerly prefetching async data in a React component.
View eager-prefetching-async-data-example.js
// This is an advanced example! It is not intended for use in application code.
// Libraries like Relay may make use of this technique to save some time on low-end mobile devices.
// Most components should just initiate async requests in componentDidMount.
class ExampleComponent extends React.Component {
_hasUnmounted = false;
state = {
externalData: null,
};
@r00k
r00k / gist:2f243be6c30325f6a9b31844d91fc910
Last active Dec 14, 2017
uBlock Origin filters to remove annoying Twitter features
View gist:2f243be6c30325f6a9b31844d91fc910
twitter.com##.trends.Trends.module
twitter.com##.dashboard-right.dashboard
twitter.com##.module.DashboardProfileCard
@gmaclennan
gmaclennan / guyana-volunteer-wifi.md
Last active Jul 4, 2018
Long-distance solar-powered wifi in the forests and savannahs of Guyana
View guyana-volunteer-wifi.md

Overview

Digital Democracy is looking for a volunteer to help pilot long-distance solar-powered wifi antennaes in indigenous communities in Guyana.

Background

Digital Democracy is working with the Wapichan people in the South Rupununi in Guyana to support them in efforts to secure their ancestral territory and increase their autonomy and self-determination. The Wapichan live in 17 villages and 7 smaller "satellites" in a large semi-natural savannah ecosystem surrounded by tropical forest. Communication between villages and with the outside world is difficult due to limited or no cellphone or internet access. We want to help the Wapichan improve their means of communicating with the rest of the world and communicating and coordinating between villages.

Location

@evancz
evancz / data-interchange.md
Last active May 4, 2019
Why do I have to write JSON decoders in Elm?
View data-interchange.md

A vision for data interchange in Elm

How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?

These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.

Literature Review

By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.

You can’t perform that action at this time.