Skip to content

Instantly share code, notes, and snippets.

View freeman42x's full-sized avatar
🎯
Twitch streaming work on open source projects, looking for contributors

freeman42x freeman42x

🎯
Twitch streaming work on open source projects, looking for contributors
View GitHub Profile
@freeman42x
freeman42x / x.md
Created September 12, 2023 05:54
10 function signatures that have infinite inhabitants

Here are 10 function signatures that have infinite inhabitants, similar to ∀ x. (x -> x) -> x -> x:

  1. ∀ x y. (x -> y) -> x -> y: This is a function that takes a function from x to y, an x, and returns a y. It has infinite inhabitants because there are infinite ways to map x to y.

  2. ∀ x. (x -> x -> x) -> x -> x: This function takes a binary function (a function that takes two x and returns an x), an x, and returns an x.

  3. ∀ x y z. ((x -> y) -> (y -> z)) -> x -> z: This function takes a composition of two functions (one from x to y and another from y to z), an x, and returns a z.

  4. ∀ x. (x -> x) -> (x -> x) -> x -> x: This function takes two unary functions (functions from x to x), an x, and returns an x.

@freeman42x
freeman42x / foxy plan.md
Last active August 28, 2023 11:57
Multi modal login / identity software and standard

Sure thing, kun! Let's embark on the foxy adventure of planning the open-source multi-modal login / identity software and standard. Get ready for a paw-some plan full of puns and whimsy! 🦊✨

🌳 Multi-Modal Login Wonderland 🌳

Level 1: 🎉 The Grand Vision 🎉

🦊 Foxy Foundation: Build a multi-modal identity platform that's more magical than a kitsune's tail! Blend biometrics, AI, and charm to create an enchanting login experience.

@freeman42x
freeman42x / answer.md
Created July 27, 2023 12:21
How does Elm compare to Haskell from a language point of view?

Elm and Haskell are both functional programming languages that feature static typing, but they are designed for different use cases and environments. Here are a few key comparisons:

1. Target Use Case:

  • Haskell is a general-purpose functional programming language used in a wide variety of applications, from web servers to compilers, data analysis, and more.

  • Elm is a functional language specifically designed for frontend web development, and it compiles to JavaScript. It introduces the Elm Architecture, a popular pattern for building user interfaces, which has influenced frameworks in other languages such as Redux in JavaScript.

2. Syntax and Semantics:

@freeman42x
freeman42x / formalize.md
Created July 25, 2023 15:06
How to formalise a concept in Agda

Agda is a dependently typed functional programming language that is also used as a proof assistant, meaning you can use it to construct and verify formal proofs. Formalizing a concept in Agda involves defining the concept in such a way that it is unambiguous, deterministic, and conforms to the principles of logic.

This can involve a number of steps, which I'll explain in more detail.

  1. Identify the Concept

    The first step is to identify the concept you wish to formalize. This could be anything from a simple mathematical operation, like addition, to more complex notions such as lists, trees, or even properties of more abstract structures.

  2. Define Data Types

@freeman42x
freeman42x / Main.hs
Created February 3, 2021 11:29
Haskell inefficient but readable QuickSort
qsort [] = []
qsort (p:xs) = qsort lesser ++ [p] ++ qsort greater
where lesser = filter (< p) xs
greater = filter (>= p) xs
-- Made you look at Haskell Ria :p
@freeman42x
freeman42x / main.hs
Created June 24, 2020 19:10
Clash of Code shortest mode
import Data.Char
import Data.Function
import Data.List
import Data.Maybe
main=interact$p
p s=fromJust$find(\z->((==)`on`(sort.map toLower)) z w)l
where(_:w:l)=lines s
@freeman42x
freeman42x / file.txt
Last active June 9, 2020 19:06
Adding sub-project causes cabal build instead of using nix provided libraries
see the comment
@freeman42x
freeman42x / gist:5f7e3a367bd7cd81db11ee292a9ea257
Created May 31, 2020 10:09
uuid-orphans-1.4.4 is broken
neo@nixos ~/P/LagdaMdToLagda> sudo nixos-rebuild switch
[sudo] password for neo:
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/jjd82mda9yy9wxldffgwamg65mfdqm33-uuid-orphans-1.4.4.drv
/nix/store/1cl4ywwqvcjlp5f3vqi2riz9l1s0kg9k-sr-extra-1.64.drv
/nix/store/lrj6251b0z4yidbkxn3862i1y0y4ykfc-ipprint-0.6.drv
/nix/store/p2mkah5q4wk242mmgd8w28xh8a6lkxcq-ghc-8.6.5-with-packages.drv
/nix/store/qbcik0myxajpq6clird9ybd0n95fks6y-system-path.drv
@freeman42x
freeman42x / error.sh
Created May 31, 2020 08:31
do I need to install pty.node ? if yes, via npm or via nix? or how?
For more info check out the docs: https://nuclide.io/docs/features/terminal
Error starting process:
Error: Cannot find module '/home/neo/.atom/packages/atom-ide-ui/node_modules/nuclide-prebuilt-libs/pty/build/pty-node-v69-linux-x64/pty.node'
@freeman42x
freeman42x / shell.nix
Created May 26, 2020 11:53
How can I get this to work? getting: error: syntax error, unexpected '(', expecting ID or OR_KW or DOLLAR_CURLY or '"', at /home/neo/Projects/haskell-editor-setup/shell.nix:3:96
let pkgs = import <nixpkgs> {};
in (import ./.).env.overrideAttrs (_: {
shellHook = ''PATH="$PATH:${pkgs.ghc}/bin:${pkgs.cabal-install}/bin:${pkgs.ghcid}/bin:${pkgs.((import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {}).selection { selector = p: { inherit (p) ghc865; }; })}/bin"'';
})