Ruby Icon

Ruby

Ruby is a scripting language designed for simplified object-oriented programming.
279 Stories
All Topics

German Velasco Thoughtbot

Is Elixir a scripting language?

Finally, an article that breaks Betteridge’s law of headlines! Elixir is known for being a language made for building distributed applications that scale, are massively concurrent, and have self-healing properties. All of these adjectives paint Elixir in a grandiose light. And for good reasons! But is Elixir also a language that can be used for the more mundane tasks of this world like scripting? I think the answer is a definite yes. I’ve been writing Elixir for a few years now, but when it comes time to script something I still reach for Ruby. Case in point, our data import routines for changelog.com (which y’all know is an Elixir app) are written in Ruby. Why do I do this? Familiarity plays a big part. Also I find Ruby to be highly ergonomic for such tasks. Having said that, this article will make me consider trying Elixir for my next script.

read more...

David Heinemeier Hansson weblog.rubyonrails.org

Rails 6 will provide a built-in rich text editor

DHH announces Action Text, a big new feature coming to Rails 6: It’s an integration between the Trix editor, Active Storage-backed file and image processing, and a text-processing flow that ties it all together. With Action Text, you really shouldn’t ever have to impoverish your users with a vanilla textarea ever again! I’m a bit torn on this. On one hand, Trix is a good tool and many (most?) web apps need rich text editing at some point in their lifespan. On the other hand, it’s difficult to build general purpose features like this that span both the front and back ends of the stack. Rails 6 is a ways away (with betas starting in early 2019), so we’ll have to wait and see. Regardless of whether this particular feature pans out, it’s great to see the Rails team continue to innovate and try new things.

read more...

Miguel Michelson Martinez github.com

Stories — a self hosted Medium platform built with Ruby on Rails

Looks-wise, this is an exact design clone too. Hope that doesn’t get anyone who uses this “as is” in any trouble with the real Medium. This project is a fork of a Medium clone which began as Ken Hibino’s personal side project to learn Rails and React. I upgraded and refactored parts of the Rails app and integrated Dante2 wysiwyg editor. If you’re looking for commentary around the project or Rails, check Hacker News.

read more...

Rails medium.com

Powering your Ruby & Rails development with Pry

I use Pry (a runtime developer console) all the time and I still learned a few tricks from this post. Here’s a doozy for working in Rails apps: there’s show-routes , which does what the name implies, and also takes a -G flag for grepping. No more starting up a new shell to execute rake routes | grep login and wait for it to boot up Rails just to give us the routes on the side! This is the one and only tool that i miss when working with Elixir and Phoenix. Yes, I know there’s IEX.pry built in, but it doesn’t offer as smooth a workflow as Ruby’s pry. Maybe someday…

read more...

Lyndsey github.com

🎯 The best fastlane plugin to understand and tame misbehaving iOS tests

Lyndsey Ferguson: Unit testing and the tests themselves are written by humans. Humans are prone to error. Unit tests and the testing infrastructure can be imperfect. The test_center plugin includes tools that remove (or alleviate) the effects of an imperfect test infrastructure. (fastlane is a popular way to automate building/releasing iOS and Android apps.)

read more...

Joseph Emmanuel DL Dayo github.com

A pure Ruby implementation of a TensorFlow-like library with provisions for hardware acceleration

A reimplementation of TensorFlow for Ruby. This is a ground up implementation with no dependency on TensorFlow. Effort has been made to make the programming style as near to TensorFlow as possible, comes with a pure Ruby evaluator by default with support for an opencl evaluator for large models and datasets.

read more...

Mauricio Gomes github.com

Stealth – a Ruby framework for creating conversational bots

This is a lot like Ruby on Rails (even with ActiveSupport & ActiveRecord built-in), but instead of views you have replies. It works for both voice-based and text-based bots and has NLP offerings baked in too. 🍰 The only bummer is that service integrations are currently limited to Facebook Messenger and Twilio SMS. That’s pretty normal for a new open source offering, though, and it’s a great place to hop in and contribute. ✊

read more...

Tom Black blacktm.com

A guide to getting started with Ruby on WebAssembly

Tom Black: With the advent of WebAssembly, the race is on to bring new languages to the web. This is the first example (I think!) of a Ruby interpreter running in the browser. The path to get there is circuitous. Ruby script → MRuby bytecode → C → emcc → LLVM → Binaryen → WebAssembly The good news is access to that path is just a gem install wasm away. Read the entire post for some great context and history around these efforts.

read more...

Rails rollbar.com

Top 10 errors from 1000+ Ruby on Rails projects (and how to avoid them)

Nice post by our friends at Rollbar: We looked at our database of thousands of projects and found the top 10 errors in Ruby on Rails projects. We’re going to show you what causes them and how to prevent them from happening. If you avoid these “gotchas,” it’ll make you a better developer. I know many of these like the back of my hand. 🤣…😭

read more...

Chris Frank github.com

Dynamically filter and sort data via URL params in any Rack app

If your Ruby/Rack app renders a list of database records, and you want those records to be filterable via URL params, Rack::Reducer can help. I like that this is Rack-focused, since Rails already has plenty of solutions in this space. The README includes examples of use with Sinatra, Hanami, Roda, and other commonly used Ruby web libraries.

read more...

Ruby github.com

A lightning fast JSON:API serializer for Ruby objects

The Netflix team managed to squeeze out some huge performance improvements over Active Model Serializers: We want to ensure that with every change on this library, serialization time is at least 25 times faster than Active Model Serializers on up to current benchmark of 1000 records. At first glance I thought this was a drop-in replacement for AMS, which would’ve been epic, but it has its own API. That being said, its API is pretty similar and looks easy to use. Exactly how much faster is this library? It can serialize 250 records in 3.01 ms vs AMS’s 138.71 ms!

read more...

Linux jvns.ca

How do you spy on a program running in a container?

Julia Evans: Yesterday I added Linux container support to rbspy, so that an instance of rbspy running on the host machine can profile Ruby programs running in containers… I thought it would be fun to explain what adding “container support” involves in practice! (rbspy is her sampling profiler for Ruby.) This bit is interesting, and why this post isn’t tagged with the Docker topic: We didn’t need to care about Docker or anything like that – it’s irrelevant what container runtime our containers are using, and we certainly don’t interact with Docker at all. I guess a few simple syscalls is all it takes!

read more...
0:00 / 0:00