HackerTrans
TopNewTrendsCommentsPastAskShowJobs

AndrewHampton

no profile record

Submissions

Ruby Prism Skill – CLI skill for understanding Ruby files

github.com
3 points·by AndrewHampton·5 माह पहले·1 comments

comments

AndrewHampton
·9 दिन पहले·discuss
[dead]
AndrewHampton
·4 माह पहले·discuss
This seems like an important caveat to the SWE-bench, but the trend is still clearly AI becoming more and more capable.
AndrewHampton
·5 माह पहले·discuss
I love web components. The one thing I really wish browsers supported though was a per-site custom element registry that persisted across page loads.

Give me 10mb and an API like service workers have to manage a library of custom elements that can be used on my site as soon as the page loads.
AndrewHampton
·5 माह पहले·discuss
We've been experimenting with various skills and MCPs in our day-to-day Ruby development at Poll Everywhere. This is the internal skill that's been most useful for preserving the context window while letting agents explore Ruby code.

It's a CLI wrapper around Ruby's Prism gem that lets the agent do this:

  $ prism -o app/models/user.rb

  User < ApplicationRecord [1-75]
    includes Agreeable
    includes Auditable
    has_many :polls
    has_many :questions, through: :polls
    has_many :votes
    has_many :reports, dependent: :destroy
    #audit_create [41-43]
    #allowed_to_participate_in?(poll) [45-66]
    #restricted_from_participation_in?(poll) [68-70]
    #recently_created? [72-74]

  $ prism -m 'recently_created?' app/models/user.rb

  === METHOD: recently_created? ===
  Lines 72-74:
    def recently_created?
      created_at.after?(5.minutes.ago)
    end
The idea is to give the agent a token-efficient way to understand what's going on in Ruby code.
AndrewHampton
·5 माह पहले·discuss
Back in 2004, while bored in my college dorm, I learned the Ian Knot from this site. I've used it ever since. A few weeks ago, my 10 year old decided it was time to learn how to tie his shoes "dad's way". I was pleasantly surprised to see the site was still up, so I used it to help teach him how to do it.