This file contains 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
irb(main):002:0> Dir['classpath/*'].each {|jar| require File.expand_path(jar) } | |
=> ["classpath/annotations-3.0.0.jar", "classpath/aopalliance-1.0.jar", "classpath/bval-core-0.5.jar", "classpath/bval-jsr303-0.5.jar", "classpath/commons-beanutils-core-1.8.3.jar", "classpath/commons-lang3-3.1.jar", "classpath/embulk-core-0.7.10.jar", "classpath/embulk-standards-0.7.10.jar", "classpath/guava-18.0.jar", "classpath/guice-4.0.jar", "classpath/guice-multibindings-4.0.jar", "classpath/icu4j-54.1.1.jar", "classpath/jackson-annotations-2.5.3.jar", "classpath/jackson-core-2.5.3.jar", "classpath/jackson-databind-2.5.3.jar", "classpath/jackson-datatype-guava-2.5.3.jar", "classpath/jackson-datatype-joda-2.5.3.jar", "classpath/jackson-module-guice-2.5.3.jar", "classpath/jansi-1.11.jar", "classpath/javax.inject-1.jar", "classpath/joda-time-2.8.1.jar", "classpath/jruby-complete-9.0.4.0.jar", "classpath/logback-classic-1.1.3.jar", "classpath/logback-core-1.1.3.jar", "classpath/msgpack-core-0.8.1.jar", "classpath/netty-buffer-5. |
This file contains 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
# re: http://twitter.com/kazuho/status/684889103796600832 | |
def run_each(obj) | |
obj.each {|v| p v } | |
obj.close | |
end | |
def test | |
o = Struct.new(:is_open) do | |
def each(&block) |
This file contains 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
require 'benchmark' | |
class MemberClass | |
def initialize(a, b, c, d, e, f, g) | |
@a = a | |
@b = b | |
@c = c | |
@d = d | |
@e = e | |
@f = f |
This file contains 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
require 'fiddle/import' | |
module PtrToValueSegv | |
extend Fiddle::Importer | |
dlload "libc.dylib" | |
extern('int gettimeofday(void *, void *)') | |
Timeval = struct(["long tv_sec", "long tv_usec"]) | |
end | |
timeval = PtrToValueSegv::Timeval.malloc |
This file contains 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
ArrayOrMap: | |
0: [type, string, typename] | |
IfArray: | |
extend: [ArrayOrMap, typename: “array”] | |
1: [value, array: [int]] | |
IfMap: | |
extend: [ArrayOrMap, typename: "map"] | |
1: [value, map: [string, int]] |
This file contains 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
## | |
## Syntax | |
## | |
# Define a type: | |
# | |
# <MessageName>: | |
# <fieldIndex>: [<fieldName>, <type>, <options...>] | |
# ... | |
# | |
# Typedef (type alias): |
This file contains 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
Building Plugin-based Architecture in Java using JRuby | |
Plugin architecture is known as a technique that brings extensibility to software. It simplifes each components | |
and makes more tolerant to changes of business environment. That is essentially important also for open-source | |
software. I have designed 2 plugin-based OSS: Fluentd and Embulk. Fluentd is a streaming data collector that uses | |
Ruby for flexible event routing, and C for performance-sensitive parts. Embulk is a parallel bulk data loader that | |
uses Java for core components, and JRuby for plugins. This talk will describe how I built plugin-based architecture | |
for the 2 OSS projects. |

This file contains 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
diff --git a/lib/embulk/command/embulk_bundle.rb b/lib/embulk/command/embulk_bundle.rb | |
index 30907dd..3828750 100644 | |
--- a/lib/embulk/command/embulk_bundle.rb | |
+++ b/lib/embulk/command/embulk_bundle.rb | |
@@ -16,6 +16,7 @@ if bundle_path | |
ENV.delete('GEM_HOME') | |
ENV.delete('GEM_PATH') | |
Gem.clear_paths | |
+ $LOAD_PATH << "uri:classloader:/" | |
require 'bundler' |
This file contains 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
[frsyuki@xcore embulk]$ ./gradlew cli | |
Publication bintrayMavenRelease not found in project :. | |
Publication bintrayMavenRelease not found in project :embulk-cli. | |
Publication bintrayMavenRelease not found in project :embulk-docs. | |
:embulk-core:compileJava UP-TO-DATE | |
:embulk-core:unpackGems UP-TO-DATE | |
:embulk-core:processResources UP-TO-DATE | |
:embulk-core:classes UP-TO-DATE | |
:embulk-core:jar UP-TO-DATE | |
:embulk-standards:compileJava UP-TO-DATE |