Re: loading erlang terms

2010-11-11 Thread Scott Lystig Fritchie
Catching up(*) on a thread from the end of October (nothing like being prompt, is there?)... Charles Blair wrote: cb> Thanks for spotting the "brainos". But even without those, here is a cb> repeat of the experiment. Assuming that these code snippets demonstrate what you're trying to do, then I

Re: loading erlang terms

2010-10-28 Thread Charles Blair
Thanks for spotting the "brainos". But even without those, here is a repeat of the experiment. erl -pa /usr/local/riak-0.13.0/rel/riak/lib/riak_core-0.13.0/ebin /usr/local/riak-0.13.0/rel/riak/lib/riak_kv-0.13.0/ebin /usr/local/riak-0.13.0/rel/riak/lib/riakc-1.0.1/ebin /usr/local/riak-0.13.0/re

Re: loading erlang terms

2010-10-28 Thread Scott Lystig Fritchie
Charles Blair 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. 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

Re: loading erlang terms

2010-10-27 Thread Charles Blair
Thanks, all. I think my issues at this time boil down to a difference between how I can interact with a running riak system using the shell in riak-admin attach, and using another shell to contact the running system. So, for example, following the README file, this works fine (shell prompts omitt

Re: loading erlang terms

2010-10-26 Thread Seth Falcon
On Tue, Oct 26, 2010 at 9:37 AM, Charles Blair wrote: > Btw, the documentation has this: > > encode_term(Object, Term) -> >    riakc_obj:update_value(Object, term_to_binary(Term, [compressed]), >                           <<"application/x-erlang-term">>). > > This gave me the idea that perhaps by

Re: loading erlang terms

2010-10-26 Thread Charles Blair
Btw, the documentation has this: encode_term(Object, Term) -> riakc_obj:update_value(Object, term_to_binary(Term, [compressed]), <<"application/x-erlang-term">>). This gave me the idea that perhaps by encoding the content type as application/x-erlang-term I could g

Re: loading erlang terms

2010-10-26 Thread Charles Blair
On Tue, Oct 26, 2010 at 09:13:17AM -0700, Seth Falcon wrote: > Perhaps I'm missing something... How about using Erlang's native > binary term serialization. > > B = term_to_binary(Terms), > % now store B in Riak > > % ... > > % now get B out and do: > binary_to_term(B) Thanks, Seth. That's a fi

Re: loading erlang terms

2010-10-26 Thread Seth Falcon
On Tue, Oct 26, 2010 at 8:11 AM, Charles Blair wrote: [snip] > Now, if I replace dets/ets with riak, I can do two things (I > think). The first would be to write an erlang function that does > something like the above. But the second (which is where my question > comes into play) is, if I can lo

Re: loading erlang terms

2010-10-26 Thread Charles Blair
On Mon, Oct 25, 2010 at 07:34:13PM -0700, Dan Reverri wrote: > I don't understand your use case; can you expand on what you are doing? Perhaps this in the category of "too much information," but since you asked, I had written an OAI-PMH provider in erlang. My backing store is a dets file, which

Re: loading erlang terms

2010-10-25 Thread Dan Reverri
Hi Charles, I don't understand your use case; can you expand on what you are doing? Thanks, Dan Daniel Reverri Developer Advocate Basho Technologies, Inc. d...@basho.com On Mon, Oct 25, 2010 at 6:05 PM, Charles Blair wrote: > Erlang has a function, file:consult, that allows one to load erlan