Re: Can you make Amotoen faster?

2012-07-19 Thread David Nolen
On Wed, Jul 18, 2012 at 10:12 PM, Richard Lyman  wrote:
> All,
>
> There's not much code, and (sadly) not much documentation, but what's
> there needs some performance love.
>
> https://github.com/richard-lyman/amotoen
>
> Notes:
>  - jvisualvm doesn't like me this week so help there might be enough
> (I can't see anything other than clojure classes - I'd love to only
> see my code)

Have you tried profiling with YourKit? They allow free usage for open
source projects.

David

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


The 2012 'State of Clojure' survey is open

2012-07-19 Thread Chas Emerick
Prior years' "State of Clojure" surveys have been such a success and yielded 
such valuable data about the Clojure community that I had no choice but to do 
it all again!

The 2012 State of Clojure survey opened this morning, and will remain open 
until Thursday, July 26th:

http://cemerick.com/2012/07/19/2012-state-of-clojure-survey/

Please participate if you are using Clojure in any capacity, and do what you 
can to spread around the above URL so that as much data and feedback can be 
collected as possible.  "Taking the pulse" of the community in this way can 
help library developers and Clojure/core prioritize their efforts, and may help 
provide ammunition for those working to gain acceptance of Clojure in their 
workplaces, universities, and elsewhere.

Cheers,

- Chas

--
http://cemerick.com
[Clojure Programming from O'Reilly](http://www.clojurebook.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: Idea around SCMs and Clojure

2012-07-19 Thread Mark
That's what I was thinking.  Is Envy still around?  The Google didn't give 
me much after a quick search.  

On Wednesday, July 18, 2012 1:19:01 AM UTC-7, Mark Derricutt wrote:
>
>  On 17/07/12 10:27 PM, N8Dawgrr wrote:
>  
>
> In a nutshell its about why use files for source in Clojure, can we do 
> better?
>
>  Almost sounds like you're wanting the Smalltalk "image" along with 
> something like Monticello - the smalltalk distributed version control 
> system ( versioning at the function layer would be awesome ).
>
> http://wiresong.ca/monticello/
>
>
>  

-- 
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: Much longer build time for Clojure on HDD vs. SSD (4 min vs 30s)

2012-07-19 Thread Stefan Ring
> I believe this is related to an oddity of the clojure compiler: it
> syncs every time it writes a class file to disk. This appears to be
> necessary for reasons that escape me. (One might naively assume that a
> simple flush() would be enough; but that was not so when I stumbled
> across this myself a year or so ago.)
>
> In any event, it does not surprise me in the least that a storm of
> sync calls would cause a mechanical hard disk to grovel a bit, while
> presenting

The perfect use case for .

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


[CFP] October Amsterdam Clojure -- Saturday October 27

2012-07-19 Thread skuro
Dear Clojurians,

as it already happened the past two  
years, 
the Dutch Clojure community will organize the October Amsterdam Clojure 
2012, to be held on Saturday, October 27th.
We're now opening the Call For Presentations, we will give the stage to the 
best 10 tracks to be voted by the end of September by all the Meetup 
members.

You can find more info on the (free!) event , 
the meetup  or 
go straight to the presentation submission 
form.
 
We will close the CFP on September 12th.

Looking forward to seeing your proposals and meeting you in October in 
Amsterdam!
Thanks,
c.

-- 
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: Clojurians in Pune

2012-07-19 Thread pastafari
Hi,

I'm based in Pune and  I'm a Ruby/Rails programmer by day. I'm really 
interested in learning more about Clojure and functional programming.

Would love to attend a meetup in Pune.

~Mohit

On Tuesday, July 17, 2012 3:45:39 PM UTC+5:30, Murtaza Husain wrote:
>
> Hi,
>
> Anyone interested in organizing a clojure dojo in Pune ?
>
> Thanks,
> Murtaza
>

-- 
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: Expanding the Community Through Online Courses

2012-07-19 Thread Robert Pitts
If anyone else is interested SICP in Clojure there's a port in progress 
(http://sicpinclojure.com/) though I'm not sure if the project is currently 
alive... if not I'm sure the author could be persuaded to resurrect it, 
especially if people were willing to help ;)

On Wednesday, July 18, 2012 3:08:21 PM UTC-7, mnicky wrote:
>
> Another one that comes into mind is SICP course [1] in Clojure. Given 
> Clojure's similarity to Scheme it should be doable. Also, because the SICP 
> book is now licensed under CC-BY-SA, there shouldn't be any copyright 
> problems etc. IMO 
>
> [1] 
> http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/
>
> On Wednesday, July 18, 2012 7:44:52 PM UTC+2, Eduardo Bellani wrote:
>>
>> Great idea and great effort. I would be awesome if Norvig gave a class 
>> based on his PAIP 
>> book, using clojure or any other lisp beast. 
>>
>> On Wed, Jul 18, 2012 at 1:38 PM, Joshua Bowles  
>> wrote: 
>> > I've made a request to Udacity and forwarded Harrison Maseko's 
>> suggestions 
>> > in my request. 
>> > 
>> > I'm sure if enough people get behind this... 
>> > 
>> > 
>> > On Wed, Jul 18, 2012 at 10:33 AM, Joshua Bowles  
>> > wrote: 
>> >> 
>> >> Peter Norvig's response: 
>> >> 
>> >> Possible ... Udacity would be more likely -- they seem to be more 
>> >> skill-based whereas Coursera is more academic-based. 
>> >> 
>> >> 
>> >> On Wed, Jul 18, 2012 at 10:16 AM, Joshua Bowles  
>>
>> >> wrote: 
>> >>> 
>> >>> I agree. My thinking with an AI class is that as LISP used to be 
>> taught 
>> >>> for AI in school, and most programs offer Java classes, there's got 
>> to be a 
>> >>> few Professors out there who really dig Clojure and have a good 
>> chance 
>> >>> teaching it. I didn't propose a "functional programming" course 
>> because they 
>> >>> already have that with Scala (not to say they wouldn't offer 
>> another). 
>> >>> 
>> >>> As far as Udacity, Peter Norvig is somehow related with Udacity (not 
>> sure 
>> >>> what his role is), he's an old school LISPer and he's totally 
>> familiar with 
>> >>> Java. I don't know if he's into Clojure (but he's definitely not 
>> against the 
>> >>> idea of LISP running on JVM --- he wrote is own version a while back 
>> with 
>> >>> scheme http://norvig.com/jscheme.html). I'll email him and see if 
>> he's 
>> >>> interested. 
>> >>> 
>> >>> 
>> >>> On Wed, Jul 18, 2012 at 9:08 AM, Harrison Maseko  
>> >>> wrote: 
>>  
>>  That sounds like a good move, if a professor at some at one of those 
>>  Coursera linked universities would be willing to do that. However, 
>> can the 
>>  same request be sent to Udacity? Also, is AI the only practical 
>> course to 
>>  suggest? I would like to suggest to Udacity, "Introduction to 
>> Functional 
>>  Programming." Another course I would suggest is, "Building a Dynamic 
>>  Contacts Application for the Cloud," and the third one would be 
>> "Game 
>>  Development in Clojure" or something more focused like "Fluid 
>> Dynamics for 
>>  Game Development." All these could use Clojure. 
>>  -h. 
>>  
>>  
>>  On Wednesday, July 18, 2012 4:29:04 PM UTC+2, Joshua Bowles wrote: 
>> > 
>> > Yes! Just this morning (before reading this thread) I emailed 
>> Coursera 
>> > to request a course like "Artificial Intelligence in Clojure". I 
>> posted on a 
>> > separate thread here ("community interest in machine learning(?)") 
>> that I 
>> > had made the request and provided a link for anyone else who wanted 
>> to make 
>> > a request: 
>> >  http://help.coursera.org/customer/portal/emails/new 
>> > 
>> > 
>> > On Wed, Jul 18, 2012 at 8:18 AM, Harrison Maseko  
>>
>> > wrote: 
>> >> 
>> >> Hi Yann, 
>> >> I agree that Udacity is more approachable in this regard than 
>> >> Coursera. But imagine the publicity the language would get if such 
>> a massive 
>> >> audience were given exposure to Clojure and Clojurescript. I have 
>> always 
>> >> believed that a subset of Clojure (or any Lisp) could be taught 
>> even to 
>> >> programming beginners with ease. This in turn could dispel much of 
>> the myths 
>> >> surrounding Lisp-based languages to thousands at once (one of 
>> which is 'Lisp 
>> >> is difficult.' Simple as it may sound, it has deterred many from 
>> even 
>> >> peering into a Lisp). However, with a platform like Udacity, the 
>> instructor 
>> >> is at liberty to really explain in a newbie-friendly way the 
>> elegance and 
>> >> power of a language such as Clojure. The brief lesson videos would 
>> perhaps 
>> >> be a more navigable route to Clojure for some than reading a book. 
>> All we 
>> >> need is an attractive, *practical* topic (which can be suggested 
>> by anyone 
>> >> here), a reputable instructor, and a way of engaging Udacity 
>> faculty about 
>> >> our offer. And I wish that this process could begin soone

Re: Clojure Sticker

2012-07-19 Thread Alex Kurilin
+1. A temporary workaround would be getting a .svg that you could turn into 
stickers yourself, if that's ok with Rich. We did something similar with 
the vim logo on Reddit.

-- 
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: Clojurians in Pune

2012-07-19 Thread Siddharth Karandikar
I am a java developer and clojure newbie. I would certainly like to
attend any such meetup.

- Siddharth

On Tue, Jul 17, 2012 at 4:29 PM, Murtaza Husain
 wrote:
>
> I am a lone developer working on hobby projects in clojure and I know a
> friend who will be interested. Any other clojurians out there in Pune ?
>
>
> On Tuesday, July 17, 2012 4:10:31 PM UTC+5:30, Baishampayan Ghose wrote:
>>
>> We are a team of 6 full-time Clojure developers here in Pune. If there
>> is enough interest outside our company group I would be glad to host
>> meetups in our office on weekends.
>>
>> Regards,
>> BG
>>
>> On Tue, Jul 17, 2012 at 4:04 PM, Murtaza Husain
>>  wrote:
>> > Hi BG,
>> >
>> > Basically looking to learn and explore. From the top of my head, maybe
>> > couple of hours of solving a few project euler problems, as pairs. The
>> > solutions by each pair can then be presented and discussed in the entire
>> > group.
>> >
>> > Or maybe a 30 mins talk modeled around lightning talks.
>> >
>> > Or trying to implement some nice to have feature, ex partials with cljs
>> > etc...
>> >
>> > These are just suggestions. A 2 hr meetup on the weekend, is what I
>> > would
>> > suggest starting with.
>> >
>> > Thanks,
>> > Murtaza
>> >
>> > On Tuesday, July 17, 2012 3:50:55 PM UTC+5:30, Baishampayan Ghose wrote:
>> >>
>> >> Hi,
>> >>
>> >> I am in Pune. What do you want to do in such a Dojo?
>> >>
>> >> Regards,
>> >> BG
>> >>
>> >> On Tue, Jul 17, 2012 at 3:45 PM, Murtaza Husain
>> >>  wrote:
>> >> > Hi,
>> >> >
>> >> > Anyone interested in organizing a clojure dojo in Pune ?
>> >> >
>> >> > Thanks,
>> >> > Murtaza
>> >> >
>> >> > --
>> >> > 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
>> >>
>> >>
>> >>
>> >> --
>> >> Baishampayan Ghose
>> >> b.ghose at gmail.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
>>
>>
>>
>> --
>> Baishampayan Ghose
>> b.ghose at gmail.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

-- 
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: atom and lock

2012-07-19 Thread Martin Dow
I found this presentation pretty enlightening in understanding why non 
blocking concurrent algorithms can be more efficient than locking ones:
http://www.infoq.com/presentations/LMAX-Disruptor-100K-TPS-at-Less-than-1ms-Latency

I'd watch it from the start to get the background, but section 6 from 29:40 
explains how to "take the right approach to concurrency", briefly comparing 
lock vs atomic/CAS (compare and set) based approaches.

It boils down to the cost of locks being "phenomenal", since waiting for a 
contended lock can cause a thread to go to sleep, which is relatively 
expensive and may cause other issues like polluting the cache. The cost of 
retrying a CAS operation a few times is relatively trivial.

Of course these guys are talking about a particular use case which may or 
may not apply to you and most don't have these sorts of performance 
requirements, but I found the explanation very useful, as it accessibly 
explains the issue at quite a low level.


Martin.

On Wednesday, 18 July 2012 12:55:13 UTC+1, Brian Hurt wrote:
>
> Accesses to atoms are just wrappers around atomic compare and swap 
> instructions at the hardware level.  Locking an object also uses an atomic 
> compare and swap, but piles other stuff on top of it, making it more 
> expensive.  So atoms are useful in situations where there is likely not 
> going to be much in the way of contention (multiple writes happening at the 
> same time), so there won't be that many retries, and where the cost of 
> redoing the computation is low enough that it's cheaper to simply redo an 
> occasional update than pay the cost of locking.  So, a classic example of a 
> good use of atom is to assign ids, like:
>
> (def counter (atom 0))
>
> (def get-id [] (swap! counter inc))
>
> Incrementing an integer is about as cheap as computations get.  Even if 
> some unlucky thread had to redo the computation dozens of times before 
> "winning", that isn't that high of a cost.  And even if you're getting 
> millions of ids a second, the number of collisions you have will be low.  
> So this is a good use for atoms.  Any more advanced locking behavior would 
> simply slow things down.
>
> Holding hash maps in atoms is a borderline case.  I tend to only do it 
> when I know the update rate will be low, and thus collisions very rare.
>
> For situations where collisions are a lot more common, or where the update 
> is a lot more expensive, I'd use a ref cell and a dosync block.  Of course, 
> if you need atomic updates to multiple different cells, there is no 
> replacement for dosync blocks.
>
> Brian
>
> On Tue, Jul 17, 2012 at 6:57 PM, Warren Lynn wrote:
>
>> I have a hard time understanding why there is a need to retry when doing 
>> "swap!" on an atom. Why does not Clojure just lock the atom up-front and do 
>> the update? I have this question because I don't see any benefit of the 
>> current "just try and then re-try if needed" (STM?) approach for atom 
>> (maybe OK for refs because you cannot attach a lock to unknown ref 
>> combinations in a "dosync" clause). Right now I have an atom in my program 
>> and there are two "swap!" functions on it. One may take a (relatively) long 
>> time, and the other is short. I don't want the long "swap!" function to 
>> retry just because in the last minute the short one sneaked in and changed 
>> the atom value. I can do the up-front lock myself, but I wonder why this is 
>> not already so in the language. Thank you for any enlightenment.
>>
>> -- 
>>
>
>

-- 
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: atom and lock

2012-07-19 Thread Timothy Baldridge
> The cost of
> retrying a CAS operation a few times is relatively trivial.

Not to mention that most of the time locks, thread sleeping, etc. all
involve a context switch into the kernel. Where a CAS is done in
userspace.

Timothy

-- 
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: Clojure Sticker

2012-07-19 Thread charlie
Yeah any sort of  vector image should work for us

On Wed, Jul 18, 2012 at 7:59 PM, Alex Kurilin  wrote:

> +1. A temporary workaround would be getting a .svg that you could turn
> into stickers yourself, if that's ok with Rich. We did something similar
> with the vim logo on Reddit.
>
>  --
> 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: Latest Bagwell paper for a new implementation of Clojure vectors ?

2012-07-19 Thread Robert Levy
Just curious, what is the status of this?  Are there plans to implement
this change in Clojure?

Also curious if there's an existing lib that can be used now (I didn't come
across one for Clojure but there is a Scala lib from the authors of the
paper)...

Rob

On Fri, Nov 18, 2011 at 2:35 PM, logan  wrote:

> Are there currently any plans to eventually replace PersistentVector?
> Looking at the code, the upper limit for the number of elements that can be
> stored in PersistentVector is 32^6, which is quite a lot but still might
> become a real limitation in the near future.
>
> --
> 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

slurp on over slow HTTP crashes clojure?

2012-07-19 Thread the80srobot
Hello,

I apologize if this isn't the right place to post this.

I've seen slurp exhibit some very strange behavior when querying a 
particular URL at certain times of day - it seems that a call to slurp as 
such:

(slurp "http://support.clean-mx.de/clean-mx/viruses.php?limit=0,150";)


will crash clojure if that site is particularly slow to load. Downloading 
the same URL using curl succeeds eventually and the download is just over 2 
MB, which shouldn't cause Java to run out of memory, but nevertheless that 
is what seems to be happening, as the following is sometimes thrown before 
the REPL dies:

Exception in thread "Thread-12" java.lang.OutOfMemoryError: Java heap space
> Bye for now!


I haven't been able to recreate this issue with other URLs. I realize this 
isn't much to go on, but has anyone else encountered this problem before?

-Adam

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

s-expression levels and higher order functions

2012-07-19 Thread Seth Chandler
I'm new both to Clojure and to this group, so please be gentle.  I come to 
Clojure mostly from a Mathematica background, which has a certain Lispyness 
to it.  One of the things one can do in Mathematica is to map a function to 
an s-expression but not at its top level, but rather at some user specified 
level.  Thus Map[f, {{a,b},{c,d}},{2}] will (because of the {2} as the last 
argument) evaluate to {{f[a],f[b]},{f[c],f[d]}} rather than 
{f[{a,b}],f[{c,d}]}.  I have found this capability of having functions that 
work at levels of an expression to be extremely valuable.  Is there work 
already done that extends the higher order functions to permit something 
like this.  And, yes, I am sure one could write a macro and perhaps that 
has already been done, but I was curious as to what was out there.  My 
Google search did not yield much on this topic, but perhaps I used the 
wrong Clojure vocabulary.

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: Please I urgently need help with my Clojure written App.

2012-07-19 Thread Oo Nwoye
Hi!

Thanks for your response. Craig Brozevsky reached out yesterday and sorted 
out my issue. I am grateful to you all. 

On Tuesday, 17 July 2012 06:30:31 UTC+1, Murtaza Husain wrote:
>
> Hi,
>
> Can you post something so that we can take a look at it. Maybe upload the 
> code to github ? Or provide us access to it in some form. 
>
> Thanks,
> Murtaza
>
> On Monday, July 16, 2012 10:09:35 PM UTC+5:30, Oo Nwoye wrote:
>>
>> Hi Guys/Girls,
>
>  
>
>> I need your help. I am a non-programmer (I barely write HTML) with a 
>> music music app that was built in Clojure. The app has been down for a few 
>> days and I cannot get in touch with the person that built it. And 
>> unfortunately, it is really hard to get someone that knows Clojure. The 
>> only person I know will not be available for a while.
>>
>> I just need to get the site up ASAP then I can arrange for the backend to 
>> be re-written.
>>
>> Can anyone here be kind enough to give me a hand. I am really sorry for 
>> the disturbance but I do not know any other place to turn to.
>>
>> Thank you so much.
>>
>> Oo Nwoye
>>
>> ositanw...@gmail.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

Redefining vars

2012-07-19 Thread Alice
I'm reading Clojure Programming from O'Reilly.

(defn a [b] (+ 5 b))
;= #'user/a
(def b (partial a 5))
;= #'user/b
(b)
;= 10
(defn a [b] (+ 10 b))
;= #'user/a
(b)
;= 10

Redefining a has no effect. But,

(defn foo [] 1)
;= #'user/foo
(defn bar [] (foo))
;= #'user/bar
(bar)
;= 1
(defn foo [] 2)
;= #'user/foo
(bar)
;= 2

Shouldn't this also be the same? Why does (bar) evaluates 2 instead of
1 this time?

-- 
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: Idea around SCMs and Clojure

2012-07-19 Thread Steve Tickle
It would be more interesting to see a version control system based on
storing an abstract syntax tree and then using a pretty printer when the
files are checked out.
In one fell swoop you remove the code-styling wars as everyone can have
their own coding style and maintain consistency with everyone else.
It also gives the versioning system knowledge of the code so you can diff
functionality rather than the textual representation of that functionality.

Combine an editor with the pretty printing/ASTVersioning and you have a
proper integrated development environment!

SteveT


On Tue, Jul 17, 2012 at 11:27 AM, N8Dawgrr wrote:

> Hi All,
>
> One of my first posts to Clojure mailing list. I had an idea around SCMs
> and Clojure. I'd basically like to put the idea out there and get some
> feedback. I hope I'm not breaking any etiquette linking to my blog post but
> I've outlined the idea here:
>
> http://clojurian.blogspot.co.uk/
>
> In a nutshell its about why use files for source in Clojure, can we do
> better?
>
> Regards,
>
> Nathan
>
> --
> 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: Idea around SCMs and Clojure

2012-07-19 Thread Steve Tickle
It would be more interesting to see a version control system based on 
storing an abstract syntax tree and then using a pretty printer when the 
files are checked out.
In one fell swoop you remove the code-styling wars as everyone can have 
their own coding style and maintain consistency with everyone else.
It also gives the versioning system knowledge of the code so you can diff 
functionality rather than the textual representation of that functionality.

Combine an editor with the pretty printing/ASTVersioning and you have a 
proper integrated development environment!

SteveT

On Tuesday, 17 July 2012 11:27:41 UTC+1, N8Dawgrr wrote:
>
> Hi All,
>
> One of my first posts to Clojure mailing list. I had an idea around SCMs 
> and Clojure. I'd basically like to put the idea out there and get some 
> feedback. I hope I'm not breaking any etiquette linking to my blog post but 
> I've outlined the idea here:
>
> http://clojurian.blogspot.co.uk/ 
>
> In a nutshell its about why use files for source in Clojure, can we do 
> better?
>
> Regards,
>
> Nathan
>

-- 
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: Please I urgently need help with my Clojure written App.

2012-07-19 Thread Oo Nwoye
*Thanks to Craig Brozefsky I have been taken care of. You guys are so so 
awesome! Craig represents the awesomeness of you all.*
Thanks!

On Monday, 16 July 2012 17:39:35 UTC+1, Oo Nwoye wrote:
>
> Hi Guys/Girls,
>
> I need your help. I am a non-programmer (I barely write HTML) with a music 
> music app that was built in Clojure. The app has been down for a few days 
> and I cannot get in touch with the person that built it. And unfortunately, 
> it is really hard to get someone that knows Clojure. The only person I know 
> will not be available for a while.
>
> I just need to get the site up ASAP then I can arrange for the backend to 
> be re-written.
>
> Can anyone here be kind enough to give me a hand. I am really sorry for 
> the disturbance but I do not know any other place to turn to.
>
> Thank you so much.
>
> Oo Nwoye
>
> ositanw...@gmail.com
>
>
On Monday, 16 July 2012 17:39:35 UTC+1, Oo Nwoye wrote:
>
> Hi Guys/Girls,
>
> I need your help. I am a non-programmer (I barely write HTML) with a music 
> music app that was built in Clojure. The app has been down for a few days 
> and I cannot get in touch with the person that built it. And unfortunately, 
> it is really hard to get someone that knows Clojure. The only person I know 
> will not be available for a while.
>
> I just need to get the site up ASAP then I can arrange for the backend to 
> be re-written.
>
> Can anyone here be kind enough to give me a hand. I am really sorry for 
> the disturbance but I do not know any other place to turn to.
>
> Thank you so much.
>
> Oo Nwoye
>
> ositanw...@gmail.com
>
>
On Monday, 16 July 2012 17:39:35 UTC+1, Oo Nwoye wrote:
>
> Hi Guys/Girls,
>
> I need your help. I am a non-programmer (I barely write HTML) with a music 
> music app that was built in Clojure. The app has been down for a few days 
> and I cannot get in touch with the person that built it. And unfortunately, 
> it is really hard to get someone that knows Clojure. The only person I know 
> will not be available for a while.
>
> I just need to get the site up ASAP then I can arrange for the backend to 
> be re-written.
>
> Can anyone here be kind enough to give me a hand. I am really sorry for 
> the disturbance but I do not know any other place to turn to.
>
> Thank you so much.
>
> Oo Nwoye
>
> ositanw...@gmail.com
>
>
On Monday, 16 July 2012 17:39:35 UTC+1, Oo Nwoye wrote:
>
> Hi Guys/Girls,
>
> I need your help. I am a non-programmer (I barely write HTML) with a music 
> music app that was built in Clojure. The app has been down for a few days 
> and I cannot get in touch with the person that built it. And unfortunately, 
> it is really hard to get someone that knows Clojure. The only person I know 
> will not be available for a while.
>
> I just need to get the site up ASAP then I can arrange for the backend to 
> be re-written.
>
> Can anyone here be kind enough to give me a hand. I am really sorry for 
> the disturbance but I do not know any other place to turn to.
>
> Thank you so much.
>
> Oo Nwoye
>
> ositanw...@gmail.com
>
>
On Monday, 16 July 2012 17:39:35 UTC+1, Oo Nwoye wrote:
>
> Hi Guys/Girls,
>
> I need your help. I am a non-programmer (I barely write HTML) with a music 
> music app that was built in Clojure. The app has been down for a few days 
> and I cannot get in touch with the person that built it. And unfortunately, 
> it is really hard to get someone that knows Clojure. The only person I know 
> will not be available for a while.
>
> I just need to get the site up ASAP then I can arrange for the backend to 
> be re-written.
>
> Can anyone here be kind enough to give me a hand. I am really sorry for 
> the disturbance but I do not know any other place to turn to.
>
> Thank you so much.
>
> Oo Nwoye
>
> ositanw...@gmail.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: Clojurians in Pune

2012-07-19 Thread pastafari
Hi BG, Murtaza,

I'm based in Pune and am interested in learning about Clojure and 
functional programming. So +1 from me.

~Mohit

On Tuesday, July 17, 2012 4:29:25 PM UTC+5:30, Murtaza Husain wrote:
>
>
> I am a lone developer working on hobby projects in clojure and I know a 
> friend who will be interested. Any other clojurians out there in Pune ?
>
> On Tuesday, July 17, 2012 4:10:31 PM UTC+5:30, Baishampayan Ghose wrote:
>>
>> We are a team of 6 full-time Clojure developers here in Pune. If there 
>> is enough interest outside our company group I would be glad to host 
>> meetups in our office on weekends. 
>>
>> Regards, 
>> BG 
>>
>> On Tue, Jul 17, 2012 at 4:04 PM, Murtaza Husain 
>>  wrote: 
>> > Hi BG, 
>> > 
>> > Basically looking to learn and explore. From the top of my head, maybe 
>> > couple of hours of solving a few project euler problems, as pairs. The 
>> > solutions by each pair can then be presented and discussed in the 
>> entire 
>> > group. 
>> > 
>> > Or maybe a 30 mins talk modeled around lightning talks. 
>> > 
>> > Or trying to implement some nice to have feature, ex partials with cljs 
>> > etc... 
>> > 
>> > These are just suggestions. A 2 hr meetup on the weekend, is what I 
>> would 
>> > suggest starting with. 
>> > 
>> > Thanks, 
>> > Murtaza 
>> > 
>> > On Tuesday, July 17, 2012 3:50:55 PM UTC+5:30, Baishampayan Ghose 
>> wrote: 
>> >> 
>> >> Hi, 
>> >> 
>> >> I am in Pune. What do you want to do in such a Dojo? 
>> >> 
>> >> Regards, 
>> >> BG 
>> >> 
>> >> On Tue, Jul 17, 2012 at 3:45 PM, Murtaza Husain 
>> >>  wrote: 
>> >> > Hi, 
>> >> > 
>> >> > Anyone interested in organizing a clojure dojo in Pune ? 
>> >> > 
>> >> > Thanks, 
>> >> > Murtaza 
>> >> > 
>> >> > -- 
>> >> > 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 
>> >> 
>> >> 
>> >> 
>> >> -- 
>> >> Baishampayan Ghose 
>> >> b.ghose at gmail.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 
>>
>>
>>
>> -- 
>> Baishampayan Ghose 
>> b.ghose at gmail.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: Light Table on Windows XP

2012-07-19 Thread kinleyd
 v0.0.7 (an updated to the first release) was released July 9, 2012. It's a 
very early release of the LT Playground. Chris Granger mentioned a target 
of sometime next year for a stable release.

-- 
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: community interest in machine learning (?)

2012-07-19 Thread Zhemin Lin
Hi Joshua,

I've taken Andrew Ng's courses, too.  Wonder where have they shared the 
source code in Clojure?
I've done all the exercises in Octave.  It would be great to study how to 
do it in Clojure.

Thanks!


2012年7月16日月曜日 22時24分36秒 UTC+8 Joshua Bowles:
>
> Incanter does look great; look forward to getting into it; I'll check out 
> your mahout examples too... I'm about ready to tear into that book.
>
> So much research has been done in Artificial Intelligence with LISP. With 
> the applied history of LISP it just seems like a perfect fit for Clojure to 
> take the lead in many AI sub-fields. I know also that a few people taking 
> Andrew Ng's (online) Machine Learning Class did it in 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: Light Table Playground got a lot more useful.

2012-07-19 Thread kinleyd
It's looking good. Really look forward to version 1.0. :)

On Tuesday, July 10, 2012 7:27:26 AM UTC+6, Chris Granger wrote:
>
> Hey folks, 
>
> In case you missed it via other channels, the Light Table Playground 
> can now hook into your own projects! 
>
> http://www.chris-granger.com/2012/07/09/light-table-playgrounds-level-up/ 
>
> Take her for a spin :D 
>
> Cheers, 
> Chris.

-- 
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: community interest in machine learning (?)

2012-07-19 Thread Seth Chandler
I'm extremely interested.  I'm new to Clojure, coming mostly from a 
Mathematica background, but I just finished a major project linking 
Mathematica to Weka and am interested in doing something similar with 
Clojure.  Weka, by the way, is 99% terrific, and so before people go 
completely reinvent the wheel, it might be worthwhile thinking about a 
Clojure-Weka interface of sorts.  

On Sunday, July 15, 2012 11:10:22 AM UTC-6, Joshua Bowles wrote:
>
> New to Clojure (but not Lisp).
>
> Does anyone have a good sense of the interest in machine learning in 
> Clojure community?
> I've seen in the last few threads some interesting posts and libraries 
> related to machine learning, and there is plenty of stuff one can get from 
> Java (mahout, weka, clj-ml [
> http://antoniogarrote.github.com/clj-ml/index.html]), but I'm curious to 
> know if anyone here has a sense of the overall community interest. 
>
> It's nice to see interesting libraries that support needed tasks for 
> machine learning (I'm all for links to libraries), but what I'm really 
> trying to get is* a sense of the overall interest the community has in 
> machine learning*. For example, Python community overall has a lot of 
> interest in scientific computing and machine learning. Compare this to 
> Ruby... not that you couldn't provide good libraries in Ruby (for example 
> the SciRuby project), but the Ruby community overall does not seem to have 
> much interest in these kinds of academic pursuits.
>

-- 
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: seeking namespace-aware xml lib

2012-07-19 Thread Ryan Senior
Solid namespace support is a much needed feature for data.xml.  There's a
ticket for it here: http://dev.clojure.org/jira/browse/DXML-4 though
unfortunately the patch attached to it came from someone who hadn't signed
a CA, so I was not able to accept it.

I am planning on tackling namespace support soon, but would welcome help if
you're interested (and have signed a CA).

-Ryan

On Mon, Jul 16, 2012 at 2:53 PM, Ben Smith-Mannschott  wrote:

> TL;DR: I'm looking for a Clojure library that round trips XML+namespaces
> through Clojure data structures and back again.
>
>
> I'm hacking on a chewing-gum-and-bailing-wire solution publish my wife's
> novels as EPUB.  I've got most of a prototype of the core functionality
> working, but an stubbing my toe an a lack of what  would consider
> sufficient XML support in the Clojure universe.
>
> I'm consuming Apple Pages (heavily namespaced XML) and will need to
> produce XML Plist, XHTML, OPF and NCX, all of which are namespaced as
> well.
>
> My first prototype parser for Pages documents used clojure.xml and
> works, provided Apple never changes the prefixes they use for the
> various namespaces the crop up in a Pages document. This is because
> clojure.xml is absolutely namespace ignorant. Also, there doesn't seem
> to be a way to write clojure.xml out as literal XML.
>
> I'm in the process of switching to clojure.data.xml, but have discovered
> that it parses namespace aware by default, but only uses this in order
> to have a simple way to ignore namespace information without getting
> confused by spurious namespace prefixes.
>
> That would be fine for parsing the Pages document, but it's a
> non-starter for producing my output files since these require the use of
> namespaces.
>
> I've looked at hiccup, which would solve my HTML production problem,
> save for the fact that it produces XHTML 1.0 while my current
> half-manual publishing process uses XHTML 1.1. I expect either version
> would work, but that still leaves me without a solution for Plist, OPF
> and NCX.
>
>
> What are my best options? Am I overlooking a Clojure library that
> already does what I need? I could try to teach data.xml to support XML
> namespaces, but the current half-hearted hack which conflates Clojure
> namespaces with XML namespaces would have to go, I fear. I could instead
> put my time into extending hiccup to support XML more generally, or at
> least provide explicit support for NCX, OPF and PList. Should I just
> write my own library? Maybe I could build atop XOM so as not to reinvent
> the heavy lifting.
>
> // Ben
>
> --
> 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: talking to machines: Teaching beginners to program with an interactive ClojureScript REPL

2012-07-19 Thread Joshua Ballanco
A couple of quick suggestions (hopefully they can be some help):  
* It's too easy to click next on each page. I liked the first page better where 
I had to fill in a blank to get a result
* Using Math to introduce grouping of expressions might be confusing later when 
the student learns that Lisp math "doesn't work like that" (i.e. RPN instead of 
infix)
* Maybe it's just how my brain works, but I think it might be clearer to 
introduce "fn" in isolation first, then link it with "def", then introduce 
"defn"

Overall, I love the design! This is definitely a good start.

Cheers,

Josh



--
Joshua Ballanco

ELC Technologies™
1771 NW Pettygrove Street, Suite 140
Portland, OR, 97209
jballanco (mailto:jballa...@elctech.com)@elctech.com 
(mailto:kmil...@elctech.com)

P +1 866.863.7365
F +1 877.658.6313
M +1 646.463.2673
T +90 533.085.5773

http://www.elctech.com (http://www.elctech.com/)


On Saturday, July 14, 2012 at 7:03 PM, Pascal Chatterjee wrote:

> Hey everyone,
>  
> I've made a website (http://talkingtomachines.org) that embeds an interactive 
> ClojureScript REPL that I'd like to try and use to teach beginners the basics 
> of programming.  
>  
> Try out the first chapter (http://talkingtomachines.org/chapter/1) and let me 
> know what you think!  
>  
> The site is a work-in-progress, but I think there's enough functionality to 
> illustrate most of my ideas. The whole thing is fully open source, and I've 
> tried to make it relatively easy to add or edit the chapters themselves, so 
> if you have any suggestions for improvements I'm more than happy to hear 
> them, in text or code form :)
>  
> // Pascal.  
>  
> --  
> 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 
> (mailto: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 
> (mailto: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

ANN: Mongoika, a new Clojure MongoDB library

2012-07-19 Thread Tokusei NOBORIO
Hi everyone,

I want to introduce Mongoika.  Mongoika is a MongoDB library for Clojure.

We have used this library for a few projects, and have found it easy
to use and efficient.  For this release we have fixed a few bugs from
our prototype, and it is now production ready.

Mongoika simplifies building queries.  Queries behave like lazy
sequences.  Basic GridFS operations are also supported.

The features of Mongoika are:

1) Queries as lazy sequences.

You can easily use Clojure stream idioms, such as method chaining, with MongoDB.

2) Maps as a property of a query.

The map-after function allows you to add a function that modify the
records returned by a query (like "map") without losing the ability to
add further mongodb query specifications.

E.g.:

(defn user-from-mongodb
  ; code to convert a mogodb record to a domain obect
)

; Create a query that returns all users as domain objects
(defn users [] (map-after user-from-mongodb :users))

; Now you can apply mongodb query specifications to this query,
; even though it doesn't return mongodb records.
(defn fred (fetch-one (users :name "fred")))

3) GridFS support

Supports insert! insert-multi! and delete!

Check out the details at:
https://github.com/yuushimizu/Mongoika

--
Tokusei(@tnoborio)
http://nyampass.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: Clojure Sticker

2012-07-19 Thread George McKinney
+1

On Saturday, June 9, 2012 6:03:46 PM UTC-7, aboy021 wrote:
>
> Is there anywhere that I can get a Clojure sticker?

-- 
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: slurp on over slow HTTP crashes clojure?

2012-07-19 Thread Colin Jones
Is this using REPLy / a lein2-previewX repl, by chance? I fixed a memory 
leak in REPLy yesterday that happened in long-running command scenarios, 
and could have caused this behavior 
(see https://github.com/technomancy/leiningen/issues/691 for details). 

- Colin



On Wednesday, July 18, 2012 10:14:24 AM UTC-5, the80srobot wrote:
>
> Hello,
>
> I apologize if this isn't the right place to post this.
>
> I've seen slurp exhibit some very strange behavior when querying a 
> particular URL at certain times of day - it seems that a call to slurp as 
> such:
>
> (slurp "http://support.clean-mx.de/clean-mx/viruses.php?limit=0,150";)
>
>
> will crash clojure if that site is particularly slow to load. Downloading 
> the same URL using curl succeeds eventually and the download is just over 2 
> MB, which shouldn't cause Java to run out of memory, but nevertheless that 
> is what seems to be happening, as the following is sometimes thrown before 
> the REPL dies:
>
> Exception in thread "Thread-12" java.lang.OutOfMemoryError: Java heap space
>> Bye for now!
>
>
> I haven't been able to recreate this issue with other URLs. I realize this 
> isn't much to go on, but has anyone else encountered this problem before?
>
> -Adam
>

-- 
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: slurp on over slow HTTP crashes clojure?

2012-07-19 Thread Devin Walters
I've had this issue when the network I was on was way overloaded. It seems like 
it might be nice to have it at least fail gracefully. IIRC I switched to using 
the http lib. It seems like at the very least a graceful failure from slurp 
would be an improvement.

Cheers,
'(Devin Walters)

On Jul 18, 2012, at 11:14 AM, the80srobot  wrote:

> Hello,
> 
> I apologize if this isn't the right place to post this.
> 
> I've seen slurp exhibit some very strange behavior when querying a particular 
> URL at certain times of day - it seems that a call to slurp as such:
> 
> (slurp "http://support.clean-mx.de/clean-mx/viruses.php?limit=0,150";)
> 
> will crash clojure if that site is particularly slow to load. Downloading the 
> same URL using curl succeeds eventually and the download is just over 2 MB, 
> which shouldn't cause Java to run out of memory, but nevertheless that is 
> what seems to be happening, as the following is sometimes thrown before the 
> REPL dies:
> 
> Exception in thread "Thread-12" java.lang.OutOfMemoryError: Java heap space
> Bye for now!
> 
> I haven't been able to recreate this issue with other URLs. I realize this 
> isn't much to go on, but has anyone else encountered this problem before?
> 
> -Adam
> -- 
> 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: Redefining vars

2012-07-19 Thread Mark Rathwell
partial returns a closure, closing over a at the time b is defined.

On Wed, Jul 18, 2012 at 7:18 AM, Alice  wrote:
> I'm reading Clojure Programming from O'Reilly.
>
> (defn a [b] (+ 5 b))
> ;= #'user/a
> (def b (partial a 5))
> ;= #'user/b
> (b)
> ;= 10
> (defn a [b] (+ 10 b))
> ;= #'user/a
> (b)
> ;= 10
>
> Redefining a has no effect. But,
>
> (defn foo [] 1)
> ;= #'user/foo
> (defn bar [] (foo))
> ;= #'user/bar
> (bar)
> ;= 1
> (defn foo [] 2)
> ;= #'user/foo
> (bar)
> ;= 2
>
> Shouldn't this also be the same? Why does (bar) evaluates 2 instead of
> 1 this time?
>
> --
> 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: Idea around SCMs and Clojure

2012-07-19 Thread Raoul Duke
On Tue, Jul 17, 2012 at 7:04 AM, Steve Tickle  wrote:
> It would be more interesting to see a version control system based on
> storing an abstract syntax tree and then using a pretty printer when the
> files are checked out.

yes! i've been whining about that for all programming languages over
beers for on a decade now. glad to see other people thinking along the
same humanitarian lines. i think alien civilizations will never
contact us before the tab vs. spaces fight let alone the { placement
fights are all behind us.

-- 
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: seeking namespace-aware xml lib

2012-07-19 Thread Ben Smith-Mannschott
I am interested and I have a CA with Rich, but I'm currently exploring
using XOM from Clojure. My first impression is that the API is very
clean (as a Java API) and I appreciate its emphasis on correctness. I
could see data.xml benefiting from some of the ideas in XOM, if only
indirectly. In any event I need to suss out the problem space more
thoroughly before it would make sense to hack on data.xml.

// Ben

On Tue, Jul 17, 2012 at 4:03 PM, Ryan Senior  wrote:
> Solid namespace support is a much needed feature for data.xml.  There's a
> ticket for it here: http://dev.clojure.org/jira/browse/DXML-4 though
> unfortunately the patch attached to it came from someone who hadn't signed a
> CA, so I was not able to accept it.
>
> I am planning on tackling namespace support soon, but would welcome help if
> you're interested (and have signed a CA).
>
> -Ryan
>
> On Mon, Jul 16, 2012 at 2:53 PM, Ben Smith-Mannschott
>  wrote:
>>
>> TL;DR: I'm looking for a Clojure library that round trips XML+namespaces
>> through Clojure data structures and back again.
>>
>>
>> I'm hacking on a chewing-gum-and-bailing-wire solution publish my wife's
>> novels as EPUB.  I've got most of a prototype of the core functionality
>> working, but an stubbing my toe an a lack of what  would consider
>> sufficient XML support in the Clojure universe.
>>
>> I'm consuming Apple Pages (heavily namespaced XML) and will need to
>> produce XML Plist, XHTML, OPF and NCX, all of which are namespaced as
>> well.
>>
>> My first prototype parser for Pages documents used clojure.xml and
>> works, provided Apple never changes the prefixes they use for the
>> various namespaces the crop up in a Pages document. This is because
>> clojure.xml is absolutely namespace ignorant. Also, there doesn't seem
>> to be a way to write clojure.xml out as literal XML.
>>
>> I'm in the process of switching to clojure.data.xml, but have discovered
>> that it parses namespace aware by default, but only uses this in order
>> to have a simple way to ignore namespace information without getting
>> confused by spurious namespace prefixes.
>>
>> That would be fine for parsing the Pages document, but it's a
>> non-starter for producing my output files since these require the use of
>> namespaces.
>>
>> I've looked at hiccup, which would solve my HTML production problem,
>> save for the fact that it produces XHTML 1.0 while my current
>> half-manual publishing process uses XHTML 1.1. I expect either version
>> would work, but that still leaves me without a solution for Plist, OPF
>> and NCX.
>>
>>
>> What are my best options? Am I overlooking a Clojure library that
>> already does what I need? I could try to teach data.xml to support XML
>> namespaces, but the current half-hearted hack which conflates Clojure
>> namespaces with XML namespaces would have to go, I fear. I could instead
>> put my time into extending hiccup to support XML more generally, or at
>> least provide explicit support for NCX, OPF and PList. Should I just
>> write my own library? Maybe I could build atop XOM so as not to reinvent
>> the heavy lifting.
>>
>> // Ben
>>
>> --
>> 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

-- 
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: s-expression levels and higher order functions

2012-07-19 Thread kovas boguta
Hey Seth,

Welcome to the party.

I haven't seen something like this either.

What clojure's map does with additional arguments its pretty useful though.

(map f a b c) is equivalent to
f@@@Transpose[{a,b,c}]

Still, it would be nice to have mathematica-style list manipulation
functions, that support a richer syntax.

In particular I often want versions of Take and Drop that support
ranges, and multidimensional manipulation.

As far as I know no one has built these things out yet, but im sure it
would be a good exercise ;)


On Tue, Jul 17, 2012 at 10:17 PM, Seth Chandler  wrote:
> I'm new both to Clojure and to this group, so please be gentle.  I come to
> Clojure mostly from a Mathematica background, which has a certain Lispyness
> to it.  One of the things one can do in Mathematica is to map a function to
> an s-expression but not at its top level, but rather at some user specified
> level.  Thus Map[f, {{a,b},{c,d}},{2}] will (because of the {2} as the last
> argument) evaluate to {{f[a],f[b]},{f[c],f[d]}} rather than
> {f[{a,b}],f[{c,d}]}.  I have found this capability of having functions that
> work at levels of an expression to be extremely valuable.  Is there work
> already done that extends the higher order functions to permit something
> like this.  And, yes, I am sure one could write a macro and perhaps that has
> already been done, but I was curious as to what was out there.  My Google
> search did not yield much on this topic, but perhaps I used the wrong
> Clojure vocabulary.
>
> 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

-- 
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] Yet another {{mustache}} for Clojure

2012-07-19 Thread David Santiago
Just wanted to stop by and update this thread with the latest
information. I just released Stencil 0.3, at
http://github.com/davidsantiago/stencil and it contains many
performance improvements. I have pushed the benchmarks I use to test
it, including an adaptation of yours, to
http://github.com/davidsantiago/mustachequerade; the readme has an
example run. Performance of course depends on the templates and data,
but 0.3 ranges from nearly as fast as your mustache to 2x the runtime.

In particular, for the benchmark you posted, I now get runtimes for a
single template render of 13us in mustache.clj vs. 25us in Stencil.
I'm not satisfied with those numbers, and will continue to push them
lower in future versions, but the 10x difference in runtime is clearly
no longer the case.

  David

On Wed, Jul 11, 2012 at 8:50 PM, Shen, Feng  wrote:
> Yes, you are right.  Stencil did a very good job.
> I only implement a subset.  Test code .   "Set Delimiter" and "lambdas" and
> "Dotted Names" are not implemented.
>
> The algorithm of this implementation is borrowed from Mustache.js.
> I read the code,  It's brilliant.
>
> I'v used Mustache in several projects. I like it. It's simple and brilliant.
> "Set Delimiter" and "lambdas" are never used.  This is why they are not
> implemented currently. I will implement the whole Spec when I find the time.
>
>
> On Thu, Jul 12, 2012 at 9:26 AM, Anthony Grimes 
> wrote:
>>
>> Stencil is spec compliant (the tests actually run against the spec) while
>> this implementation is not. A major goal behind stencil is to be totally
>> spec compliant and as fast as possible. However, implementing the slow parts
>> of the spec is important too.
>>
>>
>> On Wednesday, July 11, 2012 6:28:23 PM UTC-5, Feng Shen wrote:
>>>
>>> From http://mustache.github.com/, I only notice clostache, which is a
>>> little slow.
>>> I have not noticed stencil, if I do, probability, I will not do one
>>> myself. It's pretty fast.
>>> My implementation seems faster than stencil, in a test run, up to 10x.
>>> Test code:
>>> https://github.com/shenfeng/mustache.clj/blob/master/test/me/shenfeng/perf_bench.clj
>>> It seems stencil is more feature rich than mine.  For example, I did not
>>> implement "Set Delimiter".
>>>
>>>
>>> On Wednesday, July 11, 2012 9:45:51 PM UTC+8, Baishampayan Ghose wrote:

 > I did yet another {{mustache}} implementation for Clojure
 >
 > https://github.com/shenfeng/mustache.clj
 >
 > I did it because I need a faster one when I am doing Rssminer . And I
 > dit
 > it.
 > By the way, Rssminer is yet another RSS reader, but written in
 > Clojure.
 >
 > Usage:
 >
 > [me.shenfeng/mustache "0.0.4"]
 >
 > (:use me.shenfeng.mustache)
 >
 > (deftemplate template "{{template}}")
 > (to-html template {:you-data "data"}) ;; returns String
 >
 > Let me know if you have any ideas or questions.

 Shen,

 Very nice work. Have you benchmarked your mustache lib with stencil?
 It would be an interesting comparison.

 Regards,
 BG

 --
 Baishampayan Ghose
 b.ghose at gmail.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
>
>
> --
> 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: Can you make Amotoen faster?

2012-07-19 Thread Richard Lyman
On Thu, Jul 19, 2012 at 7:09 AM, David Nolen  wrote:
> On Wed, Jul 18, 2012 at 10:12 PM, Richard Lyman  
> wrote:
>> All,
>>
>> There's not much code, and (sadly) not much documentation, but what's
>> there needs some performance love.
>>
>> https://github.com/richard-lyman/amotoen
>>
>> Notes:
>>  - jvisualvm doesn't like me this week so help there might be enough
>> (I can't see anything other than clojure classes - I'd love to only
>> see my code)
>
> Have you tried profiling with YourKit? They allow free usage for open
> source projects.
>
> David

I seem to remember looking into it at some point... I'll check it out again.

Thanks!
-Rich

-- 
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] Yet another {{mustache}} for Clojure

2012-07-19 Thread Shen, Feng
Great! Congratulation. You improved it a lot.
This should do good to stencil users, the code runs much faster now.

I did not implement the  "Set Delimiter" and "lambdas" and "Dotted Names",
etc.  You implemented the whole SPEC, this should be point out.

For a little background why I implemented
Mustache.clj
:
I was doing https://github.com/shenfeng/rssminer ,the way I generate HTML
is slow.
I love Mustache, it's great. I rewrite it using Mustache by using the
Clojure implention list here: http://mustache.github.com/.
The performance did not improve much.
*Without further reseach to find another one*, I write a Mustache
implementation for myself to reduce the latency of Rssminer.


On Fri, Jul 20, 2012 at 5:11 AM, David Santiago wrote:

> Just wanted to stop by and update this thread with the latest
> information. I just released Stencil 0.3, at
> http://github.com/davidsantiago/stencil and it contains many
> performance improvements. I have pushed the benchmarks I use to test
> it, including an adaptation of yours, to
> http://github.com/davidsantiago/mustachequerade; the readme has an
> example run. Performance of course depends on the templates and data,
> but 0.3 ranges from nearly as fast as your mustache to 2x the runtime.
>
> In particular, for the benchmark you posted, I now get runtimes for a
> single template render of 13us in mustache.clj vs. 25us in Stencil.
> I'm not satisfied with those numbers, and will continue to push them
> lower in future versions, but the 10x difference in runtime is clearly
> no longer the case.
>
>   David
>
> On Wed, Jul 11, 2012 at 8:50 PM, Shen, Feng  wrote:
> > Yes, you are right.  Stencil did a very good job.
> > I only implement a subset.  Test code .   "Set Delimiter" and "lambdas"
> and
> > "Dotted Names" are not implemented.
> >
> > The algorithm of this implementation is borrowed from Mustache.js.
> > I read the code,  It's brilliant.
> >
> > I'v used Mustache in several projects. I like it. It's simple and
> brilliant.
> > "Set Delimiter" and "lambdas" are never used.  This is why they are not
> > implemented currently. I will implement the whole Spec when I find the
> time.
> >
> >
> > On Thu, Jul 12, 2012 at 9:26 AM, Anthony Grimes  >
> > wrote:
> >>
> >> Stencil is spec compliant (the tests actually run against the spec)
> while
> >> this implementation is not. A major goal behind stencil is to be totally
> >> spec compliant and as fast as possible. However, implementing the slow
> parts
> >> of the spec is important too.
> >>
> >>
> >> On Wednesday, July 11, 2012 6:28:23 PM UTC-5, Feng Shen wrote:
> >>>
> >>> From http://mustache.github.com/, I only notice clostache, which is a
> >>> little slow.
> >>> I have not noticed stencil, if I do, probability, I will not do one
> >>> myself. It's pretty fast.
> >>> My implementation seems faster than stencil, in a test run, up to 10x.
> >>> Test code:
> >>>
> https://github.com/shenfeng/mustache.clj/blob/master/test/me/shenfeng/perf_bench.clj
> >>> It seems stencil is more feature rich than mine.  For example, I did
> not
> >>> implement "Set Delimiter".
> >>>
> >>>
> >>> On Wednesday, July 11, 2012 9:45:51 PM UTC+8, Baishampayan Ghose wrote:
> 
>  > I did yet another {{mustache}} implementation for Clojure
>  >
>  > https://github.com/shenfeng/mustache.clj
>  >
>  > I did it because I need a faster one when I am doing Rssminer . And
> I
>  > dit
>  > it.
>  > By the way, Rssminer is yet another RSS reader, but written in
>  > Clojure.
>  >
>  > Usage:
>  >
>  > [me.shenfeng/mustache "0.0.4"]
>  >
>  > (:use me.shenfeng.mustache)
>  >
>  > (deftemplate template "{{template}}")
>  > (to-html template {:you-data "data"}) ;; returns String
>  >
>  > Let me know if you have any ideas or questions.
> 
>  Shen,
> 
>  Very nice work. Have you benchmarked your mustache lib with stencil?
>  It would be an interesting comparison.
> 
>  Regards,
>  BG
> 
>  --
>  Baishampayan Ghose
>  b.ghose at gmail.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
> >
> >
> > --
> > 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, visi

Re: Idea around SCMs and Clojure

2012-07-19 Thread Rostislav Svoboda
> It would be more interesting to see a version control system based on
> storing an abstract syntax tree

hmm, interesting idea... such a SCM would need to have the code
compiled at every commit/checkout, right? How would that work for
large projects? And what about let's say "rebase -i master topic"
where master and topic differ by a large number or commits? And would
that work for reflection? And what about self modifying code (macros)?

Bost

-- 
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: Idea around SCMs and Clojure

2012-07-19 Thread Raoul Duke

a cheaper and horrible dirty hack might be to just store it in a
canonical indentation format, and then each person can register their
own output filter so that when they check out they get their own look
and feel.

of course diffs would suck.

the hack upon the hack for that would be to convert all repo data to
personal local format before diffing i guess.


On Thu, Jul 19, 2012 at 4:58 PM, Rostislav Svoboda
 wrote:
>> It would be more interesting to see a version control system based on
>> storing an abstract syntax tree
>
> hmm, interesting idea... such a SCM would need to have the code
> compiled at every commit/checkout, right? How would that work for
> large projects? And what about let's say "rebase -i master topic"
> where master and topic differ by a large number or commits? And would
> that work for reflection? And what about self modifying code (macros)?
>
> Bost
>
> --
> 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: s-expression levels and higher order functions

2012-07-19 Thread Alan Malloy
No, but it's pretty easy to write:

(defn map-depth [f coll depth]
  (if (zero? depth)
(map f coll)
(for [x coll]
  (map-depth f x (dec depth)

On Tuesday, July 17, 2012 7:17:19 PM UTC-7, Seth Chandler wrote:
>
> I'm new both to Clojure and to this group, so please be gentle.  I come to 
> Clojure mostly from a Mathematica background, which has a certain Lispyness 
> to it.  One of the things one can do in Mathematica is to map a function to 
> an s-expression but not at its top level, but rather at some user specified 
> level.  Thus Map[f, {{a,b},{c,d}},{2}] will (because of the {2} as the last 
> argument) evaluate to {{f[a],f[b]},{f[c],f[d]}} rather than 
> {f[{a,b}],f[{c,d}]}.  I have found this capability of having functions that 
> work at levels of an expression to be extremely valuable.  Is there work 
> already done that extends the higher order functions to permit something 
> like this.  And, yes, I am sure one could write a macro and perhaps that 
> has already been done, but I was curious as to what was out there.  My 
> Google search did not yield much on this topic, but perhaps I used the 
> wrong Clojure vocabulary.
>
> 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: Idea around SCMs and Clojure

2012-07-19 Thread Nahuel Greco
Check this project announced today in the Datomic ml:

http://github.com/jonase/scape

"Scape is quite ambitious. The idea is is to use the ClojureScript
analyzer to emit Datomic transaction data containing useful
information about some codebase and putting the data in a datomic
database so the program becomes queriable via datalog. This could
possibly be used for static analysis of Clojure code."

Saludos,
Nahuel Greco.


On Tue, Jul 17, 2012 at 11:04 AM, Steve Tickle  wrote:
> It would be more interesting to see a version control system based on
> storing an abstract syntax tree and then using a pretty printer when the
> files are checked out.
> In one fell swoop you remove the code-styling wars as everyone can have
> their own coding style and maintain consistency with everyone else.
> It also gives the versioning system knowledge of the code so you can diff
> functionality rather than the textual representation of that functionality.
>
> Combine an editor with the pretty printing/ASTVersioning and you have a
> proper integrated development environment!
>
> SteveT
>
> On Tuesday, 17 July 2012 11:27:41 UTC+1, N8Dawgrr wrote:
>>
>> Hi All,
>>
>> One of my first posts to Clojure mailing list. I had an idea around SCMs
>> and Clojure. I'd basically like to put the idea out there and get some
>> feedback. I hope I'm not breaking any etiquette linking to my blog post but
>> I've outlined the idea here:
>>
>> http://clojurian.blogspot.co.uk/
>>
>> In a nutshell its about why use files for source in Clojure, can we do
>> better?
>>
>> Regards,
>>
>> Nathan
>
> --
> 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: Expanding the Community Through Online Courses

2012-07-19 Thread grinnbearit
I'm working through SICP myself here http://grinnbearit.github.com/sicp/ 
feedback welcome :)

Also finished translating The Little Schemer 
here https://github.com/grinnbearit/the-little-clojurer

On Thursday, July 19, 2012 7:18:24 AM UTC+5:30, Robert Pitts wrote:
>
> If anyone else is interested SICP in Clojure there's a port in progress (
> http://sicpinclojure.com/) though I'm not sure if the project is 
> currently alive... if not I'm sure the author could be persuaded to 
> resurrect it, especially if people were willing to help ;)
>
> On Wednesday, July 18, 2012 3:08:21 PM UTC-7, mnicky wrote:
>>
>> Another one that comes into mind is SICP course [1] in Clojure. Given 
>> Clojure's similarity to Scheme it should be doable. Also, because the SICP 
>> book is now licensed under CC-BY-SA, there shouldn't be any copyright 
>> problems etc. IMO 
>>
>> [1] 
>> http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/
>>
>> On Wednesday, July 18, 2012 7:44:52 PM UTC+2, Eduardo Bellani wrote:
>>>
>>> Great idea and great effort. I would be awesome if Norvig gave a class 
>>> based on his PAIP 
>>> book, using clojure or any other lisp beast. 
>>>
>>> On Wed, Jul 18, 2012 at 1:38 PM, Joshua Bowles  
>>> wrote: 
>>> > I've made a request to Udacity and forwarded Harrison Maseko's 
>>> suggestions 
>>> > in my request. 
>>> > 
>>> > I'm sure if enough people get behind this... 
>>> > 
>>> > 
>>> > On Wed, Jul 18, 2012 at 10:33 AM, Joshua Bowles  
>>>
>>> > wrote: 
>>> >> 
>>> >> Peter Norvig's response: 
>>> >> 
>>> >> Possible ... Udacity would be more likely -- they seem to be more 
>>> >> skill-based whereas Coursera is more academic-based. 
>>> >> 
>>> >> 
>>> >> On Wed, Jul 18, 2012 at 10:16 AM, Joshua Bowles  
>>>
>>> >> wrote: 
>>> >>> 
>>> >>> I agree. My thinking with an AI class is that as LISP used to be 
>>> taught 
>>> >>> for AI in school, and most programs offer Java classes, there's got 
>>> to be a 
>>> >>> few Professors out there who really dig Clojure and have a good 
>>> chance 
>>> >>> teaching it. I didn't propose a "functional programming" course 
>>> because they 
>>> >>> already have that with Scala (not to say they wouldn't offer 
>>> another). 
>>> >>> 
>>> >>> As far as Udacity, Peter Norvig is somehow related with Udacity (not 
>>> sure 
>>> >>> what his role is), he's an old school LISPer and he's totally 
>>> familiar with 
>>> >>> Java. I don't know if he's into Clojure (but he's definitely not 
>>> against the 
>>> >>> idea of LISP running on JVM --- he wrote is own version a while back 
>>> with 
>>> >>> scheme http://norvig.com/jscheme.html). I'll email him and see if 
>>> he's 
>>> >>> interested. 
>>> >>> 
>>> >>> 
>>> >>> On Wed, Jul 18, 2012 at 9:08 AM, Harrison Maseko  
>>> >>> wrote: 
>>>  
>>>  That sounds like a good move, if a professor at some at one of 
>>> those 
>>>  Coursera linked universities would be willing to do that. However, 
>>> can the 
>>>  same request be sent to Udacity? Also, is AI the only practical 
>>> course to 
>>>  suggest? I would like to suggest to Udacity, "Introduction to 
>>> Functional 
>>>  Programming." Another course I would suggest is, "Building a 
>>> Dynamic 
>>>  Contacts Application for the Cloud," and the third one would be 
>>> "Game 
>>>  Development in Clojure" or something more focused like "Fluid 
>>> Dynamics for 
>>>  Game Development." All these could use Clojure. 
>>>  -h. 
>>>  
>>>  
>>>  On Wednesday, July 18, 2012 4:29:04 PM UTC+2, Joshua Bowles wrote: 
>>> > 
>>> > Yes! Just this morning (before reading this thread) I emailed 
>>> Coursera 
>>> > to request a course like "Artificial Intelligence in Clojure". I 
>>> posted on a 
>>> > separate thread here ("community interest in machine learning(?)") 
>>> that I 
>>> > had made the request and provided a link for anyone else who 
>>> wanted to make 
>>> > a request: 
>>> >  http://help.coursera.org/customer/portal/emails/new 
>>> > 
>>> > 
>>> > On Wed, Jul 18, 2012 at 8:18 AM, Harrison Maseko  
>>>
>>> > wrote: 
>>> >> 
>>> >> Hi Yann, 
>>> >> I agree that Udacity is more approachable in this regard than 
>>> >> Coursera. But imagine the publicity the language would get if 
>>> such a massive 
>>> >> audience were given exposure to Clojure and Clojurescript. I have 
>>> always 
>>> >> believed that a subset of Clojure (or any Lisp) could be taught 
>>> even to 
>>> >> programming beginners with ease. This in turn could dispel much 
>>> of the myths 
>>> >> surrounding Lisp-based languages to thousands at once (one of 
>>> which is 'Lisp 
>>> >> is difficult.' Simple as it may sound, it has deterred many from 
>>> even 
>>> >> peering into a Lisp). However, with a platform like Udacity, the 
>>> instructor 
>>> >> is at liberty to really explain in a newbie-friendly way the 
>>> elegance and 
>>> >> power 

Re: Clojurians in Pune

2012-07-19 Thread mmwaikar
A +10 from me. Would definitely attend any such event.
Maybe, we can try fixing bugs in any of the open source Clojure libraries.

Thanks,
Manoj.

On Tuesday, July 17, 2012 3:45:39 PM UTC+5:30, Murtaza Husain wrote:
>
> Hi,
>
> Anyone interested in organizing a clojure dojo in Pune ?
>
> Thanks,
> Murtaza
>

-- 
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} ring.velocity: render apache velocity templates for ring in clojure.

2012-07-19 Thread dennis zhuang
I've released ring.velocity 0.1.0
https://github.com/killme2008/ring.velocity
Thanks.

2012/7/18 Sun Ning 

> enlive最大的好处是页面html页面不会掺入任何模板语言**,直接就可以在浏览器里预览页面设计
> 但是用的时候思维确实和传统的模板引擎不太一样
>
>
> On Wed 18 Jul 2012 12:50:39 PM CST, Shen, Feng wrote:
>
>> 同感enlive较复杂。前段时间,转向了Mustache。
>>
>> 沈锋
>> 美味书签 http://mei.fm
>>
>>
>>
>> On Wed, Jul 18, 2012 at 11:59 AM, dennis zhuang > > wrote:
>>
>> 其实就是几行代码封装下,**我觉的velocity比什么enlive好用多了。
>>
>> 2012/7/18 Shen, Feng mailto:shen...@gmail.com>>
>>
>>
>> 不错不错。
>> velocity 在java中用得较广。
>> 这样为potential 的 clojure用户铺了一下道路。
>>
>> 沈锋
>> 美味书签 http://meiwei.fm 
>>
>>
>>
>>
>> On Wed, Jul 18, 2012 at 12:00 AM, dennis zhuang
>> mailto:killme2...@gmail.com>> wrote:
>>
>> A little error in getting started missing :age
>>
>>
>> |(render "test.vm" :name "dennis" :age 29)|
>>
>>
>> 2012/7/17 dennis zhuang > >
>>
>> Hi,all
>>
>> Apache velocity **is a
>>
>> great java template engine used widely. I want to use
>> it in clojure with compojure and ring framework,so
>> i've created this project---ring.velocity.
>>
>> Home: 
>> https://github.com/killme2008/**ring.velocity
>> Getting started:
>>
>> Adds dependency in leiningen project.clj:
>>
>>
>> |   [ring.velocity "0.1.0-SNAPSHOT"]
>> |
>>
>> Create a directory named |templates| in your project
>> directory to keep all velocity templates.
>>
>> Create a template |templates/test.vm|:
>>
>>
>> |   hello,$name,your age is $age.
>> |
>>
>> Use ring.velocity in your namespace:
>>
>>
>> |   (use '[ring.velocity.core :only [render]])
>> |
>>
>> Use |render| function to render template with vars:
>>
>>
>> |   (render "test.vm" :name "dennis" 29)
>> |
>>
>> The |test.vm| will be interpreted equals to:
>>
>>
>> |   hello,dennis,your age is 29.
>> |
>>
>> Use ring.velocity in compojure:
>>
>>
>> |   (defroutes app-routes
>>   (GET "/" [] (render "test.vm" :name "dennis" :age
>> 29))
>>   (route/not-found "Not Found"))
>> |
>>
>> Use ring.velocity in ring:
>>
>>
>> |   (use '[ring.util.response])
>>(response (render "test.vm" :name "dennis" :age 29))
>> |
>>
>> Custom velocity properties,just put a file named
>> |ring-velocity.properties| to your classpath or
>> resource paths.The default velocity properties is in
>> src/default/velocity.**properties
>> > master/src/default/velocity.**properties
>> >.
>>
>>
>> --
>> 庄晓丹
>> Email: killme2...@gmail.com
>>  xzhu...@avos.com
>> 
>> Site: http://fnil.net 
>> Twitter:  @killme2008
>>
>>
>>
>>
>>
>>
>> --
>> 庄晓丹
>> Email: killme2...@gmail.com 
>> xzhu...@avos.com 
>> Site: http://fnil.net 
>> Twitter:  @killme2008
>>
>>
>>
>>
>>
>>
>>
>> --
>> 庄晓丹
>> Email: killme2...@gmail.com 
>> xzhu...@avos.com 
>> Site: http://fnil.net 
>> Twitter:  @killme2008
>>
>>
>>
>>
>>


-- 
庄晓丹
Email:killme2...@gmail.com xzhu...@avos.com
Site:   http://fnil.net
Twitter:  @killme2008

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