Skip to content

Instantly share code, notes, and snippets.

View ivanopagano's full-sized avatar

Ivano Pagano ivanopagano

View GitHub Profile

Fibers

Fibers are an abstraction over sequential computation, similar to threads but at a higher level. There are two ways to think about this model: by example, and abstractly from first principles. We'll start with the example.

(credit here is very much due to Fabio Labella, who's incredible Scala World talk describes these ideas far better than I can)

Callback Sequentialization

Consider the following three functions

@ChristopherDavenport
ChristopherDavenport / Libraries.md
Last active February 1, 2024 11:38
A Current Listing of Libraries

All the docs probably

base..

.> view base..

  (base..) : (b ->{𝕖} c) -> (a ->{𝕖} b) -> a ->{𝕖} c
  (base..) f g x = f (g x)
@ChristopherDavenport
ChristopherDavenport / PerformanceMetals.md
Created July 25, 2020 16:40
Metals VsCode Improvement

Quick PSA on Metals with vscode

Since scala changes a lot of files in build and vscode watches those files. It actually has quite a delay. Adding this to settings will improve performance by an enormous degree. Especially on larger projects.

"files.exclude": {
        "**/.bloop": true,
        "**/.metals": true,
 "**/target": true
@graninas
graninas / haskeller_competency_matrix.md
Last active April 8, 2025 16:34
Haskeller competency matrix
@jsynowiec
jsynowiec / sync_theme.py
Last active March 5, 2024 06:06
Sync iTerm2 color preset with macOS dark or light theme on start and when theme changes.
#!/usr/bin/env python3
"""Set iTerm2 color preset according to macOS theme.
Requires iTerm2 version 3.3 or newer.
Save as ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch/sync_theme.py and
enable under scripts menu in iTerm2.
"""
@julien-truffaut
julien-truffaut / friendlyOptics.MD
Last active September 16, 2020 05:16
Proposal for new optics names

Frieldly optics name proposals

Here are some proposal for optics names. The goal is to give a better intuition to beginners, especially people with no FP experience.

  • Setter -> Replace, Modify, Write
  • Fold -> Aggregate
  • NonEmptyFold -> Reduce
  • Getter -> Read
  • ReadOnlyOptional -> ???
@anonymoussprocket
anonymoussprocket / README.md
Last active November 28, 2020 18:09
Tezos Token Tantrum
@ChrisPenner
ChrisPenner / Optics Cheatsheet.md
Last active April 21, 2025 12:45
Optics Cheatsheet

Since macOS Catalina, the root drive is read-only. The solution is to create a separate APFS volume and a “synthetic” /nix directory which points to it:

# Check if /nix exists, if not:
echo 'nix' | sudo tee -a /etc/synthetic.conf
# this will create a "synthetic" empty directory /nix

# REBOOT so macOS sees the synthetic directory

# After rebooting, create an APFS volume for Nix