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
(ns test.cometd-client | |
(:import (org.cometd.bayeux.client ClientSessionChannel$MessageListener) | |
(org.cometd.client BayeuxClient BayeuxClient$State) | |
(org.cometd.client.transport ClientTransport LongPollingTransport) | |
(org.eclipse.jetty.client HttpClient))) | |
(def channel-name "/my-channel") | |
(def client-url "http://localhost:8080/cometd") |
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
class Card | |
attr_reader :value, :suit | |
def self.parse(str) | |
if str =~ /^([2-9AJQK])([CDHS])$/ | |
self.new($1, $2) | |
end | |
end | |
def initialize(value, suit) |
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
ronaldo@minerva:~/Projects/rubinius$ [master] ./configure | |
Configuring LLVM... | |
Checking for existing LLVM tree: found! | |
Checking sizeof(long): 8 bytes | |
Checking platform endianness: little endian | |
Checking tr1/hash definition: found | |
Checking for function 'backtrace': found! | |
Checking for function 'readline': found! | |
Checking curses library: curses |
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
; ModuleID = 'test' | |
@jumper = internal global [256 x i8] zeroinitializer | |
declare i32 @setjmp(i8*) | |
declare void @longjmp(i8*, i32) noreturn nounwind | |
define i64 @b() { | |
entry: |
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
account (balance) = { balance: balance } | |
account#deposit (account amount) = { balance: account.balance + amount } | |
account#withdraw (account amount) = | |
? account.balance < amount -> error#signal "Insufficient funds!" | |
? _ -> { balance: account.balance - amount } | |
main () = | |
do |