@camertron@ruby.social
@camertron@ruby.social avatar

camertron

@camertron@ruby.social

Ruby developer on the Design Engineering team at GitHub maintaining ViewComponent and primer/view_components.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

esparta, to ruby
@esparta@ruby.social avatar

A little late but we are in the May 2024 SF Bay Area Ruby Meetup @

The room is packed!!

First Kayla Reopelle with and , a great intro!!

camertron,
@camertron@ruby.social avatar

@esparta 👋

camertron, to random
@camertron@ruby.social avatar

Me: literally does nothing

LinkedIn: Cameron, you're on a roll!

camertron,
@camertron@ruby.social avatar
Schneems, to random
@Schneems@ruby.social avatar

Ever want to have multiple Ruby bindings that are isolated from each other? I found a hack way to do this with Ractor.new:

https://stackoverflow.com/questions/50263804/any-way-to-create-a-new-empty-binding-in-ruby/78426206#78426206

camertron,
@camertron@ruby.social avatar

@Schneems wow that's really cool

camertron, to random
@camertron@ruby.social avatar

Lord help me for saying this but damn it, I really like Typescript.

camertron, to random
@camertron@ruby.social avatar
camertron,
@camertron@ruby.social avatar

This is just a proof-of-concept; I had to cut quite a few corners to get it to work. But, progress!

camertron,
@camertron@ruby.social avatar

@hejsna hahaha yep! It's so easy! why aren't more people doing this?? 😝

camertron, to random
@camertron@ruby.social avatar

It amazes me that so many companies seem to have learned nothing from the relicensing fiascos of Elasticsearch, Redis, Terraform, etc, and continue to rug-pull their users and contributors.

Developers have demonstrated they want critical infra to be open-source again and again. What happens when projects move to the BUSL or similar? They get forked, and the company ends up losing mindshare, users, and yes, MONEY.

It's asinine at this point, and borderline immoral.

camertron, to random
@camertron@ruby.social avatar

Garnet can finally pass the entire Phlex test suite! It also passes the entire Sus test suite, so you can even use a fully-baked test framework with Garnet now 😃

/cc @joeldrapper

camertron,
@camertron@ruby.social avatar

There were some serious hurdles to overcome this time. The two most challenging by far were 1) fixing regexp support and 2) getting multi-writes to work.

camertron,
@camertron@ruby.social avatar
  1. Garnet supports regexes via Onigmo, which is the same lib cruby uses. It's compiled into a WASM module and called via javascript. Because WASM doesn't come with libc support out of the box, I found WASM-compatible implementations of malloc and free and compiled them with the rest of Onigmo. After much hacking around, I discovered these functions only appeared to work and introduced very subtle memory bugs, so I switched to wasi-libc and all the problems went away 💫
camertron,
@camertron@ruby.social avatar
  1. Multi-writes is the term the Prism parser uses for a Ruby statement that assigns multiple values at once, eg:

a, b = c, d

At first glance this may not seem particularly tricky... and it isn't, until you realize you can also do things like this:

a[:a], b[:b], *c[:c], d = e, f, g, *h

Any guesses how many YARV instructions that statement requires?

Assuming all the variables are locals, it requires a whopping FORTY-TWO instructions.

Getting all these instructions right was an absolute beast

camertron, to random
@camertron@ruby.social avatar

Man, there are so many little gotchas developing c code. Turns out WASM doesn't give you things like malloc without a lot of gymnastics, so I started using wasi-libc, but linking it in proved to be super hard. Turns out you have to pass the -l c flag to ld (wasm-ld in this case) even though the goddamn file is named libc.a. Completely unhelpful error message. Only ChatGPT was able to set me straight. Spent a week in c hell.

camertron, to random
@camertron@ruby.social avatar

I never saw Everything Everywhere All at Once because it already describes my life with these two extremely active children.

collin, to random
@collin@ruby.social avatar

I'm not mixed. This really bums me out. I love Lower Decks and the characters on it.
https://mastodon.online/@virtualbri/112259969897616521

camertron,
@camertron@ruby.social avatar

@collin @beep Lower Decks is so much fun. You can tell how much the creators love Star Trek ❤️

j0, to random
@j0@wetdry.world avatar

Hi, if you use Discord and feel bad about it for some reason, don’t. Don’t let the people on here try and convince you that matrix is secretly very easy to use and better and all it needs is adoption and just host this and etc. Same with any chat app or service or whatever. Discord is popular because it is a well made, usable service. People on here play the Privacy Game and switch browsers/search engines performatively. Switching which Product you use will have next to zero implications in your daily life, just use the one that is least annoying. Most “privacy” companies are just grifting (eg DDG funding right wing media, Kagi using AI, Brave doing crypto and AI, Mozilla doing AI, Proton baselessly shitting on other services in press releases, various companies doing VPNs, Element providing services to Police, Arc doing AI, I could go on forever…)

I’m not saying to go “doomer” and just use Chrome and Google, but people need to acknowledge that these services you use exist within capitalism, and evaluate whether they really Care about your privacy, or the Monthly Active Users metric. Don’t be shocked when your Private Service gets sold to a not-so-private company. You are being marketed to.

camertron,
@camertron@ruby.social avatar

@j0 @tomw oh my god people release binaries on Discord??

camertron,
@camertron@ruby.social avatar

@j0 @tomw dear god

aria, to ruby
@aria@hachyderm.io avatar

Is there a good erb/eruby formatter out there?
I have tried erb-formatter (https://github.com/nebulab/erb-formatter) but it zero to nothing configurations and I don't like how many newlines it forces me to put in templates.

camertron,
@camertron@ruby.social avatar

@aria Shopify's erblint can do some formatting, but it only looks at individual Ruby snippets in isolation. I was working on a PR that could examine code more holistically, but ran out of steam (turns out it's a pretty hard problem).

camertron, to random
@camertron@ruby.social avatar

Does anyone actually know the wattage of their microwave?

camertron, to random
@camertron@ruby.social avatar

How in the world did this dude have 21 minutes of things to say about self-closing tags??

collin, to random
@collin@ruby.social avatar

I wonder what it’s like to not struggle with sleep in some way. It’s like the never ending problem of my entire life.

camertron,
@camertron@ruby.social avatar

@collin dude same

camertron, to random
@camertron@ruby.social avatar

Someone at the SF Ruby meetup last night said "Wow, I can't believe GitHub is a Rails app!"

Yep. Turns out Rails can scale.

camertron, to random
@camertron@ruby.social avatar
camertron, to random
@camertron@ruby.social avatar

Anyone going to Sin City Ruby tomorrow? @collin @joeldrapper

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • everett
  • ngwrru68w68
  • Durango
  • megavids
  • InstantRegret
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ethstaker
  • osvaldo12
  • modclub
  • normalnudes
  • provamag3
  • tester
  • anitta
  • Leos
  • lostlight
  • All magazines