My Rails wishlist:
I wish I’d written it.
I wish I didn’t have to go to work today at my stupid Java job.
–
Giles B.
http://www.gilesgoatboy.org
My Rails wishlist:
I wish I’d written it.
I wish I didn’t have to go to work today at my stupid Java job.
–
Giles B.
http://www.gilesgoatboy.org
I used to be proud to work with perl all day and not have to deal with
“real” languages. Now perl bores me to no end!
This post contains information on Queue’s in rjs calls.
http://www.railsdevelopment.com/2006/01/15/effectqueue/
Hope it’s what you’re after.
Wish list:
- validates_presence_of that actually works for bools (false and true
allowed for input, nil not allowed)
Amen.
Another wish would be the function
ar_instance.save_guaranteeing_these_arent_blank(:name, :phone)
(or does it exist)
quick hack:
class ActiveRecord::Base
def save_unless_missing *args
self.errors.clear
passed = true
for arg in args
val = self[arg]
unless val and val != ‘’
self.errors.add arg, " cannot be blank"
passed = false
end
end
return nil unless passed
return save
end
end
Except that it actually worked with the validates_x_of or what not.
Cheers.
-Roger
I used to be a Perl guy, it’s actually a very powerful language, but it
became “the” CGI scripting language, and consequently picked up a very
bad
reputation, as almost every bad piece of code from about 1996 to 2001
was
written in Perl.
I heard Glenn Vanderburg in a podcast say “You can do practically
anything
with Perl except read it.”
–
Giles B.
http://www.gilesgoatboy.org
Stupid WordPress recently smashed all line endings, so the code views
are mangled a bit.
Ugh I hate it when wordpress does that–especially when you modify an
existing comment. Boo!
Thanks!
-Roger
On Feb 13, 2008, at 3:50 PM, Roger P. wrote:
(or does it exist)
You might find some of the custom validators I wrote tobe useful.
They’ve also been modified to allow many of the appropriate UTF-8
characters. (download link is at the bottom of the article)
http://www.railsdev.ws/blog/11/custom-validations-in-rails/
Stupid WordPress recently smashed all line endings, so the code views
are mangled a bit.
–
def gw
writes_at ‘www.railsdev.ws’
end
Just better API docs. Rdoc doesn’t do it. In fact, it blurs the
line between internal Rails code and things you are supposed to use.
There are 4 places in Rails I like to put api calls: Model, View,
Controller and Console. Given an arbitrary helper, say, I’d like to
know whether I have access to call it in those 4 places. From the
documentation.
F
My major wishes for rails are three big points:
A really simple, fast deployment option, although I am doing alright
with capistrano + nginx + mongrel cluster, I just think a very simple
system would be awesome. Although Heroku and Switchpipe are both shaping
up as options on that front.
Better documentation. I am disappointed that as a community we really
do a poor job of online documentation. My favorite that I have found by
far is:
http://www.railsbrain.com/api/rails-2.0.2/doc/index.html
I love it and it is quite good as far as interface and searching is
concerned. I just wish as a community we did a better job of having
every method properly documented with a quick summary, all possible
input values, the output, side-effects and samples. I admit books such
as “Rails Way” and “AWDR” do a good job though of filling this gap.
I would like to mention that Merb is a very interesting budding
alternative. Merb + Datamapper could shape up as a viable rails
alternative within the next couple years.
Charlie B. wrote:
What’s in your wishlist for rails?
- Speed and Concurrent Requests. I am very interested in Thin as far as
basic speed boosts go but there is a lot of cruft in rails that slows it
down. Just simple garbage collection fixes recently revealed can speed
up rails significantly.
which are you referring to?
Yeah my wish would be rails that could just ‘meld’ with 1.9 to be super
fast. And fast startup time so that if you use cgi you’re ok (then the
deployment problem is…less). Ideally for deployment I guess would be
mod_rails that loads ‘rails’ itself then for each request it forks, goes
and reads the app’s configs, and processes the file (and this is fast).
Ahhh. wishing is always so easy
Thoughts?
-R
On Thu, Feb 14, 2008 at 4:54 PM, Jeremy E.
[email protected] wrote:
Charlie B. wrote:
What’s in your wishlist for rails?
- Thread safety in ActionPack
- Thread pooling in ActiveRecord
These are ‘magic beans’ features whose importance deserve to be
thoroughly deflated.
- Smaller memory footprint
- Saner Ruby GC that takes copy-on-write into account (would help a lot
with 3))
These are extremely valuable. Some folks have been making great
strides here in the past 6 months.
Hongli L. has modified Ruby GC to be CoW-friendly and Matz has
expressed interest in merging with Ruby 1.9:
http://izumi.plan99.net/blog/index.php/category/optimizing-rails/
The Acunote crew have been doing extensive memory profiling and their
patches are going straight to Rails trunk:
http://blog.pluron.com/2008/02/memory-profilin.html
Best,
jeremy
- Smaller memory footprint
- Saner Ruby GC that takes copy-on-write into account (would help a lot
with 3))These are extremely valuable. Some folks have been making great
strides here in the past 6 months.Hongli L. has modified Ruby GC to be CoW-friendly and Matz has
expressed interest in merging with Ruby 1.9:
http://izumi.plan99.net/blog/index.php/category/optimizing-rails/
Wow the new code for the GC looks a lot nicer than the old. Note
however that it still reads all allocated memory (I believe) – just
doesn’t write to all of it anymore per sweep. Also note that it still
uses mark and sweep so this may not be the optimal solution yet. More
like a patch of the working one with mostly similar characteristics, and
some speed up.
Looks nicer than it used to be.
-Roger
Based on 2 years of Rails experience, as of next month, here’s my wish
list:
Comprehensive deprecation and removal information - something
better than Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.. Ideally, a utility
that would scan your project and report on what would need to change to
move it to newer Rails version X. Is API call deprecated in version X?
Is API call gone in version X?
api.rubyonrails.org documentation that includes the version of Rails
at which an API call was introduced and whether it’s been deprecated or
not (for Java people, something akin to @since and @Deprecated Javadoc
tags)
Support for prepared statements in ActiveRecord
Support for DB connection pooling in (a layer above, perhaps)
ActiveRecord
Wes
Jeremy K. wrote:
On Thu, Feb 14, 2008 at 4:54 PM, Jeremy E.
[email protected] wrote:Charlie B. wrote:
What’s in your wishlist for rails?
- Thread safety in ActionPack
- Thread pooling in ActiveRecord
These are ‘magic beans’ features whose importance deserve to be
thoroughly deflated.
I disagree. Thread safety in ActionPack would allow you to use fewer
processes in production, which would help memory usage. I’m not saying
it is very important, but that doesn’t mean it doesn’t belong on a
wishlist.
A bigger isssue is the lack of connection/thread pooling in
ActiveRecord, which makes it pretty unusable for web frameworks such as
Ramaze. With allow_concurrency = false, if two requests need access to
the database at the same time, one fails, as there is no thread safety.
If you set allow_concurrency = true, every request gets its own
connection, but garbage collection doesn’t kick in and you eventually
run out of resources (that could be a problem with the database adapter
and or Ramaze leaving references to the thread open, though).
These features are obviously important to the people designing
alternative ruby web frameworks such as Ramaze and Merb and ORMs such
as Sequel and DataMapper.
Obviously it is easier to ignore thread safety, but do you believe that
ActionPack would be worse off if it were thread safe, or that
ActiveRecord would be worse off if it supported connection pooling?
- Smaller memory footprint
- Saner Ruby GC that takes copy-on-write into account (would help a lot
with 3))These are extremely valuable. Some folks have been making great
strides here in the past 6 months.Hongli L. has modified Ruby GC to be CoW-friendly and Matz has
expressed interest in merging with Ruby 1.9:
http://izumi.plan99.net/blog/index.php/category/optimizing-rails/
I’ve read about this work, but I did not know that Matz was interested.
I certainly hope it gets applied.
The Acunote crew have been doing extensive memory profiling and their
patches are going straight to Rails trunk:
Make Your Ruby/Rails App Fast: Performance And Memory Profiling Using ruby-prof and KCachegrind - Acunote Blog
That’s good to know.
Thanks,
Jeremy
Roger P. wrote:
Another wish would be the function
ar_instance.save_guaranteeing_these_arent_blank(:name, :phone)
(or does it exist)
For that last one, validates_presence_of does it.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs