Blog - page 2

Standing on the shoulders of giants and leaky abstractions

Recently, a blog post about how to use activerecord as a library was shared on r/ruby, which started an interesting discussion thread (where I was involved) from the premise “instead of using activerecord out of the rails, why not sequel”? While several arguments were made both for and against the premise, it felt that, at times, discussion deviated towards the merits of sequel vs. activerecord, rather than using or building a gem on top of them, as a dependency; and as usual in the social network sphere, comments may have been misunderstood, everybody went their separate ways, and the Earth completed another orbit around the sun.

Read more...

HTTPX 0.19.0 - happy eyeballs, proxy improvements, curl to httpx

httpx v0.19.0, the first major (minor version) update of 2022 of the ruby HTTP “swiss-army-knife” client, has just been released. It brings a lot of improvements and bugfixes, as well as a feature that has been a long time coming.

Read more...

Build an OIDC provider with rodauth-oauth in rails, while keeping your authentication

I’ve written before about rodauth-oauth and how to use it to make an OAuth2 or OIDC Connect provider out of a rails application, and where I built a rails demo app based out of Janko Mahronic’s rodauth-rails demo app as a workable tutorial. It shows well what rodauth accomplishes, how integrating it in a rails app became significantly simpler thanks to rodauth-rails, and how one can building an OAuth/OIDC provider using rodauth-oauth on top of that.

Read more...

Tensorflow Serving with Ruby

The Tensorflow framework is the most used framework when it comes to develop, train and deploy Machine Learning models. It ships with first class API support for python and C++, the former being a favourite of most data scientists, which explains the pervasiveness of python in virtually all of the companies relying on ML for their products.

Read more...

HTTPX responses can be pattern matched

TL;DR: starting with v0.15.0, httpx responses can be used with pattern matching, a feature which appeared experimentally in ruby 2.7, and became an official feature in ruby 3.

Read more...