Re: Python is way faster than Clojure on this task

2010-11-12 Thread pepijn (aka fliebel)
Me to: http://clojure-log.n01se.net/date/2010-11-07.html#11:57

On Nov 10, 5:59 pm, Leif Walsh  wrote:
> I am reminded of an arcane 
> implementation...http://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310...
>
> On Wed, Nov 10, 2010 at 8:06 AM, pepijn (aka fliebel)
>
>
>
>
>
>
>
>
>
>  wrote:
> > I almost forgot about this. I talked to mfex on IRC, and he came up
> > with the winning solution.
> >http://clojure-log.n01se.net/date/2010-11-07.html#11:32
>
> >https://gist.github.com/666228
>
> > Basically it comes down to *not* doing work, rather than doing it
> > fast.
>
> > What the Python version does - and this version as well - is check if
> > the block type is actually displayed before counting it.
>
> > Thanks for all the input!
>
> > On Nov 7, 6:30 pm, Justin Kramer  wrote:
> >> Implementing this in straight Java might help pinpoint whether this is
> >> a JVM issue or a Clojure issue.
>
> >> Also, FYI, there is clj-glob (https://github.com/jkk/clj-glob) for
> >> finding files based on patterns like */*/*.dat
>
> >> Justin
>
> >> On Nov 4, 4:28 pm, Pepijn de Vos  wrote:
>
> >> > Hi all,
>
> >> > I have written a Python script to analyze Minecraft levels and render a 
> >> > graph. Then I did the same with Clojure. It takes Python 10 seconds to 
> >> > analyze a map, while it takes Clojure over a minute.
>
> >> > After having tried different options without any significant 
> >> > improvement, I am lost as to why there is such a huge difference. I 
> >> > wouldn't mind an extra pair of eyes/brains to look at this.
>
> >> > I blogged about it in more detail 
> >> > here:http://pepijndevos.nl/clojure-versus-python
> >> > Clojure version:https://github.com/pepijndevos/Clomian/
> >> > Python version:https://github.com/l0b0/mian
>
> >> > Clojure spends most of its time in the freqs function, here are a couple 
> >> > of variations:https://gist.github.com/663096
>
> >> > If you want to run the code yourself, you'll need a Minecraft level and 
> >> > JNBT, which is not on Maven.
> >> > JNBT:http://jnbt.sourceforge.net/
> >> > The level used in the 
> >> > blogpost:http://dl.dropbox.com/u/10094764/World2.zip
>
> >> > Groeten,
> >> > Pepijn de Vos
> >> > --
> >> > Sent from my iPod Shufflehttp://pepijndevos.nl
>
> > --
> > 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
>
> --
> Cheers,
> Leif

-- 
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: Regarding lexical scoping and usage of 'let' in a recursive function call

2010-11-12 Thread Joseph Smith
In this case 'memoize' returns a memoized version of the function 'f', which 
closes over 'mem'. Each time 'memoize' is called a new atom is created, not 
each time the function it returns is called.


---
Joseph Smith
j...@uwcreations.com






On Nov 11, 2010, at 2:06 PM, Manoj wrote:

> I am a newbie to Clojure, so have some confusion around lexical
> scoping especially when "let" is used in a recursive function call. To
> be more precise, I am taking the example memoize() function used for
> explaining the concept of atom at clojure.org.
> 
> Here is how it is explained:
> 
> (defn memoize [f]
>  (let [mem (atom {})]
>(fn [& args]
>  (if-let [e (find @mem args)]
>(val e)
>(let [ret (apply f args)]
>  (swap! mem assoc args ret)
>  ret)
> 
> (defn fib [n]
>  (if (<= n 1)
>n
>(+ (fib (dec n)) (fib (- n 2)
> 
> (time (fib 35))
> user=> "Elapsed time: 941.445 msecs"
> 
> (def fib (memoize fib))
> 
> (time (fib 35))
> 
> user=> "Elapsed time: 0.044 msecs"
> 
> My question is when "let" is used in this context, wouldn't it create
> a fresh binding to a new atom{}? Any explanation would be highly
> appreciated.
> 
> 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: Simple Neural Network DSL -- request for feedback

2010-11-12 Thread Albert Cardona
Hi Eric,

Your neural network DSL looks great. One minor comment: why use lists
instead of sets? In the webpage you state:

"Lists are used to represent a unordered series"

... but lists are generally considered data structures whose elements
are accessible by index. The closest representation to an unordered
series is a set.

Just my two cents.


(A second comment: the git repository specified in the webpage appears empty.)

Albert

-- 
http://albert.rierol.net

-- 
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't get started with maven

2010-11-12 Thread Stuart Sierra
  clojure
was not implemented until Clojure-maven-plugin version 1.3.5.  Just
update the  string in the  section.

-S


On Nov 10, 10:36 pm, Jarl Haggerty  wrote:
> Leiningen was working just fine and I was perfectly happy, and one day
> I decided I'd like to wrap my head around maven.  The instructions for
> using the maven clojure plugin are very concise and easy to follow,
> but they just don't seem to work for me.  My pom.xml is at the bottom
> of this message.
>
> 1.  "mvn clojure:run" does what I want it to do but when I try "mvn
> clojure:repl" or "mvn clojure:swank" I just get this,
>
> [INFO] Scanning for projects...
> [INFO]
> 
> [INFO] Building pounce
> [INFO]    task-segment: [clojure:swank]
> [INFO]
> 
> [INFO] Preparing clojure:swank
> [INFO]
> 
> [ERROR] BUILD ERROR
> [INFO]
> 
> [INFO] Cannot find lifecycle mapping for packaging: 'clojure'.
> Component descriptor cannot be found in the component repository:
> org.apache.maven.lifecycle.mapping.LifecycleMappingclojure.
> [INFO]
> 
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> 
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Wed Nov 10 20:20:16 MST 2010
> [INFO] Final Memory: 16M/110M
> [INFO]
> 
>
> 2.  This might not be a maven problem but just a misunderstanding of
> unit tests.  If I have the files src/main/clojure/com/curiouscat/
> pounce/core.clj and src/test/clojure/com/curiouscat/pounce/core.clj
> "mvn clojure:test" will run tests in the core namespace but only those
> in the main file, not the test file.  If I remove the test file no
> tests will be run.  I assume that I should be able to contain all my
> tests in the test directory and I must be doing something wrong, what
> is it?
>
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd";>
>   4.0.0
>   com.curiouscat
>   pounce
>   1.0-SNAPSHOT
>   pounce
>   http://maven.apache.org
>   clojure
>   
>     
>       clojars
>       http://clojars.org/repo
>     
>   
>   
>     
>       
>         com.theoryinpractise
>         clojure-maven-plugin
>         1.3.2
>         true
>         
>           
>             compile-clojure
>             compile
>             
>               compile
>             
>           
>           
>             test-clojure
>             test
>             
>               test
>             
>           
>         
>       
>     
>   
>   
>     
>       org.clojure
>       clojure
>       1.2.0
>     
>     
>       swank-clojure
>       swank-clojure
>       1.2.1
>     
>   
> 

-- 
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: Maven package goal no longer builds clojure-contrib jar?

2010-11-12 Thread Stuart Sierra
The combined JAR is in modules/standalone.

-S


On Nov 7, 9:50 pm, agoodno  wrote:
> From the README.txt on github:
>
> ===
> Run the following command in this directory:
>
>     mvn package
>
> This will produce the file target/clojure-contrib-${VERSION}.jar that
> you can add to your Java classpath.
> ===
>
> I understand the project was modularized in 1.2.  Is there a new way
> to create the combined 'clojure-contrib.jar' ?  I've poked around in
> modules/complete and modules/standalone thinking that might be the new
> location but haven't figured it out yet.  I know I can download the
> release jar, but having tried to build it myself my curiosity is
> peaked about how to do it.  Thanks.
>
> Andy

-- 
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-contrib 1.3.0-alpha3 deployed to build.clojure.org

2010-11-12 Thread Stuart Sierra
On Nov 8, 5:14 pm, Sean Corfield  wrote:
> I meant more from the point of view of providing feedback to the
> Clojure team. If someone is comfortable developing against a fairly
> bleeding edge release, is it more valuable to the Clojure team to get
> feedback on the specific alpha builds or to get feedback on the
> snapshot builds?

I think it depends. If it's a build/deployment-related issue, probably
the alpha releases. If it looks like a bug, try the latest Clojure
source from github and report the Git commit ID you're testing
against.

-S

-- 
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: Supporting 1.2 and 1.3

2010-11-12 Thread Stuart Sierra
The "correct" way to deal with this is for users of your libraries to
exclude those dependencies if they don't want them.  Both Leiningen
and Maven support exclusion of transitive dependencies.

But given the reorganization of contrib, compatibility between 1.3 and
1.2 is difficult to achieve.  Maintaining 2 branches of your library
may be the only solution for now.

Also, going forward, you should not have dependencies on contrib/
standalone but on just the individual modules you need.

-S


On Nov 4, 2:44 am, Saul Hazledine  wrote:
> Hello,
>   I've put some small libraries on github. At the moment they
> specifically depend on Clojure 1.2 and contrib (since its the released
> version). However, I have had requests to take out the dependencies on
> clojure and contrib so that they don't infect projects that use them.
> Is this standard practice? Would it catch people out?
>
> I thought about alternative approaches but have no solution. For
> instance, in Leiningen, it is possible to specify a minimal version
> e.g
> [org.clojure/clojure-contrib "[1.2,)"]
>
> This would normally be fine but in 1.3 the dependency on contrib
> changes:
>
> [org.clojure.contrib/standalone "1.3.0-alpha2"]
>
> Has anyone hit this problem? What is the best way of dealing with it?
>
> Thanks in advance for any help.
> Saul

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


Oracle and Apple announce OpenJDK support for Mac

2010-11-12 Thread Steve Miner
Apple made some news during the Clojure Conj by announcing that Java support 
from Apple was being deprecated.  The good news today is that Oracle will 
deliver future updates of Java on the Mac.  I think it's safe to say that the 
Mac remains a viable platform for Clojure development.

http://www.apple.com/pr/library/2010/11/12openjdk.html

> November 12, 2010—Oracle and Apple® today announced the OpenJDK project for 
> Mac OS® X. Apple will contribute most of the key components, tools and 
> technology required for a Java SE 7 implementation on Mac OS X, including a 
> 32-bit and 64-bit HotSpot-based Java virtual machine, class libraries, a 
> networking stack and the foundation for a new graphical client. OpenJDK will 
> make Apple’s Java technology available to open source developers so they can 
> access and contribute to the effort.

Oracle blog:

http://blogs.oracle.com/henrik/2010/11/oracle_and_apple_announce_openjdk_project_for_osx.html

> For the sake of all Java developers out there, I am very happy that the 
> future of Java on OSX is now assured. I'm sure you have tons of questions, so 
> let me start with a few:
> 
> Q: When will JDK 7 be available for OSX?
> 
> A: My expectation is that we will release on current supported platforms 
> first, and that OSX support will follow later. The JDK 7 schedule can not 
> easily accomodate large changes like the addition of a new platform.
> 


-- 
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: Simple Neural Network DSL -- request for feedback

2010-11-12 Thread Ken Wesson
On Fri, Nov 12, 2010 at 9:15 AM, Albert Cardona  wrote:
> Hi Eric,
>
> Your neural network DSL looks great. One minor comment: why use lists
> instead of sets? In the webpage you state:
>
> "Lists are used to represent a unordered series"
>
> ... but lists are generally considered data structures whose elements
> are accessible by index. The closest representation to an unordered
> series is a set.
>
> Just my two cents.

Which data structure to use depends on a lot of your requirements, not
just the conceptual nature of the data. Here's a rough breakdown:

Lists: efficient traversal, efficient add/drop at start, can contain duplicates
Vecs: efficient traversal, efficient add/drop at end, efficient
indexed access, efficient "mutate" in middle, can contain duplicates
Sets: efficient contains?, efficient add/drop any element, efficient
avoiding of duplicates

In this case, if his "sets" are traversed frequently but contains? and
dropping of arbitrary members are not needed, nor efficient prevention
of duplicates, then lists might make more sense. If he actually needs
to have duplicates then sets are right out.

-- 
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: Regarding lexical scoping and usage of 'let' in a recursive function call

2010-11-12 Thread André Ferreira
Well, a more important matter, this example in the documentation of
atom is wrong!
The recursive calls will not be memoized if called like that. Running
this code clearly shows:

(defn memoize [f]
  (let [mem (atom {})]
(fn [& args]
  (if-let [e (find @mem args)]
(val e)
(let [ret (apply f args)]
  (swap! mem assoc args ret)
  ret)

(defn fib [n]
  (if (<= n 1)
n
(+ (fib (dec n)) (fib (- n 2)

(time (fib 35))

user=> "Elapsed time: 1218.15834 msecs"
(def fib (memoize fib))

(time (fib 35))

user=> "Elapsed time: 953.94816 msecs"

I believe this is caused because defn creates a named fn:
user=> (macroexpand '(defn fib [n]
(if (<= n 1)
  n
  (+ (fib (dec n)) (fib (- n 2))

(def fib (.withMeta (clojure.core/fn fib ([n] (if (<= n 1) n (+ (fib
(dec n)) (fib (- n 2)) (.meta (var fib

So the recursive call don't go through the global user/fib that has
been memoized, but by the local fib which hasn't.
So a correct way to write it would be:

(defn fib [n]
  (if (<= n 1)
n
(+ (user/fib (dec n)) (user/fib (- n 2)

(def fib (memoize fib))

(time (fib 35))

user=> "Elapsed time: 0.814599 msecs"

By fully qualifying the recursive call, it forces it to use the global
var, memoizing all the recursive calls.
This example should be corrected.

On Nov 12, 2:13 pm, Joseph Smith  wrote:
> In this case 'memoize' returns a memoized version of the function 'f', which 
> closes over 'mem'. Each time 'memoize' is called a new atom is created, not 
> each time the function it returns is called.
>
> ---
> Joseph Smith
> j...@uwcreations.com
>
> On Nov 11, 2010, at 2:06 PM, Manoj wrote:
>
>
>
>
>
>
>
> > I am a newbie to Clojure, so have some confusion around lexical
> > scoping especially when "let" is used in a recursive function call. To
> > be more precise, I am taking the example memoize() function used for
> > explaining the concept of atom at clojure.org.
>
> > Here is how it is explained:
>
> > (defn memoize [f]
> >  (let [mem (atom {})]
> >    (fn [& args]
> >      (if-let [e (find @mem args)]
> >        (val e)
> >        (let [ret (apply f args)]
> >          (swap! mem assoc args ret)
> >          ret)
>
> > (defn fib [n]
> >  (if (<= n 1)
> >    n
> >    (+ (fib (dec n)) (fib (- n 2)
>
> > (time (fib 35))
> > user=> "Elapsed time: 941.445 msecs"
>
> > (def fib (memoize fib))
>
> > (time (fib 35))
>
> > user=> "Elapsed time: 0.044 msecs"
>
> > My question is when "let" is used in this context, wouldn't it create
> > a fresh binding to a new atom{}? Any explanation would be highly
> > appreciated.
>
> > 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


Newbie question

2010-11-12 Thread labwork07
Which natural language processing tools have you used that worked well with  
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

ANN: Programothesis screencast series on Clojure, Emacs, etc

2010-11-12 Thread Scott Jaderholm
Hey Clojurians,

I don't think there are any great new movies in the theater this weekend so
if you're looking to kick back and relax and watch the tube a bit you might
checkout the first few episodes of my new screencast series on Clojure,
Emacs, Slime, etc.

http://youtube.com/emailataskcom

The episodes were recorded several months ago but just posted today. I
expect to post a ton more real soon so subscribe if you want to be notified.

Also I just launched a webapp written entirely in Clojure (and slice
http://github.com/scottjad/slice). It's http://emailatask.com and is for
sending tasks (and reminders) to people through email without an account and
for free.

Cheers,
Scott

-- 
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-contrib 1.3.0-alpha3 deployed to build.clojure.org

2010-11-12 Thread Sean Corfield
Thanx Stuart. That gives me the guidance I was looking for.

On Fri, Nov 12, 2010 at 7:10 AM, Stuart Sierra
 wrote:
> I think it depends. If it's a build/deployment-related issue, probably
> the alpha releases. If it looks like a bug, try the latest Clojure
> source from github and report the Git commit ID you're testing
> against.

-- 
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: Simple Neural Network DSL -- request for feedback

2010-11-12 Thread Eric Schulte
Carson  writes:

> Hi!  That looks interesting.  I'm curious how big a network are you
> intending to experiment with?  (ie, # of layers, size of layers?).
>

I haven't really thought about limits on the size of the networks,
although I suppose with very large networks it may become a good idea to
parallelize the evaluation of subsets of the network (which should be as
simple as replacing some maps with pmaps).

I'll be interested to see how the execution time grows with network
size.

-- 
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: Simple Neural Network DSL -- request for feedback

2010-11-12 Thread Eric Schulte
Hi Albert,

Albert Cardona  writes:

> Hi Eric,
>
> Your neural network DSL looks great. One minor comment: why use lists
> instead of sets? In the webpage you state:
>
> "Lists are used to represent a unordered series"
>

I used lists because I want to be able to specify a network in which (at
least initially) all neurons in a hidden layer are identical e.g. the
list example at http://cs.unm.edu/~eschulte/src/neural-net/.

>
> ... but lists are generally considered data structures whose elements
> are accessible by index. The closest representation to an unordered
> series is a set.
>
> Just my two cents.
>
>
> (A second comment: the git repository specified in the webpage appears empty.)
>

Oh, thanks for pointing this out apparently I'm having gitweb
issues. I've just fixed this, cloning the repository should now work.
: git clone http://gitweb.adaptive.cs.unm.edu/neural-net.git

Cheers -- Eric

>
> Albert
>
> -- 
> http://albert.rierol.net

-- 
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: Programothesis screencast series on Clojure, Emacs, etc

2010-11-12 Thread Bob Hutchison

On 2010-11-12, at 4:25 PM, Scott Jaderholm wrote:

> Hey Clojurians,
> 
> I don't think there are any great new movies in the theater this weekend so 
> if you're looking to kick back and relax and watch the tube a bit you might 
> checkout the first few episodes of my new screencast series on Clojure, 
> Emacs, Slime, etc.
> 
> http://youtube.com/emailataskcom

Thanks Scott. Nice idea, short to the point demonstrations of how things work. 
I am new to emacs so these are pretty handy.

Cheers,
Bob

-- 
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't get started with maven

2010-11-12 Thread Jarl Haggerty
I've already crawled back to leiningen, but but changing the version
lets me start my swank server in a maven project.

On Nov 12, 8:03 am, Stuart Sierra  wrote:
>   clojure
> was not implemented until Clojure-maven-plugin version 1.3.5.  Just
> update the  string in the  section.
>
> -S
>
> On Nov 10, 10:36 pm, Jarl Haggerty  wrote:
>
> > Leiningen was working just fine and I was perfectly happy, and one day
> > I decided I'd like to wrap my head around maven.  The instructions for
> > using the maven clojure plugin are very concise and easy to follow,
> > but they just don't seem to work for me.  My pom.xml is at the bottom
> > of this message.
>
> > 1.  "mvn clojure:run" does what I want it to do but when I try "mvn
> > clojure:repl" or "mvn clojure:swank" I just get this,
>
> > [INFO] Scanning for projects...
> > [INFO]
> > 
> > [INFO] Building pounce
> > [INFO]    task-segment: [clojure:swank]
> > [INFO]
> > 
> > [INFO] Preparing clojure:swank
> > [INFO]
> > 
> > [ERROR] BUILD ERROR
> > [INFO]
> > 
> > [INFO] Cannot find lifecycle mapping for packaging: 'clojure'.
> > Component descriptor cannot be found in the component repository:
> > org.apache.maven.lifecycle.mapping.LifecycleMappingclojure.
> > [INFO]
> > 
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > 
> > [INFO] Total time: 2 seconds
> > [INFO] Finished at: Wed Nov 10 20:20:16 MST 2010
> > [INFO] Final Memory: 16M/110M
> > [INFO]
> > 
>
> > 2.  This might not be a maven problem but just a misunderstanding of
> > unit tests.  If I have the files src/main/clojure/com/curiouscat/
> > pounce/core.clj and src/test/clojure/com/curiouscat/pounce/core.clj
> > "mvn clojure:test" will run tests in the core namespace but only those
> > in the main file, not the test file.  If I remove the test file no
> > tests will be run.  I assume that I should be able to contain all my
> > tests in the test directory and I must be doing something wrong, what
> > is it?
>
> > http://maven.apache.org/POM/4.0.0"; 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >   
> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0...";>
> >   4.0.0
> >   com.curiouscat
> >   pounce
> >   1.0-SNAPSHOT
> >   pounce
> >   http://maven.apache.org
> >   clojure
> >   
> >     
> >       clojars
> >       http://clojars.org/repo
> >     
> >   
> >   
> >     
> >       
> >         com.theoryinpractise
> >         clojure-maven-plugin
> >         1.3.2
> >         true
> >         
> >           
> >             compile-clojure
> >             compile
> >             
> >               compile
> >             
> >           
> >           
> >             test-clojure
> >             test
> >             
> >               test
> >             
> >           
> >         
> >       
> >     
> >   
> >   
> >     
> >       org.clojure
> >       clojure
> >       1.2.0
> >     
> >     
> >       swank-clojure
> >       swank-clojure
> >       1.2.1
> >     
> >   
> > 
>
>

-- 
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: Simple Neural Network DSL -- request for feedback

2010-11-12 Thread Ross Gayler


On Nov 13, 9:12 am, "Eric Schulte"  wrote:
> Albert Cardona  writes:
>
> > Your neural network DSL looks great. One minor comment: why use lists
> > instead of sets? ...
>
> I used lists because I want to be able to specify a network in which (at
> least initially) all neurons in a hidden layer are identical e.g. the
> list example athttp://cs.unm.edu/~eschulte/src/neural-net/.

You might want to consider maps. For some NN models all you care about
is that each neuron has a unique identity (in which case using an
index value as a key is as good a solution as any).  However, for
other NNs you may care about the topological organisation of the
neurons in a 1-D, 2-D, or 3-D space in order to do things like
connecting corresponding neurons in different layers or having the
probability of a connection be a function of the separation of the
neurons.  In this case, you might use a data structure representing
the coordinates of each neuron as its key.

Ross

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