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
| ~ $ head | |
| noder list | |
| => | |
| An exception occurred running /usr/local/bin/noder | |
| undefined method `<<' on nil:NilClass. (NoMethodError) | |
| Backtrace: | |
| Kernel(NilClass)#<< (method_missing) at kernel/delta/kernel.rb:85 | |
| { } in Noder#list at /usr/local/bin/noder:94 | |
| Array#each at kernel/bootstrap/array.rb:71 |
| function rake { | |
| if [ -e Gemfile ]; then | |
| bundle exec rake $@ | |
| else | |
| `which rake` $@ | |
| fi | |
| } |
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
| module.exports['Mongoose: attendees'] = testCase({ | |
| "Mongoose must have model Atteendee" : function(test){ | |
| test.ok(mongoose.models.hasOwnProperty('attendees')); | |
| test.done(); | |
| }, | |
| "mongoose.attendees must be a function" : function(assert){ | |
| var value = mongoose.models.attendees; | |
| assert.ok(typeof(value), "function" ); | |
| assert.done(); |
| #!/bin/bash | |
| if [ -z "$1" ] ; then | |
| echo "Coloque o nome da app" | |
| else | |
| a="rails new $1 -d mysql" | |
| echo $a | |
| exec $a |
| -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, |
| """""""""""""""""""""""""""""""""""""""" | |
| " 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 |
| import java.util.Arrays; | |
| import java.util.List; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.AdapterView; | |
| import android.widget.AdapterView.OnItemClickListener; | |
| import android.widget.ArrayAdapter; | |
| import android.widget.ListView; |
| function doSomething(callback) { | |
| // faca algo de util | |
| // chama o callback | |
| callback('coisas', 'aqui'); | |
| } | |
| function funcaoComCallback(a, b) { | |
| // callback | |
| alert(a + " " + b); |
| # 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 |