Re: Blog Post: "The Magic of Macros: Lighting-Fast Templating in ClojureScript"

2013-01-26 Thread Zack Maril
That was seriously impressive, in terms of performance and simplicity. Way 
to go! Thanks for writing that up.
-Zack

On Tuesday, January 22, 2013 1:45:34 PM UTC-5, Aria Haghighi wrote:
>
> Hi all,
>
>   I've done a follow-up post on the Prismatic blog about our dommy, our 
> ClojureScript templating library. We added some macros to parse nested 
> vector data structures at compile time
> into direct DOM creation code. The resulting speedup is pretty dramatic 
> about 5x, bring ClojureScript templating to roughly 3x faster than a jQuery 
> baseline. This is a trick I know Hiccup and some other libraries do but I 
> thought it might be worth document/explaining this kind of application of 
> macros. 
>
>
> http://blog.getprismatic.com/blog/2013/1/22/the-magic-of-macros-lighting-fast-templating-in-clojurescript
>
> Thanks, Aria
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: 1.5 alpha 5 - performance issues relating to hashing and equals

2013-01-26 Thread Mark Engelberg
On Fri, Jan 25, 2013 at 11:54 PM, Christophe Grand wrote:

> Hi Mark,
>
> The hasheq chaching patch got applied between beta1 and beta2 so it's not
> in alpha5.
>

Thanks.  I tried the new release candidate, and the caching is definitely
working, but the issues I raised still remain.  Specifically, equality does
not yet take advantage of that cached hash value.


> The answer to your problem is to compute hahses incrementally.
>

I think you are right that computing hashes incrementally would solve the
stack overflow problem for hashing.  I don't think it would solve the stack
overflow problem when comparing large structures for equality.

If you are willing to put a patch together for any facet of this issue, I
think that would be great.

--Mark

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




namespace in gen-class/AOT classes

2013-01-26 Thread Zhao Shenyang
Hi All,

I'm writing a Max/MSP [1] external in clojure by compile clojure code
to java classes. A simplified version of my code is here:
https://gist.github.com/195b4a3f3d1c7b559d82 . For most of you who are
not familiar with MaxMSP external writing, MaxObject/post is just like
println.

In this code what I want to achieve is given a message, determine if
it’s a valid command, and (if yes) invoke the corresponding function.
I tried to use (resolve (symbol msg)) to find the corresponding
function, however it returns nil. I did some simple tests, shown in
line 31-34 of the code I pasted. What I find is that, in the method
call, the  namespace is "clojure.core" (line 31), I can find the
function by explicitly provide the namespace of current file (line
32-33), but failed if I only use resolve (even the function I want to
resolve to is also in current file).

I wonder if it's normal.

[1]: http://cycling74.com/

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread sampson . john7


On Friday, January 25, 2013 6:19:38 PM UTC, Phil Hagelberg wrote:
>
>
> sampso...@googlemail.com  writes: 
>
> > I have tried clojure-mode, creating .emacs.d in Emacs-24.2 - it 
> complained 
> > that there is no emacs_24.2/.emacs.d (note the underscore) and proceeded 
> to 
> > create one. However, the material I pasted from blogs had fatal errors 
> in 
> > it. 
>
> Most of what you read on blogs is either wrong from the beginning or 
> wrong by the time you actually read it; the official documentation 
> should always be your starting point. However, in this case 
> clojure-doc.org has an overview that is wider in scope than the 
> documentation for any individual package: 
>
> http://clojure-doc.org/articles/tutorials/emacs.html 
>
> However, very few contributors are familiar with Windows. If you find 
> the fix for the problem you encountered, please consider improving the 
> documentation. 
>
> -Phil 
>

If that is so should the developers not be frank up front and say
that Clojure is not meant to be used on Windows? It won't do Clojure's
image any good if Windows users are spending hours vainly struggling 
to install stuff, following misleading advice. More positively, perhaps 
there
could be a 'snapshot' build of everything required, tested on Windows 7 and
downloadable from official sites.

Regards

John

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread AtKaaZ
so, wait, are you having any trouble with eclipse+counterclockwise ? it
seems to be pretty straight forward, considering that I actually failed to
use emacs myself (although I did get emacs-live working, i prefer
eclipse+ccw for now)


On Sat, Jan 26, 2013 at 12:24 PM,  wrote:

>
>
> On Friday, January 25, 2013 6:19:38 PM UTC, Phil Hagelberg wrote:
>
>>
>> sampso...@googlemail.com writes:
>>
>> > I have tried clojure-mode, creating .emacs.d in Emacs-24.2 - it
>> complained
>> > that there is no emacs_24.2/.emacs.d (note the underscore) and
>> proceeded to
>> > create one. However, the material I pasted from blogs had fatal errors
>> in
>> > it.
>>
>> Most of what you read on blogs is either wrong from the beginning or
>> wrong by the time you actually read it; the official documentation
>> should always be your starting point. However, in this case
>> clojure-doc.org has an overview that is wider in scope than the
>> documentation for any individual package:
>>
>> 
>> http://clojure-doc.org/**articles/tutorials/emacs.html
>>
>> However, very few contributors are familiar with Windows. If you find
>> the fix for the problem you encountered, please consider improving the
>> documentation.
>>
>> -Phil
>>
>
> If that is so should the developers not be frank up front and say
> that Clojure is not meant to be used on Windows? It won't do Clojure's
> image any good if Windows users are spending hours vainly struggling
> to install stuff, following misleading advice. More positively, perhaps
> there
> could be a 'snapshot' build of everything required, tested on Windows 7 and
> downloadable from official sites.
>
> Regards
>
> John
>
> --
> --
> 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 to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
>
>



-- 
I may be wrong or incomplete.
Please express any corrections / additions,
they are encouraged and appreciated.
At least one entity is bound to be transformed if you do ;)

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Best Clojure Platform?

2013-01-26 Thread Zed Dominic
Hi,

I am a student, still trying to consider, if I should embrace Clojure as my 
language of choice. I have programmed in Java, C and Haskell (it brought me 
here) in the past, and I want to try out some list processing...

Of everything I deduced on the Internet, Clojure is a JVM language, with 
side projects for CLR and JavaScript. Which platform should I marry to get 
started on?
And, if I want to professionally embrace Clojure after I get a job, what 
Clojure platform should I count on? There is a Clojure-in-Clojure project 
too, I suppose; Any thoughts on that, will be helpful to me.

Thanks.

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: What people want from Clojure error messages

2013-01-26 Thread Hugo Duncan
Brian Marick  writes:

> I've also noticed that the messages that come from botched
> macroexpansions are often not useful in that they contain no clues
> about the original source, and sometimes not even a useful reference
> to the original namespace.

If these are macros that are under your control, and they are generating
new forms, you may be able to improve this by explicitly propagating
:line and :file metadata from the input form onto the generated form.

Hugo

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Java annotations on functions, in conjunction with gen-class?

2013-01-26 Thread Hugo Duncan
Ryan Cole  writes:

> Hi all, beginner here,
>
> I'm trying to write a Minecraft plugin in Clojure, and use AOT so that the 
> Minecraft server can load it right up. I've got this much going, and all as 
> well. The server expect some of my functions in a class that I'm extending 
> to use an appropriate annotation on the function.
>
> How do I add these annotations? I've Googled around and see that it looks 
> like support for this was added back in 2010, so I'm sure it's possible. 
> Maybe I've seen the solution but didn't realize that it was a solution. 
> Clojure still looks pretty alien to me, so crazy things like this are rough 
> to search for and realize when the answer is in front of me.


Annotations are added as metadata to functions in a deftype definition.
Something like this (untested):

(deftype MyType []
   SomeInterface
   (^{EventHandler {}} onPlayerLogin [event] ...))

For some examples of using annotations:

https://github.com/pallet/clojure-maven/blob/develop/mojo/src/main/clojure/clojure/maven/mojo/defmojo.clj#L45
https://github.com/pallet/zi/blob/develop/src/main/clojure/zi/test.clj#L109

I'm afraid it's not very friendly code if you're new to clojure.

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: 2 issues (with workarounds) running ClojureCLR in ASP.NET

2013-01-26 Thread dmiller
ClojureCLR abides by the same restrictions on submitting code as the main 
Clojure project.  Meaning that contribute code directly to ClojureCLR, you 
need a Contributor Agreement with Rich Hickey.
Check out http://clojure.org/contributing.
Doing so will allow you access to the JIRA site, which is also used by 
ClojureCLR for submitting patches, etc.

In the meantime, I'll look into this problem.

-David


On Wednesday, January 16, 2013 8:38:44 PM UTC-6, gavin.ca...@gmail.com 
wrote:
>
> (This is my first post.  Please let me know if I've got the protocol 
> wrong.)
>
> First, I don't know that anyone else is even trying to run ClojureCLR in 
> ASP.NET.  All I've seen is this 
> postfrom 
> March 2010.  It looks like the recommended patch (to RT.cs) was 
> eventually incorporated.
>
> But I found that two other modifications were needed to use the current 
> version (1.4):
>
> (Note that these only came up when loading Clojure in ASP.NET.  I had no 
> problems with console programs.)
>
> 1) *Can't locate assemblies in "bin"*.  RT.load only looks for assemblies 
> in "AppDomain.CurrentDomain.BaseDirectory".  For ASP.NET applications, 
> this is the root of the site, and assemblies are located under "bin".  I 
> did the following in RT.cs to get around this:
>
> @@ -3122,6 +3122,14 @@ namespace clojure.lang
>  
>  bool loaded = false;
>  
> +// Look for assembly alongside this one
> +if (assyInfo == null && cljInfo == null) {
> +Uri codeBase;
> +
> +if 
> (Uri.TryCreate(Assembly.GetExecutingAssembly().CodeBase, UriKind.Absolute, 
> out codeBase)
> +&& codeBase.IsFile)
> +assyInfo = 
> FindFile(Path.GetDirectoryName(codeBase.LocalPath), assemblyname);
> +}
> +
>  if ((assyInfo != null &&
>  (cljInfo == null || assyInfo.LastWriteTime > 
> cljInfo.LastWriteTime)))
>
> Assembly location was changed in changeset 02607349 to use a non-probing 
> path (although the paths returned by GetFindFilePaths() wouldn't locate in 
> bin, either).  ASP.NET includes "bin" in the standard probing path, but I 
> think you have to actually load it for that to work.
>
> 2)  *Static initialization error*.  After that, loading the assembly 
> results in the following error
>
> System.Reflection.TargetInvocationException: Exception has been thrown by 
> the target of an invocation. ---> System.TypeInitializationException: The 
> type initializer for '__Init__' threw an exception. ---> 
> System.NullReferenceException: Object reference not set to an instance of 
> an object.
>   at clojure.lang.Compiler.FindDuplicateType(String typename) in 
> \Clojure\Clojure\CljCompiler\Compiler.cs:line 866
>   at clojure.lang.RT.classForName(String p) in 
> \Clojure\Clojure\Lib\RT.cs:line 2720
>   at __Init__.__static_ctor_helper_constants()
>   at __Init__..cctor()
>   --- End of inner exception stack trace ---
>   at __Init__.Initialize()
>   --- End of inner exception stack trace ---
>   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo 
> method, Object target, Object[] arguments, SignatureStruct& sig, 
> MethodAttributes methodAttributes, RuntimeType typeOwner)
>   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo 
> method, Object target, Object[] arguments, Signature sig, MethodAttributes 
> methodAttributes, RuntimeType typeOwner)
>   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, 
> Boolean skipVisibilityChecks)
>   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
>   at System.RuntimeType.InvokeMember(String name, BindingFlags 
> bindingFlags, Binder binder, Object target, Object[] providedArgs, 
> ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
>   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder 
> binder, Object target, Object[] args)
>   at clojure.lang.Compiler.LoadAssembly(FileInfo assyInfo) in 
> \Clojure\Clojure\CljCompiler\Compiler.cs:line 1275
>
> Without getting too deep into the 
> code,
>  
> this is apparently due to the lexical order of the static initializers.  It 
> goes away if you move the following line in Compiler.cs to the top of the 
> class:
>
> static Dictionary _duplicateTypeMap = new 
> Dictionary();
>
> Presumably, "FindDuplicateType" is in the call chain of a static 
> initializer that appears above it — at least when running in ASP.NET.
>
> So I'm up and running now, but I'd like to help out if possible.
>
> Thanks,
> Gavin
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, s

[ANN] Cloverage - clojure code coverage

2013-01-26 Thread Jacek Lach
Cloverage 1.0.2 together with a leiningen plugin (lein-cloverage) were 
recently released.

You can find the code at https://github.com/lshift/cloverage

To try it out, add `[lein-cloverage "1.0.2"]` to your leiningen plugins 
list, and run `lein cloverage` in your project.

Best Regards

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: [ANN] Cloverage - clojure code coverage

2013-01-26 Thread Wolodja Wentland
On Sat, Jan 26, 2013 at 07:42 -0800, Jacek Lach wrote:
> Cloverage 1.0.2 together with a leiningen plugin (lein-cloverage) were 
> recently
> released.
> 
> You can find the code at https://github.com/lshift/cloverage
> 
> To try it out, add `[lein-cloverage "1.0.2"]` to your leiningen plugins list,
> and run `lein cloverage` in your project.

That looks useful, but it would be great if you could have some example output
on github. That way (potential) users could immediately see if the tool is
useful for them without having to install it first.
-- 
Wolodja 

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


signature.asc
Description: Digital signature


Re: Installing Clojure on Windows 7

2013-01-26 Thread Phil Hagelberg

sampson.jo...@googlemail.com writes:

> More positively, perhaps there could be a 'snapshot' build of
> everything required, tested on Windows 7 and downloadable from
> official sites.

I'm confused; are you having trouble setting up Clojure or Emacs? Emacs
is not affiliated with Clojure in any way. In fact, the GNU project is
pretty up-front about the fact that Windows support is not considered a
priority.

> If that is so should the developers not be frank up front and say
> that Clojure is not meant to be used on Windows? 

I don't think I've ever made the claim that any of the software I
maintain is supported on Windows in an official fashion, but maybe that
could be made clearer. The Windows compatibility all comes from
community contributions where people have found problems and submitted
patches to fix them.

-Phi

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




[ANN] Overtone 0.8.0 - "Performance Ready"

2013-01-26 Thread Sam Aaron
Hi everyone,

In case you were wondering how you might raise your spirits now that Christmas 
is well and truly over - I have the answer! Overtone 0.8 is here and is ready 
to bring joy to you all!

We've been working hard for 7 long months on this release and things are really 
starting to shine. I've personally been using Overtone for a number of live 
performances in art galleries and conferences around Europe on my own and as 
part of my band Meta-eX and I can really vouch that this release is 
"Performance Ready"!

If you haven't dipped your toes into the exciting Overtone waters, now is the 
perfect time to get rocking. We've got a whole bunch of great examples in the 
overtone/examples directory to get started with as well as a plethora of 
fantastic new features.

Highlights include:

* New, all Clojure, in-memory scsynth interface using clj-native - now 
supporting Windows in addition to Linux and OS X
* New (optionally disabled) machinery to stop the control and modification of 
non-live nodes (controlling loading nodes blocks the current thread and 
controlling destroyed nodes throws an exception).
* New event handler `on-latest-event`  which serially handles incoming events 
with the lowest latency by dropping events it hasn't had time to handle, yet 
always handling the last event seen.
* Major progress has been made porting the metadata for the extra ugens not 
included by default in SuperCollider. See 
`overtone/sc/machinery/ugen/metadata/extras/README.md` for progress
* Complete overhaul of the default group structure. See `foundation-*` fns.
* Many new synths
* Many, many new ugens: major progress has been made porting the metadata for 
the extra ugens not included by default in SuperCollider. See 
`overtone/sc/machinery/ugen/metadata/extras/README.md` for progress.
* Clojure 1.5 compatibility

Full release notes: 
https://github.com/overtone/overtone/blob/release/0.8.0/CHANGELOG.md
Overtone Repo: https://github.com/overtone/overtone

As always, the Overtone Cheatsheet gives an overview of the full API: 

So give it a try. Add [overtone "0.8.0"] to your lein 2+ project and evaluate 
(use 'overtone.live) in your REPL then come and share your musical/sonic/noise 
exploits over on the Overtone mailing list: 
http://groups.google.com/group/overtone


Sam 

---
http://sam.aaron.name




-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: [ANN] Overtone 0.8.0 - "Performance Ready"

2013-01-26 Thread Sam Aaron
Hey Craig,

sorry, that was a tiny glitch which is now resolved. I pulled out the GUI 
widgets from this release as I found a number of issues with them at the last 
minute and want them to be super stable and polished when we release them. 
Hopefully this will be for the next release.

Sam

---
http://sam.aaron.name

On 26 Jan 2013, at 19:55, Craig Pennington  wrote:

> Hey Sam,
> 
> Great! I've been fooling around with RC20 and been having lots of fun.
> 
> I changed my project.clj to use the release & ran into a bit of trouble.
> 
> cpennington:badbrains cpennington$ lein repl
> nREPL server started on port 64902
> REPL-y 0.1.9
> Clojure 1.4.0
> Exit: Control+D or (exit) or (quit)
> Commands: (user/help)
> Docs: (doc function-name-here)
>   (find-doc "part-of-name-here")
>   Source: (source function-name-here)
>   (user/sourcery function-name-here)
>  Javadoc: (javadoc java-object-or-class-here)
> Examples from clojuredocs.org: [clojuredocs or cdoc]
>   (user/clojuredocs name-here)
>   (user/clojuredocs "ns-here" "name-here")
> user=> (use 'overtone.live)
> --> Loading Overtone...
> FileNotFoundException Could not locate overtone/gui/mixer__init.class or 
> overtone/gui/mixer.clj on classpath:   clojure.lang.RT.load (RT.java:432)
> 
> user=> Bye for now!
> 
> So it's not finding the overtone/gui/mixer.clj
> 
> cpennington:badbrains cpennington$ for i in  `grep overton /tmp/list`; do 
> echo $i; ( jar -tvf $i | grep mixer ); done
> /Users/cpennington/.m2/repository/overtone/byte-spec/0.3.1/byte-spec-0.3.1.jar
> /Users/cpennington/.m2/repository/overtone/at-at/1.1.1/at-at-1.1.1.jar
> /Users/cpennington/.m2/repository/overtone/scsynth-extras/3.5.7.0/scsynth-extras-3.5.7.0.jar
> /Users/cpennington/.m2/repository/overtone/scsynth/3.5.7.0/scsynth-3.5.7.0.jar
> /Users/cpennington/.m2/repository/overtone/overtone/0.8.0/overtone-0.8.0.jar
>   9065 Fri Jan 18 22:40:54 EST 2013 overtone/studio/mixer.clj
> /Users/cpennington/.m2/repository/overtone/midi-clj/0.5.0/midi-clj-0.5.0.jar
> /Users/cpennington/.m2/repository/overtone/osc-clj/0.9.0/osc-clj-0.9.0.jar
> /Users/cpennington/.m2/repository/overtone/libs.handlers/0.2.0/libs.handlers-0.2.0.jar
> 
> 
> Only sees the studio one. Double checking RC20 gives:
> 
> cpennington:badbrains cpennington$ for i in  `grep overton /tmp/list| sed 
> 's/0.8.0/0.8.0-RC20/g'`; do echo $i; ( jar -tvf $i | grep mixer ); done
> /Users/cpennington/.m2/repository/overtone/byte-spec/0.3.1/byte-spec-0.3.1.jar
> /Users/cpennington/.m2/repository/overtone/at-at/1.1.1/at-at-1.1.1.jar
> /Users/cpennington/.m2/repository/overtone/scsynth-extras/3.5.7.0/scsynth-extras-3.5.7.0.jar
> /Users/cpennington/.m2/repository/overtone/scsynth/3.5.7.0/scsynth-3.5.7.0.jar
> /Users/cpennington/.m2/repository/overtone/overtone/0.8.0-RC20/overtone-0.8.0-RC20.jar
>   2492 Thu Jun 28 15:32:38 EDT 2012 overtone/gui/mixer.clj
>   9065 Fri Jan 18 23:40:54 EST 2013 overtone/studio/mixer.clj
> /Users/cpennington/.m2/repository/overtone/midi-clj/0.5.0/midi-clj-0.5.0.jar
> /Users/cpennington/.m2/repository/overtone/osc-clj/0.9.0/osc-clj-0.9.0.jar
> /Users/cpennington/.m2/repository/overtone/libs.handlers/0.2.0/libs.handlers-0.2.0.jar
> On Saturday, January 26, 2013 2:23:51 PM UTC-5, Sam Aaron wrote:
> 
> So perhaps this wasn't included in the uploaded release?
> 
> Thank you for a great tool, this weak player really appreciates it!
> 
> Cheers,
>   Craig
>  
> Hi everyone, 
> 
> In case you were wondering how you might raise your spirits now that 
> Christmas is well and truly over - I have the answer! Overtone 0.8 is here 
> and is ready to bring joy to you all! 
> 
> We've been working hard for 7 long months on this release and things are 
> really starting to shine. I've personally been using Overtone for a number of 
> live performances in art galleries and conferences around Europe on my own 
> and as part of my band Meta-eX and I can really vouch that this release is 
> "Performance Ready"! 
> 
> If you haven't dipped your toes into the exciting Overtone waters, now is the 
> perfect time to get rocking. We've got a whole bunch of great examples in the 
> overtone/examples directory to get started with as well as a plethora of 
> fantastic new features. 
> 
> Highlights include: 
> 
> * New, all Clojure, in-memory scsynth interface using clj-native - now 
> supporting Windows in addition to Linux and OS X 
> * New (optionally disabled) machinery to stop the control and modification of 
> non-live nodes (controlling loading nodes blocks the current thread and 
> controlling destroyed nodes throws an exception). 
> * New event handler `on-latest-event`  which serially handles incoming events 
> with the lowest latency by dropping events it hasn't had time to handle, yet 
> always handling the last event seen. 
> * Major progress has been made porting the metadata for the extra ugens not 
> included by default in SuperCollider. See 
> `overtone/sc/machinery/ugen/metadata/extra

Re: [ANN] Overtone 0.8.0 - "Performance Ready"

2013-01-26 Thread Sam Aaron

On 26 Jan 2013, at 20:17, Sam Aaron  wrote:

> I pulled out the GUI widgets from this release as I found a number of issues 
> with them at the last minute and want them to be super stable and polished 
> when we release them.

I should also say that these GUI widgets are currently in the MASTER branch on 
Github:

https://github.com/overtone/overtone/tree/master/src/overtone/gui

So if you want to play around with them and help polish and develop them 
further, then please do.

Sam

---
http://sam.aaron.name

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread Laurent PETIT
On Jan 26, 2013 12:29 PM, "AtKaaZ"  wrote:
>
> so, wait, are you having any trouble with eclipse+counterclockwise ? it
seems to be pretty straight forward, considering that I actually failed to
use emacs myself (although I did get emacs-live working, i prefer
eclipse+ccw for now)
>

I confirm that windows compatibility is in the goals of CounterClockWise
and will be addressed as seriously as any other issue that might be raised
on the project.

I doubt you'll have windows specific problems with the current stable
version.

>
> On Sat, Jan 26, 2013 at 12:24 PM,  wrote:
>>
>>
>>
>> On Friday, January 25, 2013 6:19:38 PM UTC, Phil Hagelberg wrote:
>>>
>>>
>>> sampso...@googlemail.com writes:
>>>
>>> > I have tried clojure-mode, creating .emacs.d in Emacs-24.2 - it
complained
>>> > that there is no emacs_24.2/.emacs.d (note the underscore) and
proceeded to
>>> > create one. However, the material I pasted from blogs had fatal
errors in
>>> > it.
>>>
>>> Most of what you read on blogs is either wrong from the beginning or
>>> wrong by the time you actually read it; the official documentation
>>> should always be your starting point. However, in this case
>>> clojure-doc.org has an overview that is wider in scope than the
>>> documentation for any individual package:
>>>
>>> http://clojure-doc.org/articles/tutorials/emacs.html
>>>
>>> However, very few contributors are familiar with Windows. If you find
>>> the fix for the problem you encountered, please consider improving the
>>> documentation.
>>>
>>> -Phil
>>
>>
>> If that is so should the developers not be frank up front and say
>> that Clojure is not meant to be used on Windows? It won't do Clojure's
>> image any good if Windows users are spending hours vainly struggling
>> to install stuff, following misleading advice. More positively, perhaps
there
>> could be a 'snapshot' build of everything required, tested on Windows 7
and
>> downloadable from official sites.
>>
>> Regards
>>
>> John
>>
>> --
>> --
>> 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 to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>>
>
>
>
>
> --
> I may be wrong or incomplete.
> Please express any corrections / additions,
> they are encouraged and appreciated.
> At least one entity is bound to be transformed if you do ;)
>
> --
> --
> 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 to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread Ryan Cole
It's actually pretty simple, if you decide to use leiningen and light 
table, the editor. All you have to do is install the JDK (decline the JRE 
option, when it asks) and then put leiningen and light table on your system 
path. You're done. Leiningen and light table will download dependencies as 
needed, including Clojure.

Ryan

On Thursday, January 24, 2013 11:56:59 AM UTC-6, sampso...@googlemail.com 
wrote:
>
> Apparently installing a development environment for Clojure on Windows 7 
> is very difficult. What is the best way, that has a chance that it might 
> work?
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Importing gen-class classes from one namespace into another, like Java?

2013-01-26 Thread Ryan Cole
I'm basically writing a jar to be used entirely from a Java application, in 
Clojure. I don't know if it's better to just use Java for this yet, or not. 
I'm experimenting, though.

I've got every namespace in my Clojure project compiling using AOT. In one 
namespace, I use gen-class to create a class. In another namespace, I need 
to create an instance of that class. Do I have to import that class like I 
would Java classes? I've tried several methods and I keep getting class not 
found exceptions.

Below is my pretty basic code:

*core.clj*

> (ns com.rycole.bukkit-plugin.core
>
>   (:import [com.rycole.bukkit-plugin.listeners PlayerLoginListener])
>
>   (:gen-class :name com.rycole.bukkit-plugin.core.Main
>
>   :extends org.bukkit.plugin.java.JavaPlugin))
>
>
>> (defn -onEnable [this]
>
>   (.info (.getLogger this) "PLUGIN ENABLED")
>
>   (.registerEvents (.getPluginManager (.getServer this)) 
>> (com.rycole.bukkit-plugin.listeners.PlayerLoginListener.) this))
>
>
>> (defn -onDisable [this]
>
>   (.info (.getLogger this) "PLUGIN DISABLED"))
>
>
*listeners.clj*

> (ns com.rycole.bukkit-plugin.listeners

  (:gen-class :name com.rycole.bukkit-plugin.listeners.PlayerLoginListener

  :implements org.bukkit.event.Listener

  :methods [[^{org.bukkit.event.EventHandler true} 
> onPlayerLoggedIn [org.bukkit.event.PlayerLoginEvent] void]]))


> (defn -onPlayerLoggedIn [this evnt]

  (.info (.getLogger this) "PLAYER LOGGED IN")) 

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Importing gen-class classes from one namespace into another, like Java?

2013-01-26 Thread Ryan Cole
I forgot to mention, I also tried replacing the dashes with underscores, in 
the import namespace in the core.clj file. Same error.

Ryan

On Saturday, January 26, 2013 4:21:24 PM UTC-6, Ryan Cole wrote:
>
> I'm basically writing a jar to be used entirely from a Java application, 
> in Clojure. I don't know if it's better to just use Java for this yet, or 
> not. I'm experimenting, though.
>
> I've got every namespace in my Clojure project compiling using AOT. In one 
> namespace, I use gen-class to create a class. In another namespace, I need 
> to create an instance of that class. Do I have to import that class like I 
> would Java classes? I've tried several methods and I keep getting class not 
> found exceptions.
>
> Below is my pretty basic code:
>
> *core.clj*
>
>> (ns com.rycole.bukkit-plugin.core
>>
>>   (:import [com.rycole.bukkit-plugin.listeners PlayerLoginListener])
>>
>>   (:gen-class :name com.rycole.bukkit-plugin.core.Main
>>
>>   :extends org.bukkit.plugin.java.JavaPlugin))
>>
>>
>>> (defn -onEnable [this]
>>
>>   (.info (.getLogger this) "PLUGIN ENABLED")
>>
>>   (.registerEvents (.getPluginManager (.getServer this)) 
>>> (com.rycole.bukkit-plugin.listeners.PlayerLoginListener.) this))
>>
>>
>>> (defn -onDisable [this]
>>
>>   (.info (.getLogger this) "PLUGIN DISABLED"))
>>
>>
> *listeners.clj*
>
>> (ns com.rycole.bukkit-plugin.listeners
>
>   (:gen-class :name com.rycole.bukkit-plugin.listeners.PlayerLoginListener
>
>   :implements org.bukkit.event.Listener
>
>   :methods [[^{org.bukkit.event.EventHandler true} 
>> onPlayerLoggedIn [org.bukkit.event.PlayerLoginEvent] void]]))
>
>
>> (defn -onPlayerLoggedIn [this evnt]
>
>   (.info (.getLogger this) "PLAYER LOGGED IN")) 
>
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Importing gen-class classes from one namespace into another, like Java?

2013-01-26 Thread Meikel Brandmeyer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

you have to add a (:require com.rycole.bukkit-plugin.listeners) before
you import the class. And you have to replace dashes with underscores
on import.

Kind regards
Meikel

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRBF5NAAoJEM2sO9pIirXjOIQP+wRl6ETFDq20FATfSIWL/Mc7
moWbX/rAu5czC5VAi2r5nBM5qALH6nWxW+yrzwMk3Tq/+SFd+DwAs3jTqhRIzNgF
RIHMkjRCDiux33aSznojpW9DgVDC/20piyfgMCBvIWcYFVr8OW1Xuj9Vm8NAOm9M
O6mVHU4C9vJ7a+SAt+UeaNrLeSQrrQTkBei5O2RkG9z89HNNmvLKfW4nr1xlTV2K
QNXIG3nScgMpiQZyQNvQ4OQT1bhajz6QuGUtnz778yVju+fzg4b3tPKQtSHza0Li
jL+pJbsl4T0tPzDIlX8wc2+NEhFYJopd4zWCNjL4rf1itVIXT+Q3gZmw6RD29O4u
u6+vVyNbZfuCTqc4vT3W8/ZijGSWi229yQ8AchEYUlJBd3K1FWTb8vrmyQhPYbM8
IMWJ44aw9wSW8RFyJ8ST3YJT7g/3/q2H9iEVu8gXE62Hcl7Gy4rvsXOj/qj+FNo4
vfLQfLSiOQXYxZTKJyFQSwSbf0RvJdsnVoZvJJ3iIgj0m26cGHW00elTpAt3oWdy
EBvNaqmukV/HmYouN1TcBExrUa6XP62nCzA6jgVKYgDbORzZ514A1CpTW0h+HUCa
rIaGGCJSZPxj3rKlHRPIqMMNIrvBV36UMysHikllrGimojoLORUVoLjVLJbzglJY
iR9C8Rv8pBnLOM/PwYn5
=2A1Z
-END PGP SIGNATURE-

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread Sean Corfield
On Sat, Jan 26, 2013 at 3:24 AM,   wrote:
> If that is so should the developers not be frank up front and say
> that Clojure is not meant to be used on Windows?

Clojure works just fine on Windows. As I said, I've set up Clojure
development environments on a number of Windows machines now and it
really isn't that difficult.

> It won't do Clojure's
> image any good if Windows users are spending hours vainly struggling
> to install stuff, following misleading advice.

It's hard to know what to do about all the misleading advice out there
- it's not like Clojure/core or Clojure/dev can magically wave some
wand and make all the bad blog posts go away :(

It's like all the people who post about "brew install clojure" - just
install the Leiningen shell script and you're done. Again, not much
can be done about people using brew to 'install' Clojure :(

> More positively, perhaps there
> could be a 'snapshot' build of everything required, tested on Windows 7 and
> downloadable from official sites.

I'm not quite sure what you're looking for here...?
* The official Leiningen site has the .bat file that works on Windows.
* The official Emacs (GNU) site has the .exe that works on Windows.
* The official LightTable site has the .zip file that works on Windows.
And the same goes for Eclipse and CCW - again on separate sites - or
IntelliJ and La Clojure or...

Clojure itself is just one small component in a "Clojure development
environment" and there are lots of choices for developers.
Clojure/core is only responsible for Clojure itself and the official
site has a JAR file that works on Windows.

I guess I would ask: what is your previous development stack and did
it have a snapshot build of everything required that could be download
from a single "official" site?
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Blog Post: "The Magic of Macros: Lighting-Fast Templating in ClojureScript"

2013-01-26 Thread Curtis Gagliardi
Great use of macros, and I found Chris Granger's protocol commit 
enlightening as well, thanks.

On Tuesday, January 22, 2013 12:45:34 PM UTC-6, Aria Haghighi wrote:
>
> Hi all,
>
>   I've done a follow-up post on the Prismatic blog about our dommy, our 
> ClojureScript templating library. We added some macros to parse nested 
> vector data structures at compile time
> into direct DOM creation code. The resulting speedup is pretty dramatic 
> about 5x, bring ClojureScript templating to roughly 3x faster than a jQuery 
> baseline. This is a trick I know Hiccup and some other libraries do but I 
> thought it might be worth document/explaining this kind of application of 
> macros. 
>
>
> http://blog.getprismatic.com/blog/2013/1/22/the-magic-of-macros-lighting-fast-templating-in-clojurescript
>
> Thanks, Aria
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread Ravi Sundaar
I am running into problems getting emacs (24.2) to work with clojure as 
well on windows 7. I have installed leiningen fine. Clojure (1.4.0) itself 
seems to be behaving. The packages seem to install fine in emacs - no 
problems. When I invoke "nrepl-jack-in" from emacs, I get an "Access 
Denied" error. No idea what that could be. There does not seem to be any 
discussions on this on the web. 

Any thoughts? Should I abandon the emacs approach on windows and choose a 
different editor?

On Thursday, January 24, 2013 12:56:59 PM UTC-5, sampso...@googlemail.com 
wrote:
>
> Apparently installing a development environment for Clojure on Windows 7 
> is very difficult. What is the best way, that has a chance that it might 
> work?
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread Gregory Graham
I'm a Clojure newbie, and during Christmas break I decided to learn 
Clojure, and installed it on my Mac, using Emacs, Nrepl, and Leiningen 2. 
When I got back to work, I put the same setup on my Windows 7 machine, and 
the only issue was the lack of wget. So, I installed 
Gnuwin32, 
and everything works fine. I was already using git for version control, so 
that wasn't a problem.

I will say that I had used Emacs several times in my career when working in 
a Unix environment, but did not like it on Windows. However, when I tried 
Emacs 24 on Windows a couple of weeks ago, I was pleasantly surprised, and 
it has now become my main editor at home and at work.

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: iOS and Windows RT support?

2013-01-26 Thread Gregory Graham
For iOS, I would take a look at 
clojure-scheme, 
which translates Clojure to Gambit Scheme, which then compiles to C. Gambit 
Scheme has been used successfully to create iOS apps. You can see more 
discussion here
.

On Thursday, January 24, 2013 10:26:54 AM UTC-6, vemv wrote:
>
> From what I can read, what one can't install is a JVM, an arbitrary code 
> interpreter, etc. A program compiled to ARM objcode would be legal. So 
> would be an interpreter iff it only executes the bundled code with it.
>
> On Thu, Jan 24, 2013 at 4:39 PM, Jack Moffitt 
> > wrote:
>
>> > Relatively succesfull efforts have been made to compile Clojure to 
>> ObjC, but
>> > they aren't legally usable in practice.
>>
>> Why wouldn't a cross compiler be legal? There are tons of apps in the
>> App Store that were originally written in C# and Lua (lots of game
>> frameworks compile down from higher level languages). My understanding
>> of the rules is that you can't ship code over the wire at run time to
>> be executed in your app, unless it's inside a WebKit view, but
>> otherwise, you're free to embed an interpreter or cross compile the
>> code all you want.
>>
>> jack.
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>>
>>
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Installing Clojure on Windows 7

2013-01-26 Thread Eric MacAdie
OT: It looks like Gnuwin32 has not been updated in a while.

When I use a Windows machine, I always install cygwin: http://cygwin.com/

You can install emacs from that.

I feel like attaching a pic with the Dos Equis Most Interesting Man meme:
I don't always use Windows. But when I do, I install Cygwin.

- Eric MacAdie



On Sat, Jan 26, 2013 at 7:22 PM, Gregory Graham  wrote:

> I'm a Clojure newbie, and during Christmas break I decided to learn
> Clojure, and installed it on my Mac, using Emacs, Nrepl, and Leiningen 2.
> When I got back to work, I put the same setup on my Windows 7 machine, and
> the only issue was the lack of wget. So, I installed 
> Gnuwin32,
> and everything works fine. I was already using git for version control, so
> that wasn't a problem.
>
> I will say that I had used Emacs several times in my career when working
> in a Unix environment, but did not like it on Windows. However, when I
> tried Emacs 24 on Windows a couple of weeks ago, I was pleasantly
> surprised, and it has now become my main editor at home and at work.
>
> --
> --
> 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 to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
>
>

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Macro with odd behavior

2013-01-26 Thread dabd
I defined this macro https://gist.github.com/4646206 that expands to a 
function.

It behaves like this 
mycode.core> ((interval-test-fn "9.0,9.7-10.8,19.1+") 19.1)
false

mycode.core> (macroexpand-1 '(interval-test-fn "9.0,9.7-10.8,19.1+"))
(clojure.core/fn [v8568] (clojure.core/or (clojure.core/<= v8568 9.0) 
(clojure.core/and (clojure.core/>= v8568 9.7) (clojure.core/<= v8568 10.8)) 
(clojure.core/>= v8568 19.1)))

mycode.core> ((clojure.core/fn [v8568] (clojure.core/or (clojure.core/<= 
v8568 9.0) (clojure.core/and (clojure.core/>= v8568 9.7) (clojure.core/<= 
v8568 10.8)) (clojure.core/>= v8568 19.1))) 19.1)
true


So if I call the resulting function with the argument 19.1 it returns false 
but if I call the macro expanded code directly with the same argument it 
returns true.
How to explain this?

Thanks.

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en




Re: Macro with odd behavior

2013-01-26 Thread Andy Fingerhut
I do not know exactly what is going on, but suspect it is something to do with 
conversion between float and double (or Java Float and Double).

Try replacing the argument 19.1 with each of these possibilities, and you 
should see what I mean:

(double 19.1)
(Double. 19.1)
(float 19.1)
(Float 19.1)

Andy

On Jan 26, 2013, at 8:33 PM, dabd wrote:

> I defined this macro https://gist.github.com/4646206 that expands to a 
> function.
> 
> It behaves like this 
> mycode.core> ((interval-test-fn "9.0,9.7-10.8,19.1+") 19.1)
> false
> 
> mycode.core> (macroexpand-1 '(interval-test-fn "9.0,9.7-10.8,19.1+"))
> (clojure.core/fn [v8568] (clojure.core/or (clojure.core/<= v8568 9.0) 
> (clojure.core/and (clojure.core/>= v8568 9.7) (clojure.core/<= v8568 10.8)) 
> (clojure.core/>= v8568 19.1)))
> 
> mycode.core> ((clojure.core/fn [v8568] (clojure.core/or (clojure.core/<= 
> v8568 9.0) (clojure.core/and (clojure.core/>= v8568 9.7) (clojure.core/<= 
> v8568 10.8)) (clojure.core/>= v8568 19.1))) 19.1)
> true
> 
> 
> So if I call the resulting function with the argument 19.1 it returns false 
> but if I call the macro expanded code directly with the same argument it 
> returns true.
> How to explain this?
> 
> Thanks.

-- 
-- 
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 to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en