Re: clojure-test-mode elpa version still out of date?

2010-09-14 Thread alux
Just if any one is gets the same problem: I updated slime and slime- repl to the 20100404 version, and everything works again. Regards, alux PS.: For completeness: swank-clojure version 1.1.0 On 11 Sep., 12:40, alux alu...@googlemail.com wrote: Hello Bruce, would you please provide

Re: clojure-test-mode elpa version still out of date?

2010-09-11 Thread alux
) (Btw.: Is there a way to uninstall stuff with ELPA?) Thank you, alux On 10 Sep., 21:56, Bruce Durling b...@otfrom.com wrote: Hi, On Fri, Sep 10, 2010 at 18:15, User7 userseven...@gmail.com wrote: I'm using emacs starter kit and clojure-test-mode 1.4 installed using elpa.  Running clojure

Re: testing local functions?

2010-09-10 Thread alux
. Greetings, alux On 10 Sep., 13:39, James Reeves jree...@weavejester.com wrote: On 10 September 2010 12:24, alux alu...@googlemail.com wrote: I always thought it to be good style to make helper functions only as visible as needed, e.g. by using letfn. But when I want to test my code, I just

Re: testing local functions?

2010-09-10 Thread alux
Brian, thats way cool! (I still have to think this through, thats high magic!) Thank you for sharing this, and kind regards, alux On 10 Sep., 21:04, Brian Marick mar...@exampler.com wrote: I've worked out a way to test local functions. When I tried it out by hand, it felt good. See here:http

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread alux
, comments are welcome :) Thank you all, and kind regards, alux On 9 Sep., 20:40, lprefonta...@softaddicts.ca wrote: The major thing that made me used macros as much as possible when available in any language was writing assembly code. Not 100 lines projects, 20,000 and above, mainly made

A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
problems with this metaphor, is it misleading somewhere? Thank you, alux -- 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: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hello Joop, thanks for the link. So it seems not to be completely misled ;-) Greetings, alux On 8 Sep., 11:59, Joop Kiefte iko...@gmail.com wrote: Actually, this metaphor has been used before. Checkhttp://www.defmacro.org/ramblings/lisp.htmlfor an other version of your story ;). 2010/9/8

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hi Patrick, yes, I think thats the right way to teach this stuff. My problem arises earlier - I still have to motivate my collegues, to get them interested, and, maybe, teach them later ;-) Regards, alux On 8 Sep., 16:28, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way

Re: deftype makes no extender?

2010-09-08 Thread alux
Hi Stu, I like your open dispatch club ;-) Yes, after some thinking this is rather clear - every single something had to be scanned whether it implements a protocol; ehm, and rescanned when a new protocol is defined. Well, I drop that request ;-) Thank you for the illumination, alux On 8 Sep

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
) is the only reason: We directly write the abstract syntax tree, because this is the way we can introduce new syntax ourself. Thats why I think to need this metaphor. Thank you, and kind regards, alux On 8 Sep., 17:19, Meikel Brandmeyer m...@kotka.de wrote: Hi, On 8 Sep., 17:07, alux alu

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
them to look into Clojure too. But here I'm on a slippery slope. I'm still unable to judge the power of lisp macros compared to the power of Scalas possibilities to write your own control structures. Regards, alux On 8 Sep., 19:29, Alan a...@malloys.org wrote: This was actually the article

Re: Simple question about destructuring

2010-09-08 Thread alux
Hi Alan, this is one of the places where clojure.core is not written in what I would called idiomatic Clojure. The reason is speed. Rich Hickey is very eager to speed up the libraries, and what you see in juxt is one of the verbose speedup tricks. Regards, alux On 8 Sep., 20:06, Alan

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
! (I read he did a talk just about macros this year, but I dont know whether there is a video or slides of it on the web.) @Michael Yep, again some stuff for the comparison list. Thank you. An interesting discusssion! Thank you all! Regards, alux On 8 Sep., 20:17, Michael Ossareh ossa

deftype makes no extender?

2010-09-03 Thread alux
Hello, shouldnt the type x be listed a extender of xx here? Or why not? Thanks, alux (defprotocol xx example (xxx [x] some x'es)) (deftype x [] xx (xxx [x] :xxx)) (extenders xx) = nil -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: deftype makes no extender?

2010-09-03 Thread alux
Yes, thats what I see. I just dont think this is very sensible. Thank you Meikel! Greetings, alux On 3 Sep., 13:10, Meikel Brandmeyer m...@kotka.de wrote: Hi, On 3 Sep., 12:49, alux alu...@googlemail.com wrote: shouldnt the type x be listed a extender of xx here? Or why

Macros, any reading suggestion?

2010-06-03 Thread alux
:) Thank you, and kind regards, alux -- 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

Re: Macros, any reading suggestion?

2010-06-03 Thread alux
For Lists/Vectors/Sets/Maps, syntax-quote establishes a template of the corresponding data structure., and from that, what I expected was (user/foo (user/bar a) b) Why is this so utterly wrong, and where should I know? Many thanks, alux On 3 Jun., 11:51, Konrad Hinsen konrad.hin...@fastmail.net wrote

Re: Macros, any reading suggestion?

2010-06-03 Thread alux
Many thanks Konrad, thats illuminating! Regards, alux On 3 Jun., 13:36, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 3 Jun 2010, at 12:46, alux wrote: Thats impressive. I'm still, hm, puzzled. Nice example of something that can only be done with syntax-quote, and outside of a macro

Re: Macros, any reading suggestion?

2010-06-03 Thread alux
Hi Mike, thank you! Third book put on my reading list this week. Sigh. Regards, alux On 3 Jun., 21:24, Miki miki.teb...@gmail.com wrote: Hello alux, I still have some technical questions, but the main issue seems to be that I need to dive more deeply into the whole area of macro

Re: special form vs. macro

2010-06-01 Thread alux
how to implement all of them. Certainly there is, unknownst to me, a bunch of literature about (sets of) primitives that cannot e replaced - literature hints anybody? (Well, thats probably a nice set of exercises :) Thanky and regards, alux On 31 Mai, 12:45, Sina K. Heshmati s...@khakbaz.com

Re: special form vs. macro

2010-06-01 Thread alux
? (I'm always tempted to try and find the very basic blocks. But here this seems to be like looking for a root in a directed graph - it exists in special cases only.) Thank you, alux On 1 Jun., 10:44, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 1 Jun 2010, at 09:18, alux wrote: So

Re: special form vs. macro

2010-06-01 Thread alux
Hello SinDoc, no special form at all? Cool, I'll have a look. Chapter 4.1 and 4.2 actually sit on my desk already since yesterday - I just didnt read it. I hope I get a chance in the next days. Many thanks, alux On 1 Jun., 09:38, Sina K. Heshmati s...@khakbaz.com wrote: alux alu

Re: Clojure script with shebangoid on windows

2010-05-31 Thread alux
Ah! Hello Glen, good hint. Problem and solution reproduced ;-) Thank you, greetings, alux On 31 Mai, 06:00, Glen Stampoultzis gst...@gmail.com wrote: On 31 May 2010 04:51, Paul Moore p.f.mo...@gmail.com wrote: On 30 May 2010 12:31, alux alu...@googlemail.com wrote: Small addition, you

Re: special forms and let binding

2010-05-31 Thread alux
Hello ataggart, thank you for the correction! Only now I understand A.Rosts question. May be somebody can help, and explain why my hypothesis was wrong. Obviousely, while functions are first class, special forms are even better, kind of zeroth class. Thank you, alux On 31 Mai, 04:15, ataggart

Re: Rationals, and their size

2010-05-31 Thread alux
to place it at ;-) Regards, alux On 31 Mai, 04:10, ataggart alex.tagg...@gmail.com wrote: Ratio doesn't emit the numerator and denominator:http://github.com/richhickey/clojure/blob/master/src/jvm/clojure/lang... I'm not sure that would help solve your problem, even if it were available.  You

special form vs. macro

2010-05-31 Thread alux
anything to do with eagerness or lazyness. [ ] You are completely wrong, the right question is: Thank you, alux -- 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

Re: special form vs. macro

2010-05-31 Thread alux
; this uses the special form user= (do huhu plop) plop ; while this uses println user= ((var do) huhu hello) huhu hello nil Thank you, alux On 31 Mai, 10:38, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 31 May 2010, at 09:35, alux wrote: I got a very basic question about the concept of special

Re: Rationals, and their size

2010-05-31 Thread alux
Yep, know that, been there ;-)) On 31 Mai, 21:39, ataggart alex.tagg...@gmail.com wrote: On May 31, 12:18 am, alux alu...@googlemail.com wrote: Ah, thank you - I still shy away from looking into Richs sources, but here it helps: Ratio doesn't have getter for numerator and denominator

Re: special forms and let binding

2010-05-31 Thread alux
Hi Аркадий, I started another thread about the difference between special form and macros today - and got told that it is not possible to overwrite a special form. Regards, alux On 31 Mai, 21:15, Ark. Rost arkr...@gmail.com wrote: So I don't understand if there any way do it. I'm really

Re: Clojure script with shebangoid on windows

2010-05-30 Thread alux
Thank you! Greetings, a. On 28 Mai, 17:51, Paul Moore p.f.mo...@gmail.com wrote: On 28 May 2010 16:17, alux alu...@googlemail.com wrote: Hello Paul, thats much better, many thanks! I've added it to the Wikibooks page,http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips

Re: Clojure script with shebangoid on windows

2010-05-30 Thread alux
Small addition, you missed to add the : before eof replace goto eof by goto :eof Thank you, and regards, alux On 28 Mai, 16:09, Paul Moore p.f.mo...@gmail.com wrote: On 28 May 2010 09:48, alux alu...@googlemail.com wrote: Hello! Short: It works, but is not perfect. (this may need

Re: special forms and let binding

2010-05-30 Thread alux
? (I'm driven to point out that this is bad style - but you probably know already.) Regards, alux On 30 Mai, 19:07, A.Rost aravanc...@gmail.com wrote: Hi! For example, it's possible to do things like: (def do println) ((var do) example) And it works correct. But I don't understand how to get

Rationals, and their size

2010-05-30 Thread alux
), that is easier than using the BigIntegers myself? Thank you, alux -- 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

Clojure script with shebangoid on windows

2010-05-28 Thread alux
regards, alux -- 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 from this group, send email

Re: Clojure script with shebangoid on windows

2010-05-28 Thread alux
Hello Paul, thats much better, many thanks! Regards, alux On 28 Mai, 16:09, Paul Moore p.f.mo...@gmail.com wrote: On 28 May 2010 09:48, alux alu...@googlemail.com wrote: Hello! Short: It works, but is not perfect. (this may need an windows expert to make it better) Try

Re: When is *err* used?

2010-05-19 Thread alux
Any comment here? tnx, a. On 17 Mai, 22:22, alux alu...@googlemail.com wrote: Hi, I reset *out* in a test program, and it worked fine. But when I try to do the same with *err*, I found no change, still. All Errors I produced seem to go directly to Java's System.err, not using my new *err

Re: When is *err* used?

2010-05-19 Thread alux
Hello Adrian, thanks for the hint. I looked into clojure.core and similar files, and didnt find much use of *err*. Regards, alux thank you for your response. I had a look into On 19 Mai, 09:55, Adrian Cuthbertson adrian.cuthbert...@gmail.com wrote: On Wed, May 19, 2010 at 9:06 AM, alux alu

Re: When is *err* used?

2010-05-19 Thread alux
Thank you Adrian! Regards, alux On 19 Mai, 14:33, Adrian Cuthbertson adrian.cuthbert...@gmail.com wrote: thanks for the hint.  I looked into clojure.core and similar files, and didnt find much use of *err*. There are a few in clojure.contrib. Have a look at logging.clj, repl_ln.clj

Re: Does emacs suppress output from thread ?

2010-05-18 Thread alux
Hi Preecha, output in Clojure is sent to *out* (a variable that refers to System.out by default). If you use emacs / slime this variable will be set differently. You should find your threads output in the swank- REPL, if you can find it somewhere. Regards, alux On 18 Mai, 03:26, Preecha P yum

Re: Does emacs suppress output from thread ?

2010-05-18 Thread alux
I should add, that a new thread runs in the default environment again. You may set the *out* variable in your thread with binding: (let [dummy *out*] ; to have a name for the current *out* (.start (Thread. (fn [] (binding [*out* dummy] (prn x)) Regards, alux On 18 Mai, 09:26, alux alu

Re: Does emacs suppress output from thread ?

2010-05-18 Thread alux
expect this to work, but to prevent me from working isnt nice ;-) Greetings, alux On 18 Mai, 20:37, Dave Fayram dfay...@gmail.com wrote: That is a very useful bit of information. Thanks! On Tue, May 18, 2010 at 6:01 AM, Moritz Ulrich ulrich.mor...@googlemail.com wrote: Slime supports

Re: Does emacs suppress output from thread ?

2010-05-18 Thread alux
)))] (.start (Thread. pusher)) out)) Feedback highly welcome. Regards, alxu On 18 Mai, 21:09, alux alu...@googlemail.com wrote: Hi. (add-hook 'slime-connected-hook 'slime-redirect-inferior-output) works for me if I start Clojure with M-x slime But if I start it with Maven, and try

When is *err* used?

2010-05-17 Thread alux
regards, alux -- 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 from this group, send email

?: promotion of integral types

2010-05-05 Thread alux
? Thank you, alux -- 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 from this group, send

Re: ?: promotion of integral types

2010-05-05 Thread alux
Thank you for the discussion - even if I dont understand it immediately ;-) Grettings, alux On 5 Mai, 17:32, David Nolen dnolen.li...@gmail.com wrote: On Wed, May 5, 2010 at 11:11 AM, Sean Devlin francoisdev...@gmail.comwrote: I think there's a fundamental assumption that I disagree

Re: Defining a namespace inside a let

2010-05-02 Thread alux
Hello Stuart, they don't work as you'd expect. Ah, I see. Thank you ;-) Hm. Can you point me to some documentation about these special rules then? Many thanks, alux On 30 Apr., 18:10, Stuart Sierra the.stuart.sie...@gmail.com wrote: ns and in-ns have special evaluation rules.  In general

Re: Defining a namespace inside a let

2010-04-30 Thread alux
Hello Armando, did you try the second half of you experiment in a clean REPL? As you describe it, the first evaluation may have created the var. Regards, alux On 29 Apr., 21:32, Armando Blancas armando_blan...@yahoo.com wrote: The REPL switches to the namespace ns-1 and the var my-namespace

Re: Defining a namespace inside a let

2010-04-29 Thread alux
(println (do (ns ns-1) (def my-namespace *ns*) my-namespace)) The REPL switches to the namespace ns-1 and the var my-namespace is in user ! That seems to be the background of Davids irritation. Any explanations? Kind regards, alux On 28 Apr., 17:37, Nate Young youn

Re: Embedding swank-clojure

2010-04-19 Thread alux
is the reason). I.e. hit enter if connected, or try to connect. Certainly there should be a better way, but may be you can start from here. Regards, alux public static void main(String[] args) throws InterruptedException{ ThreadGroup tg = new ThreadGroup(Swank

do we have is-delivered? for promise

2010-04-17 Thread alux
Hi, is there any nonblocking way I kind find out whether a promise has been delivered? Thanky you, alux -- 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: do we have is-delivered? for promise

2010-04-17 Thread alux
- and so the printer has to stop at the current end of the list, and not block. Thanks again, and kind regards, alux On 17 Apr., 16:46, Per Vognsen per.vogn...@gmail.com wrote: Not currently. I added the capability to some code I posted last month for fixing print-method for promises so

Re: ?: create static inner Java class with constructor argument

2010-04-15 Thread alux
Thank you verec, I hadn't been aware of this. Kind regards, alux On 13 Apr., 00:08, verec jeanfrancois.brouil...@googlemail.com wrote: You may also want to browse this thread: http://groups.google.com/group/clojure/browse_frm/thread/a80e07675663... -- You received this message because you

Re: Communication: How to model it?

2010-04-15 Thread alux
of a seq are references, they dont fit the interface anymore, or do they. Still thinking ;-) Kind regards, alux On 14 Apr., 22:41, Anniepoo annie6...@yahoo.com wrote: what you want is just a stream in each direction. Bob:  So, how do you feel about the Smith contract? Fred: It's not a good

Re: Communication: How to model it?

2010-04-15 Thread alux
lines. (And thanks for preventing me to fall into that REPL trap.) Now I will try and use it. Thanks and greetings, alux On 15 Apr., 14:55, Per Vognsen per.vogn...@gmail.com wrote: The first thing I ever implemented with promises was dataflow programming in this style. A good read

Re: Communication: How to model it?

2010-04-15 Thread alux
. ... So, seque sounds right at the first stage - the sequence of lines. The second stage - sequence of messages might need some reordering or different approach. Thanks a lot, alux On 15 Apr., 14:32, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Apr 15, 2:10 pm, alux alu...@googlemail.com wrote

Communication: How to model it?

2010-04-14 Thread alux
still dont know. Any tips or constructive criticism welcome. Thank you for reading. Regards, alux -- 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

?: create static inner Java class with constructor argument

2010-04-12 Thread alux
see what I'm doing wrong here? Beside, ist there a way to access the Java class in a direct way, like the Java literal Object.class ? Thank you, alux -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: create static inner Java class with constructor argument

2010-04-12 Thread alux
Aaaah! Hello Kevin, right, thank you! I had even seen this once before, but forgot it ;-) Regards, alux On 12 Apr., 13:34, Kevin ke...@kelleysoft.com wrote: import javax.sound.sampled.*; ... Line.Info li = new Line.Info(Object.class); My two (wrong) trials are: (def li (new

Re: Introduction to Monads in Clojure tech talk

2010-04-11 Thread alux
Thank you! Nice step by step intro. Regards, alux On 9 Apr., 06:04, Mike T. Miller jini...@gmail.com wrote: Adam Smyczek's Introduction to Monads video is now available. http://www.youtube.com/user/LinkedInTechTalks?feature=mhw5#p/u/0/ObR3... I'll work on getting an HD version up Friday

JLine in maven clojure:repl in eshell

2010-04-05 Thread alux
/dependency Thank you, alux -- 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 from

Ants in anger

2010-03-28 Thread alux
:max-history (the default is 10). This is what I want to share, maybe its of help to somebody. Kind regards, alux -- 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

Re: Ants in anger

2010-03-28 Thread alux
Addendum: After about a day of CPU time most of the refs are at 9 or 10 with their history length. a. On 28 Mrz., 14:18, alux alu...@googlemail.com wrote: Hi, I played with Richs ant colony these days, and want to report about experience with 4 cores. First I didn't want my computer

Fighting with Emacs ;-)

2010-03-27 Thread alux
where I have to look for a solution? Many thanks, alux -- 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: General question: Petri nets and STM in clojure

2010-03-22 Thread alux
Hi Andrzej, I'm not a Petri net specialist too, but I dont see how one could simulate the view of a Clojure programmer onto STM, without simulation too the stuff programmers doesnt see: Richs under-the-hood-magic. Regards, alux Andrzej schrieb: On Mon, Mar 22, 2010 at 4:36 AM, alux alu

Re: Maven clojure:repl

2010-03-22 Thread alux
Thank you Stuart, this closes some of my thinking loops. Greetings from Europe, alux Stuart Sierra schrieb: Maven has a default search path, but it only works for the standard plugins distributed by Apache. To use the Clojure plugin (any of the clojure:* commands) the pom.xml must contain

Re: General question: Petri nets and STM in clojure

2010-03-22 Thread alux
the stuff under the hood. (The best way I know to learn this is still Rich Hickeys videos.) Dont know whether thats been helpful, but I cant do more. Kind regards, alxu Ryan Teo schrieb: Hi alux, Andrej, Thanks! I'm still trying to understand how STM works in Clojure, so I would be happy

mvn clojujure:repl - no keyboard echo

2010-03-22 Thread alux
are echoed to the shell only after I hit Enter. So thats not really a usable REPL. Anybody heard about that and has a solution? Many thanks, alux -- 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

Re: mvn clojujure:repl - no keyboard echo

2010-03-22 Thread alux
Really no ideas? Hm. I dont know what to do too. Reagrds, alux -- 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

Re: Swank, ELPA and Emacs version do you use?

2010-03-21 Thread alux
Okay. So I switched to version 23.1. that had already been installed. AFAIK it uses all the things I installed the last days. Or do I have to update some other stuff? Thank you for the hints, alux Phil Hagelberg schrieb: On Sat, Mar 20, 2010 at 12:46 PM, alux alu...@googlemail.com wrote

Re: Maven clojure:repl

2010-03-21 Thread alux
- value=2009-09-14${clojure.swank.protocolVersion}/protocolVersion But I actually dont understand where this file and date comes from. I dont see it in the source tree of the plugin. Thanks for the help and greetings, alux Mark Derricutt schrieb: The plugin is in central, tho you need to declare

Re: Swank, ELPA and Emacs version do you use?

2010-03-21 Thread alux
Thank you Rob, emacs and slime already works if kept for semselves. What doesnt work is the maven integration, so I can start the swank server in a certain project. Regards, alux Rob Wolfe schrieb: alux alu...@googlemail.com writes: Okay. So I switched to version 23.1. that had already been

Re: Maven clojure:repl

2010-03-21 Thread alux
Hello Stuart, yes, thats not in. I'm not enough into maven to know where the plugins have to be specified. I had the hope that maven searches its repository, when I call a specific goal of the form xxx:yyy - so this hope was in vain? Thank you for the comment. Regards, alux Stuart Sierra

Re: General question: Petri nets and STM in clojure

2010-03-21 Thread alux
tool for nets colored with Clojure. But thats another topic ;-) Regards, alux -- 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: lazy-cons

2010-03-20 Thread alux
Hi Glen, it's lazy-seq now. Regards, alux Glen Rubin schrieb: Hey all, I am working through the problems on project euler. On question number 11 (http://projecteuler.net/index.php?section=problemsid=11), I was unable to come up with a solution, so I cheated and looked at some other

Re: lazy-cons

2010-03-20 Thread alux
And array-get seems to be aget by now. a. Jarkko Oranen schrieb: On Mar 20, 1:52 pm, Glen Rubin rubing...@gmail.com wrote: Hey all, I am working through the problems on project euler.  On question number 11 (http://projecteuler.net/index.php?section=problemsid=11), I was unable to

Re: Translation from Common Lisp 1

2010-03-20 Thread alux
Hello Christophe, this one I like ;-) Thanks regards, alux Christophe Grand schrieb: If you really wan't to go that way you can also choose to remove the namespaces: (defn describe-path [[where what]] (map (comp symbol name) `(there is a ~what going ~where from here.))) On Fri, Mar 19

Re: Maven clojure:repl

2010-03-20 Thread alux
enough. Seems I need to do more to the plugin than mvn install. Do I have to put some entries in the incanter pom, or in my myvan init file? Thank you for you answer, alux Meikel Brandmeyer schrieb: Hi, On Sat, Mar 20, 2010 at 04:56:39AM -0700, alux wrote: [INFO] The plugin

Re: Maven clojure:repl

2010-03-20 Thread alux
. a. alux schrieb: Hm. It cant be an incanter problem. In an empty directory, I get: D:\projekts\testmvn clojure:swank [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'clojure'. [INFO

Re: Maven clojure:repl

2010-03-20 Thread alux
deleting it doesnt help, it seems to be reloaded when I run clojure:swank a. alux schrieb: So, I found a file: %repo%\org\apache\maven\plugins\maven-clojure-plugin\maven-metadata- central.xml containing ?xml version=1.0 encoding=UTF-8? metadata groupIdorg.apache.maven.plugins

Re: Maven clojure:repl

2010-03-20 Thread alux
But even if I delete it, and do mvn -o clojure:swank I get the same error. Black maven magic. ;-( Regards, a. alux schrieb: deleting it doesnt help, it seems to be reloaded when I run clojure:swank a. alux schrieb: So, I found a file: %repo%\org\apache\maven\plugins\maven

Swank, ELPA and Emacs version do you use?

2010-03-20 Thread alux
EMacs versions. So which Emacs version do you use? Thank you, alux -- 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

Re: Maven clojure:repl

2010-03-20 Thread alux
Hi Mark, sound plausible. But what should I do now? If there is any way to tell maven what it should use, I'd be happy. Preferred in settings.xml, so i can use it in every project. Thank you, alux Mark Derricutt schrieb: If this was a fresh project with no plugins defined, maven would look

Re: Translation from Common Lisp 1

2010-03-19 Thread alux
David, thank you. Your answer seems to be nearest possible to the origninal spirit. Obviousely the way syntax-quote is resolved qualified with a namespace makes the easier way impossible. Regards, alux On 18 Mrz., 22:17, David Nolen dnolen.li...@gmail.com wrote: On Thu, Mar 18, 2010 at 4:25 PM

Re: Translation from Common Lisp 1

2010-03-19 Thread alux
. (Like the old hastable example: A consistent implementation is returning a constant. Thats slow and doesnt scale, but it's consistent. To me thats been illuminating.) Many thanks to all for the discussion. alux On 18 Mrz., 23:21, Richard Newman holyg...@gmail.com wrote: But using symbols

Parser irritation

2010-03-19 Thread alux
is at work here? Thank you, alux -- 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 from

Re: Translation from Common Lisp 2

2010-03-19 Thread alux
Hello Michael, hello Dave, its actually been the parenthesis. Thank you. (Now I still have to understand it ;-) On 18 Mrz., 22:43, Michael Wood esiot...@gmail.com wrote: On 18 March 2010 23:40, Dave M damncan...@gmail.com wrote: ... (game-action weld chain bucket attic          (if

Re: Parser irritation

2010-03-19 Thread alux
Ah. Interesting. (btw the exported in you second line certainly should be imported) So it interprets huhu. as full qualified class name and leaves it alone. Thank you for the explanation. Regards, alux On 19 Mrz., 09:38, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Mar 19, 9:16 am, alux

Re: Translation from Common Lisp 2

2010-03-19 Thread alux
By the way, you may find a working version at http://paste.lisp.org/+22IH/1 Kind regards, alux On 19 Mrz., 09:18, alux alu...@googlemail.com wrote: Hello Michael, hello Dave, its actually been the parenthesis. Thank you. (Now I still have to understand it ;-) On 18 Mrz., 22:43, Michael

REPL behaviour / time / lazyness

2010-03-19 Thread alux
whats happening here? Especially comparing to the (iterate inc 1) version .. Thank you and regards, alux -- 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: getRuntime exec call?

2010-03-19 Thread alux
The call to a static method is special, try (.exec (Runtime/getRuntime) ls) Regards, alux TimDaly schrieb: (defn cmdresult [cmdstr] (let [args (into [] (seq (.split cmdstr )))] (BufferedReader. (InputStreamReader. (. (. (. Runtime (getRuntime)) (exec args)) (getInputStream

Re: REPL behaviour / time / lazyness

2010-03-19 Thread alux
;-) Still, I dont believe. I get the same difference with user= (time (map fib0 (range 100))) Elapsed time: 1.916445 msecs more than 5 seconds (0 1 1 2 3 5 8 13 21 34 ...) user= (time (map fib0 (iterate inc 0))) Elapsed time: 0.104203 msecs (0 1 1 2 3 5 8 13 21 34 ...) Hm. Regards, alux

Re: Translation from Common Lisp 2

2010-03-19 Thread alux
JC Petkovich, thank you. I couldnt see your message before March 19, 6:00 group time, i.e. 13:00 UTC, but thats exactly the solution that was needed. Regards, alux JC Petkovich schrieb: You just needed to edit your translation from CL a bit more, there were some extra brackets in your

Re: REPL behaviour / time / lazyness

2010-03-19 Thread alux
why now both starts with 0 as argument, and 1 as result. But the range one waits some five sec, the iterate doesnt. Sorry for the confusion. And thanks for the patience ;-) Kind regards, alux PS.: A correct Fibonacci sequence would use ( n 2) instead of ( n 1). Just to mention it. Meikel

Re: REPL behaviour / time / lazyness

2010-03-19 Thread alux
Laurent, Could chunked seqs explain something here ? sounds possible. If I only knew what this is ;-) Regards, alux Laurent PETIT schrieb: 2010/3/19 alux alu...@googlemail.com: ;-) Still, I dont believe. I get the same difference with user= (time (map fib0 (range 100

Re: getRuntime exec call?

2010-03-19 Thread alux
:\\config.sys spels= (.exec (Runtime/getRuntime) arr) Greezs, alux Tim Daly schrieb: The call I coded works if you only pass a string with no spaces. However, if the string has spaces there is no result. If you break the string into String[] then clojure cannot match the appropriate exec(String

Re: getRuntime exec call?

2010-03-19 Thread alux
;-) I'm still at letter b in clojure.core. Grin. Regards, a. Meikel Brandmeyer schrieb: Hi, On Fri, Mar 19, 2010 at 11:00:34AM -0700, alux wrote: spels= (make-array (.getClass ) 2 ) #String[] [Ljava.lang.String;@ad8659 spels= (def arr (make-array (.getClass ) 2 )) #'spels/arr spels

Java method call irritation

2010-03-18 Thread alux
? (map .getName (- (Runtime/getRuntime) .getClass .getMethods seq)) got java.lang.Exception: Unable to resolve symbol: .getName in this context but the following worked fine: (map #(.getName %) (- (Runtime/getRuntime) .getClass .getMethods seq)) Thanks for any help, alux -- You received

Re: Java method call irritation

2010-03-18 Thread alux
Thank you Meikel. I just didnt encounter that information before ;-) I'm still in the process of learning the core lib, so while learning I sometimes avoid the contrib libraries, and try myself. Here this proved educating again ;-) (wouldn't do so for production ;-) Thank you and regards, alux

reload of REPL init file

2010-03-18 Thread alux
Hello, is there a possibility to reload a clj-file that has been provided at the REPL-start via -i filename.clj ? (It doesn't have a name space.) This would save me to provide a namespace in the file an thus type (ns my-ns) after every REPL start. Thank you and greetings, alux -- You

Re: reload of REPL init file

2010-03-18 Thread alux
Many thanks, all questions I had are answered. And some I didn't have but should! Greetings, alux On 18 Mrz., 14:25, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Mar 18, 12:06 pm, alux alu...@googlemail.com wrote: is there a possibility to reload a clj-file that has been provided

  1   2   >