veer66 boosted


vars ="$1", "$20").to_a.join(",")

or even ("$1" .. "$20") ...

My code:
vars =, names.length).map{|i| "$#{i}"}.join(",")

My thought:
Who wrote this?

veer66 boosted
veer66 boosted

Hello, time for an #introduction:

I am Sirakorn, a computer engineering student. Would say I'm a ML/DL enthusiasm, and currently into adversarial learning. Books and classical music as hobbies!

In some cases, chaining Ruby methods is not easy. So, I don't. 馃槄

I have used irb as a calculator for a decade. And now it is colorful!

My computer is too stable now, so I'm installing Ruby 2.7.0preview1.

veer66 boosted

Looking for some practice ruby program ideas, anyone have a list, github repo, or book they'd recommend?

MRI/C-Ruby is more portable than OpenJDK?

veer66 boosted

Renewed the domain. Has it been a year already? 馃巶 :ruby:

veer66 boosted

Framework is a high perfomance, functional-inspired (but not truly functional), web application development environment written in Ruby and inspired by Go and Haskel.

"High Perfomance (similar to Node and Go)"

via @matz (Twitter)

veer66 boosted

Matz is getting people to weigh in on the |> operator over on the birdsite:

My thoughts, having it as an alias for dot operator is meh.

Thinking about trying Ruby 2.7 preview 1 in Docker

鈥漀umbered parameter as the default block parameter鈥 is interesting too, although it is still experimental.

Ruby 2.7 preview looks a bit similar to Elixir. However, they have worked on the pattern matching since 2012.

veer66 boosted

@veer66 it's actually not slow at all. Ruby has a copy-on-write strategy for arrays, so when you grab a subset it will reuse the original array with a different starting offset. Try running a test with different length arrays. On my laptop I get do `x[1..-1]` over 10 million times per second.

veer66 boosted
Show more

A Mastodon instance for Rubyists & friends