| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 22 Dec 2025 10:15:54 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100214074432
location: https://web.archive.org/web/20100214074432/https://github.com/mojombo/rebar
server-timing: captures_list;dur=0.780266, exclusion.robots;dur=0.055495, exclusion.robots.policy;dur=0.041164, esindex;dur=0.010529, cdx.remote;dur=27.795714, LoadShardBlock;dur=163.983881, PetaboxLoader3.datanode;dur=74.032441, PetaboxLoader3.resolve;dur=36.832472
x-app-server: wwwb-app212-dc8
x-ts: 302
x-tr: 221
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app212; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 22 Dec 2025 10:15:54 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sun, 14 Feb 2010 07:44:33 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "e66554fa0ab4b2040aaeb0887cd587ff"
x-archive-orig-x-runtime: 399ms
x-archive-orig-content-length: 21877
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 14 Feb 2010 07:44:32 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: TLA-20100214062202-00695-00704-ia360920-20100214134402-00000-c/TLA-20100214071117-00799-ia360906.us.archive.org.warc.gz
server-timing: captures_list;dur=0.575665, exclusion.robots;dur=0.018267, exclusion.robots.policy;dur=0.008690, esindex;dur=0.010464, cdx.remote;dur=9.315623, LoadShardBlock;dur=141.974235, PetaboxLoader3.datanode;dur=120.598289, PetaboxLoader3.resolve;dur=152.296404, load_resource;dur=185.456180
x-app-server: wwwb-app212-dc8
x-ts: 200
x-tr: 400
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=20
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
mojombo's rebar at master - GitHub
This service is courtesy of Pledgie.
mojombo / rebar
- Source
- Commits
- Network (2)
- Issues (1)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
-
Branches (1)
- master ✓
- Tags (0)
Sending Request…
Enable Donations
Pledgie Donations
Once activated, we'll place the following badge in your repository's detail box:
rebar /
| name | age | message | |
|---|---|---|---|
| |
README | Fri Aug 01 16:54:52 -0700 2008 | add readme [Tom Preston-Werner] |
| |
client.rb | Fri Aug 01 16:49:09 -0700 2008 | first commit [Tom Preston-Werner] |
| |
funs.erl | Fri Aug 01 16:49:09 -0700 2008 | first commit [Tom Preston-Werner] |
| |
json.erl | Fri Aug 01 16:49:09 -0700 2008 | first commit [Tom Preston-Werner] |
| |
rebar.erl | Fri Aug 01 16:49:09 -0700 2008 | first commit [Tom Preston-Werner] |
README
rebar
by Tom Preston-Werner
With Moore's Law about to crumble from beneath our feet, we all need to start
thinking about how to make use of those 64 core processors we'll be rockin' in
our laptops in a few years. Ruby is an amazing language for many tasks, but
sadly concurrent programming is not one of them. In preparation for the future
I could consider dropping Ruby altogether and find another more appropriate
language. But that would be madness. Ruby is awesome. What if I could still
write the bulk of my projects in Ruby, but farm out the threaded stuff to the
concurrency mercenary that is Erlang? That would be cool, right?
Consider a small Erlang module:
-module(funs).
-export([add/2, cat/2, fac/1]).
add(A, B) ->
A + B.
cat(A, B) ->
A ++ B.
fac(N) ->
fac(1, N).
fac(Memo, 0) ->
Memo;
fac(Memo, N) ->
fac(Memo * N, N - 1).
I'd like to be able to call these Erlang functions from my Ruby code without a
lot of fuss. Hmm, how's this for a low-fuss approach:
require 'rebar'
funs = Rebar::Erlang.new(:funs, '127.0.0.1', 5500)
funs.add(1, 2)
# => 3
funs.cat("foo", "bar")
# => "foobar"
funs.fac(10)
# => 3628800
Wow, that would be nice. Good thing I just spent the last two days writing
some code to make it a reality!
The library is called Rebar (Ruby to Erlang Bridge And Runner). Rebar has two
parts: an Erlang server and a Ruby client. The server listens for JSON-RPC
requests, calls the specified Erlang function, and responds with a JSON-RPC
response. The Ruby client object simply accepts any method name, captures it
with method_missing, wraps everything up in a JSON-RPC request, fires it off,
waits for the response, and then extracts the result out of the JSON-RPC
response, returning it like a normal Ruby call.