On Linux: lsof -PniTCP -r 1 | grep 1.2.3.4
On Windows: netstat -tabn 10 | find "1.2.3.4"
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
'strict'; | |
function log(msg){document.getElementById('outp').innerText+= msg+"\r\n";} | |
log("Reed solomon octal coding for short messages\r\n"); | |
const extraCodes = 2; | |
let orig = [46,219,120,55]; | |
let int32Val = (orig[0] << 24) + (orig[1] << 16) + (orig[2] << 8) + orig[3]; | |
log("tag value="+int32Val); |
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
using System.IO.MemoryMappedFiles; | |
using System.Runtime.InteropServices; | |
namespace MemMapTests; | |
internal static class Program | |
{ | |
private const long Megabyte = 1048576; | |
private const long Kilobyte = 1024; |
Take a normal forth-like
25 4 * 100 = // true
Add parenthesis as a re-write rule, and move one symbol from the left to the right
write(2 4 *)
becomes 2 4 * write
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
public static uint DataHash(byte[] data, uint len) | |
{ | |
var hash = len; | |
for (uint i = 0; i < len; i++) | |
{ | |
hash += data[i]; | |
hash ^= hash >> 16; | |
hash *= 0x7feb352d; | |
hash ^= hash >> 15; | |
hash *= 0x846ca68b; |
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
[Test] | |
public void tiny_crypto() | |
{ | |
var key = new byte[] { 55, 167, 44, 86, 217 }; | |
var secretMessage = "This is the input text"; | |
var input = Encoding.UTF8.GetBytes(secretMessage); | |
var encrypted = Encode(input, key); |
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
/** | |
* dwt97.c - Fast discrete biorthogonal CDF 9/7 wavelet forward and inverse transform (lifting implementation) | |
* | |
* This code is provided "as is" and is given for educational purposes. | |
* 2006 - Gregoire Pau - gregoire.pau@ebi.ac.uk | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
maybe the wavefunction oscilates through time, taking alternate paths, until it gets stuck somewhere. Maybe this getting stuck loses information locally. That would seem to give a mechanism for collapse and directionality of time.
Forth and List based on a 'fundamental container type'. Forth -> stack
, Lisp -> linked-list
.
We take as the fundamental container type a list/stack hybrid.
Anything in a list is data. Anything outside is a function call.
Motivational example
(4) (1 2) + * # 12
(4 1 2) + * # same
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
// No keywords? | |
my.thing { // a namespace | |
// proc head | |
procname => | |
inParam1 <- (u8) // a byte list | |
inParam2 <- "" // a string | |
{ | |
// proc body |