core.logic API confusion

2014-06-09 Thread JD
When I try to use core.logic's fact function I am getting a symbol not found 
error.  What is the idiomatic way to do something like:

(logic/fact Orbits :mercury :sun)

Orbits here was previously bound in a defrel, which I ended up replacing with 
pldb/db-rel. 

*example from Joy of Clojure's (2nd ed.) chapter on core.logic. 

-- 
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/d/optout.


Re: clj-commons-exec/sh adding newline to command

2014-06-09 Thread Ray Miller
On 9 June 2014 02:03, gvim  wrote:
> (ns gh1.tmp
>   (:require [clj-commons-exec :as exec]
> [clj-time.core :as t]))
>
> 
>
> (defn calc [day month year hour min sec zone]
>   (let [bin "/Users/zephyr/html/astro/bin/swetest"
> data (str "-p0123456789t -fPZl -b" day "." month "." year " -ut"
> hour ":" min)
> flags "-roundmin -head -true -eswe"]
> (exec/sh [bin data flags])))
>
>
> gh1.tmp> @(calc 31 11 1967 16 45 0 "Europe/London")
> {:exit 1, :out "illegal option -roundmin -head -true -eswe\n", :err nil,
> :exception # Process exited with an error: 1 (Exit value: 1)>}
>
>
> Why has exec/sh added a newline to the command line? How to get rid of it?

It hasn't. That is the output from the command you executed.

Ray.

-- 
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/d/optout.


Re: clj-commons-exec/sh adding newline to command

2014-06-09 Thread gvim

Then why does this work when executed manually in the shell?

./swetest  -p0123456789t  -fPZl  -b14.10.1960  -ut13:45  -roundmin 
-head  -true  -eswe


gvim


On 09/06/2014 08:21, Ray Miller wrote:

On 9 June 2014 02:03, gvim  wrote:

(ns gh1.tmp
   (:require [clj-commons-exec :as exec]
 [clj-time.core :as t]))



(defn calc [day month year hour min sec zone]
   (let [bin "/Users/zephyr/html/astro/bin/swetest"
 data (str "-p0123456789t -fPZl -b" day "." month "." year " -ut"
hour ":" min)
 flags "-roundmin -head -true -eswe"]
 (exec/sh [bin data flags])))


gh1.tmp> @(calc 31 11 1967 16 45 0 "Europe/London")
{:exit 1, :out "illegal option -roundmin -head -true -eswe\n", :err nil,
:exception #}


Why has exec/sh added a newline to the command line? How to get rid of it?


It hasn't. That is the output from the command you executed.

Ray.



--
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/d/optout.


Re: clj-commons-exec/sh adding newline to command

2014-06-09 Thread Ray Miller
On 9 June 2014 12:39, gvim  wrote:
> Then why does this work when executed manually in the shell?
>
> ./swetest  -p0123456789t  -fPZl  -b14.10.1960  -ut13:45  -roundmin -head
> -true  -eswe

I suspect exec/sh is expecting a list of options. The way you are
calling it, swetest is called with only two arguments (data and
flags). When you type the command at the shell, the shell splits on
whitespace before invoking exec, so it sees 8 arguments.

I would expect this to work:

(exec/sh ["/Users/zephyr/html/astro/bin/swetest" "-p0123456789t"
"-fPZl"  "-b14.10.1960"  "-ut13:45"  "-roundmin" "-head"  "-true"
"-eswe"])

Ray.

-- 
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/d/optout.


Re: Use Nodejs modules in Clojurescript code that targets browsers?

2014-06-09 Thread Linus Ericsson
Yes, by using externs:

http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html

A bit dated, but I think this is still the way to go!

/Linus


2014-06-08 6:36 GMT+02:00 Gabrien :

> Is there any way to use nodejs modules (the browserifiable ones) in
> Clojurescript code that targets browsers?
> AutoSaved textareas
> Restored textareas
> Cleared AutoSaved data
> AutoSaved textarea data available
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


New Functional Programming Job Opportunities

2014-06-09 Thread Functional Jobs
Here are some functional programming job opportunities that were posted

recently:



Sr. Software Engineer at Clutch Analytics

http://functionaljobs.com/jobs/8720-sr-software-engineer-at-clutch-analytics



Cheers,

Sean Murphy

FunctionalJobs.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 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/d/optout.


Re: clj-commons-exec/sh adding newline to command

2014-06-09 Thread gvim

On 09/06/2014 14:04, Ray Miller wrote:


I suspect exec/sh is expecting a list of options. The way you are
calling it, swetest is called with only two arguments (data and
flags). When you type the command at the shell, the shell splits on
whitespace before invoking exec, so it sees 8 arguments.

I would expect this to work:

(exec/sh ["/Users/zephyr/html/astro/bin/swetest" "-p0123456789t"
"-fPZl"  "-b14.10.1960"  "-ut13:45"  "-roundmin" "-head"  "-true"
"-eswe"])

Ray.



Got it. Thanks very much.

gvim

--
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/d/optout.


Re: ClojureScript & Clojure 1.6.0

2014-06-09 Thread Karsten Schmidt
Hi David, this is great! I've switched to this branch, updated all hashing
impls of deftypes in my library and it works without a hitch and see much
less hash collisions in large 3d meshes as a result. Awesome!

K.
On 8 Jun 2014 18:07, "David Nolen"  wrote:

> 1.6.0 branch is ready to be tested
> http://github.com/clojure/clojurescript/tree/1.6.0, please give it a try
> in your projects. You can install this version of ClojureScript by
>
> * checking out the repo
> * git checkout 1.6.0
> * ./script/install
>
> Take note of the version number that gets installed into your local Maven.
> Use this in version number in your project.
>
> David
>
>
> On Fri, Jun 6, 2014 at 10:43 AM, David Nolen 
> wrote:
>
>> Future releases of ClojureScript will have a hard dependency on Clojure
>> 1.6.0. If you have any objections, speak up now :)
>>
>> David
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Clojure Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to clojure-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojure-dev.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/d/optout.


Re: ClojureScript & Clojure 1.6.0

2014-06-09 Thread David Nolen
That's great to hear, the feedback is much appreciated.

David

On Mon, Jun 9, 2014 at 1:06 PM, Karsten Schmidt  wrote:
> Hi David, this is great! I've switched to this branch, updated all hashing
> impls of deftypes in my library and it works without a hitch and see much
> less hash collisions in large 3d meshes as a result. Awesome!
>
> K.
>
> On 8 Jun 2014 18:07, "David Nolen"  wrote:
>>
>> 1.6.0 branch is ready to be tested
>> http://github.com/clojure/clojurescript/tree/1.6.0, please give it a try in
>> your projects. You can install this version of ClojureScript by
>>
>> * checking out the repo
>> * git checkout 1.6.0
>> * ./script/install
>>
>> Take note of the version number that gets installed into your local Maven.
>> Use this in version number in your project.
>>
>> David
>>
>>
>> On Fri, Jun 6, 2014 at 10:43 AM, David Nolen 
>> wrote:
>>>
>>> Future releases of ClojureScript will have a hard dependency on Clojure
>>> 1.6.0. If you have any objections, speak up now :)
>>>
>>> David
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Clojure Dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure-dev+unsubscr...@googlegroups.com.
>> To post to this group, send email to clojure-...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/clojure-dev.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Clojure Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to clojure-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojure-dev.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/d/optout.


Clojure Contributor Agreement process update

2014-06-09 Thread Alex Miller
Starting today, we have updated the Clojure Contributor Agreement process.
The prior process which involved signing and mailing a form has been
replaced with an online e-signing process.

Existing contributors that have signed the Contributor Agreement are
unaffected - those agreements are still in effect. New signers will use the
online process.

Information has been updated at:
http://clojure.org/contributing

As always, we welcome your contributions to the Clojure community and hope
that we can continue to improve Clojure together!

- Alex Miller, Rich Hickey, and the Clojure team

-- 
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/d/optout.


Re: Clojure Contributor Agreement process update

2014-06-09 Thread Michael Klishin
2014-06-09 21:23 GMT+04:00 Alex Miller :

> Starting today, we have updated the Clojure Contributor Agreement process.
> The prior process which involved signing and mailing a form has been
> replaced with an online e-signing process.


\o/
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
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/d/optout.


ANN metrics-clojure 2.0.3

2014-06-09 Thread Michael Klishin
metrics-clojure [1] is a Clojure interface to the Metrics library [2].

2.0.3 is a bug fix release:
https://github.com/sjl/metrics-clojure/blob/stable/ChangeLog.md#changes-between-202-and-203

If you are not sure why gathering metrics about your apps and infrastructure
is a big deal, consider watching [3].

1. https://github.com/sjl/metrics-clojure
2. http://metrics.codahale.com/
3. http://www.youtube.com/watch?v=czes-oa0yik
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
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/d/optout.


Re: Clojure Contributor Agreement process update

2014-06-09 Thread Plínio Balduino
\o/

On Mon, Jun 9, 2014 at 3:34 PM, Michael Klishin
 wrote:
> 2014-06-09 21:23 GMT+04:00 Alex Miller :
>
>> Starting today, we have updated the Clojure Contributor Agreement process.
>> The prior process which involved signing and mailing a form has been
>> replaced with an online e-signing process.
>
>
> \o/
> --
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>
> --
> 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/d/optout.

-- 
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/d/optout.


Re: Clojure Contributor Agreement process update

2014-06-09 Thread Andrey Antukh
Very nice! \o/


2014-06-09 20:57 GMT+02:00 Plínio Balduino :

> \o/
>
> On Mon, Jun 9, 2014 at 3:34 PM, Michael Klishin
>  wrote:
> > 2014-06-09 21:23 GMT+04:00 Alex Miller :
> >
> >> Starting today, we have updated the Clojure Contributor Agreement
> process.
> >> The prior process which involved signing and mailing a form has been
> >> replaced with an online e-signing process.
> >
> >
> > \o/
> > --
> > MK
> >
> > http://github.com/michaelklishin
> > http://twitter.com/michaelklishin
> >
> > --
> > 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/d/optout.
>
> --
> 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/d/optout.
>



-- 
Andrey Antukh - Андрей Антух -  / 
http://www.niwi.be 
https://github.com/niwibe

-- 
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/d/optout.


Available for Contracting

2014-06-09 Thread Allen Rohner
I hope this isn't frowned upon here, but here goes. 

I'm looking for freelance work while I figure out my next startup. Until 
recently, I was Founder & CTO of a startup of 10 engineers, the product is 
100% Clojure (except for the UI, which was transitioning from Coffeescript 
to Clojurescript). I've been using Clojure full-time since 2009, and have 
commits in clojure core, contrib, lein, ring, compojure and many other 
libraries. I've talked at Clojure/West twice. 

Other skills:  
- strong understanding of linux internals & ops. I've shipped kernel 
modules and built production AWS clusters of hundreds of machines. 
- can ship functional, but ugly frontend 
code ({java,coffee,clojure}script) . 
- proficient, but rusty in: C, C++, Python, Ruby, Java
- machine learning background

If you're interested, please contact me at aroh...@gmail.com 

Thanks,
Allen



  

-- 
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/d/optout.


Re: [ANN] Clojure cheatsheet with search capability

2014-06-09 Thread Andy Fingerhut
On Mon, Jun 2, 2014 at 6:54 AM, John Gabriele  wrote:

> On Sunday, June 1, 2014 5:15:52 PM UTC-4, Andy Fingerhut wrote:
>>
>> Thanks to Francois du Toit, the versions of the Clojure cheatsheet
>> available at the link below now have the ability to let you search for all
>> symbols beginning with a string you type in, with color highlighting of
>> matches.
>>
>> http://jafingerhut.github.io
>>
>>
> Oooh, that's nifty. Removes blocks with no results too. And I see that it
> actually searches for string anywhere in the function name (not just at the
> beginning). Thanks Francois and Andy!
>
> One minor thing: if a search string doesn't turn up any results at all, it
> would be nice if it turned red in the search field to indicate so.
>
> -- John
>

This 'turn search box red if there are no matches' functionality has been
implemented.

Also, before today searching would only find matches at the beginning of a
whole "word" in a symbol, e.g. typing "last" would find "last" and
"but-last", because the "last" in "but-last" had a hyphen before it, but it
would not highlight "butlast".  Now it will highlight all of those.

Andy

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


A drawback of the less-parentheses approach

2014-06-09 Thread Taegyoon Kim
I once liked the Clojure's less-parentheses approach.
 
Today I found that you can't utilize s-expression comments easily in 
Clojure.
 
e.g.
In
(let [x 1 y 2] x)
When you are about to comment out the "y 2" part, you have to move the 
cursor back and forth to insert new parentheses.
 
And you can't do this:
user=> (let [x 1 (comment y 2)] x)
 
IllegalArgumentException let requires an even number of forms in binding 
vector
in user:1  clojure.core/let (core.clj:4043)
 
(comment) in Clojure is not really comment. It returns nil. 
http://clojuredocs.org/clojure_core/clojure.core/comment
 
vs.
 
You can do this in Racket:
> (let ([x 1] #;[y 2]) x)
1
 
#; is s-expression comment in Racket.
 
Parentheses are there to group logically related things together.
 

-- 
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/d/optout.


Re: bigint and biginteger

2014-06-09 Thread Plínio Balduino
Thank you, Mark and Mike

Awesome explanation and examples

Plínio

On Sat, Jun 7, 2014 at 8:46 AM, Mike Fikes  wrote:
> Thanks for the historical perspective, puzzler!
>
> In addition to performance considerations, Clojure Programming points to an
> inconsistency between hash codes for longs and BigIntegers as a motivation.
>
> Using the example number from that excellent book on Clojure 1.5.1 (on Java
> 8, FWIW), I can cause this:
>
> #{6948736584 (biginteger 6948736584)}
>
> ; => #{6948736584 6948736584}
>
>
> #{6948736584 (bigint 6948736584)}
>
> ; => IllegalArgumentException Duplicate key: 6948736584
> clojure.lang.PersistentHashSet.createWithCheck (PersistentHashSet.java:56)
>
>
> (System/getProperty "java.version")
>
> ; => "1.8.0_05"
>
>
> (clojure-version)
>
> ; => "1.5.1"
>
>
> On Clojure 1.6, thankfully both fail, even in the face of the inconsistency
> between .hashCode implementations. If that essentially addresses the 2nd
> rationale for introducing a special BigInt class, maybe with both things
> being fixed with Java 8 and Clojure 1.6 BigInteger could come back as the
> sole arbitrary precision representation of ℤ.
>
> --
> 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/d/optout.

-- 
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/d/optout.


Re: A drawback of the less-parentheses approach

2014-06-09 Thread guns
On Mon  9 Jun 2014 at 07:07:42PM -0700, Taegyoon Kim wrote:
> And you can't do this:
> user=> (let [x 1 (comment y 2)] x)

Alex Miller (?) once pointed out that the #_ reader macro can be chained
like this:

(let [x 1 #_#_y 2] x)

Pretty nifty.

guns


pgpn7C26ipuE0.pgp
Description: PGP signature


Re: A drawback of the less-parentheses approach

2014-06-09 Thread Sean Corfield
On Jun 9, 2014, at 7:07 PM, Taegyoon Kim  wrote:
> And you can't do this:
> user=> (let [x 1 (comment y 2)] x)

You can, however, do this:

user=> (let [x 1 #_(y 2)] x)

and this:

user=> (let [x 1 #_y #_2] x)

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

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





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: A drawback of the less-parentheses approach

2014-06-09 Thread Taegyoon Kim
Ah, reader macro! Thanks!
 
Ignore next form (#_)
The form following #_ is completely skipped by the reader. (This is a more 
complete removal than the *comment* 
 
macro which yields nil).
 
(from *http://clojure.org/reader* )
 
Conclusion: Don't use the *comment* 
 
macro. It makes runtime overhead.
 

2014년 6월 10일 화요일 오후 12시 22분 50초 UTC+9, guns 님의 말:

> On Mon  9 Jun 2014 at 07:07:42PM -0700, Taegyoon Kim wrote: 
> > And you can't do this: 
> > user=> (let [x 1 (comment y 2)] x) 
>
> Alex Miller (?) once pointed out that the #_ reader macro can be chained 
> like this: 
>
> (let [x 1 #_#_y 2] x) 
>
> Pretty nifty. 
>
> guns 
>

-- 
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/d/optout.


Re: ClojureScript & Clojure 1.6.0

2014-06-09 Thread Yehonathan Sharvit


I have compilation warnings related to core.async. Here is the log:

Compiling "resources/public/js/main.js" from ["src/cljs"]...
Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: 
/Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async.js:127: 
WARNING - unreachable code
{return null;
^

Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: 
/Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async.js:178: 
WARNING - unreachable code
{return null;
^

Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: 
/Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async.js:420: 
WARNING - unreachable code
{return null;
^

Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: 
/Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async/impl/ioc_helpers.js:353:
 WARNING - unreachable code
{return null;
^

Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager 
printSummary
WARNING: 0 error(s), 4 warning(s)

On Monday, 9 June 2014 20:07:48 UTC+3, David Nolen  wrote:
> That's great to hear, the feedback is much appreciated.
> 
> 
> 
> David
> 
> 
> 
> On Mon, Jun 9, 2014 at 1:06 PM, Karsten Schmidt  wrote:
> 
> > Hi David, this is great! I've switched to this branch, updated all hashing
> 
> > impls of deftypes in my library and it works without a hitch and see much
> 
> > less hash collisions in large 3d meshes as a result. Awesome!
> 
> >
> 
> > K.
> 
> >
> 
> > On 8 Jun 2014 18:07, "David Nolen"  wrote:
> 
> >>
> 
> >> 1.6.0 branch is ready to be tested
> 
> >> http://github.com/clojure/clojurescript/tree/1.6.0, please give it a try in
> 
> >> your projects. You can install this version of ClojureScript by
> 
> >>
> 
> >> * checking out the repo
> 
> >> * git checkout 1.6.0
> 
> >> * ./script/install
> 
> >>
> 
> >> Take note of the version number that gets installed into your local Maven.
> 
> >> Use this in version number in your project.
> 
> >>
> 
> >> David
> 
> >>
> 
> >>
> 
> >> On Fri, Jun 6, 2014 at 10:43 AM, David Nolen 
> 
> >> wrote:
> 
> >>>
> 
> >>> Future releases of ClojureScript will have a hard dependency on Clojure
> 
> >>> 1.6.0. If you have any objections, speak up now :)
> 
> >>>
> 
> >>> David
> 
> >>
> 
> >>
> 
> >> --
> 
> >> You received this message because you are subscribed to the Google Groups
> 
> >> "Clojure Dev" group.
> 
> >> To unsubscribe from this group and stop receiving emails from it, send an
> 
> >> email to clojure-dev+unsubscr...@googlegroups.com.
> 
> >> To post to this group, send email to clojure-...@googlegroups.com.
> 
> >> Visit this group at http://groups.google.com/group/clojure-dev.
> 
> >> For more options, visit https://groups.google.com/d/optout.
> 
> >
> 
> > --
> 
> > You received this message because you are subscribed to the Google Groups
> 
> > "Clojure Dev" group.
> 
> > To unsubscribe from this group and stop receiving emails from it, send an
> 
> > email to clojure-dev+unsubscr...@googlegroups.com.
> 
> > To post to this group, send email to clojure-...@googlegroups.com.
> 
> > Visit this group at http://groups.google.com/group/clojure-dev.
> 
> > For more options, visit https://groups.google.com/d/optout.

-- 
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/d/optout.


Re: A drawback of the less-parentheses approach

2014-06-09 Thread Alex Miller
The only place I've found the comment macro to be useful is at the 
top-level of a ns to hold a bunch of test/temp code.

On Monday, June 9, 2014 11:22:10 PM UTC-5, Taegyoon Kim wrote:
>
> Ah, reader macro! Thanks!
>  
> Ignore next form (#_)
> The form following #_ is completely skipped by the reader. (This is a more 
> complete removal than the *comment* 
>  
> macro which yields nil).
>  
> (from *http://clojure.org/reader* )
>  
> Conclusion: Don't use the *comment* 
>  
> macro. It makes runtime overhead.
>  
>
> 2014년 6월 10일 화요일 오후 12시 22분 50초 UTC+9, guns 님의 말:
>
>> On Mon  9 Jun 2014 at 07:07:42PM -0700, Taegyoon Kim wrote: 
>> > And you can't do this: 
>> > user=> (let [x 1 (comment y 2)] x) 
>>
>> Alex Miller (?) once pointed out that the #_ reader macro can be chained 
>> like this: 
>>
>> (let [x 1 #_#_y 2] x) 
>>
>> Pretty nifty. 
>>
>> guns 
>>
>

-- 
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/d/optout.


Re: Available for Contracting

2014-06-09 Thread Alex Miller
Re the initial implicit question about appropriateness...

In my opinion, my opinion is that this group is for Clojurists to discuss 
things of interest to Clojurists. Postings for Clojure jobs or Clojure 
skills for hire fits into that category. At the present moment, the 
frequency of such posts seems tolerable. If something truly spammy leaks 
through the filters, I usually catch it and take the appropriate action 
(ie. death by a thousand Java classes).

If the frequency becomes an issue, then at some future date we could split 
job/hiring traffic into another group. I sincerely hope that is a problem 
we will have. :) 

(By contrast, clojure-dev is a far more focused list - only Clojure 
ticket/development work is ok there.)

Alex


On Monday, June 9, 2014 2:56:26 PM UTC-5, Allen Rohner wrote:
>
> I hope this isn't frowned upon here, but here goes. 
>
> I'm looking for freelance work while I figure out my next startup. Until 
> recently, I was Founder & CTO of a startup of 10 engineers, the product is 
> 100% Clojure (except for the UI, which was transitioning from Coffeescript 
> to Clojurescript). I've been using Clojure full-time since 2009, and have 
> commits in clojure core, contrib, lein, ring, compojure and many other 
> libraries. I've talked at Clojure/West twice. 
>
> Other skills:  
> - strong understanding of linux internals & ops. I've shipped kernel 
> modules and built production AWS clusters of hundreds of machines. 
> - can ship functional, but ugly frontend 
> code ({java,coffee,clojure}script) . 
> - proficient, but rusty in: C, C++, Python, Ruby, Java
> - machine learning background
>
> If you're interested, please contact me at aro...@gmail.com  
>
> Thanks,
> Allen
>
>
>
>   
>
>

-- 
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/d/optout.


[ANN] Leiningen 2.4.0

2014-06-09 Thread Phil Hagelberg

Greetings!

I'm pleased to announce the release of Leiningen 2.4.0, our most
significant release in quite some time. The star of the show is the new
`release` task, which can automate all the common steps behind the
release of a new version of a library.

The idea is that `lein release` will run a series of tasks you've
specified as release steps. This defaults to running the equivalent of
these commands:

* lein vcs assert-committed
* lein change version leiningen.release/bump-version release
* lein vcs commit
* lein vcs tag
* lein deploy
* lein change version leiningen.release/bump-version patch
* lein vcs commit
* lein vcs push

The `vcs` and `change` tasks are also new. The `vcs` subtasks above are
self-explanatory, but the `change` task allows for programmatic
modification of any given key in defproject using an arbitrary function,
without altering formatting or comments. Out of the box we ship a
function to bump version numbers, but you can call functions from
plugins, and we hope to add more built-in functions in future releases.

Note that the release task runs `lein deploy` rather than `lein deploy
clojars`; this is in order to prevent accidental deploys of private
artifacts to Clojars. In order to deploy an open source library to
Clojars it's necessary to add `:deploy-repositories {"releases" :clojars}`
to your project.clj file.

Other highlights include fixes to the search task to report index
download progress, improved multi-field queries, and the default to make
useful uberjars even when not AOTing a -main function.

A full list of significant changes:

* Allow aliases to splice in values from the project map. (Phil Hagelberg)
* Allow plugins to override built-in tasks. (Phil Hagelberg)
* Add `release` task for automating common release steps. (Wayne Warren, Chris 
Truter, Phil Hagelberg)
* Add `change` task for programmatc `project.clj` manipulation. (Chris Truter, 
Max Barnash)
* Abort when `defproject` contains duplicate keys. (Peter Garbers)
* Add `vcs` task to automate version control. (Phil Hagelberg, Wayne Warren)
* Automatically `clean` before `deploy` to avoid AOT in libraries. (Phil 
Hagelberg)
* Emit warnings to stderr. (Andy Chambers)
* Use `clojure.main` for uberjars that don't declare their own `:main`. (Phil 
Hagelberg)
* Allow templates to load from `:plugin-repositories`. (Phil Hagelberg)
* Fix a race condition on printing during dependency resolution. (Phil 
Hagelberg)
* Allow `new` templates to operate on existing directories with `--force` 
option. (Matthew Blair)
* Fix `search` task to allow queries on multiple fields. (Colin Jones)
* Fix a bug where errors in `run` task were mis-reported. (Gary Fredericks)
* Report download progress of search indices. (Matthew Blair)
* Protection from harmful `:clean-targets` settings. (Craig McDaniel)
* Faster loading of help text. (David Grayson, Ryan Mulligan)
* Add `LEIN_SILENT` option to suppress `*info*` output. (Phil Hagelberg)

As usual, for those who manually installed `lein upgrade` will pull in
the latest, and `lein upgrade 2.3.4` will back it down to the previous
version if you run into any issues.

Thanks to all the contributors who made this happen!

-Phil

ps. The Clojars artifacts for this release are still pending
investigation of some deploy issues, but they should be right around the
corner.



pgpjyY0CkC4lA.pgp
Description: PGP signature


Re: [ClojureScript] Re: ClojureScript & Clojure 1.6.0

2014-06-09 Thread David Nolen
Looks like new warnings from the Closure Compiler - something for
core.async to address. Thanks for the report!

David

On Tue, Jun 10, 2014 at 12:55 AM, Yehonathan Sharvit  wrote:
>
>
> I have compilation warnings related to core.async. Here is the log:
>
> Compiling "resources/public/js/main.js" from ["src/cljs"]...
> Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager 
> println
> WARNING: 
> /Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async.js:127:
>  WARNING - unreachable code
> {return null;
> ^
>
> Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager 
> println
> WARNING: 
> /Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async.js:178:
>  WARNING - unreachable code
> {return null;
> ^
>
> Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager 
> println
> WARNING: 
> /Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async.js:420:
>  WARNING - unreachable code
> {return null;
> ^
>
> Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager 
> println
> WARNING: 
> /Users/viebel/libs/klozzer/target/cljsbuild-compiler-0/cljs/core/async/impl/ioc_helpers.js:353:
>  WARNING - unreachable code
> {return null;
> ^
>
> Jun 10, 2014 7:49:49 AM com.google.javascript.jscomp.LoggerErrorManager 
> printSummary
> WARNING: 0 error(s), 4 warning(s)
>
> On Monday, 9 June 2014 20:07:48 UTC+3, David Nolen  wrote:
>> That's great to hear, the feedback is much appreciated.
>>
>>
>>
>> David
>>
>>
>>
>> On Mon, Jun 9, 2014 at 1:06 PM, Karsten Schmidt  wrote:
>>
>> > Hi David, this is great! I've switched to this branch, updated all hashing
>>
>> > impls of deftypes in my library and it works without a hitch and see much
>>
>> > less hash collisions in large 3d meshes as a result. Awesome!
>>
>> >
>>
>> > K.
>>
>> >
>>
>> > On 8 Jun 2014 18:07, "David Nolen"  wrote:
>>
>> >>
>>
>> >> 1.6.0 branch is ready to be tested
>>
>> >> http://github.com/clojure/clojurescript/tree/1.6.0, please give it a try 
>> >> in
>>
>> >> your projects. You can install this version of ClojureScript by
>>
>> >>
>>
>> >> * checking out the repo
>>
>> >> * git checkout 1.6.0
>>
>> >> * ./script/install
>>
>> >>
>>
>> >> Take note of the version number that gets installed into your local Maven.
>>
>> >> Use this in version number in your project.
>>
>> >>
>>
>> >> David
>>
>> >>
>>
>> >>
>>
>> >> On Fri, Jun 6, 2014 at 10:43 AM, David Nolen 
>>
>> >> wrote:
>>
>> >>>
>>
>> >>> Future releases of ClojureScript will have a hard dependency on Clojure
>>
>> >>> 1.6.0. If you have any objections, speak up now :)
>>
>> >>>
>>
>> >>> David
>>
>> >>
>>
>> >>
>>
>> >> --
>>
>> >> You received this message because you are subscribed to the Google Groups
>>
>> >> "Clojure Dev" group.
>>
>> >> To unsubscribe from this group and stop receiving emails from it, send an
>>
>> >> email to clojure-dev+unsubscr...@googlegroups.com.
>>
>> >> To post to this group, send email to clojure-...@googlegroups.com.
>>
>> >> Visit this group at http://groups.google.com/group/clojure-dev.
>>
>> >> For more options, visit https://groups.google.com/d/optout.
>>
>> >
>>
>> > --
>>
>> > You received this message because you are subscribed to the Google Groups
>>
>> > "Clojure Dev" group.
>>
>> > To unsubscribe from this group and stop receiving emails from it, send an
>>
>> > email to clojure-dev+unsubscr...@googlegroups.com.
>>
>> > To post to this group, send email to clojure-...@googlegroups.com.
>>
>> > Visit this group at http://groups.google.com/group/clojure-dev.
>>
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> Note that posts from new members are moderated - please be patient with your 
> first post.
> ---
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
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/d/optout.