- Shall i implement it?
- No ...
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
| #!/bin/sh | |
| # ISC License | |
| # Copyright (c) 2026 Alexandre Gomes Gaigalas <alganet@gmail.com> | |
| # Permission to use, copy, modify, and/or distribute this software for any | |
| # purpose with or without fee is hereby granted, provided that the above | |
| # copyright notice and this permission notice appear in all copies. | |
| # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
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
| {- | |
| Weak excluded middle states that for every propostiion P, either ¬¬P or ¬P holds. | |
| We give a proof of weak excluded middle, relying just on basic facts about real numbers, | |
| which we carefully state, in order to make the dependence on them transparent. | |
| Some people might doubt the formalization. To convince yourself that there is no cheating, you should: | |
| * Carefully read the facts listed in the RealFacts below to see that these are all | |
| just familiar facts about the real numbers. |
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
| -- 1. Prove X⁷≡X in the polynomial quotient semiring ℕ[X]/(X≡X²+1) | |
| -- 2. Define a map toType : ℕ[X]/(X≡X²+1) → Type, | |
| -- using the semiring structure of Type and the fact that | |
| -- the equation T≡T²+1 holds for the type of binary trees T. | |
| -- 3. We deduce T⁷ ≡ T, by T⁷ ≡ toType X⁷ ≡ toType X ≡ T | |
| -- 4. ??? | |
| -- 5. Profit | |
| {-# OPTIONS --cubical #-} | |
| module S where |
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
| ; nasm hello.asm -fbin -o hello.com | |
| ; to run in DosBox: dosbox hello.com | |
| org 100h | |
| section .text | |
| start: | |
| mov ax, 13h | |
| int 10h |
*excerpt from slab6.txt in the SLAB6 download found at http://advsys.net/ken/download.htm#slab6 *
Both SLABSPRI&SLAB6(D) support a simpler, uncompressed voxel format using the VOX file extension. Here's some C pseudocode that describes the format:
long xsiz, ysiz, zsiz; //Variable declarations
char voxel[xsiz][ysiz][zsiz];
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
| /* | |
| * $ cc -O3 -Wall -pedantic -Wextra fact.c -lgmp | |
| */ | |
| #include <stdio.h> | |
| #include <gmp.h> | |
| static void | |
| factorial(long n, mpz_t r) | |
| { |
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
| /* | |
| * To compile and link: | |
| * | |
| * $ gcc -Wall -pedantic -Wextra fizzbuzz.s -no-pie -o fizzbuzz | |
| */ | |
| .data | |
| /* Strings to print */ | |
| fizz: .asciz "fizz\n" |
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
| #include <err.h> | |
| #include <stdio.h> | |
| #include <setjmp.h> | |
| #include <signal.h> | |
| static sigjmp_buf exception; | |
| #define try if (!sigsetjmp(exception, 1)) | |
| #define catch else | |
| #define throw siglongjmp(exception, 1) |
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
| #!/bin/bash | |
| set -x | |
| image="test.img" | |
| label="test" | |
| mntdir=`mktemp -d` | |
| sudo dd status=progress if=/dev/zero of=$image bs=6M count=1000 && sync | |
| echo 'type=7' | sudo sfdisk $image |
NewerOlder