Re: Jython Interoperability problem

2010-11-09 Thread Rasmus Svensson
2010/10/29 Dilvan dil...@gmail.com:   Any clues? I don't know much about how Jython works, but from the stack trace it seems like Clojure cannot load its source files from the classpath. Are there other ways to add jars to the classpath in Jython? // raek -- You received this message because

Re: Jython Interoperability problem

2010-11-09 Thread Rasmus Svensson
It seems like this is a class loader issue... The guys working on clojure-ant-tasks seems to have hit the same problem: https://github.com/jmcconnell/clojure-ant-tasks/issues#issue/5/comment/223478 I also found these two issues: http://dev.clojure.org/jira/browse/CLJ-260

Re: could clojure be androids joker card

2010-11-09 Thread faenvie
hi aaron, what i initially thought of, is an alternate technologie-stack. that's far from being a realistic option today and may not be realistic at all: (i guess this has a timeframe of 4-8 years) leave java completely out. base clojure on android's/linux's process- and memory-model and low

- related error in clojure 1.2

2010-11-09 Thread Carlos Moscoso
user= (- {:a 1} (keyword a)) java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.lang.String (NO_SOURCE_FILE:0) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

macroexpand

2010-11-09 Thread Kenan Hneide
Hello, I am very new to Clojure, so please bear with me. I was reading Programming Clojure and while reading about Macros, (specifically Symbol Capture) I had the following question, could it be possible to expand the macro into an anonymous function and evaluate that? For example: (defmacro

macro debugger

2010-11-09 Thread Sunil S Nandihalli
Hello everybody, Today I just googled for macro-debugger and found the following ... http://docs.racket-lang.org/macro-debugger/index.html I have not completely explored it yet .. however, I was wondering if there is something similar for clojure.. is it possible to develop one? Thanks, Sunil.

Re: How to rewrite code to avoid bashing transients in-place?

2010-11-09 Thread Chris Perkins
On Nov 8, 4:45 pm, Greg g...@kinostudios.com wrote: I must say it would be really nice if this was considered kosher.. as it does work just fine. It would also be useful to know why transient bashing is frowned upon. It's not that it's frowned upon - it simply doesn't work. Functions that

Re: macroexpand

2010-11-09 Thread nicolas.o...@gmail.com
If you want that, you don't need macro. (defn bench [f] (let [start ... result (f)] ; note the call to f )) But you would have to call it with: (bench #(expr)) or (bench (fn [] expr)) You cannot do it directly because it would evaluate expr before the call to bench. This

Re: - related error in clojure 1.2

2010-11-09 Thread Sunil S Nandihalli
Hi carlos .. try the following it will work.. (- {:a 1} ((keyword a))) clojure needs to know that it needs to coerce the keyword to a function .. that is why your original thing won't work.. Sunil. On Tue, Nov 9, 2010 at 5:23 PM, Carlos Moscoso moscoso@gmail.comwrote: user= (- {:a 1}

Re: ANN: slice (a web library for writing and composing snippets of html, css, and js that are written in Clojure)

2010-11-09 Thread Patrik Hedman
Nice work, looks great. Cheers, Patrik 2010/11/9 Scott Jaderholm jaderh...@gmail.com Slice is an experimental not-production-ready web library for writing and composing snippets of html, css, and js that are written in Clojure. The motivation is that I wanted the html, css, and js for a

Re: macroexpand

2010-11-09 Thread nicolas.o...@gmail.com
Last point: on very fast bench, the time of a function call is not negligeable. -- 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

Re: macroexpand

2010-11-09 Thread nicolas.o...@gmail.com
Sorry. Last line should read: (defmacro bench [expr] `(bench-fn (fn [] ~expr))) On Tue, Nov 9, 2010 at 1:06 PM, nicolas.o...@gmail.com nicolas.o...@gmail.com wrote: If you want that, you don't need macro. (defn bench [f]  (let [start ...        result (f)] ; note the call to f     ))

Re: - related error in clojure 1.2

2010-11-09 Thread Sunil S Nandihalli
thanks rasmus.. I was completely off on reasoning . Sunil. On Tue, Nov 9, 2010 at 6:58 PM, Rasmus Svensson r...@lysator.liu.se wrote: 2010/11/9 Carlos Moscoso moscoso@gmail.com: user= (- {:a 1} (keyword a)) - is simply a code rewrite macro. You can use macroexpand-1 to see how the

Re: - related error in clojure 1.2

2010-11-09 Thread Rasmus Svensson
2010/11/9 Carlos Moscoso moscoso@gmail.com: user= (- {:a 1} (keyword a)) - is simply a code rewrite macro. You can use macroexpand-1 to see how the rewrite is done: user= (macroexpand-1 '(- {:a 1} (keyword a))) (keyword {:a 1} a) As Sunil said, you can get the desired behaviour by adding

Re: macro debugger

2010-11-09 Thread Moritz Ulrich
I don't think there's a full-featured macro debugger for clojure, but clojure has two simple functions called macroexpand and macroexpand-1: user (doc macroexpand-1 ) - clojure.core/macroexpand-1 ([form]) If form represents a macro form, returns its expansion, else

Re: macro debugger

2010-11-09 Thread Scott Jaderholm
It's not specialized like your link, but I think you can use normal debugging tools on macros: (defmacro foo [a] (swank.core/break) `(list ~a)) And CDT for stepping. Scott On Tue, Nov 9, 2010 at 8:50 AM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello everybody, Today I

Being not Lisp is a feature?

2010-11-09 Thread David Sletten
I don't want to start any language wars, but this is funny: http://gosu-lang.org/comparison.shtml Have all good days, David Sletten -- 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

Re: Being not Lisp is a feature?

2010-11-09 Thread Laurent PETIT
this feature seems to have been specifically created to FUD over clojure :-) 2010/11/9 David Sletten da...@bosatsu.net I don't want to start any language wars, but this is funny: http://gosu-lang.org/comparison.shtml Have all good days, David Sletten -- You received this message

Re: Being not Lisp is a feature?

2010-11-09 Thread Ken Wesson
On Tue, Nov 9, 2010 at 12:08 PM, David Sletten da...@bosatsu.net wrote: Being not Lisp is a feature? No, of course not. It's a bug. -- 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

Re: Being not Lisp is a feature?

2010-11-09 Thread Stefan Kamphausen
On Nov 9, 6:08 pm, David Sletten da...@bosatsu.net wrote: I don't want to start any language wars, but this is funny:http://gosu-lang.org/comparison.shtml Yeah, I had a good laugh this morning. ;-) -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: could clojure be androids joker card

2010-11-09 Thread Alec Battles
Andriod is not Clojure's joker card, Clojure is Andriod's joker card. --DragonCat -- 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

refactoring

2010-11-09 Thread .Bill Smith
The most recent Clojure refactoring conversation I've run across is this, from 2008: http://groups.google.com/group/clojure/browse_thread/thread/208894ac56d15d2a/8faba94a24f19639?lnk=gstq=refactor#8faba94a24f19639. Is anyone aware of more recent developments? Bill Smith Austin, TX -- You

Re: refactoring

2010-11-09 Thread Laurent PETIT
Yes, tcrayford's clojure-refactoring project: https://github.com/tcrayford/clojure-refactoring HTH, -- Laurent 2010/11/9 .Bill Smith william.m.sm...@gmail.com The most recent Clojure refactoring conversation I've run across is this, from 2008:

Clojure vs. serial ports

2010-11-09 Thread Mike Meyer
I'm working on a clojure web app that manipulates the serial port. Well, uses it, anyway. The basic structure is to create a map from web-visible names to devices accessible via the serial ports. The problem is that Clojure and the serial port drivers don't seem to get along very well. I'm using

Re: macro debugger

2010-11-09 Thread Stuart Campbell
On 10 November 2010 02:50, Moritz Ulrich ulrich.mor...@googlemail.comwrote: I don't think there's a full-featured macro debugger for clojure, but clojure has two simple functions called macroexpand and macroexpand-1: user (doc macroexpand-1 ) -

Re: macroexpand

2010-11-09 Thread Alan
Clojure is not javascript: scopes provided by functions aren't any better than those created by let: (let [start 1] (let [start 2] (println start)) (println start)) prints 2 1 as you'd expect. You *can* write a macro that will expand this way, and most of the time it's not a problem

Re: Jython Interoperability problem

2010-11-09 Thread Dilvan
On Nov 1, 9:24 pm, Mikhail Kryshen mikh...@kryshen.net wrote: Clojure's data structures modified for use outside of Clojure:http://github.com/krukow/clj-ds Persistent analogue of the Java Collections Framework:http://code.google.com/p/pcollections/ These libraries only cover persistent

Re: Clojure vs. serial ports

2010-11-09 Thread lprefontaine
Hi, Make sure none of your serial I/O calls are executing while compiling... If you have anything like global defs that indirectly try to do an I/O it will get executed as part of the AOT. I have been playing with AOT a lot in the last two months and got trapped a couple of time with this. Your

Re: How to rewrite code to avoid bashing transients in-place?

2010-11-09 Thread Greg
Ken, Holy crap. Thank you for this wonderful message. My apologies for taking a while to respond, but your email has somewhat disarmed me. I'm very impressed with your knowledge of math, and I felt at once eager to read and understand your email and was taken aback by it, as my math skills

Re: How to rewrite code to avoid bashing transients in-place?

2010-11-09 Thread Greg
I remember that I simply gave up and assumed that there were no such sequence. I admire your systematic approach to this! Thanks! And it turns out that I was a bit mistaken! Simon messaged me off-list to let me know that in fact that code is actually enterable at that location, but I was just

Re: How to rewrite code to avoid bashing transients in-place?

2010-11-09 Thread Greg
On Nov 9, 2010, at 4:24 AM, Chris Perkins wrote: The key word there is sometimes - you can't count on that behavior. If you have been working with small collections, and bashing in-place is working for you, you've just been lucky. Your luck will not last ;) Thanks Chris for that info! Will

Re: How to rewrite code to avoid bashing transients in-place?

2010-11-09 Thread Ken Wesson
On Tue, Nov 9, 2010 at 7:25 PM, Greg g...@kinostudios.com wrote: I remember that I simply gave up and assumed that there were no such sequence. I admire your systematic approach to this! Thanks! And it turns out that I was a bit mistaken! Simon messaged me off-list to let me know that in

Re: Being not Lisp is a feature?

2010-11-09 Thread Santosh Rajan
The negative of a feature is also considered a feature by people who don't get it. ;-) On Tue, Nov 9, 2010 at 10:38 PM, David Sletten da...@bosatsu.net wrote: I don't want to start any language wars, but this is funny: http://gosu-lang.org/comparison.shtml Have all good days, David Sletten

Re: Being not Lisp is a feature?

2010-11-09 Thread Brisance
Easy transition from Java, and Java has a checkmark. -- 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: ANN: slice (a web library for writing and composing snippets of html, css, and js that are written in Clojure)

2010-11-09 Thread Kyle Cordes
On Tue, Nov 9, 2010 at 1:04 AM, Scott Jaderholm jaderh...@gmail.com wrote: And yes, I realize designers would hate this. Target is solo developers. I think there is a place, for teams (not only for solo developers), for mechanisms that make it possible to write an entire many-layer application

Re: Being not Lisp is a feature?

2010-11-09 Thread lprefontaine
Gosu - standard athlete on performance enhancing drugs (EPO, steroids, ...) Clojure - genetically modified athlete A big generation gap, comparison stops here, no need to discuss details :))) Luc P. David Sletten da...@bosatsu.net wrote .. I don't want to start any language wars, but this is

Re: Being not Lisp is a feature?

2010-11-09 Thread Baishampayan Ghose
Luc, Gosu - standard athlete on performance enhancing drugs (EPO, steroids, ...) Clojure - genetically modified athlete A big generation gap, comparison stops here, no need to discuss details :))) Your sense of humour never fails to amuse me; it was great meeting you at Clojure Conj :)