I have never, I'm pretty sure, read any official write-up of what a kobold is. Everything I know about kobolds is apocryphal and from various conflicting sources. That is, as far as I'm concerned, as it should be. I don't put much stock in official sources, anyway, because they mostly talk about how kobolds are inherently evil, which is garbage.
Last login: Thu Feb 25 00:02:32 on ttys004 | |
UALC02NJ0RCG3QR:~ bhamill$ bash --version | |
GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin14.5.0) | |
Copyright (C) 2013 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software; you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
UALC02NJ0RCG3QR:~ bhamill$ cat ~/.bashrc | |
export HI=hi |
#!/usr/bin/env elixir | |
defmodule Listen do | |
use GenServer | |
## Client | |
def start_link(command, opts \\ []) do | |
GenServer.start_link(__MODULE__, command, opts) | |
end |
I'm trying to understand how Elixir's Port
works. I'd like to interact with another command that's run and communicate over
:stdio
and detect when the other proccess ends in order to gracefully handle it. In my actual application, I'll send input to
the other process, get the result and check it. If it's good, I'll repeat. However, if the other process exits after sending any
result, my program should take some actions and then exit its self. This is meant to be normal behavior, not an error.
However, when I run the below toy script, I'm getting errors trying to deal with the other process exiting. The 3 other processes I wrote are meant to read one line, echo it back, then exit, while the toy script has 3 items to deal with (it should just do the first, then report exit and end).
Here's how it's running on my system:
1) test monitors existing entries (KV.RegistryTest) | |
test/kv/registry_test.exs:65 | |
No message matching {:exit, "shopping", ^bucket} after 100ms. Process mailbox: | |
{:create, "shopping", #PID<0.151.0>} | |
stacktrace: | |
test/kv/registry_test.exs:78 |
require 'webmock' | |
require 'sinatra/base' | |
require 'multi_json' | |
require 'pry' | |
require 'faraday' | |
WebMock.disable_net_connect! | |
class HalSinatra < Sinatra::Base | |
configure do |
gem 'activesupport', '4.0.0' | |
require 'minitest/autorun' | |
require 'active_support/inflector' | |
class BugTest < MiniTest::Unit::TestCase | |
def test_underscore_knows_about_acronyms_in_directories | |
ActiveSupport::Inflector.inflections(:en) do |inflect| | |
inflect.acronym 'OAuth' | |
end |
gem 'activerecord', '4.0.0' | |
require 'active_record' | |
require 'sqlite3' | |
require 'logger' | |
require 'minitest/autorun' | |
# This connection will do for database-independent bug reports. | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |
def example_method | |
[1,2].map do |i| | |
puts i | |
puts 'whoa' | |
end | |
end |
def new(first_name: 'Ben', | |
last_name: 'Hamill', | |
birthday: '1982/02/13', | |
title: 'Software Engineer') | |
@name = "#{first_name} #{last_name}" | |
@birthday = Date.parse(birthday) | |
@title = title | |
end | |
def new( |