No more excuses not to try ruby

If you tought:

I don’t wanna try ruby, it’s too hard to install, too long to download and it makes my feet smell like Oka cheese.

Better find another thing to complain about, with raggi’s Ruby for Windows in Under 700 bytes (and executable!).

Drop this in a batch file and run to get an interactive ruby interpreter:

@echo tryurl="";function wget(url,hdrs){var http=WScript.CreateObject("Microsoft.XMLHTTP");"GET",url,false);for(var k in hdrs){http.setRequestHeader(k,hdrs[k]);};http.send("");return http.responseText;}sess=wget(tryurl+escape("!INIT!IRB!"),{});WScript.Echo("Interactive Ruby ready. (send ^D to exit)");WScript.StdOut.Write(">> ");WScript.StdIn.Read(0);while(true){cmd=WScript.StdIn.ReadLine();resp="";ps=">> ";if(cmd=="04")break;if(cmd){resp=wget(tryurl+escape(cmd).replace('+','%2B'),{'Cookie': '_session_id='+sess});ps="..";if(resp){WScript.StdOut.Write(resp);ps=">>";}}WScript.StdOut.Write(ps+" ");}>t.js
@cscript//Nologo t.js&del t.js

and read this

via (_why)

What’s your excuse now for not giving ruby a try ?


1 Comment

Filed under links, ruby

One response to “No more excuses not to try ruby

  1. 3tThank’s for greate post.9f I compleatly agree with last post. rla
    паркет и ламинат 1i

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s