I hereby claim:
- I am ismaelga on github.
- I am ism (https://keybase.io/ism) on keybase.
- I have a public key whose fingerprint is 3595 FFAF 9015 F5F6 8B53 82A5 20CB F239 6D77 8B3B
To claim this, I am signing this object:
CURRENT=`pwd` | |
cd /tmp | |
git clone https://github.com/brhs/nomouse.git | |
cd nomouse | |
make | |
nohup ./bin/nomouse & | |
cd $CURRENT | |
clear | |
exit |
I hereby claim:
To claim this, I am signing this object:
defmodule AppendBench do | |
use Benchfella | |
@list Enum.into 1..10000, [] | |
bench "++" do | |
h = Enum.at @list, 0 | |
@list ++ [h] | |
end |
defmacro defredis_script(name, script) do | |
script_sha = :crypto.hash(:sha, script) | |
quote bind_quoted: [script_sha: script_sha, name: name, script: script] do | |
def unquote(name)(client, keys \\ [], argv \\ []) do | |
query_args = [length(keys)] ++ keys ++ argv | |
case Exredis.query client, ["EVALSHA", unquote(script_sha)] ++ query_args do | |
<<"NOSCRIPT", _ :: binary>> -> | |
Exredis.query client, ["EVAL", unquote(script)] ++ query_args | |
reply -> reply | |
end |
nickel-demo git:master ❯ RUST_BACKTRACE=1 cargo run --verbose ⏎ ✹ ✭ | |
Fresh matches v0.1.2 | |
Fresh nickel_macros v0.0.1 (https://github.com/nickel-org/nickel.rs.git#cd9591d2) | |
Fresh gcc v0.1.7 | |
Fresh libc v0.1.2 | |
Fresh log v0.2.3 | |
Fresh groupable v0.1.0 (https://github.com/nickel-org/groupable-rs#efc8d769) | |
Fresh regex v0.1.14 | |
Fresh pkg-config v0.2.1 | |
Fresh gcc v0.2.1 |
{:ok, content} = File.read("test/example_script.lua") | |
defredis_script(:return_one_file, content) |
~/hello_world ❯❯❯ sudo dtruss -f /usr/local/bin/cargo build | |
PID/THRD SYSCALL(args) = return | |
42307/0x231a8: thread_selfid(0x0, 0x0, 0x0) = 143784 0 | |
42307/0x231a8: csops(0x0, 0x0, 0x7FFF58CC4248) = 0 0 | |
42307/0x231a8: issetugid(0x0, 0x0, 0x7FFF58CC4248) = 0 0 | |
42307/0x231a8: shared_region_check_np(0x7FFF58CC2188, 0x0, 0x7FFF58CC4248) = 0 0 | |
42307/0x231a8: stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF58CC3318, 0x7FFF58CC4248) = 0 0 | |
42307/0x231a8: open("/dev/dtracehelper\0", 0x2, 0x7FFF58CC4140) = 3 0 | |
42307/0x231a8: close(0x3) = 0 0 |
require 'benchmark/ips' | |
require 'set' | |
sizes = [10, 100, 1_000, 10_000] | |
accesses = %i(first last hits misses) | |
class NewSet < Set | |
def initialize(enum = nil, &block) | |
@hash = Hash.new(false) | |
super |
# Install apt-get packages: | |
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config | |
# Install chruby: | |
cd | |
wget https://github.com/downloads/postmodern/chruby/chruby-0.2.3.tar.gz | |
tar -xzvf chruby-0.2.3.tar.gz | |
cd chruby-0.2.3 | |
sudo make install |