Skip to content

Instantly share code, notes, and snippets.

View stesla's full-sized avatar

Samantha Tesla stesla

  • DRW
  • Chicago, Illinois, USA
View GitHub Profile
import Data.List (intersperse)
data Op = Add | Sub | Mul | Div
deriving (Eq)
instance Show Op where
show Add = "+"
show Sub = "-"
show Mul = "*"
show Div = "/"
module Money (
Money
, cents
, dollars
, amount
, fromCents
, fromDollars
, ($+$), ($+), (+$)
, ($-$), ($-), (-$)
, ($/$)
package main
import(
"fmt";
"math";
)
type Point interface {
DistanceFromPoint(point Point) float64;
DistanceFromCartesian(x, y float64) float64;
package main
import "./specify"
var spec MySpec;
type mySpec struct {
specify.Specification;
}
diff --git a/Rakefile b/Rakefile
index 3ab2592..96c8c83 100644
--- a/Rakefile
+++ b/Rakefile
@@ -49,7 +49,7 @@ Rake::GemPackageTask.new(gemspec) do |pkg|
end
namespace :test do
- Rake::TestTask.new :all => [:extension] do |t|
+ Rake::TestTask.new :all => [:test_extension] do |t|
blocking_resolver_lookup_service: _xmpp-client._tcp.localhost
Error while parsing srv response in blocking_resolver_lookup_service
./vertebra-rb/bin/../lib/vertebra/agent.rb: line 220
(null)-CRITICAL **:lm_resolver_new_for_host: assertion `host != NULL' failed
./vertebra-rb/bin/../lib/vertebra/agent.rb:220: [BUG] Bus Error
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.4.0]
Abort trap
blocking_resolver_lookup_service: _xmpp-client._tcp.localhost
Error while parsing srv response in blocking_resolver_lookup_service
./vertebra-rb/bin/../lib/vertebra/agent.rb: line 220
(null)-CRITICAL **:lm_resolver_new_for_host: assertion `host != NULL' failed
./vertebra-rb/bin/../lib/vertebra/agent.rb:220: [BUG] Bus Error
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.4.0]
Abort trap
-module(clusterl_dedup).
-export([init/0, first/1]).
-define(TABLE, ?MODULE).
-define(DELETION_TIMEOUT, 3600000). % 1 hour
init() ->
ets:new(?TABLE, [public, named_table]).
-module(clusterl_dedup).
-export([init/0, first/1]).
-define(TABLE, ?MODULE).
-define(DELETION_TIMEOUT, 3600000). % 1 hour
init() ->
ets:new(?TABLE, [public, named_table]).
-define(ANNOUNCE(Id, Port), {announce, Id, Port}).
handle_info({radio_signal, Ip, Port, ?ANNOUNCE(Id, Port)}, State) ->
#state{id=MyId} = State,
case Id of
MyId -> ignore;
_ ->
error_logger:info_msg("Received PING from ~p~n", [Id]),
clusterl_radio:transmit(Ip, Port, ?ANNOUNCE(Id, Port))
end,