Skip to content

Instantly share code, notes, and snippets.

View emmabastas's full-sized avatar
🏳️‍🌈

Emma Bastås emmabastas

🏳️‍🌈
View GitHub Profile
@emmabastas
emmabastas / package-managers-and-dependency-resolution.md
Created March 5, 2025 21:13
Hare I give a brief overview of three types of dependency resolution algorithms that are common: naive, backtracking and multiple versions. I present a few scenarios that showcase difficulties with dependency resolution, and how the resolution algorithm deals with them.

Package managers and three types of dependency resolution

Hare I give a brief overview of three types of dependency resolution algorithms that are common: naive, backtracking and multiple versions. I present a few scenarios that showcase difficulties with dependency resolution, and how the resolution algorithm deals with them.

I've been reading from

Comparison of version constraint patterns in Cargo, NPM, and PIP

This document exists to provide some limited data on how authors of popular Cargo, NPM, and PIP packages specify their dependencies. The goal is to get and idea of what use-cases for version constraints are common.

I describe the method at the end of the document but the TL;DR is that I looked at the 10 most "popular" packages for each of Cargo, NPM, and PIP and then categorized their their depency specifications into one of 6 patterns detailed bellow.

I find that semver compatible constraints dominate in the Cargo and NPM ecosystem, whereas observed incompatibilities constraints dominate in the PIP ecosystem. I explore the reasons for this in the section "PIP vs the rest" and "Technical differences matter".

I conclude that the semver compatible constraint is the most widely used, but that it's not clear-cut if it's the best pattern to use.

@emmabastas
emmabastas / README.md
Last active August 23, 2021 02:06
elm-format parsing overhaul doccumentation

elm-format parsing overhaul doccumentation

Background

Historically the Elm compiler implemented it's parsers using the libraries parsec and indents (in this document parsec is used to refer to both of these libraries), since elm-format is based on the Elm compiler it has inherited this as well. However, in Elm 0.19 the parsing codebase was overhauled, the Elm compiler got it's own parsing primitives and all of the parsers where rewritten to use these primitives instead of parsec. To integrate these changes into elm-format is non trivial and elm-format has continued using parsec.

This situation is not ideal, there is great value in having the parsing logic for the Elm compiler and elm-format be as similar as possible from a maintainability standpoint. Moreover, the primitives in the Elm compiler are more elegant and performant in the context of parsing Elm code. For the long term elm-format ne

@emmabastas
emmabastas / README.md
Last active April 13, 2022 13:39
Google Summer of Code 2021 Work Product Submission - Emma Bastås

Google Summer of Code 2021 Work Product Submission

Student: [Emma Bastås][eb]
Mentor: [Aaron VonderHaar][av]
Organization: [elm-tooling][et]
Original proposal: elm-tooling/gsoc-projects#13


@emmabastas
emmabastas / MyModule.elm
Last active August 16, 2020 17:53
Thoughts about safe recursion in Elm
module MyModule exposing (Expr(..), mirror, myExpression, sum)
import Safe.Recursion exposing (Recurse)
type Expr
= Num Int
| Add (Recurse Expr) (Recurse Expr)
| Mul (Recurse Expr) (Recurse Expr)