Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
I went back to my Windows 8 laptop and updated lein.bat to the version
on leiningen.org and then tested the up/down-grades and they worked
perfectly - great to see the latest Windows batch file working so
well!

Sean

On Wed, Aug 21, 2013 at 3:21 PM, Sean Corfield  wrote:
> As I told Phil on IRC, the problem turned out to be an old lein.bat...
>
> To test the theory of the old lein.bat, I fired up two of my VMs:
> * Windows XP running Leiningen 1.6.1.1(!)
> * Windows 8 running Leiningen 2.0.0-preview10
>
> On both of these, running lein upgrade produced a message that upgrade
> was not supported and the .bat file should be edited to have the
> desired version of Leiningen, then run lein self-install. Phil
> confirmed in IRC that is NOT the correct process and the lein.bat
> script should not be printing that message!
>
> On both, I downloaded the latest lein.bat directly from
> http://leiningen.org and replaced the current version.
>
> On Windows XP, I opened a cmd window and navigated to the folder that
> contains curl.exe (previously installed - I never added it to my path)
> and ran lein self-install
>
> On Windows 8, I opened a cmd window and ran lein self-install (wget
> and curl are already on my path due to GOW - Gnu On Windows - being
> installed)
>
> In both cases, the Leiningen upgrade completed smoothly and I was
> running Leiningen 2.3.2 afterward.
>
> So the moral here is:
>
> * don't edit lein.bat to change the version - instead download the
> latest version from leiningen.org!
>
> I'll be interested to see what lein upgrade does next time on Windows,
> now that I'm running the latest .bat file. If it suggests editing the
> file, I'll open an issue :)
>
> Sean
>
>
>
>
> On Wed, Aug 21, 2013 at 10:46 AM, Sean Corfield  
> wrote:
>> I have a working Leiningen. I have wget and curl via GOW - Gnu On
>> Windows. I have HTTP_CLIENT set as a global environment variable to:
>> wget --no-check-certificate -O per Leiningen's instructions. I'll see
>> whether the upgrade process works when 2.3.3 is released. That will
>> determine whether the HTTP_CLIENT bug Phil mentioned was indeed fixed
>> in 2.3.2.
>>
>> Good to know that your installer packages an appropriate ca file. If
>> my future upgrades don't go more smoothly, I'll switch to your
>> installer.
>>
>> Sean
>>
>> On Wed, Aug 21, 2013 at 10:23 AM, David Powell  wrote:
>>>
>>> On Wed, Aug 21, 2013 at 5:57 PM, Sean Corfield 
>>> wrote:

 Does that work to upgrade an already installed version of Leiningen?
>>>
>>>
>>> Not really.  But if you took your existing leiningen off the path, and ran
>>> the installer it might get things up and running:
>>> It bundles a wget with an appropriate ca file, downloads the latest stable
>>> lein.bat, lets you select a JDK path from those available, and it ensures
>>> that lein.bat is on the path.
>>>
>>> --
>>> Dave
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clojure@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with your
>>> first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>> --
>> 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)
>
>
>
> --
> 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)



-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.c

Re: Two Way DOM binding in clojurescript

2013-08-21 Thread Kevin Lynagh
I just posted a 3500 word blog post on this topic:

http://keminglabs.com/blog/cljs-app-designs/

which outlines the relative merits and tradeoffs of using explicit DOM 
references with callbacks vs. Angular's dirty-checking model and interop 
with the library from ClojureScript.

cheers,

Kevin

On Wednesday, June 13, 2012 11:47:15 PM UTC-7, Murtaza Husain wrote:
>
> Hi,
>
> I would like to data in atoms to DOM elements in clojurescript. Are there 
> any examples out there that demonstrate this ? 
>
> Something like what knockout.js or angular.js provide. 
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: problem with edn

2013-08-21 Thread kawas
In fact never user *print-dup* when using edn to read back data


*print-dup* will output type and meta information that will not play well 
with edn
  user=> (binding [*print-dup* true] (pr-str (sorted-map :z 5 :a 1)))
  "#=(clojure.lang.PersistentTreeMap/create {:a 1, :z 5})"

This "#=" with raise a RuntimeException because there is no dispatch on "=" 
in edn

Not using *print-dup* may lose some important information on data
  user=> (binding [*print-dup* false] (pr-str (sorted-map :z 5 :a 1)))
  "{:a 1, :z 5}"  ;; this is a plain hash map

Just take care of providing your own custom tags to be able to read data 
correctly
  ;; clumsy example
  user=> (binding [*print-dup* false] (str "#treemap " (pr-str (sorted-map 
:z 5 :a 1
  "#treemap {:a 1, :z 5}"

You can then read it back with your custom reader
  user=> (edn/read-string {:readers {'treemap #(merge (sorted-map) %)}}
 (binding [*print-dup* false] (str "#treemap " (pr-str 
(sorted-map :z 5 :a 1)
  {:a 1, :z 5}   ;; this is a sorted map


Seems like it should be possible to easily provide default printers and 
readers for custom tags & data...

Cheers

Le mercredi 21 août 2013 22:38:18 UTC+2, kawas a écrit :
>
> Never had time to play with edn and custom readers but they are funny :)
>
> Use *print-dup* if you need to... just know how to custom read it :
>
>   user=> (edn/read-string {:readers {'user.Foo map->Foo}} "#user.Foo{:a 1 
> :b 2 :c 3}")
>   #user.Foo{:a 1, :b 2, :c 3}
>
>   user=> (edn/read-string {:readers {'user.Foo #(apply ->Foo %)}} 
> "#user.Foo[1, 2, 3]")
>   #user.Foo{:a 1, :b 2, :c 3}
>
> Nice
>
> Le mercredi 21 août 2013 22:33:00 UTC+2, kawas a écrit :
>>
>> By the way *print-dup* is the problem, maybe you should not use it :)
>>
>> Spot the difference :
>>   user=> (binding [*print-dup* true] (prn (->Foo 1 2 3)))
>>   #user.Foo[1, 2, 3]
>>
>>   user=> (binding [*print-dup* false] (prn (->Foo 1 2 3)))
>>   #user.Foo{:a 1, :b 2, :c 3}
>>
>> cheers
>>
>> Le mercredi 21 août 2013 19:55:59 UTC+2, Jim foo.bar a écrit :
>>>
>>>  Hi everyone,
>>>
>>> I am trying to serialise a record with edn. I think I am using all the 
>>> good practices but I get a weird error...I am using these simple functions:
>>>
>>> (defn data->string
>>> "Writes the object b on a file f on disk as a string."
>>> [b f]
>>> (io!
>>> (with-open [w (clojure.java.io/writer f)]
>>>   (binding [*print-dup* true 
>>> *out* w]  (prn b)
>>>
>>> (defn string->data
>>> "Read the file f back on memory safely. Contents of f should be a 
>>> clojure data-structure." 
>>> [f]
>>> (io!
>>>  (edn/read-string (slurp f  
>>>
>>> and I am getting this error:
>>> *
>>> **RuntimeException No dispatch macro for: =  
>>> clojure.lang.Util.runtimeException (Util.java:219)*
>>>
>>> Out of curiosity I tried something simpler like this: 
>>>
>>> Clondie24.games.chess=> (defrecord FOO [a b c])
>>> Clondie24.games.chess.FOO
>>> Clondie24.games.chess=> (ut/data->string (FOO. :a :b :C) "FOO")
>>> nil
>>> Clondie24.games.chess=> (ut/string->data "FOO")
>>>
>>> RuntimeException No reader function for tag Clondie24.games.chess.FOO  
>>> clojure.lang.EdnReader$TaggedReader.readTagged (EdnReader.java:739)
>>>
>>>
>>> What I am I missing? any suggestions? 
>>>
>>> Jim
>>>   
>>>  
>>>  
>>

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


Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
As I told Phil on IRC, the problem turned out to be an old lein.bat...

To test the theory of the old lein.bat, I fired up two of my VMs:
* Windows XP running Leiningen 1.6.1.1(!)
* Windows 8 running Leiningen 2.0.0-preview10

On both of these, running lein upgrade produced a message that upgrade
was not supported and the .bat file should be edited to have the
desired version of Leiningen, then run lein self-install. Phil
confirmed in IRC that is NOT the correct process and the lein.bat
script should not be printing that message!

On both, I downloaded the latest lein.bat directly from
http://leiningen.org and replaced the current version.

On Windows XP, I opened a cmd window and navigated to the folder that
contains curl.exe (previously installed - I never added it to my path)
and ran lein self-install

On Windows 8, I opened a cmd window and ran lein self-install (wget
and curl are already on my path due to GOW - Gnu On Windows - being
installed)

In both cases, the Leiningen upgrade completed smoothly and I was
running Leiningen 2.3.2 afterward.

So the moral here is:

* don't edit lein.bat to change the version - instead download the
latest version from leiningen.org!

I'll be interested to see what lein upgrade does next time on Windows,
now that I'm running the latest .bat file. If it suggests editing the
file, I'll open an issue :)

Sean




On Wed, Aug 21, 2013 at 10:46 AM, Sean Corfield  wrote:
> I have a working Leiningen. I have wget and curl via GOW - Gnu On
> Windows. I have HTTP_CLIENT set as a global environment variable to:
> wget --no-check-certificate -O per Leiningen's instructions. I'll see
> whether the upgrade process works when 2.3.3 is released. That will
> determine whether the HTTP_CLIENT bug Phil mentioned was indeed fixed
> in 2.3.2.
>
> Good to know that your installer packages an appropriate ca file. If
> my future upgrades don't go more smoothly, I'll switch to your
> installer.
>
> Sean
>
> On Wed, Aug 21, 2013 at 10:23 AM, David Powell  wrote:
>>
>> On Wed, Aug 21, 2013 at 5:57 PM, Sean Corfield 
>> wrote:
>>>
>>> Does that work to upgrade an already installed version of Leiningen?
>>
>>
>> Not really.  But if you took your existing leiningen off the path, and ran
>> the installer it might get things up and running:
>> It bundles a wget with an appropriate ca file, downloads the latest stable
>> lein.bat, lets you select a JDK path from those available, and it ensures
>> that lein.bat is on the path.
>>
>> --
>> Dave
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with your
>> first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> 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)



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


Re: Multiple Clojure contexts in the same JVM

2013-08-21 Thread David Pollak
Sweet. Thanks!


On Tue, Aug 20, 2013 at 3:51 PM, Toby Crawley  wrote:

>
> David Pollak writes:
>
> > I have an application where I need multiple independent Clojure contexts
> > running in the same JVM.
>
> You can use ShimDandy[1] to load multiple Clojure runtimes in the same
> JVM, and call into those runtimes from Java. That's what Immutant[2] and
> the Clojure language module for Vert.x[3] use currently to achieve
> runtime isolation.
>
> One gotcha with loading multiple Clojure runtimes is memory leaks - if
> you intend to load and unload more than a couple of runtimes, you'll
> quickly exhaust permgen. The workaround there is to wait for Clojure
> 1.6.0 (assuming CLJ-1125[4] gets applied), or use a fork of Clojure that
> has the CLJ-1125 fixes in it[5].
>
> The ShimDandy docs are completely non-existent at this point, but an
> example of usage is [6]. If you have interest in using it, I'm happy to
> help you get started, and to write some docs.
>
> [1]: https://github.com/projectodd/shimdandy
> [2]: http://immutant.org/
> [3]: https://github.com/vert-x/mod-lang-clojure
> [4]: http://dev.clojure.org/jira/browse/CLJ-1125
> [5]: https://clojars.org/org.clojars.tcrawley/clojure
> [6]:
> https://github.com/vert-x/mod-lang-clojure/blob/master/lang-module/src/main/java/io/vertx/lang/clojure/ClojureVerticleFactory.java
>
> --
> Toby Crawley
> http://immutant.org | http://torquebox.org
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

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


Re: [ANN] Clotilde is Linda in Clojure.

2013-08-21 Thread François DE SERRES
Hi there,

I just pushed the new Clotilde to 
GitHub, 
now with proper pattern handling and a more idiomatic API.

Please review? (only a handful lines) 

Thankies!
--
F.


Le lundi 5 août 2013 16:37:16 UTC+2, François DE SERRES a écrit :
>
> Hi, 
>
> 9 months and half a dozen books later, here's my first (hopefully) useful 
> Clojure program: https://github.com/justiniac/clotilde
>
> Clotilde implements the basic ops of the Linda process coordination 
> language: http://en.wikipedia.org/wiki/Linda_(coordination_language)
>
> More on the topic: 
> http://www.sciencedirect.com/science/article/pii/S0890540199928237
> I'd be so happy to get feedback ;o) 
> Also, I am now in search of a (possibly NP complex) short Linda program to 
> translate into Clotilde.
> Mucho thankies!
> --
> François
>
>

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


Re: [ANN] optparse-clj: Functional GNU-style command line options parsing

2013-08-21 Thread Christian Sperandio
Cool!
I started looking at integrate the Apache commons-cli with clojure. Your
code will save work time :)
Thanks

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


Re: problem with edn

2013-08-21 Thread kawas
Never had time to play with edn and custom readers but they are funny :)

Use *print-dup* if you need to... just know how to custom read it :

  user=> (edn/read-string {:readers {'user.Foo map->Foo}} "#user.Foo{:a 1 
:b 2 :c 3}")
  #user.Foo{:a 1, :b 2, :c 3}

  user=> (edn/read-string {:readers {'user.Foo #(apply ->Foo %)}} 
"#user.Foo[1, 2, 3]")
  #user.Foo{:a 1, :b 2, :c 3}

Nice

Le mercredi 21 août 2013 22:33:00 UTC+2, kawas a écrit :
>
> By the way *print-dup* is the problem, maybe you should not use it :)
>
> Spot the difference :
>   user=> (binding [*print-dup* true] (prn (->Foo 1 2 3)))
>   #user.Foo[1, 2, 3]
>
>   user=> (binding [*print-dup* false] (prn (->Foo 1 2 3)))
>   #user.Foo{:a 1, :b 2, :c 3}
>
> cheers
>
> Le mercredi 21 août 2013 19:55:59 UTC+2, Jim foo.bar a écrit :
>>
>>  Hi everyone,
>>
>> I am trying to serialise a record with edn. I think I am using all the 
>> good practices but I get a weird error...I am using these simple functions:
>>
>> (defn data->string
>> "Writes the object b on a file f on disk as a string."
>> [b f]
>> (io!
>> (with-open [w (clojure.java.io/writer f)]
>>   (binding [*print-dup* true 
>> *out* w]  (prn b)
>>
>> (defn string->data
>> "Read the file f back on memory safely. Contents of f should be a clojure 
>> data-structure." 
>> [f]
>> (io!
>>  (edn/read-string (slurp f  
>>
>> and I am getting this error:
>> *
>> **RuntimeException No dispatch macro for: =  
>> clojure.lang.Util.runtimeException (Util.java:219)*
>>
>> Out of curiosity I tried something simpler like this: 
>>
>> Clondie24.games.chess=> (defrecord FOO [a b c])
>> Clondie24.games.chess.FOO
>> Clondie24.games.chess=> (ut/data->string (FOO. :a :b :C) "FOO")
>> nil
>> Clondie24.games.chess=> (ut/string->data "FOO")
>>
>> RuntimeException No reader function for tag Clondie24.games.chess.FOO  
>> clojure.lang.EdnReader$TaggedReader.readTagged (EdnReader.java:739)
>>
>>
>> What I am I missing? any suggestions? 
>>
>> Jim
>>   
>>  
>>  
>

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


Re: problem with edn

2013-08-21 Thread kawas
By the way *print-dup* is the problem, maybe you should not use it :)

Spot the difference :
  user=> (binding [*print-dup* true] (prn (->Foo 1 2 3)))
  #user.Foo[1, 2, 3]

  user=> (binding [*print-dup* false] (prn (->Foo 1 2 3)))
  #user.Foo{:a 1, :b 2, :c 3}

cheers

Le mercredi 21 août 2013 19:55:59 UTC+2, Jim foo.bar a écrit :
>
>  Hi everyone,
>
> I am trying to serialise a record with edn. I think I am using all the 
> good practices but I get a weird error...I am using these simple functions:
>
> (defn data->string
> "Writes the object b on a file f on disk as a string."
> [b f]
> (io!
> (with-open [w (clojure.java.io/writer f)]
>   (binding [*print-dup* true 
> *out* w]  (prn b)
>
> (defn string->data
> "Read the file f back on memory safely. Contents of f should be a clojure 
> data-structure." 
> [f]
> (io!
>  (edn/read-string (slurp f  
>
> and I am getting this error:
> *
> **RuntimeException No dispatch macro for: =  
> clojure.lang.Util.runtimeException (Util.java:219)*
>
> Out of curiosity I tried something simpler like this: 
>
> Clondie24.games.chess=> (defrecord FOO [a b c])
> Clondie24.games.chess.FOO
> Clondie24.games.chess=> (ut/data->string (FOO. :a :b :C) "FOO")
> nil
> Clondie24.games.chess=> (ut/string->data "FOO")
>
> RuntimeException No reader function for tag Clondie24.games.chess.FOO  
> clojure.lang.EdnReader$TaggedReader.readTagged (EdnReader.java:739)
>
>
> What I am I missing? any suggestions? 
>
> Jim
>   
>  
>  

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


Re: problem with edn

2013-08-21 Thread kawas
Hi,

Maybe you should provide a custom reader for your record.

See answer on this question
http://stackoverflow.com/questions/17991565/clojure-defrecord-serialization-classnotfoundexception


regards,

Le mercredi 21 août 2013 19:55:59 UTC+2, Jim foo.bar a écrit :
>
>  Hi everyone,
>
> I am trying to serialise a record with edn. I think I am using all the 
> good practices but I get a weird error...I am using these simple functions:
>
> (defn data->string
> "Writes the object b on a file f on disk as a string."
> [b f]
> (io!
> (with-open [w (clojure.java.io/writer f)]
>   (binding [*print-dup* true 
> *out* w]  (prn b)
>
> (defn string->data
> "Read the file f back on memory safely. Contents of f should be a clojure 
> data-structure." 
> [f]
> (io!
>  (edn/read-string (slurp f  
>
> and I am getting this error:
> *
> **RuntimeException No dispatch macro for: =  
> clojure.lang.Util.runtimeException (Util.java:219)*
>
> Out of curiosity I tried something simpler like this: 
>
> Clondie24.games.chess=> (defrecord FOO [a b c])
> Clondie24.games.chess.FOO
> Clondie24.games.chess=> (ut/data->string (FOO. :a :b :C) "FOO")
> nil
> Clondie24.games.chess=> (ut/string->data "FOO")
>
> RuntimeException No reader function for tag Clondie24.games.chess.FOO  
> clojure.lang.EdnReader$TaggedReader.readTagged (EdnReader.java:739)
>
>
> What I am I missing? any suggestions? 
>
> Jim
>   
>  
>  

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


Re: [ANN] optparse-clj: Functional GNU-style command line options parsing

2013-08-21 Thread guns
On Wed 7 Aug 2013 at 10:53:00AM -0500, guns wrote:

> I'd like to announce optparse-clj, a command line options parser that
> supports GNU option parsing conventions:
>
> https://github.com/guns/optparse-clj

Hello again,

optparse-clj 1.1.1 now supports ClojureScript and may be used from
Node.js command line scripts produced by the CLJS compiler's :nodejs
target.

[guns.cli/optparse "1.1.1"]

If you're writing Node.js scripts in CLJS and want to present users with
a conventional GNU command line interface (clumped short options `-abc`,
--long-options with or without `=`), give optparse-clj a try!

guns


pgpeN00rmvwYc.pgp
Description: PGP signature


problem with edn

2013-08-21 Thread Jim - FooBar();

Hi everyone,

I am trying to serialise a record with edn. I think I am using all the 
good practices but I get a weird error...I am using these simple functions:


(defn data->string
"Writes the object b on a file f on disk as a string."
[b f]
(io!
(with-open [w (clojure.java.io/writer f)]
  (binding [*print-dup* true
*out* w]  (prn b)

(defn string->data
"Read the file f back on memory safely. Contents of f should be a 
clojure data-structure."

[f]
(io!
 (edn/read-string (slurp f

and I am getting this error:
*
**RuntimeException No dispatch macro for: = 
clojure.lang.Util.runtimeException (Util.java:219)*


Out of curiosity I tried something simpler like this:

Clondie24.games.chess=> (defrecord FOO [a b c])
Clondie24.games.chess.FOO
Clondie24.games.chess=> (ut/data->string (FOO. :a :b :C) "FOO")
nil
Clondie24.games.chess=> (ut/string->data "FOO")

RuntimeException No reader function for tag Clondie24.games.chess.FOO 
clojure.lang.EdnReader$TaggedReader.readTagged (EdnReader.java:739)



What I am I missing? any suggestions?

Jim


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

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
I have a working Leiningen. I have wget and curl via GOW - Gnu On
Windows. I have HTTP_CLIENT set as a global environment variable to:
wget --no-check-certificate -O per Leiningen's instructions. I'll see
whether the upgrade process works when 2.3.3 is released. That will
determine whether the HTTP_CLIENT bug Phil mentioned was indeed fixed
in 2.3.2.

Good to know that your installer packages an appropriate ca file. If
my future upgrades don't go more smoothly, I'll switch to your
installer.

Sean

On Wed, Aug 21, 2013 at 10:23 AM, David Powell  wrote:
>
> On Wed, Aug 21, 2013 at 5:57 PM, Sean Corfield 
> wrote:
>>
>> Does that work to upgrade an already installed version of Leiningen?
>
>
> Not really.  But if you took your existing leiningen off the path, and ran
> the installer it might get things up and running:
> It bundles a wget with an appropriate ca file, downloads the latest stable
> lein.bat, lets you select a JDK path from those available, and it ensures
> that lein.bat is on the path.
>
> --
> Dave
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



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


Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread David Powell
On Wed, Aug 21, 2013 at 5:57 PM, Sean Corfield wrote:

> Does that work to upgrade an already installed version of Leiningen?


Not really.  But if you took your existing leiningen off the path, and ran
the installer it might get things up and running:
It bundles a wget with an appropriate ca file, downloads the latest stable
lein.bat, lets you select a JDK path from those available, and it ensures
that lein.bat is on the path.

-- 
Dave

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


Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
Does that work to upgrade an already installed version of Leiningen?

On Wed, Aug 21, 2013 at 9:50 AM, David Powell  wrote:
> Have you tried http://leiningen-win-installer.djpowell.net/ - it should
> work...
>
> --
> Dave
>
>
>
> On Wed, Aug 21, 2013 at 6:13 AM, Sean Corfield 
> wrote:
>>
>> Upgrading on Mac/Linux was painless as usual - and everything here
>> seems to run fine with 2.3.2 - but Windows continues to be a pain in
>> the rear...
>>
>> You can't lein upgrade so I updated the version string in lein.bat and
>> tried lein self-install:
>>
>> C:\Users\Sean>lein self-install
>> Downloading Leiningen now...
>> SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
>> syswgetrc = C:\gow/etc/wgetrc
>> --2013-08-20 22:01:41--
>>
>> https://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.3.2-standalone.jar
>> Resolving cloud.github.com... 54.240.188.252, 54.230.71.6, 54.230.70.21,
>> ...
>> Connecting to cloud.github.com|54.240.188.252|:443... connected.
>> WARNING: cannot verify cloud.github.com's certificate, issued by
>> `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance
>> CA-3':
>>   Self-signed certificate encountered.
>> WARNING: certificate common name `*.cloudfront.net' doesn't match
>> requested host name `cloud.github.com'.
>> HTTP request sent, awaiting response... 403 Forbidden
>> 2013-08-20 22:01:41 ERROR 403: Forbidden.
>>
>> Failed to download
>>
>> https://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.3.2-standalone.jar
>>
>> You can't download that file via a browser either:
>>
>> This XML file does not appear to have any style information associated
>> with it. The document tree is shown below.
>> 
>> AccessDenied
>> Access Denied
>> BBF8809DA1520371
>> 
>> Laq6Bi6lZlah+zalsro6LbnHl2hKt0fDsZO1Tvu6spiEjq8CghIMHLDSwk7XTm+k
>> 
>> 
>>
>> I have HTTP_CLIENT set to wget --no-check-certificate -O as a global
>> environment variable.
>>
>> Is this just a problem upgrading from 2.1.3 that is - finally - going
>> to be a thing of the past from now on, or is there still work to do?
>>
>> Sean
>>
>>
>> On Tue, Aug 20, 2013 at 3:11 PM, Phil Hagelberg  wrote:
>> >
>> > Hello everybody.
>> >
>> > I'm happy to announce the release of Leiningen 2.3.2, a minor bugfix
>> > release over 2.3.1. Changes include the following:
>> >
>> > * Write `.nrepl-port` file for better tool interoperability. (Phil
>> > Hagelberg)
>> > * Support targeted upgrades in `lein.bat`. (Shantanu Kumar)
>> > * Warn when projects rely on implicit AOT of `:main`. (Phil Hagelberg)
>> > * Fix a bug where implicit AOT of `:main` was disabled. (Phil Hagelberg)
>> > * Disable profile isolation by default. Will be back in 3.x. (Phil
>> > Hagelberg)
>> >
>> > The biggest change here the disabling of profile isolation (a new by
>> > default due to incompatibilities with certain projects that hard-code
>> > paths. Profile isolation was a new feature in 2.3.0 described in the
>> > FAQ:
>> >
>> >> Leiningen supports isolating different profiles by their target
>> >> directory. Simply specify `:target-path "target/%s"` in order to have
>> >> each profile set use a different directory for generated files. Then
>> >> you
>> >> can put your `:aot` settings in the `:uberjar` profiles, and the .class
>> >> files created from the AOT process will not affect normal development
>> >> use. You can specify the profile-isolated `:target-path` in your
>> >> `:user`
>> >> profile if you want it applied across all the projects you work on.
>> >
>> > I still recommend using profile isolation since it helps avoid a number
>> > of subtle gotchas around stale AOT files and user-level dependencies
>> > being visible with downstream consumers, but you now have to opt-in to
>> > this feature by setting :target-path as described above.
>> >
>> > We've also fixed a bug where setting :main without setting :aot would no
>> > longer implicitly compile the :main namespace. It's still recommended to
>> > be explicit about what :aot you need, (in the :uberjar profile if
>> > applicable) but the old behaviour has been restored.
>> >
>> > You'll also want to add a .gitignore entry for the new .nrepl-port file
>> > which we're using for improved cross-tool compatibility; discussion of
>> > that feature is here:
>> > https://github.com/technomancy/leiningen/issues/1296
>> >
>> > Thanks!
>> >
>> > -Phil
>>
>>
>>
>> --
>> 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 g

Lisp in Tex

2013-08-21 Thread Tim Daly
TeX is viewed as a document markup language but it is turing
complete. Occasionally people get ambitious. Here is 
executable lisp in a Latex document:

ctan.org/pkg/lisp-on-tex

Perhaps some bright spot can do a Clojure-in-tex during the
next Google summer of code :-)

Tim Daly

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


Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread David Powell
Have you tried http://leiningen-win-installer.djpowell.net/ - it should
work...

-- 
Dave



On Wed, Aug 21, 2013 at 6:13 AM, Sean Corfield wrote:

> Upgrading on Mac/Linux was painless as usual - and everything here
> seems to run fine with 2.3.2 - but Windows continues to be a pain in
> the rear...
>
> You can't lein upgrade so I updated the version string in lein.bat and
> tried lein self-install:
>
> C:\Users\Sean>lein self-install
> Downloading Leiningen now...
> SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
> syswgetrc = C:\gow/etc/wgetrc
> --2013-08-20 22:01:41--
>
> https://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.3.2-standalone.jar
> Resolving cloud.github.com... 54.240.188.252, 54.230.71.6, 54.230.70.21,
> ...
> Connecting to cloud.github.com|54.240.188.252|:443... connected.
> WARNING: cannot verify cloud.github.com's certificate, issued by
> `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance
> CA-3':
>   Self-signed certificate encountered.
> WARNING: certificate common name `*.cloudfront.net' doesn't match
> requested host name `cloud.github.com'.
> HTTP request sent, awaiting response... 403 Forbidden
> 2013-08-20 22:01:41 ERROR 403: Forbidden.
>
> Failed to download
>
> https://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.3.2-standalone.jar
>
> You can't download that file via a browser either:
>
> This XML file does not appear to have any style information associated
> with it. The document tree is shown below.
> 
> AccessDenied
> Access Denied
> BBF8809DA1520371
> 
> Laq6Bi6lZlah+zalsro6LbnHl2hKt0fDsZO1Tvu6spiEjq8CghIMHLDSwk7XTm+k
> 
> 
>
> I have HTTP_CLIENT set to wget --no-check-certificate -O as a global
> environment variable.
>
> Is this just a problem upgrading from 2.1.3 that is - finally - going
> to be a thing of the past from now on, or is there still work to do?
>
> Sean
>
>
> On Tue, Aug 20, 2013 at 3:11 PM, Phil Hagelberg  wrote:
> >
> > Hello everybody.
> >
> > I'm happy to announce the release of Leiningen 2.3.2, a minor bugfix
> > release over 2.3.1. Changes include the following:
> >
> > * Write `.nrepl-port` file for better tool interoperability. (Phil
> Hagelberg)
> > * Support targeted upgrades in `lein.bat`. (Shantanu Kumar)
> > * Warn when projects rely on implicit AOT of `:main`. (Phil Hagelberg)
> > * Fix a bug where implicit AOT of `:main` was disabled. (Phil Hagelberg)
> > * Disable profile isolation by default. Will be back in 3.x. (Phil
> Hagelberg)
> >
> > The biggest change here the disabling of profile isolation (a new by
> > default due to incompatibilities with certain projects that hard-code
> > paths. Profile isolation was a new feature in 2.3.0 described in the FAQ:
> >
> >> Leiningen supports isolating different profiles by their target
> >> directory. Simply specify `:target-path "target/%s"` in order to have
> >> each profile set use a different directory for generated files. Then you
> >> can put your `:aot` settings in the `:uberjar` profiles, and the .class
> >> files created from the AOT process will not affect normal development
> >> use. You can specify the profile-isolated `:target-path` in your `:user`
> >> profile if you want it applied across all the projects you work on.
> >
> > I still recommend using profile isolation since it helps avoid a number
> > of subtle gotchas around stale AOT files and user-level dependencies
> > being visible with downstream consumers, but you now have to opt-in to
> > this feature by setting :target-path as described above.
> >
> > We've also fixed a bug where setting :main without setting :aot would no
> > longer implicitly compile the :main namespace. It's still recommended to
> > be explicit about what :aot you need, (in the :uberjar profile if
> > applicable) but the old behaviour has been restored.
> >
> > You'll also want to add a .gitignore entry for the new .nrepl-port file
> > which we're using for improved cross-tool compatibility; discussion of
> > that feature is here:
> https://github.com/technomancy/leiningen/issues/1296
> >
> > Thanks!
> >
> > -Phil
>
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> 

Re: [ANN] Leiningen 2.3.2 released

2013-08-21 Thread Sean Corfield
It doesn't seem related to either of those. It seems to be an SSL
certificate issue, perhaps #1287? (which Phil closed saying "build it
from source instead"). I guess I'm surprised the JAR cannot simply be
downloaded via a browser - that would seem the easiest way for Windows
users to get Leiningen upgraded, in the absence of wget / curl.

Phil mentioned something (in IRC? in the last thread about SSL
problems?) about self-install not respecting HTTP_CLIENT early enough
in the process and that was fixed (post-2.1.3) but I can't find a
related issue for that.

If what I'm seeing is related to that latter problem, then this should
already be fixed and shouldn't be a problem with future upgrades - I
just wanted to try to get confirmation of that before opening a new
issue.

Sean

On Tue, Aug 20, 2013 at 11:31 PM, Shantanu Kumar
 wrote:
> Hi Sean,
>
> Lein 2.3.2 fixed #1150 and #1292 on Windows, tested on Windows 7 and Windows
> XP. Is there any particular issue# your use case relates to? Please
> mention/file the issues -- I will see if I can find a fix.
>
> Shantanu
>
>
> On Wednesday, 21 August 2013 10:43:36 UTC+5:30, Sean Corfield wrote:
>>
>> Upgrading on Mac/Linux was painless as usual - and everything here
>> seems to run fine with 2.3.2 - but Windows continues to be a pain in
>> the rear...
>>
>> You can't lein upgrade so I updated the version string in lein.bat and
>> tried lein self-install:
>>
>> C:\Users\Sean>lein self-install
>> Downloading Leiningen now...
>> SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
>> syswgetrc = C:\gow/etc/wgetrc
>> --2013-08-20 22:01:41--
>>
>> https://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.3.2-standalone.jar
>> Resolving cloud.github.com... 54.240.188.252, 54.230.71.6, 54.230.70.21,
>> ...
>> Connecting to cloud.github.com|54.240.188.252|:443... connected.
>> WARNING: cannot verify cloud.github.com's certificate, issued by
>> `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance
>> CA-3':
>>   Self-signed certificate encountered.
>> WARNING: certificate common name `*.cloudfront.net' doesn't match
>> requested host name `cloud.github.com'.
>> HTTP request sent, awaiting response... 403 Forbidden
>> 2013-08-20 22:01:41 ERROR 403: Forbidden.
>>
>> Failed to download
>>
>> https://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.3.2-standalone.jar
>>
>> You can't download that file via a browser either:
>>
>> This XML file does not appear to have any style information associated
>> with it. The document tree is shown below.
>> 
>> AccessDenied
>> Access Denied
>> BBF8809DA1520371
>> 
>> Laq6Bi6lZlah+zalsro6LbnHl2hKt0fDsZO1Tvu6spiEjq8CghIMHLDSwk7XTm+k
>> 
>> 
>>
>> I have HTTP_CLIENT set to wget --no-check-certificate -O as a global
>> environment variable.
>>
>> Is this just a problem upgrading from 2.1.3 that is - finally - going
>> to be a thing of the past from now on, or is there still work to do?
>>
>> Sean
>>
>>
>> On Tue, Aug 20, 2013 at 3:11 PM, Phil Hagelberg  wrote:
>> >
>> > Hello everybody.
>> >
>> > I'm happy to announce the release of Leiningen 2.3.2, a minor bugfix
>> > release over 2.3.1. Changes include the following:
>> >
>> > * Write `.nrepl-port` file for better tool interoperability. (Phil
>> > Hagelberg)
>> > * Support targeted upgrades in `lein.bat`. (Shantanu Kumar)
>> > * Warn when projects rely on implicit AOT of `:main`. (Phil Hagelberg)
>> > * Fix a bug where implicit AOT of `:main` was disabled. (Phil Hagelberg)
>> > * Disable profile isolation by default. Will be back in 3.x. (Phil
>> > Hagelberg)
>> >
>> > The biggest change here the disabling of profile isolation (a new by
>> > default due to incompatibilities with certain projects that hard-code
>> > paths. Profile isolation was a new feature in 2.3.0 described in the
>> > FAQ:
>> >
>> >> Leiningen supports isolating different profiles by their target
>> >> directory. Simply specify `:target-path "target/%s"` in order to have
>> >> each profile set use a different directory for generated files. Then
>> >> you
>> >> can put your `:aot` settings in the `:uberjar` profiles, and the .class
>> >> files created from the AOT process will not affect normal development
>> >> use. You can specify the profile-isolated `:target-path` in your
>> >> `:user`
>> >> profile if you want it applied across all the projects you work on.
>> >
>> > I still recommend using profile isolation since it helps avoid a number
>> > of subtle gotchas around stale AOT files and user-level dependencies
>> > being visible with downstream consumers, but you now have to opt-in to
>> > this feature by setting :target-path as described above.
>> >
>> > We've also fixed a bug where setting :main without setting :aot would no
>> > longer implicitly compile the :main namespace. It's still recommended to
>> > be explicit about what :aot you need, (in the :uberjar profile if
>> > applicable) but the old behaviour has been restored.
>> >
>> > You'll also want to add a .gitignore entry for 

Re: NotSerializableException clojure.core.Vec

2013-08-21 Thread Jim - FooBar();

Ok found where the problem was...

In order to get unboxed ints I used (vector-of :int ...) which returns a 
clojure.core.Vec object. That object is not serializable (I looked at 
the source) and therefore I am getting this exception...Is there a 
reason why these objects are not serializable?


Jim


On 20/08/13 20:17, Jim - FooBar(); wrote:

Hi all,

I've a rather strange problem...I know that all clojure collections 
implement Serializable but when I try to use standard Java 
serialization on a vector of records I get this exception:


/NotSerializableException clojure.core.Vec 
java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1180)/


observe this:

Clondie24.games.chess=> (ut/serialize! @current-chessItems "DELETE")
*
**NotSerializableException clojure.core.Vec 
java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1180)*

Clondie24.games.chess=> (class @current-chessItems)
clojure.lang.PersistentVector
Clondie24.games.chess=> (ut/serialize! [:A :B :C :D] "DELETE") *;;SUCCESS*
nil
Clondie24.games.chess=> (first @current-chessItems)
#Clondie24.games.chess.ChessPiece{:image 
#Clondie24.games.chess$starting_chessItems$fn__12387$fn__12388@2a6446c9>, 
:position [0 0], :rank rook, :value 5, :direction 1}

Clondie24.games.chess=> (ut/serialize! *1 "DELETE2")

NotSerializableException clojure.core.Vec 
java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1180)
Clondie24.games.chess=> (ut/serialize! (dissoc *1 :image) "DELETE3") 
;;MAYBE THE FUNCTION IS TO BLAME


NotSerializableException clojure.core.Vec 
java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1180)

Clondie24.games.chess=> *1
#Clondie24.games.chess.ChessPiece{:image 
#Clondie24.games.chess$starting_chessItems$fn__12387$fn__12388@2a6446c9>, 
:position [0 0], :rank rook, :value 5, :direction 1}
Clondie24.games.chess=> (ut/serialize! (dissoc *1 :position) 
"DELETE3") *;;SUCCESS*

nil
Clondie24.games.chess=> (class (get *2 :position))
clojure.core.Vec


it seems to me that the [:position [0 0]] slot in the record is 
causing the problems because it is a Vec and not a Vector...but then 
this is my defrecord definition:


(defrecord ChessPiece [ image ;;not really an image but a fn that 
fetches the image

   ^clojure.lang.PersistentVector position
rank ^long value direction]
 core/Piece
 ...
 ...   )

any ideas? should I not have type hinted the record?

thanks in advance for your time :)

Jim






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

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


ANN: ClojureScript 0.0-1859

2013-08-21 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code.

README and source code: https://github.com/clojure/clojurescript

New release version: 0.0-1859

Leiningen dependency information:

[org.clojure/clojurescript "0.0-1859"]

*Changes: *
* nth should only work in ISeq not Seqable
* bump tools.reader to 0.7.6

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


Re: Entwined STM V1.0

2013-08-21 Thread Ivan Koblik
I have done the benchmarks and optimized the implementation. On my PC with 
the new changes TransactionalMap is up to 5 times slower than 
ConcurrentHashMap. You can find the benchmarks here:

https://github.com/CERN-BE/Entwined-STM/blob/master/src/test/java/cern/entwined/demo/clojure_benchmarks.clj

Just require the namespace and run either (time (run-concurrent-map)) 
or (time (run-transactional-map)).

Please note while ConcurrentHashMap is faster in this test it does not give 
same guarantees as the TransactionalMap. For example in the benchmarks I 
created 1 thread per key that is being incremented if there was more than 1 
thread updating the same key than ConcurrentHashMap wouldn't be suitable 
any more.

I will release the improved new version 1.0.1 later this week.

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


Re: Two Way DOM binding in clojurescript

2013-08-21 Thread Wei Hsu
Maybe try out cljs-binding , 
or angular extensions like clang  or 
purnam .

On Thursday, June 14, 2012 2:47:15 PM UTC+8, Murtaza Husain wrote:
>
> Hi,
>
> I would like to data in atoms to DOM elements in clojurescript. Are there 
> any examples out there that demonstrate this ? 
>
> Something like what knockout.js or angular.js provide. 
>
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: as-> macro enhancement request?

2013-08-21 Thread Greg
> Your example could be written:
> 
> (-> foo
>bar
>(baz quuz)
>blah)

That misses the point of having a generic threading macro.

> But I suspect you meant something like this:
> 
> (-> foo
>bar
>(as-> <> (baz whiz <> quuz))
>blah)

That's ugly.

>> Would love it if as-> allowed removing unnecessary characters, this way:
>> 
>> (as-> <> foo
>> bar
>> (baz <> quux)
>> blah)
>> 
>> 
>> Anyway, very minor quibble, just putting it out there.

+1

- Greg

--
Please do not email me anything that you are not comfortable also sharing with 
the NSA.

On Aug 20, 2013, at 10:22 PM, Sean Corfield  wrote:

> Your example could be written:
> 
> (-> foo
>bar
>(baz quuz)
>blah)
> 
> But I suspect you meant something like this:
> 
> (-> foo
>bar
>(as-> <> (baz whiz <> quuz))
>blah)
> 
> In other words, you use as-> with -> for just those cases where you
> need something that isn't in the first or last argument position.
> 
> That's why it's (as-> expr name & forms) with the expression in the
> first argument position.
> 
> Sean
> 
> 
> 
> On Tue, Aug 20, 2013 at 6:52 PM, Ken Restivo  wrote:
>> I like the as-> macro, mostly because it'd theoretically obviate the need to 
>> include the Swiss Arrows library anymore.
>> 
>> There's one reason why I keep going back to Swiss Arrows though: the ability 
>> to include single-arg functions in the chain that do not have the explicit 
>> token.
>> 
>> i.e. in Swiss Arrows, I can do:
>> 
>> (-<> foo
>> bar
>> (baz <> quux)
>> blah)
>> 
>> Note, it's clean and simple, no need for a bunch of noise and <>'s where not 
>> needed, only when calling functions with arity > 1.
>> 
>> But with as->, I have to do:
>> 
>> (as-> <> foo
>> (bar <>)
>> (baz <> quux)
>> (blah <>))
>> 
>> And that just seems unnecessarily noisy to me.
>> 
>> 
>> Would love it if as-> allowed removing unnecessary characters, this way:
>> 
>> (as-> <> foo
>> bar
>> (baz <> quux)
>> blah)
>> 
>> 
>> Anyway, very minor quibble, just putting it out there.
>> 
>> Thanks.
>> 
>> -ken
>> 
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with your 
>> first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



signature.asc
Description: Message signed with OpenPGP using GPGMail