Skip to content

Instantly share code, notes, and snippets.

@bbarker
bbarker / purescript-rpi4-howto.md
Last active June 6, 2020 12:26
Building or Installing PureScript on the Raspberry Pi 4 with Raspbian and the Nix package manager

Prerequisites

  • A Raspberry Pi 4 with Raspbian 10
  • At least a 32GB SD card and probably at least 10GB of free space available.

Overview

Increase swap space, switch to a 64-bit kernel to use Nix aarch64 packages, and use Nix packages where possible. At the time of this writing it was only necessary to build PureScript (purs) itself; you can check Hydra to see

@rlefevre
rlefevre / elm-linux-x64-static-0.19.1.md
Last active November 22, 2021 15:27
How to build an elm 0.19.1 binary statically linked to musl libc using docker

Elm 0.19.1 Linux x64 statically linked binary

This document describes how to build a statically linked binary of Elm 0.19.1 for Linux x64 using docker. The binary is built using Alpine Linux in order to easily link it statically to musl libc. This is how the official Elm 0.19.1 Linux binary is built.

Why?

Why build a statically linked binary?

Elm is currently distributed using npm. For Linux x64 (but this applies to any architecture), this requires to have a single x64 binary that works on all Linux x64 distributions. This is considerably easier to achieve by building a statically linked binary that will only depend on the Linux kernel ABI and System Call Interface but not on userpace libraries (see here for a compatibility survey of a dynamically built executable).

Why use docker?

@akpoff
akpoff / elm-lang-openbsd.md
Last active May 23, 2024 00:00
Building elm-lang on OpenBSD

Building elm-lang on OpenBSD

Requirements

  • haskell-platform
  • elm-lang BuildFromSource.hs script

Overview - OpenBSD considerations

@shortsightedsid
shortsightedsid / cl-udpip.lisp
Created October 27, 2014 22:01
Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
; Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand.
; After working on a short example on TCP, I found the
; need for a UDP tutorial. So, here goes.
; As usual, we will use quicklisp to load usocket.
@why-not
why-not / gist:4582705
Last active July 3, 2024 01:12
Pandas recipe. I find pandas indexing counter intuitive, perhaps my intuitions were shaped by many years in the imperative world. I am collecting some recipes to do things quickly in pandas & to jog my memory.
"""making a dataframe"""
df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'))
"""quick way to create an interesting data frame to try things out"""
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd'])
"""convert a dictionary into a DataFrame"""
"""make the keys into columns"""
df = pd.DataFrame(dic, index=[0])