Auto-Analyzing Ruby for Fun and Quality
Given at BostonRb meetup on May 10, 2016. Screencast Video. Ruby type_tracer gem code. Slides
Love dynamic types but secretly fear NoMethodError? Ever wondered how to write a Ruby analysis tool?
Come as we take an “under the hood” look at three techniques for catching some bad method calls. In the process you’ll learn how to search through parsed Ruby code (via parser), how to inspect defined methods at runtime, and and how to trace live method calls as they happen.
Calls between Go and C/C++ (and dynamic langs)
Given at Boston Golang meetup on Oct 27, 2015. Meetup Video. Code snippets and benchmarks. Slides.
Go can call C statically or dynamically using cgo. We'll do a cgo hello world, then show how to write a Go wrapper for a C library (the LPSolve linear programming solver).
Calling C++ from Go works too but it's trickier given the C++ calling conventions. We'll see an example of calling C++ from Go via a C wrapper function and also show how to generate Go wrapper code for a C++ class using SWIG.
You can also call Go from other languages! We'll briefly show how to call from C to Go in the same program, and how to compile a Go shared library to be used by Python, Ruby, etc.
Finally we'll touch on the performance and concurrency implications of calling between languages as it relates to Go