Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cirwin
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
91.
▲
by
cirwin
14y ago
Yes :). I'm not exactly sure of the details, but I certainly want to try! See https://github.com/mrbrdo/rack-webconsole : there's already a rack-webconsole-pry, so it should be an easy step to hook it up to past exceptions.
92.
▲
by
cirwin
14y ago
pry-rescue is a modernization thereof (banisterfiend helped me build it). The only technical difference is that pry-rescue can catch exceptions raised at the C level (like NoMethodError, or ZeroDivisionError); but pry-rescue also has a much
93.
▲
by
cirwin
14y ago
In rails you can just do: class ApplicationController < ActionController::Base around_filter :pry_rescue if Rails.env == 'development' def pry_rescue Pry::rescue{ yield } end I'm hoping to get a Rack
94.
▲
Show HN: pry-rescue — workflow-optimized debugging for ruby
(cirw.in)
69 points
by
cirwin
14y ago
|
30 comments
95.
▲
How to debug
(blog.regehr.org)
4 points
by
cirwin
14y ago
|
0 comments
96.
▲
Sight
(vimeo.com)
16 points
by
cirwin
14y ago
|
0 comments
97.
▲
by
cirwin
14y ago
It's very similar you're correct, particularly when you add in the Manager/Service layer (something that I hadn't spent enough time investigating). The main advantage of Operations over controllers is that they're fully composable. You can
98.
▲
by
cirwin
14y ago
The advantage of operations over controllers is the composability. Whereas controllers have a pretty undefined lifetime, operations are finished when they're done. This means that operations can use each other to get work done, a pattern yo
99.
▲
MVC is dead, it's time to MOVE on
(cirw.in)
487 points
by
cirwin
14y ago
|
222 comments
100.
▲
Teacup — easy iOS UIs with Ruby
(github.com)
2 points
by
cirwin
14y ago
|
0 comments
101.
▲
Tips for sharing a git repository.
(cirw.in)
1 points
by
cirwin
14y ago
|
0 comments
102.
▲
How to program like an explorer (with Pry).
(cirw.in)
25 points
by
cirwin
14y ago
|
3 comments
103.
▲
by
cirwin
14y ago
I know :). See https://github.com/ConradIrwin/git-aliae#faq .
104.
▲
by
cirwin
14y ago
Git stash solves a different problem, which is "I want to save these changes, and get them back". git-cof is optimized for the use-case of "I want to get rid of these changes, and I'll probably never use them again". The most obvious differ
105.
▲
by
cirwin
14y ago
It's certainly not "free", but as the method_missing calls are all outside of the loop ((0...1000).map(&X.to_s) calls method_missing only once) the impact on code is minimal. I've also found using perftools.rb that it's pretty easy to s
106.
▲
by
cirwin
14y ago
Consider you have two of these things close together: [10, 11, 12].map{|x| x.to_s(16)} [:baz, :bam, :bar].map{|x| x.to_s(16)} At least for me, I tie the 'x's together in my head; so I have to concentrate to realise that there are t
107.
▲
by
cirwin
14y ago
Very good advice! ISO8601 is a perfect tradeoff between the machine readable Unix timestamp, and the human readable mess used in http. The only thing libraries often get wrong is that the timestamp should always be present and default to 'Z
108.
▲
by
cirwin
14y ago
As someone who uses both iPads and vim a lot, I'd disagree with this. The iPad screen should be ideal for making selections with your fingers directly because the keyboard and the code are so close together. It currently doesn't feel ideal,
109.
▲
by
cirwin
14y ago
One of the coolest things about pry is how it doesn't need to monkey-patch Object in order to add custom functionality. The command-system stands above the ruby level.
110.
▲
by
cirwin
14y ago
I agree that this behaviour is quite objectionable, though for a subtly different reason. In particular it's not a case of malicious spreading of misinformation, it seems that in the case that the hoax worked the lies were deleted. Rather i