267 karma · joined September 5, 2007
tr [atto] nslator [dotto] jp
http://www.flickr.com/photos/tr4nslator/4532445014/in/set-72...
from http://en.wikipedia.org/wiki/Languages_of_Hong_Kong#Written_...
-~+[]
-~ is a good proxy for ++ when incrementing unassigned variables.http://jashkenas.github.com/coffee-script/#scripts
The salient point is that CoffeeScript now automatically compiles any code in a script tag with type text/coffeescript. Pretty cool.
My original approach for (fab) was like jQuery:
fab()
.find( path )
.bind( method, handler )
.find( subpath )
.bind( method, handler )
.end()
.end()
.end()
but I realized that I could simplify things by getting rid of methods entirely, and reserving methods for HTTP methods and status codes.As for people not realizing they can define functions outside of the DSL, I'm hoping that the extensibility of middleware will mitigate that, just as the ecosystem of plugins did for jQuery.
Multi-line functions work okay, but it's definitely cleaner to name them and put them somewhere else so that your code ends up looking like a site map:
I just launched a dead-simple web framework on top of node.js. It uses (abuses?) a lot of the dynamic nature of javascript to create a jQuery-inspired DSL that's pure javascript, allowing you to create really concise web apps like this:
( fab )
( "/time", function(){ return "the time is " + (new Date).toTimeString() } )
( "/date", function(){ return "the date is " + (new Date).toDateString() } )
( fab )
I'd love to hear any feedback from the folks here, so check it out and let me know what you think.I just pushed my own today:
http://news.cnet.com/i/bto/20090102/PIcasaMac-main_610x449.p...
(But of course, it really depends on the nature of the text.)
[1] http://itre.cis.upenn.edu/~myl/languagelog/archives/002379.h... [2] http://blogamundo.net/lab/wordlengths/
"Apple's proprietary recommendation engine that uses collaborative filtering and iTunes' built-in rating system to generate music recommendations"
from http://www.appleinsider.com/articles/09/03/24/apple_switches...
[1] http://www.fromabirdie.com/images/feedback_tab_white.png
[2] http://cdn.uservoice.com/images/widgets/en/feedback_tab_white.pnghttp://plugins.jquery.com/project/metadata
It lets you choose where to define this kind of custom data: in an arbitrary attribute, as a class within the className attribute, or in a script tag.
In this case, Google's approach confuses the latter for the former, because its corpus contains parallel texts that have not only been translated (into a different language), but also localized (into a different locale). For example, it may be extrapolating incorrectly from a French document and an English document with the following phrases in the same location:
FR Cliquez ici pour la version anglaise.
EN Click here for the French version.
This sign is another good example of how parallel texts are not always translations:http://flickr.com/photos/jadelin/2205088201/
(the Japanese "おかえりなさい" here means "Welcome home")
http://www.google.com/search?q=00000000000000000000000000000...
* more rich replacement (including functions/regex) * dynamic content like stock prices * ability to chain expansions quasi-recursively * SSL / privacy
As a reference point, TextExpander (http://www.smileonmymac.com/TextExpander/) is an OS X app that offers similar functionality, and it's $30.
textpanda is a simple bookmarklet that lets you define shortcuts for any text input on the web (think really simple emacs bindings). Since it's more of a quick proof of concept than anything, we're not quite sure what to add next (functions and other dynamic replacement? real user authentication? subscriptions to other users' macros?) and would love to hear what you guys think.
Correcting scrolling is less trivial, and will have to wait for v2.