As you know, I am a big believer in knowing the basics. I find it is especially valuable to go back to the fundamentals of whatever skill youâre trying to master periodically, as you gain more experience. Somehow youâre always able to extract something valuable from the experience due to the extra insight youâve acquired along the way. Recently Iâve been looking more closely at some Ruby concepts
Rubyï¼Ruby Advent Calendar jp: 2011 : ATNDã®7æ¥ç®ã®è¨äºã§ããæ¨æ¥ã¯@sakuroããã®/var/log/messagesã§ãããææ¥ã¯@sato_ryuããã®ã¿ã¼ã³ã§ããï¼ ã¿ãªãããæç¨ãªTIPSãè¨äºã«æ¸ãããæ¸ããªãã£ããããä¸ãç§ã¯Chipã¨ããToolãç´¹ä»ãã¾ãã Chipã¯ç§ãä»æ¥(!!)ãªãªã¼ã¹ãããã¼ã«ã§ãWebãã¼ã¸ä¸ã®ãã¤ã¯ãã³ã¼ãã管çãããã®ã§ãã authorNari/chip - GitHub ã¤ã³ã¹ãã¼ã«æ¹æ³: $ gem install chip ä½ã«ä½¿ããï¼Webä¸ã«æ¸ãæ¨ã¦ã¦ããã³ã¼ãã¯çµæ§ããã¨æãã¾ããããã°ã®è¨äºä¸ã¨ããgistã¨ãã ããããã®ãã³ãã³ãã©ã¤ã³ã§ç®¡çã§ããã楽ããã ããã¨æããä½ãã¾ããã ã¡ãã£ã¨ã ãå ·ä½ä¾ãæ¸ãã¦ã¿ã¾ãããã ãããã ãã®ã¢ã³ãã¼ãããè²¼ã£ã¦ããã¾ãããä¾ãã° A m
8tracksãã¬ã¤ã¤ã¼ï¼ã ãã¶åã«ä½ã£ãããï¼ãã ã®ã¹ã¯ãªããã§ä¸ä¾¿ã ã£ãã®ãï¼gemã«ããï¼ãã°ãããã¤ãç´ããï¼ å®è¡ããã¨ããããæãï¼mplayerã§åçãããï¼ % cui8tracks --tag jazz _ ___ _ _ (_)/ _ \| | | | ___ _ _ _| (_) | |_ _ __ __ _ ___| | _____ / __| | | | |> _ <| __| '__/ _` |/ __| |/ / __| | (__| |_| | | (_) | |_| | | (_| | (__| <\__ \ \___|\__,_|_|\___/ \__|_| \__,_|\___|_|\_\___/ > I, [2011-10-17T18:17:34.525323 #11983] INFO -- : Playing mix 1 / 9046 I, [20
_dev_audio.rb on|�U @ΰ{�U require 'coreaudio' dev = CoreAudio.default_output_device buf = dev.output_loop(44000) line = ARGV[0] puts line 44000.times do |t| # buf[i] = 0x3FFF * rand() # buf[i] = t * ((t >> 9 | t >> 13) & 25 & t >> 6) buf[t] = eval line end buf.start sleep 10 buf.stop __END__ SYNOPSIS: % ruby _dev_audio.rb 't * ((t >> 9 | t >> 13) & 25 & t >> 6)' SEE ALSO: http://d.hatena.ne.jp/miu
Eval Expression is a Mac OS X service to evaluate the selected text of any text field as a Ruby expression.  My instinct was to choose Perl, however Ruby offers binary in addition to decimal, hex and octal numerical literals.  The service becomes infinitely more useful if you assign it a global shortcut in Keyboard preferences.  In my case I assigned a combination that seemed obvious, â= It came a
ããã°ãä¸è¨ã«ç§»è»¢ãã¾ããããã¶ã¤ã³å¤æ´ã«ãã移転å ã§ã¯è¨äºãä¸å±¤èªã¿ããããªã£ã¦ãã¾ãã®ã§ããããããã°ç§»åããé¡ãè´ãã¾ãã irbããå¦ã¶Rubyã®ä¸¦åå¦ç ~ forkããWebSocketã¾ã§ : melborne.github.com - ä¸ã®ä¸ã¯ä¸¦ååè±ãããã ã 人éã¯ã·ã³ã°ã«ã¿ã¹ã¯ã®ã¾ã¾ãªã®ã« ããã°ã©ãã³ã°ããã¨ã㯠ãã«ãã¿ã¹ã¯ãè¦æ±ããããªã㦠ä¸ç¥è¾ãä¸ã®ä¸ã«ãªã£ããã®ã ã ã§ãæ å ±é©å½ã¯å§ã¾ã£ãã°ããã ãã æç´ã£ã¦ã°ãããããããªãã èªåããã®æ³¢ã«ãã¾ãä¹ããªãã¨ãã¦ã ãã¾ãä¹ã£ã¦ã人ã®æ§ã éè¿ã§è¦ã¦ã¿ããã¨æããã ãããªããã§.. Rubyã®fork Thread Reactor EventMachine WebSocketãªã©ã®ä¸¦ååã«ã¤ãã¦å°ãå¦ãã ã®ã§ èªåã®ç解ãããã«ã¾ã¨ãã¦ããã REPL irbã¯Rubyã«ããã対話åã®å®è¡ç°å¢ã ã ã
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
kramdown is a fast, pure-Ruby converter for Markdown-like markup.Welcome to the kramdown site kramdown is a free GPL-licensed Ruby library for parsing Markdown-like syntax. It is completely written in Ruby, supports standard Markdown (with some minor modifications) and various extensions that have been made popular by the PHP Markdown Extra package and Maruku. It is probably the fastest pure-Ruby
LL Planets "Node.jsã¨ã¯ä½ã ã£ãã®ã"ã»ãã·ã§ã³åããã¸ã
Asset PipelineãåããRails 3.1ã®ãªãªã¼ã¹ã«åãã¦ããã®æ ¹å¹¹ãæ ãSprocketsãã¡ãã£ã¨è§¦ã£ã¦ãããã¨ã«ããã JavaScript dependency management and concatenation: Sprockets Sprocketsã¯Rubyã§æ¸ãããJavaScriptããªããã»ããµã§ãè¤æ°ã®JavaScriptã½ã¼ã¹ãã¡ã¤ã«ã1ã¤ã«ã¾ã¨ããã®ã主ãªæ©è½ãããã«ãã£ã¦ä»¥ä¸ã®ãããªã¡ãªãããããã è¤æ°ã®ãµã¤ããã¢ããªã±ã¼ã·ã§ã³ã§å ±éããã³ã¼ããåå©ç¨å¯è½ãªå½¢ã§åãåºããæ§æã«ã§ãã JavaScriptãã©ã°ã¤ã³ã¨ããåä½ã§CSSãç»åãã¾ã¨ãããã¨ãã§ãã JavaScriptãã¡ã¤ã«ã1ã¤ã«ã¾ã¨ãã¦ãã©ã¦ã¶ã«èªã¾ãããã¨ã«ããé«éå HTTPãªã¯ã¨ã¹ãã®åæ°ãæ¸ãããã¨ãã§ãã JavaScriptãã³ã¡ã³ãä»ãã®è¤æ°ã®ãã¡ã¤ã«ããã³
Ruby is a highly dynamic language with impressive capabilities for runtime redefinition of classes, objects, methods, and variables. Haskell, on the other hand, is a purely functional language that confines mutation within a sophisticated static type system. Given their many differences one or the other may be more suited for whatever problem you might be working on (see polyglot programming), but
Hubrisã¨ãããRubyããHaskellã®ã³ã¼ããå¼ã¶ããã®ããªãã¸ãããã¾ããHaskellããã±ã¼ã¸ã¨Rubyã©ã¤ãã©ãªã§æ§æããã¦ãããç¾å¨ã®ãã¼ã¸ã§ã³ã¯0.0.3ã§ãã ã¨ããçç±ããããã®Hubrisã§éãã§ã¿ããã¨æã£ãã®ã§ãããHaskellããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ã«ããªãæããã£ãããããã¤ã³ããã¾ã¨ãã¦ããã¾ããã¡ãªã¿ã«Rubyã©ã¤ãã©ãªã®ã»ãã¯ãgem install hubrisãã§ç°¡åã«å ¥ãã¾ããã ä»åã¾ã¨ããå 容ã¯ãããã¾ã§åã®ç°å¢ï¼CentOS 5ï¼ã§ãã¾ããã£ããã®ã§ãä»ã®ç°å¢ã§ã¯ã©ãã ãåããã¾ããã誤ã£ãè¨è¿°ãããããããã¾ããã®ã§ããæ°ã¥ãã®éã¯ãã²ãç¥ãããã ããã Hubrisã§éã³ãããªã£ãçç±ã«ã¤ãã¦ã¯ãå¾æ¥æ¸ãã¤ããã§ãã ãã£ããããæµã $ wget http://hackage.haskell.org/packages/archi
RESTful API ã®ä½æã«ç¹åãããã¤ã¯ããã¬ã¼ã ã¯ã¼ã¯ grape ã®åå¨ãç¥ã£ãã®ã§èª¿æ»ãã¦ã¿ãäºã«ãã¾ãããAPI ã®å®è£ ã« Rails ã® ActionController ã¯éåããããSinatra ã¯è»½ããã©æéãããããããã¨ããä¸ã§ä½ããããã®ãã¬ã¼ã ã¯ã¼ã¯ãã¯ããã¦ãã®å®åã¯â¦ grape ã®ç¹å¾´# grape ã®ç¹å¾´ã¯æ¦ã以ä¸ã®éãã§ããgrape èªä½ã Rack ã¢ããªã±ã¼ã·ã§ã³ãªã®ã§ Rails3 ã«çµã¿è¾¼ããã¨ãåºæ¥ã¾ããã¨ããããã¯çµã¿è¾¼ãã§ä½¿ãã®ãåæã®ããã§ãï¼å¿è«åä½ã§ãåãã¾ãï¼ã Rack ã¢ããªã±ã¼ã·ã§ã³ Sinatra ã©ã¤ã¯ãª DSL èªå㧠JSON ã«ã·ãªã¢ã©ã¤ãºï¼#serializable_hash ã¾ã㯠#to_json ãåå¨ããã°OKã¿ããï¼ grape ã使ã£ã¦ã¿ã# ç¹å¾´ãæ´ãã ã¨ããã§ãå®éã«ã¤ã³ã¹ãã¼ã«ãã¦ä½¿ã£ã¦
After playing with iremoted and Rubyâs IO.popen I guess I am convinced that Ruby really works as a glue on many levels. So, using iremoted and capture Apple remote commands in the terminal it is trivial to use the remote to control a Ruby application. Of course, calling OS commands isnât limited to Ruby. Here is a minimal dungeon game which you control with the apple remote. If you ever manage to
guardã¯ãã¡ã¤ã«ã®å¤æ´ãæ¤ç¥ãã¦ã決ããããã¿ã¹ã¯ãå®è¡ããããã®ãã¼ã«ã§ããã Mac OS X / Linux / Windows ããããã®ãã¡ã¤ã«ã·ã¹ãã å¤æ´æ¤ç¥APIã«å¯¾å¿ãã¦ããããã以å¤ã®ãã©ãããã©ã¼ã ã§ã¯ãã¼ãªã³ã°ã«ã¦å¤æ´æ¤ç¥ãè¡ãã $ gem install rb-fsevent # Mac OS X ã®å ´å $ gem install guard $ gem install guard-coffeescript $ guard init coffeescript $ vi Guardfile guard 'coffeescript', :input => 'src/', :output => 'dist/' $ guard start ãããããã¨ã§ãsrc/ 以ä¸ã®.coffeeãã¡ã¤ã«ã«å¤æ´ããã£ãå ´åå³åº§ã«ã³ã³ãã¤ã«ãããdist/以ä¸ã«.jsãã¡ã¤ã«ãç
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}