话题编程语言 › Ruby

编程语言:Ruby

Introducing Ruvy

We’ve recently open sourced a project called Ruvy! Ruvy is a toolchain that takes Ruby code as input and creates a WebAssembly module that will execute that Ruby code. There are other options for creating Wasm modules from Ruby code. The most common one is ruby.wasm. Ruvy is built on top of ruby.wasm to provide some specific benefits. We created Ruvy to take advantage of performance improvements from pre-initializing the Ruby virtual machine and Ruby files included by the Ruby script as well as not requiring WASI arguments to be provided at runtime to simplify executing the Wasm module.

WASI is a standardized collection of imported Wasm functions that are intended to provide a standard interface for Wasm modules to implement many system calls that are present in typical language standard libraries. These include reading files, retrieving the current time, and reading environment variables. To provide context for readers not familiar with WASI arguments, WASI arguments are conceptually similar to command line arguments. Code compiled to WASI to read these arguments is the same code that would be written to read command line arguments for code compiled to target machine code. WASI arguments are distinct from function arguments and standard library code uses the WASI API to retrieve these arguments.

Improving the Developer Experience with the Ruby LSP

Ruby has an explicit goal to make developers happy. Historically, working towards that goal mostly meant having rich syntax and being an expressive programming language—allowing developers to focus on business logic rather than appeasing the language’s rules.

Today, tooling has become a key part of this goal. Many modern languages, such as TypeScript and Rust, have rich and robust tooling to enhance the programming experience. That’s why we built the Ruby LSP, a new language server that makes coding in Ruby even better by providing extra Ruby features for any editor that has a client layer for the LSP. In this article, we’ll cover how we built the Ruby LSP, the features included within it, and how you can install it.

Electron 的 GUI 和 Ruby 的 CLI 的一种交互实践

本文从命令行迭代的 4 个阶段出发,重点介绍了 Ruby 脚本的命令行化以及 CLI 的 GUI 化。

Reliving Your Happiest HTTP Interactions with Ruby’s VCR Gem

VCR is a Ruby library that records HTTP interactions and plays them back to your test suite, verifying input and returning predictable output.

In Ruby apps it's most frequently used as a testing tool, but having it in your toolbox provides you with a rich set of organizational and debugging tools, even if you choose not to use its popular “automocking” feature.

Optimizing Ruby’s Memory Layout: Variable Width Allocation

Shopify is improving CRuby’s performance in Ruby 3.2 by optimizing the memory layout in the garbage collector through the Variable Width Allocation project.

To Thread or Not to Thread: An In-Depth Look at Ruby’s Execution Models

An in-depth look at threads vs processes in Ruby web applications, and when you should use each.

Implementing Equality in Ruby

Ruby is one of the few programming languages that get equality right. I often play around with other languages, but keep coming back to Ruby. This is largely because Ruby’s implementation of equality is so nice.

Nonetheless, equality in Ruby isn't straightforward. There is #==, #eql?, #equal?, #===, and more. Even if you’re familiar with how to use them, implementing them can be a whole other story.

Let's walk through all forms of equality in Ruby and how to implement them.

Our Experience Porting the YJIT Ruby Compiler to Rust

In this post, I want to give a nuanced perspective on our experience porting YJIT from C to Rust. I'll talk about the positives, but also discuss the things that we found challenging or suboptimal in our experience.

Code Ranges: A Deeper Look at Ruby Strings

An informal look at what makes encoding-aware strings in Ruby functional and performant, providing insight into all the wonderful things the Ruby VM does.

How We Fixed the Dependency Confusion Vulnerability in Over 600 Ruby Applications

How Shopify solved the dependency confusion vulnerability in over 600 Ruby applications and created tailored large-scale migration tooling to make it easier.

$ command line ruby cheat sheets

  • «
  • 1
  • »

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.123.4. UTC+08:00, 2024-04-17 23:56
浙ICP备14020137号-1 $访客地图$