This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The key thing to understand about big-O notations is that the discussion centers around functions. The input to a Big-O calculation is a function, and the output is another function. The 'O' function is a higher-order function, in that it operates on functions, and returns a function as well. | |
This is a notion well understood by haskell programmers, and anyone accustomed to using lambda abstractions, which I believe includes nearly all functional programmers. Python programmers are familiar with these ideas from decorators. When I programmed with python, decorators were a head-scratcher, in that once decorators were stacked upon other decorators, I'd be on shaky ground. The use of types greatly illuminates the concepts, so I'll switch to them here. | |
We can consider the function BigO :: (a -> N) -> (N -> N), where N is the natural numbers and a is a generic. That a in any problem where complexity analysis being applied will typically stand for some data structure like a binary tree or a linked list. It's whate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
-- https://github.com/Yuras/pdf-toolbox/issues/62 | |
import Pdf.Document | |
import qualified Pdf.Core as PC | |
import System.Environment | |
import qualified Data.Text as T | |
printRect :: String -> IO () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "nixpkgs"; | |
description = "qemu rust game of life"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
thing = with pkgs; | |
stdenv.mkDerivation rec { | |
name = "gameoflife"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "nixpkgs"; | |
description = "qemu rust game of life"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
thing = with pkgs; | |
stdenv.mkDerivation rec { | |
name = "gameoflife"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "nixpkgs"; | |
description = "qemu rust game of life"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
thing = with pkgs; | |
stdenv.mkDerivation { | |
name = "gameoflife"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "nixpkgs"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
nbdkit = with pkgs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "nixpkgs"; | |
description = "qemu with lm32"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
qemu52 = with pkgs; | |
stdenv.mkDerivation { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "nixpkgs"; | |
description = "2020 qemu advent calendar"; | |
outputs = { self, nixpkgs, ... }: | |
let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
prog = with pkgs; | |
stdenv.mkDerivation { | |
name = "qemu-advent-day01"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
NAME=${1:l} | |
pushd "$1" | |
pwd | |
setopt extendedglob | |
zip -X -0 "${NAME}" mimetype |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from traitlets.config.configurable import SingletonConfigurable | |
>>> class Foo(SingletonConfigurable): pass | |
>>> foo = Foo.instance() | |
>>> foo == Foo.instance() | |
True |
NewerOlder