sequenceDiagram
participant files as Files
participant cc as C compiler
participant wasm2c as wasm2c
participant zig1 as zig1
participant zig2 as zig2
This file contains hidden or 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
python -c "print($(grep -v "}\$" fast.zig | wc -l) - $(grep -v "}\$" small.zig | wc -l))" | |
// 259 |
This file contains hidden or 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
// outputs | |
// | |
// deflate_old: 3.982s | |
// deflate_new: 2.08s | |
// | |
// deflate_old: 3.852s | |
// deflate_new: 2.075s | |
// | |
// deflate_old: 3.895s | |
// deflate_new: 2.044s |
This file contains hidden or 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
const std = @import("std"); | |
// Tested on Ubuntu 20.04.3 LTS x86_64 GNU/Linux | |
// `ulimit -s` => 8192 | |
pub fn main() void { | |
// var big: [16_384 * 1_023]u8 = undefined; // works | |
var big: [16_384 * 1_024]u8 = undefined; // Segmentation fault | |
_ = big; | |
std.debug.print("aybabtu\n", .{}); | |
} |
This file contains hidden or 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 libgit2 | |
# sudo apt install libgit2-dev # this is v0.28 but we need v1.0 | |
# Build libgit2 | |
sudo apt install libssl-dev | |
git clone https://github.com/libgit2/libgit2.git | |
cd libgit2 | |
mkdir build && cd build | |
cmake .. | |
cmake --build . --target install |
These instructions assert a clean install of Ubuntu 20.04 with no previous LLVM or C compiler installed.
apt update
apt install wget lsb-release software-properties-common
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh 11)"
ln -s /usr/lib/llvm-11/bin/lld /usr/bin/lld
ln -s /usr/lib/llvm-11/bin/clang /usr/bin/clang
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
_ "net/http/pprof" |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# Send commands by ssh on remote host for a sshfs mounted directory | |
# | |
# Install : rename this 'sshdo' (I suggest in /usr/bin/) | |
# Usage : $sshdo command | |
# Credits : python version by cbenz see it at http://cbenz.pointique.org/post/2009/09/18/Travailler-avec-sshfs | |
# Author: Hadrien Dorio <hadrien.dorio at gmail.com> | |
if ARGV.size < 1 | |
puts 'please enter a command'; exit 1 |