What profilers are you using?

2009-02-06 Thread Sergio

I have been trying out the YourKit profiler and I think it's great.
However, my evaluation license is going to expire soon and being a
student I can't purchase (even the academic) license right now.

I have tried profiler4j and it is usable but it isn't working 100%
right with clojure (in my case). Jrat (http://jrat.sourceforge.net/)
seems promising as well as JIP (http://jiprof.sourceforge.net/) (the
fact that it outputs text means that there could be easy integration
with Emacs with some Elisp code), but I haven't tried them yet.
Nothing I have checked out seems as nice as YourKit, although those
two I mentioned appear to get close.
Again, I haven't tried them. I am going to, and they would probably
meet my needs perfectly, but still.. If anyone knows of something
better or has any recommendations/opinions they could share, please
do. 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
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 profilers are you using?

2009-02-06 Thread Sergio

Thanks! I hadn't seen the EAP option =) I'm going to go with that.

On Feb 6, 11:57 am, Jason Wolfe  wrote:
> +1 for the EAP of YourKit.  It will expire every now and then, but you
> just download the new version.
>
> The only problem I have is that as far as I can figure out, it can't
> display source code associated with a function either.  This is
> usually fine, except for that it can be impossible to figure out which
> anonymous function is which, and even worse, it seems that the Clojure
> compiler currently names methods like anonymous functions (so you
> can't tell which method name, let alone instance, is actually being
> called).  I plan on trying to implement / ask for more descriptive
> method and anonymous function names (e.g., including line numbers) at
> some point.
>
> -Jason
>
> On Feb 6, 4:44 am, Mark McGranaghan  wrote:
>
> > You can use the Early Access version of YourKit: it does not require a
> > license key and in my experience works great:
>
> >http://www.yourkit.com/eap/index.jsp
>
> > - Mark
>
> > On Thu, Feb 5, 2009 at 10:47 PM, Sergio  wrote:
>
> > > I have been trying out the YourKit profiler and I think it's great.
> > > However, my evaluation license is going to expire soon and being a
> > > student I can't purchase (even the academic) license right now.
>
> > > I have tried profiler4j and it is usable but it isn't working 100%
> > > right with clojure (in my case). Jrat (http://jrat.sourceforge.net/)
> > > seems promising as well as JIP (http://jiprof.sourceforge.net/) (the
> > > fact that it outputs text means that there could be easy integration
> > > with Emacs with some Elisp code), but I haven't tried them yet.
> > > Nothing I have checked out seems as nice as YourKit, although those
> > > two I mentioned appear to get close.
> > > Again, I haven't tried them. I am going to, and they would probably
> > > meet my needs perfectly, but still.. If anyone knows of something
> > > better or has any recommendations/opinions they could share, please
> > > do. 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
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: Speed issues vs. Python

2009-03-12 Thread Sergio

You should profile your code.

A cousin of mine was solving a problem from programmingchallenges.com
in C++. I wrote a solution in Clojure.
At the beginning, my version was astronomically slower. After
profiling, I reduced it to about 2x slower.
After modifying it to use Java arrays, it actually became as fast or
faster than my cousin's C++ solution.

See this question I posted a while ago:

http://groups.google.com/group/clojure/browse_thread/thread/4d8356465b294e44/7cd4facb86a04f64?hl=en&lnk=gst&q=profilers
I ended up preferring the JVisualVM profiler that comes with the JVM.

Clojure is more than fast enough. It's just extremely easy to write
very, very slow code.

On Mar 12, 12:48 am, tristan  wrote:
> Hi guys,
>
> I'm loving Clojure, but i'm having a lot of trouble writing programs
> in it that run as fast as my python equivalents.
> One example is code i've written for projecteuler.net problem 87 (for
> those who don't want to see any solutions don't click the links
> below :))
> my python 
> versionhttp://github.com/tristan/project-euler-code/blob/4a17bc271b4b2743ee1...
> runs in ~4 seconds (timed using cygwin "time python 0087.py" whereas
> my clojure 
> versionhttp://github.com/tristan/project-euler-code/blob/4a17bc271b4b2743ee1...
> takes over 20 seconds (time gotten from (time call in the code). This
> is quite disheartening for me as well since i wrote the python version
> in about a minute and haven't even thought about optimizations yet. It
> was just written as a test since i was unhappy with the speed of my
> clojure version even after re-writing it a few times and shaving off
> about 20 seconds from my original.
>
> I'm sure there must be something i'm doing wrong, or thinking wrongly
> about hence why i'm not getting the speed i need. Can anyone suggest
> any alternate ways to write this? or anything to speed it up? I really
> enjoy programming in Clojure, but speed is starting to become an issue
> with me.
>
> Thanks
> -Tristan
--~--~-~--~~~---~--~~
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
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 profilers are you using?

2009-03-12 Thread Sergio

I don't have trouble connecting from Emacs. I just added
 (setq swank-clojure-extra-vm-args (list "-
Dcom.sun.management.jmxremote=true" )
to my clojure swank configuration.

On Mar 12, 10:47 am, Scott Jaderholm  wrote:
> On Sat, Feb 7, 2009 at 8:16 AM, David Powell  wrote:
>
> > Newer versions of JDK 1.6, eg Update 11, have an application called
> > 'jvisualvm' in the bin directory. It lets you attach to any running
> > Java process and it has a profiler that you can switch on at runtime.
>
> If you're starting Clojure from inside Emacs under Windows then you might
> have trouble connecting to it with VisualVM. Start Clojure from outside
> emacs, connect to it using slime, and VisualVM should work fine.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Performance tips for Clojure

2009-03-12 Thread Sergio

Hi!
I have been programming in clojure for a few months now. I really like
the language.
Something that I have noted is that it is very easy to write slow
Clojure code.
After doing some programming and spending time optimizing things, I
decided to write on my blog some points on how to write efficient
Clojure code.

http://devlog.bigmonachus.org/2009/03/performance-tips-for-clojure.html

There are a couple of obvious ones, but also some others that I
haven't seen documented (like, map is much faster on lists than on
vectors since rest is O(1) for lists).
The list is not complete. Maybe you can tell me some other tips
--~--~-~--~~~---~--~~
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
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: Performance tips for Clojure

2009-03-13 Thread Sergio

Sorry =( I am horribly mistaken
I should have taken my time before posting..
But still, I really thought cons on vectors was O(n) base on
PersistentVector.java, line 148 (The version I'm reading is not the
current SVN head, so I don't know if it is that line for you)
Here is the snippet:

if(tail.length < 32)
{
Object[] newTail = new Object[tail.length + 1];
System.arraycopy(tail, 0, newTail, 0, tail.length);
newTail[tail.length] = val;
return new PersistentVector(meta(), cnt + 1, shift, root, 
newTail);
}
I thought it was O(n) because of the System.arraycopy. I'm guessing
that for length<32 that is considered "constant" and the rest of the
cons function does something else.

Here is the microbenchmark that made me think map was slower on
vectors:

(def ls (list (range 100)))
(def vc (vec (range 100)))

(time (dorun (map (fn [x]) ls)))
"Elapsed time: 3.184435 msecs"

(time (dorun (map (fn [x]) vc)))
"Elapsed time: 498.535303 msecs"

Maybe you can explain it to me (On my blog I posted that maybe it was
because map was converting the vector to a seq and that was O(n), but
you just told me that converting vector to seq is O(n).


On Mar 13, 12:49 am, Chouser  wrote:
> On Fri, Mar 13, 2009 at 2:18 AM, Sergio  wrote:
>
> > There are a couple of obvious ones, but also some others that I
> > haven't seen documented (like, map is much faster on lists than on
> > vectors since rest is O(1) for lists).
>
> You're right that 'rest' is O(1) for lists, but it's O(1) for vectors as well.
>
> Your blog post include this table:
>
> > rest - O(1) for lists. O(n) for vectors.
> > count - O(1) for lists and vectors
> > nth - O(n) for lists. O(1) for vectors.
> > cons - O(1) for lists, O(n) for vectors
>
> This has a couple errors.  Both 'rest' and 'cons' are O(1) on vectors.
> I'm not sure what in the source code led you to believe otherwise.
> Both 'rest' and 'cons' create a seq from the vector, but this is an
> O(1) operation.  You can also run some timing experiments and see that
> 'map' is at least as fast on vectors as on lists.
>
>   (defn timemap [c]
>     (time
>       (dotimes [i 100]
>         (last (map identity c)
>
>   (timemap (into [] (range 1)))  ==> "Elapsed time: 158.464048 msecs"
>   (timemap (into [] (range 10))) ==> "Elapsed time: 1690.745615 msecs"
>
> Note that multiplying the length of the vector by 10 increased the
> time by roughly 10 -- this suggests an O(n) operation, as we would
> expect.
>
>   (timemap (into () (range 1)))  ==> "Elapsed time: 185.460957 msecs"
>   (timemap (into () (range 10))) ==> "Elapsed time: 1821.346964 msecs"
>
> Again we see evidence of 'map' being O(n), but when walking across a
> list it appears to run slightly *slower* than across a vector, though
> probably not by enough to be significant.
>
> We can even time 'rest' itself:
>
>   (defn timerest [c]
>     (time
>       (dotimes [i 100]
>         (rest c
>
>   (timerest (into [] (range 1)))  ==> "Elapsed time: 125.826519 msecs"
>
> If 'rest' were O(n) on vectors, we should be able to multiply the
> length of the vector by 100 and see the time go up by roughly 100x:
>
>   (timerest (into [] (range 100)))  ==> "Elapsed time: 147.096976 msecs"
>
> The amount of time it takes to build the vector goes up significantly,
> but the timed part, calling 'rest' a million times, doesn't take
> anywhere near 100 times longer.
>
> --Chouser
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Problemm with JComponent

2010-02-28 Thread Sergio Arbeo
Hi, all:

I'm learning Clojure through porting Magick4J to clojure, I call it
rinzelight. I'm having problems to port the display method (
http://github.com/Serabe/RMagick4J/blob/master/Magick4J/src/magick4j/MagickImage.java#L271
).

http://github.com/Serabe/rinzelight/blob/master/src/rinzelight/display_image.clj

Methods jcomponent and configured-jcomponent creates a JComponent
proxy that draws the image (puts method is there just to check that
paintComponent is not being called).

The display-fn is just a direct port from run method in the
MagickImage display method.

The problem is that image is not being rendered in the JFrame.
paintComponent is not being called actually. Any clue of what am I
doing wrong?

Thank you very much,

Serabe

-- 
http://sergio.arbeo.net
http://www.serabe.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


Help with proxy method

2010-03-31 Thread Sergio Arbeo
I'm porting some code from Java to Clojure but I'm still stuck porting
a JComponent. The original code is here:

http://github.com/Serabe/RMagick4J/blob/master/Magick4J/src/magick4j/MagickImage.java#L282

It is quite simple, I just need it to display an image. I implemented
the JComponent using the proxy method:

http://github.com/Serabe/rinzelight/blob/master/src/rinzelight/display_image.clj#L15

it is configured in the method configured-jcomponent which is called
in display-fn, adding it to a JFrame. That JFrame is showed but the
image is not being displayed.

Any tip?

Thanks,

Serabe

-- 
http://sergio.arbeo.net
http://www.serabe.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

To unsubscribe, reply using "remove me" as the subject.


Re: Filtering lazy sequence on itself - Eratosthenes Sieve

2015-11-04 Thread Sergio Rupena
Hi

You can try the following

(defn dividers   [primes n]
  (take-while #(<= (* % %) n) primes))

(defn prime? [primes n]
  (every? #(pos? (rem n %))
  (dividers primes n)))

(defn range-peek [coll]
  (iterate inc (-> coll peek inc)))

(defn sieve
  ([] (cons 2 (lazy-seq (sieve [2]
  ([primes]
   (let [p (->> primes
range-peek
(filter (partial prime? primes))
first)]
 (cons p (lazy-seq (sieve (conj primes p)))

(last (take 1 (sieve)))

This version keeps the visited primes in a vector so it will grow in memory but 
won’t overflow otherwise.

Sergio

On 04 Nov 2015, at 15:44, Matthew Ulrich  wrote:

> All - 
> 
> I'm trying to generate a lazy sequence of primes using Erastosthenes Sieve 
> (from Abelson & Sussman) and am encountering some issues with lazy sequence.
> 
> Here's what I have:
> ---
> 
> (defn divisible?
>   [input numerator]
>   (= 0 (mod input numerator)))
> 
> (defn sieve
>   [stream]
>   (lazy-seq
> (cons
>   (first stream)
>   (sieve (filter #(not (divisible? % (first stream))) (rest stream))
> 
> (def primes (sieve (iterate inc 2)))
> 
> ---
> 
> This is fine now when I:
> 
> => (take 5 (drop 1000 primes))
> (7927 7933 7937 7949 7951)
> 
> 
> But when I:
> 
> => (take 5 (drop 4000 primes))
> StackOverflowErrorclojure.lang.LazySeq.sval  (LazySeq.java:40)
> 
> 
> --
> 
> I understand how the StackOverflow occurs with the filter on the recursively 
> generated sequence... however I can't think of a way to make this work..
> 
> I'm pretty new to clojure so I'm not very familiar with all of the language 
> features; is there some tool to help me realize this or should I just go 
> about the implementation in a different way?
> 
> Thanks - have a great morning!
> 
> Matty
> 
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] Nimrod: logs-based metrics server

2011-07-18 Thread Sergio Bossa
Hi guys,

Nimrod is a metrics server based on logs processing, and I've just
published its first (0.1) binary release:
https://github.com/sbtourist/nimrod
Any feedback, either on source code, product usage or features, as
well as any kind of contribution, will be greatly appreciated :)

Enjoy,

Sergio B.

-- 
Sergio Bossa
http://www.linkedin.com/in/sergiob

-- 
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: Code structure/design problems

2011-07-28 Thread Sergio Bossa
I also value pragmatism and code simplicity over everything else, so
I'd say: keep your "shared" state into "shared" refs, write down a few
functions to manage such a state and limit every state changing
activity to them, writing everything else, in particular all
algorithms and logic, in purely functional style.

Given Clojure facilities to manage shared state (that is, its STM), I
think this approach to be pretty Clojure-style and effective too.
Also, well-known Clojure programmers seem to use it, i.e.:
https://github.com/amitrathore/swarmiji
And, the author of the previously cited articles wrote another piece
about that, which seems to be more pragmatic:
http://prog21.dadgum.com/54.html

BTW, I'd also like to know what others think too.
Cheers,

Sergio B.

On Thu, Jul 28, 2011 at 8:44 AM, Oskar  wrote:
> On Jul 27, 5:07 pm, Benny Tsai  wrote:
>> Hi Oskar,
>>
>> I just came across this article yesterday, which I thought you may find
>> useful.  It's a 4-part series where the author discusses his experience
>> implementing games in a functional style:
>>
>> http://prog21.dadgum.com/23.html
>>
>> He was using Erlang, but I think many of the same ideas apply here as well.
>>  Hope this helps.
>
> Hm it seems like what he did was a bit extreme. Would you do it that
> way? In Clojure you could just use atoms and all would be well, right?
> My game is going to be quite a bit more complex than Pac-Man, the game-
> state is going to be way more complex.
>
> I have a hard time coming up reasons why this would be better. My
> function that I wanted that checks if two characters are close enough
> to each other is just a very small part of my game. And I could make
> just that function fuctional and my list of benefits would be nil.
> Sure, immutable data structures is great, for example, but in this
> case, I don't see how making the game purely functional would make the
> code better. But I could be wrong of course. It's kind of hard to
> imagine. If enough people say "Yes, do it!" I might try it.
>
> --
> 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



-- 
Sergio Bossa
http://www.linkedin.com/in/sergiob

-- 
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


Protocols as a way to improve modularity?

2011-08-30 Thread Sergio Bossa
Hi all,

in an attempt to find the more idiomatic way to modularize Clojure
applications, I was thinking at the role protocols play in such a
context.
That is, let's say we have a Clojure application with each source file
representing a different module (there may obviously be other files
with helper/util functions but we don't care about them): what's the
idiomatic way to "export" functions between modules? What about
grouping those functions in one or (a few) more protocols per module?
By doing so, we have a clear separation of the different modules, as
well as a clear identification of the exported functions, but we also
have more typing (protocol+record/type definition) and possibly
non-polymorphic use of protocols.
What are your thoughts about that?

Thanks!
Cheers!

Sergio B.

-- 
Sergio Bossa
http://www.linkedin.com/in/sergiob

-- 
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: Protocols as a way to improve modularity?

2011-08-30 Thread Sergio Bossa
On Tue, Aug 30, 2011 at 7:29 PM, Ambrose Bonnaire-Sergeant
 wrote:

> I've seen a common pattern of putting functions you want used by other
> namespaces in a group at
> the bottom of the file. The lack of forward declarations also encourages
> this.

Yep, I've already done that, just reasoning about alternative solutions.

> Although you seem to be more interested in C-style explicit "exports", I
> don't think this fits well with
> anything Clojure currently offers.

Nope, I'm more interested in Erlang-style modules and functions
"exports", but I agree my reasoning could have sounded a bit like
that.

Thanks for your feedback!

Sergio B.

-- 
Sergio Bossa
http://www.linkedin.com/in/sergiob

-- 
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] Nimrod 0.3: log-based metrics server

2011-12-02 Thread Sergio Bossa
Nimrod is a lightweight, not invasive, metrics server written in Clojure
and based on log processing: version 0.3 provides several new features and
enhancements, the most important one being a brand new metrics store which
can be either volatile, for short-living metrics, or persistent, for nearly
unlimited metrics and back-in-time history.
Other relevant enhancements are custom log identifiers, allowing users to
manually assign a custom name to processed logs, and an improved REST
interface.

Read about it and download at: https://github.com/sbtourist/nimrod
Provide your feedback at: http://groups.google.com/group/nimrod-user

Sergio B.

-- 
Sergio Bossa
http://www.linkedin.com/in/sergiob

-- 
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] rinzelight 0.0.2

2010-10-17 Thread Sergio Arbeo
Hi there,

I've just released rinzelight 0.0.2, an image library for Clojure. It
is my first clojure library, so please, comment, report bugs and ask
for features.

More info in the README and in here:
http://www.serabe.com/2010/10/17/introducing-rinzelight-0-0-2/

http://github.com/Serabe/rinzelight

Serabe

-- 
http://sergio.arbeo.net
http://www.serabe.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


Dot special form problem.

2010-10-18 Thread Sergio Arbeo
Hello, everyone,

I'm having problems with the dot special form. First things first, I
have src-out defined this way:

http://gist.github.com/632852

Then, I have problems using that function as an argument for a macro:

http://gist.github.com/632849

Evaluation aborted throws an exception, shown in one of the three
files. The original macro is there too. Why does that fail if it is
called with (src-out) but it doesn't if called with (src-out) already
evalled?

Thanks,

Serabe

-- 
http://sergio.arbeo.net
http://www.serabe.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: Dot special form problem.

2010-10-18 Thread Sergio Arbeo
So sorry. Now it is working. Don't know why though.


-- 
http://sergio.arbeo.net
http://www.serabe.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: Dot special form problem.

2010-10-18 Thread Sergio Arbeo
On 18 October 2010 22:05, Kevin Downey  wrote:
> clojure works something like reader -> macro expansion -> compiler (eval) -> 
> run
>
> the exception you are seeing means that your macro expansion contains
> a form that the compiler doesn't know how to generate code for. for
> example if your macro expansion contained a Graphics2d object the
> compiler would barf because it doesn't know how to generate code that
> will reconstruct that Graphics2d object at runtime.
>
> this happens a lot if you write macros and don't understand the
> difference between the stages given above. macros should generally not
> be running code, they should be emitting code that then gets compiled
> and later run.

Thank you for the explanation.

Serabe

-- 
http://sergio.arbeo.net
http://www.serabe.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


[ANN] rinzelight 0.0.3

2010-10-31 Thread Sergio Arbeo Rodríguez
Hi there,

rinzelight 0.0.3 is out! In this release you'll find:

* Lookup Tables
* Affine Transformations
* Composing images
* Color rescale
* Cropping images
* Color histograms
* Contrast stretching
* Edge effect.
* Negate effect.
* Normalize effect
* Support for rendering hints
* Gravities.

And the more important feature of all: documentation! Find it here:

http://github.com/Serabe/rinzelight/wiki

Cheers,

Sergio

-- 
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