Re: Serialization Snag

2008-09-18 Thread noahr
Was the 'other side' (Berkely DB) in a separate process / machine? Or part of the same jvm? If separate, what clojure knowledge / libraries did the other side have? I assume there was serialization across or else you wouldnt have gotten the PersistentMap error. And sounds like your passing the CLA

Re: Serialization Snag

2008-09-12 Thread noahr
Well digging into it more, I've since realized the whole approach I was taking is misguided anyway, as serialization appears to be for marshaling the data of already defined classes. What I was really trying to do was create new classes (java or clojure), and stream them across the network, and h

Serialization Snag

2008-09-12 Thread noahr
I've hit a problem trying to serialize an object from one (clojure) server to another (java). I was *hoping* to simply use (PROXY) to implement the object I want to send in clojure, and serialize that across the stream. Unfortunately java barfs about: java.io.NotSerializableException: clojure.lan

Re: Clojure Poll 09/2008

2008-09-11 Thread noahr
Another (possibly stupid) idea: Have some prefix-character to allow you to have the argument to a macro be evaluated (sorta like a function), and its resulting data structure given to the macro instead. I realize the whole point of macros is that the arguments ARENT evaluated, but would it be use

Re: Clojure Poll 09/2008

2008-09-10 Thread noahr
I'm actually building a production application with it for the company where I work, which is quite exciting. (Until my permission to do so gets revoked, of course). That's also why I'll no doubt be spamming the list with so many questions :p The application will be of the server-side message dis

WHILE macro

2008-09-10 Thread noahr
I've found the following macro very useful: (similar to a standard language while loop) (defmacro while[v cnd & body] `(loop[] (let [~v ~cnd] (when ~v [EMAIL PROTECTED] (recur) Basically it repeatedly executes BODY while CND (which is constantly re-evaluated) i

Re: Threads and Functions Question

2008-09-09 Thread noahr
The binding trick seems to work. I had already tried using (in-ns) before, but didn't realize about needing the binding, so got a nasty error of course. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group

Re: Threads and Functions Question

2008-09-09 Thread noahr
The ` for ' trick definitely worked. Unfortunately that solves my example problem but not my real one, since I cant quote the actual function because its in the form of an incoming stream fed to read. I looked for some sort of 'qualify-all' function that would act similar to ` but didnt see one.

Threads and Functions Question

2008-09-08 Thread noahr
I've hit another mystery (to me), that I hope someone can explain. Why doesn't the following work? (defn tst[] (pr 4)) (defn trd[] (let [f #(eval '(tst))] (. (Thread. f) start) )) It seems that a separate thread can not EVAL any defined functions. If I change the above to remove the thr

Re: Recur ?

2008-09-08 Thread noahr
Thanks, between your explanation and the link, I understand it now. Basically you refer to the higher level LOOP or the 'beginning of the function definition your in'. I thought recur would proceed to the next higher function call, so that for example if you had RECUR inside a 'do', it would recur

Recur ?

2008-09-08 Thread noahr
I'm a bit confused about the nature of recur. Is there a guideline for understanding what part of the code recur will 'go to'. Obviously you can have a LOOP expression, but apparently you can also recur to other functions. So I'm wondering WHICH functions can you recur to, all? some? What if you

Clojure Robustness

2008-09-03 Thread noahr
Any opinions on whether Clojure is solid enough to be used in actual production systems? Obviously it's JVM based, which is, and hopefully any issues would be caught per normal testing, and fixed or worked- around, but wondering what general thoughts on the matter are. As a backup plan I figure lo

Re: A LIST of questions..

2008-08-29 Thread noahr
Thanks! Your #2 solution is a bit cleaner than what I had in mind For #4 I was able to use the standard form [& b] in defn without any issues. I could of *sworn* that didn't work before whenever I tried it with just one argument, but clearly I was *insane*. Thanks again for input --n --~--~--

A LIST of questions..

2008-08-29 Thread noahr
1) What's a good way to add to the end of a list? You could reverse it then cons then reverse it again You could convert to vector and use (conj.. or some such Both of the above seem very kludgey Java .add is not available I did find however, you can form a 1-element list from the item and conc

Greetings

2008-08-26 Thread noahr
Hello everyone, Just wanted to report this language seems awesome. It's exactly the sort of thing I (and hopefully others) have been looking for. Very cool. I would offer feedback as a newbie, though, that more 'examples' spread throughout the primary docs, and more of a 'getting started w/ exam

First impressions

2008-08-26 Thread noahr
Some more first impressions from a newbie. The language is AWESOME, but here are some of the first specific questions I wondered about. 1) I found myself wanting to do an import *, though I understand this has been commented on already, and argued against. I'm not really arguing FOR it, but I th