1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
jel;18.6 | |
jel;12.8 | |
jel;20.7 | |
jel;13.8 | |
jel;26.7 | |
jel;17.7 | |
jel;24.7 | |
jel;18.4 | |
jel;10.7 | |
jel;21.9 |
use std::rc::Rc; | |
use std::cell::RefCell; | |
#[derive(Debug)] | |
struct Node { | |
n: u32, | |
next: Option<Rc<RefCell<Node>>>, | |
} | |
type NodeT = Option<Rc<RefCell<Node>>>; |
use std::cell::Cell; | |
#[derive(Debug)] | |
struct Node { | |
n: usize, | |
next: Cell<usize>, | |
} | |
fn main() { | |
let nodes = { |
/* | |
$ cargo run --release --bin sp1 | |
Finished release [optimized] target(s) in 0.09s | |
Running `target/release/sp1` | |
9227465 | |
14930352 | |
24157817 | |
39088169 | |
63245986 | |
102334155 |
/* | |
After reading the description: | |
Character Meaning | |
c Matches any literal character c. | |
. (period) Matches any single character. | |
^ Matches the beginning of the input string. | |
$ Matches the end of the input string. | |
* Matches zero or more occurrences of the previous character. |
/* | |
Benchmark Mode Cnt Score Error Units | |
LinkedListBenchmark.arrayDeque avgt 6 86861,575 ± 6681,783 ns/op | |
LinkedListBenchmark.arrayList avgt 6 207511,921 ± 20828,824 ns/op | |
LinkedListBenchmark.linkedList avgt 6 70281,152 ± 9929,807 ns/op | |
mvn clean verify | |
java -jar target/benchmarks.jar LinkedListBenchmark |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>loomtest</groupId> | |
<artifactId>csp-game-of-life</artifactId> | |
<packaging>jar</packaging> | |
<name>CSP Game of Life</name> | |
<version>1.0.0-SNAPSHOT</version> |
/* | |
I was reading "Modern file input/output with Java Path API and Files helper methods" | |
https://blogs.oracle.com/javamagazine/post/path-files-input-output | |
... and the author compared the C-style to read a file against the | |
modern Java way using streams with `Files.lines`, filter, ... | |
I benchmarked them using JMH and the difference is huge ... | |
If you think I did something wrong here, then please comment in this gist. Thank you. |
#include <stdio.h> | |
/* | |
asteric-location.c:7:22: warning: initialization of ‘int’ from ‘int *’ makes integer from pointer without a cast [-Wint-conversion] | |
7 | int* b = &a, c = &a; | |
| ^ | |
*/ | |
// void bad_placement() { | |
// int a = 1; | |
// int* b = &a, c = &a; |