https://eater.net -> Build an 8-bit Computer from Scratch
Create in Verilog? https://en.wikipedia.org/wiki/Verilog --> https://github.com/google/bbcpu
Run with Verilator? https://www.veripool.org/wiki/verilator
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 |
// https://web.archive.org/web/20141119215047/http://jsperf.com/javascript-quicksort-comparisons | |
// based on work from Vladimir Yaroslavskiy: https://web.archive.org/web/20151002230717/http://iaroslavski.narod.ru/quicksort/DualPivotQuicksort.pdf | |
var dualPivotQuicksort = (function (Math, toString, undefined) { | |
'use strict'; | |
function swap(arr, i, j) { | |
var temp = arr[i]; | |
arr[i] = arr[j]; | |
arr[j] = temp; | |
} | |
function dualPivotQuicksort(arr, comp, left, right, div) { |
https://eater.net -> Build an 8-bit Computer from Scratch
Create in Verilog? https://en.wikipedia.org/wiki/Verilog --> https://github.com/google/bbcpu
Run with Verilator? https://www.veripool.org/wiki/verilator
#!/bin/bash | |
S3_BUCKET_NAME=$1 | |
CF_ID=$2 | |
# Sync all files except for service-worker and index | |
echo "Uploading files to $S3_BUCKET_NAME..." | |
aws s3 sync build s3://$S3_BUCKET_NAME/ \ | |
--acl public-read \ | |
--exclude service-worker.js \ |
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
My experience is mostly with Java backend services in the cloud, so the advice in this post will almost certainly be biased towards this kind of error handling. But hopefully, some of it will be generally applicable and help you maintain and debug your programs in the long run.
I don't claim that these are universal best practices, but I have found these to be useful as general guidelines. As always, use your best judgment and do things that make sense in your context.
In Java, a full exception is: