First foray into profiling

2011-01-09 Thread Mark Engelberg
I'm trying to use JVisualVM to profile some Clojure code.

One thing I successfully figured out from using the profiler was that
lein swank was not actually starting the jvm in -server mode like I
thought it was.  Arggh, now I have to figure out what's going wrong
there.

In the meantime, I fired up the "lein repl" which did start up in
-server mode, and tried to do some profiling.  It tells me 80% of its
time is being spent in:
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()

What does this mean?  Is this just an artifact of the connection
between the profiler and the repl?

The other time was mostly being spent in Clojure's hashmap classes.
Is there any way to figure out which lines of my Clojure code actually
triggered the time-consuming hash map operations?

Is there a better free profiler I should be using?

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: Oddity: PersistentTreeMap does not implement SortedMap

2011-01-09 Thread Stuart Halloway
No, they should: http://dev.clojure.org/jira/browse/CLJ-705

Stu

> I notice that clojure.lang.PersistentTreeMap does not implement
> SortedMap (let alone NavigableMap), unlike java.util.TreeMap.
> 
> Any particular reason why?
> 
> -- 
> 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: How to test for literal

2011-01-09 Thread Stuart Halloway
>> Basically, I want the clojure equivalent of a clisp atom.
>> In clisp, atom is true for everything that is not a cons cell.
>> The closest match I found is creating a macro that returns true for 
>> everything that is not a list:
>> clisp:
>> 
>> (atom 1) => true
>> (atom '(1 2 3)) => false
>> 
>> I hope that makes things clearer :)
>> Andreas
> 
> Sounds like you really just want
> 
> (defn atom? [x]
>  (not
>(or
>  (instance? java.util.Collection x)
>  (instance? java.util.Map x
> 
> which returns true for integers, strings, and pretty much any other
> objects except lists, seqs, vectors, maps, sets, and the like (and
> their mutable java.util counterparts).

Additional corner cases to consider:

* nil
* arrays
* poorly-designed Java classes that are clearly collection-like but don't 
implement collection interfaces.

I needed to make a decision for all these cases in order to implement 
clojure.data/diff. The function clojure.data/equality-partition can be used to 
check for atomness, but note the docstring: implementation detail and subject 
to change.

What else can you tell us about your use case? 

Stu

-- 
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: Oddity: PersistentTreeMap does not implement SortedMap

2011-01-09 Thread bOR_
(type (sorted-map-by > 3 1 2 4 5 3)) 

 
clojure.lang.PersistentTreeMap  

user> (type (select-keys (sorted-map-by > 3 1 2 4 5 3) (list 5 2 3)))   


clojure.lang.PersistentArrayMap 

Not sure if this is related in any way but the topic of PersistentTreeMaps, 
but I noticed this morning that select-keys doesn't return the same type of 
map as that it was fed. That happens more often in clojure, so it might be 
the default behaviour, and not something that needs to be fixed.

For now I just looked at source of select-keys, and made a copy of the 
function that builds a sorted-map-by, rather than just a {}. Is that a 
sensible way to do it.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: First foray into profiling

2011-01-09 Thread Albert Cardona
2011/1/9 Mark Engelberg :
> I'm trying to use JVisualVM to profile some Clojure code.
>
> One thing I successfully figured out from using the profiler was that
> lein swank was not actually starting the jvm in -server mode like I
> thought it was.  Arggh, now I have to figure out what's going wrong
> there.
>
> In the meantime, I fired up the "lein repl" which did start up in
> -server mode, and tried to do some profiling.  It tells me 80% of its
> time is being spent in:
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()
>
> What does this mean?  Is this just an artifact of the connection
> between the profiler and the repl?


The jvisualvm CPU profiling measures time spent in a method. A wait()
call will then add to the method's time. Indeed it's misleading.



> The other time was mostly being spent in Clojure's hashmap classes.
> Is there any way to figure out which lines of my Clojure code actually
> triggered the time-consuming hash map operations?
>
> Is there a better free profiler I should be using?


I had reasonable success with jprofiler, which has a "trial" license
that can be renewed by signing up again with a new email. In any case
It's not expensive.

Just beware that jprofiler runs code without JIT, or so I (perhaps
wrongly) concluded.


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: First foray into profiling

2011-01-09 Thread John
Hm I've used JVisualVM before but not in cojunction with lein swank.
On my machine it appears to start two clojure.main processes both on
the client jvm, and referencing the clojure 1.2 jar despite having one
of the 1.3 versions in project.clj. Hrm..

On Jan 9, 6:15 am, Mark Engelberg  wrote:
> I'm trying to use JVisualVM to profile some Clojure code.
>
> One thing I successfully figured out from using the profiler was that
> lein swank was not actually starting the jvm in -server mode like I
> thought it was.  Arggh, now I have to figure out what's going wrong
> there.
>
> In the meantime, I fired up the "lein repl" which did start up in
> -server mode, and tried to do some profiling.  It tells me 80% of its
> time is being spent in:
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()
>
> What does this mean?  Is this just an artifact of the connection
> between the profiler and the repl?
>
> The other time was mostly being spent in Clojure's hashmap classes.
> Is there any way to figure out which lines of my Clojure code actually
> triggered the time-consuming hash map operations?
>
> Is there a better free profiler I should be using?
>
> 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: Oddity: PersistentTreeMap does not implement SortedMap

2011-01-09 Thread Michael Wood
On 9 January 2011 16:23, bOR_  wrote:
> (type (sorted-map-by > 3 1 2 4 5 3))
> clojure.lang.PersistentTreeMap
> user> (type (select-keys (sorted-map-by > 3 1 2 4 5 3) (list 5 2 3)))
> clojure.lang.PersistentArrayMap
>
> Not sure if this is related in any way but the topic of PersistentTreeMaps,
> but I noticed this morning that select-keys doesn't return the same type of
> map as that it was fed. That happens more often in clojure, so it might be
> the default behaviour, and not something that needs to be fixed.
>
> For now I just looked at source of select-keys, and made a copy of the
> function that builds a sorted-map-by, rather than just a {}. Is that a
> sensible way to do it.

How about using (empty map):

(defn select-keys2
  "Returns a map containing only those entries in map whose key is in keys"
  {:added "1.0"}
  [map keyseq]
(loop [ret (empty map) keys (seq keyseq)]
  (if keys
(let [entry (. clojure.lang.RT (find map (first keys)))]
  (recur
   (if entry
 (conj ret entry)
 ret)
   (next keys)))
ret)))
user=> (type (select-keys2 (sorted-map-by > 3 1 2 4 5 3) (list 5 2 3)))
clojure.lang.PersistentTreeMap

-- 
Michael Wood 

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


Entity component system

2011-01-09 Thread msappler
Hey for the lasts 6 months I am developing an action RPG game in
clojure (and learning the language).

For this game I developed an entity component system which is a way of
using composition to create entities in the game.

I also use slick2d for the 2d engine.

Here I posted some examples for defmonster/player-entity:
http://slick.javaunlimited.net/viewtopic.php?p=17375#17375
(last post under name hardcore)

Basically I just thougt maybe somebody is interested in my solution
and I would maybe write some more about this engine or make it open
source.

--

Here my post from the slick2d forums:

Hello guys

For the last 6 months I have been learning clojure (lisp for the jvm)
and writing my own entity engine for my action rpg in this language.

It is soo much less verbose than my java attempt at such an engine.

Here is an example of a few monsters defined:
Code:

(defmonster armored-skull {:hp 2 :armor 65 :lvl 4 :pxsize 31}
  (default-death-trigger level)
  (create-melee-avoidance-movement-comp 0.0008)
  (rotation-component)
  (hp-regen-component 2)
  (body-image-render-component (monsterimage "armoredskull.png"))
  (create-monster-melee-comp 500 250 level (sound "slash.wav") (get-id
player-body)))

(defmonster mage-skull {:hp 4.8 :armor 0 :lvl 4 :pxsize 30}
  (default-death-trigger level)
  (create-ranged-movement-comp 0.004 (rand-int-between 3 4))
  (hp-regen-component 10)
  (rotation-component)
  (body-image-render-component (monsterimage "mageskull.png"))
  (create-monster-ranged-comp level 3000 50))



and spawning an instance of a monster-type at position 10 5:
Code:

(try-spawn [10 5] :mage-skull)



Or the player character:
Code:

(defn create-player-body [position]
  (create-body-with-id player-entity-id true :player position 30 30
(death-trigger player-death)
(create-player-skillmanager)
(movement-component
  {:control-update
   (fn [body control delta]
 (cond
   @saved-mouseover-body
 (get-vector-from-to body @saved-mouseover-body)
   (and (not (:leftm-consumed @state)) (is-leftbutton-down?))
 (get-vector-to-mouse-coords)))}
  player-move-speed)
(destructible-component player-start-hp 0)
(rotation-component)
(dmg-modifier-component)
(hp-regen-component 0.25)
(light-component 1 1 1 0.7 7)
(mana-regen-component 0.25)
(player-animation)
(show-on-minimap Color/red)))


My solution evolved over many months and I find it clean and simple.

Basically I have a map of ids to entities.

An entity just consists of multiple components (and nothing else).

If somebody is interested I would write more about my entity-component
system 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


Library and development process for GAE

2011-01-09 Thread Stefan Kamphausen
Hi,

finally I find some time to dive into the development with Clojure for 
Googles AppEngine.

My first question is: which library should a newcomer use, appengine[1] or 
appengine-magic[2]?  Or can you give me some hints in which way they 
differ?  They both seem to be actively developed.  And how does 
clj-gae-datastore[3] fit in (as far as I know, this is old and not working 
with Clojure 1.2)?

Given that decision I'd like to understand the general development process.  
Does one always compile to a class (ns ...gen-class ..extends ..Servlet) and 
will the appengine development server pick up the changes, or will I just 
recompile a function (using a setup with Emacs and SLIME), what about the 
REPL mode of appengine-magic together with the datastore and other features.

I think, I just some pointers to get going.

Kind regards,
Stefan

[1] https://github.com/r0man/appengine-clj
[2] https://github.com/gcv/appengine-magic
[3] https://github.com/smartrevolution/clj-gae-datastore

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

2011-01-09 Thread Patrik Fredriksson
I have used cron4j in a small project, it's like a more lightweight
version of Quartz and fits nicely with Clojure: 
http://www.sauronsoftware.it/projects/cron4j/

Code example here: https://gist.github.com/388555

/Patrik

On Jan 8, 8:37 pm, Trevor  wrote:
> Thanks, everyone for all you help.
>
> I noticed a few questions I should answer.
>
> re: email option: I really just planned on sending a gmail to indicate
> the job succeeded or failed. Being somewhat new to programming the
> straightest path, for me, would be using clojure code (I'm not a
> network guru, so for me it's grab a library and use use it).
>
> re: webapp status: The job I want to run is really 3 jobs bundled in
> one (they need not all run, but they at least need to run sequentially
> if they do). So when I see an email notifying the fail, I will use the
> web app to determine if #1, #2 or #3 failed. If  #1 failed, then I can
> trigger 2 and 3. I want this to be a eyeball decision, not a
> programmatic one.
>
> Really, I just don't like cron jobs. I'd rather stay with in clojure
> if I can where I'm comfortable that I'm not somehow pooching the
> system, plus it just seems like something a language ought to be able
> to do.
>
> I noticed a point made about not having to deal with OS differences,
> which while not an immediate problem for me, is still noteworthy. At
> some point I'd like to distribute my code, and not leave that burden
> to others.
>
> I'm leaning towards just building my own, testing it out (learn more
> this way).
> I looked at the function gaz, provided, but it didn't seem like what I
> would implement, but I may end up there. If that fails I will probably
> use quartz-scheduler.
>
> Once again - thank you for all the replies.
>
> On Jan 8, 6:14 am, Ken Wesson  wrote:
>
>
>
> > On Sat, Jan 8, 2011 at 12:04 AM, Michael Gardner  
> > wrote:
> > > On Jan 7, 2011, at 9:19 PM, Ken Wesson wrote:
>
> > >> On the other hand, running a job scheduler from outside Clojure
> > >> results in cranking up a big, slow to start up, expensive JVM process
> > >> every single time a task needs to run, each of which runs one task
> > >> once, and the scheduling itself must be done in an icky language like
> > >> shell or cron's idiosyncratic "crontab" files with icky error
> > >> reporting (e.g., need to run a local mail *server* to receive error
> > >> notifications).
>
> > > If you care about startup times, you can use nailgun. But that shouldn't 
> > > matter unless you're running the job every minute or something.
>
> > Obviously, that requires knowing about, and learning how to use,
> > nailgun. Solutions with a higher cost in
> > novel-tools-you-have-to-figure-out-how-to-use are not, all other
> > things being equal, superior ones.
>
> > > As for scheduling, crontabs are really not hard to figure out. If you 
> > > need more complex scheduling, you can do that from your Clojure script 
> > > (essentially using cron to set the polling interval).
>
> > If you're going to do that anyway, you might as well do the whole
> > thing from inside Clojure.
>
> > > And what kinds of error reporting could you do from a persistent daemon 
> > > that you couldn't also do from a cron job? Besides, most
> > > systems that have cron also come with postfix (though it's disabled by 
> > > default on Mac OS X), so all you have to do is add your email
> > > address to /etc/aliases. Email-based error reporting for background tasks 
> > > is really nice because you don't have to remember to check
> > > some log file or other task-specific status indicator periodically (which 
> > > has burned me in the past).
>
> > Well, both Windows and MacOS have variations on the nifty concept of
> > "tray notification".
>
> > > But this is all somewhat beside the point. What Trevor said sounded as 
> > > though the specific types of tasks he mentioned (sending
> > > emails and checking some kind of status via web app) were particularly 
> > > unsuited to scheduled jobs; I was asking what it was about
> > > those tasks in particular that made him lean towards a daemon instead.
>
> > Maybe he needs timely responses to something, so something more akin
> > to a web server than a periodically-run job?

-- 
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: Library and development process for GAE

2011-01-09 Thread Constantine Vetoshev
On Jan 9, 10:54 am, Stefan Kamphausen  wrote:
> Given that decision I'd like to understand the general development process.  
> Does one always compile to a class (ns ...gen-class ..extends ..Servlet) and
> will the appengine development server pick up the changes, or will I just
> recompile a function (using a setup with Emacs and SLIME), what about the
> REPL mode of appengine-magic together with the datastore and other features.

I'm the author of appengine-magic, so my opinion is necessarily biased
in its favor. :)

appengine-magic is designed to be a self-contained, easy way to use
Google App Engine with Ring, or any Ring-compliant framework.
appengine-magic includes its own datastore abstraction layer, with a
(reasonably) high-level Clojure syntax and API. Most other App Engine
services are also included, with idiomatic Clojure wrappers.

I optimized the development process for interactive use. You write
code with Emacs and SLIME, recompile functions interactively, and your
local development web server will show all changes. No restarts and no
nasty "watch this directory for changed class files" kludges are
needed. In version 0.4.0 (https://github.com/gcv/appengine-magic/tree/
v0.4.0, use "0.4.0-SNAPSHOT" as a dependency), the REPL mode works
fine with the datastore and other App Engine SDK features: you can run
datastore queries right from the REPL. I will probably finalize the
0.4.0 release soon, since it's a huge improvement over 0.3.x.

For deployment, you will have to compile .class files, but appengine-
magic provides Leiningen tasks to simplify the process. Please refer
to the documentation for more information, but you basically just run
"lein appengine-prepare" and then either run the SDK's deployment
script or "lein appengine-update".

The README file has full instructions for getting started. To get
started, just install the SDK and make a Leiningen project with the
correct dependencies. Feel free to contact me if you have any
questions.

-- 
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: Library and development process for GAE

2011-01-09 Thread Stefan Kamphausen
Hi,

On Sunday, January 9, 2011 6:37:58 PM UTC+1, Constantine Vetoshev wrote:
>
>
> I'm the author of appengine-magic, so my opinion is necessarily biased 
> in its favor. :) 
>

fine with me.  The authors are most likely to be the ones to be able to tell 
the differences. :-)
 

> I optimized the development process for interactive use. You write 
> code with Emacs and SLIME, recompile functions interactively, and your 
> local development web server will show all changes. No restarts and no 
> nasty "watch this directory for changed class files" kludges are 
> needed. In version 0.4.0 (https://github.com/gcv/appengine-magic/tree/ 
> v0.4.0, use "0.4.0-SNAPSHOT" as a dependency), the REPL mode works 
> fine with the datastore and other App Engine SDK features: you can run 
> datastore queries right from the REPL. 


This sounds really cool.  I played around with a sample project which used 
0.3.2 and it didn't really feel like developing lisp code.  So, you suggest 
jumping to 0.4.0-SNAPSHOT?  I'll happily do, even more so since I'm only 
just starting some fun stuff. 
 

> For deployment, you will have to compile .class files, but appengine- 
> magic provides Leiningen tasks to simplify the process. 

[...]

All this is totally clear.  And, yes, I've read the docs :-).

I'd suggest writing a small section on the typical 
development-deployment-cycle.  Maybe I can write something as soon as I got 
it sorted out.  However, since the weekend is almost done, it might take a 
few days. 

Kind regards,
Stefan

-- 
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: how do I improve indentation of reify methods in clojure-mode

2011-01-09 Thread Eric Schulte
Hi,

Even using Phil's clojure-mode I find myself often editing the source
code of clojure-mode to add custom indentation or fontification for my
own macros or for forms I feel have been missed.  Perhaps some of the
lists of function/marco-names in clojure-mode could be tucked behind
user-configurable variables to allow personalization without editing of
the source file.

When writing emacs-lisp it is possible to include indentation
information into a definition e.g.

  (defmacro do-something-to-something (thing &rest stuff-to-do)
(declare (indent 1))
...)

the `(declare (indent 1))' ensures that it will be indented as follows

  (do-something-to-something thing
(stuff-to-do))

perhaps something similar could be done in Clojure using meta
information, although that may be asking for far too much Clojure/e-lisp
interaction?

I'd have to think this issue has been addressed by the CL community.

Cheers -- Eric

Stuart Sierra  writes:

> This is an unfortunate problem with clojure-mode being based on older Lisp 
> modes for Emacs. It doesn't really know how to read Clojure code, just how 
> to parse Lispy expressions in general.
>
> Phil Hagelberg's fork of clojure-mode [1] has experimental support for 
> better indentation in forms like reify.
>
> -Stuart Sierra
> clojure.com
>
> [1] https://github.com/technomancy/clojure-mode

-- 
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: First foray into profiling

2011-01-09 Thread Mark Engelberg
On Sun, Jan 9, 2011 at 3:15 AM, Mark Engelberg  wrote:
> In the meantime, I fired up the "lein repl" which did start up in
> -server mode, and tried to do some profiling.  It tells me 80% of its
> time is being spent in:
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()

To be clear, I have absolutely no idea what this
TCPTransport$ConnectionHandler class does, or why its run method would
be called as a result of my code, let alone why it is taking 80% of
the run time.  I'm doing nothing requiring internet connectivity, or
communication between programs.  Any ideas about this?

-- 
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: First foray into profiling

2011-01-09 Thread Praki Prakash
It is most likely the transport used between your profiler front-end and the
JVM backend. Right click on the entry point you are interested in and
display it as a subtree. VisualVM and YourKit profilers show time
percentages based on the time spent in that method which is want you want to
see.

Praki

On Sun, Jan 9, 2011 at 10:52 AM, Mark Engelberg wrote:

> On Sun, Jan 9, 2011 at 3:15 AM, Mark Engelberg 
> wrote:
> > In the meantime, I fired up the "lein repl" which did start up in
> > -server mode, and tried to do some profiling.  It tells me 80% of its
> > time is being spent in:
> > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()
>
> To be clear, I have absolutely no idea what this
> TCPTransport$ConnectionHandler class does, or why its run method would
> be called as a result of my code, let alone why it is taking 80% of
> the run time.  I'm doing nothing requiring internet connectivity, or
> communication between programs.  Any ideas about this?
>
> --
> 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

which IDEs are you all using?

2011-01-09 Thread Alex Baranosky
Hi,

I'm most used to using Intellij, since it is what I use everyday at work
programming in Java.  So my first forays into Clojure have been using
LaClojure.  Some things I like about using Intellij for Clojure development
are:

   - I can click on a piece of code and have Intellij take me to the file
   where that code is defined, even if I didn't write it; this means I can
   click right through into clojure.core and read the source.
   - It also has a nice rainbow parens feature which I find helps with
   visually parsing the Clojure code.
   - And of course Intellij has a LOT of keyboard shortcuts to help with
   manipulating the text.
   - I also like to change the color scheme, I assume emacs allows you to
   use a self-created color scheme?

I've been considering switching to Emacs because it seems to be the de facto
standard for the community.  Does emacs have the equivalent of these four
features?  If not, does it have their equivalents?

On another note, I'd also love to hear what features Emacs would give me
that LaClojure doesn't enable.

All the Best,
Alex

-- 
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: Entity component system

2011-01-09 Thread Eduardo Julian
Interesting. I'm also into game development with Clojure. I'd like to
see the project open--sourced and, if possible, participate.

-- 
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: which IDEs are you all using?

2011-01-09 Thread Vagif Verdi
Jumping to the definition of function: Alt-.
Returning back Alt-,

All other (and much more) features are implemented in slime (emacs
package).

On Jan 9, 11:01 am, Alex Baranosky 
wrote:
> Hi,
>
> I'm most used to using Intellij, since it is what I use everyday at work
> programming in Java.  So my first forays into Clojure have been using
> LaClojure.  Some things I like about using Intellij for Clojure development
> are:
>
>    - I can click on a piece of code and have Intellij take me to the file
>    where that code is defined, even if I didn't write it; this means I can
>    click right through into clojure.core and read the source.
>    - It also has a nice rainbow parens feature which I find helps with
>    visually parsing the Clojure code.
>    - And of course Intellij has a LOT of keyboard shortcuts to help with
>    manipulating the text.
>    - I also like to change the color scheme, I assume emacs allows you to
>    use a self-created color scheme?
>
> I've been considering switching to Emacs because it seems to be the de facto
> standard for the community.  Does emacs have the equivalent of these four
> features?  If not, does it have their equivalents?
>
> On another note, I'd also love to hear what features Emacs would give me
> that LaClojure doesn't enable.
>
> All the Best,
> Alex

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

2011-01-09 Thread Trevor
That works & it's really easy to use - Thanks.

On Jan 9, 9:22 am, Patrik Fredriksson  wrote:
> I have used cron4j in a small project, it's like a more lightweight
> version of Quartz and fits nicely with 
> Clojure:http://www.sauronsoftware.it/projects/cron4j/
>
> Code example here:https://gist.github.com/388555
>
> /Patrik
>
> On Jan 8, 8:37 pm, Trevor  wrote:
>
> > Thanks, everyone for all you help.
>
> > I noticed a few questions I should answer.
>
> > re: email option: I really just planned on sending a gmail to indicate
> > the job succeeded or failed. Being somewhat new to programming the
> > straightest path, for me, would be using clojure code (I'm not a
> > network guru, so for me it's grab a library and use use it).
>
> > re: webapp status: The job I want to run is really 3 jobs bundled in
> > one (they need not all run, but they at least need to run sequentially
> > if they do). So when I see an email notifying the fail, I will use the
> > web app to determine if #1, #2 or #3 failed. If  #1 failed, then I can
> > trigger 2 and 3. I want this to be a eyeball decision, not a
> > programmatic one.
>
> > Really, I just don't like cron jobs. I'd rather stay with in clojure
> > if I can where I'm comfortable that I'm not somehow pooching the
> > system, plus it just seems like something a language ought to be able
> > to do.
>
> > I noticed a point made about not having to deal with OS differences,
> > which while not an immediate problem for me, is still noteworthy. At
> > some point I'd like to distribute my code, and not leave that burden
> > to others.
>
> > I'm leaning towards just building my own, testing it out (learn more
> > this way).
> > I looked at the function gaz, provided, but it didn't seem like what I
> > would implement, but I may end up there. If that fails I will probably
> > use quartz-scheduler.
>
> > Once again - thank you for all the replies.
>
> > On Jan 8, 6:14 am, Ken Wesson  wrote:
>
> > > On Sat, Jan 8, 2011 at 12:04 AM, Michael Gardner  
> > > wrote:
> > > > On Jan 7, 2011, at 9:19 PM, Ken Wesson wrote:
>
> > > >> On the other hand, running a job scheduler from outside Clojure
> > > >> results in cranking up a big, slow to start up, expensive JVM process
> > > >> every single time a task needs to run, each of which runs one task
> > > >> once, and the scheduling itself must be done in an icky language like
> > > >> shell or cron's idiosyncratic "crontab" files with icky error
> > > >> reporting (e.g., need to run a local mail *server* to receive error
> > > >> notifications).
>
> > > > If you care about startup times, you can use nailgun. But that 
> > > > shouldn't matter unless you're running the job every minute or 
> > > > something.
>
> > > Obviously, that requires knowing about, and learning how to use,
> > > nailgun. Solutions with a higher cost in
> > > novel-tools-you-have-to-figure-out-how-to-use are not, all other
> > > things being equal, superior ones.
>
> > > > As for scheduling, crontabs are really not hard to figure out. If you 
> > > > need more complex scheduling, you can do that from your Clojure script 
> > > > (essentially using cron to set the polling interval).
>
> > > If you're going to do that anyway, you might as well do the whole
> > > thing from inside Clojure.
>
> > > > And what kinds of error reporting could you do from a persistent daemon 
> > > > that you couldn't also do from a cron job? Besides, most
> > > > systems that have cron also come with postfix (though it's disabled by 
> > > > default on Mac OS X), so all you have to do is add your email
> > > > address to /etc/aliases. Email-based error reporting for background 
> > > > tasks is really nice because you don't have to remember to check
> > > > some log file or other task-specific status indicator periodically 
> > > > (which has burned me in the past).
>
> > > Well, both Windows and MacOS have variations on the nifty concept of
> > > "tray notification".
>
> > > > But this is all somewhat beside the point. What Trevor said sounded as 
> > > > though the specific types of tasks he mentioned (sending
> > > > emails and checking some kind of status via web app) were particularly 
> > > > unsuited to scheduled jobs; I was asking what it was about
> > > > those tasks in particular that made him lean towards a daemon instead.
>
> > > Maybe he needs timely responses to something, so something more akin
> > > to a web server than a periodically-run job?

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


Metadata on symbols differ with caret reader

2011-01-09 Thread mdzaebel
Hi,

(meta ^:k [])  -->  {:tag :k}
(meta ^:k 'o)  -->  nil
(meta(with-meta 'o {:tag :k}))  -->  {:tag :v}

Why doesn't the second line return the metadata?

Thanks, Marc

Using Clj 1.2

-- 
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: How to test for literal

2011-01-09 Thread Ken Wesson
On Sun, Jan 9, 2011 at 9:23 AM, Stuart Halloway
 wrote:
> Additional corner cases to consider:
>
> * nil

Tricky one. It's clearly atomic in the usual sense; at the same time
it can stand in for an empty coll in many cases. I'd call it atomic.

> * arrays

Nonatomic. Is there an #(instance? X %) test, with some substitute for
X, to detect them though?

> * poorly-designed Java classes that are clearly collection-like but don't 
> implement collection interfaces.

There's no theoretical way to detect all of these automatically, even
with heavy use of reflection and debug-inspectors. There are surely
ways to disguise collections such that the general case of recognizing
them is equivalent to the halting problem.

In practice, you might want to either just treat anything that's not
an array or a java.util collection as atomic, or else provide a hook
for the caller to supply exceptions:

(defn atom?
  ([x]
(atom? x (constantly false)))
  ([x exception?]
(not
  (or
(instance? java.util.Collection x)
(instance? java.util.Map x)
(.isArray (.getClass x))
(exception? x)

(atom? [1 2 3])
=> false
(atom? {:a 1 :b 2})
=> false
(atom? (make-array String 3))
=> false
(atom? (java.util.HashMap.))
=> false
(atom? 3)
=> true
(atom? 3 #(instance? Number %))
=> false

I'd also say that String is a slightly tricky one, having
collection-like behavior (it's a freaking list of characters!) but
being very commonly used as an atomic thing more than as a collection.
Symbols and keywords should definitely be regarded as atomic.

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


only 3 benchmarks game tasks still have no Clojure programs

2011-01-09 Thread Isaac Gouy
Only 3 tasks on the computer language benchmarks game still have no
Clojure programs -


1) meteor-contest

http://shootout.alioth.debian.org/u32q/benchmark.php?test=meteor


2) chameneos-redux

http://shootout.alioth.debian.org/u32q/benchmark.php?test=chameneosredux


3) pidigits

http://shootout.alioth.debian.org/u32q/benchmark.php?test=pidigits


http://shootout.alioth.debian.org/help.php#stepbystep

-- 
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: feedback on first compojure app: Sportello

2011-01-09 Thread Alex Baranosky
Thanks for the help James, I appreciate the points for improvement.  I'll
look into lein ring as soon as I can.

-- 
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: Metadata on symbols differ with caret reader

2011-01-09 Thread Meikel Brandmeyer
Hi,

Am 09.01.2011 um 22:52 schrieb mdzaebel:
> (meta ^:k [])  -->  {:tag :k}
> (meta ^:k 'o)  -->  nil
> (meta(with-meta 'o {:tag :k}))  -->  {:tag :v}
> 
> Why doesn't the second line return the metadata?

Because 'o expands to (quote o) and you actually hint this list. You might try 
(meta ' ^:k o).

Sincerely
Meikel

-- 
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: Metadata on symbols differ with caret reader

2011-01-09 Thread Tim Robinson
You must have something messed up:

In line 1 (meta ^:k []) does not return {:tag :k}  it returns nil and
I am using Clojure 1.2.

Both lines 1 and 2, shouldn't return meta, because 'meta' only takes
an object as an input argument.
And only if the object already has metadata will metadata will return.

=> (def o (with-meta ['mydatastructure] {:k []}))
=> (meta o)
{:k []}


On Jan 9, 2:52 pm, mdzaebel  wrote:
> Hi,
>
> (meta ^:k [])  -->  {:tag :k}
> (meta ^:k 'o)  -->  nil
> (meta(with-meta 'o {:tag :k}))  -->  {:tag :v}
>
> Why doesn't the second line return the metadata?
>
> Thanks, Marc
>
> Using Clj 1.2

-- 
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: Metadata on symbols differ with caret reader

2011-01-09 Thread Meikel Brandmeyer
Hi,

Am 10.01.2011 um 01:10 schrieb Tim Robinson:

> You must have something messed up:
> 
> In line 1 (meta ^:k []) does not return {:tag :k}  it returns nil and
> I am using Clojure 1.2.
> 
> Both lines 1 and 2, shouldn't return meta, because 'meta' only takes
> an object as an input argument.
> And only if the object already has metadata will metadata will return.
> 
> => (def o (with-meta ['mydatastructure] {:k []}))
> => (meta o)
> {:k []}

Are you sure?

Clojure 1.2.0
user=> (meta '^:k o)
{:tag :k}
user=> (meta ^:k []) 
{:tag :k}
user=> (meta (with-meta 'o {:tag :k}))
{:tag :k}
user=> (meta ^:k 'o)
nil

The ^ stuff all works in the reader. So meta always sees only one argument with 
metadata already attached. The question is: Where is the meta data attached?

Sincerely
Meikel

-- 
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: Metadata on symbols differ with caret reader

2011-01-09 Thread Tim Robinson
Am I sure?.. No, I'm never sure :)

But I am using 1.2 and when I run (meta ^:k []) or even (meta '^:k o)
I get nil.

Plus:

app=> (doc meta)
-
clojure.core/meta
([obj])
  Returns the metadata of obj, returns nil if there is no metadata.
nil

I could be missing something?






On Jan 9, 5:17 pm, Meikel Brandmeyer  wrote:
> Hi,
>
> Am 10.01.2011 um 01:10 schrieb Tim Robinson:
>
> > You must have something messed up:
>
> > In line 1 (meta ^:k []) does not return {:tag :k}  it returns nil and
> > I am using Clojure 1.2.
>
> > Both lines 1 and 2, shouldn't return meta, because 'meta' only takes
> > an object as an input argument.
> > And only if the object already has metadata will metadata will return.
>
> > => (def o (with-meta ['mydatastructure] {:k []}))
> > => (meta o)
> > {:k []}
>
> Are you sure?
>
> Clojure 1.2.0
> user=> (meta '^:k o)
> {:tag :k}
> user=> (meta ^:k [])
> {:tag :k}
> user=> (meta (with-meta 'o {:tag :k}))
> {:tag :k}
> user=> (meta ^:k 'o)
> nil
>
> The ^ stuff all works in the reader. So meta always sees only one argument 
> with metadata already attached. The question is: Where is the meta data 
> attached?
>
> Sincerely
> Meikel

-- 
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: Entity component system

2011-01-09 Thread justinhj
Thanks for sharing.  I've also spent some time building a Common Lisp
game engine that uses a component architecture for the game objects.

For example in pong the player's paddle is made up of a visual,
physical and logical components.

(defun make-pong-player(side human sprite-def control-type name)
  (let ((phys (make-instance '2d-physics
 :collide-type 'paddle :y *paddle-start-y* :width 
*paddle-
width* :height *paddle-height*))
;   (anim (make-instance 'animated-sprite :sprite-def sprite-def
;:current-frame 'frame-1 :speed 5.0))
(visual (make-instance 'rectangle
  :w *paddle-width* :h *paddle-height*))
(pong (make-instance 'player-paddle-logic
 :control-type control-type :side side))
(obj (make-instance 'composite-object :name name)))
(add-component obj phys)
(add-component obj visual)
;(add-component obj anim)
(add-component obj pong)
obj))

The objects implement message handlers in order to operate. For
example the game engine sends update and draw messages. Users can
write their own message types with custom argument lists.

I've put the project on google code http://code.google.com/p/lisp-game-engine/

Although the pong game works I wouldn't consider this a finished
project by any means; it's more an experiment in game programming
using CL and the REPL.

It would require significant refactoring to make it work with Clojure
since I use mutable state a lot, but would certainly be possible.

Justin

-- 
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: which IDEs are you all using?

2011-01-09 Thread jeregrine
I've been using Vim, screen, and lein repl. 
I definitely don't use it efficiently but its a start. If anyone knows a 
good vim clojure tutorial I will be all ears. 


-- 
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: which IDEs are you all using?

2011-01-09 Thread gaz jones
i wrote this recently about how i edit clojure in emacs, listing some
features i find especially useful:

http://blog.gaz-jones.com/post/2501842155/interactive-clojure-development-in-emacs-with-leiningen

i used to use vimclojure as vim was my favourite editor but decided to
take the plunge and learn emacs after seeing stuart halloway use it on
some screen casts and being impressed with the flow. very glad i did,
its great (i still use vim for ruby though :D).

hope that helps,
gaz

On Sun, Jan 9, 2011 at 1:01 PM, Alex Baranosky
 wrote:
> Hi,
>
> I'm most used to using Intellij, since it is what I use everyday at work
> programming in Java.  So my first forays into Clojure have been using
> LaClojure.  Some things I like about using Intellij for Clojure development
> are:
>
> I can click on a piece of code and have Intellij take me to the file where
> that code is defined, even if I didn't write it; this means I can click
> right through into clojure.core and read the source.
> It also has a nice rainbow parens feature which I find helps with visually
> parsing the Clojure code.
> And of course Intellij has a LOT of keyboard shortcuts to help with
> manipulating the text.
> I also like to change the color scheme, I assume emacs allows you to use a
> self-created color scheme?
>
> I've been considering switching to Emacs because it seems to be the de facto
> standard for the community.  Does emacs have the equivalent of these four
> features?  If not, does it have their equivalents?
>
> On another note, I'd also love to hear what features Emacs would give me
> that LaClojure doesn't enable.
>
> All the Best,
> Alex
>
> --
> 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: Clojure Quizzes?

2011-01-09 Thread John Svazic
Thanks Sean and Benjamin.  I've started at Coderloop and I must admit
that I'm hooked.  I'll take a look at Project Euler next, once I'm
done providing suggestions and finishing a few more quizzes at
Coderloop.  :-)  Now I'll have to hit the IRC channel to get help on
some minor issues so as not to spoil any of the quizzes I'm trying to
take on.  Thanks again.

On Jan 6, 1:11 am, "benjamin.s.r"  wrote:
> http://coderloop.com/like Project Euler but more modern

-- 
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: Metadata on symbols differ with caret reader

2011-01-09 Thread Tim Robinson
user=> (meta '^:k o)
{:tag :k}

How does this happen when :tag is not even in the expression?
If you launch a brand new repl and run it what happens?

On Jan 9, 5:17 pm, Meikel Brandmeyer  wrote:
> Hi,
>
> Am 10.01.2011 um 01:10 schrieb Tim Robinson:
>
> > You must have something messed up:
>
> > In line 1 (meta ^:k []) does not return {:tag :k}  it returns nil and
> > I am using Clojure 1.2.
>
> > Both lines 1 and 2, shouldn't return meta, because 'meta' only takes
> > an object as an input argument.
> > And only if the object already has metadata will metadata will return.
>
> > => (def o (with-meta ['mydatastructure] {:k []}))
> > => (meta o)
> > {:k []}
>
> Are you sure?
>
> Clojure 1.2.0
> user=> (meta '^:k o)
> {:tag :k}
> user=> (meta ^:k [])
> {:tag :k}
> user=> (meta (with-meta 'o {:tag :k}))
> {:tag :k}
> user=> (meta ^:k 'o)
> nil
>
> The ^ stuff all works in the reader. So meta always sees only one argument 
> with metadata already attached. The question is: Where is the meta data 
> attached?
>
> Sincerely
> Meikel

-- 
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: Library and development process for GAE

2011-01-09 Thread Glen Stampoultzis
On 10 January 2011 04:37, Constantine Vetoshev  wrote:

> On Jan 9, 10:54 am, Stefan Kamphausen  wrote:
> > Given that decision I'd like to understand the general development
> process.
> > Does one always compile to a class (ns ...gen-class ..extends ..Servlet)
> and
> > will the appengine development server pick up the changes, or will I just
> > recompile a function (using a setup with Emacs and SLIME), what about the
> > REPL mode of appengine-magic together with the datastore and other
> features.
>
> I'm the author of appengine-magic, so my opinion is necessarily biased
> in its favor. :)
>
>
-- chop --

I've been using appengine-magic to develop a webapp for keeping track of
Clojure libraries.  I've found it really nice to use and I haven't even
switched to the 0.4.0 branch yet.  Many thanks Constantine for such a
fantastic library.  I can't imagine trying to get all the app-engine
libraries working without it.

Regards,

Glen

-- 
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: which IDEs are you all using?

2011-01-09 Thread Alex Baranosky
Thanks for showing your blog entry.  It's coming in handy.

Alex

-- 
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: which IDEs are you all using?

2011-01-09 Thread Alex Baranosky
Hi Gaz,

I followed your blog and when I used Emacs to install the package syou
suggested (clojure-mode, slime etc) I go this error output.  I'd love to
know if this means anything to anyone, I'm a total newbie to Emacs:

Compiling file
/home/alex/.emacs.d/elpa/clojure-mode-1.7.1/clojure-mode-pkg.el at Sun Jan
9 22:44:07 2011

Compiling file /home/alex/.emacs.d/elpa/clojure-mode-1.7.1/clojure-mode.el
at Sun Jan  9 22:44:07 2011
clojure-mode.el:69:1:Warning: cl package required at runtime

In clojure-mode:
clojure-mode.el:179:34:Warning: reference to free variable `paredit-mode'
clojure-mode.el:179:51:Warning: reference to free variable `paredit-version'

In clojure-font-lock-extend-region-def:
clojure-mode.el:250:33:Warning: reference to free variable `font-lock-beg'

-- 
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: which IDEs are you all using?

2011-01-09 Thread gaz jones
hey, did it fail to install or was it just a warning? you can check if
it installed with M-x package-list-packages and seeing if it is in the
installed list (should be at the bottom of the buffer marked as
installed). you get quite a lot of warnings with some of those
packages on install but they're usually not a problem.

try restarting emacs and opening a clojure file and if 'Clojure' is in
your mode bar then it is all good...

On Sun, Jan 9, 2011 at 10:00 PM, Alex Baranosky
 wrote:
> Hi Gaz,
>
> I followed your blog and when I used Emacs to install the package syou
> suggested (clojure-mode, slime etc) I go this error output.  I'd love to
> know if this means anything to anyone, I'm a total newbie to Emacs:
>
> Compiling file
> /home/alex/.emacs.d/elpa/clojure-mode-1.7.1/clojure-mode-pkg.el at Sun Jan
> 9 22:44:07 2011
>
> Compiling file /home/alex/.emacs.d/elpa/clojure-mode-1.7.1/clojure-mode.el
> at Sun Jan  9 22:44:07 2011
> clojure-mode.el:69:1:Warning: cl package required at runtime
>
> In clojure-mode:
> clojure-mode.el:179:34:Warning: reference to free variable `paredit-mode'
> clojure-mode.el:179:51:Warning: reference to free variable `paredit-version'
>
> In clojure-font-lock-extend-region-def:
> clojure-mode.el:250:33:Warning: reference to free variable `font-lock-beg'
>
> --
> 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: which IDEs are you all using?

2011-01-09 Thread Alex Baranosky
After a little fiddling I see that of the 5 (clojure-mode,
clojure-test-mode, slime, slime-repl, swank-clojure) all installed, except
clojure-test did not (it's not red)

Now when I try to install that package it says that the file,
clojure-mode.el, exists already.  Yea, clojure mode is installed, but not
clojure-test-mode, so what gives?

-- 
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: Metadata on symbols differ with caret reader

2011-01-09 Thread Meikel Brandmeyer
Hi,

On 10 Jan., 04:17, Tim Robinson  wrote:

> How does this happen when :tag is not even in the expression?
> If you launch a brand new repl and run it what happens?

What I posted in the previous email is exactly a fresh repl session
and what happens there with 1.2. And in fact, that it is what I would
expect.

^String is a short-hand notation for ^{:tag String}. There was a
change planned for using ^ with keywords, namely that ^:foo is short-
hand for ^{:foo true}. But I don't know whether this change made it
into 1.3.

Sincerely
Meikel

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