Skip to content

Instantly share code, notes, and snippets.

View sergev's full-sized avatar

Serge Vakulenko sergev

View GitHub Profile
@sergev
sergev / all-positive-bfloat16.txt
Created March 2, 2023 01:23
List of all bfloat16 values, non-negative
This file has been truncated, but you can view the full file.
0 00000000 0000000 = 0.0
0 00000001 0000000 = 1.175e-38
0 00000001 0000001 = 1.185e-38
0 00000001 0000010 = 1.194e-38
0 00000001 0000011 = 1.203e-38
0 00000001 0000100 = 1.212e-38
0 00000001 0000101 = 1.221e-38
0 00000001 0000110 = 1.231e-38
0 00000001 0000111 = 1.24e-38
0 00000001 0001000 = 1.249e-38
@sergev
sergev / dispak-copy-paste-detector.txt
Created August 26, 2022 23:31
Find code duplications in besm6/dispak sources.
$ cd dispak
$ pmd cpd --minimum-tokens 100 --language cpp --files .
Found a 21 line (327 tokens) duplication in the following files:
Starting at line 583 of /Users/vak/Project/Besm-6/dispak/dispak/./encoding.c
Starting at line 1093 of /Users/vak/Project/Besm-6/dispak/dispak/./encoding.c
static unsigned char tab0 [256] = {
/* 00 - 07 */ 0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
/* 08 - 0f */ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
/* 10 - 17 */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@sergev
sergev / mac-m1-mini-system-info.txt
Created February 3, 2022 02:34
Configuration of Mac M1 mini as reported by system_profiler
$ system_profiler -detailLevel mini
Apple Pay:
Apple Pay Information:
Platform ID: N5B2M002C3A50000
SEID: 040F305B636480021015133413308606BDD1D899F7E660AE
Device: 0xd2
Production Signed: Yes
Restricted Mode: No
Hardware: 0x00000007
@sergev
sergev / language-tutorial-compute.v
Created January 13, 2022 01:40
Calyx example: result of compiling language-tutorial-compute.futil into Verilog
/**
* Core primitives for Calyx.
* Implements core primitives used by the compiler.
*
* Conventions:
* - All parameter names must be SNAKE_CASE and all caps.
* - Port names must be snake_case, no caps.
*/
`default_nettype none
@sergev
sergev / boot-cbl-mariner-virtualbox.log
Created July 20, 2021 19:46
Start Microsoft CBL-Mariner Linux on VirtualBox
[ 0.000000] Linux version 5.10.42.1-3.cm1 (root@CBL-Mariner) (gcc (GCC) 9.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP Mon Jun 28 13:00:04 UTC 2021
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.10.42.1-3.cm1 rd.auto=1 root=PARTUUID=9997a588-8f45-4df6-ae96-372f3fbd883d init=/lib/systemd/systemd ro loglevel=3 quiet no-vmw-sta crashkernel=128M lockdown=integrity net.ifnames=0 plymouth.enable=0 systemd.legacy_systemd_cgroup_controller=yes
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009
@sergev
sergev / esp32c3_rev3_rom.dis
Created July 1, 2021 06:50
Disassembled ROM from Espressif ESP32-C3 microcontroller
This file has been truncated, but you can view the full file.
esp32c3_rev3_rom.elf: file format elf32-littleriscv
Disassembly of section .fixed.text:
40000000 <_start>:
40000000: 6910106f j 40001e90 <_init>
...
@sergev
sergev / boot-debian-nezha-riscv64.log
Created June 14, 2021 04:32
Start Debian Linux on Nezha board with RISC-V processor
Connecting to /dev/tty.usbserial-A50285BI, speed 115200
Escape character: Ctrl-^ (ASCII 30, RS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
[125]HELLO! BOOT0 is starting!
[128]BOOT0 commit : 27369ab
[130]set pll start
[132]periph0 has been enabled
[135]set pll end
@sergev
sergev / boot-freebsd-raspberry-pi4.log
Created October 6, 2020 08:49
Start FreeBSD on Raspberry Pi 4 board
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-CURRENT #0 e18fc94e525-c253475(main): Thu Oct 1 09:38:13 UTC 2020
[email protected]:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64
FreeBSD clang version 11.0.0 ([email protected]:llvm/llvm-project.git llvmorg-11.0.0-rc2-91-g6e042866c30)
@sergev
sergev / prolog.output
Created May 2, 2020 09:16
Output of prolog.cpp
=======Append with normal clause order:
solve@0: app(_5,_6,cons(1,cons(2,cons(3,nil))))
try:app(nil,_7,_7) :- true
I = nil
J = cons(1,cons(2,cons(3,nil)))
try:app(cons(_8,_9),_10,cons(_8,_11)) :- app(_9,_10,_11)
solve@1: app(_9,_6,cons(2,cons(3,nil)))
try:app(nil,_12,_12) :- true
I = cons(1,nil)
J = cons(2,cons(3,nil))
@sergev
sergev / prolog.cpp
Created May 2, 2020 09:13
Simple Prolog interpreter
//
// A simple Prolog interpreter written in C++,
// including an example test run as main().
//
// Copyright (c) Alan Mycroft, University of Cambridge, 2000.
//
// Source: https://www.cl.cam.ac.uk/~am21/research/funnel/prolog.c
//
#include <iostream>
#include <utility>