It's the parallel package on Ubuntu.
Before running parallel, you must run parallel --citation.
Yeah...
| # | |
| # Automatically generated file; DO NOT EDIT. | |
| # Linux/x86 4.14.83-gentoo Kernel Configuration | |
| # | |
| # | |
| # Gentoo Linux | |
| # | |
| CONFIG_GENTOO_LINUX=y | |
| CONFIG_GENTOO_LINUX_UDEV=y |
| addSearchAliasX("w", "wikipedia", "https://en.wikipedia.org/w/index.php?search="); | |
| iunmap(":"); |
| bits 64 | |
| global dehex | |
| [section .text] | |
| ; unsigned char dehex(const char hex[2]); | |
| dehex: | |
| mov ax, [rdi] | |
| sub ax, 12336 | |
| cmp ax, 2559 | |
| jl .L1 |
| # | |
| # Automatically generated file; DO NOT EDIT. | |
| # Linux/x86 4.14.65-gentoo Kernel Configuration | |
| # | |
| # | |
| # Gentoo Linux | |
| # | |
| CONFIG_GENTOO_LINUX=y | |
| CONFIG_GENTOO_LINUX_UDEV=y |
| /* | |
| * Intel SST Haswell/Broadwell PCM Support | |
| * | |
| * Copyright (C) 2013, Intel Corporation. All rights reserved. | |
| * | |
| * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License version | |
| * 2 as published by the Free Software Foundation. | |
| * | |
| * This program is distributed in the hope that it will be useful, |
| #!/usr/bin/env -S deno run --allow-net | |
| const api = async (path: string) => { | |
| const url = `https://svc.metrotransit.org/NexTrip/${path}?format=json`; | |
| const resp = await fetch(url); | |
| if (!resp.ok) { | |
| console.error(`Got back status ${resp.status} ${resp.statusText}`); | |
| Deno.exit(1); | |
| } | |
| return await resp.json(); |
| #!/bin/bash | |
| audio_viewer="nvlc" | |
| image_viewer="eog" | |
| pdf_viewer="zathura" | |
| video_viewer="nvlc" | |
| set -eu | |
| if [[ $# -ne 1 ]]; then |
| (* The G method supports thunks well. *) | |
| type 'a g_thunk_inner | |
| = GUnevaled of (unit -> 'a) | |
| | GEvaled of 'a | |
| type 'a g_thunk | |
| = GThunk of ('a g_thunk_inner) ref | |
| let g_force (th: 'a g_thunk): 'a = | |
| let GThunk th = th in |
So, essentially, for a NP-complete program, you want to iterate over the entire solution space.
To do this, you want to define a bijection between a range of the natural numbers and the solution space.
The most elegant way to do this is to define functions on the solutions that mirror the natural numbers (i.e., a homomorphism).
The natural numbers can be defined as type nat = Z | S of nat, which gives you an initial (zero) element and a successor function.
To define these for the solutions, I would have functions zero_soln and succ_soln which mirror Z and S:
Z : nat
S : nat -> nat
zero_soln : soln