Skip to content

Instantly share code, notes, and snippets.

View SebastianEdwards's full-sized avatar

Sebastian Edwards SebastianEdwards

View GitHub Profile
/Users/sebastianedwards/.rvm/gems/ruby-2.2.2@omni/gems/concurrent-ruby-edge-0.1.0.pre2/lib/concurrent/edge/future.rb:602:in `complete'
/Users/sebastianedwards/.rvm/gems/ruby-2.2.2@omni/gems/concurrent-ruby-edge-0.1.0.pre2/lib/concurrent/edge/future.rb:797:in `complete'
/Users/sebastianedwards/.rvm/gems/ruby-2.2.2@omni/gems/concurrent-ruby-edge-0.1.0.pre2/lib/concurrent/edge/future.rb:1097:in `on_completable'
/Users/sebastianedwards/.rvm/gems/ruby-2.2.2@omni/gems/concurrent-ruby-edge-0.1.0.pre2/lib/concurrent/edge/future.rb:882:in `on_done'
/Users/sebastianedwards/.rvm/gems/ruby-2.2.2@omni/gems/concurrent-ruby-edge-0.1.0.pre2/lib/concurrent/edge/future.rb:371:in `pr_callback_notify_blocked'
/Users/sebastianedwards/.rvm/gems/ruby-2.2.2@omni/gems/concurrent-ruby-edge-0.1.0.pre2/lib/concurrent/edge/future.rb:685:in `pr_callback_notify_blocked'
/Users/sebastianedwards/.rvm/gems/ruby-2.2.2@omni/gems/concurrent-ruby-edge-0.1.0.pre2/lib/concurrent/edge/future.rb:657:in `call_callback'
/Users/sebastianedwards/.rvm/gem
/285b0a77-f745-40d8-856c-013b290e9ca5/482b3485-bdc3-4708-a245-f2bdcf9cd9d4: was asked #<Organisation::GetName:0x007fc088a66be8> by #<Concurrent::Actor::Reference:0x7fc08dab03d8 /f81cbab4-1871-4f10-ba90-7bc394956aa9 (Aggro::ConcurrentActor)>
multiple assignment:
/285b0a77-f745-40d8-856c-013b290e9ca5/482b3485-bdc3-4708-a245-f2bdcf9cd9d4: event: #<Concurrent::MultipleAssignmentError: multiple assignment> (public)
/285b0a77-f745-40d8-856c-013b290e9ca5: was told #<Concurrent::MultipleAssignmentError: multiple assignment> by #<Concurrent::Actor::Reference:0x7fc08ba8b5f8 /285b0a77-f745-40d8-856c-013b290e9ca5/482b3485-bdc3-4708-a245-f2bdcf9cd9d4 (Aggro::ConcurrentActor)>
/285b0a77-f745-40d8-856c-013b290e9ca5/482b3485-bdc3-4708-a245-f2bdcf9cd9d4: was told :reset! by #<Concurrent::Actor::Reference:0x7fc0829cfe88 /285b0a77-f745-40d8-856c-013b290e9ca5 (Aggro::ConcurrentActor)>
/285b0a77-f745-40d8-856c-013b290e9ca5/482b3485-bdc3-4708-a245-f2bdcf9cd9d4: event: :resetting (private)
/285b0a77-f745-40d8-856c-013b290e9ca5/482b
@SebastianEdwards
SebastianEdwards / strangeness.rb
Created January 6, 2015 10:14
Strange concurrent-ruby test behaviour
#!/usr/bin/env ruby
require 'test/unit'
require 'concurrent'
Concurrent::Future.execute { 5 * 5 }.value # => Works
class SanityTest < Test::Unit::TestCase
def test_my_sanity
assert_equal(Concurrent::Future.execute { 5 * 5 }.value, 25) # => Doesn't work

Keybase proof

I hereby claim:

  • I am sebastianedwards on github.
  • I am sebastian (https://keybase.io/sebastian) on keybase.
  • I have the public key with fingerprint 0258 C25B 4BA7 E1F4 4DA9  1B85 6689 B7A4 1508 A915

To claim this, I am signing this object:

@SebastianEdwards
SebastianEdwards / errors
Last active December 15, 2015 09:58
Any help appreciated!
string_builder.rs:11:35: 11:40 error: assigning to dereference of mutable & pointer prohibited due to outstanding loan
string_builder.rs:11 PartialContent(ref vec) => { *self = FullContent(str::from_chars(*vec)); },
^~~~~
string_builder.rs:9:10: 9:15 note: loan of dereference of mutable & pointer granted here
string_builder.rs:9 match *self {
^~~~~
string_builder.rs:23:8: 23:13 error: assigning to dereference of mutable & pointer prohibited due to outstanding loan
string_builder.rs:23 *self = PartialContent(*vec);
^~~~~
string_builder.rs:17:10: 17:15 note: loan of dereference of mutable & pointer granted here
Collection = require './collection'
class Entity extends Collection
name: 'Guy'
talk: (msg) ->
return "#{@name} says: #{msg}"
@SebastianEdwards
SebastianEdwards / gist:1148778
Created August 16, 2011 10:11
unique id issue
class System
createResponseSocket: ->
@responseSocket = zmq.createSocket 'rep'
@responseSocket.bind 'ipc:///tmp/system-master', (err) =>
if err
throw err
@responseSocket.on 'message', (data) =>
@handleMessage data, (response) =>
@responseSocket.send(response)
@SebastianEdwards
SebastianEdwards / gist:945263
Created April 27, 2011 21:30
Nicest way to get barista working on heroku
# Gemfile
gem "therubyracer-heroku"
# config/initializers/barista_config.rb
Barista.configure do |c|
c.root = Rails.root.join("app", "coffeescripts")
c.output_root = Rails.root.join("tmp", "javascripts")
end
require 'fileutils'