practical compilation question

2010-02-22 Thread Robert McIntyre
Has anyone successfully gotten clojure to play well with eclipse in developing java code? By this I mean that the clojure code automatically compiles to class files the same way as java files in eclipse do, and the whole thing can then be packaged into a jar and made into a web start application?

documentation problem with Atom

2011-09-27 Thread Robert McIntyre
Just wanted to report that the documentation for atom misspells become as be come --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members

Re: Literate programming

2011-10-27 Thread Robert McIntyre
://aurellem.com/thoughts/html/man-years.html It's possible to automatically monitor the org files in a project, regenerate the html and source code whenever they are changed, and get a very tight write-debug-test cycle. Try it out it's fun! sincerely, --Robert McIntyre On Thu, Oct 27, 2011 at 8:52 PM, daly d

should partial accept a single argument?

2011-11-09 Thread Robert McIntyre
etc, and would help when using partial recursively. sincerely, --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

Re: Literate Programming in Emacs?

2011-12-07 Thread Robert McIntyre
/org-tools/ http://hg.bortreb.com/repl/ sincerely, --Robert McIntyre On Tue, Nov 29, 2011 at 7:31 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Haven't done any recently. A long, long time ago I wrote a Common Lisp FFI tool using a Literate Programming tool called noweb. It's so old

Re: clojure.contrib.seq vs. clojure.contrib.seq-utils

2010-12-04 Thread Robert McIntyre
. You must not ;; remove this notice, or any other, from this software. ;; Change Log ;; ;; DEPRECATED in 1.2. Some functions promoted to clojure.core and some ;; moved to c.c.seq --Robert McIntyre On Sun, Dec 5, 2010 at 12:04 AM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello everybody

Re: Why I'm getting StackoverflowError?

2010-12-05 Thread Robert McIntyre
(list-length (next col))) 0)) #'rlm.dna-melting/list-length rlm.dna-melting (list-length (range 5)) 5 hope that helps, --Robert McIntyre On Sun, Dec 5, 2010 at 4:52 PM, HB hubaghd...@gmail.com wrote: Hi, I'm trying to write a function that calculates the length of a list: (defn list-length

math utilities question

2010-12-05 Thread Robert McIntyre
recommendations you might have. --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post

Re: parameters destructuring sets?

2010-12-05 Thread Robert McIntyre
might change. If seq on a set always returns a seq with the same order, then that may limit the future efficiency of sets. --Robert McIntyre On Sun, Dec 5, 2010 at 8:08 PM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: +1 to what Ken said Sunil On Mon, Dec 6, 2010 at 4:04 AM, Ken Wesson

Re: math utilities question

2010-12-05 Thread Robert McIntyre
you find helpful to use? --Robert McIntyre On Sun, Dec 5, 2010 at 9:36 PM, Ken Wesson kwess...@gmail.com wrote: On Sun, Dec 5, 2010 at 6:27 PM, Robert McIntyre r...@mit.edu wrote: I'm trying to use clojure for scientific data analysis but I keep running into lacunas of functionality. I'd love

Re: math utilities question

2010-12-06 Thread Robert McIntyre
I have looked at incanter and like it very much, but these are all things that incanter can't currently do. --Robert McIntyre On Mon, Dec 6, 2010 at 3:15 AM, Saul Hazledine shaz...@gmail.com wrote: On Dec 6, 12:27 am, Robert McIntyre r...@mit.edu wrote: I'm trying to use clojure for scientific

Re: Lots of newbie clojure questions

2010-12-06 Thread Robert McIntyre
defrecord to make your own java objects. Hope you have fun, --Robert McIntyre On Mon, Dec 6, 2010 at 8:40 PM, Stuart Halloway stuart.hallo...@gmail.com wrote: 1. Isn't the world actually imperative? And mutable? Collaboration *is* a messy proposition in real life. It's hard to fix your car

Re: Lots of newbie clojure questions

2010-12-06 Thread Robert McIntyre
@javajosh You're speaking of the Turing description of computation, you might be interested in Church's lambda calculus description which works just as well and doesn't use mutability to describe computation, --Robert McIntyre On Mon, Dec 6, 2010 at 9:08 PM, javajosh javaj...@gmail.com wrote

Re: complex number library

2010-12-13 Thread Robert McIntyre
It's not a protocol, but you may want to take a look at clojure.contrib.generic.arithmetic for inspiration. I wish you luck in your complex number implementation! I've done my own using clojure.contrib.generic and can post if it anyone's interested. thanks, --Robert McIntyre On Mon, Dec 13

Re: aliasing symbols from clojure core

2010-12-13 Thread Robert McIntyre
you can always do (def c+ clojure.core/+) right after the namespace declaration. --Robert McIntyre On Mon, Dec 13, 2010 at 10:20 PM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello everybody, I am defining a protocol which defines the functions +,-,*,/ .. so I am excluding those

Re: complex number library

2010-12-13 Thread Robert McIntyre
implementation. --Robert McIntyre On Mon, Dec 13, 2010 at 10:27 PM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Robert would love to see your implementation.. The reason I am going for protocols .. is performance... Sunil. On Tue, Dec 14, 2010 at 8:52 AM, Robert McIntyre r

Re: Moderately off-topic: installing emacs on OSX

2010-12-13 Thread Robert McIntyre
if other things aren't working out. sincerely, --Robert McIntyre On Mon, Dec 13, 2010 at 11:12 PM, javajosh javaj...@gmail.com wrote: Aha! You're a genius! On Dec 13, 8:06 pm, gaz jones gareth.e.jo...@gmail.com wrote: homebrew installs a mac application to: /usr/local/Cellar/emacs/23.2/Emacs.app

Re: aliasing symbols from clojure core

2010-12-14 Thread Robert McIntyre
Not to sound like a one track record here, but you should look at clojure.contrib.generic.arithemetic to see how to redefine / have a great day, --Robert McIntyre On Tue, Dec 14, 2010 at 4:26 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 14.12.2010 um 04:25 schrieb Sunil S Nandihalli

eclipse and emacs?

2010-12-15 Thread Robert McIntyre
I'm trying to move between emacs and eclipse, and was wondering the following: When I change code in eclipse, how do I get those changes to propagate to the repl without restarting? sorry if this is vague --Robert McIntyre -- You received this message because you are subscribed

Re: eclipse and emacs?

2010-12-15 Thread Robert McIntyre
outside eclipse? --Robert McIntyre On Wed, Dec 15, 2010 at 5:54 PM, Laurent PETIT laurent.pe...@gmail.com wrote: 2010/12/15 Robert McIntyre r...@mit.edu I'm trying to move between emacs and eclipse, and was wondering the following: When I change code in eclipse, how do I get those changes

Re: Looking for a better way

2010-12-15 Thread Robert McIntyre
no need to use macros at all: (defn foo creates a symbol named s with the value s in the current namespace [s] (intern *ns* (symbol s) s)) that is, assuming I got the use case right. --Robert McIntyre On Wed, Dec 15, 2010 at 8:00 AM, Laurent PETIT laurent.pe...@gmail.com wrote: 2010/12/15

Re: currying in clojure for fixed number of arg functions

2010-12-17 Thread Robert McIntyre
think it might be a good enhancement of the partial function, as it logically flows from the other airties. Do people think it would be a good patch for core? Please tell me what you think of my code :) All criticisms are welcome; I too am still learning. Sincerely, --Robert McIntyre On Fri, Dec

Re: about the repl

2010-12-17 Thread Robert McIntyre
with emacs and clojure. Hope that helps, --Robert McIntyre On Sat, Dec 18, 2010 at 1:45 AM, tor torgau...@gmail.com wrote: Hi, I have a couple of questions. If I start listing an infinite sequence in the repl and the press ctrl-c, I always exit to bash. Is there a way to interrupt without

Re: about the repl

2010-12-18 Thread Robert McIntyre
Well even if you don't like emacs it still serves as a decent repl :) Also if you don't like emacs you might try the eclipse counterclockwise plugin --- it has a nice repl too. good luck, --Robert McIntyre On Sat, Dec 18, 2010 at 2:56 AM, tor torgau...@gmail.com wrote: Thanks for the quick

Re: Waiting for agents

2010-12-18 Thread Robert McIntyre
That's brilliant. Has anyone considered targeting clojure for LaTeX3?Numerical support for one would be simplified, since LaTeX3 just uses actual rational numbers as its default instead longs or ints or whatever. This could be big, guys! --Robert McIntyre On Sat, Dec 18, 2010 at 12:19 PM

Re: about the repl

2010-12-18 Thread Robert McIntyre
The rlwrap method is very cool, but I can't seem to get ctrl-C to work (it still quits to the terminal) any advice? --Robert McIntyre On Sat, Dec 18, 2010 at 3:01 PM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: On Fri, 17 Dec 2010 22:45:01 -0800 (PST) tor torgau...@gmail.com

Re: about the repl

2010-12-18 Thread Robert McIntyre
That's really cool and has been added to my standard system stuff :) --Robert McIntyre On Sat, Dec 18, 2010 at 6:46 PM, Alex Osborne a...@meshy.org wrote: Stuart Sierra the.stuart.sie...@gmail.com writes: If your REPL implementation runs each command in a new Thread (as most of them do, I

Re: defmethod/defmulti should dispatch on the new arguments when we call the recur..?

2010-12-19 Thread Robert McIntyre
multimethod) ? --Robert McIntyre On Sun, Dec 19, 2010 at 10:52 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 19.12.2010 um 16:46 schrieb Ken Wesson: If we had a (resolve-method multi args) that resolved dispatch and then returned a fn that would call the method with those same args -- so

get the total memory used by a data structure?

2010-12-22 Thread Robert McIntyre
to work for any clojure data structure? just like (time), I think (total-memory) would be very enlightening for basic testing. sincerely, --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Knuth's literate programming tangle function in Clojure

2010-12-26 Thread Robert McIntyre
or texmacs? Is there some sort of lisp-pamphlet mode that could be extended to clojure? I'm assuming you've already solved all these problems and more while working with Axiom. I'd appreciate any pointers or best practices you might have found. Thanks so much for your work! --Robert McIntyre On Sun

Re: printf output from threads

2010-12-27 Thread Robert McIntyre
;;true ;;doesn't work (Thread. nil) ;;works (Thread. ((fn [a b c] (sleeper-thread a b c)) *out* 2 (+ 2000 (rand-int 5000 ;;works (Thread. ((fn []))) How can you make a Thread with ((fn [])) when (= ((fn [])) nil) sincerely, --Robert McIntyre On Tue, Dec 28, 2010 at 1:45 AM

Re: printf output from threads

2010-12-27 Thread Robert McIntyre
))) true mailing-list.print-from-threads all of these things are referentially transparent, so how is clojure differentiating between things that evaluate to nil and nil itself? sincerely, --Robert McIntyre On Tue, Dec 28, 2010 at 2:29 AM, Robert McIntyre r...@mit.edu wrote: Your problem is caused

Re: printf output from threads

2010-12-28 Thread Robert McIntyre
seems there's no type hint required: (def t nil) (Thread. t) also works... How are you able to determine that it's calling the String constructor? --Robert McIntyre On Tue, Dec 28, 2010 at 3:08 AM, Alex Osborne a...@meshy.org wrote: Robert McIntyre r...@mit.edu writes: what the heck

Re: Clojure in Small Pieces -- Literate Clojure

2010-12-31 Thread Robert McIntyre
for starting on this; best of luck, Sincerely, --Robert McIntyre On Fri, Dec 31, 2010 at 2:07 AM, Mark Engelberg mark.engelb...@gmail.com wrote: I find this exciting!  Thanks for starting this. -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: an object of class created using defrecord does not implement IFn .. while it behaves very similar to map otherwise ..

2010-12-31 Thread Robert McIntyre
Be sure to also implement the version of get which takes a not-found argument so that your objects will work with map code which uses this functionality. (defrecord map-like-object [field-1 field-2 etc] clojure.lang.IFn (invoke [this k] (get this k)) (invoke [this k not-found] (get this k

Re: Compiling dynamically created namespaces, without on-disk source code?

2011-01-01 Thread Robert McIntyre
the `(binding [*compile-files* true] ...)` trick does not seem to work for me. Still looking for something that does. What do you mean by the bytecode is no longer accessible ? Wouldn't it have to be in there somewhere in order to use the definition? thank you, --Robert McIntyre On Thu, Dec

Re: The non-Enclojure Clojure plugin homepages are all rather hard to find.

2011-01-03 Thread Robert McIntyre
for making a great plugin for eclipse. Sincerely, --Robert McIntyre On Mon, Jan 3, 2011 at 3:27 AM, Ken Wesson kwess...@gmail.com wrote: On Mon, Jan 3, 2011 at 1:25 AM, Sean Corfield seancorfi...@gmail.com wrote: On Sun, Jan 2, 2011 at 7:41 PM, Ken Wesson kwess...@gmail.com wrote: Because from its

Re: Knuth's literate programming tangle function in Clojure

2011-01-04 Thread Robert McIntyre
Just discovered org-mode myself --- does anyone know of guide to using it with clojure for a total newbie? sincerely, --Robert McIntyre On Tue, Jan 4, 2011 at 9:57 AM, Hubert Iwaniuk neo...@kungfoo.pl wrote: Hi Seth, Yes I did play with org-mode + babel for clojure. It works great :-) Just

Re: Knuth's literate programming tangle function in Clojure

2011-01-04 Thread Robert McIntyre
the # is a reader macro for regexes. hope that helps, --Robert McIntyre On Tue, Jan 4, 2011 at 11:18 AM, Tim Daly d...@axiom-developer.org wrote:  The latest version of clojure.pamphlet can build Clojure directly from the book. It dynamically builds the source tree from the book, runs tests

Re: Knuth's literate programming tangle function in Clojure

2011-01-08 Thread Robert McIntyre
You may find http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/ useful for a clear explanation of PersistentVectors. Maybe even get in touch with the guy for an addition to the book? Thanks for your work on a literate clojure. sincerely, --Robert

Re: Clojure Quizzes?

2011-01-11 Thread Robert McIntyre
it all in an executable jar? Can I use a pure java implementation of bzip and tar without calling out to the system's tar command? (I'm bortreb on coderloop btw) sincerely, --Robert McIntyre On Tue, Jan 11, 2011 at 9:17 PM, Sean Corfield seancorfi...@gmail.com wrote: Ah, that does look like more

Re: Clojure Quizzes?

2011-01-11 Thread Robert McIntyre
hurrr. teh codes are at https://gist.github.com/775623 sorry for leaving that out. I'm rather new at this; all criticisms are welcome. ---Robert McIntyre On Tue, Jan 11, 2011 at 10:07 PM, Robert McIntyre r...@mit.edu wrote: Coderloop is a lot of fun.  I'm wondering how people are submitting

Re: Clojure Quizzes?

2011-01-12 Thread Robert McIntyre
They seem to allow you to include anything in a lib directory that you'd want. I sometimes include apache commons-io and clojure-contrib1.2 without any problems. I also included a sql connection library for one of the problems, so it seems fine :) --Robert McIntyre On Thu, Jan 13, 2011 at 2:00

Re: Compiling dynamically created namespaces, without on-disk source code?

2011-01-13 Thread Robert McIntyre
On a related note, is there any way to completely clear all the bytecode that's being stored internally by the jvm, forcing it to fall back to the hard-disk version of the classfiles available on the classpath? sincerely, --Robert McIntyre On Tue, Jan 11, 2011 at 5:04 PM, Stuart Sierra

Re: Clojure Quizzes?

2011-01-13 Thread Robert McIntyre
/ sincerely, --Robert McIntyre On Thu, Jan 13, 2011 at 10:07 PM, Ken Wesson kwess...@gmail.com wrote: On Thu, Jan 13, 2011 at 10:04 PM, John Svazic jsva...@gmail.com wrote: They do seem to allow whatever you like if you upload your own package.  I'm hooked on using their built-in editor, so in some cases

Re: how can I dispatch on [[F ..

2011-01-14 Thread Robert McIntyre
How about (def float-2D (class (make-array Float/TYPE 1 1)))? sincerely, --Robert McIntyre On Fri, Jan 14, 2011 at 4:07 AM, Ken Wesson kwess...@gmail.com wrote: On Fri, Jan 14, 2011 at 3:53 AM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello Everybody,  I would like to know

Re: Clojure Quizzes?

2011-01-17 Thread Robert McIntyre
to be an executable file at the base of the directory. You can still always go the shell script route if you don't like the embedding trick. This technique is common with emacs-lisp to make things executable. Hope that helps. sincerely, --Robert McIntyre On Sun, Jan 16, 2011 at 9:56 PM, Stuart Campbell stu

Re: Clojure Quizzes?

2011-01-17 Thread Robert McIntyre
for you! Try it --- you'll see that the standard shebang line just doesn't work for most project setups. Embedding shell gets around all these problems. sincerely, --Robert McIntyre On Tue, Jan 18, 2011 at 12:03 AM, Alan a...@malloys.org wrote: On Jan 17, 7:42 am, Robert McIntyre r...@mit.edu wrote

Ridiculously massive slowdown when working with images

2011-01-28 Thread Robert McIntyre
shed some light on what I'm doing wrong? sincerely, --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient

Re: Ridiculously massive slowdown when working with images

2011-01-28 Thread Robert McIntyre
thanks everyone. sincerely, --Robert McIntyre On Fri, Jan 28, 2011 at 1:07 PM, Ken Wesson kwess...@gmail.com wrote: On Fri, Jan 28, 2011 at 12:55 PM, Benny Tsai benny.t...@gmail.com wrote: It seems that 'unchecked-add' returns a primitive (note that in the first version, 'recur' happily accepts

Re: Ridiculously massive slowdown when working with images

2011-01-28 Thread Robert McIntyre
David, thanks for your suggestions. I copied your code and tested it out, but on my machine it takes 230 milliseconds while the java version takes about 3. If it's not too much trouble, how long does the java implementation take on your machine? sincerely, --Robert McIntyre On Fri, Jan 28

Re: Help with Java arrays

2011-01-28 Thread Robert McIntyre
#MixerMidiChannel com.sun.media.sound.MixerMidiChannel@1ceb175 #MixerMidiChannel com.sun.media.sound.MixerMidi\ Channel@e4b7d3 #MixerMidiChannel com.sun.media.sound.MixerMidiChannel@1e09de7 #MixerMidiChannel com.sun.media.sound.MixerMidiChannel@19eb5f6) Maybe that's helpful :P I hope. good luck, --Robert

Re: Help with Java arrays

2011-01-28 Thread Robert McIntyre
oh and of course (import 'javax.sound.midi.MidiSystem) before everything. sorry about that. sincerely, --Robert McIntyre On Fri, Jan 28, 2011 at 2:47 PM, Robert McIntyre r...@mit.edu wrote: On my computer this seemed to work. (import 'javax.sound.midi.Synthesizer) (seq (.getChannels

Re: Ridiculously massive slowdown when working with images

2011-01-28 Thread Robert McIntyre
I'm running my JVM with: -verbose:gc -Xmn500M -Xms2000M -Xmx2000M -server sincerely, --Robert McIntyre On Fri, Jan 28, 2011 at 4:24 PM, Benny Tsai benny.t...@gmail.com wrote: Hi Robert, Just out of curiosity, are you running Clojure with the -server option?  When I run David's code

Re: How to disallow unlisted optional argument keys?

2011-01-29 Thread Robert McIntyre
you could do something like this, but I'm curious --- why do you want to restrict the function's inputs in this way? (defn hello [ {:keys [a b] :as input}] (assert (= (set (keys input)) #{:a :b})) hello) sincerely, --Robert McIntyre On Sat, Jan 29, 2011 at 1:19 PM, Shantanu Kumar kumar.shant

Re: How to disallow unlisted optional argument keys?

2011-01-29 Thread Robert McIntyre
}] (dorun (map #(eval `(assert (#{:a :b} (quote ~% (keys input))) hello) I'd be curious what the right way to to this is. sincerely, --Robert McIntyre On Sat, Jan 29, 2011 at 4:15 PM, Shantanu Kumar kumar.shant...@gmail.com wrote: On Jan 30, 1:26 am, Robert McIntyre r

Re: Ridiculously massive slowdown when working with images

2011-01-30 Thread Robert McIntyre
That's excellent. Thank you everyone. Maybe someone could compile all these let's speed up this clojure code threads and put it somewhere as a valuable resource we could point to when things like this come up again? sincerely, --Robert McIntyre On Sun, Jan 30, 2011 at 1:01 PM, David Nolen

Re: How to disallow unlisted optional argument keys?

2011-01-31 Thread Robert McIntyre
You win sir. That is the most beautiful way. sincerely, --Robert McIntyre On Sun, Jan 30, 2011 at 7:59 PM, Bill James w_a_x_...@yahoo.com wrote: Alexander Yakushev wrote: Why not use a constraint? It looks much cleaner. (defn hello [ {:keys [a b] :as input}]          {:pre [(= (set (keys

Re: Transpose

2011-02-03 Thread Robert McIntyre
That's a good one, on par with the one line low-pass filter: ;; filter noise ;;(http://clojure-log.n01se.net/date/2009-10-13.html by ambient ;;this is such a cool transform!!! (defn lo-pass [d coll] (reductions #(+ (* %2 d) (* %1 (- 1.0 d))) coll)) sincerely, --Robert McIntyre On Thu

question about gen-class

2011-02-03 Thread Robert McIntyre
. How can I make a null safe function with gen-class? sincerely, --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

Re: Matrix transform

2011-02-04 Thread Robert McIntyre
Could you possibly put up a minimal example of code that shows the problem? I'm having a hard time following exactly what you're doing but would like to help. :) sincerely, --Robert McIntyre On Fri, Feb 4, 2011 at 10:20 AM, Nick npatric...@gmail.com wrote: I've got a matrix transformation

Re: Get digits of a number

2011-02-17 Thread Robert McIntyre
I normally use (defn digits [n] (map #(Integer/parseInt (str %)) (seq (str n You can adapt it to read in different bases easily. sincerely, --Robert McIntyre On Thu, Feb 17, 2011 at 9:45 PM, Matthew Boston matthew.bos...@gmail.com wrote: How about using the Java api Character

Re: [noob] porting an old project - where to begin?

2011-06-04 Thread Robert McIntyre
have tried to use it for a pseudo 2D/3D sort of game and if anyone could tell you what really works in java/clojure it's the people on the message boards there. sincerely, --Robert McIntyre On Sat, Jun 4, 2011 at 3:24 AM, Daniel doubleagen...@gmail.com wrote: I suppose the noob tag

Re: Reducers

2012-05-15 Thread Robert McIntyre
There's a right parenthesis missing at http://clojure.com/blog/2012/05/15/anatomy-of-reducer.html : Now: (reduce + 0 (map inc [1 2 3 4])) ;;becomes (reduce + 0 (reducer [1 2 3 4] (mapping inc)) MISSING PAREN under the heading Reducers sincerely, --Robert McIntyre, Dylan Holmes On Tue, May

Why the mix of dot syntax in clojure.core?

2010-08-22 Thread Robert McIntyre
, especially for beginners? --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post

Re: AOT compilation newbie mistakes

2010-08-22 Thread Robert McIntyre
around. It shows how to compile stuff from the command line and the REPL and how to make shell-scripts. happy coding, --Robert McIntyre On Sun, Aug 22, 2010 at 2:39 PM, Isaac Gouy igo...@yahoo.com wrote: $ /usr/local/src/jdk1.6.0_18/bin/java -cp .:clojure.jar clojure.main Clojure 1.2.0 user

What is the best way to parasitically invade a java project with clojure goodness?

2010-08-23 Thread Robert McIntyre
with an eclipse plugin or something?)) --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post

Re: AOT compilation newbie mistakes

2010-08-23 Thread Robert McIntyre
oh yes -- please don't do it manually for anything production But, it's good to know what's actually going on behind the scenes, especially when things stop working :) --Robert McIntyre On Sun, Aug 22, 2010 at 7:05 PM, Wilson MacGyver wmacgy...@gmail.com wrote: On Sun, Aug 22, 2010 at 2:39 PM

Re: Where is (re? x)

2010-08-23 Thread Robert McIntyre
I think the re? definition might belong around line 447 of core with the rest of the more normal looking instance? functions. On Mon, Aug 23, 2010 at 1:27 PM, Sean Devlin francoisdev...@gmail.com wrote: Be very careful when copying the style of clojure.core.  There are a lot of non-standard

Re: Clojure 1.2 and the Computer Language Benchmarks Game

2010-08-23 Thread Robert McIntyre
, they aren't traversed in lexical order, but whatever order the original implementation used. :( --Robert McIntyre On Mon, Aug 23, 2010 at 10:07 PM, ataggart alex.tagg...@gmail.com wrote: It's never been clear to me exactly what the code is supposed to be do. For example, the spec for the binary-tree

Re: Does Clojure has a compiler

2010-08-25 Thread Robert McIntyre
Yes, clojure has a compiler that can compile directly to class files. There's more information here: http://clojure.org/compilation and a short demo that you can try here: http://www.rlmcintyre.com/iassac-gouy.tar.bz2 or http://www.bortreb.com/iassac-gouy.tar.bz2 --Robert McIntyre On Wed, Aug

Re: where did I read that?

2010-08-28 Thread Robert McIntyre
-yeah! mobius.physics (read-oh-yeah!) [(vector 1 2 3) 14] mobius.physics (read-oh-yeah!) [(list 5 6) 25] is that what you're going for? please tell me how I can improve this! --Robert McIntyre On Sat, Aug 28, 2010 at 1:26 AM, evins.mi...@gmail.com evins.mi...@gmail.com wrote: I'm working

Re: Is it possible in theory to write/modify a Clojure compiler that doesn't

2010-08-29 Thread Robert McIntyre
Has anyone actually implemented this sort of placeholder strategy before? --Robert McIntyre On Sat, Aug 28, 2010 at 3:04 PM, Michael Wood esiot...@gmail.com wrote: On 28 August 2010 19:27, Michał Marczyk michal.marc...@gmail.com wrote: On 28 August 2010 19:19, Luke VanderHart luke.vanderh

Re: where did I read that?

2010-08-29 Thread Robert McIntyre
correctness in all cases. So the proxy needs about 3-5 more methods to be a complete covering. you wouldn't want me to do (.skip reader 5) and have *current-char-number* become wrong! The perils of mutable state are made of this... :( From a code reuse standpoint, isn't this kinda lame? --Robert

Re: Is it possible in theory to write/modify a Clojure compiler that doesn't

2010-08-29 Thread Robert McIntyre
where you could do this in a streamlined way in eclipse, so that everyone else on the project can focus on the concepts behind the program, not trivial minutiae like compile order. --Robert McIntyre On Sun, Aug 29, 2010 at 4:46 PM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 28.08.2010 um 19:09

Re: Problem reloading source file with imports

2010-08-30 Thread Robert McIntyre
. --Robert McIntyre On Mon, Aug 30, 2010 at 5:54 AM, Chris Jenkins cdpjenk...@gmail.com wrote: Since I switched to Clojure 1.2, I see an error message whenever I try to reload a source file that imports anything. The error message is of the form already refers to xxx, as though

Re: Help speed up an inner loop?

2010-08-30 Thread Robert McIntyre
. The java program seems to be incorrectly reporting it's time. --Robert McIntyre On Mon, Aug 30, 2010 at 4:03 PM, tsuraan tsur...@gmail.com wrote: Just to try to see if clojure is a practical language for doing byte-level work (parsing files, network streams, etc), I wrote a trivial function

Re: Problem reloading source file with imports

2010-08-30 Thread Robert McIntyre
other clojure modules then reloading works fine but, if it imports anything, then the second (load-file...) fails. On 30 August 2010 11:05, Robert McIntyre r...@mit.edu wrote: Yeah, they changed that from clojure 1.1 and it's really annoying --- as far as I know, your only options right now

Re: Help speed up an inner loop?

2010-08-31 Thread Robert McIntyre
countnl-lite takes ~46 msecs The java method takes ~19 msecs. I've lost a factor of 2.25 somewhere and it makes me sad that I can't find it. I would be very interested if anyone could improve countnl-lite. --Robert McIntyre On Mon, Aug 30, 2010 at 8:41 PM, Alan a...@malloys.org wrote: I think

Re: union using a comparison function

2010-09-02 Thread Robert McIntyre
By union do you mean union as in sets, or just smashing the two lists together? --Robert McIntyre On Thu, Sep 2, 2010 at 11:10 AM, mlimotte mslimo...@gmail.com wrote: Hi. I'd like to do a union of some sequences using my own comparison function.  Similar to supplying a Comparator in Java

Re: Mapping a function to a map

2010-09-06 Thread Robert McIntyre
] instead of [key val] and ignoring the key. --Robert McIntyre On Mon, Sep 6, 2010 at 12:06 PM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote:  (clojure.walk/walk (fn [[key val]] [key (* 2 val)]) identity {:a 1 :b 2}) On Mon, Sep 6, 2010 at 9:26 PM, Sunil S Nandihalli sunil.nandiha

Re: Mapping a function to a map

2010-09-06 Thread Robert McIntyre
I thought that since into uses reduce, it would be lazy, but I was wrong. reduce just plows through everything with a non-lazy recursion. Why is reduce not lazy? --Robert McIntyre On Mon, Sep 6, 2010 at 12:37 PM, Michał Marczyk michal.marc...@gmail.com wrote: On 6 September 2010 18:29, Robert

Re: Mapping a function to a map

2010-09-06 Thread Robert McIntyre
Why is it that clojure maps aren't lazy though? Wouldn't that be just as useful an abstraction as lazy sequences? Aren't map really just lists of pairs in the end anyway? --Robert McIntyre On Mon, Sep 6, 2010 at 1:19 PM, Michał Marczyk michal.marc...@gmail.com wrote: On 6 September 2010 18:49

clojure Image/video processing?

2010-09-06 Thread Robert McIntyre
, and has anyone found something that just wins over everything? --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

Re: clojure Image/video processing?

2010-09-06 Thread Robert McIntyre
with these recommendations I'll put that up too. thanks a lot, --Robert McIntyre On Mon, Sep 6, 2010 at 9:43 PM, Marc Downie m...@openendedgroup.com wrote: On Mon, Sep 6, 2010 at 5:45 PM, Sean Grove otokora...@gmail.com wrote: On Sep 6, 2010, at 2:57 PM, Robert McIntyre wrote: I was wondering if anyone has

Re: 2 lein swank instances on same project and compiling src from emacs

2010-09-07 Thread Robert McIntyre
I don't think you can do that, but you can connect to the same swank instance twice with M-x slime-connect and function updates will be reflected in both repls. --Robert McIntyre On Tue, Sep 7, 2010 at 8:54 PM, HiHeelHottie hiheelhot...@gmail.com wrote: I have two lein swanks going

Re: Documentation tools

2010-09-08 Thread Robert McIntyre
is the new value and returns a new nested structure. If any levels do not exist, hash-maps will be created. Example: (assoc-in {} [:a :B] 5) {:a {:B 5}} ? --Robert McIntyre On Wed, Sep 8, 2010 at 3:05 AM, Sean Corfield seancorfi...@gmail.com wrote: On Tue, Sep 7, 2010 at 11:10

Re: Generating functions programmatically

2010-09-10 Thread Robert McIntyre
(ultra-synth hi [:a :b]) #'thunderbolt.play/hib thunderbolt.play (hia 5) true --Robert McIntyre On Fri, Sep 10, 2010 at 6:17 PM, Alan a...@malloys.org wrote: PS this is super-ugly and I'm always embarrassed when I find myself using eval in a lisp. While this works, I'd love it if someone could

Re: Generating functions programmatically

2010-09-10 Thread Robert McIntyre
there's always apply-macro from contrib for doing perverse stuff like that, so you don't have to *see* eval if you don't want to :) --Robert McIntyre On Fri, Sep 10, 2010 at 8:24 PM, icemaze icem...@gmail.com wrote: I agree: eval never looks pretty. -- You received this message because you

Re: Generating functions programmatically

2010-09-10 Thread Robert McIntyre
That is very elegant but has the exact same problem in that the macro must be called on a literal vector of keywords. --Robert McIntyre On Fri, Sep 10, 2010 at 5:41 PM, Btsai benny.t...@gmail.com wrote: This is probably not the prettiest way to do it, but I think it gets the job done: (defn

what's up with user.clj?

2010-09-11 Thread Robert McIntyre
with this? --Robert McIntyre and user.clj reads like this -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post

Re: ns-unmap-all

2010-09-12 Thread Robert McIntyre
shouldn't we rename remove-ns to ns-remove to keep it in line with the other ns functions? --Robert McIntyre On Sun, Sep 12, 2010 at 4:18 PM, Phil Hagelberg p...@hagelb.org wrote: On Sat, Sep 11, 2010 at 6:48 PM, blais martin.bl...@gmail.com wrote: The following function has been a real

Re: Quirk of Map destructuring

2010-09-12 Thread Robert McIntyre
be underlaid with the actual map being used to call the function? --Robert McIntyre On Sun, Sep 12, 2010 at 9:21 PM, Tom Hicks hickstoh...@gmail.com wrote: I just noticed this unexpected result for Map destructuring with an quote:or/quote directive: pre user= (def guys-name-map {:f-name Guy :l-name

Re: Quirk of Map destructuring

2010-09-13 Thread Robert McIntyre
writing it. I'm wondering why the symbol route was selected when the merge way may be more convenient, or why there's something really bad about the merge way that I'm overlooking. --Robert McIntyre On Mon, Sep 13, 2010 at 1:08 PM, Mark Nutter manutte...@gmail.com wrote: On Mon, Sep 13, 2010 at 12

Re: Clojure meetup group listing

2010-09-23 Thread Robert McIntyre
Are there any clojure groups around Boston, MA? --Robert McIntyre On Tue, Sep 21, 2010 at 12:43 PM, Sean Corfield seancorfi...@gmail.com wrote: The Bay Area Clojure User Group had its 25th meeting last night: http://www.meetup.com/The-Bay-Area-Clojure-User-Group/ It was a great meeting

Re: An Emacs command to close the various balanced expressions in Clojure

2010-09-26 Thread Robert McIntyre
Thank you blais --- I also have troubles with paredit and this function will really help me out. keep up the good work, --Robert McIntyre On Sun, Sep 26, 2010 at 8:19 PM, Tassilo Horn tass...@member.fsf.org wrote: Hi, did you already try out paredit [1]?  That mode is absolutely fabulous

Re: functions left over in the vm

2010-09-26 Thread Robert McIntyre
(println NUKING namespace (quote ~current-ns#)) (clojure.lang.Namespace/remove (quote ~current-ns#)) (ns ~current-ns#) (defmacro reload [] `(do (use :reload-all (quote ~(symbol (str *ns*)) --Robert McIntyre On Sun, Sep 26, 2010 at 5:56 PM, Michael Ossareh ossa

Re: New Release of the Clojure Debugging Toolkit

2010-10-08 Thread Robert McIntyre
not working for you, please post the exact command you are using to invoke java, as well as a listing of all jars on your classpath, and I'll try to help some more. Good luck, --Robert McIntyre 2010/10/8 limux liumengji...@gmail.com: I do a full source install of clojure follow by the article Emacs

Re: a macro

2010-10-13 Thread Robert McIntyre
I'm still a little confused as to what you're trying to do, but is this what you're looking for? (defmacro zzz [form] (first form)) (defmacro eval-zzz [form] `(zzz ~(eval form))) rlm.play-all (zzz (range 1 2)) #core$range clojure.core$ra...@61e066 rlm.play-all

Incorrect behaviour for large s-expressions :(

2010-11-13 Thread Robert McIntyre
battle!!! :( Pls. help! --Robert McIntyre -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe

  1   2   >