Skip to content

Instantly share code, notes, and snippets.

Jason Rogers jacaetevha

Block or report user

Report or block jacaetevha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

JRuby Information:

jruby (2.5.3) 2019-08-12 a1ac7ff Java HotSpot(TM) 64-Bit Server VM 25.202-b08 on 1.8.0_202-b08 +jit [linux-x86_64]


[someone@somehost]$ java -Djruby.native.verbose=true -jar dbconsole-1.0.3.jar
Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows.
java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
jacaetevha /
Last active Jun 11, 2019
Some simple benchmarking of Truffle Ruby, JRuby, and MRI Ruby doing `inject` and `fold` as compared to Java, GraalVM, and GraalVM native-image (implementing the `fold` as a `for-loop` and as a `stream+collect`
import java.util.*;
import java.text.*;
import java.util.function.*;
public class Folding {
public static void main(String[] args) {
DecimalFormat formatter = new DecimalFormat("#.######");
int n = Integer.parseInt(System.getProperty("COUNT", "1000"));
int arraySize = Integer.parseInt(System.getProperty("ARRAY_SIZE", "10000"));
import javax.script.Bindings;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
View .gitconfig
name = ...
email = ...
editor = vim
autocrlf = input
safecrlf = false
co = checkout
ci = commit
jacaetevha / app.rb
Last active Oct 26, 2017
Sample Sinatra application
View app.rb
get '/' do
erb :audio
get '/flac' do
send_file '../relative/path/to/file.flac', type: 'audio/flac', disposition: 'inline'
get '/mp3' do
send_file '/absolute/path/to/file.mp3', type: 'audio/mp3', disposition: 'inline'
jacaetevha / settings.xml
Created Oct 20, 2017
Maven settings file for ISS projects
View settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="" xmlns=""
jacaetevha / gist:a9dfeb5183cd38e07037844073cee39c
Last active Nov 27, 2017
editable text area in a browser tab (for use in creating templatized Slack notes)
View gist:a9dfeb5183cd38e07037844073cee39c
jacaetevha /
Created Apr 26, 2016
BASH script to en-/decrypt a file with GPG
if [ "$1" == "--encode" ]
gpg --output $FILE.enc --symmetric --cipher-algo AES256 $FILE
elif [ "$1" == "--decode" ]
FILE_BASENAME=$(basename ${FILE%.*})
jacaetevha / _README.textile
Last active Aug 29, 2015
Population Count functions
View _README.textile

The population count function is used in many different scenarios. I first found out about it in the implementation of a HAMT data structure (Hash Array Mapped Trie).

The implementations herein are converted to Ruby from the C functions in this article. MRI is generally faster at these implementations than JRuby, but JRuby shines when any of these functions are called frequently enough to be able to inline the functions.

Platform information

OS Yosemite 10.10.4
Machine MacBook Pro (13-inch, Late 2011)
Processor 2.4 GHz Intel Core i5
Memory 16 GB 1333 MHz DDR3
jacaetevha / pharo
Created Jun 4, 2015
Enhancements to Pharo ZeroConf Bash scripts
View pharo
#!/usr/bin/env bash
# some magic to find out the real location of this script dealing with symlinks
DIR=`readlink "$0"` || DIR="$0";
DIR=`dirname "$DIR"`;
cd "$DIR"
cd - > /dev/null
# disable parameter expansion to forward all arguments unprocessed to the VM
set -f
if [[ "$1" = "*.image" ]]; then
You can’t perform that action at this time.