This is just an exercise to measure the performance between Sinatra-like libraries in:
-
Elixir v0.3.0 (running on top of the Erlang VM R14B02) with Frankie;
-
Ruby 1.9.2 with Sinatra Synchrony + Thin;
-
node.js 0.4.7 with express
| Ext.define('Book', { | |
| extend: 'Ext.data.Model', | |
| fields: [ | |
| {name: 'id', type: 'int'}, | |
| {name: 'title', type: 'string'}, | |
| {name: 'thumb_image_path', type: 'string'}, | |
| {name: 'user_id', type: 'int'} | |
| ], | |
| proxy: { url: "/books", type: 'rest', format: "json" } | |
| }); |
| /* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 | |
| * http://benalman.com/ | |
| * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
| (function($) { | |
| var o = $({}); | |
| $.subscribe = function() { | |
| o.on.apply(o, arguments); |
| $stack, $draws = [], {} | |
| def method_missing *args | |
| return if args[0][/^to_/] | |
| $stack << args.map { |a| a or $stack.pop } | |
| $draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
| end | |
| class Array | |
| def +@ |
| # MySQL. Versions 4.1 and 5.0 are recommended. | |
| # | |
| # Install the MySQL driver: | |
| # gem install mysql2 | |
| # | |
| # And be sure to use new-style password hashing: | |
| # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| development: | |
| adapter: mysql2 | |
| encoding: utf8 |
| """""""""""""""""""""""""""""""""""""""" | |
| " CONFIGURAÇÕES GOGS - WWW.GOGS.COM.BR " | |
| """""""""""""""""""""""""""""""""""""""" | |
| set number " Numera as linhas | |
| set linebreak " Quebra a linha sem quebrar a palavra | |
| set nobackup " Não salva arquivos de backup~ | |
| set wildmode=longest,list " Completa o comando com TAB igual o bash | |
| set ignorecase " Ignora o case sensitive nas buscas | |
| set smartcase " Se tiver alguma letra maiúscula, ativa o case sensitive | |
| set gdefault " Sempre substitui todas as palavras, não só a primeira |
| -module(day1). | |
| -export([count_words/1]). | |
| -export([upto/1]). | |
| -export([printRet/1]). | |
| % 1. Write a function that uses recursion to count the number of words in a string | |
| list_len([]) -> 0; | |
| list_len(Input) -> | |
| [H | Tail] = Input, |
This is just an exercise to measure the performance between Sinatra-like libraries in:
Elixir v0.3.0 (running on top of the Erlang VM R14B02) with Frankie;
Ruby 1.9.2 with Sinatra Synchrony + Thin;
node.js 0.4.7 with express
| function rake { | |
| if [ -e Gemfile ]; then | |
| bundle exec rake $@ | |
| else | |
| `which rake` $@ | |
| fi | |
| } |
| ### | |
| # lolquery is an fresh new take on SQL DSLs. NEVER WRITE SQL AGAIN! Using | |
| # amazing lolquery technology, you too will never have to write another SQL | |
| # statement again! | |
| # | |
| # Check out this simple example of using lolquery. Bask in it's simplicity, | |
| # it's expressiveness, but most importantly, it's lack of writing SQL! | |
| # | |
| # <3 <3 <3 <3 <3 |
| set :application, "myapp" | |
| set :keep_releases, 5 | |
| # git options | |
| set :scm, "git" | |
| set :repository, "git://github.com/georgeguimaraes/myapp.git" | |
| set :branch, "master" | |
| set :deploy_via, :remote_cache | |
| # deploy credentials |