Ruby

678 readers
1 users here now

A community for discussion and news about Ruby programming.

Learning Ruby?

Tools

Documentation

Books

Screencasts

News and updates

founded 2 years ago
MODERATORS
1
2
3
4
 
 

Mastodon toot by the author (Filipa Mendonça-Vieira):

After the recent Rubygems drama, I felt anxious, and trapped, frustrated that I can’t escape evil people trying to dominate my life.

I found myself grieving, and mourning the future I grew up thinking we would have; but also feeling hope, that it’s not too late to stop enabling these people, and start choosing kindness.

I wrote about these feelings. Join me in building a better future:

https://okayfail.com/2025/in-praise-of-dhh.html

5
6
7
8
9
10
11
12
13
14
15
16
17
18
4
Ruby 3.4.4 Released (www.ruby-lang.org)
submitted 7 months ago by neme@lemm.ee to c/ruby@programming.dev
19
 
 

I wasn't able to find any up-to-date information about tail call optimization support in Ruby, so I decided to post this hoping that it will pop up next time someone might also be searching for this topic...

What I was able to figure out is that TCO can be enabled in Ruby 3.4 via a compile option like so:

RubyVM::InstructionSequence.compile_option = {tailcall_optimization: true}

def tailSumUntil(n, m)
  n == 0 ? m : tailSumUntil(n - 1, n + m)
end

tailSumUntil(100_000_000, 0)
# => 5000000050000000
20
21
22
23
8
Ruby 3.4.1 Released (www.ruby-lang.org)
submitted 11 months ago by neme@lemm.ee to c/ruby@programming.dev
24
10
Ruby 3.4.0 Released (www.ruby-lang.org)
submitted 11 months ago* (last edited 11 months ago) by neme@lemm.ee to c/ruby@programming.dev
25
 
 

Hi
What is Primitive in the MRI context?

Why did a lot of things get rewritten into Primitive?
Is there some official documentation about it?

view more: next ›