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
// InflatableSeqLock | |
// Copyright(C) 2016 Oracle and/or its affiliates | |
// Dave Dice : https://blogs.oracle.com/dave | |
// | |
// Remarks: | |
// * Implements composite writer mutex and seqlock in a single word-sized lock. | |
// Allows optimistic reading and pessimistic writing. | |
// Readers don't write to shared synchronization metadata, which helps avoid | |
// coherence traffic. Readers must tolerate observing inconsistent state, however. | |
// * Writer mutex is based on LIFO-CR lock from http://arxiv.org/abs/1511.06035. |
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
;;; Install | |
;; requestが必要なので M-x package-install request などでインストールしておく | |
;; init.elなどでロードする | |
;; (load-file "/path/to/deepl.el") | |
;; キーバインドを設定しておく | |
;; (global-set-key (kbd "C-c t") 'deepl-translate) | |
;;; Usage | |
;; 翻訳したい部分をリージョン選択して設定したキーバインド、または M-x deepl-translate | |
;; 翻訳結果がミニバッファに出る。また、同じ内容がクリップボードにコピーされている |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; BACK UP YOUR LOGSEQ DIR BEFORE RUNNING THIS! | |
;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Copyright (C) Aug 4 2022, William R. Burdick Jr. | |
;; | |
;; LICENSE | |
;; This code is dual-licensed with MIT and GPL licenses. |
These are notes to the stream: https://youtu.be/S9V-pcTrdL8
- We are not aware of a lot of GNU software available to us.
- Seems that Guix more hacker-friendly/explorable.
Description | Nix | Guix | Comment |
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
;;; publish --- Summary | |
;;; Commentary: | |
(require 'find-lisp) | |
;;; Code: | |
(defun hugcis/publish-note (file) | |
"Publish a note in FILE." | |
(with-current-buffer (find-file-noselect file) | |
(projectile-mode -1) | |
(setq org-hugo-section "notes" |
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
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |