This file contains 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
2850: REEQMBA | |
2851: ITDEUOI | |
2852: GK?UAAM | |
2853: SNDRAMO | |
2854: ZWILDAL | |
2855: ROTHHYC | |
2856: CILWAAH | |
2857: IO?ISST | |
2858: HTSOEIA | |
2859: EEHEINI |
This file contains 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
/* | |
tiny argument parser | |
accepts both - and -- prefixes (they are treated the same) | |
usage: | |
ArgParser parser = {.argc = argc, .argv = argv, .options_with_value = "output,foo"}; | |
while (arg_parser_next(&parser)) { | |
if (!parser.option) { | |
printf("standalone argument %s\n", parser.value); | |
} else if (strcmp(parser.option, "output") == 0) { | |
printf("outputting to %s...\n", parser.value); |
This file contains 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 mandelbrot set, but with functions other than z^2 + c | |
requires stb_image_write.h (found here: https://github.com/nothings/stb) | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. |
This file contains 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
;;; Call SystemV x64 functions dynamically | |
;;; Written in NASM | |
;;; This implements the SystemV calling convention (which is used by Linux and OS X) so that | |
;;; you can call functions with a variable (i.e. not known at compile time) number of arguments. | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; This is free and unencumbered software released into the public domain. | |
;; | |
;; Anyone is free to copy, modify, publish, use, compile, sell, or | |
;; distribute this software, either in source code form or as a compiled | |
;; binary, for any purpose, commercial or non-commercial, and by any |
This file contains 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
;;; Call C functions with a dynamic number of arguments x64 MSVC ;;; | |
;;; Written in NASM ;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; This is free and unencumbered software released into the public domain. | |
;; | |
;; Anyone is free to copy, modify, publish, use, compile, sell, or | |
;; distribute this software, either in source code form or as a compiled | |
;; binary, for any purpose, commercial or non-commercial, and by any | |
;; means. | |
;; |
This file contains 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
/* | |
Copyright (C) 2019 Leo Tenenbaum | |
This file is part of AutoDistortion. | |
AutoDistortion is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
AutoDistortion is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains 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
/* | |
complex.js | |
Client-side complex numbers in JavaScript | |
Licensed under the GNU General Public License (https://pommicket.github.io/LICENSE.txt) | |
*/ | |
var complex={};complex.i=[0,1];complex.logi=[0,.682188177];complex.PI=[Math.PI,0];complex.E=[Math.E,0];complex.lnAccuracy=20;complex.re=function(a){return a[0]};complex.im=function(a){return a[1]};complex.reToC=function(a){return[a,0]};complex.reC=function(a){return complex.reToC(complex.re(a))};complex.imC=function(a){return complex.reToC(complex.im(a))};complex.show=function(a){var im=complex.im(a);var re=complex.re(a);if(im==1&&re==0)return"i";if(im==0)return re.toString();if(im==1)return re+" + i";if(re==0)return im+"i";return re+" + "+im+"i"};complex.add=function(a,b){return[complex.re(a)+complex.re(b),complex.im(a)+complex.im(b)]};complex.neg=function(a){return[-complex.re(a),-complex.im(a)]};complex.sub=function(a,b){return complex.add(a,complex.neg(b))};complex.mult=function(a,b){var a_Re,a_Im,b_Re,b_Im;a_Re=complex.re(a);a_Im=complex.im(a); |
This file contains 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
/* | |
complex.js | |
Client-side complex numbers in JavaScript | |
Licensed under the GNU General Public License (https://pommicket.github.io/LICENSE.txt) | |
*/ | |
var complex = {}; | |
complex.i = [0, 1]; | |
complex.logi = [0, 0.682188177]; | |
complex.PI = [Math.PI, 0]; |