This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'set' | |
| module Fiasco | |
| class Table < BasicObject | |
| def inspect | |
| "<Table>" | |
| end | |
| def method_missing(method, *args) | |
| attr = method.to_s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %self total self wait child calls name | |
| 38.46 1.06 1.00 0.00 0.06 80000 Module#define_method | |
| 12.69 1.76 0.33 0.00 1.43 40000 OpenStruct#new_ostruct_member | |
| 11.92 2.39 0.31 0.00 2.08 40000 OpenStruct#method_missing | |
| 6.54 1.26 0.17 0.00 1.09 40000 Module#class_eval | |
| 6.54 2.60 0.17 0.00 2.43 1 Integer#times | |
| 5.38 0.14 0.14 0.00 0.00 40000 Hash#[]= | |
| 3.46 0.09 0.09 0.00 0.00 40000 OpenStruct#modifiable | |
| 2.69 0.07 0.07 0.00 0.00 40000 String#to_sym | |
| 2.31 0.06 0.06 0.00 0.00 40000 Symbol#id2name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| |---------| | |
| | | | |
| | | | |
| --row---- |---------| | |
| en vez de | |
| --row---- |---------| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'formula' | |
| class Gauche <Formula | |
| url 'http://jaist.dl.sourceforge.net/project/gauche/Gauche/Gauche-0.9.tgz' | |
| homepage 'http://practical-scheme.net/gauche/' | |
| md5 '' | |
| def install | |
| system "./configure", "--enable-multibyte=utf-8", "--prefix=#{prefix}" | |
| system "make" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; def m(n, l) | |
| ;; t = 0 | |
| ;; u = n | |
| ;; while u < l | |
| ;; t = t + u | |
| ;; u = u + n | |
| ;; end | |
| ;; | |
| ;; t | |
| ;; end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* http://ocaml.janestreet.com/?q=node/75 *) | |
| (* 1ra *) | |
| type connection_state = | |
| | Connecting | |
| | Connected | |
| | Disconnected | |
| type connection_info = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define *redis* (make-parameter #f)) | |
| ;; Returns a new connection to the server | |
| (define redis-open open-net-io) | |
| ;; Calls the procedure passing a connection to the server. | |
| ;; The connection is closed after proc returns. | |
| (define (with-redis-connection host port proc) | |
| (with-net-io host port | |
| (lambda (in out) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # when handling a request on rack, thread_locals[:request] is set | |
| module FrameworkStuff | |
| def request | |
| thread_locals[:request] | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define-module (chibi redis) | |
| (export redis-open with-redis-connection redis-command *redis* | |
| redis-info redis-get redis-set) | |
| (import-immutable (scheme) (chibi net) (chibi io) (srfi 39)) | |
| (include "redis.scm")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "./late" | |
| require "erb" | |
| require "bench" | |
| def purecode(context = {}) | |
| myfield = context[:myfield] | |
| out = "The sum is " | |
| out.concat (2+2).to_s | |
| out.concat " Also substitute " | |
| out.concat (myfield).to_s |