HNHacker News
TopNewBestAskShowJobs

tr4nslator

267 karma · joined September 5, 2007

Freelance Japanese translator. Working on langwidget.

tr [atto] nslator [dotto] jp

submissionscomments
tr4nslator··on Heroku Node.js Support (experimental)
Because I'd rather write my programs in a Lisp like Javascript?
tr4nslator··on Heroku Node.js Support (experimental)
Actually, a bunch of us are working on taking the pain out of async programming. Here's my approach, using (fab)'s chained continuations:

http://www.flickr.com/photos/tr4nslator/4532445014/in/set-72...

tr4nslator··on google.cn now redirects to google.com.hk
"Traditional Chinese characters are widely used, and are the de facto writing standard in Hong Kong."

from http://en.wikipedia.org/wiki/Languages_of_Hong_Kong#Written_...

tr4nslator··on Get any a-Z char using only []()+{}/. in JavaScript (for XSS obfuscation)
You can even do that in half the bytes by making use of all unary operators together:

  -~+[]
-~ is a good proxy for ++ when incrementing unassigned variables.
tr4nslator··on <script type="text/coffeescript">
I think this should probably point here:

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.

tr4nslator··on Beef Bowl Economics
The Japanese government is not unique here. Earmarks and pork are just as big a problem in the United States.
tr4nslator··on Node.js powers comet for plurk (100k+ users at once)
Do you anticipate that the use of WebSockets will improve performance? If so, can you estimate to what degree?
tr4nslator··on (fab) - A pure javascript DSL for building async web apps
I actually think this is less magical than most approaches, since there's no pre-compilation or "with" scoping magic. Sinatra's hello world is awesome, until you realize that a lot of the cool stuff is scoping magic that you have to throw out when your app has to play nicely with others.

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.

tr4nslator··on (fab) - A pure javascript DSL for building async web apps
Indeed you can. (fab) is 100% async:

http://gist.github.com/287475#file_hello_async.js

tr4nslator··on (fab) - A pure javascript DSL for building async web apps
Indeed, CoffeeScript was built on Ruby, and its REPL on Narwhal.
tr4nslator··on (fab) - A pure javascript DSL for building async web apps
It's vaguely lispy, but without all that nesting.

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:

http://gist.github.com/287475#file_hello_middleware.js

tr4nslator··on (fab) - A pure javascript DSL for building async web apps
Yeah, a (fab) function just returns itself. It's like jQuery's chaining, but using argument signatures instead of object methods to delegate work. The last (fab) is just a way to indicate the chain is over so that a listener can be returned, and has the additional benefit of making it look declarative.
tr4nslator··on (fab) - A pure javascript DSL for building async web apps
Hey all,

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.
tr4nslator··on JQuery 1.4 released
.live() : DOM event handling :: CSS : DOM styling
tr4nslator··on Picard : A Micro-framework for node.js
The latter was just from my framework of choice until now, Tornado.
tr4nslator··on Picard : A Micro-framework for node.js
Server-side Javascript frameworks seem to be in the midst of a Cambrian explosion right now.

I just pushed my own today:

http://github.com/jed/fab/

tr4nslator··on Google Wave's Scrollbars
Actually, I'm pretty sure this is another version of the Picasa scrollbar, which has been around for a few years:

http://news.cnet.com/i/bto/20090102/PIcasaMac-main_610x449.p...

tr4nslator··on Obama Admits That He’s Never Used Twitter, Thinks The Chinese Should Be Able To
Or for a more quantitative approach, with 1.7 Chinese characters per English word[1] and an average English word length at 5.1 letters[2], then somewhere around 420 characters.

(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/

tr4nslator··on Twisted.web vs Tornado Performance, part deux
Actually, I think their solution is pretty elegant; any task that takes that long is abstracted to its own HTTP request, which itself can be blocking without blocking the original request.
tr4nslator··on Any evidence that iTunes Genius (incl. Mixes) does what it claims?
I'm pretty sure they're not using much metadata, but instead using collaborative filtering based on the libraries other iTunes users.

"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...

tr4nslator··on Ask HN: Please review my app
You might want to create your own original "feedback" image for the tab on the left. Yours[1] appears to have been copied from uservoice[2] (probably a leftover from deciding to use their feedback or use your own, am I right?).

  [1] http://www.fromabirdie.com/images/feedback_tab_white.png
  [2] http://cdn.uservoice.com/images/widgets/en/feedback_tab_white.png
tr4nslator··on 5 Tips for Better jQuery Code
Check out the jQuery Metadata plugin:

http://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.

tr4nslator··on An interesting Google Translate quirk
Yes, that is why it's not a translation, but a localization (you know, for the locals).
tr4nslator··on An interesting Google Translate quirk
It's a lesson in the difference between translation and localization.

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")

tr4nslator··on Proggit challenge: Find a number N which, when Googled, yields N results
Is this cheating?

http://www.google.com/search?q=00000000000000000000000000000...

tr4nslator··on Ask HN: Review our app, textpanda (web-based input shortcuts for the lazy)
That's a good point. Fixed.
tr4nslator··on Ask HN: Review our app, textpanda (web-based input shortcuts for the lazy)
I'm having trouble recreating this. What's your OS/browser?
tr4nslator··on Ask HN: Review our app, textpanda (web-based input shortcuts for the lazy)
I agree. It's not monetizable in its current state, but I'm curious what features you think would get it closer, such as:

* 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.

tr4nslator··on Ask HN: Review our app, textpanda (web-based input shortcuts for the lazy)
After getting such useful feedback on HN for typd.in this week (special thanks to huhtenberg/LogicHoleFlaw/ken), I thought I'd put our next project out there to get some more ideas.

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.

tr4nslator··on Ask HN: Review our app, typd.in (a web-based Japanese IME)
Thanks for the good feedback. I think we'll need to move the indicator to the left side and pad the input to offset it, so that it's more visible.

Correcting scrolling is less trivial, and will have to wait for v2.

Page 1 of 2Next →