<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Chewing the Cud (Posts about Research)</title><link>https://jamesaimonetti.com/</link><description></description><atom:link href="https://jamesaimonetti.com/categories/research.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Wed, 26 Mar 2025 20:45:28 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Using ibrowse to POST form data</title><link>https://jamesaimonetti.com/posts/2012/04/26/using-ibrowse-to-post-form-data/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
It is not immediately obvious how to use
&lt;a href="https://github.com/cmullaparthi/ibrowse"&gt;ibrowse&lt;/a&gt; to send an HTTP
POST request with form data (perhaps to simulate a web form post). Turns
out its pretty simple:
&lt;/p&gt;

&lt;pre class="example" id="org334f119"&gt;
ibrowse:send_req(URI, [{"Content-Type", "application/x-www-form-urlencoded"}], post, FormData)
&lt;/pre&gt;

&lt;p&gt;
Where URI is where you want to send the request
("&lt;a href="http://some.server.com/path/to/somewhere.php"&gt;http://some.server.com/path/to/somewhere.php&lt;/a&gt;") and FormData is an
iolist() of URL-encoded values ("foo=bar&amp;amp;fizz=buzz"). There's obviously
a lot more that can be done, but for a quick snippet, this is pretty
sweet.
&lt;/p&gt;</description><category>Research</category><category>Work</category><guid>https://jamesaimonetti.com/posts/2012/04/26/using-ibrowse-to-post-form-data/</guid><pubDate>Thu, 26 Apr 2012 15:22:31 GMT</pubDate></item><item><title>Emulating Webmachine's {halt, StatusCode} in Cowboy</title><link>https://jamesaimonetti.com/posts/2012/03/15/emulating-webmachines-halt-statuscode-in-cowboy/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
At &lt;a href="http://2600hz.org"&gt;2600Hz&lt;/a&gt;, we recently converted our REST
webserver from
&lt;a href="https://github.com/mochi/mochiweb"&gt;Mochiweb&lt;/a&gt;/&lt;a href="https://github.com/basho/webmachine"&gt;Webmachine&lt;/a&gt;
to &lt;a href="https://github.com/extend/cowboy"&gt;Cowboy&lt;/a&gt;, with
&lt;a href="https://github.com/extend/cowboy/blob/master/src/cowboy_http_rest.erl"&gt;cowboy\&lt;sub&gt;http&lt;/sub&gt;\&lt;sub&gt;rest&lt;/sub&gt;&lt;/a&gt;
giving us a comparable API to process our REST requests with. One
feature that was missing, however, was an equivalent to Webmachine's
&lt;a href="http://wiki.basho.com/Webmachine-Resource.html#Halting-Resources"&gt;{halt,
StatusCode}&lt;/a&gt; return. While there has been
&lt;a href="https://github.com/extend/cowboy/pull/144"&gt;chatter&lt;/a&gt; about adding this
to cowboy\&lt;sub&gt;http&lt;/sub&gt;\&lt;sub&gt;rest&lt;/sub&gt;, we've got a function that emulates the behaviour
pretty well (this is cleaned up a bit from our actual function, removing
project-specific details).
&lt;/p&gt;

&lt;pre class="example" id="org567cd62"&gt;
-spec halt/4 :: (#http_req{}, integer(), iolist(), #state{}) -&amp;gt; {'halt', #http_req{}, #state{}}.
halt(Req0, StatusCode, RespContent, State) -&amp;gt;
    {ok, Req1} = cowboy_http_req:set_resp_body(Content, Req0),
    {ok, Req2} = cowboy_http_req:reply(StatusCode, Req1),
    {halt, Req2, State}.
&lt;/pre&gt;

&lt;p&gt;
Obviously you can omit setting the response body if you don't plan to
return one.
&lt;/p&gt;</description><category>Geekdom</category><category>Research</category><category>Work</category><guid>https://jamesaimonetti.com/posts/2012/03/15/emulating-webmachines-halt-statuscode-in-cowboy/</guid><pubDate>Thu, 15 Mar 2012 12:26:05 GMT</pubDate></item><item><title>CouchDB/BigCouch Bulk Insert/Update</title><link>https://jamesaimonetti.com/posts/2012/01/27/couchdbbigcouch-bulk-insertupdate/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
While writing a bulk importer for Crossbar, I took a look at squeezing
some performance out of BigCouch for the actual inserting of documents
into the database. My first time running all the documents into BigCouch
at the same time resulted in some poor performance, so I went digging
around for some ideas on how to improve the insertions. Reading up on
the &lt;a href="http://guide.couchdb.org/draft/performance.html"&gt;High Performance
Guide&lt;/a&gt; for CouchDB (which BigCouch is API-compliant with), I started to
play with chunking my inserts up to get better overall execution time.
&lt;b&gt;Note&lt;/b&gt;: the following are very unscientific results, but I think are
fairly instructive for what one might expect.
&lt;/p&gt;

&lt;table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"&gt;


&lt;colgroup&gt;
&lt;col class="org-right"&gt;

&lt;col class="org-right"&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th scope="col" class="org-right"&gt;Docs Per Insertion&lt;/th&gt;
&lt;th scope="col" class="org-right"&gt;Elapsed Time (ms)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="org-right"&gt;26618&lt;/td&gt;
&lt;td class="org-right"&gt;107176&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td class="org-right"&gt;1000&lt;/td&gt;
&lt;td class="org-right"&gt;8325&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td class="org-right"&gt;1500&lt;/td&gt;
&lt;td class="org-right"&gt;5679&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td class="org-right"&gt;2000&lt;/td&gt;
&lt;td class="org-right"&gt;3087&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td class="org-right"&gt;2500&lt;/td&gt;
&lt;td class="org-right"&gt;1644&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td class="org-right"&gt;Docs Per Insertion&lt;/td&gt;
&lt;td class="org-right"&gt;Elapsed Time (ms)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;
Based on the CouchDB guide, I decided to not pursue this further, as
dropping insertion time 2 orders of magnitude was fine enough for me! I
may have to bake this into the platform natively. For those interested
in the Erlang code, it is pretty simple. Taking a list of documents to
save, use lists:split/2 to try and split the list. By catching the
error, we can know that the list is less than our threshold, and can
save the remaining list to BigCouch. Otherwise, lists:split/2 chunks our
list into one for saving, and one for recursing back into the function.
Since we don't really care about the results of couch\&lt;sub&gt;mgr&lt;/sub&gt;:save\&lt;sub&gt;docs&lt;/sub&gt;/2,
we could put the calls in the second clause of the case in a spawn to
speed this up (relative to the calling process).
&lt;/p&gt;

&lt;pre class="example" id="orgf019908"&gt;
-spec save_bulk_rates/1 :: (wh_json:json_objects()) -&amp;gt; no_return().
save_bulk_rates(Rates) -&amp;gt;
    case catch(lists:split(?MAX_BULK_INSERT, Rates)) of
        {'EXIT', _} -&amp;gt;
            couch_mgr:save_docs(?WH_RATES_DB, Rates);
        {Save, Cont} -&amp;gt;
            couch_mgr:save_docs(?WH_RATES_DB, Save),
            save_bulk_rates(Cont)
    end.
&lt;/pre&gt;</description><category>Geekdom</category><category>Research</category><category>Work</category><guid>https://jamesaimonetti.com/posts/2012/01/27/couchdbbigcouch-bulk-insertupdate/</guid><pubDate>Fri, 27 Jan 2012 19:57:28 GMT</pubDate></item><item><title>Resolving Dialyzer "Function foo/n has no local return" errors</title><link>https://jamesaimonetti.com/posts/2010/11/23/resolving-dialyzer-function-foon-has-no-local-return-errors/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
&lt;a href="http://www.erlang.org/doc/man/dialyzer.html"&gt;Dialyzer&lt;/a&gt; is a great
static analysis tool for &lt;a href="http://www.erlang.org/"&gt;Erlang&lt;/a&gt; and has
helped me catch many bugs related to what types I thought I was passing
to a function versus what actually gets passed. Some of the errors
Dialyzer emits are rather cryptic at first (as seems commonplace in the
Erlang language/environment in general) but after you understand the
causes of the errors, the fix is easily recognized. My most common error
is Dialyzer inferring a different return type that what I put in my
-spec, followed by Dialyzer telling me the same function has no local
return. An example:
&lt;/p&gt;

&lt;pre class="example" id="orgcc211f2"&gt;
foo.erl:125: The specification for foo:init/1 states that the function might also return {'ok',tuple()} but the inferred return is none()
foo.erl:126: Function init/1 has no local return
&lt;/pre&gt;

&lt;p&gt;
The init/1 function (for a gen\&lt;sub&gt;server&lt;/sub&gt;, btw):
&lt;/p&gt;

&lt;pre class="example" id="org59c92ff"&gt;
-spec(init/1 :: (Args :: list()) -&amp;gt; tuple(ok, tuple())).
init(_) -&amp;gt;
  {ok, #state{}}.
&lt;/pre&gt;

&lt;p&gt;
And the state record definition:
&lt;/p&gt;

&lt;pre class="example" id="orge27d458"&gt;
-record(state, {
  var_1 = {} :: tuple(string(), tuple())
  ,var_2 = [] :: list(tuple(string(), tuple()))
}).
&lt;/pre&gt;

&lt;p&gt;
Spot the error? In the record definition, var\&lt;sub&gt;1&lt;/sub&gt; is initialized to an
empty tuple and var\&lt;sub&gt;2&lt;/sub&gt; is initialized to an empty list, yet the spec
typing for the record does not take that into account. The corrected
version:
&lt;/p&gt;

&lt;pre class="example" id="org79b1e1f"&gt;
-record(state, {
  var_1 = {} :: tuple(string(), tuple()) | {}
  ,var_2 = [] :: list(tuple(string(), tuple())) | []
}).
&lt;/pre&gt;

&lt;p&gt;
And now Dialyzer stops emitting the spec error and the no local return
error.
&lt;/p&gt;</description><category>Geekdom</category><category>Research</category><category>Work</category><guid>https://jamesaimonetti.com/posts/2010/11/23/resolving-dialyzer-function-foon-has-no-local-return-errors/</guid><pubDate>Tue, 23 Nov 2010 12:03:31 GMT</pubDate></item><item><title>Erlang and Webmachine</title><link>https://jamesaimonetti.com/posts/2010/04/23/erlang-and-webmachine/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
I'm currently working on a small startup project, for one to meet a need
of some acquaintances, but more importantly to learn me some Erlang with
regards to the web. While I'm further along than I actually expected to
be, I thought I'd begin documenting the steps I've taken towards
building this app. The current nerdities I'm using:
&lt;/p&gt;

&lt;ul class="org-ul"&gt;
&lt;li&gt;&lt;a href="http://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt; - Editor of choice&lt;/li&gt;
&lt;li&gt;&lt;a href="http://erlang.org"&gt;Erlang&lt;/a&gt; - Functional programming language&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bitbucket.org/justin/webmachine/wiki/Home"&gt;Webmachine&lt;/a&gt; -
REST toolkit&lt;/li&gt;
&lt;li&gt;&lt;a href="http://couchdb.apache.org/"&gt;CouchDB&lt;/a&gt; - Document store&lt;/li&gt;
&lt;li&gt;&lt;a href="http://benoitc.github.com/couchbeam/"&gt;Couchbeam&lt;/a&gt; - Couchdb
framework for Erlang&lt;/li&gt;
&lt;li&gt;&lt;a href="http://code.google.com/p/erlydtl/"&gt;ErlyDTL&lt;/a&gt; - Templating engine&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/archaelus/esmtp"&gt;ESTMP&lt;/a&gt; - Email sending&lt;/li&gt;
&lt;li&gt;&lt;a href="http://tsung.erlang-projects.org/"&gt;Tsung&lt;/a&gt; - Stress-testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Installation of all of these on a GNU/Linux system is pretty
straightforward, so I won't cover that here. Defaults were used for
Erlang. I installed the other libraries/applications in ~/dev/erlang/lib
and pointed $ERL\&lt;sub&gt;LIBS&lt;/sub&gt; there in my .bashrc. I did follow
&lt;a href="http://beebole.com/en/blog/erlang/test-performance-and-scalability-of-your-web-applications-with-tsung/"&gt;this
guide&lt;/a&gt; for setting up Tsung. The BeeBole site has
&lt;a href="http://beebole.com/erlang/en/"&gt;several other pages&lt;/a&gt; worth reading for
developing web applications in Erlang. Once installed, build the
webmachine project:
&lt;/p&gt;

&lt;pre class="example" id="org6a469d5"&gt;
$WEBMACHINE_HOME/scripts/new_webmachine.erl wm_app /path/to/root
cd /path/to/roow/wm_app
make
./start.sh
&lt;/pre&gt;

&lt;p&gt;
You now have a working project! Of course, I like to have my Erlang
shell inside of emacs while I'm developing, so I added a comment to the
start.sh script that contained the shell parameters. My start.sh looks
like this:
&lt;/p&gt;

&lt;pre class="example" id="orga152bb4"&gt;
#!/bin/sh

# for emacs C-c C-z flags:
# -pa ./ebin -pa ./priv/templates/ebin -boot start_sasl -s wm_app

cd `dirname $0`
exec erl -pa $PWD/ebin $PWD/deps/*/ebin $PWD/deps/*/deps/*/ebin $PWD/priv/templates/ebin -boot start_sasl -s wm_app
&lt;/pre&gt;

&lt;p&gt;
I currently have all of my dependencies in $ERL\&lt;sub&gt;LIBS&lt;/sub&gt;; when I deploy
this to production, I'll add the libs to the wm\&lt;sub&gt;app&lt;/sub&gt;/deps as either a
symlink or copied into the directory. To have the custom shell means you
need the
&lt;a href="http://jamesaimonetti.com/2010/02/03/more-erlangemacs/"&gt;.emacs code&lt;/a&gt;
to start an Erlang shell with custom flags. &lt;b&gt;Important note&lt;/b&gt;: If you
need to specify multiple code paths in the -pa arg, you have to use a
-pa for each path, unlike in the shell command version where any path
after the -pa (or -pz) is added. Another caveat: when starting the
Erlang shell within emacs, if you're currently in a erlang-related
buffer (.erl, .hrl, etc), the default shell is started without the
option to set flags. I typically have the start.sh open anyway to copy
the flags so I don't run into this much anymore; I'm documenting it here
just in case anyone stumbles on it. Now you have a shell within which to
execute commands against your webmachine app, load updated modules, etc.
Coming up, I'll talk about how I'm using ErlyDTL to create templates and
using CouchDB/Couchbeam for the document store.
&lt;/p&gt;</description><category>Geekdom</category><category>Research</category><category>Work</category><guid>https://jamesaimonetti.com/posts/2010/04/23/erlang-and-webmachine/</guid><pubDate>Fri, 23 Apr 2010 08:54:48 GMT</pubDate></item><item><title>Purely Functional Data Structures and Me</title><link>https://jamesaimonetti.com/posts/2010/03/23/purely-functional-data-structures-and-me/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
Quick post to say that I've put my dabblings into Chris Okasaki's
&lt;a href="http://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/0521663504"&gt;Purely
Functional Data Structures&lt;/a&gt; book up as a
&lt;a href="http://github.com/jamesaimonetti/Purely-Functional-Data-Structures"&gt;github
repo&lt;/a&gt;. I am picking and choosing what exercises and examples to code,
with the goal being to slowly cover the whole book. Some concessions are
made to fit the ideas into Erlang (like recursively calling an anonymous
function), but overall I think the ideas fit nicely. There is a
&lt;a href="http://www.erlang.org/pipermail/erlang-questions/2000-October/001916.html"&gt;streams
lib&lt;/a&gt; from Richard Carlsson that I found on the Erlang mailing list in
the repo as well that I used for reference for a couple things in
chapter 4. I stuck with my streams being represented either as an empty
list [] or [term() | fun()] with term() being the calculated value and
fun() being the suspension function, instead of the tuple that Richard
chose. After reading further in the thread, I understand why (don't
confuse people that might use proper list functions on streams) but for
my small examples, it was enough to use lists.
&lt;/p&gt;</description><category>Geekdom</category><category>News</category><category>Research</category><guid>https://jamesaimonetti.com/posts/2010/03/23/purely-functional-data-structures-and-me/</guid><pubDate>Tue, 23 Mar 2010 10:24:20 GMT</pubDate></item><item><title>PHP, cURL, and POST</title><link>https://jamesaimonetti.com/posts/2010/02/12/php-curl-and-post/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
While working on a script today that had been working, I couldn't for
the life of me figure out why it was failing. It uses the PHP curl\&lt;sub&gt;*&lt;/sub&gt;
functions to make various requests and processes the results. Turns out
when you send a POST body with the CURLOPT\&lt;sub&gt;POSTFIELDS&lt;/sub&gt; and a value field
begins with an at symbol(@), you have to escape it (\@). The reason is
the at symbol is used by curl to denote a file upload path
("@/path/to/upload.file"). So escape the at symbol and you should be
back to good with the curling.
&lt;/p&gt;</description><category>Geekdom</category><category>Research</category><category>Work</category><guid>https://jamesaimonetti.com/posts/2010/02/12/php-curl-and-post/</guid><pubDate>Fri, 12 Feb 2010 14:44:20 GMT</pubDate></item><item><title>Adding Files To Subversion</title><link>https://jamesaimonetti.com/posts/2010/02/10/adding-files-to-subversion/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
Working with symfony, especially when adding to the schema and
generating the model, form, and filter classes, it becomes tedious to
add each of the new files to your subversion repository. Here's a
succinct line to add all un-versioned files to your repo:
&lt;/p&gt;

&lt;pre class="example" id="org951c643"&gt;
#!/bin/sh

svn add `svn st | grep ? | head | awk '{print $2}'`
&lt;/pre&gt;

&lt;p&gt;
The key is in the tick-marked section. It takes the output of svn
st(atus) and pipes it to grep, selecting only the un-versioned files
(denoted by the ?), pipes that to head which outputs the first 10 (by
default) lines, and pipes that to awk which prints the second column
containing the file path to be added. But what if you have more than 10
files to add? You can easily pass a -n NUM switch to the head command to
increase the number of lines it reads in at a time. I'll leave it as an
exercise to the reader to modify the script to allow a user to pass in
what NUM should be. So when your "svn st" output is filled with
un-versioned files, all of which you need, run this little guy and have
it done speedily.
&lt;/p&gt;</description><category>Geekdom</category><category>Research</category><category>Work</category><guid>https://jamesaimonetti.com/posts/2010/02/10/adding-files-to-subversion/</guid><pubDate>Wed, 10 Feb 2010 14:20:00 GMT</pubDate></item><item><title>More Erlang+Emacs</title><link>https://jamesaimonetti.com/posts/2010/02/03/more-erlangemacs/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
I have found that Distel's built-in shell launcher wasn't cutting
mustard as I needed to start shells with various flags and didn't see an
easy way to accomplish this using what Distel provided. Digging around
the Erlang mailing list, I found an
&lt;a href="http://www.erlang.org/cgi-bin/ezmlm-cgi/4/24959"&gt;elisp function&lt;/a&gt; that
allowed me to pass flags to the shell. Place this snippet in your .emacs
file after you've required erlang and distel:
&lt;/p&gt;

&lt;pre class="example" id="org15e67b1"&gt;
(defun erl-shell-with-flags (flags)
  "Start an erlang shell with flags"
  (interactive (list (read-string "Flags: ")))
  (set 'inferior-erlang-machine-options (split-string flags))
  (erlang-shell))

;; map Ctrl-c Ctrl-z to the new function
(global-set-key "\C-c\C-z" 'erl-shell-with-flags)
&lt;/pre&gt;

&lt;p&gt;
Now when you start the erlang shell, a "Flags: " prompt will be
presented. Simply add flags as you would on the command line and the
shell will start up. Great for when you need multiple shells with
different snames, names, cookies, etc…
&lt;/p&gt;</description><category>Fun</category><category>Geekdom</category><category>Research</category><guid>https://jamesaimonetti.com/posts/2010/02/03/more-erlangemacs/</guid><pubDate>Wed, 03 Feb 2010 11:10:03 GMT</pubDate></item><item><title>Connect to remote erlang shell while inside emacs</title><link>https://jamesaimonetti.com/posts/2010/01/07/connect-to-remote-erlang-shell-while-inside-emacs/</link><dc:creator>James Aimonetti</dc:creator><description>&lt;p&gt;
While developing my top secret project, I have been getting into the fun
stuff in Erlang and Emacs. Connecting to a running instance of my app
from a remote shell wasn't straightforward to me at first, so below is
my documented way of connecting, as well as dropping into the
&lt;a href="http://www.erlang-fr.org/erlang.org/doc/getting_started/getting_started.html#jcl"&gt;Erlang
JCL&lt;/a&gt; from within an Emacs erlang shell.
&lt;/p&gt;

&lt;ol class="org-ol"&gt;
&lt;li&gt;Start yaws: yaws –daemon -sname appname –conf /path/to/yaws.conf&lt;/li&gt;
&lt;li&gt;Start emacs, and from within emacs start an Erlang shell with C-c C-z
(assuming you have &lt;a href="http://code.google.com/p/distel/"&gt;distel&lt;/a&gt;
configured).&lt;/li&gt;
&lt;li&gt;From the Emacs erlang shell, get into Erlang's JCL by typing C-q C-g
and pressing enter. A \&lt;sup&gt;G&lt;/sup&gt; will be printed at the prompt, but won't be
evaluated until you press enter. You should see the familiar JCL
prompt "User switch command –&amp;gt;".&lt;/li&gt;
&lt;li&gt;Type 'j' to see current jobs you have running locally, which is
probably just the current shell (1 {shell,start,[init]}).&lt;/li&gt;
&lt;li&gt;Type 'r appname@compy' to connect to the remote node identified by
appname ( from the -sname parameter ) on the computer compy (usually
whatever hostname returns)&lt;/li&gt;
&lt;li&gt;Type 'j' to see current jobs, which should list your current shell as
"1 {shell,start,[init]}", and a second shell "2*
{appname@compy,shell,start,[]}".&lt;/li&gt;
&lt;li&gt;Type 'c 2' to connect to the remote shell. You can now run commands
in the node's shell. You may have to press enter again to bring up a
shell prompt.&lt;/li&gt;
&lt;/ol&gt;

&lt;pre class="example" id="orgababa14"&gt;
james@compy 14:33:34 ~/dev/erlang/app
&amp;gt; yaws --daemon -sname app --conf config/yaws.conf

james@compy 14:34:00 ~/dev/erlang/app
&amp;gt; emacs
&lt;/pre&gt;

&lt;pre class="example" id="org5b02b44"&gt;
Eshell V5.7.4  (abort with ^G)
1&amp;gt; ^G

User switch command
 --&amp;gt; j
   1* {shell,start,[init]}
 --&amp;gt; r app@compy
 --&amp;gt; j
   1  {shell,start,[init]}
   2* {app@compy,shell,start,[]}
 --&amp;gt; c 2

1&amp;gt;
&lt;/pre&gt;</description><category>Geekdom</category><category>News</category><category>Research</category><guid>https://jamesaimonetti.com/posts/2010/01/07/connect-to-remote-erlang-shell-while-inside-emacs/</guid><pubDate>Thu, 07 Jan 2010 13:41:18 GMT</pubDate></item></channel></rss>