Hacker News new | past | comments | ask | show | jobs | submit login

You know....I have wanted to build a Ruby tool like this, but just for iterators. I was going to call it 'eye-terator', because you can see within the iterator.

The idea being that you can step through the iteration (say an each, for, or any other iterator in Ruby) and see the state of all variables/objects at each step in the iteration - and then also allow it to handle nested loops, blocks, etc.

I was thinking a simple site like the Ruby Regex Tool[1] would work wonders.

I just haven't had the time to do something like that - I need to beef up my JS to execute that as elegantly as I would like. But I suspect that would be a very useful tool for Ruby devs.

#justsaying

[1] - http://rubular.com/




Have you tried the pry gem? It gets you 90% there and is a useful interactive repl for things outside of iterators.


REPL's aren't really interactive programming. In Bret Victor's demo, he makes a infinite loop and as he is typing, the mistake is immediately clear.

Pry is awesome though, it's just not really close to the things that Bret talks about. In fact, I think in one talk he specifically speaks against REPL's being interactive.


I have a bit....but it's a little complicated and overkill I think.

But....I may revisit it again.


Can't get much more simple than `binding.pry` jumping you into an `irb` at that line.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: