Ruby

530 readers
1 users here now

A community for discussion and news about Ruby programming.

Learning Ruby?

Tools

Documentation

Books

Screencasts

News and updates

founded 1 year ago
MODERATORS
51
 
 

Dozens of Ruby-related CVEs have been caused by user input being passed to the top-level Kernel.open() method, which not only accepts paths or URIs (if open-uri has been loaded), but also "|command-here" commands which are then opened using IO.popen() resulting in Remote Command Execution (RCE) vulnerabilities. In the next minor Ruby version (3.3.0) a deprecation warning will be printed if a "|command-here" input is given to Kernel.open(). Hopefully, in Ruby 4.0 this insecure feature will be removed.

52
53
54
 
 

Heya! I thought I'd mention that I've been doing a bunch of development on the optical Timex Datalink watches! I have been carefully sniffing data from the original Timex software with a logic analyzer, and have fully reverse engineered every Datalink protocol, the serial Notebook Adapter, and even the CRT syncing graphics! This means that every Datalink device, including every Timex and Motorola watch, all PDAs, and the funny e-BRAIN talking toy is supported!

For those that aren't familiar, the Timex Datalink is a watch that was introduced in 1994 that is essentially a small PDA on your wrist. The early models (supported by this software) have an optical sensor on the top of the face that receives data via visible light.

The original data transfer method involves drawing patterns of lines on a CRT monitor for the watch to receive with the optical sensor. CRTs use electron beams that draw scan lines one-by-one from top to bottom, then it returns to the top and repeats for the next frame. This means that the electron guns turn on when its drawing a white line, and and turn off when its drawing the black background. This produces flashing light as the graphics are drawn, which is ultimately received by the optical sensor and decoded by the Timex Datalink device.

For laptop users, Timex also offered the Datalink Notebook Adapter. Instead of using a CRT monitor, the Notebook Adapter simply flashed a single LED light. This adapter is fully supported by the Timex Datalink software, and sends the same data as a CRT.

However, Notebook Adapters are rare and expensive now, so I reverse-engineered one! Here's my timex_datalink_client Ruby library communicating with my DIY Datalink Notebook Adapter to emit data to a Timex Datalink watch!

And if you want to try the reverse-engineered CRT graphics, I got you covered! I reverse-engineered that, too!

As a fun tidbit, these watches are flight certified by NASA and is one of four watches qualified by NASA for space travel! Here's a shot of James H. Newman wearing a Datalink watch on the Space Shuttle for STS-88!

Here is my Ruby library with all options for all watches reverse-engineered into a tidy model-based syntax!

Here is a Notebook Adapter emulator that is fully compatible with all Timex software on old and new machines, and also works with my library too!

And if you have an anchor that happens to contain an electron beam and wanna try it, here's my library for drawing graphics to a CRT to transfer data!

This has all been done over months of careful effort with lots of VMs, Pentium machines, Windows 98SE, logic analyzers, and solving data puzzles little by little. On July 4th, 2023, I'm proud to announce that I have reverse-engineered every Datalink device with 100% feature compatibility! This is definitely a passion project by all means, and I thought I'd pop in and share this passion with y'all!

Enjoy!

55
6
Rails upgrade led to Ruby bug (evgeniydemin.medium.com)
submitted 1 year ago by erlingur to c/ruby
56
 
 

A little different from the "what are you building" pattern of posts. I found myself wanting to learn different aspects of Ruby on Rails outside of work, and I am curious what people are learning themselves.

Currently, I am learning Hotwire since I don't do much frontend work and we don't use it at work. In the past I've used Stimulus Reflex, and I am not sure which one I like more. That said, I am not sure if Stimulus Reflex still has a place given Hotwire's ascension in the RoR world.

I am also revisiting View Components as well and trying to decide if I want to use them over partials in my side project.

57
 
 

Hi all!

What do you guys use for completions in VSCode? I'm driving into ruby right now and have been a bit underwhelmed by what I've tried.

58
59
 
 

Meet Iteration, an extension for ActiveJob that makes your jobs interruptible and resumable, saving all progress that the job has made (aka checkpoint for jobs).

60
 
 

Register your email to get notification emails for when the sale starts.

61
62
14
Rewriting the Ruby parser (railsatscale.com)
submitted 1 year ago by snowe to c/ruby
 
 

Shopify wrote a new hand-written recursive descent parser. This looks like it will be a great improvement to the Ruby ecosystem!

63
 
 

A self-hosted tool to monitor the performance of your Ruby on Rails application.

This is a simple and free alternative to the New Relic APM, Datadog or other similar services.

64
3
submitted 1 year ago* (last edited 1 year ago) by erlingur to c/ruby
 
 
65
3
Blue Ridge Ruby 2023 Recap (kevinjmurphy.com)
submitted 1 year ago by erlingur to c/ruby
66
4
submitted 1 year ago by erlingur to c/ruby
67
3
submitted 1 year ago by erlingur to c/ruby
68
 
 

Interesting, a shell made with Ruby. Author posted a screencast here. Not sure how practical it is but an interesting project for Ruby

69
 
 

A good resource for anyone that wants to learn Hotwire :)

70
16
submitted 1 year ago* (last edited 1 year ago) by erlingur to c/ruby
 
 

I figured I'd also create a welcome post :) So, welcome!

I hope we can create a welcoming environment here for all and as always, MINASWAN :)

71
4
submitted 1 year ago by Piatro to c/ruby
 
 

Not affiliated I just find this useful and it exposed me to a few of the new features of Ruby 3.2 like not having to specify the value in kwargs if the variable is defined in scope, eg:

foo = 'bar'; call(foo:) is equivalent to foo = 'bar'; call(foo: foo)

72
7
submitted 1 year ago by erlingur to c/ruby