You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Asset Pipelineを備えたRails 3.1のリリースに向けて、その根幹を担うSprocketsをちょっと触っておくことにした。 JavaScript dependency management and concatenation: Sprockets SprocketsはRubyで書かれたJavaScriptプリプロセッサで、複数のJavaScriptソースファイルを1つにまとめるのが主な機能。それによって以下のようなメリットがある。 複数のサイトやアプリケーションで共通するコードを再利用可能な形で切り出した構成にできる JavaScriptプラグインという単位でCSSや画像もまとめることができる JavaScriptファイルを1つにまとめてブラウザに読ませることによる高速化 HTTPリクエストの回数を減らすことができる JavaScriptをコメント付きの複数のファイルおよび
■ [ruby][event] Ruby Advent Calendar 2010の参加者募集中です あのRuby Advent Calendar(jp: 2009)が帰ってきた! Advent Calendarは、12月のクリスマスまでを数えるカレンダーで、1日に1つずつ穴を開けていく感じのものです。ものによっては中にお菓子が入っていたりします。 それになぞらえて、1日に1つずつRubyに関するTipsを書いていくのがRuby Advent Calendarです。参加方法は、ATNDで登録して、担当日に自分のブログに記事を投稿するだけです。3行でもいいので、ぜひ書いてみてください。 Ruby Advent Calendar jp: 2010 英語トラック 今年はJPerl Advent Calendar 2010 - English Trackにならって、英語トラック(http://at
『スクリプト言語間における「lexical closure」の違い』の整理。 http://d.hatena.ne.jp/karasuyamatengu/20101008/1286568265 http://d.hatena.ne.jp/karasuyamatengu/20101007/1286477371 matz 2010/10/09 16:07 えーとですね。まだ、言語ごとにやってることが違うんですよ。 つまり、PerlとRubyはブロック内だけで毎回新しい変数localvarを作ってる(の で、closure間で変数を共有していない)のに対して、Python(関数レベルしかス コープがない)などはもっと広いスコープでlocalvarが有効でclosure間で同じ 変数を共有しています。localvarのスコープがループの中だけの言語 (Ruby,Perl)とclosuresとloc
Blogged by Ujihisa. Standard methods of programming and thoughts including Clojure, Vim, LLVM, Haskell, Ruby and Mathematics written by a Japanese programmer. github/ujihisa I attended a JavaScript workshop in Vancouver today and the talk by John Resig was inspiring. I pick up some notices here. http://www.meetup.com/vancouver-javascript-developers/calendar/13867715/?a=cr1p_grp&rv=cr1p Splitti
In math, a unary operation is an operation with a single input. In Ruby, a unary operator is an operator which only takes a single ‘argument’ in the form of a receiver. For example, the – on -5 or ! on !true. In contrast, a binary operator, such as in 2 + 3, deals with two arguments. Here, 2 and 3 (which become one receiver and one argument in a method call to +). Ruby only has a handful of unary
■ [ruby] RubyからJavaScriptのテストも行うためのライブラリあれこれ RailsなどのWebフレームワークでは、「rake test」一発でWebアプリのテストが走ってくれて楽ちんなわけですが、 JavaScriptのテストは手作業でやってたりしませんか? 「rake test」でJavaScriptのテストもやってしまうためのライブラリがいろいろ出てきてるようなので、列挙してみました。 ブラウザを使うもの 実際にブラウザを起動し、それをRubyからコントロールすることでWebアプリのテストを行う。 Selenium 有名ですね。 調べてないんだけど、Rubyからも使えるし、JavaScriptを操作したりもできるんじゃないですかね(投げやり)。レポート求む。 Watir (RubyForge) #どっちが公式サイトなんだろう Rubyからブラウザを起動し、操作する。
→ ‘newjs’ What A simple command-line tool to create the folders and helper files for a new JavaScript project/library. As a bonus, you can quickly create a website to promote your project. When you start a new JavaScript library, how do you layout the source files, the tests, the distribution files? Do you have support scripts to generate distributions from source files? Run your JavaScript unit t
■ [ruby][git] JRubyがgitに移行 JRubyのリポジトリがsvnからgitに移行したそうな。 Headius: JRuby Moves to Git オフィシャルなリポジトリはkenai.comにあり、githubの方はミラーだそうです。 jrubyさんのアカウント。 活発にコミットがあります。 なぜgitを選んだかについては、 長いこと分散SCMを検討していて、Mercurialかgitにしようと思っていた KenaiはsvnとMercurialしか使えなかったんだけど、最近gitがサポートされた githubにリポジトリ置いた方がRubyistの援助を集めやすいんじゃね? そうこうする間にgitが気に入ってきた まあ結局、Ruby界でgitが人気だからgitにした。もしJythonの開発をやってたらMercurialの方を選んだだろうね とのこと。 ■ [ruby]
The other day at LA RubyConf during the Johnson presentation, I showed a few slides which I don’t think were given the time that they deserve. Not that we didn’t have enough time, I just don’t think I made as big a deal about them as I should have. Those particular slides demonstrated HTML Document Object manipulation executed in JavaScript outside any web browser. Those particular slides, and tha
Google Chrome looks cool, ok… But what is even cooler for me is V8, the super JavaScript VM. JavaScript is a dynamic language, just like Ruby. You can add stuff to objects at runtime, like Ruby. It’s object oriented, like Ruby. It has a GC, like Ruby. … What if we could run Ruby on V8? Well, it’s a lot easier that you think. If you remember a while ago, someone released HotRuby. It runs YARV bytec
■ [mac] MacBookのバッテリーを最高の状態にする方法 要するに、たまにバッテリーを空にしてやるといいらしい。 iBook、PowerBook、MacBook または MacBook Pro のリチウムイオンバッテリー(あるいはリチウムポリマーバッテリー)を調整して最高の状態にする んで、 このとき、PowerBook G4 (15-inch Double-Layer SD)(および MacBook、MacBook Pro)コンピュータに組み込まれた“セーフスリープ機能”により、コンピュータのメモリ内容はハードディスクドライブに保存されます。 と書いてあったので、特にアプリケーションを終了したりせずバッテリが切れるまで待ってたら、ごく普通に再起動した。 なんという罠…間違いなくジョブズは現代の孔明 ■ [vim] F2を押すと現在時刻を入力するvimscriptを書いた こんなの
Sup bros. I need to post in this thing more often. Yesterday, someone tipped over my scooter again. I’m getting kind of tired of that. Anyway, its time for me to write about this. RKelly is pretty much dead. For the past few months, John and I have been working on RKelly’s replacement called Johnson. Basically we’re now putting a ruby wrapper around Mozilla’s Spidermonkey. The project is coming al
Welcome Waxy.org and Slashdot readers. I blog about JavaScript, like it’s my job, feel free to subscribe for a ton more posts like this. Related Posts: Running Java in JavaScript JavaScript Talk at Northeastern University State of ECMAScript 4 The World of ECMAScript JavaScript As A Language Note: I’m not the creator of HotRuby, as mentioned elsewhere – it is the work of a highly-skilled Japanese
JSRuby は Javascript で実装された Ruby インタプリタです。 動作イメージ&サンプルは記事「Javascript で実装した Ruby インタプリタ JSRuby 0.1 リリースしました。」を参照していただくとして、ここでは JSRuby の Javascript 連携まわりを解説します。 JSRuby は Javascript と自然な連携ができるよう、以下の機能を持っています。 JSRuby-Javascript 間での任意の Javascript オブジェクトの受け渡し Ruby で定義されたメソッドの Javascript 側からの呼び出し JSRuby 内での Javascript メソッド実行&関数オブジェクトの呼び出し、インスタンス化 このあたりの機能を整理して使いやすくしたものを JSRuby 0.1.1 としてリリースしました。最新版の取得などは
ついに登場したRuby 1.9。VMを搭載することで、これまでになく高速化されるとのこと。試してみた方も多いのではないだろうか。 そんなRuby 1.9系の魅力をさらに輝かしてくれそうなソフトウェアを紹介しよう。 今回紹介するオープンソース・ソフトウェアはHotRuby、JavaScriptによるRuby実装だ。 HotRubyはRuby1.9にてコンパイルを行い、その結果をJSONで受け取ってJavaScript上のRubyVMで行うという形を取っている。基本的な文法のみで、例外など実装されていない機能もあるが、それでもかなり高速に動作すると言う魅力がある。 ブロックや定数、ハッシュ、スーパーなどサポートされており、かなり楽しむことができる。ソースコードも含めて、楽しめるだろう。 JavaScriptでRuby、というのが素晴らしい。もしこれが実用レベルになったとしたら、ブラウザ上にJa
Regular expressions are great, but they're a bit unwieldy. There's a well-known quote about regular expressions that goes like this: Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. I think of it whenever I try to tackle something using regular expressions, but most of the time, I spend more time wrestling with the regular expr
I’ve been working hard on RKelly lately. RKelly is a ruby implementation of Kelly. Kelly is a fictional project that I made up so that I could name my project RKelly. Anyway, RKelly is a javascript parser, and will be an interpreter someday. Today I was able to get RKelly to parse and produce a parse tree of prototype.js. I couldn’t get GraphViz to export the file, but you can download the dot fil
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く