From Mitchell Hashimoto's blog post and Ghostty source code:
"Zig's lack of built-in polymorphism is a feature, not a bug. We use explicit types and comptime to achieve zero-cost abstractions without hidden control flow."
| #!/bin/bash | |
| # Fetch the latest from the remote | |
| git fetch origin | |
| # Get the current branch | |
| current_branch=$(git rev-parse --abbrev-ref HEAD) | |
| echo "Current branch: $current_branch" |
| See: https://richg42.blogspot.com/2020/08/lzham-and-crunch-ip-will-be-placed-into.html | |
| // Begin here | |
| THIS SOFTWARE IS IN THE PUBLIC DOMAIN | |
| THIS IS FREE AND UNENCUMBERED SOFTWARE EXPLICITLY AND OVERTLY RELEASED AND CONTRIBUTED TO THE PUBLIC DOMAIN, PERMANENTLY, IRREVOCABLY AND UNCONDITIONALLY WAIVING ANY AND ALL CLAIM OF COPYRIGHT, IN PERPETUITY ON SEPTEMBER 15, 2020. | |
| 1. FALLBACK CLAUSES |
| // a functional quicksort in javascript | |
| function qSort(arr) { | |
| if (arr.length <= 1) return arr; | |
| else { | |
| const pivPoint = Math.floor(arr.length / 2); | |
| const pivot = arr[pivPoint]; | |
| const newArr = [].concat( | |
| qSort(arr.filter(x => x < pivot)), | |
| arr.filter(x => x === pivot), |
| // npm i -D eslint eslint-config-prettier eslint-plugin-prettier prettier | |
| module.exports = { | |
| env: { | |
| browser: true, | |
| commonjs: true, | |
| es6: true | |
| }, | |
| extends: ['eslint:recommended', 'prettier'], | |
| globals: { | |
| Atomics: 'readonly', |
| #!/bin/bash | |
| #redshift script with an optional command line argument | |
| # $1 = brightness percentage, 4 = 40%, optional command line argument | |
| # usage: ./less-bright.sh 5 (for 50%) | |
| #./less-bright.sh | |
| brt=${1:-4} | |
| echo "${brt}0% brightness" |
| // by Joshua Skootsky, January 21, 2020 | |
| const s = () => { | |
| setInterval(s, 0); | |
| setInterval(s, 0); | |
| }; | |
| //IIFE | |
| (function s(){ | |
| setInterval(s, 0); | |
| setInterval(s, 0); |
| ; This is a file I had lying around where I went through the beginning of SCIP (A scheme book) and translated it | |
| ; into Clojure as I went. Perfect for a gist? | |
| ; Joshua Skootsky, 2016 | |
| ; See xkcd #312 | |
| Clojure : Scheme | |
| def : define var |
I hereby claim:
To claim this, I am signing this object: