Skip to content

Instantly share code, notes, and snippets.

View SomeoneSerge's full-sized avatar
๐Ÿ’ญ
Completely swamped again

Someone SomeoneSerge

๐Ÿ’ญ
Completely swamped again
View GitHub Profile
@edolstra
edolstra / nix-lang.md
Last active March 27, 2025 11:36
Nix language changes

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
@Nekrolm
Nekrolm / cfft.cpp
Created April 21, 2019 17:38
compile-time fast fourier transform
#include <iostream>
#include <complex>
#include <cmath>
#include <utility>
#include <chrono>
#include <array>
// std::complex<T>::operators -- not constexpr in C++17
template <class T>
@Nekrolm
Nekrolm / cpp20_concepts.cpp
Created January 11, 2020 15:12
c++20 concepts example
#include <type_traits>
template <class From, class To>
concept is_convertible = requires(From f){
{ static_cast<To>(f) } -> To;
};
template <typename Fst>
concept BaseFst = requires {
@Nekrolm
Nekrolm / cdfs.cpp
Created February 22, 2020 12:14
compile-time dfs
#include <iostream>
#include <cstring>
#include <type_traits>
#include <utility>
#include <tuple>
// graph descriptions
template <int... Next>
using AdjacentList = std::integer_sequence<int, Next...>;
@pfmoore
pfmoore / metadata.py
Created June 22, 2020 14:56
Python packaging metadata parser
import re
import json
from email.message import EmailMessage
from email import message_from_string
class InvalidMetadata(Exception):
pass
SINGLE_USE = [
"Metadata-Version",
@bratorange
bratorange / nix_env_unstable_guide.md
Last active July 8, 2024 13:49
Adding the nix unstable channel

Using the nipkgs unstable channel

Motivation

There a times when you need to build something from the nix unstable channel. For example the master contains a new package you need, but the next nixpkgs release is somewhere in the future, and you need this package now. In this guide I want to show how to install packages from unstable by using nix-env. Furthermore I hope to give a basic understanding of the channels concept.

What are nix channels?

A channel is a set of expressions which includes severall build, installation and configuration instructions for packages, services and the system itself. The repository normaly used here is nixpkgs. It is developed at https://github.com/NixOS/nixpkgs.

What is the nix unstable channel?

The unstable channel is a copy of the NixOS/nixpkgs master. It is pulled from github once in a while and will be available from a mirror under https://nixos.org/channels/nixpkgs-unstable. Since NixOS uses half-anual released stable channels, some changes (especially new f

@SomeoneSerge
SomeoneSerge / inverse-transform.ipynb
Last active October 5, 2020 19:42
Fair inverse transform implementation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrepg
andrepg / emojis.md
Created September 26, 2020 21:23
Markdown GitHub Emojis

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@twiecki
twiecki / GLM-hierarchical-jax.ipynb
Last active September 7, 2022 23:21
notebooks/GLM-hierarchical.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmicinski
kmicinski / church.rkt
Created April 6, 2021 04:17
Church numerals in Racket
#lang racket
;; numbers are represented as:
;; (lambda (f) (lambda (x) (f ... (f x))))
;; where there are n calls to f.
(define zero (lambda (f) (lambda (x) x)))
(define one (lambda (f) (lambda (x) (f x))))
(define two (lambda (f) (lambda (x) (f (f x)))))
;; do add1 n times, starting from 0