Re: Expanding the Community Through Online Courses

2012-09-07 Thread Mayank Jain
On Thu, Sep 6, 2012 at 11:53 PM, Jorge Fiallega jorgefiall...@gmail.comwrote:


 I am kindly asking Rich Hickey, Stuart Halloway or some other big name to
 create a course like this in Clojure.


That would be great! :)

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

2012-09-07 Thread David Powell
In Clojure, all Clojure files are utf-8.  I assume that is also required in
edn?
(I think it should be)
On Sep 7, 2012 2:01 AM, Rich Hickey richhic...@gmail.com wrote:

 I've started to document a subset of Clojure's data format in an effort to
 get it more widely used as a data exchange format, e.g. as an alternative
 to JSON.

 Please have a look:

 https://github.com/richhickey/edn

 Rich

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


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

`cljs.reader/read-string` on anonymous functions

2012-09-07 Thread Shantanu Kumar
Hello,

Anonymous functions with #() notation (example below) expand using fn*
by `clojure.core/read-string`, but in `cljs.reader/read-string` it
throws an error:

Argument passed to `cljs.reader/read-string`: #(do true)

Error: Could not find tag parser for (do in (inst uuid queue)

Is there a built-in tag parser for anonymous functions in
ClojureScript? Thanks in advance for any pointers.

Shantanu

-- 
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: A Performance Comparison of SBCL Clojure

2012-09-07 Thread Andy Fingerhut
Since my last message, I personally have only submitted a new faster Clojure 
program for the knucleotide problem on the Benchmarks Game site.  I haven't 
checked whether other Clojure programs have been submitted in that time.

For all of the benchmark machines below, I'd say don't worry about the pidigits 
problem.  It is kind of an odd case.  The Clojure program does not use the GNU 
gmp library for arbitrary precision integer arithmetic, but the Java program 
and several other languages do.  You can stress out about that fact if you 
want.  I don't.  Life is too short.  That problem simply shows the difference 
between Java BigInteger performance versus the GNU gmp library performance, not 
Clojure vs. Java.


The rest of the problems I consider reasonably fair comparisons, although I'd 
bet money the Clojure run time of several can still be reduced with enough 
skill and persistence.  Some day I'd like to have side by side performance 
comparisons of these programs versus the easier-to-write kind that someone is 
more likely to come up with on a first or second try, rather than the 
tweaked-out oddities of programs on the site.  In a few months, perhaps.


32-bit 1 core Clojure vs. Java: 
http://shootout.alioth.debian.org/u32/benchmark.php?test=alllang=clojurelang2=java

Only 2 problems (other than pidigits) have Clojure worse than 4x the Java time. 
 I don't know why reverse-complement and fasta-redux are so bad relative to the 
Java programs, because the exact same programs are at most 4x slower on the 
64-bit benchmark machines.  Something weird performance-wise about those 
programs on 32-bit machines.

32-bit 4 core: 
http://shootout.alioth.debian.org/u32q/benchmark.php?test=alllang=clojure

Only 3 problems (other than pidigits) worse than 4x the Java time.  
reverse-complement and fasta-redux have the same weird 32-bit performance 
weirdness as mentioned above, whatever that may be.  fannkuch-redux is 5x the 
Java run time.

64-bit 1 core: 
http://shootout.alioth.debian.org/u64/benchmark.php?test=alllang=clojure
64-bit 4 core: 
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=clojure

All Clojure programs within 4x the run time of the corresponding Java programs, 
averaging around 2.5x the run time of Java.


Lesson I've learned: If you've got an inner loop of your program that you 
really really need to run faster, code it in Java, C, or even assembler.  Use 
profiling tools to find those spots, rather than guessing where you think they 
might be.  Hand-coded assembler can beat optimized C by a factor of 2 or more 
in many cases, but who wants to program in assembler?  For that matter, who 
wants to write large programs in C?

Andy


On Aug 28, 2012, at 7:02 AM, Ben Mabey wrote:

 Thanks Andy for the insightful report!  I knew you and others have worked 
 hard on the benchmarks so this kind of analysis is very helpful.
 
 Thanks for all your work on them,
 Ben
 
 On 8/28/12 12:07 AM, Andy Fingerhut wrote:
 I've written several of the Clojure programs on the site.  I'm not 
 omniscient when it comes to writing efficient Clojure code, but I know a few 
 of the techniques.  Several, if not most, of the Clojure solutions already 
 take advantage of mutable data structures, for example.   
 
 There are some faster programs people have created for a few of the 
 problems, but they haven't been submitted yet, due to lack of time/interest. 
  I might get some of them submitted over the next several weeks.
 
 I suspect the average ratio of Clojure run time / Java run time can be 
 brought closer to the range of x1 through x5 or so, rather than the current 
 range of x2 through x12.  It used to be in the range of x1 to x8 or so, but 
 over the last year the Java program submissions have gotten faster while the 
 Clojure ones haven't been improved, or not as much.  Getting x1 or even x2 
 across all problems seems highly unlikely to me, but I'd be happy to be 
 proved wrong.
 
 It is true that a few of the problems have very short run times for the Java 
 programs that extra Clojure init time makes it difficult for them to compete 
 (e.g. best Java run times for reverse-complement and fasta-redux problems 
 are under 2 sec), but half of them take over 20 sec to complete using the 
 Java programs, which should give both Java and Clojure programs plenty of 
 time for JIT optimizations to take effect.  The remaining differences are 
 either differences in the algorithm or data structure in use, and/or the 
 efficiency of the resulting byte codes from Java and Clojure compilers.
 
 As for memory used, Hello, world takes about 60 to 70 Mbytes of resident 
 memory to complete, so no Clojure program will be below that.  If you want 
 thousands of separate JVMs running Clojure processes, each with a small 
 memory footprint, I wouldn't recommend it, but I doubt anyone would want to 
 do that.  It is more fair to compare memory use for problems that require a 
 larger amount of memory, e.g. 

Re: edn

2012-09-07 Thread Ben Smith-Mannschott
On Fri, Sep 7, 2012 at 3:01 AM, Rich Hickey richhic...@gmail.com wrote:
 I've started to document a subset of Clojure's data format in an effort to 
 get it more widely used as a data exchange format, e.g. as an alternative to 
 JSON.

 Please have a look:

 https://github.com/richhickey/edn

 Rich

A few questions or things I'm unclear on:

- The expected result of parsing { 1.0 :a, 1 :b, 1.0M :c } is unclear
to me. Since we're gonna have maps, some more information on expected
equality semantics of edn values is needed.

- nil is not a symbol. A parser seeing «(nil)» is expected to produce
a list of length one containing a single reference to nothing. The
collections used to represent the result of the parse must support
null elements (Google Guava's, for example, generally do not).

- edn is described as a textual format (sequence of characters). A
word on the expected encoding of serialized representations (sequence
of bytes) would be good. Mandate UTF-8?

- Are \u style Unicode escapes supported? In strings? elsewhere?

- Comments appear not to be supported. I know a deliberate choice was
made not to support comments as part of JSON. For use in configuration
files edited by humans, however, this is an inconvenience. Thoughts?

// Ben

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


Re: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Anthony Grimes
If it hasn't been updated at this point, I think it is safe to say it isn't 
being maintained. I'd go with Compojure. It is pretty minimal too. If you 
really, really want moustache, it might not be hard to fork and update the 
deps.

On Friday, September 7, 2012 12:51:37 AM UTC-5, Murtaza Husain wrote:

 Hi,

 Moustache seems to be a great library and I would like to use it for my 
 next project (No offense to compojure :) ) . However it still lists clojure 
 1.1 and ring 0.2 as its dependencies (on clojars). Does moustache work with 
 clojure 1.4 and ring 1.1.5 ? Also is it still being maintained ?

 Thanks,
 Murtaza


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

Re: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Herwig Hochleitner
I'm using moustache for all my projects. The new ones too, with clojure
1.4+ and ring 1.0+
Works great, I'd recommend it.

cheers

-- 
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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Herwig Hochleitner
Append: you don't need to fork or update it, since it uses version ranges
in its dependencies.

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

Possible bug in CLJS `case` with quoted symbols

2012-09-07 Thread Shantanu Kumar
Hello,

In Clojure 1.4.0 REPL I noticed this:

user= (let [a 'a] (case a nil :nil ' :amp :none))
:none
user= (let [a '] (case a nil :nil ' :amp :none))
:amp
user= (let [a 'b] (case a nil :nil 'b :b :none))
:b

In the CLJS Rhino REPL I saw this:

ClojureScript:cljs.user (let [a 'a] (case a nil :nil ' :amp :none))
:none
ClojureScript:cljs.user (let [a '] (case a nil :nil ' :amp :none))
:none
ClojureScript:cljs.user (let [a 'b] (case a nil :nil 'b :b :none))
:none

If somebody confirms that it looks like a bug, I can file an issue.

Shantanu

-- 
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: Fund raiser for our projects

2012-09-07 Thread Simone Mosciatti
Ok, I guess nobody is really interested in something like that...
Never mind...

On Wednesday, September 5, 2012 6:37:40 PM UTC+2, Simone Mosciatti wrote:

 Hi everybody,

 I get a little idea now that we are heading to Christmas.

 Would be nice to organize a little fund raiser to support our projects.

 We have a lot of great project, but first of all good documentation is not 
 the norm.
 Then there are a lot of spot where we can improve-- I am thinking about 
 web authentication, friends is great but the same author suggest to add 
 security and a bunch of other type of authentication, but obviously there 
 is more.

 I am making a personal project and I am find some sort of lack in any 
 library I am using, however I don't have neither the time nor the knowledge 
 to really improve the situation.

 Maybe the author of the library would have at least the knowledge so if we 
 can raise some money to buy his/her time would be really nice, wouldn't ?

 Finally we should also involve the company that are using clojure ( 
 http://dev.clojure.org/display/community/Clojure+Success+Stories more 
 http://www.quora.com/Whos-using-Clojure-in-production ) to raise bigger 
 money.

 I thought about and I have some idea how decide what project would get the 
 -hypotetical- money.

 Anyway before to even think about how organize everything I want to know 
 what the community think about that.

 It is possible ? It can be dangerous ? We shouldn't do that ? 

 Thanks for the attention.

 Greets

 Simone Mosciatti


-- 
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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Murtaza Husain
Herwig,

I have noticed that moustache swallows any errors, is there a way so that 
any errors bubble up ?

Thanks,
Murtaza 

On Friday, September 7, 2012 2:35:07 PM UTC+5:30, Herwig Hochleitner wrote:

 Append: you don't need to fork or update it, since it uses version ranges 
 in its dependencies. 

-- 
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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Herwig Hochleitner
2012/9/7 Murtaza Husain murtaza.hus...@sevenolives.com

 I have noticed that moustache swallows any errors, is there a way so that
 any errors bubble up ?


I'm not sure what you mean, in my experiences exceptions thrown by handlers
always bubble up.

in this example

(defn route-handler [req]
  (throw (clojure.lang.ExceptionInfo. Error)))

(def server-handler
  (app
[route] route-handler))

the exception would hit ring, when visiting /route, as it should.
Can you post an example showing the erratic behavior?

-- 
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 ritz 0.4.0 release with nREPL debugger support

2012-09-07 Thread Stefan Hübner
Hugo Duncan h...@hugoduncan.org writes:

 * ritz-swank corresponds to the previous ritz functionality and provides
   a swank server with debugger capabilities.

How would you fire up a swank server from the REPL?

I'm using the Maven and the clojure-maven-plugin, which has no (yet)
goal for ritz or ritz-swank. But if I could just fire up a REPL and
start the swank server there, that would help for the time being.

Also: the Zi maven plugin has not catched up with ritz 0.4.0. I was
trying to force it to use ritz-swank-0.4.0 but got an exception when
doing 'mvn zi:ritz':

InvocationTargetException: java.lang.RuntimeException: No such var:
debug/breakpoint-list, compiling:(ritz/commands/contrib/ritz.clj:51)


-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


Could strint be variadic?

2012-09-07 Thread Marko Topolnik
clojure.core.strint is a nice tool to have, but for longer strings the 
limitation of  to a single argument becomes a problem. If I want to wrap 
my code to fit maximum line length, I cannot split the string argument into 
several string literals. Is there an existing way to deal with this, or 
could the  macro be extended to receive more than one string argument?

-- 
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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Murtaza Husain

What I mean is the exceptions dont show up in the browser. I see them in 
the server terminal. The browser will either show a blank screen or the 
last route that worked. Only when I go to the server terminal is when I see 
the stacktarce. 

So sometimes its misleading, even though I may see content on the screen, 
there was actually an error on the server side.  

On Friday, September 7, 2012 3:45:27 PM UTC+5:30, Herwig Hochleitner wrote:

 2012/9/7 Murtaza Husain murtaza...@sevenolives.com javascript:

 I have noticed that moustache swallows any errors, is there a way so that 
 any errors bubble up ?


 I'm not sure what you mean, in my experiences exceptions thrown by 
 handlers always bubble up.

 in this example

 (defn route-handler [req]
   (throw (clojure.lang.ExceptionInfo. Error)))

 (def server-handler
   (app
 [route] route-handler))

 the exception would hit ring, when visiting /route, as it should. 
 Can you post an example showing the erratic behavior? 


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

2012-09-07 Thread Rich Hickey

On Sep 6, 2012, at 11:56 PM, David Nolen wrote:

 On Thursday, September 6, 2012, Rich Hickey wrote:
 I've started to document a subset of Clojure's data format in an effort to 
 get it more widely used as a data exchange format, e.g. as an alternative to 
 JSON.
 
 Please have a look:
 
 https://github.com/richhickey/edn
 
 Rich
 
 So will colons become whitespace in maps so the JSON using hordes have an 
 easy upgrade path? ;)
 

I was waiting for that :)

As we've discussed, I think they should be accepted between key and value 
(whitespace is not quite right, not looking to support {a : : : b}). 

One ambiguity created is

{foo :true} ;;boolean or keyword?

Rich

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


Re: edn

2012-09-07 Thread Rich Hickey

On Sep 7, 2012, at 12:33 AM, Daniel Pittman wrote:

 On Thu, Sep 6, 2012 at 6:01 PM, Rich Hickey richhic...@gmail.com wrote:
 
 I've started to document a subset of Clojure's data format in an effort to 
 get it more widely used as a data exchange format, e.g. as an alternative to 
 JSON.
 
 Please have a look:
 https://github.com/richhickey/edn
 
 The current specification has two problems that have bitten us on
 other projects (and with other formats): it has no specified encoding
 for strings, and it has no native mechanism for binary data.  It would
 be awesome if you could consider both in the format.
 
 Strings without encoding are an interoperability headache, even if
 they allow binary data - someone will forget to tag the data, or will
 just throw whatever random 8-bit encoding in, and problems arise.
 

I'd like to simply specify UTF-8 for edn in toto.

 Strings with a specific encoding (like JSON and UTF-8) are great, but
 they can't carry binary, so something specific is needed - and
 hopefully something better than base64 into the string.
 

Do you object to the size of base64, or the use of convention? edn is opposed 
to convention, since how do you know when to apply an approach to a particular 
string? That's the problem people have today with JSON - they cram things into 
strings but only know to deal with them from context.

We're going to get a standard tagged literal for binary data, was considering:

#bin base64data

I'm interested in feedback on problems with that, or alternatives.

Rich

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


Re: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Herwig Hochleitner
In my experience, ring responds with 500 on error.
You can use ring.middleware.stacktrace to make the error show up in the
browser.

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

2012-09-07 Thread Rich Hickey

On Sep 7, 2012, at 4:36 AM, Ben Smith-Mannschott wrote:

 On Fri, Sep 7, 2012 at 3:01 AM, Rich Hickey richhic...@gmail.com wrote:
 I've started to document a subset of Clojure's data format in an effort to 
 get it more widely used as a data exchange format, e.g. as an alternative to 
 JSON.
 
 Please have a look:
 
 https://github.com/richhickey/edn
 
 Rich
 
 A few questions or things I'm unclear on:
 
 - The expected result of parsing { 1.0 :a, 1 :b, 1.0M :c } is unclear
 to me. Since we're gonna have maps, some more information on expected
 equality semantics of edn values is needed.

Yes, on the todo list.

 
 - nil is not a symbol. A parser seeing «(nil)» is expected to produce
 a list of length one containing a single reference to nothing. The
 collections used to represent the result of the parse must support
 null elements (Google Guava's, for example, generally do not).
 

I've removed the word 'symbol' from the description. People targeting 
collections that don't support nulls will have to create a Null object or 
something similar. Remember, people will be targeting platforms that, 
unfortunately, don't have symbols, or even integers sometimes, either.

 - edn is described as a textual format (sequence of characters). A
 word on the expected encoding of serialized representations (sequence
 of bytes) would be good. Mandate UTF-8?
 

Yes.

 - Are \u style Unicode escapes supported? In strings? elsewhere?
 

Could be.

 - Comments appear not to be supported. I know a deliberate choice was
 made not to support comments as part of JSON. For use in configuration
 files edited by humans, however, this is an inconvenience. Thoughts?
 

Yes, coming, both ;comments and #_ discard

Rich



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


Re: ANN ritz 0.4.0 release with nREPL debugger support

2012-09-07 Thread Stefan Hübner
sthueb...@googlemail.com (Stefan Hübner) writes:

 Hugo Duncan h...@hugoduncan.org writes:

 * ritz-swank corresponds to the previous ritz functionality and provides
   a swank server with debugger capabilities.

 How would you fire up a swank server from the REPL?

On the REPL this works:

--8---cut here---start-8---
(require '[ritz.swank.socket-server :as swank])
(swank/start {:port 4005})
--8---cut here---end---8---

Works with vanilla SLIME. Cool!

-- 
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: Could strint be variadic?

2012-09-07 Thread Chas Emerick
On Sep 7, 2012, at 6:20 AM, Marko Topolnik wrote:

 clojure.core.strint is a nice tool to have, but for longer strings the 
 limitation of  to a single argument becomes a problem. If I want to wrap my 
 code to fit maximum line length, I cannot split the string argument into 
 several string literals. Is there an existing way to deal with this, or could 
 the  macro be extended to receive more than one string argument?

Good idea; I've occasionally had long  strings as well, but never took the 
time to make the small tweak to allow such things to be split up.

This is now on master — 
https://github.com/clojure/core.incubator/commit/9f2590f2cf22c37ba66010983bf6eaf21a90084c
 — and 0.1.2-SNAPSHOT is available from Sonatype's OSS snapshots repo.

Assuming no one shrieks about some serious problem, I'll cut a 0.1.2 release 
containing this enhancement later today.

Cheers,

- Chas

-- 
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: Could strint be variadic?

2012-09-07 Thread Mayank Jain
Interesting. Didn't know something like this existed. :)

On Fri, Sep 7, 2012 at 5:06 PM, Chas Emerick c...@cemerick.com wrote:

 On Sep 7, 2012, at 6:20 AM, Marko Topolnik wrote:

  clojure.core.strint is a nice tool to have, but for longer strings the
 limitation of  to a single argument becomes a problem. If I want to wrap
 my code to fit maximum line length, I cannot split the string argument into
 several string literals. Is there an existing way to deal with this, or
 could the  macro be extended to receive more than one string argument?

 Good idea; I've occasionally had long  strings as well, but never took
 the time to make the small tweak to allow such things to be split up.

 This is now on master —
 https://github.com/clojure/core.incubator/commit/9f2590f2cf22c37ba66010983bf6eaf21a90084c—
  and 0.1.2-SNAPSHOT is available from Sonatype's OSS snapshots repo.

 Assuming no one shrieks about some serious problem, I'll cut a 0.1.2
 release containing this enhancement later today.

 Cheers,

 - Chas

 --
 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: `cljs.reader/read-string` on anonymous functions

2012-09-07 Thread Moritz Ulrich
This won't work, as ClojureScript doesn't includes a compiler in the
runtime. You can't eval ClojureScript code at runtime and you can't
read new anonymous functions in.

On Fri, Sep 7, 2012 at 9:18 AM, Shantanu Kumar kumar.shant...@gmail.com wrote:
 Hello,

 Anonymous functions with #() notation (example below) expand using fn*
 by `clojure.core/read-string`, but in `cljs.reader/read-string` it
 throws an error:

 Argument passed to `cljs.reader/read-string`: #(do true)

 Error: Could not find tag parser for (do in (inst uuid queue)

 Is there a built-in tag parser for anonymous functions in
 ClojureScript? Thanks in advance for any pointers.

 Shantanu

 --
 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: Could strint be variadic?

2012-09-07 Thread Marko Topolnik


 This is now on master — 
 https://github.com/clojure/core.incubator/commit/9f2590f2cf22c37ba66010983bf6eaf21a90084c—
  and 0.1.2-SNAPSHOT is available from Sonatype's OSS snapshots repo. 


Downloaded and confirmed that it works in my code.
 

 Assuming no one shrieks about some serious problem, I'll cut a 0.1.2 
 release containing this enhancement later today. 


If you do that, you may break the speed record on the Feature 
Requested--Feature Released response time :)

Thanks!

-Marko

-- 
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: Literate Programming in org-babel (ob-clojure.el) is broken under nrepl.el

2012-09-07 Thread lambdatronic
Thanks, Tim. This looks great.

For those of you who don't want to go digging through the thread, here's 
the summary:

Step 1. Download nrepl-0.1.4-preview from Marmalade or MELPA (depends on 
clojure-mode 1.11).

Step 2. Add this code to your .emacs file:

;; Patch ob-clojure to work with nrepl
(declare-function nrepl-send-string-sync ext:nrepl (code optional ns))

(defun org-babel-execute:clojure (body params)
  Execute a block of Clojure code with Babel.
  (require 'nrepl)
  (with-temp-buffer
(insert (org-babel-expand-body:clojure body params))
((lambda (result)
   (let ((result-params (cdr (assoc :result-params params
 (if (or (member scalar result-params)
 (member verbatim result-params))
 result
   (condition-case nil (org-babel-script-escape result)
 (error result)
 (plist-get (nrepl-send-string-sync
 (buffer-substring-no-properties (point-min) (point-max))
 (cdr (assoc :package params)))
:value

Step 3. Get Literate!
 

-- 
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: A Performance Comparison of SBCL Clojure

2012-09-07 Thread Isaac Gouy


On Friday, September 7, 2012 1:12:44 AM UTC-7, Andy Fingerhut wrote:

 Since my last message, I personally have only submitted a new faster 
 Clojure program for the knucleotide problem on the Benchmarks Game site.  I 
 haven't checked whether other Clojure programs have been submitted in that 
 time.


Thanks Andy (and yes, yours was the only Clojure program contributed during 
that time).

 

For all of the benchmark machines below, I'd say don't worry about the 
 pidigits problem.  It is kind of an odd case.  The Clojure program does not 
 use the GNU gmp library for arbitrary precision integer arithmetic, but the 
 Java program and several other languages do.  You can stress out about that 
 fact if you want.  I don't.  Life is too short.  That problem simply shows 
 the difference between Java BigInteger performance versus the GNU gmp 
 library performance, not Clojure vs. Java.


Until someone contributes a Clojure program that makes use of that Java 
interface to GMP ;-)



The rest of the problems I consider reasonably fair comparisons, although 
 I'd bet money the Clojure run time of several can still be reduced with 
 enough skill and persistence.  Some day I'd like to have side by side 
 performance comparisons of these programs versus the easier-to-write kind 
 that someone is more likely to come up with on a first or second try, 
 rather than the tweaked-out oddities of programs on the site.  


I do understand the appeal of a comparison between easier-to-write 
first-or-second-try kind of programs -- those programs should be easier to 
read and easier to understand. Then again, I think it strange to compare 
the performance of programs written as though performance didn't matter. 
When performance matters we re-write programs.

pi-digits already provides an example -- the utterly naive Java example 
program (not so much idiomatic as idiotic) I contributed, and the Clojure 
pidigits programs.

http://shootout.alioth.debian.org/u64q/program.php?test=pidigitslang=javaid=1

http://shootout.alioth.debian.org/u64q/program.php?test=pidigitslang=clojureid=2



Lesson I've learned: If you've got an inner loop of your program that you 
 really really need to run faster, code it in Java, C, or even assembler. 
  Use profiling tools to find those spots, rather than guessing where you 
 think they might be.  Hand-coded assembler can beat optimized C by a factor 
 of 2 or more in many cases, but who wants to program in assembler?  For 
 that matter, who wants to write large programs in C?


My guess is that there are plenty of programmers who are happy to write 
large programs in C ;-) 

best wishes, Isaac

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

Re: Expanding the Community Through Online Courses

2012-09-07 Thread Armando Blancas


 This is a story from the trenches of your every day developer:

 
It's a story with a ridiculous sense of entitlement. Be sure to complete 
your Scala lessons.

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

Re: redefining multimethods at the repl

2012-09-07 Thread Laurent PETIT
2012/9/5 Stuart Halloway stuart.hallo...@gmail.com:
 I started a wiki page for this:

 http://dev.clojure.org/display/design/Never+Close+a+REPL

 If you have other REPL-reloading annoyances please add them there.

Adding new dependencies to my Leiningen project.

Solved by pomegranate ?

I think I could add an experimental feature to CounterClockWise so
that whenever the dependencies change, all the new dependencies are
optimistically propagated to open REPLs associated with the project
(maybe asking a user confirmation first).

-- 
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 ritz 0.4.0 release with nREPL debugger support

2012-09-07 Thread Hugo Duncan
sthueb...@googlemail.com (Stefan Hübner) writes:

 Hugo Duncan h...@hugoduncan.org writes:

 * ritz-swank corresponds to the previous ritz functionality and provides
   a swank server with debugger capabilities.

 Also: the Zi maven plugin has not catched up with ritz 0.4.0. I was
 trying to force it to use ritz-swank-0.4.0 but got an exception when
 doing 'mvn zi:ritz':

This should be fixed in zi 0.5.3, which I just pushed.

Hugo

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


Re: redefining multimethods at the repl

2012-09-07 Thread Nelson Morris
On Fri, Sep 7, 2012 at 9:56 AM, Laurent PETIT laurent.pe...@gmail.com wrote:
 2012/9/5 Stuart Halloway stuart.hallo...@gmail.com:
 I started a wiki page for this:

 http://dev.clojure.org/display/design/Never+Close+a+REPL

 If you have other REPL-reloading annoyances please add them there.

 Adding new dependencies to my Leiningen project.

 Solved by pomegranate ?

 I think I could add an experimental feature to CounterClockWise so
 that whenever the dependencies change, all the new dependencies are
 optimistically propagated to open REPLs associated with the project
 (maybe asking a user confirmation first).


Pomegranate can download dependencies and blindly add them to the
classpath.  It doesn't include any logic to track what jars are
already there, so might add the same ones twice on successive calls.
Also it doesn't help for moving between dependency trees, which might
change a version.  This is probably where optimistically comes in.

A library built on top that can handle this stuff would be awesome.

-- 
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: Possible bug in CLJS `case` with quoted symbols

2012-09-07 Thread David Nolen
On Fri, Sep 7, 2012 at 5:26 AM, Shantanu Kumar kumar.shant...@gmail.com wrote:
 Hello,

 In Clojure 1.4.0 REPL I noticed this:

 user= (let [a 'a] (case a nil :nil ' :amp :none))
 :none
 user= (let [a '] (case a nil :nil ' :amp :none))
 :amp
 user= (let [a 'b] (case a nil :nil 'b :b :none))
 :b

 In the CLJS Rhino REPL I saw this:

 ClojureScript:cljs.user (let [a 'a] (case a nil :nil ' :amp :none))
 :none
 ClojureScript:cljs.user (let [a '] (case a nil :nil ' :amp :none))
 :none
 ClojureScript:cljs.user (let [a 'b] (case a nil :nil 'b :b :none))
 :none

 If somebody confirms that it looks like a bug, I can file an issue.

 Shantanu

Looks like a bug.

-- 
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 ritz 0.4.0 release with nREPL debugger support

2012-09-07 Thread George Jahad
Impressive, (as always,) Hugo.

g


On Wednesday, September 5, 2012 1:45:41 PM UTC-7, Hugo Duncan wrote:


 ritz started life as a swank server for emacs SLIME. With this release 
 it has evolved into several components: 

 * ritz-nrepl provides both nREPL middleware, that can be used in any 
   nREPL server (and any client), and a debugger for use with nrepl.el, 
   the emacs client for nREPL. The nrepl middleware provide the complete, 
   doc, javadoc, apropos and describe-symbol nREPL operations. 

 * ritz-swank corresponds to the previous ritz functionality and provides 
   a swank server with debugger capabilities. 

 * ritz-debugger provides a library for using the JVM JPDA debugger 
   classes from clojure. 

 * ritz-repl-utils provides a library of functions, used to provide 
   common repl behaviour between ritz-nrepl and ritz-swank. This is also 
   independent of emacs. 

 The project can be found at https://github.com/pallet/ritz 

 Hugo 


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

Re: Browser as an Evaluation Environment error

2012-09-07 Thread David Nolen
On Thu, Sep 6, 2012 at 10:29 AM, goracio felix...@gmail.com wrote:
 Hi
 I try to follow this guide
 https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments
 and get an error
 No 'xpc' param provided to chid iframe

 when loading http://localhost:9000/repl
 and my clojurescript repl hangs

 Clojure 1.4.0
 user= (require '[cljs.repl :as repl])
 nil
 user= (require '[cljs.repl.browser :as browser])
 nil
 user= (def env (browser/repl-env))
 #'user/env
 user= (repl/repl env)
 Type:  :cljs/quit  to quit
 ClojureScript:cljs.user (+ 1 1)


 what could be wrong with this ?

I just tried this with master, it seems to work fine. Sometimes you
need to refresh the browser.

I'm assuming you are using master and that you have bootstrapped?

David

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


Re: edn

2012-09-07 Thread Elliot
On Thursday, September 6, 2012 8:31:59 PM UTC-7, Weber, Martin S wrote:

 The question that's left for me is: why vectors and lists? I mean, from a 
 data format perspective, and a non-clojure implementor, I'm not sure the 
 distinction makes sense. After all for the _data format_, in its serialized 
 form, the vector will not be a random access structure. It has to be 
 deserialized, and access to an element will have linear time complexity. 
 Again, I understand its relevance from the clojure perspective. Is this 
 just too important for edn's current implementor, clojure ? 


a) This is just a feedback draft, and having both vectors and lists may not 
be a grand commitment so much as a proposal.

b) Every format will involve a tradeoff between how much is baked in as a 
required primitive and how much is added via the extensibility mechanism, 
in this case tags.  Deciding whether to include both lists and vectors is 
just adjusting the line between whether the edn library provider does more 
work and the edn library user does less work, or vice versa.  Again, it's 
just a line in the sand and there will always be borderline cases of what 
different people consider must-have.

c) Yes, if clojure and datomic use both lists and vectors frequently enough 
and in different enough capacities, they can legitimately desire to have 
both capabilities built into their interchange format, particularly if it 
makes it concise and convenient to communicate with clojure/datomic 
(instead, for example, of having to type `#list ()` all the time).  It 
doesn't need to be a universally minimalist generic format, and it _does_ 
need to be a format simple enough for other languages/ecosystems to 
implement so that they can communicate with clojure/datomic.  These 
constraints seem sufficient to want to push the edn decisions close to 
where they are in the proposal.  Like most other real world formats, there 
is a real use case that this one has in mind even if it's not fully 
abstractly general.

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

2012-09-07 Thread Jacob Rus
Hi folks,

I put some feedback up in a Hacker News comment
http://news.ycombinator.com/item?id=4487588, but it
probably makes sense to reproduce it here too, where comments
will be seen.

[By the way, Rich, I don’t use Clojure (... yet ...), but
your  Stu’s talks are always an inspiration, and I send
links to all my friends. Keep doing them!]

Cheers,
Jacob Rus

* * *

Nice advantages over JSON: more compact, easier to pretty
print, includes an integer type, non-string map keys, has a
nice built-in extension mechanism (which is much more
elegant than any ad-hoc thing that JSON can support).

Things that probably make sense coming from Clojure, but
seem somewhat unnecessary for a general purpose data
interchange format: explicit character type (as compared to
length 1 strings (which could optionally use the extension
mechanism if necessary)), separate types for vectors and
lists (seems like the extension mechanism could handle this
if it’s ever necessary; to some extent this criticism holds
for sets too, but those are also more independently useful).

One type not included that I find useful: some kind of raw
string wherein backslashes are interpreted literally, and
double escapes aren’t required all over the place.

Possible point of confusion that should be spelled out more
explicitly: by the grammar provided, a floating point number
requires an explicit leading digit. That is, '0.5' cannot be
spelled '.5'. (Should an implementation accept '.5' as a
number, or reject it as badly formed?)

Also, does a floating-point number may have the suffix M to
indicate that exact precision is desired mean that it
should be interpreted as a decimal number? Might be worth
saying that directly.

It would be nice to see a bit more guidance about Symbols
are used to represent identifiers, and should map to
something other than strings, if possible. Perhaps this
could include examples of what Rich Hickey  al. think would
be useful interpretations in JavaScript and Python (to pick
two obvious popular examples).

Most of all, it would be nice to see a clear explicit
treatment of Unicode for strings/symbols (I’d recommend
utf-8 here), including possible ways of escaping code points
in strings. Confusions about Unicode are one of the main
points of incompatibility between JSON implementations, and
the JSON spec has more to say about the subject than this
current spec does.

One nice built-in tag to add: base64 raw data, using one of
the typical base64 encodings, which should be described in
the spec to avoid any confusion.

Question: if a tagged element is considered a unit, can
another tag be put in front of one? That is, something along
the lines of '#outer_tag #inner_tag built-in element',
where in the code which interprets the file, whatever object
is produced by the inner_tag's extension is sent as input to
the outer_tag's? It’s worth clarifying this so that
implementors make sure to add the case to their test suites.

-- 
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: A Performance Comparison of SBCL Clojure

2012-09-07 Thread Stuart Sierra
Just wanted to say thanks for putting in all the work on the shootout 
programs, Andy.

On Friday, September 7, 2012 1:12:44 AM UTC-7, Andy Fingerhut wrote:
 All Clojure programs within 4x the run time of the
 corresponding Java programs, averaging around 2.5x the run
 time of Java.

That's pretty darn good.

 Lesson I've learned: If you've got an inner loop of your
 program that you really really need to run faster, code it
 in Java, C, or even assembler. Use profiling tools to find
 those spots, rather than guessing where you think they
 might be. 

Agreed.

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

2012-09-07 Thread Daniel Pittman
On Fri, Sep 7, 2012 at 3:45 AM, Rich Hickey richhic...@gmail.com wrote:
 On Sep 7, 2012, at 12:33 AM, Daniel Pittman wrote:
 On Thu, Sep 6, 2012 at 6:01 PM, Rich Hickey richhic...@gmail.com wrote:

 I've started to document a subset of Clojure's data format in an effort to 
 get it more widely used as a data exchange format, e.g. as an alternative 
 to JSON.

 Please have a look:
 https://github.com/richhickey/edn

 The current specification has two problems that have bitten us on
 other projects (and with other formats): it has no specified encoding
 for strings, and it has no native mechanism for binary data.  It would
 be awesome if you could consider both in the format.

 Strings without encoding are an interoperability headache, even if
 they allow binary data - someone will forget to tag the data, or will
 just throw whatever random 8-bit encoding in, and problems arise.

 I'd like to simply specify UTF-8 for edn in toto.

*nod*

 Strings with a specific encoding (like JSON and UTF-8) are great, but
 they can't carry binary, so something specific is needed - and
 hopefully something better than base64 into the string.

 Do you object to the size of base64, or the use of convention? edn is opposed 
 to convention, since how do you know when to apply an approach to a 
 particular string? That's the problem people have today with JSON - they cram 
 things into strings but only know to deal with them from context.

The use of convention is by far the worst problem, for exactly the
reasons you identify.

The size expansion and encode/decode phase for base64 are small
annoyances shipping binary data through JSON, and would be so here, so
while I would like something that allowed raw binary content
unmodified, base64 would be fine.

 We're going to get a standard tagged literal for binary data, was considering:

 #bin base64data

 I'm interested in feedback on problems with that, or alternatives.

#base64 feels more explicit to me, since it would also allow for other
specific encodings later, but that seems reasonable enough to me.  It
makes explicit the form - and is what we had through YAML, which was
successfully used.

-- 
Daniel Pittman
♲ Made with 100 percent post-consumer electrons

-- 
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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Murtaza Husain

Herwig,

Thanks for the detailed answers below. 

(def my-app (app
 wrap-stacktrace
 (wrap-file resources/public/)
 [page] (- (chrome page) response constantly)
 [a b] (- a b response constantly))
 [] (- Nothing was found response (status 404) constantly)))

I have added another route /a/b, which also returns Nothing was found 
instead of a b ?

2012/9/7 Murtaza Husain murtaza.hus...@sevenolives.com

 (def my-app (app
  wrap-stacktrace
  (wrap-file resources/public/)
  [page] (- (chrome page) response constantly)
  [] Nothing was found))

 I am getting a null pointer error on the route /. Why is that ? Shouldnt 
 it give a 404 or something. Also why isnt it caught by the last route [] ?

 
Hi Murtaza,

moustache handlers must be functions. So to return a string as a response, 
the last line would have to be

[] (constantly Nothing was found)

That however still wouldn't do what you expect, because the value returned 
from a handler has to be a response map like

[] (constantly {:status 404 :body Nothing was found})

or 

[] (- Nothing was found response (status 404) constantly)

The auto response wrapping, that allows you to just return strings, is a 
convenience feature living in compojure, not ring.

If that resolves your problem, please consider reposting to the list, so 
that others may benefit.

kind regards


On Friday, September 7, 2012 4:18:28 PM UTC+5:30, Herwig Hochleitner wrote:

 In my experience, ring responds with 500 on error.
 You can use ring.middleware.stacktrace to make the error show up in the 
 browser.


-- 
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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Baishampayan Ghose
 (defn route-handler [req]
   (throw (clojure.lang.ExceptionInfo. Error)))

OT - IMHO you should use ex-info (and its counterpart ex-data) instead
of the direct Java constructor.

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com

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


Re: Possible bug in CLJS `case` with quoted symbols

2012-09-07 Thread Shantanu Kumar
 Looks like a bug.

Thanks, I filed the issue here:

http://dev.clojure.org/jira/browse/CLJS-376

Shantanu

-- 
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: Question about sets

2012-09-07 Thread Rich Hickey
Once again, thanks Andy!

I've added my feedback there  
(http://dev.clojure.org/display/design/Allow+duplicate+map+keys+and+set+elements)

Patches implementing that are welcome.

Rich

On Sep 5, 2012, at 1:57 PM, Andy Fingerhut wrote:

 I've copied and pasted Mark's arguments to the Wiki page here:
 
 http://dev.clojure.org/display/design/Allow+duplicate+map+keys+and+set+elements
 
 Andy
 
 On Sep 5, 2012, at 6:41 AM, Stuart Halloway wrote:
 
 Hi Mark,
 
 Thanks for extracting a summary of the conversation so far, and +1 for 
 making sure this is on the wiki.
 
 Stu
 
 On Tue, Sep 4, 2012 at 9:30 AM, Andy Fingerhut andy.finger...@gmail.com 
 wrote:
 I'm just trying to get the argument for change as clearly as possible.
 
 The major bullet points:
 1. It's a bug that should be fixed.  The change to throw-on-duplicate 
 behavior for sets in 1.3 was a breaking change that causes a runtime error 
 in previously working, legitimate code. 
 
 
 
 
 
 -- 
 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: edn

2012-09-07 Thread Rich Hickey
I addressed this here:

http://news.ycombinator.com/item?id=4489330

On Sep 7, 2012, at 2:36 AM, Elliot wrote:

 On Thursday, September 6, 2012 8:31:59 PM UTC-7, Weber, Martin S wrote:
 The question that's left for me is: why vectors and lists? I mean, from a 
 data format perspective, and a non-clojure implementor, I'm not sure the 
 distinction makes sense. After all for the _data format_, in its serialized 
 form, the vector will not be a random access structure. It has to be 
 deserialized, and access to an element will have linear time complexity. 
 Again, I understand its relevance from the clojure perspective. Is this just 
 too important for edn's current implementor, clojure ? 
 
 a) This is just a feedback draft, and having both vectors and lists may not 
 be a grand commitment so much as a proposal.
 
 b) Every format will involve a tradeoff between how much is baked in as a 
 required primitive and how much is added via the extensibility mechanism, in 
 this case tags.  Deciding whether to include both lists and vectors is just 
 adjusting the line between whether the edn library provider does more work 
 and the edn library user does less work, or vice versa.  Again, it's just a 
 line in the sand and there will always be borderline cases of what different 
 people consider must-have.
 
 c) Yes, if clojure and datomic use both lists and vectors frequently enough 
 and in different enough capacities, they can legitimately desire to have both 
 capabilities built into their interchange format, particularly if it makes it 
 concise and convenient to communicate with clojure/datomic (instead, for 
 example, of having to type `#list ()` all the time).  It doesn't need to be a 
 universally minimalist generic format, and it _does_ need to be a format 
 simple enough for other languages/ecosystems to implement so that they can 
 communicate with clojure/datomic.  These constraints seem sufficient to want 
 to push the edn decisions close to where they are in the proposal.  Like most 
 other real world formats, there is a real use case that this one has in mind 
 even if it's not fully abstractly general.
 
 -- 
 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


clojure library code fails to load resource file when called from java

2012-09-07 Thread fenton
https://github.com/ftravers/PublicDocumentation/blob/master/clojure/resource-file.md


Reading a resource file

File/directory layout:

$ tree
.
|-- pom.xml
|-- project.clj
|-- README.md`-- src
|-- test_project
|   `-- Core.clj
`-- test.txt

Setting up this to be a library for use in Java. Here is my project.clj and 
my Core.clj

(defproject test-package/test-project 0.1.0-SNAPSHOT
  :plugins [[lein-swank 1.4.4]]
  :dependencies [[org.clojure/clojure 1.4.0]]
  :main test-project.Core)

(ns test-project.Core
  (:gen-class
   :methods [[readFile [] String]]))(defn read-file []
  (slurp (.getFile (clojure.java.io/resource test.txt(defn -readFile 
[this]
  (read-file))

Now if I try to use this in the REPL

test-project.Core (read-file)abc\n

Works no problem. However when I try this from Java:

Core c = new Core();c.readFile();

A FileNotFound exception is thrown:

java.io.FileNotFoundException: 
/home/fenton/.m2/repository/test-package/test-project/0.1.0-SNAPSHOT/test-project-0.1.0-SNAPSHOT.jar!/test.txt
 (No such file or directory)

Whereas:

InputStream stream 
=this.getClass().getClassLoader().getResourceAsStream(test.txt);

Finds the file no problem. So whats the problem?

-- 
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 library code fails to load resource file when called from java

2012-09-07 Thread Dave Ray
slurp is happy to slurp from a URL, no need for the (.getFile) call on
the resource. In other words, the file returned for a resource that's
been compiled into a jar isn't very useful. Stick with the URL
returned bye clojure.java.io/resource.

Dave

On Fri, Sep 7, 2012 at 10:58 AM, fenton fenton.trav...@gmail.com wrote:
 https://github.com/ftravers/PublicDocumentation/blob/master/clojure/resource-file.md


 Reading a resource file

 File/directory layout:

 $ tree
 .
 |-- pom.xml
 |-- project.clj
 |-- README.md
 `-- src
 |-- test_project
 |   `-- Core.clj
 `-- test.txt

 Setting up this to be a library for use in Java. Here is my project.clj and
 my Core.clj

 (defproject test-package/test-project 0.1.0-SNAPSHOT
   :plugins [[lein-swank 1.4.4]]
   :dependencies [[org.clojure/clojure 1.4.0]]
   :main test-project.Core)

 (ns test-project.Core
   (:gen-class
:methods [[readFile [] String]]))
 (defn read-file []
   (slurp (.getFile (clojure.java.io/resource test.txt
 (defn -readFile [this]
   (read-file))

 Now if I try to use this in the REPL

 test-project.Core (read-file)
 abc\n

 Works no problem. However when I try this from Java:

 Core c = new Core();
 c.readFile();

 A FileNotFound exception is thrown:

 java.io.FileNotFoundException:
 /home/fenton/.m2/repository/test-package/test-project/0.1.0-SNAPSHOT/test-project-0.1.0-SNAPSHOT.jar!/test.txt
 (No such file or directory)

 Whereas:

 InputStream stream =
 this.getClass().getClassLoader().getResourceAsStream(test.txt);

 Finds the file no problem. So whats the problem?

 --
 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 library code fails to load resource file when called from java

2012-09-07 Thread fenton
Thanks so much Dave that was it! :)

On Friday, September 7, 2012 11:08:50 AM UTC-7, daveray wrote:

 slurp is happy to slurp from a URL, no need for the (.getFile) call on 
 the resource. In other words, the file returned for a resource that's 
 been compiled into a jar isn't very useful. Stick with the URL 
 returned bye clojure.java.io/resource. 

 Dave 

 On Fri, Sep 7, 2012 at 10:58 AM, fenton fenton@gmail.comjavascript: 
 wrote: 
  
 https://github.com/ftravers/PublicDocumentation/blob/master/clojure/resource-file.md
  
  
  
  Reading a resource file 
  
  File/directory layout: 
  
  $ tree 
  . 
  |-- pom.xml 
  |-- project.clj 
  |-- README.md 
  `-- src 
  |-- test_project 
  |   `-- Core.clj 
  `-- test.txt 
  
  Setting up this to be a library for use in Java. Here is my project.clj 
 and 
  my Core.clj 
  
  (defproject test-package/test-project 0.1.0-SNAPSHOT 
:plugins [[lein-swank 1.4.4]] 
:dependencies [[org.clojure/clojure 1.4.0]] 
:main test-project.Core) 
  
  (ns test-project.Core 
(:gen-class 
 :methods [[readFile [] String]])) 
  (defn read-file [] 
(slurp (.getFile (clojure.java.io/resource test.txt 
  (defn -readFile [this] 
(read-file)) 
  
  Now if I try to use this in the REPL 
  
  test-project.Core (read-file) 
  abc\n 
  
  Works no problem. However when I try this from Java: 
  
  Core c = new Core(); 
  c.readFile(); 
  
  A FileNotFound exception is thrown: 
  
  java.io.FileNotFoundException: 
  
 /home/fenton/.m2/repository/test-package/test-project/0.1.0-SNAPSHOT/test-project-0.1.0-SNAPSHOT.jar!/test.txt
  

  (No such file or directory) 
  
  Whereas: 
  
  InputStream stream = 
  this.getClass().getClassLoader().getResourceAsStream(test.txt); 
  
  Finds the file no problem. So whats the problem? 
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.comjavascript: 
  Note that posts from new members are moderated - please be patient with 
 your 
  first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Herwig Hochleitner
Am 07.09.2012 19:06 schrieb Murtaza Husain murtaza.hus...@sevenolives.com
:


 Herwig,

 Thanks for the detailed answers below.

 (def my-app (app
  wrap-stacktrace
  (wrap-file resources/public/)
  [page] (- (chrome page) response constantly)
  [a b] (- a b response constantly))
  [] (- Nothing was found response (status 404)
constantly)))

 I have added another route /a/b, which also returns Nothing was found
instead of a b ?


Odd. That should work. Are working with live eval (swank)? If so make sure
ring server picks up your updated handler, by passing in its var #'my-app,
just as you would do with compojure.


 2012/9/7 Murtaza Husain murtaza.hus...@sevenolives.com

 (def my-app (app
  wrap-stacktrace
  (wrap-file resources/public/)
  [page] (- (chrome page) response constantly)
  [] Nothing was found))

 I am getting a null pointer error on the route /. Why is that ?
Shouldnt it give a 404 or something. Also why isnt it caught by the last
route [] ?


 Hi Murtaza,

 moustache handlers must be functions. So to return a string as a
response, the last line would have to be

 [] (constantly Nothing was found)

 That however still wouldn't do what you expect, because the value
returned from a handler has to be a response map like

 [] (constantly {:status 404 :body Nothing was found})

 or

 [] (- Nothing was found response (status 404) constantly)

 The auto response wrapping, that allows you to just return strings, is a
convenience feature living in compojure, not ring.

 If that resolves your problem, please consider reposting to the list, so
that others may benefit.

 kind regards


 On Friday, September 7, 2012 4:18:28 PM UTC+5:30, Herwig Hochleitner
wrote:

 In my experience, ring responds with 500 on error.
 You can use ring.middleware.stacktrace to make the error show up in the
browser.

 --
 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: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Herwig Hochleitner
Ah, didn't know about those. Thanks for the hint!

On Topic: Issue has been resolved in a private exchange.

kind regards
Am 07.09.2012 19:10 schrieb Baishampayan Ghose b.gh...@gmail.com:

  (defn route-handler [req]
(throw (clojure.lang.ExceptionInfo. Error)))

 OT - IMHO you should use ex-info (and its counterpart ex-data) instead
 of the direct Java constructor.

 Regards,
 BG

 --
 Baishampayan Ghose
 b.ghose at gmail.com

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


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

ANN Zi 0.5.4

2012-09-07 Thread Hugo Duncan

Zi is a maven plugin for working with clojure. 

The 0.5.4 release adds support for the following goals:

* nrepl Launches a vanilla nREPL server

* ritz-nrepl Launches an nREPL server with debugger.

* ritz Launches a swank server with debugger. Now supports ritz-swank 0.4.1.

The project can be found at https://github.com/pallet/zi

Hugo

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


ANN Ritz 0.4.1

2012-09-07 Thread Hugo Duncan

Ritz is a collection of repl servers, middleware and repl utility
functions, supporting nREPL and swank/slime. The repl utilities can be
used from any repl.

The 0.4.1 release is mainly a bug fix release.

* Fixes an issue with in-ns not working correctly

* Fixes jack-in support for ritz-swank

* Fixes breakpoint support

Many thanks to Jeff Palmucci and @cola_zero.


Ritz is on github: https://github.com/pallet/ritz



Hugo

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


Re: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Anthony Grimes
This isn't actually a good 
thing: 
http://nelsonmorris.net/2012/07/31/do-not-use-version-ranges-in-project-clj.html

FWIW, even if it didn't use version ranges, the version of Clojure and 
other dependencies that you use would take precedence over the ones it 
specifies.

On Friday, September 7, 2012 4:05:07 AM UTC-5, Herwig Hochleitner wrote:

 Append: you don't need to fork or update it, since it uses version ranges 
 in its dependencies. 

-- 
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: Question about sets

2012-09-07 Thread Sean Corfield
On Fri, Sep 7, 2012 at 10:49 AM, Rich Hickey richhic...@gmail.com wrote:
 I've added my feedback there  
 (http://dev.clojure.org/display/design/Allow+duplicate+map+keys+and+set+elements)

Thanx Rich! So the recommendation is:

* set/map literals with duplicates are invalid (status quo)

* hash-set/hash-map should change (to last key wins, as if conj'd/assoc'd)

* sorted-set/sorted-map should not change (last key wins, as if conj'd/assoc'd)

* array-map should not change (throws on dupes)?

Highlighting that last one since it's not mentioned on the wiki and
would then be the odd one out but perhaps there's a good reason?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

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

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


Re: Does moustache work with latest ring and clojure ?

2012-09-07 Thread Marko Topolnik
For the record, Moustache does support the special case of returning a 
literal string response:

user (run-jetty (app [hi] Hello, world!\n) {:port  :join? false})

$ curl localhost:/hi
Hello, world!


On Friday, September 7, 2012 7:06:42 PM UTC+2, Murtaza Husain wrote:


 Herwig,

 Thanks for the detailed answers below. 

 Hi Murtaza,

 moustache handlers must be functions. So to return a string as a response, 
 the last line would have to be

 [] (constantly Nothing was found)




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

How create dynamic vars programmatically?

2012-09-07 Thread Marc Dzaebel
(intern *ns* 's) creates a non dynamic variable, but how do I achieve (def 
^:dynamic s) programmatically?

Thanks, Marc

-- 
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 create dynamic vars programmatically?

2012-09-07 Thread Baishampayan Ghose
.setDynamic on the var.

This is implementation detail though...

Sent from phone. Please excuse brevity.
On 7 Sep 2012 13:04, Marc Dzaebel mdzae...@web.de wrote:

 (intern *ns* 's) creates a non dynamic variable, but how do I achieve (def
 ^:dynamic s) programmatically?

 Thanks, Marc

 --
 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 create dynamic vars programmatically?

2012-09-07 Thread Marc Dzaebel
 .setDynamic on the var.

Works fine! See also 
http://blog.zolotko.me/2012/06/making-variable-dynamic-in-clojure.html. 
Should be documented ...

Great help, thanks, Marc

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

clojure.core.incubator 0.1.2 released (was: Re: Could strint be variadic?)

2012-09-07 Thread Chas Emerick
On Sep 7, 2012, at 9:34 AM, Marko Topolnik wrote:

 This is now on master — 
 https://github.com/clojure/core.incubator/commit/9f2590f2cf22c37ba66010983bf6eaf21a90084c
  — and 0.1.2-SNAPSHOT is available from Sonatype's OSS snapshots repo. 
 
 Downloaded and confirmed that it works in my code.
  
 Assuming no one shrieks about some serious problem, I'll cut a 0.1.2 release 
 containing this enhancement later today. 
 
 If you do that, you may break the speed record on the Feature 
 Requested--Feature Released response time :)

I aim to please. ;-)  Besides, it was a good sense-making idea to begin with...

[org.clojure/core.incubator 0.1.2] has been released; it'll take a few hours 
for it to show up in Maven Central.

The only change is that clojure.core.strint/ is now variadic.  The docs 
haven't been refreshed yet, but you can see an example of this in the last 
expression in the docstring here:

https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/strint.clj#L49

Cheers,

- Chas

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

2012-09-07 Thread Tom Hickey
Hi Hugo,

I'm not able to get the latest version of Zi to work. It seems to be having 
a problem resolving a couple of it's dependencies:

[ERROR] Failed to execute goal org.cloudhoist.plugin:zi:0.5.4:compile 
(default-cli) on project test: Execution default-cli of goal 
org.cloudhoist.plugin:zi:0.5.4:compile failed: Plugin 
org.cloudhoist.plugin:zi:0.5.4 or one of its dependencies could not be 
resolved: The following artifacts could not be resolved: 
classlojure:classlojure:jar:0.6.5, 
leiningen-core:leiningen-core:jar:2.0.0-preview4

pom and maven stacktrace can be found here: https://gist.github.com/3669520

The last version of Zi I was using was 0.4.4

Let me know if you need anything more info. Looking forward to trying this 
out.

Tom Hickey


On Friday, September 7, 2012 2:52:23 PM UTC-4, Hugo Duncan wrote:


 Zi is a maven plugin for working with clojure. 

 The 0.5.4 release adds support for the following goals: 

 * nrepl Launches a vanilla nREPL server 

 * ritz-nrepl Launches an nREPL server with debugger. 

 * ritz Launches a swank server with debugger. Now supports ritz-swank 
 0.4.1. 

 The project can be found at https://github.com/pallet/zi 

 Hugo 


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

Re: How create dynamic var programmatically

2012-09-07 Thread Marc Dzaebel
works, 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: Question about sets

2012-09-07 Thread Rich Hickey

On Sep 7, 2012, at 3:35 PM, Sean Corfield wrote:

 On Fri, Sep 7, 2012 at 10:49 AM, Rich Hickey richhic...@gmail.com wrote:
 I've added my feedback there  
 (http://dev.clojure.org/display/design/Allow+duplicate+map+keys+and+set+elements)
 
 Thanx Rich! So the recommendation is:
 
 * set/map literals with duplicates are invalid (status quo)
 
 * hash-set/hash-map should change (to last key wins, as if conj'd/assoc'd)
 
 * sorted-set/sorted-map should not change (last key wins, as if 
 conj'd/assoc'd)
 
 * array-map should not change (throws on dupes)?
 
 Highlighting that last one since it's not mentioned on the wiki and
 would then be the odd one out but perhaps there's a good reason?

No, array-map should be the same too.

-- 
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: Create dynamic vars programmatically

2012-09-07 Thread Marc Dzaebel
Sorry for delay, I had difficulties with Google Groups ... posted several 
times.

Thanks about the hint about *with-local-vars*, Marc

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

2012-09-07 Thread Sean Corfield
On Thu, Sep 6, 2012 at 8:26 PM, Weber, Martin S martin.we...@nist.gov wrote:
 The question that's left for me is: why vectors and lists? I mean, from a 
 data format perspective, and a non-clojure implementor, I'm not sure the 
 distinction makes sense. After all for the _data format_, in its serialized 
 form, the vector will not be a random access structure. It has to be 
 deserialized, and access to an element will have linear time complexity. 
 Again, I understand its relevance from the clojure perspective. Is this just 
 too important for edn's current implementor, clojure ?

I think it's a useful hint to allow sequences of data that can be
inflated into data structures supporting random access in constant
time vs those that don't. Many languages have both list-like
collections AND array-like collections.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

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

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


Re: edn

2012-09-07 Thread Sean Corfield
On Fri, Sep 7, 2012 at 3:40 AM, Rich Hickey richhic...@gmail.com wrote:
 On Sep 6, 2012, at 11:56 PM, David Nolen wrote:
 So will colons become whitespace in maps so the JSON using hordes have an 
 easy upgrade path? ;)
 {foo :true} ;;boolean or keyword?

Requiring whitespace after the colon doesn't seem a huge burden to me
(given that the format will support :keywords at all) although I know
that doesn't help the JSON folks.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

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

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


RE: edn

2012-09-07 Thread Weber, Martin S
(sorry for top-posting)

Languages have random access / sequential data structures.

Sure. Languages. This is a data format, not a language. Why should I not 
inflate a edn-list into a vector in my language? What if I don't have a random 
access thing handy (because, e.g., I only have trees/tables, as e.g. tcl where 
arrays are actually hashtables with integer keys)? Please do read my post 
again. I'm aware of the clojure link etc. etc. etc. We're talking about a data 
format here.

Regards,
-Martin


From: clojure@googlegroups.com [clojure@googlegroups.com] On Behalf Of Sean 
Corfield [seancorfi...@gmail.com]
Sent: Friday, September 07, 2012 18:44
To: clojure@googlegroups.com
Subject: Re: edn

On Thu, Sep 6, 2012 at 8:26 PM, Weber, Martin S martin.we...@nist.gov wrote:
 The question that's left for me is: why vectors and lists? I mean, from a 
 data format perspective, and a non-clojure implementor, I'm not sure the 
 distinction makes sense. After all for the _data format_, in its serialized 
 form, the vector will not be a random access structure. It has to be 
 deserialized, and access to an element will have linear time complexity. 
 Again, I understand its relevance from the clojure perspective. Is this just 
 too important for edn's current implementor, clojure ?

I think it's a useful hint to allow sequences of data that can be
inflated into data structures supporting random access in constant
time vs those that don't. Many languages have both list-like
collections AND array-like collections.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

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

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

-- 
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: Question about sets

2012-09-07 Thread Mark Engelberg
On the wiki page, Rich Hickey wrote:
* If you think a month is too long to get a response to your needs, from a
bunch of very busy volunteers, you need to chill out
* just because you decided to bring it up doesn't mean everyone else needs
to drop what they are doing

For the record, I don't really care how long it takes to get a response.
Unfortunately, there's no observable way to know whether an issue is in
some queue to be considered at a future date, or whether an issue has
merely gone unnoticed, or whether an issue has been deemed unworthy of
further consideration.

In any case, thanks for the thoughtful, well-considered response to the
issue on the wiki.

--Mark

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

Re: edn

2012-09-07 Thread Sean Corfield
On Fri, Sep 7, 2012 at 3:57 PM, Weber, Martin S martin.we...@nist.gov wrote:
 Sure. Languages. This is a data format, not a language.

But languages will be doing the serialization / deserialization so
this is relevant.

 Why should I not inflate a edn-list into a vector in my language? What if I 
 don't have a random access thing handy

I said it was a useful _hint_ and, for languages where there is a
difference between vector and list, it's worth having.

 Please do read my post again.

Perhaps you should read mine again instead of being snide?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

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

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


Re: redefining multimethods at the repl

2012-09-07 Thread Phil Hagelberg
Stuart Halloway stuart.hallo...@gmail.com writes:

 I started a wiki page for this:

 http://dev.clojure.org/display/design/Never+Close+a+REPL


 I believe these problems could be entirely solved in a contrib library
 of helper functions for REPL development. This a significantly better
 than making changes to Clojure, which must pass a high bar and be
 carefully assessed for possible affects on exiting code.

In the case of multimethods specifically, isn't this just a band-aid
workaround that doesn't address the actual problem?

-Phil

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

2012-09-07 Thread Hugo Duncan

Hello Tom,

Tom Hickey thic...@gmail.com writes:

 I'm not able to get the latest version of Zi to work. It seems to be having 
 a problem resolving a couple of it's dependencies:

 [ERROR] Failed to execute goal org.cloudhoist.plugin:zi:0.5.4:compile 
 (default-cli) on project test: Execution default-cli of goal 
 org.cloudhoist.plugin:zi:0.5.4:compile failed: Plugin 
 org.cloudhoist.plugin:zi:0.5.4 or one of its dependencies could not be 
 resolved: The following artifacts could not be resolved: 
 classlojure:classlojure:jar:0.6.5, 
 leiningen-core:leiningen-core:jar:2.0.0-preview4

 pom and maven stacktrace can be found here: https://gist.github.com/3669520

Thanks for the detailed report.

This suggests that clojars isn't being picked up. Adding it as a
pluginRepository to the pom as a workaround seems to get things moving.

pluginRepository
  idclojars/id
  urlhttp://clojars.org/repo/url
/pluginRepository

Hugo

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


Re: ANN Zi 0.5.4

2012-09-07 Thread Tom Hickey
Hi Hugo,

Adding clojars as a pluginRepository worked. Thanks!

Tom

On Friday, September 7, 2012 7:58:23 PM UTC-4, Hugo Duncan wrote:


 Hello Tom, 

 Tom Hickey thi...@gmail.com javascript: writes: 

  I'm not able to get the latest version of Zi to work. It seems to be 
 having 
  a problem resolving a couple of it's dependencies: 
  
  [ERROR] Failed to execute goal org.cloudhoist.plugin:zi:0.5.4:compile 
  (default-cli) on project test: Execution default-cli of goal 
  org.cloudhoist.plugin:zi:0.5.4:compile failed: Plugin 
  org.cloudhoist.plugin:zi:0.5.4 or one of its dependencies could not be 
  resolved: The following artifacts could not be resolved: 
  classlojure:classlojure:jar:0.6.5, 
  leiningen-core:leiningen-core:jar:2.0.0-preview4 
  
  pom and maven stacktrace can be found here: 
 https://gist.github.com/3669520 

 Thanks for the detailed report. 

 This suggests that clojars isn't being picked up. Adding it as a 
 pluginRepository to the pom as a workaround seems to get things moving. 

 pluginRepository 
   idclojars/id 
   urlhttp://clojars.org/repo/url 
 /pluginRepository 

 Hugo 


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

Re: ANN Zi 0.5.4

2012-09-07 Thread Hugo Duncan
Tom Hickey thic...@gmail.com writes:

 I'm not able to get the latest version of Zi to work. It seems to be having 
 a problem resolving a couple of it's dependencies:

 [ERROR] Failed to execute goal org.cloudhoist.plugin:zi:0.5.4:compile 
 (default-cli) on project test: Execution default-cli of goal 
 org.cloudhoist.plugin:zi:0.5.4:compile failed: Plugin 
 org.cloudhoist.plugin:zi:0.5.4 or one of its dependencies could not be 
 resolved: The following artifacts could not be resolved: 
 classlojure:classlojure:jar:0.6.5, 
 leiningen-core:leiningen-core:jar:2.0.0-preview4

I've just pushed zi 0.5.5 which should fix this.

Hugo

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


RE: edn

2012-09-07 Thread Softaddicts
It just crossed my mind, in our latest product version, we have protocols
extending lists, vectors and maps. I would hate very much to see lists 
converted to
 vectors because the spec does not support forwarding lists.

The receiver would not be able to act on the decoded structure properly with 
this
scenario.

Ok, protocols are Clojure specific but this illustrates a subtle difference 
between
sequential access versus random access that needs to be conveyed somehow.

Is this too Clojure specific ? Maybe for the near future, what about in 5 years 
?
Want to consult Mrs Irma and her crystal ball to get an answer ?

Luc P.


 You may want to distinguish between sequential versus random access,
 if your language supports both.
 
 If there is no such need in a given language, then the implementation can 
 parse them
 to the same data structure.
 
 Why not meet the general case ? What's the cost ? You are not doing this 
 processing
  by hand :)
 
 The too frequent problem in all these tools (XML, YAML, JSON, ...) is to have
 designed them with a narrow scope from the start. We ended up with an array 
 of tools
 with each having flaws because every opened door was closed with statements 
 like
 we will never need this, we cannot foresee why we would like to do this, 
 
 
 Having data as the main scope may be too narrow. 
 
 If I send a custom literal that will eventually is turned into a factory call,
 I am sending more than just data. I may send stuff that alter the behavior if 
 the
 factory fn is this good design ? Maybe yes, maybe not. But who are we to 
 judge ?
 
 Let's keep Rich think out of the box instead of trying to restrict him to 
 the same sandbox as the other tools above.
 
 Luc P.
 
  (sorry for top-posting)
  
  Languages have random access / sequential data structures.
  
  Sure. Languages. This is a data format, not a language. Why should I not 
  inflate a edn-list into a vector in my language? What if I don't have a 
  random access thing handy (because, e.g., I only have trees/tables, as e.g. 
  tcl where arrays are actually hashtables with integer keys)? Please do read 
  my post again. I'm aware of the clojure link etc. etc. etc. We're talking 
  about a data format here.
  
  Regards,
  -Martin
  
  
  From: clojure@googlegroups.com [clojure@googlegroups.com] On Behalf Of Sean 
  Corfield [seancorfi...@gmail.com]
  Sentd: Friday, September 07, 2012 18:44
  To: clojure@googlegroups.com
  Subject: Re: edn
  
  On Thu, Sep 6, 2012 at 8:26 PM, Weber, Martin S martin.we...@nist.gov 
  wrote:
   The question that's left for me is: why vectors and lists? I mean, from a 
   data format perspective, and a non-clojure implementor, I'm not sure the 
   distinction makes sense. After all for the _data format_, in its 
   serialized form, the vector will not be a random access structure. It has 
   to be deserialized, and access to an element will have linear time 
   complexity. Again, I understand its relevance from the clojure 
   perspective. Is this just too important for edn's current 
   implementor, clojure ?
  
  I think it's a useful hint to allow sequences of data that can be
  inflated into data structures supporting random access in constant
  time vs those that don't. Many languages have both list-like
  collections AND array-like collections.
  --
  Sean A Corfield -- (904) 302-SEAN
  An Architect's View -- http://corfield.org/
  World Singles, LLC. -- http://worldsingles.com/
  
  Perfection is the enemy of the good.
  -- Gustave Flaubert, French realist novelist (1821-1880)
  
  --
  You received this message because you are subscribed to the Google
  Groups Clojure group.
  To post to this group, send email to clojure@googlegroups.com
  Note that posts from new members are moderated - please be patient with 
  your first post.
  To unsubscribe from this group, send email to
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en
  
  -- 
  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
  
 --
 Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad!
 
 -- 
 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: edn

2012-09-07 Thread Michael Fogus
 Sure. Languages. This is a data format, not a language.

Data formats do not exist in a vacuum.  They are parsed by languages.
Some may have a fine-grained distinction between lists, arrays/vectors
and sets and some may not.

 Why should I not inflate a edn-list into a vector in my language?

What's stopping you? As long as you provide a way to get back to the
original formats that's up to you.  People may not use your library if
all of their (1 2 3)s become [1 2 3]s after passing through town.

 What if I don't have a random access thing handy

I would care less about true random access than the ability to
round-trip properly.

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

2012-09-07 Thread Michael Fogus
 Is this too Clojure specific ?

I wouldn't say so.  By definition the definitions of list,
vector/array and set encompass the behavior in question. I think
people are getting too wrapped up by the textual representations where
the forms (1 2 3) [1 2 3] and #{1 2 3} look fairly similar. By nature
however, they're not as similar as they look.

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

2012-09-07 Thread Softaddicts
Java has arrays, lists, maps and sets, so does Ruby and Erlang.

If they were redundancies in these structures, can't see why these three still
maintain this distinction. It's probably a safe bet to say that we need to 
convey these
nuances in edn somehow.

My question was meant as a preamble to the joke about asking Mrs Irma and
her crystal ball :)

As for the notation, I am happy that it is so terse, I can maintain my
daily code line throughput even as I slowly but surely decay behind my 
keyboard...

Luc P.

  Is this too Clojure specific ?
 
 I wouldn't say so.  By definition the definitions of list,
 vector/array and set encompass the behavior in question. I think
 people are getting too wrapped up by the textual representations where
 the forms (1 2 3) [1 2 3] and #{1 2 3} look fairly similar. By nature
 however, they're not as similar as they look.
 
 -- 
 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
 
--
Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad!

-- 
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: A Performance Comparison of SBCL Clojure

2012-09-07 Thread Devin Walters
+1 -- Andy, thanks.


On Friday, September 7, 2012 at 11:32 AM, Stuart Sierra wrote:

 Just wanted to say thanks for putting in all the work on the shootout 
 programs, Andy.
 
 On Friday, September 7, 2012 1:12:44 AM UTC-7, Andy Fingerhut wrote:
  All Clojure programs within 4x the run time of the
  corresponding Java programs, averaging around 2.5x the run
  time of Java.
 
 
 That's pretty darn good.
 
  Lesson I've learned: If you've got an inner loop of your
  program that you really really need to run faster, code it
  in Java, C, or even assembler. Use profiling tools to find
  those spots, rather than guessing where you think they
  might be. 
 
 
 Agreed.
 
 -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 
 (mailto:clojure@googlegroups.com)
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com 
 (mailto:clojure+unsubscr...@googlegroups.com)
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en



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


algo.monad state-m fetch-val bug and efficiency issue

2012-09-07 Thread Phlex
I've been using the state monad in algo.monad, and found what i think is 
a bug in the fetch-val function. There is also an efficiency issue with 
this function.


I was unable to contact a maintainer of this library on irc (though i 
didn't try very hard), So here is a gist with problem statement and 
solutions for both issues.


https://gist.github.com/3667614

Sacha

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


Bug in CLJS `symbol` with quoted symbol

2012-09-07 Thread Shantanu Kumar
Hello,

I found this bug related to `symbol` and quoted symbols in CLJS. Explained 
below.

In Clojure:

user= (= 'a (symbol 'a))
true

In CLJS:

ClojureScript:cljs.user (= 'a (symbol 'a))
false

Unless this is related to http://dev.clojure.org/jira/browse/CLJS-376 I can 
file a new issue for this. Somebody please let me know.

Shantanu

-- 
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: PBI: Datomic-based wiki

2012-09-07 Thread marc
I do find it interesting as I'm looking to put together a set of systems in 
support of a not for profit broadband ISP (http://noisp.coop) here in 
Australia where one of the required systems will be a wiki.

I'd love to and intend to utilise Clojure for the future versions of the 
web site and support systems and being able to integrate the wiki as well 
with your ideas of versioning and the appropriately expressed requirements 
in this message 
https://groups.google.com/d/msg/clojure/1an5fCRFYGc/V6s0hKxZI30J on being 
able to attribute changes / authors to work is important to the wiki I'd 
like to see in place for NoISP.

For instance:

   - Changes to Wiki pages should audit-able, but importantly the members 
   should be able to vote positively ('like') or negatively ('dislike / 
   disagree') with posted changes. The importance of this is that as an author 
   gains status the need to preview their changes becomes less. In an 
   organisation based on co-operative mutual assistance the ability to 
   automate in a democratic fashion is the only way this can scale.
   - I think it is a flaw of current social media sites that you can only 
  dislike.
   - We have a Sponsor / Sponsored support model (members can cooperatively 
   engage in support contracts facilitated by the co-op) but being able to 
   apply core.logic and member (user) aware knowledge to support issues would 
   be a huge bonus and I can't see current wikis offering easy integration of 
   such capability.
  - i.e. a logged in member can see a wiki page reflective of their 
  services and the service status - an interesting problem to provide 
  authoring for such capabilities.
   
I'll stop there as it is getting beyond the bailiwick of this list.

Regards,

Marc

On Friday, 7 September 2012 03:17:25 UTC+10, Rich Morin wrote:

 I have a partly-baked idea about basing a wiki on Datomic. 
 This could allow users to view the entire wiki as of some 
 time in the past, compare versions of pages, etc. 

 If you find this interesting, please offer any comments or 
 suggestions you might have. 

 -r 

  -- 
 http://www.cfcl.com/rdmRich Morin 
 http://www.cfcl.com/rdm/resume r...@cfcl.com javascript: 
 http://www.cfcl.com/rdm/weblog +1 650-873-7841 

 Software system design, development, and documentation 




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