Programming
Original: rack newb problem w/ 0.9.0When tried to run a sinatra based application, I received an error message: ./sinatra/lib/sinatra.rb:1156:in `mime': uninitialized constant Rack::File::MIME_TYPES (NameError)According to Ryan Tomayko "..…
Trying to install the development version of merb , i've got: no such file to load -- extlib/tasks/releaseSeems the extlib gem is too old for merb. Fix: $ git clone git://github.com/sam/extlib.git $ cd extlib $ rake gem $ sudo gem install …
Created tinyurl ramaze application - everything in one file - model, view, controller. Required gems: sqlite3-ruby, sequel, validatable, ramaze.Even have an API: $ curl -O turl.rb http://zhware.net/code/ruby/ramaze/turl.rb.txt $ ruby turl.…
merb-book on github and Online Merb Book ramaze-book on github The Django Book
In the spirit of “Fork me if you like me" I forked the Rack project on github and applied my ‘X-Sendfile’ related changes. Now you can have download acceleration with: use Rack::Static, :urls => ["/files"], :root => "public", :extra => { '…
After I found the Rails X-Sendfile plugin, decided to code something similar for Rack (and Ramaze). The result: Rack::XStatic middleware. Example usage: xfile.ru rackup file. Start it with: rackup -s thin -p 7000 xfile.ruFor using it with …
After reading Rails Plugin: Throttler I created a Throttler Ramaze Helper . What is it for? ”...The throttling plugin monitors the load of your server and allows you to disable certain features of your app when the load is too high...” How…
Got my own Joyent Facebook Developer Accelerator . Will try to put some Merb application on it. To read: Merb and Data Mapper Merb & Datamapper: Getting Rolling Tutorial on developing a Facebook platform application with Ruby On Rails Usin…
Got my Joyent Facebook Developer Accelerator. Will try to put some Merb application on it. To read: Merb and Data Mapper Merb & Datamapper: Getting Rolling Tutorial on developing a Facebook platform application with Ruby On Rails Using Rub…
Tried the new Rails version. After $ rails rls20PR && cd rls20PR $ rake rails:freeze:edge TAG=rel_2-0-0_PR $ rake rails:updatefor every rake task i've got: rake aborted! no such file to load -- active_resourceThe problem: edge_rails requir…
FeedbackNone.UpdatesSince my previous post I found a little bug in the CEAN installation. Or maybe it's just not very well documented thing: After the installation the path to the control socket is pointing by default to /usr/local/var: =E…
Common CrapAfter the first article there was more then 1500 hits. And interesting, maybe about 80% of them coming from RubyCorner ! Feedback: near to zero – just several comments on the blog and on reddit . Nothing to improve? Nothing to a…
After the last Osaka Erlang meeting, decided to start a column of articles for Erlang everyday use. Recently there is a big interest in Erlang, but the beginning is always difficult. Some push during the first steps usually helps. OK, on t…
Second approximation of the conversion between old roman and integer digits. Added some error checks and released the roma2int() functionality %% convert between integer and old roman %% usage: %% convert:int2roma(555) -> "DLV" %% convert:…
03-Jun-2007, Toyonaka, HotarugaikeOsaka Erlang Meeting #11. RTFMMost of the time was just reading the japanese translation of the “Programming Erlang” book. 53 pages full of japanese ;) Pretty difficult task. All people divided in 2 groups…
Like I mentioned in one of my Jaiku posts it will be good to have a page with answers for the Erlang Course Exercises . Still nobody around with such a page, so I started to put my answers in the Mercurial repository . Some of the exercise…
{active, Boolean} ...If the active option is true, which is the default, everything received from the socket will be sent as messages to the receiving process. If the active option is set to false (passive mode), the process must explicitl…
Like a part of my Erlang study, I decided to code a pure-man queues management service, similar to Amazon SQS – Even Simpler Queue Service (or Erlang SQS you decide ;) ). For now it’s just one file qserver.erl , but i hope to make it bette…
...No longer will we have to use RESTful URLs such as article/1;edit. We're going back to the more normal-looking article/1/edit ...
Luke Gorrie’s comment to ‘Erlang: parallel-map and parallel-foreach’ articleParallel map brainfsck implementation in Erlang: %% Map function F over list L in parallel. parmap(F, L) -> Parent = self(), [ receive {Pid, Result} -> Result end …
Something always to start with: -module(ctemplate). -compile(export_all). start() -> spawn(fun() -> loop([]) end). rpc(Pid, Query) -> Pid ! {self(), Query}, receive {Pid, Reply} -> Reply end. loop(X) -> receive Any -> io:format("Received:~…
Lean how to write truly concurrent programs―programs that run on dozens or even hundreds of local and remote processors. See how to write high reliability applications―even in the face of network and hardware failure―using the Erlang progr…
Pretty useful piece of code: is_pid_alive(Pid) when is_pid(Pid) -> rpc:call(node(Pid), erlang, is_process_alive, [Pid]).Checking if some process is alive. But working only with Erlang processes. I cannot check the status of some general TC…
Created the reverl project on Google Code. Reverl is reverse proxy, load balancer and HTTPS front-end for Web server(s), implemented in Erlang. Before to start the real coding, I needed a more general proxy(gateway) behaviour. What exactly…
Seems Cookie Based Sessions are the New Default in Edge Rails: ...Cookie-based sessions are just faster to retrieve and process than hitting the file-system on every request. Plus, I would imagine they scale considerably better as they’re …
Cast (send msg) A ! B Event (get msg) receive A -> A end Call (RPC) A ! {self(), B}, receive {A, Reply} -> Reply end Callback receive {From, A} -> From ! F(A) endSome trickery follows ;).Here something cool - Parallel RPC: par_rpc([A, B, C…
Origin: Making Reliable Distributed Systems in the Presence of Software Errors Everything is a process. Processes are strongly isolated. Process creation and destruction is a lightweight operation. Message passing is the only way for proce…
I have an OpenVPN -based VPN. A put some notes on connecting Erlang nodes, running on the VPN machines on my wiki. Erlang is for geeks ;)
Yaws-1.66 have a problems, compiling ot Ubuntu edgy. The problem and the solution. --- yaws-1.66.orig/configure.in 2006-06-07 22:07:31.000000000 +0200 +++ yaws-1.66/configure.in 2007-01-19 15:48:19.000000000 +0100 @@ -171,7 +171,7 @@ case …
Just a small shell wrapper to execute Erlang programs without starting the interactive shell. Saving time when working with sample code from the tutorials ;) #!/bin/bash # # Purpose: execute erlang program from the command line # side effe…