26 links
tagged with ruby
Click any tag below to further narrow down your results
Links
The article discusses the challenges of using regular expressions for data extraction in Ruby, particularly highlighting the performance issues with the default Onigmo engine. It compares alternative regex engines like re2, rust/regex, and pcre2, presenting benchmark results that demonstrate the superior speed of rust/regex, especially in handling various text cases and complexities.
RubyUI offers a collection of beautifully designed, customizable UI components that can be easily copied and pasted into applications. Built for speed using Phlex, it allows developers to create organized, reusable components with minimal dependencies while providing full control over design. The library is open source, requires Ruby 3.2 or later, and includes comprehensive documentation for easy implementation.
Gem.coop is a community-driven hosting service for Ruby gems, designed for speed and compatibility with Bundler, established by former maintainers of RubyGems.org. It aims to provide transparent, sustainable, and secure gem hosting, welcoming contributions from the Ruby community. Users can switch their Gemfile source to Gem.coop for real-time updates on all gems.
A group of maintainers removed from the RubyGems.org project has established the Gem Cooperative and launched a new gem server, gem.coop, to ensure continuity for Ruby developers. The cooperative's governance is still being developed, and the move comes amid tensions with Ruby Central, which recently took control of key Ruby repositories, prompting an open letter calling for a fork of the Rails framework due to concerns over its creator's views.
Claws is a Ruby-based static analysis tool designed to enhance the safety of GitHub workflows by identifying undesirable behaviors through simple expression rules. It allows users to define rules using an equation expression language, supports runtime configurability, and includes RSpec helpers for testing. Claws can be easily installed as a Ruby Gem and integrated into CI pipelines to analyze workflow files for various security and best practice violations.
Brut RB is a platform focused on building raw Ruby web applications with an emphasis on standards-based, HTML-first design and low ceremony. It offers resources like an API, and frameworks such as BrutJS and BrutCSS to help developers get started efficiently. The site provides an overview and guidance for users to navigate its features.
Undercover is a Ruby gem that helps developers identify untested methods, classes, and blocks by analyzing git diffs and SimpleCov coverage reports. It works with any Ruby CI pipeline or locally as a CLI tool, providing automated warnings for untested code changes to ensure timely test writing. The gem can be easily integrated into applications by adding it to the Gemfile and configuring it with SimpleCov.
OSV is a high-performance CSV parser for Ruby, built using Rust, and offers both hash-based and array-based row formats. It provides significant speed advantages over the standard Ruby CSV library and other CSV gems, especially when using the array-based mode. Users can easily integrate OSV into their applications by adding it to their Gemfile or installing it directly via gem install.
The author shares improvements made to the P2 HTML templating library for Ruby, enhancing its template generation performance significantly. By utilizing a new compilation technique and implementing several optimizations, P2 now outperforms traditional Ruby templating methods like ERB. The article details the technical processes behind these enhancements and the resulting performance benchmarks.
Ruby on Rails has revolutionized web development since its 2004 debut, thriving as an open-source framework due to its MIT License, which encourages flexibility and community collaboration. Its principles, such as Convention Over Configuration and modularity through gems, have inspired a generation of frameworks like Laravel and Django, emphasizing developer productivity and experience. As Rails continues to evolve, it sets a standard for open-source projects and maintains relevance in modern web development.
The Anthropic Ruby library offers easy integration with the Anthropic REST API for Ruby applications version 3.2.0 and above. It includes features like streaming responses, error handling, and support for file uploads while providing comprehensive documentation and types for enhanced usability. Users can install it via Bundler and utilize various configurations for requests and error handling.
Open source, particularly in the Ruby ecosystem, faces fragility due to underfunding and reliance on a few major contributors like Shopify, which has significant influence over Ruby and Rails. Despite these challenges, open source remains resilient as it adapts to new demands, and companies should invest in maintaining and improving the frameworks they depend on to enhance performance and stability.
Ruby can effectively handle I/O bound workloads such as web crawling when combined with the Async library, enabling an event-driven, non-blocking architecture. The article illustrates how to build a web crawler using Ruby, starting with a basic implementation and enhancing it with concurrency, while addressing issues like limiting simultaneous requests and maintaining persistent connections to improve performance.
AmazingPrint is a Ruby library that enhances the pretty-printing of Ruby objects with full color and proper indentation, making it a suitable replacement for the now-stale AwesomePrint. It supports Rails ActiveRecord objects and includes customizable options for formatting output, including the ability to log formatted data and use it within Rails templates. Installation is straightforward via Ruby gem or cloning the repository from GitHub.
The article introduces "try," a one-file Ruby script designed to help developers manage and navigate their experimental project directories more efficiently. It features fuzzy search, smart sorting, auto-dating for directories, and requires no configuration, making it an ideal tool for organizing chaotic coding experiments. Built for developers who juggle multiple projects, "try" ensures that no brilliant ideas are lost in the clutter.
Claude-swarm is a tool developed to manage multiple AI instances for collaborative software development, specifically targeting Ruby project upgrades. The article details a practical example of using this tool to identify and upgrade Ruby versions in several projects to ensure compatibility with the latest standards. The process is streamlined through a series of commands and AI-assisted tasks, resulting in successful upgrades across multiple projects.
RubyLLM is a streamlined Ruby API designed for interfacing with various AI models, including GPT, Claude, and Gemini, making it easier to build chatbots and AI applications without the hassle of managing multiple client libraries. It supports various functionalities such as image analysis, audio transcription, document extraction, and real-time response streaming, all while requiring minimal dependencies. Users can easily integrate this API into their applications by adding a simple gem and configuring their API keys.
The article details the author's journey to solve the long installation times of the rdkafka gem in Ruby, which is critical for Apache Kafka integration. By creating precompiled binaries and implementing a robust build and security system, installation times were significantly reduced from over 60 seconds to under 5 seconds, enhancing overall developer experience and reducing resource waste.
Puts debugging is a favored technique for many Rails developers, and this article introduces a custom gem called `dbg-rb`, inspired by Rust's `dbg!` macro. It provides enhanced output for debugging by showing variable names, file locations, and line numbers, making the process more efficient without cluttering the Gemfile. Tips for integrating `dbg-rb` into Rails without adding it to the Gemfile are also discussed.
A new Ruby management tool called rv is being developed to improve dependency and Ruby version management by combining features from existing tools like Bundler and Python's uv. Written in Rust, rv aims to provide fast and isolated execution of Ruby scripts and commands, simplifying the development process by automatically managing dependencies and Ruby versions. The project is led by a team that includes notable contributors from the Ruby community.
Ruby's JIT compiler, specifically ZJIT, enhances performance by compiling frequently used methods into native code while retaining their bytecode for safety and de-optimization. The article explains the mechanics of how Ruby executes JIT-compiled code, the criteria for compilation, and the reasons for falling back to the interpreter when assumptions are violated. Additionally, it addresses common questions regarding JIT functionality and performance implications.
Building a coding agent in Ruby is straightforward, requiring only a few lines of code and minimal boilerplate compared to other languages like Go. By utilizing the RubyLLM gem and implementing three essential tools—reading files, listing files, and editing files—developers can create a functional AI chat agent that can assist in coding tasks. The author successfully demonstrates this by developing an agent capable of coding a simple game in Ruby.
AI coding tools are revolutionizing the way developers transition between programming languages, enabling them to contribute to projects in languages like C++ and Rust without extensive prior knowledge. By acting as a collaborative partner rather than just a code generator, AI helps developers overcome learning barriers and enhances the coding experience, allowing for more productive contributions from the outset. This shift signifies a broader trend towards reduced specialization in programming languages.
PWN is an open security automation framework designed to foster trust and innovation in cybersecurity through collaborative development. Users can create custom automation drivers by leveraging pre-built modules, with installation instructions provided for Debian-based Linux distros and OSX. The framework encourages community contributions and interoperability with commercial security tools while emphasizing the importance of obtaining permission before conducting security activities.
The article discusses the recent removal of long-time maintainers from Ruby Central, who were responsible for Bundler and RubyGems, and the subsequent actions taken by Matz to regain control over these projects. The former maintainers express their commitment to the Ruby community and their readiness to transfer their interests and rights to Matz, while focusing on new projects to enhance Ruby's development.
The article introduces "LLM Rescuer," a Ruby gem designed to handle runtime errors caused by null values by using an AI to guess the intended action instead of crashing the application. This experimental project, while humorous and innovative, emphasizes the unpredictability and potential risks involved in relying on AI for error handling. It highlights the costs associated with using OpenAI's API for this purpose, suggesting a significant financial burden for production use.