Notes on adding Constraint Kinds to Rust
a trait can be thought of as a type operator generating a "constraint" - what in Rust would usually be called a bound. For example:
// Declares a new item `Foo` with kind `type -> constraint`
trait Foo { }| // This code demonstrates a simplified "stackification" algorithm to turn | |
| // instructions in a basic block back into a tree. This is useful when | |
| // generating WebAssembly code from assembly instructions in SSA form. | |
| // | |
| // It's the algorithm used by LLVM's WebAssembly backend, viewable here: | |
| // https://github.com/llvm-mirror/llvm/blob/master/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | |
| type InsKind = | |
| 'Add' | | |
| 'LocalSet' | |
C News Vol. 1 Issue 11 Sept 15, 1988
CHOOSING A MEMORY MODEL by Bill Mayne
ABSTRACT: The meaning of the "near", "far", and "huge"
keywords specifying pointer types and how these are related to
the various memory models available to C programmers using the
80x86 family of processors used in IBM and compatible PCs and
| #! /bin/bash | |
| set -x | |
| set -e | |
| function git_commit { | |
| git commit -a -m"litex import: $1" | |
| } | |
| mkdir -p repos |
| (* CanHalveEven.v *) | |
| Inductive Even : nat -> Prop := | |
| | Even_base : Even 0 | |
| | Even_step : forall n, Even n -> Even (S (S n)). | |
| Check Even_ind. | |
| Theorem can_halve_even : | |
| forall n, Even n -> (exists k, k + k = n). |
| To make Pageant automatically run and load keys at startup: | |
| - Find the location of pageant.exe | |
| - Windows key + R to open the 'run' dialog box | |
| - Type: 'shell:startup' in the dialog box | |
| - Create a shortcut to the pageant.exe and put into this startup folder. |
| package main | |
| // @lizrice, mostly copied from @doctor_julz: https://gist.github.com/julz/c0017fa7a40de0543001 | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "syscall" | |
| ) |
| -- Floppy disk read data pulse catcher | |
| -- Eric Smith <spacewar@gmail.com> | |
| -- 2016-08-02 | |
| -- WARNING: untested | |
| library ieee; | |
| use ieee.std_logic_1164.all; | |
| use ieee.numeric_std.all; | |
| entity floppy_rd_pulse_catcher is |
| user www; | |
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include /usr/local/etc/nginx/mime.types; | |
| default_type application/octet-stream; |