loading erlang terms

Scott Lystig Fritchie slfritchie at snookles.com
Thu Oct 28 12:31:25 EDT 2010


Charles Blair <chas at uchicago.edu> wrote:

cb> In step 2 I can retrieve a key whose value is a string. In step 3, I
cb> fail to retrieve the value.

<disclaimer type="didn't actually run the commands">

The good news: you did fetch it.

The bad news: immediately afterward Erlang's pattern matching failed
which threw an exception which killed the shell/CLI process that you
were using which closed the port that was associated with the Protocol
Buffers client which closed the TCP connection.

If you use {ok, C1} and {ok, C2} for steps #2 and #3, you'll probably
find the success you're looking for.  As you'd used them, in step #2, C
was an unbound variable, so it became bound.  In step #3, C was a bound
variable, and the term in tuple position 2 in on the righthand side
didn't match C.

</disclaimer>

The shells "help()." function mentions two variations of a helpful
gizmo, in case you don't like creating lots of unique variable names at
the shell: "f()." and "f(Variable)." to unbind all or a single variable,
respectively.

-Scott




More information about the riak-users mailing list