Skip to content

Instantly share code, notes, and snippets.

View 4750U Ubuntu boot log
-- Logs begin at Tue 2020-12-29 21:47:32 WET, end at Mon 2021-03-08 10:42:52 WET. --
mar 08 09:09:46 asimov kernel: Linux version 5.8.0-44-generic (buildd@lgw01-amd64-054) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 (Ubuntu 5.8.0-44.50~20.04.1-generic 5.8.18)
mar 08 09:09:46 asimov kernel: Command line: BOOT_IMAGE=/vmlinuz-5.8.0-44-generic root=UUID=c109c6b4-27ff-42a7-8b03-33ced90a63b9 ro quiet splash vt.handoff=7
mar 08 09:09:46 asimov kernel: KERNEL supported cpus:
mar 08 09:09:46 asimov kernel: Intel GenuineIntel
mar 08 09:09:46 asimov kernel: AMD AuthenticAMD
mar 08 09:09:46 asimov kernel: Hygon HygonGenuine
mar 08 09:09:46 asimov kernel: Centaur CentaurHauls
mar 08 09:09:46 asimov kernel: zhaoxin Shanghai
mar 08 09:09:46 asimov kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
@pedrocr
pedrocr / comparison.rs
Created Jan 6, 2021
Precision of FastInvSquare
View comparison.rs
fn fast_invsqrt(number: f32, iterations: usize) -> f32 {
let threehalfs: f32 = 1.5;
let x2: f32 = number * 0.5;
let mut i: u32 = number.to_bits();
i = 0x5f3759df - (i >> 1);
let mut y: f32 = f32::from_bits(i);
for _ in 0..iterations {
y = y * ( threehalfs - ( x2 * y * y ) );
}
y
@pedrocr
pedrocr / nef_expanded.rs
Created Nov 19, 2020
NEF multiversion expanded
View nef_expanded.rs
mod nef {
use std::f32::NAN;
use crate::decoders::*;
use crate::decoders::tiff::*;
use crate::decoders::basics::*;
use crate::decoders::ljpeg::huffman::*;
const NIKON_TREE: [[[u8; 16]; 3]; 6] = [
[
[0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0],
[5, 4, 3, 6, 2, 7, 1, 0, 8, 9, 11, 10, 12, 0, 0, 0],
@pedrocr
pedrocr / arw_expanded.rs
Created Nov 18, 2020
Expanded ARW multiversion
View arw_expanded.rs
mod arw {
use std::f32::NAN;
use std::cmp;
use crate::decoders::*;
use crate::decoders::tiff::*;
use crate::decoders::basics::*;
use multiversion::multiversion;
pub struct ArwDecoder<'a> {
buffer: &'a [u8],
rawloader: &'a RawLoader,
@pedrocr
pedrocr / gist:f3df44af33b9aaa3098ec345598d7bad
Created Sep 18, 2020
sway discussion about Ctrl+Shift
View gist:f3df44af33b9aaa3098ec345598d7bad
12:22 < Guest47651> Hello. Does someone know how to fix this problem? I use Ctrl+Shift combination to switch
keyboard layout, and because of that I can't use combinations with Ctrl+Shift no more, like
Ctrl+Shift+T in Firefox.
12:25 < kennylevinsen> which method did you use to configure the switch to occur?
12:32 < Guest47651> My sway config: https://pastebin.com/zM2afNGx
12:32 -!- arti [~arti@2001:bb8:4008:2020::f] has quit [Ping timeout: 240 seconds]
12:33 < Guest47651> I use method which is described in wiki
12:33 -!- arti [~arti@2001:bb8:4008:2020::f] has joined #sway
12:33 < kennylevinsen> the switch is handled by libxkbcommon, which consumes the events.
12:35 < Guest47651> And?
@pedrocr
pedrocr / gist:d618d47d76e7196882f65b014f6bbbac
Last active Aug 19, 2020
sway debug log of output configs not being correctly applied
View gist:d618d47d76e7196882f65b014f6bbbac
00:00:00.000 [sway/main.c:326] Sway version v1.5-108b8e97 (Aug 19 2020, branch 'HEAD')
00:00:00.004 [sway/main.c:153] Linux coulson 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
00:00:00.005 [sway/main.c:169] Contents of /etc/lsb-release:
00:00:00.005 [sway/main.c:153] DISTRIB_ID=Ubuntu
00:00:00.005 [sway/main.c:153] DISTRIB_RELEASE=20.04
00:00:00.005 [sway/main.c:153] DISTRIB_CODENAME=focal
00:00:00.005 [sway/main.c:153] DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
00:00:00.005 [sway/main.c:169] Contents of /etc/os-release:
00:00:00.005 [sway/main.c:153] NAME="Ubuntu"
00:00:00.005 [sway/main.c:153] VERSION="20.04.1 LTS (Focal Fossa)"
View gist:30f3e224bb18cb7d70755086a0a92208
$ sudo parted -ls
[sudo] password for pedrocr:
Model: ATA SanDisk SD8SN8U1 (scsi)
Disk /dev/sda: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1000MB 999MB primary ext4 boot
View gist:6e2fa4f3526efbb7ee7af2b5cee07b25
$ cargo +1.36.0 bloat --release --crates
Finished release [optimized] target(s) in 0.03s
Analyzing target/release/benchmark
File .text Size Crate
11.5% 52.3% 418.1KiB rawloader
4.6% 21.0% 168.1KiB std
3.3% 15.2% 121.6KiB toml
1.0% 4.4% 35.3KiB [Unknown]
0.6% 2.9% 23.2KiB rayon_core
View gist:fc329cec65b29c548d6aba953784c85d
$ cargo +1.35.0 bloat --release --crates
Finished release [optimized] target(s) in 0.06s
Analyzing target/release/benchmark
File .text Size Crate
14.8% 52.4% 418.7KiB rawloader
5.9% 20.9% 167.0KiB std
4.3% 15.1% 120.6KiB toml
1.2% 4.4% 35.3KiB [Unknown]
0.8% 3.0% 23.8KiB rayon_core
View gist:03ba5d05fc1fd1d3a17ff4a6ddb3d3ea
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
939c7b2d529b8c982672a6e141a8bef2348d358a
1d3cbe9f278297fffa83e4e0c99d8ba46903cc3e
3334d11adc926c0f6d86afc4897117d5559036f5
5d882cb5fc2d9d9fd68439021e48a90aa2e50e79
90e3d25009a201363e5cbe001f344f97f7f7c579
1a5797803a48fb71515e6bd6335d684a6cae6b6d
We cannot bisect more!