pre newbie entrance

2009-01-10 Thread e
ant, ignore my reluctance, and advise thusly. Maybe I'll get a million replies saying, "the docs come with the download. why not download and see?". Or maybe I'll get zero responses because this post makes no sense. Or, who knows, maybe there will be a lot of people who say, "

Re: pre newbie entrance

2009-01-10 Thread e
ah, this is useful, too: http://clojure.org/compilation On Jan 10, 12:39 pm, James Reeves wrote: > On Jan 10, 4:54 pm, e wrote: > > > Concretely, this would mean following the "Getting Started" > > instructions on clojure.org.  Then seeing what there is to see . .

Re: SLIME: trouble with java.lang.OutOfMemoryError

2009-01-10 Thread e
i wondered about this when I was asking about eclipse analogies. The vm that runs a program that you are writing should have nothing to do with the vm your editor is using. Maybe there should be some way for the actual running program to be in one VM, and then the REPL communicates to it via RMI

Re: SLIME: trouble with java.lang.OutOfMemoryError

2009-01-10 Thread e
brains have burned a lot of cells along the way > and I am not as fast as I used > to be when I started programming :))) so if I can do it, I expect that > others can do so... > > For me Eclipse is like getting a wheeled walker, that's the step just > before my own death, I us

Re: SLIME: trouble with java.lang.OutOfMemoryError

2009-01-10 Thread e
exactly. . . .but I bet a lot of people would just reply that this is not possible to address since the REPL is the one and only vm. Disclaimer, I'm only guessing at that, too. I don't understand any of this, yet. But if that's the case, fix that. Have the REPL send messages to the vm that's ru

Re: SLIME: trouble with java.lang.OutOfMemoryError

2009-01-10 Thread e
this is fairly close to how SLIME works, when > connected to a remote VM. The remote VM is running some server code > which allows it to communicate with SLIME, which is running inside of > emacs. > > On Jan 10, 2:15 pm, e wrote: > > > exactly. . . .but I bet a lot of people

non recursive impl in presence of persistence?

2009-01-10 Thread e
I'm just trying to understand basic stuff. say I have a local list called "myList" (assigned using 'let' . . . should I have used something else?) Who cares what's in it. Maybe I set it up from a list comprehension from some input to my function. I have no idea how to iteratively mess with it s

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
thanks for all the help. just to answer the last question, 'sorted' should have taken on the new def before getting returned. that return happens after the def is complete. Will check out refs. I think that's what I need to understand. On Jan 11, 1:27 am, "Eric Lavigne" wrote: > > I have no

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
gt; myList.  The let is just for clarity's sake, you could have just put them in > place of l1 and l2 in the recur. > > On Sun, Jan 11, 2009 at 12:21 AM, e wrote: > > > I'm just trying to understand basic stuff. > > say I have a local list called "myList"

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
great. I wondered about that, too! thanks. On Jan 11, 7:27 am, James Reeves wrote: > On Jan 11, 6:32 am, "Nick Vogel" wrote: > > > Ok, first of all, here's how I translated that python code: > > > (defn msort [myList] > >   (if (> (count myList) 1) > >     (let [l1 (first myList) l2 (second m

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
        (lazy-cons h1 (lazy-merge (rest seq1) seq2)) >                     (lazy-cons h2 (lazy-merge seq1 (rest seq2))) > > (defn merge-sort [seq] >   (if (> (count seq) 1) >       (apply lazy-merge (map merge-sort (split-at (/ (count seq) 2) > seq))) >       seq

Re: SLIME: trouble with java.lang.OutOfMemoryError

2009-01-11 Thread e
project (= java project + clojure > nature) > - syntax coloring > - some keyboard accelerators for : >    - jump to matching bracket : Ctr+Shift+P >    - Go to start of top level defun : Ctrl+Alt+A (or AltGr+A) >    - Go to end of top level defun : Ctrl+Alt+E (or AltrGr+E) >  

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
refs seem silly in this context! Now I REALLY have to get my head wrapped around clojure. sooo I only have one thread, but I have to do a dosync? Why can this whole function just work in a thread agnostic way? It's a local variable! If a thread calls it, then a thread should own the memor

list merge help

2009-01-11 Thread e
this seemed like a clean, nice way to merge to sorted lists into one sorted list. I'm not getting clojure syntax, it seems: (defn listmerge [l1 l2] (let [l1first (first l1) l2first (first l2)] (if (= l1first nil) l2) (if (= l2first nil) l1) (if (< l1first l2first) (cons l1fi

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
that's awesome, and I hope it helps others, too. Thanks for starting with python. This gets to my question perfectly. Why is your code "my-list (rest (rest my-list)) " legal? I wouldn't have even thought to try that because, in essence, you are changing my-list. I mean, I know how persistence

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
i see that "my-list (rest (rest my-list))" is in a let section. That seems like the scope would mean we are talking about a different my- list. On Jan 11, 1:19 pm, e wrote: > that's awesome, and I hope it helps others, too.  Thanks for starting > with python. > &g

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
Every version of the python code makes sense. I've got this reference to my-list, and I can change that reference. I see the same thing happening here, but it's scoped inside a let barrier. I seem to remember in clisp, there was a setq. maybe that's what I'm missing. On J

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
mple problem, I would posit. On Jan 11, 1:41 pm, James Reeves wrote: > On Jan 11, 6:19 pm, e wrote: > > > This gets to my question perfectly.  Why is your code "my-list > > (rest (rest my-list)) " legal? > > Because you're not actually changing anything. >

Re: list merge help

2009-01-11 Thread e
ahhh I see. That makes sense. So it's not like procedural programming. You could see what I was trying to understand. I didn't want case/swtich semantics. like the (cond) or if, else if style. I was trying to return at the first true thing, but it doesn't work like that. it always gets

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
thanks for your patience. I think I'm starting to get it. Interesting discussion on tail recursion. Add a lot of depth to what Rich was talking about. Really smart work-around! On Jan 11, 2:50 pm, James Reeves wrote: > On Jan 11, 7:19 pm, e wrote: > > > oh.  I missed the &

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
here's a good explanation: http://groups.google.com/group/clojure/browse_thread/thread/3c22b35f079e0de6/95fc0b334ab77c1f I wasn't thinking about closures since I've only recently even learned what they are. I actually don't know if it will ever occur to me to use them, but it sounds like they are

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
is the @ symbol the same as a var-get . . . or is that and atom. Your sentence about atoms was very compound. I'm not sure if you said that you used an atom but you didn't have to . . . .or you didn't use an atom because it wasnt necessary . . . . or you did use an atom because it was necessary w

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
nal > while loop/recur still lets your mind stick to imperative patterns. > > Regards, Adrian. > > On Mon, Jan 12, 2009 at 7:24 AM, e wrote: > > here's a good explanation: > > > http://groups.google.com/group/clojure/browse_thread/thread/3c22b35f079e0de6/95fc0b334a

Re: when performance matters

2009-01-11 Thread e
I can't speak for clojure, so I'm interested in seeing how people who can will answer. There's so much to consider. I've heard Haskell is getting faster and has (or will have) parallel programming under the scenes (automatically doing independent parts of operations). There are other fast functi

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
looks like an awesome book. will check it out more. thanks. On Mon, Jan 12, 2009 at 1:06 AM, Josip Gracin wrote: > > On Sun, Jan 11, 2009 at 10:33 PM, e wrote: > > thanks for your patience. I think I'm starting to get it. > > Interesting discussion on tail recursion

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
t (concat my-list2 (listmerge l1 l2 (first my-list ;; test it out (msort [4 53 54 3 5 7 8]) On Mon, Jan 12, 2009 at 1:29 AM, e wrote: > looks like an awesome book. will check it out more. thanks. > > > On Mon, Jan 12, 2009 at 1:06 AM, Josip Gracin wrote: > &

Re: non recursive impl in presence of persistence?

2009-01-11 Thread e
Mon, Jan 12, 2009 at 1:47 AM, e wrote: > I'm not planning on programming like this, but just to try to finish this > up . . . .it's still not working. I get an odd error when I actually try to > sort something that iSeq doesn't work on integers. I have no idea where to &g

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
4 45 2 67 1]) Thanks again. On Mon, Jan 12, 2009 at 1:10 PM, James Reeves wrote: > > On Jan 12, 5:24 am, e wrote: > > It's funny, whenever I tried to be all safe like this and take the time > to > > make stuff safe in C++, coworkers would say, "we are grown-ups. A

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
i forgot about the wiki. why is this maintained in a totally different page from clojure.org? I should be looking at these examples: http://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples On Mon, Jan 12, 2009 at 9:15 PM, e wrote: > I give up.I don't know what

Re: Example Java oriented SWT GUI application in Clojure

2009-01-12 Thread e
what is "set!"? I don't see that in the api On Mon, Jan 12, 2009 at 5:24 PM, BerlinBrown wrote: > > Here is an example SWT application. It is a 'search' tool. Open a > file and the search term is highlighted. It has a java oriented > approach because I copied the java code verbatim. This mi

Re: Example Java oriented SWT GUI application in Clojure

2009-01-12 Thread e
thanks. I think this will be useful, but I have to figure out how to get it to build in enclojure. Right now I get, "Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name octane_main, locale en_US (octane_main.clj:136)" On Mon, Jan 12, 2009 at 5:24 PM, Be

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
o! all the stuff from listmerge ended up in my-list directly. so then when listmerge was called on these elements it rightly complained! Awesome. Lots of good lessons coming out of this. I need to learn how to run closure code as a script then. I seem to remember something about this w

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
by the way, Tim, I've seen NB before as comments in J. What's it stand for? On Mon, Jan 12, 2009 at 10:39 PM, e wrote: > o! all the stuff from listmerge ended up in my-list directly. so > then when listmerge was called on these elements it rightly complained! > Awe

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
o #2 . . . and I totally lost site of what I was doing with l1 and l2 ! they were already lists because my-list was a list of lists. I new that when I started, like on Friday. On Mon, Jan 12, 2009 at 10:39 PM, e wrote: > o! all the stuff from listmerge ended up in my-l

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
my unsafe version works now, thanks to a LOT of help. (defn msort [toSort] (with-local-vars [my-list (for [x toSort] [x])] (while (rest @my-list) (let [[l1 l2 & my-list-rest] @my-list] (var-set my-list (conj my-list-rest (listmerge l1 l2))) )) (first @my-list))) now I'm try

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
seriously? Wow! Interesting. On Tue, Jan 13, 2009 at 12:53 AM, Timothy Pratley wrote: > > >(if (l2) > > The problem is on this line. (l2) is a function call. > Replace with (if l2 > and it works fine :) > > java.lang.IllegalArgumentException: Wrong number of args passed to: > LazilyPersiste

Re: Designing a Performance Vector Math library in Clojure.

2009-01-12 Thread e
I hear about boxing a lot. What is it? Thanks. On Tue, Jan 13, 2009 at 12:49 AM, CuppoJava wrote: > > Hi, > I'm still getting used to the primitive support in Clojure, and I want > to confirm my understanding. > > As far as I know, primitive support is only supported in local let > bindings, ri

Re: when performance matters

2009-01-12 Thread e
There's a study someone did that compared C++, Java, and Lisp implementations of various problems. It could be urban legend, but how I remember it: The best C++ implementation was the fastest for each problem. But the average lisp implementation was faster then the average java or C++ implementat

Re: non recursive impl in presence of persistence?

2009-01-12 Thread e
Instead of that being an error, why not overload the vector function so that no args calls the version that returns the list. That seems like a good idea! I wonder if people will object. On Tue, Jan 13, 2009 at 1:23 AM, e wrote: > seriously? Wow! Interesting. > > > On Tue, Jan

Re: Designing a Performance Vector Math library in Clojure.

2009-01-12 Thread e
ah great explanation. That will help a lot. I found that annoying in Java. On Tue, Jan 13, 2009 at 1:38 AM, CuppoJava wrote: > > Do you know Java? It'll be easier to explain if you do. > > In Java, everything is an Object. Object's are treated as references > to a specific memory location w

Re: non recursive impl in presence of persistence?

2009-01-13 Thread e
sure . . . I'm just impressed with how many things "just work", and this could be one more. Not enough args, but you know what I wanted it to mean. There's no ambiguity. On Tue, Jan 13, 2009 at 2:07 AM, Timothy Pratley wrote: > > > > On Jan 13, 5:57 pm, e wro

Re: non recursive impl in presence of persistence?

2009-01-13 Thread e
ence with such errors will point me to the right place. () is a function call unless quoted so that it can be data . . . or something . . . .right? it didn't make sense to have parens there . . . just a habbit from C++. On Tue, Jan 13, 2009 at 4:52 PM, James Reeves wrote: > > On

Re: By Example - another Clojure introduction wiki page

2009-01-13 Thread e
i know that will be awesome for me. I just wish clojure.org was the only place I had to go to get stuff like that. Why not wikify it all there? On Tue, Jan 13, 2009 at 9:12 PM, GS wrote: > > On Jan 14, 1:12 am, Timothy Pratley wrote: > > I've written small wiki article which dives right into

Re: By Example - another Clojure introduction wiki page

2009-01-13 Thread e
I can find this thread. finally I'm there. Not Tim's fault. And I'm glad he's doing it. Consider this feedback and opinion. You are getting a data point on how one person thinks (or fails to think). On Tue, Jan 13, 2009 at 11:42 PM, Nick Vogel wrote: > It is, that

Re: By Example - another Clojure introduction wiki page

2009-01-13 Thread e
. . . that person being me if it wasn't clear :) On Wed, Jan 14, 2009 at 12:35 AM, e wrote: > define "directly" I clicked on clojure.org. I don't see the link. I > stared at the page for a good 30 seconds. I don't see a "links" section. . > . .

Re: By Example - another Clojure introduction wiki page

2009-01-13 Thread e
actually I think I've seen that page before. I guess I new the way to get there once. On Wed, Jan 14, 2009 at 12:35 AM, e wrote: > . . . that person being me if it wasn't clear :) > > > On Wed, Jan 14, 2009 at 12:35 AM, e wrote: > >> define "directly"

Re: *1 *2 isn't working properly

2009-01-14 Thread e
is that just for fun or can it be used in programs? HB, how'd you even learn about that so fast? do I suck at reading? On Wed, Jan 14, 2009 at 7:20 AM, Martin Wood-Mitrovski wrote: > > On Wed, 14 Jan 2009 04:15:18 -0800 (PST) > HB wrote: > > > > > Lets say that the result of each method invoca

Re: By Example - another Clojure introduction wiki page

2009-01-14 Thread e
example's of API isn't the same as real, known, problems and how to solve them in clojure. Like my merge sort problem before. I think the last post there of the loop/recur and how it's better than the with-local-vars version . . .and what leaking is about how it's not really recursion is all good

(newby) Quicksort in clojure

2009-01-15 Thread e
What would be a good way to implement quicksort in clojure (or any persistent language)? I mean, not just something that works or has the right theoretical runtime. I've thought about just looking to see how sort was implemented in clojure, but I don't know if it would get to my point once I fo

Re: (newby) Quicksort in clojure

2009-01-15 Thread e
an 15, 2009 at 12:59 PM, James Reeves wrote: > > On Jan 15, 1:37 pm, e wrote: > > What would be a good way to implement quicksort in clojure (or any > > persistent language)? > > Lennart Augustsson's point is that destructive updates are part of the > Quicksort algorith

Re: Example Java oriented SWT GUI application in Clojure

2009-01-15 Thread e
anyone able to get this going on a Mac yet? The main window comes up, but shortly after crashes. On Mon, Jan 12, 2009 at 5:24 PM, BerlinBrown wrote: > > Here is an example SWT application. It is a 'search' tool. Open a > file and the search term is highlighted. It has a java oriented > appro

Re: Example Java oriented SWT GUI application in Clojure

2009-01-15 Thread e
yeah. That fixed it. Thanks. On Thu, Jan 15, 2009 at 9:53 PM, Paul Barry wrote: > It's probably this: > http://www.eclipse.org/swt/faq.php#carbonapp > > > On Thu, Jan 15, 2009 at 9:20 PM, e wrote: > >> anyone able to get this going on a Mac yet? The main wi

Re: Mysterious performance anomalies

2009-01-16 Thread e
This is probably a silly question, well outside the scope of this conversation (but maybe not, and I didn't want to start a whole thread on it). Is it much much easier to make byte code than assembly code? I mean, I understand why running on a VM makes sense as far as instantly inheriting all the

Re: Mysterious performance anomalies

2009-01-18 Thread e
. I know he feels fine looking back. On Sun, Jan 18, 2009 at 12:23 AM, Mark H. wrote: > > On Jan 16, 6:47 am, e wrote: > > Is it much much easier to make byte code than assembly code? > > I'll chime in too to say that x86 is only king of the desktop / laptop > world -- ma

Re: Mysterious performance anomalies

2009-01-18 Thread e
tely 95% of bytecode in typical program usage ends up being directly processed in the hardware." That's awesome. Also, I've only read the title and skimmed here, so far, but it seems relevant: http://blogs.vmware.com/performance/2008/08/esx-runs-java-v.html On Sun, Jan 18, 2009 at 11:48

Re: Mysterious performance anomalies

2009-01-19 Thread e
x27;d still get a JFrame-like thing even if it weren't from a java lib via a JVM. On Mon, Jan 19, 2009 at 2:23 PM, Mark H. wrote: > > On Jan 18, 8:48 am, e wrote: > > That's a great argument. I need arguments like these. I work with > people > > who dismiss JVM.

Re: fit for contribution to clojure.contrib.ns-utils?

2009-01-19 Thread e
can someone explain to a newby like me what we are talking about here? :) This is totally over my head. Only do so if you think it's a valuable lesson to be had. Otherwise, I fully accept that if I don't get it, then I'm not the intended audience. Thanks. On Mon, Jan 19, 2009 at 2:23 PM, Dan L

Re: Streams work

2009-01-21 Thread e
I'm stopping to write this after the seq definition (bullet) to give you my exact feeling moving on. You may find that that is ok and that I will get it by the end of the page: What I assume at this point to be true is that if I first use an iter to * consume* some of the stream, that part is use

Re: Streams work

2009-01-21 Thread e
to use the stream in syncronized blocks? Keep in mind, If never made an agent. just speculating based on the reading and videos. On Wed, Jan 21, 2009 at 8:05 PM, e wrote: > I'm stopping to write this after the seq definition (bullet) to give you my > exact feeling moving on. You ma

Re: Streams work

2009-01-21 Thread e
> > Well, it's the combination of a seq being persistent and a stream > being one-pass - to realize the seq you'll need that pass. could be implemented still doing that pass . . . and --> This may be where you are headed in the To Be Continued, but it out to be possible to wrap a sequence with a

Re: Mysterious performance anomalies

2009-01-21 Thread e
amazing. Some day there will be a book written about this perfect storm: "The Language Age". Ok, I admit. I started watching this presentation last night: http://www.parleys.com/display/PARLEYS/Home#talk=2556139;slide=1;title=The%20future%20will%20be%20about%20programming%20languages did I see

Re: Streams work

2009-01-22 Thread e
> > Now imagine two threads T1 and T2 accessing this generator at the same > time. Suppose they reach the same node at the same time, and suppose > that you've protected file deletion and link deletion each > individually with a mutex (and forbade multiple deletions silently). > T1 might delete th

Re: Agent as a processing queue

2009-01-22 Thread e
wow. I wonder if I could use this for the quicksort I was talking about. I would need to have the function being added as a job be able to add it's own jobs recursively . . . .and kill jobs when they are done. But do you have to sleep, or is there a way to join the children when they are done?

Re: Agent as a processing queue

2009-01-23 Thread e
est handled by send-off-future wrapping a generator that can throttle or something? Thanks again. On Fri, Jan 23, 2009 at 4:35 AM, Timothy Pratley wrote: > > > > On Jan 23, 11:24 am, e wrote: > > wow. I wonder if I could use this for the quicksort I was talking about. >

Re: Streams work

2009-01-23 Thread e
people who love doing stream processing would attack an extra allocation. On Fri, Jan 23, 2009 at 12:09 PM, Konrad Hinsen wrote: > > On Jan 23, 2009, at 14:04, Rich Hickey wrote: > > >> Then why not make a pipeline using lazy sequences right from the > >> start? I don't see anything that I could

namespace concept

2009-01-23 Thread e
Hi I don't really get namespaces, and, yes, I looked at http://clojure.org/namespaces . . . but was lost at "interned" (thinking about this more, I think I know what it means ... perhaps a link to a definition would work). Is it like C++ where it doesn't matter what subdirectory a file is in ..

Re: namespace concept

2009-01-23 Thread e
sure. Thanks for the reference. On Fri, Jan 23, 2009 at 5:41 PM, Stephen C. Gilardi wrote: > > On Jan 23, 2009, at 4:54 PM, e wrote: > > [lots of stuff] > > > Would you please take a look at the text and example at > http://clojure.org/libs and ask questions

Re: namespace concept

2009-01-23 Thread e
modifier when you want only certain things, and "as" be a modifier when you still want some level of qualification? On Fri, Jan 23, 2009 at 6:56 PM, e wrote: > sure. Thanks for the reference. > > > On Fri, Jan 23, 2009 at 5:41 PM, Stephen C. Gilardi wrote: > >

Re: namespace concept

2009-01-23 Thread e
on. On Fri, Jan 23, 2009 at 7:12 PM, e wrote: > first explicit question: after the example lib and the bullets, I don't see > why there are two different keywords, "use" and "require". Just look at the > start of the sentences. They are identical. Why

Re: namespace concept

2009-01-23 Thread e
third: are there nested namespaces? I still don't really understand how to organize a project . . .best practices (and why they are the best practices) . . . whether or not there is actually any hard in having each lib just be one file. Thanks. On Fri, Jan 23, 2009 at 7:17 PM, e

Re: [DISCUSS] Use an Issue tracker?

2009-01-23 Thread e
top right of page sort of points to it. I have problems finding stuff, too. I just realized only now that the stuff in the top right has two columns. There's also the problem that there's google's wiki in code.google, and there's wikibooks wiki. I'll have to check out JIRA. I personally LOVE e

Re: namespace concept

2009-01-23 Thread e
On Fri, Jan 23, 2009 at 7:33 PM, Matt Moriarity wrote: > > 1) "use" and "require" differ in that use does what require does, > loads a library, but it also refers to the symbols in that lib in the > current namespace. So essentially if you want to use > clojure.contrib.def/defvar, if you (require

Re: Proposal: "smarter" set operations that take size into account for speed

2009-01-23 Thread e
> > (ns my-ns >(:use [clojure.set :exclude (difference)] > [clojure.contrib.set :only (difference)])) > Did you have to say ":exclude" or does the last thing override? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: A nil puzzle

2009-01-23 Thread e
> sented with the empty set, which doesn't seem right. > > For sequences in general, Rich has said there is no such thing as an > empty seq: > > > http://groups.google.com/group/clojure/browse_thread/thread/966bd0d4bb18a4a2/b56470cbc8b4123e?lnk=raot&fwc=1 > so the answer is you don't convert the i

Re: namespace concept

2009-01-23 Thread e
> > Ah hah! I finally understand something. See this is what would really > help in the explanation. Something like, "In Java, each file defines only a > single outer class, which must have the same name as the file. This simple > approach means that there is never any confusion that the last s

Re: namespace concept

2009-01-23 Thread e
hat extra stuff to their ns-map. Is that right? If so, stuff you only "require" is like an implementation detail, not part of your interface (in OO terms) ... or did I go to far with that analogy? Thanks again. On Fri, Jan 23, 2009 at 8:35 PM, Stephen C. Gilardi wrote: > > On Jan

Re: namespace concept

2009-01-23 Thread e
verywhere I see dots, that must be java code) On Fri, Jan 23, 2009 at 8:57 PM, Stephen C. Gilardi wrote: > > On Jan 23, 2009, at 8:21 PM, e wrote: > > Ah hah! I finally understand something. See this is what would really >> help in the explanation. Something like, "In Jav

Re: Regarding (.keySet {:a :map})

2009-01-23 Thread e
> > > > > Why? keySet is specified to return a java.util.Set, and that is what > > it does. set? tests for IPersistentSet. > > I assumed the persistent properties caried over, and that > IPersistentSet was a java.util.Set. I also assumed that IPersistentSet > extended IFn. > > Looks like I got the

Re: A nil puzzle

2009-01-24 Thread e
this may be a silly argument, but: (list? '()) returns true (list? nil) returns false (list? 'nil) returns false. I don't even know what it means. therefore nil isn't a list. Then again, I already chimed in. a list isn't a set. You said so in the introduction. Maybe set's need there own pr

Re: what's the difference between when and if?

2009-01-24 Thread e
thanks for putting these side by side so I could get an idea what when does. Up until now, when I see "when", my eyes have glazed over. Thus the only reason I need when is to read other people's code. Good question. Is there a reason to have when? On Sat, Jan 24, 2009 at 9:33 AM, wubbie wrote

Re: merge, not just for maps?

2009-01-24 Thread e
merge confused me, too. I was surprised to see in the docs that its input needn't be sorted (or have anything to do with lists) . . . .or maybe it merges unsorted things however, but where's the discussion of whether the result of merging two sorted list is a sorted list? Well, it's avoided beca

Re: what's the difference between when and if?

2009-01-24 Thread e
I use the philosophy, I've got this nice hammer with a nail remover on the back. It's a natural fit that sometimes you want to pull nails out in addition to hammering nails in. For those two jobs, I don't need to be walking around with a special nail-remover-only tool. and if has fewer character

Re: Agent as a processing queue

2009-01-24 Thread e
> Now you > wont be able to run this unless you modify Agent.java, search for > soloExectuor, make it public, and recompile Clojure. is this a code change people want to make? > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: merge, not just for maps?

2009-01-24 Thread e
rge #{1} 2) > > #{1 2} > > user=> (conj '(1) 2) > > (2 1) > > user=> (conj [1] 2) > > [1 2] > > user=> (conj #{1} 2) > > #{1 2} > > user=> (conj {:name "ryan"} {:age 25}) > > {:age 25, :name "ryan"} > > >

Re: A nil puzzle

2009-01-24 Thread e
> > I recommend people avoid these predicates as much as possible. But > what they do is clearly defined. I don't intend to add seqable?, and > sequence?, at least as we've discussed here. > > This sounds right to me, too, but I wonder if my reasons are the same. This isn't Eiffel. There's no sec

time lies, even with doall

2009-01-25 Thread e
The IRC channel folks helped me implement what we discovered was already called "separate" in contribs. My point was to do a partition that generated the two lists "(passes pred)" and "(fails pred)" in one pass without recursion. We ended up with: (defn filt-rem [pred coll] (loop [l1 () l2

Re: time lies, even with doall

2009-01-25 Thread e
urning to (time) without doing much . . . and if so, how can I force it to actually do the work? On Sun, Jan 25, 2009 at 11:04 AM, Emeka wrote: > Hi e, > > I'm still learning the basics, very much like you( I guess you are ahead of > me in Clojure). However, I have a question for you

Re: time lies, even with doall

2009-01-25 Thread e
oh, so anyway, i put it in that specific place because I wasn't sure if, without it, l1 would just be some sort of smart, lazy list that only exists when you start trying to get the values. I didn't think so, but, again, I'm just trying to shotgun the problem. On Sun, Jan 25, 200

Re: time lies, even with doall

2009-01-25 Thread e
ne because of the doruns? Do folks in the contrib group like this new implementation? On Sun, Jan 25, 2009 at 3:41 PM, Stuart Sierra wrote: > > Hi e, > > Most of the time is taken up by printing, which is why you see the > same times. Here's an example that gives the results yo

Re: time lies, even with doall

2009-01-25 Thread e
e, but in the case of filter and remove, "if" sounds better. I suggest breaking from the "filter" tradition and going with "retain-if" and "remove-if". On Sun, Jan 25, 2009 at 6:10 PM, Stephen C. Gilardi wrote: > > On Jan 25, 2009, at 5:24 PM, e wrot

Re: NewBie Q: doall forces eval and dorun not; but why?

2009-01-25 Thread e
interesting to me that <> wasn't used for anything to add to the "literal syntax". folks in another thread were using sequences for set theory. But maybe there needs to be a set notation. If that makes sense, {} should be sets, just like in math, <> should be vectors, just like in math, and [] c

Re: NewBie Q: doall forces eval and dorun not; but why?

2009-01-26 Thread e
t; Am 26.01.2009 um 06:05 schrieb e: > > interesting to me that <> wasn't used for anything to add to the "literal >> syntax". folks in another thread were using sequences for set theory. But >> maybe there needs to be a set notation. If that makes se

Re: what's the typical usage of fn constantly

2009-01-26 Thread e
you didn't beat it to death. I learned something. I also got confused. You identity implementation makes perfect sense. But even with your explanation, I'm still lost as to how the contrib one works. Lucky for me you brought this up so I can challenge myself to try to understand what's going on

Re: That Zipper thing

2009-01-31 Thread e
er. So if we have > the tree: > >A > / \ > B C > | / \ > D E F > > Then it's quite easy to navigate down the tree by picking a subtree. > So if we want to go down to C: > > C > / \ > E F > > But what if we want to go back up? We've

Re: meaning of coll

2009-02-01 Thread e
i was confused by the meaning of coll, too . . .even at a more basic level of not knowing that it meant collection. I even thought at first I was seeing "col1" or that the second lower('L') was a capitol(i). I read it as, "column one" in my head. Is it accurate to call it "some-seq" or something?

Re: what does -> mean?

2009-02-01 Thread e
I was able to work through the first two examples, and thanks for those. I will have to study maps more, I guess, to understand the last one. I don't know where 'x' came from: > > user=> (-> x :one :b) > 2 > > --~--~-~--~~~---~--~~ You received this message becau

Re: what does -> mean?

2009-02-01 Thread e
is there a definition of "thread" somewhere, and a definition of "form" somewhere? Thanks. On Sat, Jan 31, 2009 at 10:31 PM, Jason Wolfe wrote: > > On Jan 31, 7:09 pm, wubbie wrote: > > Hi, > > > > I saw in ants.clj a notation (->). > > what is it? > > For example, > > (defn place [[x y]] > >

Re: what does -> mean?

2009-02-01 Thread e
some answers here > also: > > > http://groups.google.com/group/clojure/browse_thread/thread/1f21663ea1ae9f58/ > > Kev > > On Feb 2, 2:29 am, Adrian Cuthbertson > wrote: > > Sorry! That should have read; > > (-> m :one :b) > > 2 > > > > >

Re: Clojure Library Documentation

2009-02-01 Thread e
i was talking about something related in the chat group, but I'm not good enough yet to implement it. I want to rewrite the doc method slightly in a way that would go a LONG way for newbies. The current way actually looks like java . . . like the parens are around the input params. But that's ju

Re: Strapped to the JVM?

2009-02-06 Thread e
What;s Ralph all about? You've certainly peaked *my* interest. Maybe we should get that running on top of a JVM so it doesn't go extinct again. On Fri, Feb 6, 2009 at 7:19 PM, mikel wrote: > > What happens to Clojure if something bad happens to the JVM? > > It's not that I think the JVM is goi

  1   2   3   4   >