Re: [Large File Processing] What am I doing wrong?

2014-01-26 Thread danneu
I use line-seq, split, and destructuring to parse large CSVs.

Here's how I'd approach what I think you're trying to do:

(with-open [rdr (io/reader (io/resource csv :encoding "UTF-16"))]
(let [extract-url-hash (fn [line]
 (let [[_ _ _ url & _] (str/split line 
#"\t")]
   [(m/md5 url) url]))]
  (->> (drop 1 (line-seq rdr))
   (map extract-url-hash)
   (into {}

https://gist.github.com/danneu/8644022

On Tuesday, January 21, 2014 12:55:00 AM UTC-6, Jarrod Swart wrote:
>
> I'm processing a large csv with Clojure, honestly not even that big (~18k 
> rows, 11mb).  I have a list of exported data from a client and I am 
> de-duplicating URLs within the list.  My final output is a series of 
> vectors: [url url-hash].
>
> The odd thing is how slow it seems to be going.  I have tried implementing 
> this as a reduce, and finally I thought to speed things up I might try a 
> "with-open and a loop-recur".  It doesn't seem to have done much in my 
> case.  I know I am doing something wrong I'm just not sure what yet.  The 
> best I can do is about 4 seconds, which may only seem slow because I 
> implemented it in python first and it takes a half second to finish.  Still 
> this is one of the smaller files I will likely deal with so I'm worried 
> that as the files grow it may get too slow.
>
> The code is here on ref-heap for easy viewing: 
> https://www.refheap.com/26098
>
> Any advice is appreciated.
>

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


need help reading blob column from oracle

2014-01-26 Thread bww00amd...@yahoo.com
ANyone have some examples reading a blob column from an oracle db.

We have a database with a blob column.
A entity can be split acroos multiple rows.
If there are multiple rows we need to read anc concatenate the rows into a 
single buffer
There may be multiple rows that we need to read to concatnate the blobs in 
this row set 

any help would be appreciated

Thanks
bryan

-- 
-- 
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: simple-check gen/boolean Only Returning false

2014-01-26 Thread Reid Draper
Thanks for reporting. This was introduced in 0.5.4, and I've pushed a fixed 
release as 0.5.6.

On Saturday, January 25, 2014 7:50:19 PM UTC-6, Jean Niklas L'orange wrote:
>
>
>
> On Saturday, January 25, 2014 10:03:13 PM UTC+1, Michael Daines wrote:
>>
>> I decided to play with simple-check for the first time and was working 
>> through the examples on github. I noticed that all the values that use 
>> gen/boolean are returning false. I never get a true.
>>
>> At the extreme end, the following never returns when run in the repl:
>>
>> (gen/sample (gen/such-that true? (gen/list gen/boolean)))
>>
>>
>> I'm using Clojure 1.5.1, simple-check 0.5.5, JVM 1.7.0_51, Ubuntu 13.04.
>>
>
> Yeah, you're correct that this is an error in 0.5.5; I traced down the 
> cause and sent in an issue which can be found here: 
> https://github.com/reiddraper/simple-check/issues/54.
>
> You can downgrade to simple-check 0.5.3 in the meantime – that version has 
> not the bug you encountered.
>
> -- JN
>

-- 
-- 
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: [ClojureScript] Re: ANN: Om 0.3.0

2014-01-26 Thread mynomoto
Thank you for this David. It's really amazing.

On Monday, January 27, 2014 1:19:03 AM UTC-2, David Nolen wrote:
> Glad to hear it. I recommend taking a look at the new section "Higher Order 
> Components" 
> http://github.com/swannodette/om/wiki/Tutorial#wiki-higher-order-components, 
> we're finally getting to the "good stuff" IMO :)
> 
> 
> 
> David
> 
> 
> 
> 
> 
> On Sun, Jan 26, 2014 at 9:59 PM, Jamie Orchard-Hays  wrote:
> 
> 
> :) Worked through the Om tutorial today. Thanks much, David. Good stuff. 
> 
> 
> 
> 
> 
> On Jan 26, 2014, at 8:54 PM, David Nolen  wrote:
> 
> Ah good point, I've clarified the tutorial.
> 
> 
> 
> 
> On Sun, Jan 26, 2014 at 8:40 PM, Ivan Kozik  wrote:
> 
> I'm not Jamie, but I had to read that a few times to realize "list and
> 
> 
> lazy sequences are not allowed" is another sentence, not a
> 
> continuation of the list of things that are allowed.
> 
> 
> 
> 
> 
> On Mon, Jan 27, 2014 at 1:35 AM, David Nolen  wrote:
> 
> > What is unclear?
> 
> >
> 
> >
> 
> > On Sun, Jan 26, 2014 at 5:08 PM, Jamie Orchard-Hays 
> 
> > wrote:
> 
> >>
> 
> >> David, there's a confusing sentence in the paragraph before the
> 
> >> om.core/root header:
> 
> >>
> 
> >> "Everything in the atom should be an associative data structure - either a
> 
> >> ClojureScript map or indexed sequential data structure such as a vector,
> 
> >> list and lazy sequences are not allowed."
> 
> >>
> 
> >>
> 
> >> On Jan 26, 2014, at 11:19 AM, mynomoto  wrote:
> 
> >>
> 
> >> > Hi wuqi...@gmail.com,
> 
> >> >
> 
> >> > You can just open the file. I got some blank pages when for some reason
> 
> >> > I wasn't able to reach fb.me. Check your Network tab in the developer 
> >> > tools.
> 
> >> >
> 
> >> > On Sunday, January 26, 2014 6:12:52 AM UTC-2, wuqi...@gmail.com wrote:
> 
> >> >> On Saturday, January 25, 2014 8:16:15 AM UTC+8, David Nolen wrote:
> 
> >> >>
> 
> >> >>> A few minor simplifications to the Om model in this release. A
> 
> >> >>> breaking change if you were using om.core/bind, om.core/pure-bind or
> 
> >> >>> om.core/read - these complications have been removed.
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>> There's also now a tutorial optimized for Light Table for people want
> 
> >> >>> to understand the Om approach to React without losing time cobbling 
> >> >>> together
> 
> >> >>> a working environment: http://github.com/swannodette/om/wiki/Tutorial
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>> Have fun!
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>>
> 
> >> >>
> 
> >> >>> David
> 
> >> >>
> 
> >> >>
> 
> >> >>
> 
> >> >> I following the tutorial. After I opened index.html, the page is empty
> 
> >> >> without any word. This is different from what said in the tutorial. 
> >> >> BTW, I
> 
> >> >> double clicked the index.html, and then chrome shows the page, is this 
> >> >> the
> 
> >> >> right way to open it or need to use some http://.../index.html after 
> >> >> start
> 
> >> >> some service?
> 
> >> >>
> 
> >> >>
> 
> >> >>
> 
> >> >> Once the build has succeeded open index.html in your favorite browser
> 
> >> >> (we recommend Google Chrome as it has excellent support for source 
> >> >> maps).
> 
> >> >> You should see an h1 tag with the text content Hello World! in it.
> 
> >> >
> 
> >> > --
> 
> >> > 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 clojurescrip...@googlegroups.com.
> 
> >> > To post to this group, send email to clojur...@googlegroups.com.
> 
> >> > Visit this group at http://groups.google.com/group/clojurescript.
> 
> >>
> 
> >> --
> 
> >> 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 clojurescrip...@googlegroups.com.
> 
> >> To post to this group, send email to clojur...@googlegroups.com.
> 
> >> Visit this group at http://groups.google.com/group/clojurescript.
> 
> >
> 
> >
> 
> > --
> 
> > 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 clojurescrip...@googlegroups.com.
> 
> > To post to this group, send email to clojur...@googlegroups.com.
> 
> > Visit this group at http://groups.google.com/group/clojurescript.
> 
> 
> 
> --
> 
> Note that posts from new members ar

Re: [ClojureScript] Re: ANN: Om 0.3.0

2014-01-26 Thread David Nolen
Glad to hear it. I recommend taking a look at the new section "Higher Order
Components"
http://github.com/swannodette/om/wiki/Tutorial#wiki-higher-order-components,
we're finally getting to the "good stuff" IMO :)

David


On Sun, Jan 26, 2014 at 9:59 PM, Jamie Orchard-Hays wrote:

> :) Worked through the Om tutorial today. Thanks much, David. Good stuff.
>
> On Jan 26, 2014, at 8:54 PM, David Nolen  wrote:
>
> Ah good point, I've clarified the tutorial.
>
>
> On Sun, Jan 26, 2014 at 8:40 PM, Ivan Kozik  wrote:
>
>> I'm not Jamie, but I had to read that a few times to realize "list and
>> lazy sequences are not allowed" is another sentence, not a
>> continuation of the list of things that are allowed.
>>
>> On Mon, Jan 27, 2014 at 1:35 AM, David Nolen 
>> wrote:
>> > What is unclear?
>> >
>> >
>> > On Sun, Jan 26, 2014 at 5:08 PM, Jamie Orchard-Hays > >
>> > wrote:
>> >>
>> >> David, there's a confusing sentence in the paragraph before the
>> >> om.core/root header:
>> >>
>> >> "Everything in the atom should be an associative data structure -
>> either a
>> >> ClojureScript map or indexed sequential data structure such as a
>> vector,
>> >> list and lazy sequences are not allowed."
>> >>
>> >>
>> >> On Jan 26, 2014, at 11:19 AM, mynomoto  wrote:
>> >>
>> >> > Hi wuqi...@gmail.com,
>> >> >
>> >> > You can just open the file. I got some blank pages when for some
>> reason
>> >> > I wasn't able to reach fb.me. Check your Network tab in the
>> developer tools.
>> >> >
>> >> > On Sunday, January 26, 2014 6:12:52 AM UTC-2, wuqi...@gmail.comwrote:
>> >> >> On Saturday, January 25, 2014 8:16:15 AM UTC+8, David Nolen wrote:
>> >> >>
>> >> >>> A few minor simplifications to the Om model in this release. A
>> >> >>> breaking change if you were using om.core/bind, om.core/pure-bind
>> or
>> >> >>> om.core/read - these complications have been removed.
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>> There's also now a tutorial optimized for Light Table for people
>> want
>> >> >>> to understand the Om approach to React without losing time
>> cobbling together
>> >> >>> a working environment:
>> http://github.com/swannodette/om/wiki/Tutorial
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>> Have fun!
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>>
>> >> >>
>> >> >>> David
>> >> >>
>> >> >>
>> >> >>
>> >> >> I following the tutorial. After I opened index.html, the page is
>> empty
>> >> >> without any word. This is different from what said in the tutorial.
>> BTW, I
>> >> >> double clicked the index.html, and then chrome shows the page, is
>> this the
>> >> >> right way to open it or need to use some http://.../index.htmlafter 
>> >> >> start
>> >> >> some service?
>> >> >>
>> >> >>
>> >> >>
>> >> >> Once the build has succeeded open index.html in your favorite
>> browser
>> >> >> (we recommend Google Chrome as it has excellent support for source
>> maps).
>> >> >> You should see an h1 tag with the text content Hello World! in it.
>> >> >
>> >> > --
>> >> > 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.
>> >>
>> >> --
>> >> 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.
>> >
>> >
>> > --
>> > 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.
>>
>> --
>> 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

Re: ANN: clojure-objc

2014-01-26 Thread Gal Dolber
I reimplemented the interop and its fully functional now.
Just download the last binary from https://github.com/galdolber/clojure-objc


On Sun, Jan 26, 2014 at 6:17 PM, Gal Dolber  wrote:

> That's a bug in the objc interop, the type detection is incomplete.
>
>
> https://github.com/galdolber/clojure-objc/blob/master/src/jvm/clojure/lang/Selector.java?source=c#L87
>
> The error you get is happening on arm64(iphone 5s or simulator 64bits), it
> should work on i386, armv7 and armv7s.
>
>
> On Sun, Jan 26, 2014 at 3:18 PM, PublicFarley wrote:
>
>> I got an error as posted in my 1:01 PM post below. I've uploaded my
>> source in case it helps. Basically it's your github sample code.
>>
>>
>> On Sunday, January 26, 2014 8:15:17 AM UTC-5, Gal Dolber wrote:
>>
>>> I added a better sample with a UINavigationController and a small uikit
>>> framework(very very alpha).
>>>
>>> https://github.com/galdolber/clojure-objc-sample/blob/
>>> master/src/clojure_objc_sample/core.clj
>>>
>>> Feedback and improvements on the uikit framework are very much welcome.
>>>
>>>
>>> On Sat, Jan 25, 2014 at 10:08 PM, PublicFarley wrote:
>>>
 Thanks for the quick reply Gal. Excellent advise. I never thought to do
 it that way. Need to stretch my thinking a bit... LOL.

 Yes your compilation technology could enable a lot of creative thinking
 around frameworks and libraries for iOS UI construction in Clojure. Much
 like the excitement and development in the RubyMotion community. I need to
 put my hard hat on and experiment more.

 Again thanks for the fabulous contribution.

 Kind Regards,
 publicfarley

 --
 --
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.

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

-- 
-- 
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: Helping newcomers get involved in Clojure projects

2014-01-26 Thread Timothy Washington
Hi Marcus,

Thanks for the offer of help. There's no mailing list yet. But I'll
certainly set that up, if need be.

Were you able to clone and start the system? The first thing I want to do
is make it easy to setup. So let me know what else you could use, in
addition to what's in the
Install/Runsection.
I'm currently trying to
*i)* improve starting stefon from a plugin (like the compojure
webui)
and *ii)* have a clean plugin configuration and loading mechanism.


Tim Washington
Interruptsoftware.com 


On Sat, Jan 25, 2014 at 6:35 PM, Marcus Blankenship
wrote:

> I'd love to help with Stefon.  I just forked it, and am trying to get it
> running.  Is there a mailing list for it?
>
>
> On Jan 25, 2014, at 12:41 PM, Timothy Washington 
> wrote:
>
> +1
>
> I need help building out Stefon 
>  and accompanying plugins .
>
>
> Tim Washington
> Interruptsoftware.com 
>
>
> On Sat, Jan 25, 2014 at 1:54 PM, Bridget wrote:
>
>> OpenHatch has this great 
>> initiativefor encouraging newcomers 
>> to get involved with open source projects. You
>> tag some issues in your bug tracker as "newcomer" or "easy". This provides
>> a gentle path into contributing. There is some work involved with this. You
>> have to do the tagging, and there needs to be some capacity in your project
>> for some mentoring.
>>
>> Leiningen is doing this  already with "newbie"
>> tagged issues, which is awesome.
>>
>> Are there any other Clojure projects that are doing this? Would you like
>> to do this with your project? If so, I can try to help. I have been
>> spending a lot of time thinking about the Clojure newcomer perspective
>> lately, and I'd like to work on some things that help smooth that path.
>>
>> Bridget
>>
>>
>
> --
> --
> 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.
>
>
>  Marcus Blankenship
> \\\ Failed Business Owner, Problem Solver, Linear Thinker
> \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo
>
>  --
> --
> 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.
>

-- 
-- 
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] com.stuartsierra/frequencies "0.1.0"

2014-01-26 Thread Stuart Sierra
That was a mistaken copy and paste.

The release is [com.stuartsierra/frequencies "0.1.0"] and is available on 
Clojars.

-S


On Sunday, January 26, 2014 4:05:24 PM UTC-5, Michael Klishin wrote:
>
> 2014-01-25 Stuart Sierra >
>
>> Leiningen dependency:
>>
>> [com.stuartsierra/frequencies "0.1.0-SNAPSHOT"]
>>
>
> Please do a proper release. Non-snapshot projects cannot
> depend on snapshot libraries:
>
> https://github.com/technomancy/leiningen/wiki/Repeatability#snapshot-versions
> -- 
> 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/groups/opt_out.


Academy Award goes to a literate program

2014-01-26 Thread daly
>From http://lambda-the-ultimate.org/node/4876:

Matt Pharr, Greg Humphreys, and Pat Hanrahan have recently been given an
Academy Award for Technical Achievement, for the book Physically Based
Rendering. This is the first time the award has been given to a book and
(more relevant to LtU) the first time a literate program has won an
Academy Award.

-- 
-- 
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: Help about using clojure in org mode in Emacs with CIDER

2014-01-26 Thread Matching Socks
I tried updating org alone, but I evidently caused a mishmash of old and 
new elisp file versions that didn't work.  So I built Emacs from the trunk 
branch (emacs-version 24.3.50.1), and blended Org from the master branch to 
get Cider.  According to package-list-packages, I am using cider 20140125.  

(1) Is it still possible for a Clojure code block to accept an org table as 
an argument?  

#+tblname: columnar-stuff
| State   | Bird  |
| New York| Eastern Bluebird  |
| New Jersey  | Eastern Goldfinch |
| Connecticut | Penguin   |

#+name: read-columnar-s(rows=columnar-stuff)
#+begin_src clojure :exports both :results pp
  (let [headings (first rows)]
(map #(zipmap headings %) (rest rows)))
#+end_src

#+RESULTS: read-columnar-s
: CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
rows in this context, compiling:(NO_SOURCE_PATH:1:165) 

(2) There was a thread last March about emitting nice Org tables from code 
blocks. (https://groups.google.com/d/msg/clojure/71MEGeYiUKA/tf6rYdfvXrwJ)  
Is it still possible to emit a nice Org table from a Clojure code block?  I 
copied from the March example, but the results section does not look right, 
and after M-x org-latex-export-to-latex, LaTeX gets stuck on an "Undefined 
control sequence":

#+begin_src clojure :exports both :results value raw
(with-out-str (print-table [{:a 1 :b 2 :c 3} {:b 5 :a 7 :c "dog"}]))
#+end_src

#+RESULTS:
"\n| :a |  :c | :b |\n|+-+|\n|  1 |   3 |  2 |\n|  7 | dog |  5 
|\n"

(3) I would also like to pretty-print expressions, so the results would fit 
in LaTeX margins.  How can I do that with ob-clojure?  ":results pp" gives 
a result reminiscent of the above flattened table.

#+begin_src clojure :exports both :results pp
(def birds [["State","Bird"]
["New York", "Eastern Bluebird"]
["New Jersey", "Eastern Goldfinch"]
["Connecticut", "Penguin"]])
birds
#+end_src

#+RESULTS:
: "[[\"State\" \"Bird\"]\n [\"New York\" \"Eastern Bluebird\"]\n [\"New 
Jersey\" \"Eastern Goldfinch\"]\n [\"Connecticut\" \"Penguin\"]]\n"

-- 
-- 
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] com.stuartsierra/frequencies "0.1.0"

2014-01-26 Thread A

This is so awesome.  Thanks for writing this!  


Here's my naive stab at integration with (the :iris dataset available in) 
Incanter...

 (:require [incanter.core :as i]  
[incanter.datasets :as id]
[com.stuartsierra.frequencies :as freq])

(def d (id/get-dataset :iris)) 

   


(for [k [:Sepal.Length :Sepal.Width :Petal.Length :Petal.Width ] 
]   


  (-> d 


 

  
i/to-map

   

  
k   

   

  
frequencies 

   

  
freq/stats  

   

  (assoc :field k)   ;; label the stats with the field we 
used
   

  ))  


What do people think about Incanter these days?  Is it a forgotten 
step-child of clojure data science dreams or ready for a renaissance?


Cheers,
Avram



On Saturday, January 25, 2014 9:39:36 AM UTC-8, Stuart Sierra wrote:
>
> New Clojure library "frequencies"
>
> https://github.com/stuartsierra/frequencies
>
> Basic statistical computations (mean, median, etc.) on **frequency maps**, 
> e.g. the map returned by `clojure.core/frequencies`.
>
> A frequency map can represent (or approximate) a large distribution of 
> values in a small amount of memory.
>
> Log files, benchmarks, and load tests frequently produce data sets that 
> are too large to store entirely in memory. Frequency maps are a convenient 
> way to get a summary view of these data sets.
>
>
> Leiningen dependency:
>
> [com.stuartsierra/frequencies "0.1.0-SNAPSHOT"]
>
>
> Special thanks to Craig Andera for code review and Cognitect for 20% time.
>  

-- 
-- 
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: core.asyn: missing sequence functions?

2014-01-26 Thread Olaf Delgado-Friedrichs
I can't speak for the core.async implementers, of course, but I've been 
working on a similar library for Javascript, and had to realised that not 
all sequence operations make sense, or are even possible in the context of 
channels.

The one you mentioned, take-while, is a good example. Once you've taken the 
first item from the channel that does not satisfy the predicate, there is 
no way to put it back without breaking the abstraction. So I think the best 
one could do in order not to lose any data is implement something like a 
'take-until' that produces all elements of the channel up until the first 
one that satisfies a given predicate.

Cheers,
Olaf


On Monday, 27 January 2014 02:53:55 UTC+11, Daniel Solano Gómez wrote:
>
> Hello, all, 
>
> I have just started using core.async, and I was curious as to why 
> particular sequence functions where chosen to be implemented.  For 
> example, there is take, but no take-while or drop.  Is this a deliberate 
> design decision? 
>
> Thanks for the great library! 
>
> Sincerely, 
>
> Daniel 
>

-- 
-- 
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] com.stuartsierra/frequencies "0.1.0"

2014-01-26 Thread Jordan Berg
Actually looks like Stuart ended up doing a non-SNAPSHOT release of
0.1.0 after the announcement based on the github README.

On Sun, Jan 26, 2014 at 1:19 PM, Michael Klishin
 wrote:
>
> 2014-01-27 Mimmo Cosenza 
>
>> You could clone and deploy it yourself into clojars. The only caveat is to
>> give it an org.clojars. as group-id to make it clear it's not
>> the official one.
>
>
> Sorry, that's just won't fly. It's library maintainer's responsibility to
> make
> sure the project is reasonably easy to use.
>
> If something is not ready for a release yet, that's fine: simply don't
> announce
> it until it is.
>
> --
> 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/groups/opt_out.

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

2014-01-26 Thread Mimmo Cosenza
sure, but it depends on who is going to use your project too. if it's only you, 
lein install is ok.

On Jan 26, 2014, at 10:17 PM, Moritz Ulrich  wrote:

> On Sun, Jan 26, 2014 at 10:10 PM, Mimmo Cosenza  
> wrote:
>> You could clone and deploy it yourself into clojars. The only caveat is to
>> give it an org.clojars. as group-id to make it clear it's not
>> the official one.
> 
> Please don't deploy a project to the public clojars repository for
> such purposes. You can use `lein install' to install the jar locally
> on your machine under whatever name you wish.
> 
> -- 
> -- 
> 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


Re: [ANN] com.stuartsierra/frequencies "0.1.0"

2014-01-26 Thread Michael Klishin
2014-01-27 Mimmo Cosenza 

> You could clone and deploy it yourself into clojars. The only caveat is to
> give it an org.clojars. as group-id to make it clear it's not
> the official one.


Sorry, that's just won't fly. It's library maintainer's responsibility to
make
sure the project is reasonably easy to use.

If something is not ready for a release yet, that's fine: simply don't
announce
it until it is.
-- 
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/groups/opt_out.


Re: ANN: clojure-objc

2014-01-26 Thread Gal Dolber
That's a bug in the objc interop, the type detection is incomplete.

https://github.com/galdolber/clojure-objc/blob/master/src/jvm/clojure/lang/Selector.java?source=c#L87

The error you get is happening on arm64(iphone 5s or simulator 64bits), it
should work on i386, armv7 and armv7s.


On Sun, Jan 26, 2014 at 3:18 PM, PublicFarley wrote:

> I got an error as posted in my 1:01 PM post below. I've uploaded my
> source in case it helps. Basically it's your github sample code.
>
>
> On Sunday, January 26, 2014 8:15:17 AM UTC-5, Gal Dolber wrote:
>
>> I added a better sample with a UINavigationController and a small uikit
>> framework(very very alpha).
>>
>> https://github.com/galdolber/clojure-objc-sample/blob/
>> master/src/clojure_objc_sample/core.clj
>>
>> Feedback and improvements on the uikit framework are very much welcome.
>>
>>
>> On Sat, Jan 25, 2014 at 10:08 PM, PublicFarley wrote:
>>
>>> Thanks for the quick reply Gal. Excellent advise. I never thought to do
>>> it that way. Need to stretch my thinking a bit... LOL.
>>>
>>> Yes your compilation technology could enable a lot of creative thinking
>>> around frameworks and libraries for iOS UI construction in Clojure. Much
>>> like the excitement and development in the RubyMotion community. I need to
>>> put my hard hat on and experiment more.
>>>
>>> Again thanks for the fabulous contribution.
>>>
>>> Kind Regards,
>>> publicfarley
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> 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.
>

-- 
-- 
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] com.stuartsierra/frequencies "0.1.0"

2014-01-26 Thread Moritz Ulrich
On Sun, Jan 26, 2014 at 10:10 PM, Mimmo Cosenza  wrote:
> You could clone and deploy it yourself into clojars. The only caveat is to
> give it an org.clojars. as group-id to make it clear it's not
> the official one.

Please don't deploy a project to the public clojars repository for
such purposes. You can use `lein install' to install the jar locally
on your machine under whatever name you wish.

-- 
-- 
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] com.stuartsierra/frequencies "0.1.0"

2014-01-26 Thread Mimmo Cosenza
You could clone and deploy it yourself into clojars. The only caveat is to give 
it an org.clojars. as group-id to make it clear it's not the 
official one.

HIH

mimmo

On Jan 26, 2014, at 10:05 PM, Michael Klishin  
wrote:

> 2014-01-25 Stuart Sierra 
> Leiningen dependency:
> 
> [com.stuartsierra/frequencies "0.1.0-SNAPSHOT"]
> 
> Please do a proper release. Non-snapshot projects cannot
> depend on snapshot libraries:
> https://github.com/technomancy/leiningen/wiki/Repeatability#snapshot-versions
> -- 
> 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/groups/opt_out.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [ANN] com.stuartsierra/frequencies "0.1.0"

2014-01-26 Thread Michael Klishin
2014-01-25 Stuart Sierra 

> Leiningen dependency:
>
> [com.stuartsierra/frequencies "0.1.0-SNAPSHOT"]
>

Please do a proper release. Non-snapshot projects cannot
depend on snapshot libraries:
https://github.com/technomancy/leiningen/wiki/Repeatability#snapshot-versions
-- 
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/groups/opt_out.


Re: Issues with the keyword :as aliasing

2014-01-26 Thread Sean Corfield
Your code works fine for me in the REPL. Can you provide a bit more detail 
about exactly how you are trying to execute your code?

Sean

On Jan 26, 2014, at 6:15 AM, Paul Smith  wrote:
> I am requiring clojure.java.io as such
> 
> (ns sample-project.core
>   (:require [clojure.java.io :as io]))
> 
> However, the first expression creates a file object 
> (clojure.java.io/file "test")
> #
> 
> The second expression explodes with "java.lang.RuntimeException: No such 
> namespace: io"
> (io/file "/tmp/paul-test")
> 
> But as you can see, I have created the alias in my namespace.
> 
> Why is this so?
> 
> Thanks




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Web App structure on server?

2014-01-26 Thread john walker
I spent some time yesterday with node webkit and clojurescript. There's not 
really much to it.

There's a :target :nodejs that you can hand off to leiningen, but I don't 
really know what it's for (and no one else seems to either). Make sure that 
when you inspect the resultant javascript source that you see the google 
closure inlined. This means fiddling with compilation settings. From then 
on, you can follow nodejs tutorials.

On Sunday, January 26, 2014 10:59:29 AM UTC-5, Julio Barros wrote:
>
> Hi Josh 
>
> Do you know of a tutorial or sample project that shows you how to do that 
> and what to watch out for? 
>
> Julio 
>
>
> > On Jan 24, 2014, at 11:14 PM, Joshua Ballanco 
> > > 
> wrote: 
> > 
> > I just wanted to point out that if you’re looking to write small 
> background processes that are more shell-script-y than server-y, you might 
> consider CLJS + Node.js. That way you can still leverage Clojure without 
> the need to spin up an entire JVM just for a quick cron task.   
> > 
> > Cheers, 
> > 
> > Josh 
> > 
> > 
> >> On Saturday, January 25, 2014 at 7:40, Jarrod Swart wrote: 
> >> 
> >> I appreciate your outlook, and yes I have definitely discussed the pros 
> of Clojure. They are apprehensive in the event they have to outsource 
> development work, and I don't blame them. I'm just going to be a lot 
> happier and more productive in Clojure. 
> >> 
> >> Thanks again! 
> >> 
> >> 
> >> 
> >>> On Saturday, January 25, 2014 12:25:51 AM UTC-5, Mikera wrote: 
> >>> Be careful about "weaselling in" Clojure - If I was your client and 
> you did that without consulting me, I'd be pretty annoyed (possibly to the 
> extent of not working with you again). Better to be upfront about the good 
> reasons for using Clojure (concurrency support, awesome libraries, 
> productivity etc.) 
> >>> 
> >>> On the server architecture side: I think it's preferable to package 
> things together into a big JVM instance. Reasons: 
> >>> - It's relatively easy to make some lightweight compojure routes to 
> bundle different APIs / micro-apps together in one app server 
> >>> - It will make deployment much simpler: you can often get away with 
> something as simple as: java -jar myserver.jar 
> >>> - You'll accumulate less duplication / technical debt if you keep 
> everything in sync (library versions, shared utility code etc.) 
> >>> - A single large JVM instance will have a lot less overhead compared 
> to multiple small JVMs 
> >>> - JVM applications are better suited in general to long-running 
> instances rather than small scripts 
> >>> 
> >>> I'd consider breaking this into multiple instances only if there was a 
> good reason, e.g. 
> >>> - Need for process isolation for security / robustness reasons 
> >>> - Need to have different lifecycles for different application servers. 
> >>> 
> >>> 
> >>> Basically you can think of it this way: 
> >>> - cron jobs => process coordination within the server (perhaps 
> core.async, or other scheduling tools) 
> >>> - python scripts / micro-apps => separate Compojure routes / APIs 
> within the server 
> >>> - hacking at the command line => hacking with the REPL   
> >>> 
> >>> 
>  On Saturday, 25 January 2014 12:58:03 UTC+8, Jarrod Swart wrote: 
>  I have a general question about application architecture as it 
> relates to deploying to the server.   
>  
>  Most of my previous development work involved python/php/ruby so we 
> typically had: 
>  
>  1. One massive framework / application complection nightmare 
>  2. Background scripts run by crons 
>  
>  At present I am working on an application for a client, and I am 
> trying to weasel in Clojure where I can. I will likely have to make the 
> Clojure aspects a black box. 
>  
>  If I were doing this in another language I would simply write the 
> smaller pieces of functionality as python scripts, plop them on the server 
> and then set the crons. 
>  
>  How do I do this with Clojure? If I package each micro-app as an 
> uberjar that is a lot of JVM, likely eating at the resources of the poor 
> (see: crappy) VPSs this project will likely run on. 
>  
>  Thoughts? 
>  
>  How do you structure web Clojure apps beyond: put the whole thing in 
> a servlet\uberjar?   
> >> 
> >> --   
> >> --   
> >> You received this message because you are subscribed to the Google 
> >> Groups "Clojure" group. 
> >> To post to this group, send email to 
> >> clo...@googlegroups.com(mailto:
> clo...@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+u...@googlegroups.com  (mailto:
> clojure+u...@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 f

Re: Web App structure on server?

2014-01-26 Thread Joshua Ballanco
I don’t have much practical experience with CLJS+Node myself, but the intro on 
the ClojureScript wiki has been helpful with the couple experiments I’ve tried: 
https://github.com/clojure/clojurescript/wiki/Quick-Start . Really, though, it 
comes down to the fact that ClojureScript compiles down to JS, and you can just 
hand those over to Node to be run. Sorry I can’t be of more help…  

Cheers,

Josh


On Sunday, January 26, 2014 at 17:59, Julio Barros wrote:

> Hi Josh
>  
> Do you know of a tutorial or sample project that shows you how to do that and 
> what to watch out for?
>  
> Julio
>  
>  
> > On Jan 24, 2014, at 11:14 PM, Joshua Ballanco  > (mailto:jball...@gmail.com)> wrote:
> >  
> > I just wanted to point out that if you’re looking to write small background 
> > processes that are more shell-script-y than server-y, you might consider 
> > CLJS + Node.js. That way you can still leverage Clojure without the need to 
> > spin up an entire JVM just for a quick cron task.  
> >  
> > Cheers,
> >  
> > Josh
> >  
> >  
> > > On Saturday, January 25, 2014 at 7:40, Jarrod Swart wrote:
> > >  
> > > I appreciate your outlook, and yes I have definitely discussed the pros 
> > > of Clojure. They are apprehensive in the event they have to outsource 
> > > development work, and I don't blame them. I'm just going to be a lot 
> > > happier and more productive in Clojure.
> > >  
> > > Thanks again!
> > >  
> > >  
> > >  
> > > > On Saturday, January 25, 2014 12:25:51 AM UTC-5, Mikera wrote:
> > > > Be careful about "weaselling in" Clojure - If I was your client and you 
> > > > did that without consulting me, I'd be pretty annoyed (possibly to the 
> > > > extent of not working with you again). Better to be upfront about the 
> > > > good reasons for using Clojure (concurrency support, awesome libraries, 
> > > > productivity etc.)
> > > >  
> > > > On the server architecture side: I think it's preferable to package 
> > > > things together into a big JVM instance. Reasons:
> > > > - It's relatively easy to make some lightweight compojure routes to 
> > > > bundle different APIs / micro-apps together in one app server
> > > > - It will make deployment much simpler: you can often get away with 
> > > > something as simple as: java -jar myserver.jar
> > > > - You'll accumulate less duplication / technical debt if you keep 
> > > > everything in sync (library versions, shared utility code etc.)
> > > > - A single large JVM instance will have a lot less overhead compared to 
> > > > multiple small JVMs
> > > > - JVM applications are better suited in general to long-running 
> > > > instances rather than small scripts
> > > >  
> > > > I'd consider breaking this into multiple instances only if there was a 
> > > > good reason, e.g.
> > > > - Need for process isolation for security / robustness reasons
> > > > - Need to have different lifecycles for different application servers.
> > > >  
> > > >  
> > > > Basically you can think of it this way:
> > > > - cron jobs => process coordination within the server (perhaps 
> > > > core.async, or other scheduling tools)
> > > > - python scripts / micro-apps => separate Compojure routes / APIs 
> > > > within the server
> > > > - hacking at the command line => hacking with the REPL  
> > > >  
> > > >  
> > > > > On Saturday, 25 January 2014 12:58:03 UTC+8, Jarrod Swart wrote:
> > > > > I have a general question about application architecture as it 
> > > > > relates to deploying to the server.  
> > > > >  
> > > > > Most of my previous development work involved python/php/ruby so we 
> > > > > typically had:
> > > > >  
> > > > > 1. One massive framework / application complection nightmare
> > > > > 2. Background scripts run by crons
> > > > >  
> > > > > At present I am working on an application for a client, and I am 
> > > > > trying to weasel in Clojure where I can. I will likely have to make 
> > > > > the Clojure aspects a black box.
> > > > >  
> > > > > If I were doing this in another language I would simply write the 
> > > > > smaller pieces of functionality as python scripts, plop them on the 
> > > > > server and then set the crons.
> > > > >  
> > > > > How do I do this with Clojure? If I package each micro-app as an 
> > > > > uberjar that is a lot of JVM, likely eating at the resources of the 
> > > > > poor (see: crappy) VPSs this project will likely run on.
> > > > >  
> > > > > Thoughts?
> > > > >  
> > > > > How do you structure web Clojure apps beyond: put the whole thing in 
> > > > > a servlet\uberjar?  
> > >  
> > > --  
> > > --  
> > > You received this message because you are subscribed to the Google
> > > Groups "Clojure" group.
> > > To post to this group, send email to clojure@googlegroups.com 
> > > (mailto:clojure@googlegroups.com)
> > > Note that posts from new members are moderated - please be patient with 
> > > your first post.
> > > To unsubscribe from this group, send email to
> > > clojure+unsubscr...@googlegroups.com 
> > > (mai

Re: ANN: clojure-objc

2014-01-26 Thread PublicFarley
I got an error as posted in my 1:01 PM post below. I've uploaded my source 
in case it helps. Basically it's your github sample code.


On Sunday, January 26, 2014 8:15:17 AM UTC-5, Gal Dolber wrote:
>
> I added a better sample with a UINavigationController and a small uikit 
> framework(very very alpha).
>
>
> https://github.com/galdolber/clojure-objc-sample/blob/master/src/clojure_objc_sample/core.clj
>
> Feedback and improvements on the uikit framework are very much welcome.
>
>
> On Sat, Jan 25, 2014 at 10:08 PM, PublicFarley 
> 
> > wrote:
>
>> Thanks for the quick reply Gal. Excellent advise. I never thought to do 
>> it that way. Need to stretch my thinking a bit... LOL.
>>
>> Yes your compilation technology could enable a lot of creative thinking 
>> around frameworks and libraries for iOS UI construction in Clojure. Much 
>> like the excitement and development in the RubyMotion community. I need to 
>> put my hard hat on and experiment more.
>>
>> Again thanks for the fabulous contribution.
>>
>> Kind Regards,
>> publicfarley
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

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


core.clj
Description: Binary data


uikit.clj
Description: Binary data


Re: ANN: clojure-objc

2014-01-26 Thread PublicFarley
Hi Gal.

Just tried your code and got the following... Any ideas on what may be 
failing?

*Clojure_objc_sampleuikit__init*

*2014-01-26 12:47:20.733 hithere[1646:70b] *** Terminating app due to 
uncaught exception 'Type not found', reason: 
'{CGRect={CGPoint=dd}{CGSize=dd}}'*

 First throw call stack:*

*(*

* 0   CoreFoundation  0x000103ac6795 
__exceptionPreprocess + 165*

* 1   libobjc.A.dylib 0x000103829991 
objc_exception_throw + 43*

* 2   hithere 0x0001003ce441 
-[ClojureLangSelector invokeObjcWithId:withNSString:withClojureLangISeq:] + 
5649*

* 3   hithere 0x0001003cce1d 
-[ClojureLangSelector doInvokeWithId:withId:] + 365*

* 4   hithere 0x000100d59a68 
-[ClojureLangRestFn invokeWithId:] + 488*

* 5   hithere 0x000100e3990c 
+[Hitherecore__init load__] + *

* 6   hithere 0x000100e42131 
+[Hitherecore__init initialize] + 241*

* 7   libobjc.A.dylib 0x00010382a299 
_class_initialize + 645*

* 8   libobjc.A.dylib 0x0001038314de 
lookUpImpOrForward + 174*

* 9   libobjc.A.dylib 0x00010383d04c objc_msgSend + 
204*

* 10  Foundation  0x0001033fcc07 
_NSDescriptionWithLocaleFunc + 41*

* 11  CoreFoundation  0x000103a4b3e4 
__CFStringAppendFormatCore + 7252*

* 12  CoreFoundation  0x000103a89b03 
_CFStringCreateWithFormatAndArgumentsAux + 115*

* 13  CoreFoundation  0x000103ae9dab _CFLogvEx + 
123*

* 14  Foundation  0x00010342cdc6 NSLogv + 79*

* 15  Foundation  0x00010342cd5a NSLog + 148*

* 16  hithere 0x00010036b228 
+[ClojureLangRT loadiOSWithNSString:] + 488*

* 17  hithere 0x00010036b2a9 
+[ClojureLangRT load__WithNSString:withBoolean:] + 105*

* 18  hithere 0x00010036b036 
+[ClojureLangRT load__WithNSString:] + 70*

* 19  hithere 0x0001196c 
-[AHTAppDelegate application:didFinishLaunchingWithOptions:] + 188*

* 20  UIKit   0x00010248695c 
-[UIApplication 
_handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 264*

* 21  UIKit   0x000102487014 
-[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 
1269*

* 22  UIKit   0x00010248abe8 
-[UIApplication 
_runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 
660*

* 23  UIKit   0x00010249baab 
-[UIApplication handleEvent:withNewEvent:] + 3092*

* 24  UIKit   0x00010249bf1e 
-[UIApplication sendEvent:] + 79*

* 25  UIKit   0x00010248c2be 
_UIApplicationHandleEvent + 618*

* 26  GraphicsServices0x000105bb7bb6 
_PurpleEventCallback + 762*

* 27  GraphicsServices0x000105bb767d 
PurpleEventCallback + 35*

* 28  CoreFoundation  0x000103a48819 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41*

* 29  CoreFoundation  0x000103a485ee 
__CFRunLoopDoSource1 + 478*

* 30  CoreFoundation  0x000103a71ab3 __CFRunLoopRun 
+ 1939*

* 31  CoreFoundation  0x000103a70f33 
CFRunLoopRunSpecific + 467*

* 32  UIKit   0x00010248a4bd 
-[UIApplication _run] + 609*

* 33  UIKit   0x00010248c043 
UIApplicationMain + 1010*

* 34  hithere 0x00011cc3 main + 115*

* 35  libdyld.dylib   0x0001040db5fd start + 1*

*)*

*libc++abi.dylib: terminating with uncaught exception of type NSException*




On Sunday, January 26, 2014 10:31:05 AM UTC-5, PublicFarley wrote:
>
> Awesome. Thanks Gal. 
>
> Can't wait to check it out. 
>

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

2014-01-26 Thread Michael Klishin
scrypt [1] is a tiny Clojure library for the scrypt key derivation function.

Release notes:
http://blog.clojurewerkz.org/blog/2014/01/26/scrypt-1-dot-1-0-is-released/

1. https://github.com/clojurewerkz/scrypt
-- 
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/groups/opt_out.


ANN Mailer 1.0.0 is released

2014-01-26 Thread Michael Klishin
Mailer [1] is a small Clojure library that makes email delivery
easy. It is inspired by Ruby's Action Mailer and combines Postal,
Moustache template rendering and testing utilities.

Release notes:
http://blog.clojurewerkz.org/blog/2014/01/26/mailer-1-dot-0-0-is-released/

1. https://github.com/clojurewerkz/mailer
-- 
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/groups/opt_out.


Re: Read file contents as map

2014-01-26 Thread Jan Herich
And if you are not sure about that, just use edn-only reader:

(require '[clojure.tools.reader.edn :as edn])

(edn/read-string (slurp "file"))

Dňa nedeľa, 26. januára 2014 17:12:32 UTC+1 mynomoto napísal(-a):
>
> If you are sure that the file doesn't contain malicious code you can use:
>
> (read-string (slurp "file"))
>
> On Sunday, January 26, 2014 11:24:30 AM UTC-2, Paul Smith wrote:
>>
>> Hi,
>>
>> I have a config file that contains a Clojure map. If I slurp that file it 
>> obviously returns a string. 
>>
>> Is it possible to return that read file as a map (its original data 
>> structure) and not a string?
>>
>> Thanks
>>
>> Paul
>>
>

-- 
-- 
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: Om 0.3.0

2014-01-26 Thread mynomoto
Hi wuqi...@gmail.com,

You can just open the file. I got some blank pages when for some reason I 
wasn't able to reach fb.me. Check your Network tab in the developer tools.

On Sunday, January 26, 2014 6:12:52 AM UTC-2, wuqi...@gmail.com wrote:
> On Saturday, January 25, 2014 8:16:15 AM UTC+8, David Nolen wrote:
> 
> > A few minor simplifications to the Om model in this release. A breaking 
> > change if you were using om.core/bind, om.core/pure-bind or om.core/read - 
> > these complications have been removed.
> 
> > 
> 
> > 
> 
> > There's also now a tutorial optimized for Light Table for people want to 
> > understand the Om approach to React without losing time cobbling together a 
> > working environment: http://github.com/swannodette/om/wiki/Tutorial
> 
> > 
> 
> > 
> 
> > 
> 
> > Have fun!
> 
> > 
> 
> > 
> 
> > 
> 
> > David
> 
> 
> 
> I following the tutorial. After I opened index.html, the page is empty 
> without any word. This is different from what said in the tutorial. BTW, I 
> double clicked the index.html, and then chrome shows the page, is this the 
> right way to open it or need to use some http://.../index.html after start 
> some service?
> 
> 
> 
> Once the build has succeeded open index.html in your favorite browser (we 
> recommend Google Chrome as it has excellent support for source maps). You 
> should see an h1 tag with the text content Hello World! in it.

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

2014-01-26 Thread mynomoto
If you are sure that the file doesn't contain malicious code you can use:

(read-string (slurp "file"))

On Sunday, January 26, 2014 11:24:30 AM UTC-2, Paul Smith wrote:
>
> Hi,
>
> I have a config file that contains a Clojure map. If I slurp that file it 
> obviously returns a string. 
>
> Is it possible to return that read file as a map (its original data 
> structure) and not a string?
>
> Thanks
>
> Paul
>

-- 
-- 
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: Web App structure on server?

2014-01-26 Thread Julio Barros
Hi Josh

Do you know of a tutorial or sample project that shows you how to do that and 
what to watch out for?

Julio


> On Jan 24, 2014, at 11:14 PM, Joshua Ballanco  wrote:
> 
> I just wanted to point out that if you’re looking to write small background 
> processes that are more shell-script-y than server-y, you might consider CLJS 
> + Node.js. That way you can still leverage Clojure without the need to spin 
> up an entire JVM just for a quick cron task.  
> 
> Cheers,
> 
> Josh
> 
> 
>> On Saturday, January 25, 2014 at 7:40, Jarrod Swart wrote:
>> 
>> I appreciate your outlook, and yes I have definitely discussed the pros of 
>> Clojure. They are apprehensive in the event they have to outsource 
>> development work, and I don't blame them. I'm just going to be a lot happier 
>> and more productive in Clojure.
>> 
>> Thanks again!
>> 
>> 
>> 
>>> On Saturday, January 25, 2014 12:25:51 AM UTC-5, Mikera wrote:
>>> Be careful about "weaselling in" Clojure - If I was your client and you did 
>>> that without consulting me, I'd be pretty annoyed (possibly to the extent 
>>> of not working with you again). Better to be upfront about the good reasons 
>>> for using Clojure (concurrency support, awesome libraries, productivity 
>>> etc.)
>>> 
>>> On the server architecture side: I think it's preferable to package things 
>>> together into a big JVM instance. Reasons:
>>> - It's relatively easy to make some lightweight compojure routes to bundle 
>>> different APIs / micro-apps together in one app server
>>> - It will make deployment much simpler: you can often get away with 
>>> something as simple as: java -jar myserver.jar
>>> - You'll accumulate less duplication / technical debt if you keep 
>>> everything in sync (library versions, shared utility code etc.)
>>> - A single large JVM instance will have a lot less overhead compared to 
>>> multiple small JVMs
>>> - JVM applications are better suited in general to long-running instances 
>>> rather than small scripts
>>> 
>>> I'd consider breaking this into multiple instances only if there was a good 
>>> reason, e.g.
>>> - Need for process isolation for security / robustness reasons
>>> - Need to have different lifecycles for different application servers.
>>> 
>>> 
>>> Basically you can think of it this way:
>>> - cron jobs => process coordination within the server (perhaps core.async, 
>>> or other scheduling tools)
>>> - python scripts / micro-apps => separate Compojure routes / APIs within 
>>> the server
>>> - hacking at the command line => hacking with the REPL  
>>> 
>>> 
 On Saturday, 25 January 2014 12:58:03 UTC+8, Jarrod Swart wrote:
 I have a general question about application architecture as it relates to 
 deploying to the server.  
 
 Most of my previous development work involved python/php/ruby so we 
 typically had:
 
 1. One massive framework / application complection nightmare
 2. Background scripts run by crons
 
 At present I am working on an application for a client, and I am trying to 
 weasel in Clojure where I can. I will likely have to make the Clojure 
 aspects a black box.
 
 If I were doing this in another language I would simply write the smaller 
 pieces of functionality as python scripts, plop them on the server and 
 then set the crons.
 
 How do I do this with Clojure? If I package each micro-app as an uberjar 
 that is a lot of JVM, likely eating at the resources of the poor (see: 
 crappy) VPSs this project will likely run on.
 
 Thoughts?
 
 How do you structure web Clojure apps beyond: put the whole thing in a 
 servlet\uberjar?  
>> 
>> --  
>> --  
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com 
>> (mailto:clojure@googlegroups.com)
>> Note that posts from new members are moderated - please be patient with your 
>> first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com 
>> (mailto:clojure+unsubscr...@googlegroups.com)
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---  
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+unsubscr...@googlegroups.com 
>> (mailto:clojure+unsubscr...@googlegroups.com).
>> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://group

Issues with the keyword :as aliasing

2014-01-26 Thread Paul Smith
Hi,

I am requiring clojure.java.io as such

(ns sample-project.core
  (:require [clojure.java.io :as io]))

However, the first expression creates a file object
(clojure.java.io/file "test")
#

The second expression explodes with "java.lang.RuntimeException: No such
namespace: io"
(io/file "/tmp/paul-test")

But as you can see, I have created the alias in my namespace.

Why is this so?

Thanks

Paul

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


Read file contents as map

2014-01-26 Thread Paul Smith
Hi,

I have a config file that contains a Clojure map. If I slurp that file it 
obviously returns a string. 

Is it possible to return that read file as a map (its original data 
structure) and not a string?

Thanks

Paul

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


core.asyn: missing sequence functions?

2014-01-26 Thread Daniel Solano Gómez
Hello, all,

I have just started using core.async, and I was curious as to why
particular sequence functions where chosen to be implemented.  For
example, there is take, but no take-while or drop.  Is this a deliberate
design decision?

Thanks for the great library!

Sincerely,

Daniel

-- 
-- 
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: clojure-objc

2014-01-26 Thread PublicFarley
Awesome. Thanks Gal. 

Can't wait to check it out. 

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

2014-01-26 Thread Gal Dolber
I added a better sample with a UINavigationController and a small uikit
framework(very very alpha).

https://github.com/galdolber/clojure-objc-sample/blob/master/src/clojure_objc_sample/core.clj

Feedback and improvements on the uikit framework are very much welcome.


On Sat, Jan 25, 2014 at 10:08 PM, PublicFarley wrote:

> Thanks for the quick reply Gal. Excellent advise. I never thought to do it
> that way. Need to stretch my thinking a bit... LOL.
>
> Yes your compilation technology could enable a lot of creative thinking
> around frameworks and libraries for iOS UI construction in Clojure. Much
> like the excitement and development in the RubyMotion community. I need to
> put my hard hat on and experiment more.
>
> Again thanks for the fabulous contribution.
>
> Kind Regards,
> publicfarley
>
> --
> --
> 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.
>

-- 
-- 
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] om-start lein template for nrepl compliant editors/IDEs

2014-01-26 Thread Mimmo Cosenza
Thanks Rudy!

There is still room for improvements. At the moment I was not able make it to 
run with :none optimisation which is amazingly fast, while :whitespace an all 
the others are slow. But with an nrepl compliant editor/IDE you could enjoy the 
live coding stuff by David without running the lein cljsbuild auto. So, it's 
not a big deal.

But it's my opinion that we should extend that CLJS live experience to a TDD 
workflow too. We're not that faraway. cljsbuild is close to support auto mode 
for the test task, clojurescript.test is almost ready to support asynchronous 
tests.

The only two things that I don't now if they will be quickly solved are:
- the above limitation about using :none with austin browser connected REPL
- the same limitation about using :none with clojurescript.test.

Again, if 7/10 seconds of recompilation time is not considered inadequate for a 
TDD workflow, we can stays with the :whitespace compilation option both for 
austin and clojurescript.test. 

Mimmo

On Jan 26, 2014, at 11:41 AM, Rudi Engelbrecht  wrote:

> Hi Mimmo
> 
> Thank you for this tutorial - I managed to follow along and experience the 
> same live coding with emacs/cider - really nice to see how all the components 
> work together and "drive" the browser from the browser-repl in emacs.
> 
> Kind regards
> 
> Rudi
> 
> 
> On 26/01/2014, at 2:34 AM, Mimmo Cosenza  wrote:
> 
>> Hi all,
>> yesterday Laurent Petit asked me how to run on CCW OM and Austin together to 
>> have the same live experience obtained by David Nolen in his OM tutorial. 
>> 
>> This morning I created this simple om-start lein-template (a kind of 
>> cljs-start without unit testing stuff) which allows to create a OM project 
>> and to run them in any (I hope) nREPL compliant editors/IDEs. I tested it 
>> only on emacs/cider and Eclipse/CCW.
>> 
>> https://github.com/magomimmo/om-start-template
>> 
>> In the README.md there is also a quickstart for both Emacs/cider and 
>> Eclipse/CCW users.
>> 
>> That said, in the latest week I enjoyed a lot both LT and CCW after decades 
>> of not using anything else than emacs for serious stuff. 
>> 
>> I just wanted to try to give the same LT live experience to  users of other 
>> development environment  while playing with the great stuff from David Nolen.
>> 
>> HIH
>> 
>> mimmo
>> 
> 
> 
> -- 
> -- 
> 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


Re: [ANN] om-start lein template for nrepl compliant editors/IDEs

2014-01-26 Thread Rudi Engelbrecht
Hi Mimmo

Thank you for this tutorial - I managed to follow along and experience the same 
live coding with emacs/cider - really nice to see how all the components work 
together and "drive" the browser from the browser-repl in emacs.

Kind regards

Rudi


On 26/01/2014, at 2:34 AM, Mimmo Cosenza  wrote:

> Hi all,
> yesterday Laurent Petit asked me how to run on CCW OM and Austin together to 
> have the same live experience obtained by David Nolen in his OM tutorial. 
> 
> This morning I created this simple om-start lein-template (a kind of 
> cljs-start without unit testing stuff) which allows to create a OM project 
> and to run them in any (I hope) nREPL compliant editors/IDEs. I tested it 
> only on emacs/cider and Eclipse/CCW.
> 
> https://github.com/magomimmo/om-start-template
> 
> In the README.md there is also a quickstart for both Emacs/cider and 
> Eclipse/CCW users.
> 
> That said, in the latest week I enjoyed a lot both LT and CCW after decades 
> of not using anything else than emacs for serious stuff. 
> 
> I just wanted to try to give the same LT live experience to  users of other 
> development environment  while playing with the great stuff from David Nolen.
> 
> HIH
> 
> mimmo
> 

-- 
-- 
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: async/close! called when channel is gc-ed ?

2014-01-26 Thread Cedric Greevey
(b) is easy if you're willing to drop down to Java, or use gen-class. You
can define a finalize method.

On the other hand, you might also want to look into WeakReference and
ReferenceQueue, which can be used from Clojure with interop. You can
discover when objects become eligible for GC with ReferenceQueue, if they
are held by WeakReference (or SoftReference). So you could create a
channel, a ReferenceQueue, a WeakReference on the channel set up to use
that ReferenceQueue, and a map with mappings from WeakReference to some
sort of identifiers, as well as mappings from identifiers to functions to
call. When a reference shows up on the queue the mapping is used to look up
the id and then the function and invoke it. The modified channel can
directly call the same function when closed. The function can take the id
as a parameter and use a map in the other direction, from id to
WeakReference, to remove all of the mappings for a given id when called
with that id, before doing whatever else it does. It won't have access to
the channel object, at least not if that's been GC'd, but it wouldn't be
able to do much with it anyway in the case where the channel was closed,
save use the channel as a lookup key itself, and the id can serve that
purpose.


On Sun, Jan 26, 2014 at 4:42 AM, t x  wrote:

> ## Context:
>
>   I'm doing some communication across cljs/clj with core.async
>
> ## Problem:
>
>   I want a certain function called whenever:
>   (a) the first time the channel is closed
>   (b) when the channel is gc-ed (if not previously closed)
>
>   (a) is rather easy: I define my own channel, wrapped around
> ManyToManyChannel, and define my own
> https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/protocols.clj#L22
>
>   (b) I have no idea how to do -- is there someway to register some
> function that gets called when a channel is gc-ed ? (perferably in both
> cljs + clj -- although, if it just works in cljs, it suffices)
>
> 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.
>

-- 
-- 
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: core.async over websocket + cljs + clojure

2014-01-26 Thread James Henderson
Hi folks, sorry I'm a bit late to the party, but Chord might be a good base for 
what you want to do? It probably falls a bit short at the moment on your 
disconnection semantics, but could be worth a shot. 

https://github.com/james-henderson/chord

James

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


async/close! called when channel is gc-ed ?

2014-01-26 Thread t x
## Context:

  I'm doing some communication across cljs/clj with core.async

## Problem:

  I want a certain function called whenever:
  (a) the first time the channel is closed
  (b) when the channel is gc-ed (if not previously closed)

  (a) is rather easy: I define my own channel, wrapped around
ManyToManyChannel, and define my own
https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/protocols.clj#L22

  (b) I have no idea how to do -- is there someway to register some
function that gets called when a channel is gc-ed ? (perferably in both
cljs + clj -- although, if it just works in cljs, it suffices)

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: clojure.edn/read-string exceptions => nil

2014-01-26 Thread Cedric Greevey
Shouldn't that be:

(defn filter-printable [obj]
  (cond
   (or (symbol? obj) (number? obj) (string? obj) (keyword? obj)) obj
   (vector? obj) (apply vector (map filter-printable obj))
   (seq? obj) (map filter-printable obj)
   (set? obj) (into #{} (map filter-printable obj))
   (map? obj) (into {} (for [[k v] obj]
 [(filter-printable k) (filter-printable v)]))
   true [:un-readable (pr-str obj)]))

?


On Sun, Jan 26, 2014 at 3:53 AM, t x  wrote:

> I recently ran into this problem again.
>
> The solution I came up with is:
>
> (defn filter-printable [obj]
>   (cond
>(or (symbol? obj) (number? obj) (string? obj) (keyword? obj)) obj
>(vector? obj) (apply vector (map filter-printable obj))
>(seq? obj) (map filter-printable obj)
>(set? obj) (into #{} (map filter-printable obj))
>(map? obj) (into {} (for [[k v] obj]
>  [(filter-printable v) (filter-printable v)]))
>true [:un-readable (pr-str obj)]))
>
> ## example:
>
> (filter-printable
>  {:k 20
>   :f 'abc
>   :d '(+ 1 2 3 foo)
>   :other (async/chan 10)})
>
>
> Anyone have a better / more elegant solution?
>
>
>
>
> On Thu, Jan 16, 2014 at 10:17 AM, t x  wrote:
>
>> After looking at edn/read-string and realizing I would have to modify
>> Java code, I have decided that modifying the sender in clojure land isn't
>> so bad after all.
>>
>>
>> On Thu, Jan 16, 2014 at 9:41 AM, Alex Miller  wrote:
>>
>>> I think I would change the sender to elide whatever parts you don't want
>>> to send rather than mess with the receiver.
>>>
>>>
>>> On Thursday, January 16, 2014 2:11:02 AM UTC-6, t x wrote:

 Hi,

   Right now if I do (clojure.edn/read-string ...) on a string with a
 unreadable part, I get an exception. Instead, I would like to just get nil.
 For example:


 ## code

 (clojure.edn/read-string
  (pr-str
   {:tag :message
:chan (async/chan 10)}))

 ## currently returns

 java.lang.RuntimeException: Unreadable form
  at clojure.lang.Util.runtimeException (Util.java:219)


 ## instead, I would like:

 {:tag :message
  :chan :nil}


 Is there a way to make this happen?

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

-- 
-- 
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: clojure.edn/read-string exceptions => nil

2014-01-26 Thread t x
I recently ran into this problem again.

The solution I came up with is:

(defn filter-printable [obj]
  (cond
   (or (symbol? obj) (number? obj) (string? obj) (keyword? obj)) obj
   (vector? obj) (apply vector (map filter-printable obj))
   (seq? obj) (map filter-printable obj)
   (set? obj) (into #{} (map filter-printable obj))
   (map? obj) (into {} (for [[k v] obj]
 [(filter-printable v) (filter-printable v)]))
   true [:un-readable (pr-str obj)]))

## example:

(filter-printable
 {:k 20
  :f 'abc
  :d '(+ 1 2 3 foo)
  :other (async/chan 10)})


Anyone have a better / more elegant solution?




On Thu, Jan 16, 2014 at 10:17 AM, t x  wrote:

> After looking at edn/read-string and realizing I would have to modify Java
> code, I have decided that modifying the sender in clojure land isn't so bad
> after all.
>
>
> On Thu, Jan 16, 2014 at 9:41 AM, Alex Miller  wrote:
>
>> I think I would change the sender to elide whatever parts you don't want
>> to send rather than mess with the receiver.
>>
>>
>> On Thursday, January 16, 2014 2:11:02 AM UTC-6, t x wrote:
>>>
>>> Hi,
>>>
>>>   Right now if I do (clojure.edn/read-string ...) on a string with a
>>> unreadable part, I get an exception. Instead, I would like to just get nil.
>>> For example:
>>>
>>>
>>> ## code
>>>
>>> (clojure.edn/read-string
>>>  (pr-str
>>>   {:tag :message
>>>:chan (async/chan 10)}))
>>>
>>> ## currently returns
>>>
>>> java.lang.RuntimeException: Unreadable form
>>>  at clojure.lang.Util.runtimeException (Util.java:219)
>>>
>>>
>>> ## instead, I would like:
>>>
>>> {:tag :message
>>>  :chan :nil}
>>>
>>>
>>> Is there a way to make this happen?
>>>
>>> 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.
>>
>
>

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