Chris Eppstein Joins Sass Team

Posted 7 days back at Blog Posts : Nex3

<link href="/stylesheets/main.css?1209861737" rel="stylesheet" media="text/css" type="screen"/> <link href="/stylesheets/coderay.css?1209861737" rel="stylesheet" media="text/css" type="screen"/>

It’s been too long since I’ve made a post here. I’ve actually had lots of ideas floating around in my head, but they all seemed too small to make a good first-post-in-a-while. I’ve decided that doesn’t matter, so I’m just going to start writing small posts as ideas hit me.

The first one, this one, is an announcement that I’ve been meaning to make. This shouldn’t come as much of a surprise to anyone paying attention to the Haml lists: Chris Eppstein is now a member of the Sass core team.

Chris has been doing a lot of really cool stuff with Sass recently. He’s the author of the Compass framework, the first Sass framework (as far as I know) which contains ports of the Blueprint and YUI CSS libraries as well as its own core code, all Sassified to make it more modular, semantic, and powerful than the source frameworks. He’s been pushing the boundaries of Sass as a language and in the process helping to form what will become Sass 2.2 (more on that in a future post).

Weekly Digest, 12-28-08

Posted 7 days back at almost effortless

Welcome to the final Weekly Digest of 2008. I hope the holidays have found you well :)

Trevor

Towards Rack 1.0 / Introducing the Rack Core Team

Rack has become an important part of the Ruby infrastructure and should be managed as such. Thus I have founded the Rack Core Team, which consists of...

You Got your Merb in my Rails

Forcing Rails to acknowledge the needs of a community of people by proving those ideas out in code worked here, and it will work again.

Work on what you use and share the rest

It seems that we thoroughly caught the interwebs with surprise by announcing that Merb is being merged into Rails 3. 96% of the feedback seems to be very positive. People incredibly excited about us closing the rift and emerging as a stronger community.

Dispatch from the Front Lines

It’s been a very busy few days, but I’m glad to say that the work on the Rails/Merb merge is going quite smoothly. Some things that have already happened...

Bringing Merb's provides/display into Rails 3

The flow of Merb ideas into Rails 3 is already under way. Let me walk you through one of the first examples that I've been working on the design for. Merb has a feature related to Rails' respond_to structure that works for the generic cases where you have a single object or collection that you want to respond with in different formats.

The Merbist » Blog Archive » Merb/Rails merge, or Why should merbists be happy? | merb news - consulting - training

Why merge when we are about to win?! What does Merb win by being merged into Rails? Why not merge Rails into Merb? You are killing innovation by killing the competition. You screwed us over and now I have to go “back” to Rails. Rails 3.0 won’t even be as good as Merb 1.x. The Rails team won’t let you do what you have to do to merge Merb into Rails. DHH is a jerk.

Analemma Over the Porch of Maidens

If you took a picture of the Sun at the same time each day, would it remain in the same position? The answer is no, and the shape traced out by the Sun over the course of a year is called an analemma.

Riding Rails: Merb gets merged into Rails 3!

It’s christmas, baby, and do we have a present for you. We’re ending the bickering between Merb and Rails with a this bombshell: Merb is being merged into Rails 3!

Posterous launches dead simple group sites

Each site can now have multiple contributers. You can add your friends or family’s email addresses to any Posterous site you control, and they can then email stuff in too. All they have to do is email post@sitename.posterous.com. They don't even need to register.

UserNameCheck.com

This site is a quick and dirty solution to a question that I often lay awake at night worrying about. Do I have my username registered across every site that I should? What if the next internet humiliation meme just happens to share the username I've been using for years...

Chief Of The Year: Amazon CTO Werner Vogels

Amazon offers a few metrics as proof points. There are 440,000 registered AWS developers, 29 billion objects stored in S3, and, earlier this year, the amount of network bandwidth consumed by AWS surpassed that required for Amazon's retail site.

Useful OS X hidden features

So, especially for those of you using computers, instead of Windows, here’s some key combos and other built-in helper applications you might not already know about.

Timothy

Y.P.R.: 11 Words That Sound Offensive, But Aren't

You will laugh. You will laugh /out loud/.

Extended life battery for those experience less than desired G1 battery life | Android Community

I wouldn't go so far as some have gone and say that the G1 has a worse battery life than the first gen iPhones, but I can confirm that if you like auto-location intensive softs like loopt or are using the phone to navigate and plan on having it find your location more than a few times while navigating, you will beat the stock G1 battery to within an inch of its life in a matter of two or three hours. Odds are good that I'm going to order one of these.

Debian Package of the Day » Blog Archive » watch (from procps): execute a program at regular intervals, and show the output

watch is one of my favorite programs of all time. You can always tell when my OCD is getting the better of me by how many tabs on my tab bar in konsole are just doing watch -d whatever

Merb 1.0.7 Release Notes

Posted 7 days back at Katz Got Your Tongue?

We just released Merb 1.0.7. Some highlights:

  • merb-action-args doesn’t break when you use a exotic defaults (like [] :P )
  • merb no longer drops a pid except in daemonized or clustered mode. This fixes a bug people were having when running rake tasks or merb -i on production servers
  • fixes a bug where partials with absolute paths were not getting implicit local variables correctly
  • caches _template_for, which should improve performance
  • adds better documentation for the block parameters of the router’s defer_to
  • request() now goes through additional rack middleware, not just the default Merb application
  • fixes generated .gitignore to completely ignore gems/gems and gems/specifications
  • adds datamapper and do_sqlite3 to generated dependencies.rb
  • fixes outdated documentation in merb_mailer for using merb_mailer with TLS (gmail)
  • fixed at least one case where thor bundling was throwing an error related to full_name. If you encounter other errors, please report them immediately on the Merb tracker and tag them “bundling”
  • fixed an issue with merb-helpers where label() was ignoring passed in attributes

This is the first post-merge release of Merb. As you can see, we’re still fixing bugs at a pretty fast clip. We *can* chew gum and walk at the same time!

I hope everyone enjoys the rest of their weekend. I, for one, am looking forward to continuing work this week!

<script type="text/javascript"> addthis_url = 'http%3A%2F%2Fyehudakatz.com%2F2008%2F12%2F28%2Fmerb-107-release-notes%2F'; addthis_title = 'Merb+1.0.7+Release+Notes'; addthis_pub = ''; </script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>

Merb 1.0.7 Release Notes

Posted 7 days back at Katz Got Your Tongue?

We just released Merb 1.0.7. Some highlights:

  • merb-action-args doesn’t break when you use a exotic defaults (like [] :P )
  • merb no longer drops a pid except in daemonized or clustered mode. This fixes a bug people were having when running rake tasks or merb -i on production servers
  • fixes a bug where partials with absolute paths were not getting implicit local variables correctly
  • caches _template_for, which should improve performance
  • adds better documentation for the block parameters of the router’s defer_to
  • request() now goes through additional rack middleware, not just the default Merb application
  • fixes generated .gitignore to completely ignore gems/gems and gems/specifications
  • adds datamapper and do_sqlite3 to generated dependencies.rb
  • fixes outdated documentation in merb_mailer for using merb_mailer with TLS (gmail)
  • fixed at least one case where thor bundling was throwing an error related to full_name. If you encounter other errors, please report them immediately on the Merb tracker and tag them “bundling”
  • fixed an issue with merb-helpers where label() was ignoring passed in attributes

This is the first post-merge release of Merb. As you can see, we’re still fixing bugs at a pretty fast clip. We *can* chew gum and walk at the same time!

I hope everyone enjoys the rest of their weekend. I, for one, am looking forward to continuing work this week!

<script type="text/javascript"> addthis_url = 'http%3A%2F%2Fyehudakatz.com%2F2008%2F12%2F28%2Fmerb-107-release-notes%2F'; addthis_title = 'Merb+1.0.7+Release+Notes'; addthis_pub = ''; </script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>

A Rails Communique

Posted 8 days back at Katz Got Your Tongue?

After staying up until 5am last night, I slept in a bit this morning. I had lunch with Koz, his wife, and Ezra, and we got to talking some more about the issues we’ve been addressing over the past few days (we had a nice discussion about router recognition and generation, and various techniques we’ve both been using to improve performance of large route sets).

  • After lunch, I spent some more time thinking about how to further clean up ActionController and ActionView, and with the help of Josh and Pratik, who both recently did some refactoring work in ActionView, came up with a good plan of attack. I’ll post more details once I have some code to show, but the bottom line is that it should reduce the rendering pipeline down to a few hash lookups and a send. We already got close to this in Merb, but the recent work Josh did on ActionView provides a nice foundation for knocking this one out of the park.
  • Michael has continued his work on ActiveSupport, and is almost finished with a way of requiring ActiveSupport that will include only the barebones so that it can be used for third-party libraries. In particular, he would like to move Templater over from Extlib to ActiveSupport once the minimalist version has been released (the minimalist package now uses less resources than Extlib). Some details from Michael’s testing.
  • Daniel has been working on porting the Merb bootloader system over to Rails’ initializers, which should be 100% backward compatible but more flexible, especially for plugins.

Maybe one of these days we’ll take a day off. I hope to have some exciting code for you tomorrow!

<script type="text/javascript"> addthis_url = 'http%3A%2F%2Fyehudakatz.com%2F2008%2F12%2F28%2Fa-rails-communique%2F'; addthis_title = 'A+Rails+Communique'; addthis_pub = ''; </script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>

A Rails Communique

Posted 8 days back at Katz Got Your Tongue?

After staying up until 5am last night, I slept in a bit this morning. I had lunch with Koz, his wife, and Ezra, and we got to talking some more about the issues we’ve been addressing over the past few days (we had a nice discussion about router recognition and generation, and various techniques we’ve both been using to improve performance of large route sets).

  • After lunch, I spent some more time thinking about how to further clean up ActionController and ActionView, and with the help of Josh and Pratik, who both recently did some refactoring work in ActionView, came up with a good plan of attack. I’ll post more details once I have some code to show, but the bottom line is that it should reduce the rendering pipeline down to a few hash lookups and a send. We already got close to this in Merb, but the recent work Josh did on ActionView provides a nice foundation for knocking this one out of the park.
  • Michael has continued his work on ActiveSupport, and is almost finished with a way of requiring ActiveSupport that will include only the barebones so that it can be used for third-party libraries. In particular, he would like to move Templater over from Extlib to ActiveSupport once the minimalist version has been released (the minimalist package now uses less resources than Extlib). Some details from Michael’s testing.
  • Daniel has been working on porting the Merb bootloader system over to Rails’ initializers, which should be 100% backward compatible but more flexible, especially for plugins.

Maybe one of these days we’ll take a day off. I hope to have some exciting code for you tomorrow!

<script type="text/javascript"> addthis_url = 'http%3A%2F%2Fyehudakatz.com%2F2008%2F12%2F28%2Fa-rails-communique%2F'; addthis_title = 'A+Rails+Communique'; addthis_pub = ''; </script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>

HAML

Posted 8 days back at ZachInglis.com

I find myself in the dispute of HTML vs HAML quite regularly. The people using HTML find it hard to comprehend what people like about HAML, or can comprehend and don’t think there is a big enough advantage.

I joined the league of HAML users around mid-March 2008. I had just come back from SXSW where myself and a few other developers discussed the advantage of using HAML instead of HTML, over some Pad Thai. I was on the opposite side of the fence than I am now; I hated HAML with a passion. I still do not think it is the ultimate solution but I think it is pertinent solution.

I like HAML for it’s simplicity and sterility. It is a lot easier to read through the nodes and easier to understand what is going on. I admit that sometimes “it does not feel right”. The lack of ending blocks feels clumsy and trying to fit strong and italic tags into text can be ugly.

One of the prominent arguments that I hear is regarding add another layer to work with. Ruby’s OOP qualities and thus Rails’ too are about layers and <abrr title="Domain-specific Language">DSLs, making life easier to write.

Fundamentally, HAML is a much prettier language in all, but it is not the final solution, and it’s not for everyone.

Email address scrambling methods compared

Posted 8 days back at zargony.com

A while ago, I wrote about different methods in JavaScript to prevent spam harvesters from recognizing an email address. These methods work by placing a scrambled version of the email address into the page source so that a spam harvester cannot recognize it as an email address. Using JavaScript, the scrambled text is unscrambled and displayed as usual to human visitors. Usually, the “scrambling” is based on replacing characters of the email address with its hex-entities (Rails’ mail_to helper does so if using :encode => :hex or :encode => :javascript). My theory was/is, that using hex-entities is not sufficient anymore nowadays, since they can be easily reversed with simple search-and-replace operations.

So I came up with the idea to use a scrambling method that cannot be easily reversed. I assumed that spam harvesters probably can decode hex-entities, but still aren’t able to execute JavaScript. However since this was just an assumption, I started a simple test over the last 6 months to find out how good or bad the different scrambling methods perform.

Read more »

Email address scrambling methods compared

Posted 8 days back at zargony.com

A while ago, I wrote about different methods in JavaScript to prevent spam harvesters from recognizing an email address. These methods work by placing a scrambled version of the email address into the page source so that a spam harvester cannot recognize it as an email address. Using JavaScript, the scrambled text is unscrambled and displayed as usual to human visitors. Usually, the “scrambling” is based on replacing characters of the email address with its hex-entities (Rails’ mail_to helper does so if using :encode => :hex or :encode => :javascript). My theory was/is, that using hex-entities is not sufficient anymore nowadays, since they can be easily reversed with simple search-and-replace operations.

So I came up with the idea to use a scrambling method that cannot be easily reversed. I assumed that spam harvesters probably can decode hex-entities, but still aren’t able to execute JavaScript. However since this was just an assumption, I started a simple test over the last 6 months to find out how good or bad the different scrambling methods perform.

Read more »

Scalable Datasets: Bloom Filters in Ruby

Posted 9 days back at igvita.com

When you're working with large datasets it's always nice to have a few algorithmic tricks up your sleeve, and Bloom Filters are exactly that - often overlooked, but an extremely powerful tool when used in the right context. A Bloom Filter is a probabilistic data structure that is used to test whether an element is a member of a set, or more simply, it's an incredibly space efficient hash table that is often used as a first line of defense in high performance caches. Database queries too expensive? Then a Bloom Filter might help. As an example, Google's Bigtable uses a bloom filter as first lookup to avoid unnecessary disk accesses.

Bloom Filter theory and Applications

Instead of storing the key-value pairs, as a regular hash table would, a Bloom filter will give you only one piece of information: true or false based on the presence of a key in the hash table (equivalent to Enumerable's include?() function in Ruby). This relaxation allows the filter to be represented with a much smaller piece of memory: instead of storing each value, a bloom filter is simply an array of bits indicating the presence of that key in the filter. Trying to build a fast spellchecker? Bloom filters are your best friend.

The 'probabilistic' part of the filter comes from the fact as with any Hash table, there is a probability of collision where two keys may map into the same bucket. Hence, false positives are possible (a filter with a single entry ('word') may indicate that ('word2') is part of the set, but the reverse (false-negatives) are not possible).

The possibility of a false-positive is something you'll have to deal with (for most caches it doesn't matter, since Bloom filters are an optimization technique to guard against the expensive operations), but as with any probability we can optimize it for each use case (speed vs error rate). For this exact reason, Bloom filters often use multiple hash functions for each key. Let's see what that means...

Understanding the Math

Wikipedia has a great explanation of the math behind Bloom Filters, which I would encourage you to walk through, but the takeaway is that the probability of a false-positive (where k is the number of hashing functions, n is the size of the set, and m is the size of the bloom filter in bits) is:

Hence, we can pick a desired error rate and optimize the size of the filter to match our requirements. In fact, if you do the math, you'll find an interesting rule of thumb: a Bloom filter with a 1% error rate and an optimal value for k only needs 9.6 bits per key, and each time we add 4.8 bits per element we decrease the error rate by ten times. Let's see what that means in practice for a 10,000 word dictionary:

0.1% error rate for a 10,000 word dictionary in 18kB of memory? Not bad! Now let's do it Ruby.

Working with Bloom Filters in Ruby

After some poking around I've resurrected Tatsuya Mori's sbloomfilter, fixed a few bugs, and extended the library. To create the filter, you'll have to specify the size of the filter (m), the number of hash functions (k), and a random seed:

> bloom_example.rb

#!/usr/bin/env ruby
require 'bloomfilter'
 
WORDS = %w(duck penguin bear panda)
TEST = %w(penguin moose racooon)
 
# m = 100, k = 4, seed = 1
bf = BloomFilter.new(100, 4, 1)
 
WORDS.each { |w| bf.insert(w) }
TEST.each do |w|
  puts "#{w}: #{bf.include?(w)}"
end
 
bf.stats
 
#  penguin: true
#  moose: false
#  racooon: false
#
#  Number of filter bits (m): 100
#  Number of filter elements (n): 4
#  Number of filter hashes (k) : 4
#  Predicted false positive rate = 0.05%
 

Once the filter is populated you can easily view the stats and expected error rate. Current limitations are: the hash function is fixed as CRC32 and seeded with k different values, and currently you cannot delete entries from a Bloom Filter - for that, a counting Bloom filter must be implemented. Go forth and conquer!

NHRuby & the Importance of User Groups

Posted 9 days back at zerosum dirt(nap) - Home

There are some changes in store for NHRuby in 2009. Group founder Scott Garman is headed out to the west coast and is therefore stepping down as coordinator, and I’ll be stepping in to fill the void. Over the past 2 years Scott has done a great job getting things started and lining up interesting content. I hope we can keep the momentum going in his absence!

Meetings will continue to be held at RMC Research in Portsmouth (directions), but the dates will shift slightly; from this point forward we’ll be meeting on the third Thursday of the month. We’ve also set up new mailing lists and a new website to document group activities and associated shenanigans. I’ll be migrating more archival material over from the wiki shortly.

The 2009 event calendar kicks off to a great start with a talk by Jon Linowes on January 15th. He’ll be speaking about ReviewRamp, his Rails-based startup, Cucumber integration testing, and his own DynamicRecord framework. If you’re in the southern Maine, New Hampshire, or northern Massachusetts area I really encourage you to come out and hang with us. We’re a small, friendly group, and new people of all skill levels are always welcome.

Never been to your local user group? You’re really missing out. Attending them is a great way to learn firsthand about new ideas and technologies from passionate people who actually give a shit. It’s also a great way to network and find other folks to bounce ideas off of or work on projects with you. The Internet is a great place to meet people too, of course, but there’s just something special about meeting someone in person, being able to pop your hand up in the middle of a talk to get clarification, or grabbing a beer or two after an inspiring discussion. If you haven’t yet attended your local user group(s), make it part of your new years resolution to change that.

And if your area doesn’t have a user group? Then start one. You might be surprised at who shows up.

Status Memorandum

Posted 9 days back at Katz Got Your Tongue?

Today was another great day working on improving Rails. What happened today:

  • I made my first commits to Rails. The commits remove the use of method_missing in respond_to. Effectively, when you did respond_to {|format| format.html }, the format object was a Responder object that collected up the mime types you specified and then followed your instructions. However, the html method was not defined on Responder. Instead, Responder relied on method_missing to determine, on the fly, whether html was a valid mime type. 
  • The fix was to generate methods for all known mime types in advance. In addition, when method_missing is triggered and a valid mime type is detected, Rails now generates a method on the fly (so at maximum single method_missing will be called for a particular method). The main win here is that since the method is generated, it’s not longer necessary to check whether the mime exists every time. If you get to the format.html method, that’s evidence that the mime exists, since it cannot otherwise be generated.
  • The upside: 8% full-stack speed-boost on both MRI and JRuby for a simple case (bringing the full-stack overhead when using respond_to down from 2.5ms to 2.3ms). It may not seem like a lot, but 0.2ms here, 0.2ms there, and pretty soon you’re talking big… amounts of time?
  • I did a lot of benchmarking on BlockAwareEnhancer. It turns out that for JRuby, the <%= form_for %>…<% end =%> syntax  can bring down a page heavy with block helpers (1,000 block helpers to be precise) down from 30ms to 8ms. In MRI, the same technique brings the total time from 80ms to 65ms. (yes, that is a shockingly good result for JRuby… seems like there are very common, expensive operations that JRuby kicks butt on).
  • Carl is working hard on making the router super-easy to hook into with any front-end DSL. This will help us easily maintain backward compatibility with current Merb syntax, while giving us the ability to give Rails all the new features of the Merb router with a familiar syntax.
  • Michael (antares) continues his work on analyzing parts of Extlib that should go in ActiveSupport, comparing the compatibility of the modules, and bringing in new features (LazySet and DeferredModule come to mind). The idea is to make it easier to opt in to small parts of ActiveSupport with the ability to clearly know what will get pulled in as a result.
<script type="text/javascript"> addthis_url = 'http%3A%2F%2Fyehudakatz.com%2F2008%2F12%2F27%2Fstatus-memorandum%2F'; addthis_title = 'Status+Memorandum'; addthis_pub = ''; </script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>

Status Memorandum

Posted 9 days back at Katz Got Your Tongue?

Today was another great day working on improving Rails. What happened today:

  • I made my first commits to Rails. The commits remove the use of method_missing in respond_to. Effectively, when you did respond_to {|format| format.html }, the format object was a Responder object that collected up the mime types you specified and then followed your instructions. However, the html method was not defined on Responder. Instead, Responder relied on method_missing to determine, on the fly, whether html was a valid mime type. 
  • The fix was to generate methods for all known mime types in advance. In addition, when method_missing is triggered and a valid mime type is detected, Rails now generates a method on the fly (so at maximum single method_missing will be called for a particular method). The main win here is that since the method is generated, it’s not longer necessary to check whether the mime exists every time. If you get to the format.html method, that’s evidence that the mime exists, since it cannot otherwise be generated.
  • The upside: 8% full-stack speed-boost on both MRI and JRuby for a simple case (bringing the full-stack overhead when using respond_to down from 2.5ms to 2.3ms). It may not seem like a lot, but 0.2ms here, 0.2ms there, and pretty soon you’re talking big… amounts of time?
  • I did a lot of benchmarking on BlockAwareEnhancer. It turns out that for JRuby, the <%= form_for %>…<% end =%> syntax  can bring down a page heavy with block helpers (1,000 block helpers to be precise) down from 30ms to 8ms. In MRI, the same technique brings the total time from 80ms to 65ms. (yes, that is a shockingly good result for JRuby… seems like there are very common, expensive operations that JRuby kicks butt on).
  • Carl is working hard on making the router super-easy to hook into with any front-end DSL. This will help us easily maintain backward compatibility with current Merb syntax, while giving us the ability to give Rails all the new features of the Merb router with a familiar syntax.
  • Michael (antares) continues his work on analyzing parts of Extlib that should go in ActiveSupport, comparing the compatibility of the modules, and bringing in new features (LazySet and DeferredModule come to mind). The idea is to make it easier to opt in to small parts of ActiveSupport with the ability to clearly know what will get pulled in as a result.
<script type="text/javascript"> addthis_url = 'http%3A%2F%2Fyehudakatz.com%2F2008%2F12%2F27%2Fstatus-memorandum%2F'; addthis_title = 'Status+Memorandum'; addthis_pub = ''; </script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>

Architecting for Green Computing

Posted 9 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Green computing is becoming more and more important every day. System architects need to take into account energy consumption and to find ways to reduce it through: system virtualization, server consolidation, smart unit positioning in data centers, and others. By Abel Avram

rails3-merb2-win-for-us-number-one

Posted 9 days back at Falling Leaves - Ian

The first WIN for us to come out of the Rails/Merb merge is that the awesome provides API in merb (which Dan gave a compelling introduction to at RailsCamp4), has made its way to rails-3 (along with some tweaks to the API).

This is a win for us because our response_for plugin provides similar functionality (for rails 2 apps). So that's one less plugin for me to maintain.

Can't wait for < a href="http://brainspl.at/articles/2008/12/23/merb-is-rails">RARB!


1 ... 7 8 9 10 11 ... 634