Skip to content

Instantly share code, notes, and snippets.

module Main exposing (..)
import Exts.Float exposing (roundTo)
import Html exposing (..)
import Html.Attributes exposing (..)
import Svg exposing (Svg)
import Svg.Attributes as SA
import Svg.Path exposing (pathToString, subpath, startAt, lineToMany, emptySubpath, closed, open)
import Mouse exposing (Position)
module Main exposing (..)
import Exts.Float exposing (roundTo)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (on)
import Json.Decode as Decode
import Mouse exposing (Position)
import Keyboard exposing (..)
import Char
module Main exposing (..)
import Exts.Float exposing (roundTo)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (on)
import Json.Decode as Decode
import Mouse exposing (Position)
import Keyboard exposing (..)
import Char

Keybase proof

I hereby claim:

  • I am pbevin on github.
  • I am pbevin (https://keybase.io/pbevin) on keybase.
  • I have a public key ASBJUxKDucu4w1A5W35COnGciCDILCZJcTkLx9n3yd4Dfgo

To claim this, I am signing this object:

@pbevin
pbevin / ga2.html
Created June 16, 2010 18:04
Tracker for pages hosted outside hover.com
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4171338-2");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
@pbevin
pbevin / ga.html
Created June 16, 2010 18:02
Hover tracking code for subdomains of hover.com
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4171338-2");
pageTracker._setDomainName(".hover.com");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
class L
end
class Module
def has_logging()
class_eval {
log = L.new
define_method(:log) do
log
end
diff --git a/kernel/common/float.rb b/kernel/common/float.rb
index bd31205..3b8d40c 100644
--- a/kernel/common/float.rb
+++ b/kernel/common/float.rb
@@ -161,6 +161,10 @@ class Float < Numeric
end
private :to_s_formatted
+ def to_packed(size)
+ Ruby.primitive :float_to_packed
diff --git a/kernel/compiler/bytecode.rb b/kernel/compiler/bytecode.rb
index 13e40fb..4cd22ea 100644
--- a/kernel/compiler/bytecode.rb
+++ b/kernel/compiler/bytecode.rb
@@ -153,13 +153,19 @@ class Compiler
splat = @body.pop
end
- @body.each do |x|
- x.bytecode(g)
diff --git a/kernel/common/compiled_method.rb b/kernel/common/compiled_method.rb
index df80cc9..338c18a 100644
--- a/kernel/common/compiled_method.rb
+++ b/kernel/common/compiled_method.rb
@@ -198,6 +198,8 @@ module Rubinius
class Script
attr_accessor :path
+ def root_script=(value); @root_script = value; end
+ def root_script?; @root_script; end