Re: Clojure development & laptop battery usage

2014-01-25 Thread Timothy Baldridge
It's not true. All memory has to be kept active at all times. Now you may
experience less battery usage due to the GC having to run more often, but
that's not exactly a memory usage problem.

Not to mention that the OS will almost always use all "free" ram for disk
caches and the like.



On Sat, Jan 25, 2014 at 9:55 PM, Andy C  wrote:

> On Wed, Jan 22, 2014 at 5:29 PM, John Chijioke wrote:
>
>> Not true. More RAM, more power.
>>
>
> Why?
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To 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.
>



-- 
"One of the main causes of the fall of the Roman Empire was that-lacking
zero-they had no way to indicate successful termination of their C
programs."
(Robert Firth)

-- 
-- 
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 development & laptop battery usage

2014-01-25 Thread Andy C
On Wed, Jan 22, 2014 at 5:29 PM, John Chijioke  wrote:

> Not true. More RAM, more power.
>

Why?

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

2014-01-25 Thread Jarrod Swart
MBP --> Mac Book Pro
MBA --> Mac Book Air

Best,
Jarrod

On Saturday, January 25, 2014 11:12:37 PM UTC-5, greybird wrote:
>
> In case it helps, I've also seen this CPU eating problem.  I'm using: 
> REPL-y 0.1.9 Clojure 1.5.1.  I don't know what you guys mean by MBP and MBA.
> --mark
>
>

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

2014-01-25 Thread Timothy Baldridge
MBP = Mac Book Pro
MBA = Mac Book Air


On Sat, Jan 25, 2014 at 9:12 PM, greybird  wrote:

> In case it helps, I've also seen this CPU eating problem.  I'm using:
> REPL-y 0.1.9 Clojure 1.5.1.  I don't know what you guys mean by MBP and MBA.
> --mark
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> 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.
>



-- 
"One of the main causes of the fall of the Roman Empire was that-lacking
zero-they had no way to indicate successful termination of their C
programs."
(Robert Firth)

-- 
-- 
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 development & laptop battery usage

2014-01-25 Thread greybird
In case it helps, I've also seen this CPU eating problem.  I'm using: 
REPL-y 0.1.9 Clojure 1.5.1.  I don't know what you guys mean by MBP and MBA.
--mark

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
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-25 Thread Sean Corfield
On Jan 25, 2014, at 3:17 PM, Michał Marczyk  wrote:
> If the application is structured in such a way that messages from the
> other side of the client/server divide are put on channels upon
> arrival, which seems to be a reasonable idea, why not encapsulate the
> connection-handling logic in a black box exposing a (bunch of)
> channel(s)?

This is more or less what the core of David's code does:

* the code uses regular core.async channels (on both sides)
* both side have the concept of a remote channel (which is associated with a 
GUID in a registry atom)
* a "black box" on each side takes from remote channels and sends data across 
the wire (including the channel ID)
* that "black box" also receives data over the wire and puts data onto the 
appropriate remote channel

As far as the application is concerned, it's all just channels - the black box 
performs relaying of data across the client/server gap for each remote channel.

All of the solutions folks have posted so far seem to assume a single channel 
routed over the client/server transport so I feel comfortable going ahead with 
library-izing David's code to support multiple channels and, ultimately, 
multiple transports.

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

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





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Rename file uploaded

2014-01-25 Thread Jarrod Swart
Awesome, glad you got it working.  I highly 
recommend: http://pragprog.com/book/dswdcloj/web-development-with-clojure, 
for step by step Web Dev in Clojure.  Reading through it got me up to speed 
really quickly as far as project structure, common libs and practices, etc.


On Saturday, January 25, 2014 8:51:42 PM UTC-5, The Dude (Abides) wrote:
>
> Thanks for the feedback Jarrod, the gallery-path did exist because I was 
> able to upload files without renaming them and I saw the map with keys per 
> your tip. I just wasn't familiar enough with the plumbing in noir.io or 
> the language as I finally had the time to spend a week getting into clojure 
> more seriously. Took a look in more depth in noir.io, surprisingly 
> concise and simple to understand. With some much appreciated help finally 
> got it working as follows:
>
> (ns pgapp.routes.upload 
>   (:require [compojure.core :refer [defroutes GET POST]]
> [pgapp.views.layout :as layout]
> [noir.io :refer [upload-file resource-path]]
> [noir.session :as session]
> [noir.response :as resp]
> [noir.util.route :refer [restricted]]
> [ring.util.response :refer [file-response]]
> [taoensso.timbre :refer [error]]
> [pgapp.models.db :as db]
> [clj-time.core :as time]
> [clj-time.coerce :as tc]
> [pgapp.util
> :refer [galleries gallery-path thumb-uri thumb-prefix 
> unique-prefix]]))
>
> (defn upload-page [info]  
>   (layout/render "upload.html"))
>
> (defn add-timestamp [filename]
>  (let [ext-position (.lastIndexOf filename ".")
>timestamp(tc/to-long (time/now))]
>(if (pos? ext-position)
>  (str (.substring filename 0 ext-position)
>   "-" timestamp (.substring filename ext-position))
>  (str filename "-" timestamp
>
> (defn handle-upload [file]
>   (upload-file (gallery-path) (update-in file [:filename] add-timestamp))
>   (resp/redirect "/upload"))
>
> (defroutes upload-routes
>   (GET "/upload" [info] (upload-page {:info info}))
>   (POST "/upload" [file] (handle-upload file)))
>
>
> The key to it was the 2nd line in handle-upload as:
>
> (upload-file (gallery-path) (update-in file [:filename] add-timestamp))
>

-- 
-- 
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: Rename file uploaded

2014-01-25 Thread The Dude (Abides)
Thanks for the feedback Jarrod, the gallery-path did exist because I was 
able to upload files without renaming them and I saw the map with keys per 
your tip. I just wasn't familiar enough with the plumbing in noir.io or the 
language as I finally had the time to spend a week getting into clojure 
more seriously. Took a look in more depth in noir.io, surprisingly concise 
and simple to understand. With some much appreciated help finally got it 
working as follows:

(ns pgapp.routes.upload 
  (:require [compojure.core :refer [defroutes GET POST]]
[pgapp.views.layout :as layout]
[noir.io :refer [upload-file resource-path]]
[noir.session :as session]
[noir.response :as resp]
[noir.util.route :refer [restricted]]
[ring.util.response :refer [file-response]]
[taoensso.timbre :refer [error]]
[pgapp.models.db :as db]
[clj-time.core :as time]
[clj-time.coerce :as tc]
[pgapp.util
:refer [galleries gallery-path thumb-uri thumb-prefix 
unique-prefix]]))

(defn upload-page [info]  
  (layout/render "upload.html"))

(defn add-timestamp [filename]
 (let [ext-position (.lastIndexOf filename ".")
   timestamp(tc/to-long (time/now))]
   (if (pos? ext-position)
 (str (.substring filename 0 ext-position)
  "-" timestamp (.substring filename ext-position))
 (str filename "-" timestamp

(defn handle-upload [file]
  (upload-file (gallery-path) (update-in file [:filename] add-timestamp))
  (resp/redirect "/upload"))

(defroutes upload-routes
  (GET "/upload" [info] (upload-page {:info info}))
  (POST "/upload" [file] (handle-upload file)))


The key to it was the 2nd line in handle-upload as:

(upload-file (gallery-path) (update-in file [:filename] add-timestamp))

-- 
-- 
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-25 Thread Jean Niklas L'orange


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: [ANN] Simbase: A vector similarity database

2014-01-25 Thread Mingli Yuan
Hi, folks,

This week we released v0.1.0-alpha3

* Remove constrains on vectors, Simbase support arbitrary vectors now
* Fix various bugs on memory structure to keep scale ratio linearly
* Almost 7 times improvement on performance, right now it can handle 100k
dimensional dense vectors in under 0.14 sec on a i7-cup mac laptop.

>From now on, it enter the beta phase. If it is relevant to your work,  we
encourage you to have a try, and help us to find more bugs.

Regards,
Mingli


On Mon, Jan 13, 2014 at 5:55 PM, Mingli Yuan  wrote:

> Hi, folks,
>
> We just release an alpha version of Simbase, a vector similarity database
> that talks redis protocol. Since it is the first version of all its
> releases, we decided to keep it in alpha right now, for we want to hear
> from the community for any comments and improvements.
>
> Github page
> --
>
> https://github.com/guokr/simbase
>
> We introduce the basic idea, limitations, build process and commands there.
>
> Background
> --
>
> Simbase is a tool we developed during the process we revise our content
> recommendation engine.
>
> Our document set have 300k docs, and we use LDA to change them into
> vectors. But how to compare the 300k vectors was a problem for us then. We
> had tried different method, but the performance is not very good.
>
> Since the comparison logic is quit simple, we decided to write a new data
> store to do the tricks.
>
> So far, we are satisfied by its performance. Under the setting of an i7
> MacBook and 120k 1k-dimensional vector set:
>
>- write: about 1 ops per second
>- read: up to 1k ops per second
>
> The real read performance may be higher than the current result, because
> our testing method is limited.
>
> Regards,
>
> Mingli
>
>
>
>
>

-- 
-- 
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-25 Thread PublicFarley
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.


Re: ANN: clojure-objc

2014-01-25 Thread Gal Dolber
To get started just follow the steps here:

https://github.com/galdolber/lein-objcbuild

You should be able to get everything setup in a few minutes.


On Sat, Jan 25, 2014 at 10:02 PM, Devin Walters  wrote:

> (inc #'your/idea)
>
> I performance related questions similar to Tim, but I think having some
> good "getting started" material might give me a way to start testing the
> boundaries myself.
>
> Cheers,
> '(Devin Walters)
>
> On Jan 25, 2014, at 17:31, PublicFarley  wrote:
>
> I'm utterly shocked by the lack of posts and questions about this very
> cool variation of the Clojure compiler. Think people Develop iOS apps
> in Clojure! Awesome and fun. I suggest that the author and his team try to
> see if you can present at ClojureWest. Need to get the word out.
>
> Anyway, quick question to the OP. Can you post an example where you
> subclass UIViewController and throw up a simple UIView with say a button
> and delegate method that gets called on button click. Would love to see
> where and how you do your 'release' calls as well.
>
> I think a simple example like above would give people some understanding
> on how to really start digging in to clojure-objc.
>
> - PublicFarley
>
> On Friday, January 24, 2014 1:37:01 AM UTC-5, Gal Dolber wrote:
>>
>> clojure-objc is a clojure compiler that generates java(instead of
>> bytecode) and uses j2objc(https://code.google.com/p/j2objc/) to
>> translate it to objc.
>>
>> Goals
>>  * Write iOS and MacOS apps in clojure
>>  * Future proof: new features on clojure should be easy to add
>>  * Distribute clojure-objc libs using maven
>>  * Pure clojure libs should 'just work' (if they only use the jre emulated 
>> classes)
>>  * ObjC dynamic interop
>>  * Run tests in the jvm (with no ObjC interop)
>>
>> For more information:
>> https://github.com/galdolber/clojure-objc
>>
>> Lein plugin:
>> https://github.com/galdolber/lein-objcbuild
>>
>> Sample project:
>> https://github.com/galdolber/clojure-objc-sample
>>
>  --
> --
> 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: ANN: clojure-objc

2014-01-25 Thread Gal Dolber
Loading performance is actually better than clojure on the jvm, on my
notebook loading clojure.core takes 700ms on the jvm and 200ms on the ios
simulator.

And for computation performance I haven't benchmark yet, but at first sight
doesn't seems to be a problem.

On the second question, j2objc generates the retain release calls, and in
my experience really good. And the refs and atoms implementations on
clojure don't have much magic on them. I translated and ran all clojure
core tests on the ios simulator and they (pretty much) all pass, there a
few failures caused because j2objc emulates NullPointerException and
ClassCastException, and not perfectly.


On Sat, Jan 25, 2014 at 9:36 PM, Timothy Baldridge wrote:

> What's the performance of this code like? I'd be interested in seeing how
> performance on Clojure data structures compares. In my experiments with
> reference counting and highly polymorphic code, getting much faster than
> languages like Python was quite hard. Without a more dedicated optimizer
> that understands Clojure code, I'm not sure how fast it can be.
>
> Secondly, how does j2objc get around reference counting and atomic
> updates. Articles such as this :
> http://hacksoflife.blogspot.com/2009/07/cas-and-reference-counting-dont-mix.htmlbasically
>  suggest that attempting  lock free references (like atoms) with
> reference counting is not exactly easy. I'm interested in how j2objc solves
> this as well.
>
> Timothy
>
>
> On Sat, Jan 25, 2014 at 5:17 PM, Gal Dolber  wrote:
>
>> Hey, you cannot subclass from clojure at the moment. But I its not
>> necessary..
>> Just create a UIView, add subviews, properties and listeners. And if you
>> need a UIViewController to pass around, create one and set the view with
>> setView:
>>
>> I have a small ui framework, but its not ready to open source.
>> Its amazing what you can do with AutoLayouts when you have full access to
>> them, I haven't miss Storyboards..
>> I'll try to get this ready and post an example.
>>
>> On the other side, I was really curious to see what people would come out
>> with to do UI with no subclassing.. I came out with one solution, but I'm
>> sure its not the only one.
>>
>>
>> On Sat, Jan 25, 2014 at 8:31 PM, PublicFarley wrote:
>>
>>> I'm utterly shocked by the lack of posts and questions about this very
>>> cool variation of the Clojure compiler. Think people Develop iOS apps
>>> in Clojure! Awesome and fun. I suggest that the author and his team try to
>>> see if you can present at ClojureWest. Need to get the word out.
>>>
>>> Anyway, quick question to the OP. Can you post an example where you
>>> subclass UIViewController and throw up a simple UIView with say a button
>>> and delegate method that gets called on button click. Would love to see
>>> where and how you do your 'release' calls as well.
>>>
>>> I think a simple example like above would give people some understanding
>>> on how to really start digging in to clojure-objc.
>>>
>>> - PublicFarley
>>>
>>>
>>> On Friday, January 24, 2014 1:37:01 AM UTC-5, Gal Dolber wrote:

 clojure-objc is a clojure compiler that generates java(instead of
 bytecode) and uses j2objc(https://code.google.com/p/j2objc/) to
 translate it to objc.

 Goals
  * Write iOS and MacOS apps in clojure
  * Future proof: new features on clojure should be easy to add
  * Distribute clojure-objc libs using maven
  * Pure clojure libs should 'just work' (if they only use the jre emulated 
 classes)
  * ObjC dynamic interop
  * Run tests in the jvm (with no ObjC interop)

 For more information:
 https://github.com/galdolber/clojure-objc

 Lein plugin:
 https://github.com/galdolber/lein-objcbuild

 Sample project:
 https://github.com/galdolber/clojure-objc-sample

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

Re: ANN: clojure-objc

2014-01-25 Thread Devin Walters
(inc #'your/idea)

I performance related questions similar to Tim, but I think having some good 
"getting started" material might give me a way to start testing the boundaries 
myself.

Cheers,
'(Devin Walters)

> On Jan 25, 2014, at 17:31, PublicFarley  wrote:
> 
> I'm utterly shocked by the lack of posts and questions about this very cool 
> variation of the Clojure compiler. Think people Develop iOS apps in 
> Clojure! Awesome and fun. I suggest that the author and his team try to see 
> if you can present at ClojureWest. Need to get the word out.
> 
> Anyway, quick question to the OP. Can you post an example where you subclass 
> UIViewController and throw up a simple UIView with say a button and delegate 
> method that gets called on button click. Would love to see where and how you 
> do your 'release' calls as well.
> 
> I think a simple example like above would give people some understanding on 
> how to really start digging in to clojure-objc.
> 
> - PublicFarley
> 
>> On Friday, January 24, 2014 1:37:01 AM UTC-5, Gal Dolber wrote:
>> clojure-objc is a clojure compiler that generates java(instead of bytecode) 
>> and uses j2objc(https://code.google.com/p/j2objc/) to translate it to objc.
>> 
>> Goals
>>  * Write iOS and MacOS apps in clojure
>>  * Future proof: new features on clojure should be easy to add 
>>  * Distribute clojure-objc libs using maven
>>  * Pure clojure libs should 'just work' (if they only use the jre emulated 
>> classes)
>>  * ObjC dynamic interop
>>  * Run tests in the jvm (with no ObjC interop)
>>  
>> For more information:
>> https://github.com/galdolber/clojure-objc
>> 
>> Lein plugin:
>> https://github.com/galdolber/lein-objcbuild
>> 
>> Sample project:
>> https://github.com/galdolber/clojure-objc-sample
> 
> -- 
> -- 
> 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] New put api

2014-01-25 Thread Sean Corfield
On Jan 23, 2014, at 1:47 PM, Timothy Baldridge  wrote:
> Sadly, put! on a closed channel has never thrown an exception (regardless of 
> what the docstring says).

LOL! OK, then I'm happy.

> So to answer your question about closing with pending puts. 
> 
> 1) call put! on an open channel with no takes. 
> 2) put! returns true, since the put was enqueued. But since it was enqueued, 
> the callback has not been dispatched.
> 3) close! the channel. Still no dispatch as close! does not discard data
> 4) call take!. The take will succeed instantly (due to the pending put), and 
> the callback will be dispatched with true since the put succeeded.

Excellent! That's exactly what I _hoped_ the new semantics were and it 
clarifies for me what happens when you close a channel that has data pending 
(enqueued).

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

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





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: ANN: clojure-objc

2014-01-25 Thread Timothy Baldridge
What's the performance of this code like? I'd be interested in seeing how
performance on Clojure data structures compares. In my experiments with
reference counting and highly polymorphic code, getting much faster than
languages like Python was quite hard. Without a more dedicated optimizer
that understands Clojure code, I'm not sure how fast it can be.

Secondly, how does j2objc get around reference counting and atomic updates.
Articles such as this :
http://hacksoflife.blogspot.com/2009/07/cas-and-reference-counting-dont-mix.htmlbasically
suggest that attempting  lock free references (like atoms) with
reference counting is not exactly easy. I'm interested in how j2objc solves
this as well.

Timothy


On Sat, Jan 25, 2014 at 5:17 PM, Gal Dolber  wrote:

> Hey, you cannot subclass from clojure at the moment. But I its not
> necessary..
> Just create a UIView, add subviews, properties and listeners. And if you
> need a UIViewController to pass around, create one and set the view with
> setView:
>
> I have a small ui framework, but its not ready to open source.
> Its amazing what you can do with AutoLayouts when you have full access to
> them, I haven't miss Storyboards..
> I'll try to get this ready and post an example.
>
> On the other side, I was really curious to see what people would come out
> with to do UI with no subclassing.. I came out with one solution, but I'm
> sure its not the only one.
>
>
> On Sat, Jan 25, 2014 at 8:31 PM, PublicFarley wrote:
>
>> I'm utterly shocked by the lack of posts and questions about this very
>> cool variation of the Clojure compiler. Think people Develop iOS apps
>> in Clojure! Awesome and fun. I suggest that the author and his team try to
>> see if you can present at ClojureWest. Need to get the word out.
>>
>> Anyway, quick question to the OP. Can you post an example where you
>> subclass UIViewController and throw up a simple UIView with say a button
>> and delegate method that gets called on button click. Would love to see
>> where and how you do your 'release' calls as well.
>>
>> I think a simple example like above would give people some understanding
>> on how to really start digging in to clojure-objc.
>>
>> - PublicFarley
>>
>>
>> On Friday, January 24, 2014 1:37:01 AM UTC-5, Gal Dolber wrote:
>>>
>>> clojure-objc is a clojure compiler that generates java(instead of
>>> bytecode) and uses j2objc(https://code.google.com/p/j2objc/) to
>>> translate it to objc.
>>>
>>> Goals
>>>  * Write iOS and MacOS apps in clojure
>>>  * Future proof: new features on clojure should be easy to add
>>>  * Distribute clojure-objc libs using maven
>>>  * Pure clojure libs should 'just work' (if they only use the jre emulated 
>>> classes)
>>>  * ObjC dynamic interop
>>>  * Run tests in the jvm (with no ObjC interop)
>>>
>>> For more information:
>>> https://github.com/galdolber/clojure-objc
>>>
>>> Lein plugin:
>>> https://github.com/galdolber/lein-objcbuild
>>>
>>> Sample project:
>>> https://github.com/galdolber/clojure-objc-sample
>>>
>>  --
>> --
>> 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.
>



-- 
"One of the main causes of the fall of the Roman Empire was that-lacking
zero-they had no way to indicate successful termination of their C
programs."
(Robert Firth)

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

Re: ANN: Om 0.3.0

2014-01-25 Thread john walker
This fixed it for me. Thanks !

On Saturday, January 25, 2014 7:13:43 PM UTC-5, David Nolen wrote:
>
> The tutorial doesn't cover using advanced optimizations and it doesn't 
> appear your index.html page is setup for it. I switched your project to use 
> :optimizations :none. I ran `lein cljsbuild clean` to blow everything away. 
> I ran CIDER and followed your instructions. At that point everything works 
> for me, both when I load the page initially and even if I eval everything.
>
> If you want to use :optimizations :advanced you will need to change your 
> project.clj settings to the one covered in the Om README. In general 
> :optimizations :advanced is not very useful for interactive development.
>
> I will say I'm not that familiar with Austin and the Tutorial is not mean 
> to cover every possible environment setup someone would want to use.
>
> HTH.
>
>
> On Sat, Jan 25, 2014 at 6:40 PM, john walker 
> 
> > wrote:
>
>> The one on master is using 0.2.3. Checkout the 0.3.0 branch for the same 
>> results.
>>
>>
>> On Saturday, January 25, 2014 6:17:32 PM UTC-5, David Nolen wrote:
>>
>>> That project.clj is using Om 0.2.3 and not Om 0.3.0.
>>>
>>>
>>> On Sat, Jan 25, 2014 at 6:16 PM, john walker wrote:
>>>
 Woops, left it off:

 https://github.com/johnwalker/hellom


 On Saturday, January 25, 2014 6:15:59 PM UTC-5, john walker wrote:
>
> This is what I did (using the om-start template.)
>
> On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote:
>>
>> I cannot replicate this. If somebody wants to publish a repo that 
>> exhibits the problem I'll take a look. Thanks.
>>
>>
>> On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht <
>> ru...@engelbrecht.me> wrote:
>>
>>> I experienced the same as you when following the tutorial - it works 
>>> the first time and when adding the deref the delete button stops 
>>> working 
>>>
>>> Rudi 
>>>
>>> On Jan 26, 2014, at 6:51 AM, David Pidcock  
>>> wrote: 
>>>
>>> I was following along with this and hit an interesting "bug" 
>>>
>>> The contact list delete button actually works "out of the gate" in 
>>> the first example, (when its supposed to fail) and when I add the deref 
>>> in 
>>> the next step I get 
>>>
>>> Uncaught Error: No protocol method IDeref.-deref defined for type 
>>> om.core/MapCursor: [object Object] 
>>>
>>> And that was with 0.2.3 and 0.3.0 (I tried both) 
>>>
>>> --
>>> --
>>>
>>> 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 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 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/o

Re: ANN: clojure-objc

2014-01-25 Thread Gal Dolber
Hey, you cannot subclass from clojure at the moment. But I its not
necessary..
Just create a UIView, add subviews, properties and listeners. And if you
need a UIViewController to pass around, create one and set the view with
setView:

I have a small ui framework, but its not ready to open source.
Its amazing what you can do with AutoLayouts when you have full access to
them, I haven't miss Storyboards..
I'll try to get this ready and post an example.

On the other side, I was really curious to see what people would come out
with to do UI with no subclassing.. I came out with one solution, but I'm
sure its not the only one.


On Sat, Jan 25, 2014 at 8:31 PM, PublicFarley wrote:

> I'm utterly shocked by the lack of posts and questions about this very
> cool variation of the Clojure compiler. Think people Develop iOS apps
> in Clojure! Awesome and fun. I suggest that the author and his team try to
> see if you can present at ClojureWest. Need to get the word out.
>
> Anyway, quick question to the OP. Can you post an example where you
> subclass UIViewController and throw up a simple UIView with say a button
> and delegate method that gets called on button click. Would love to see
> where and how you do your 'release' calls as well.
>
> I think a simple example like above would give people some understanding
> on how to really start digging in to clojure-objc.
>
> - PublicFarley
>
>
> On Friday, January 24, 2014 1:37:01 AM UTC-5, Gal Dolber wrote:
>>
>> clojure-objc is a clojure compiler that generates java(instead of
>> bytecode) and uses j2objc(https://code.google.com/p/j2objc/) to
>> translate it to objc.
>>
>> Goals
>>  * Write iOS and MacOS apps in clojure
>>  * Future proof: new features on clojure should be easy to add
>>  * Distribute clojure-objc libs using maven
>>  * Pure clojure libs should 'just work' (if they only use the jre emulated 
>> classes)
>>  * ObjC dynamic interop
>>  * Run tests in the jvm (with no ObjC interop)
>>
>> For more information:
>> https://github.com/galdolber/clojure-objc
>>
>> Lein plugin:
>> https://github.com/galdolber/lein-objcbuild
>>
>> Sample project:
>> https://github.com/galdolber/clojure-objc-sample
>>
>  --
> --
> 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 0.3.0

2014-01-25 Thread David Nolen
The tutorial doesn't cover using advanced optimizations and it doesn't
appear your index.html page is setup for it. I switched your project to use
:optimizations :none. I ran `lein cljsbuild clean` to blow everything away.
I ran CIDER and followed your instructions. At that point everything works
for me, both when I load the page initially and even if I eval everything.

If you want to use :optimizations :advanced you will need to change your
project.clj settings to the one covered in the Om README. In general
:optimizations :advanced is not very useful for interactive development.

I will say I'm not that familiar with Austin and the Tutorial is not mean
to cover every possible environment setup someone would want to use.

HTH.


On Sat, Jan 25, 2014 at 6:40 PM, john walker wrote:

> The one on master is using 0.2.3. Checkout the 0.3.0 branch for the same
> results.
>
>
> On Saturday, January 25, 2014 6:17:32 PM UTC-5, David Nolen wrote:
>
>> That project.clj is using Om 0.2.3 and not Om 0.3.0.
>>
>>
>> On Sat, Jan 25, 2014 at 6:16 PM, john walker wrote:
>>
>>> Woops, left it off:
>>>
>>> https://github.com/johnwalker/hellom
>>>
>>>
>>> On Saturday, January 25, 2014 6:15:59 PM UTC-5, john walker wrote:

 This is what I did (using the om-start template.)

 On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote:
>
> I cannot replicate this. If somebody wants to publish a repo that
> exhibits the problem I'll take a look. Thanks.
>
>
> On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht <
> ru...@engelbrecht.me> wrote:
>
>> I experienced the same as you when following the tutorial - it works
>> the first time and when adding the deref the delete button stops working
>>
>> Rudi
>>
>> On Jan 26, 2014, at 6:51 AM, David Pidcock 
>> wrote:
>>
>> I was following along with this and hit an interesting "bug"
>>
>> The contact list delete button actually works "out of the gate" in
>> the first example, (when its supposed to fail) and when I add the deref 
>> in
>> the next step I get
>>
>> Uncaught Error: No protocol method IDeref.-deref defined for type
>> om.core/MapCursor: [object Object]
>>
>> And that was with 0.2.3 and 0.3.0 (I tried both)
>>
>> --
>> --
>>
>> 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 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 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 unsubscr

Re: ANN: Om 0.3.0

2014-01-25 Thread john walker
The one on master is using 0.2.3. Checkout the 0.3.0 branch for the same 
results.

On Saturday, January 25, 2014 6:17:32 PM UTC-5, David Nolen wrote:
>
> That project.clj is using Om 0.2.3 and not Om 0.3.0.
>
>
> On Sat, Jan 25, 2014 at 6:16 PM, john walker 
> 
> > wrote:
>
>> Woops, left it off:
>>
>> https://github.com/johnwalker/hellom
>>
>>
>> On Saturday, January 25, 2014 6:15:59 PM UTC-5, john walker wrote:
>>>
>>> This is what I did (using the om-start template.)
>>>
>>> On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote:

 I cannot replicate this. If somebody wants to publish a repo that 
 exhibits the problem I'll take a look. Thanks.


 On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht >>> > wrote:

> I experienced the same as you when following the tutorial - it works 
> the first time and when adding the deref the delete button stops working 
>
> Rudi 
>
> On Jan 26, 2014, at 6:51 AM, David Pidcock  
> wrote: 
>
> I was following along with this and hit an interesting "bug" 
>
> The contact list delete button actually works "out of the gate" in the 
> first example, (when its supposed to fail) and when I add the deref in 
> the 
> next step I get 
>
> Uncaught Error: No protocol method IDeref.-deref defined for type 
> om.core/MapCursor: [object Object] 
>
> And that was with 0.2.3 and 0.3.0 (I tried both) 
>
> --
> --
>
> 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 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 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.


Re: Helping newcomers get involved in Clojure projects

2014-01-25 Thread Marcus Blankenship
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 initiative for 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.


Re: core.async over websocket + cljs + clojure

2014-01-25 Thread t x
I believe the semantics can be simplified as this:

  * the server (clj) can disconnect at any time

  * the client (cljs) has the responsibility of
(1) informing the user
(2) reconnecting
(3) figuring out what went wrong
in such events

I believe this is both necessary and sufficient.

It's sufficient in that a dropped network connection can be viewed as
"server decided to disconnect."

It's also necessary in that -- if we want defensive programming and to
avoid DOS attacks by malicious clients, it's important for the server to,
at some point, say "F U client, you're out of tokens; I'm disconnecting
you" or to say "F U client, I can't send data to you; I'm disconnecting
you."

This is not CSP semantics, but I believe it's both necessary and sufficient
for having "core.async" across the network -- the semantics being

  * the server can, at any time, arbitrary disconnect a client
  * it's the client's job to inform the user / try to reconnect



On Sat, Jan 25, 2014 at 3:17 PM, Michał Marczyk wrote:

> If the application is structured in such a way that messages from the
> other side of the client/server divide are put on channels upon
> arrival, which seems to be a reasonable idea, why not encapsulate the
> connection-handling logic in a black box exposing a (bunch of)
> channel(s)?
>
> On 26 January 2014 00:01, Patrick Logan  wrote:
> > This seems like more trouble than it is worth. There are almost
> certainly suitable but more established protocols and implementations for
> the problem at hand. Anyway, maybe it's worth exploring. To me it seems to
> muddy the waters for what core.async seems intended to provide, which seems
> to me to be fairly straight-forward CSP.
> >
> > --
> > --
> > 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: ANN: clojure-objc

2014-01-25 Thread PublicFarley
I'm utterly shocked by the lack of posts and questions about this very cool 
variation of the Clojure compiler. Think people Develop iOS apps in 
Clojure! Awesome and fun. I suggest that the author and his team try to see 
if you can present at ClojureWest. Need to get the word out.

Anyway, quick question to the OP. Can you post an example where you 
subclass UIViewController and throw up a simple UIView with say a button 
and delegate method that gets called on button click. Would love to see 
where and how you do your 'release' calls as well.

I think a simple example like above would give people some understanding on 
how to really start digging in to clojure-objc.

- PublicFarley

On Friday, January 24, 2014 1:37:01 AM UTC-5, Gal Dolber wrote:
>
> clojure-objc is a clojure compiler that generates java(instead of 
> bytecode) and uses j2objc(https://code.google.com/p/j2objc/) to translate 
> it to objc.
>
> Goals
>  * Write iOS and MacOS apps in clojure
>  * Future proof: new features on clojure should be easy to add 
>  * Distribute clojure-objc libs using maven
>  * Pure clojure libs should 'just work' (if they only use the jre emulated 
> classes)
>  * ObjC dynamic interop
>  * Run tests in the jvm (with no ObjC interop)
>  
> For more information:
> https://github.com/galdolber/clojure-objc
>
> Lein plugin:
> https://github.com/galdolber/lein-objcbuild
>
> Sample project:
> https://github.com/galdolber/clojure-objc-sample
>

-- 
-- 
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-25 Thread Michał Marczyk
If the application is structured in such a way that messages from the
other side of the client/server divide are put on channels upon
arrival, which seems to be a reasonable idea, why not encapsulate the
connection-handling logic in a black box exposing a (bunch of)
channel(s)?

On 26 January 2014 00:01, Patrick Logan  wrote:
> This seems like more trouble than it is worth. There are almost certainly 
> suitable but more established protocols and implementations for the problem 
> at hand. Anyway, maybe it's worth exploring. To me it seems to muddy the 
> waters for what core.async seems intended to provide, which seems to me to be 
> fairly straight-forward CSP.
>
> --
> --
> 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 0.3.0

2014-01-25 Thread john walker
Woops, left it off:

https://github.com/johnwalker/hellom

On Saturday, January 25, 2014 6:15:59 PM UTC-5, john walker wrote:
>
> This is what I did (using the om-start template.)
>
> On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote:
>>
>> I cannot replicate this. If somebody wants to publish a repo that 
>> exhibits the problem I'll take a look. Thanks.
>>
>>
>> On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht 
>> wrote:
>>
>>> I experienced the same as you when following the tutorial - it works the 
>>> first time and when adding the deref the delete button stops working 
>>>
>>> Rudi 
>>>
>>> On Jan 26, 2014, at 6:51 AM, David Pidcock  wrote: 
>>>
>>> I was following along with this and hit an interesting "bug" 
>>>
>>> The contact list delete button actually works "out of the gate" in the 
>>> first example, (when its supposed to fail) and when I add the deref in the 
>>> next step I get 
>>>
>>> Uncaught Error: No protocol method IDeref.-deref defined for type 
>>> om.core/MapCursor: [object Object] 
>>>
>>> And that was with 0.2.3 and 0.3.0 (I tried both) 
>>>
>>> --
>>> --
>>>
>>> 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 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.


Re: ANN: Om 0.3.0

2014-01-25 Thread David Nolen
That project.clj is using Om 0.2.3 and not Om 0.3.0.


On Sat, Jan 25, 2014 at 6:16 PM, john walker wrote:

> Woops, left it off:
>
> https://github.com/johnwalker/hellom
>
>
> On Saturday, January 25, 2014 6:15:59 PM UTC-5, john walker wrote:
>>
>> This is what I did (using the om-start template.)
>>
>> On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote:
>>>
>>> I cannot replicate this. If somebody wants to publish a repo that
>>> exhibits the problem I'll take a look. Thanks.
>>>
>>>
>>> On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht 
>>> wrote:
>>>
 I experienced the same as you when following the tutorial - it works
 the first time and when adding the deref the delete button stops working

 Rudi

 On Jan 26, 2014, at 6:51 AM, David Pidcock  wrote:

 I was following along with this and hit an interesting "bug"

 The contact list delete button actually works "out of the gate" in the
 first example, (when its supposed to fail) and when I add the deref in the
 next step I get

 Uncaught Error: No protocol method IDeref.-deref defined for type
 om.core/MapCursor: [object Object]

 And that was with 0.2.3 and 0.3.0 (I tried both)

 --
 --

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

2014-01-25 Thread john walker
This is what I did (using the om-start template.)

On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote:
>
> I cannot replicate this. If somebody wants to publish a repo that exhibits 
> the problem I'll take a look. Thanks.
>
>
> On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht 
> 
> > wrote:
>
>> I experienced the same as you when following the tutorial - it works the 
>> first time and when adding the deref the delete button stops working 
>>
>> Rudi 
>>
>> On Jan 26, 2014, at 6:51 AM, David Pidcock > 
>> wrote: 
>>
>> I was following along with this and hit an interesting "bug" 
>>
>> The contact list delete button actually works "out of the gate" in the 
>> first example, (when its supposed to fail) and when I add the deref in the 
>> next step I get 
>>
>> Uncaught Error: No protocol method IDeref.-deref defined for type 
>> om.core/MapCursor: [object Object] 
>>
>> And that was with 0.2.3 and 0.3.0 (I tried both) 
>>
>> --
>> --
>>
>> 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 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.


Re: core.async over websocket + cljs + clojure

2014-01-25 Thread Patrick Logan
This seems like more trouble than it is worth. There are almost certainly 
suitable but more established protocols and implementations for the problem at 
hand. Anyway, maybe it's worth exploring. To me it seems to muddy the waters 
for what core.async seems intended to provide, which seems to me to be fairly 
straight-forward CSP. 

-- 
-- 
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-25 Thread David Nolen
I cannot replicate this. If somebody wants to publish a repo that exhibits
the problem I'll take a look. Thanks.


On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht wrote:

> I experienced the same as you when following the tutorial - it works the
> first time and when adding the deref the delete button stops working
>
> Rudi
>
> On Jan 26, 2014, at 6:51 AM, David Pidcock  wrote:
>
> I was following along with this and hit an interesting "bug"
>
> The contact list delete button actually works "out of the gate" in the
> first example, (when its supposed to fail) and when I add the deref in the
> next step I get
>
> Uncaught Error: No protocol method IDeref.-deref defined for type
> om.core/MapCursor: [object Object]
>
> And that was with 0.2.3 and 0.3.0 (I tried both)
>
> --
> --
>
> 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 memory usage

2014-01-25 Thread Sean Corfield
On Jan 25, 2014, at 2:32 PM, Cedric Greevey  wrote:
> You might want to use the G1 collector (JVM opt UseG1GC) if you're using Java 
> 7 as I've heard that the G1 collector gives memory back to the OS more 
> readily than the other options.

My experience with Java 7 and the G1 collector in production would not support 
that. However, the G1 collector certainly evens out the sawtooth memory usage 
patterns you often see with the JVM (prior to G1 / Java 7) which makes for 
smoother response times etc.

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

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





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Clojure memory usage

2014-01-25 Thread Cedric Greevey
You might want to use the G1 collector (JVM opt UseG1GC) if you're using
Java 7 as I've heard that the G1 collector gives memory back to the OS more
readily than the other options.


On Sat, Jan 25, 2014 at 1:55 PM, Jarrod Swart  wrote:

> This was talked about here:
> https://groups.google.com/forum/#!searchin/clojure/user$3A$20g$20vim/clojure/XqPGnX5aSAI/PoLYaydgX3cJ
>
> TLDR: The JVM carves out its own chunk of memory from the OS.  It then
> uses very advanced and finely tuned means to manage said memory.  So even
> though the app isn't doing anything the JVM is still using its memory.
>  Best to load up your app and profile it with VisualVM to see what is
> actually going on.
>
>
> On Saturday, January 25, 2014 12:44:28 PM UTC-5, Anurag Ramdasan wrote:
>>
>> I've been playing around with clojure for a while now but never actually
>> made anything in it.
>> Today I started looking around into pedestal and started following its
>> tutorials. Once I kept the
>> server running for a few hours I noticed that it took upto 500MB of my
>> ram even though it wasn't really
>> doing anything. Is pedestal usually this memory hungry?
>>
>> I know that usually things running on JVM have some amount of memory
>> usage. Are all full-fledged apps
>> written in Clojure usually memory intensive? If not, does clojure have a
>> lightweight, less memory consuming
>> web framework?
>>
>> Thanks,
>> Anurag Ramdasan.
>>
>  --
> --
> 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-25 Thread Cedric Greevey
What about a hybrid blocking/timeout approach? At the sending end of the
network bridge you have the "taker" and at the receiving end the "putter".
The "putter", when it sees an object on the wire, puts it on a local
channel (blocking put with timeout). If it succeeds it sends an ack up the
wire. If the timeout elapses it sends a heartbeat up the wire instead, then
tries again. The "taker", meanwhile, takes from a channel and sends the
object on the wire, then waits for an ack or a heartbeat with a longer
timeout. If neither arrives within this timeout, it uses another channel to
signal the application that the network connection to the "putter" was
lost. If a heartbeat arrives it waits again, with the clock restarted. If
an ack arrives, it takes another object from a channel and sends it on the
wire.

This should cause backpressure to go over the network to the sending end
and block the sender, but with the caveat that if the network connection is
actually lost, the sender's business logic will discover that shortly, and
can distinguish it from the receiver just being slow to process each item.
In particular, it can listen for a network drop event on a control channel,
and separately use a timeout when putting onto the "taker" channel to react
if the receiver is too slow but still connected.


On Sat, Jan 25, 2014 at 9:11 AM, Patrick Logan wrote:

> In CSP you might have a limited size buffer, but then block on the next
> Put. That's not something you want to casually attempt over a distance. It
> seems you want an interface like Channels that deal in fully formed
> objects, but you don't want CSP blocking semantics.
>
> --
> --
> 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 0.3.0

2014-01-25 Thread Rudi Engelbrecht
I experienced the same as you when following the tutorial - it works the first 
time and when adding the deref the delete button stops working


Rudi


> On Jan 26, 2014, at 6:51 AM, David Pidcock  wrote:
> 
> 
> I was following along with this and hit an interesting "bug"
> 
> 
> The contact list delete button actually works "out of the gate" in the first 
> example, (when its supposed to fail) and when I add the deref in the next 
> step I get
> 
> 
> Uncaught Error: No protocol method IDeref.-deref defined for type 
> om.core/MapCursor: [object Object]
> 
> 
> And that was with 0.2.3 and 0.3.0 (I tried both)
> 
> 
> --
> --
> 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 0.3.0

2014-01-25 Thread Rudi Engelbrecht
Hi David


Thank you for a great tutorial!


I really enjoyed working through your Tutorial on LightTable and Om. 


A note: In my environment the contact is being deleted when the contact-view 
has the following code
(defn contact-view [contact owner]  (reifyom/IRenderState(render-state 
[this {:keys [delete]}]  (dom/li nil(dom/span nil (display-name 
contact))(dom/button #js {:onClick (fn [e] (put! delete contact))} 
"Delete")

and not when it is the following:
(defn contact-view [contact owner]
  (reify
om/IRenderState
(render-state [this {:keys [delete]}]
  (dom/li nil
(dom/span nil (display-name contact))
(dom/button #js {:onClick (fn [e] (put! delete @contact))} "Delete")


So the change to
(put! delete @contact)


has the effect of the delete button not working anymore.


I will investigate further.


Kind regards


Rudi


> On Jan 25, 2014, at 11:16 AM, 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
> 
> 
> --
> --
> 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, visithttps://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 0.3.0

2014-01-25 Thread john walker
I'm getting the deref error, but the first example failed as expected in 
0.3.0.

On Saturday, January 25, 2014 2:51:08 PM UTC-5, David Pidcock wrote:
>
> I was following along with this and hit an interesting "bug" 
>
> The contact list delete button actually works "out of the gate" in the 
> first example, (when its supposed to fail) and when I add the deref in the 
> next step I get 
>
> Uncaught Error: No protocol method IDeref.-deref defined for type 
> om.core/MapCursor: [object Object] 
>
> And that was with 0.2.3 and 0.3.0 (I tried both) 
>

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


simple-check gen/boolean Only Returning false

2014-01-25 Thread Michael Daines
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.

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


So, how much do you really know about clojure's internals?

2014-01-25 Thread Gal Dolber
https://github.com/galdolber/clojure-core-java

-- 
-- 
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-25 Thread Timothy Washington
+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.


Re: ANN: Om 0.3.0

2014-01-25 Thread David Pidcock
I was following along with this and hit an interesting "bug"

The contact list delete button actually works "out of the gate" in the first 
example, (when its supposed to fail) and when I add the deref in the next step 
I get 

Uncaught Error: No protocol method IDeref.-deref defined for type 
om.core/MapCursor: [object Object] 

And that was with 0.2.3 and 0.3.0 (I tried both)

-- 
-- 
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-25 Thread Marcus Blankenship
+1

One idea: what about doing some remote pairing and "virtual hackathon"
sessions which let people work together?  I went to a hackathon this
weekend and it seems like a great way to learn.

Thanks,
Marcus

Marcus Blankenship
541-805-2736

On Jan 25, 2014, at 11:24 AM, Mimmo Cosenza  wrote:

+1

On Jan 25, 2014, at 7: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.

-- 
-- 
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-25 Thread Mimmo Cosenza
+1

On Jan 25, 2014, at 7:54 PM, Bridget  wrote:

> OpenHatch has this great initiative for 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.



signature.asc
Description: Message signed with OpenPGP using GPGMail


[ANN] Stefon: A Composable Blog Engine

2014-01-25 Thread Timothy Washington
The kernel of Stefon  has
stabilized to a point where people can start writing plugins against it. I
still want to deliver *i)* a database and *ii)* webui plugin along with the
core kernel. But my schedule's packed up, and I don't want to leave it too
long.

   - After a few refactorings, plugin message passing is working
   consistently
   - Stefon tests are running
   - An example plugin in "*plugins/heartbeat/plugin.clj
   
*
   "


I need to redo Stefon-Datomic
to
adhere to the new plugin handshake mechanism. And
Stefon-Compojureis
dragging along. But it has one
exampleof
how a plugin can handle message passing.

Obviously, I could use some extra help. So anyone is interested in or finds
utility in the project, feel free to dive in and help build out the core
plugins. Documentation has been cleaned up, but is still a work in
progress. Ask any questions.


Enjoy

Tim Washington
Interruptsoftware.com 

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


Re: Helping newcomers get involved in Clojure projects

2014-01-25 Thread Jarrod Swart

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


I've been thinking about this as well, and I would love to hear your 
thoughts.  Please elaborate! 

On Saturday, January 25, 2014 1:54:10 PM UTC-5, 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.


Re: Rename file uploaded

2014-01-25 Thread Jarrod Swart
Nothing sticks out, but a NullPointerException is something I most commonly 
get as a result of an incorrect file path.  Things I would do:

1. Make sure that (gallery-path) actually exists or is writable.
2. I would do (POST "/upload" [file] (println file) (handle-upload file))), 
to inspect what you are capturing on the route destructure.

Again that NullPointerException means that the code is expecting some 
object, but you are passing in null.  As I stated 99% of the time I get 
that error in Clojure it is due to an improper path/filename/resource.  So 
I would start checking any part of the code that reads/writes to files on 
the hard drive.  Make sure they have the proper permissions, and that the 
paths look write.

I'm sure this seems like stuff you know or may have tried, but I found when 
getting started with Clojure that everything was so new in general that it 
broke my ability to "debug".  I had to learn how to troubleshoot all over 
again.

Good luck!

On Saturday, January 25, 2014 2:10:57 AM UTC-5, The Dude (Abides) wrote:
>
> Hi Jarrod, thanks for your help. I tried that but got a 
>
> java.lang.NullPointerException error again.
>
> I tried the code without the add-timestamp and still get the 
>
> java.lang.NullPointerException
>
> When I try it as just :filename filename it does in fact show only the 
> file name. 
>
> So not sure why this is being so tricky, rest of clojure stuff has been 
> very straightforward, this one file load issue is more boilerplate than I'm 
> used to in ruby or coldfusion, and it just seems v tricky as the error 
> codes are not yielding the source of the problem or maybe I don't yet know 
> how to interpret them properly. 
>
> It doesn't seem the problem is in the "add-timestamp" function, as the 
> operation croaks even before getting there when I isolate it to just 
> 'handle-upload' function without ever calling the add-timestamp function. 
>
> I'll post the entire code again just in case you may spot where the error 
> maybe. Perhaps the problem is in the libs I'm requiring or importing? Again 
> thanks for taking a look, much appreciated.
>
> (ns pgapp.routes.upload
>   (:require [compojure.core :refer [defroutes GET POST]]
> [pgapp.views.layout :as layout]
> [noir.io :refer [upload-file resource-path]]
> [noir.session :as session]
> [noir.response :as resp]
> [noir.util.route :refer [restricted]]
> [clojure.java.io :as io]
> [ring.util.response :refer [file-response]]
> [taoensso.timbre :refer [error]]
> [pgapp.models.db :as db]
> [clj-time.core :as time]
> [clj-time.coerce :as tc]
> [pgapp.util
> :refer [galleries gallery-path thumb-uri thumb-prefix 
> unique-prefix]])
>(:import [java.io File FileInputStream FileOutputStream]
> javax.imageio.ImageIO))
>
> (defn upload-page [info]  
>   (layout/render "upload.html"))
>
> (defn add-timestamp [filename]
>  (let [ext-position (.lastIndexOf filename ".")
>timestamp(tc/to-long (time/now))]
>(if (pos? ext-position)
>  (str (.substring filename 0 ext-position)
>   "-" timestamp (.substring filename ext-position))
>  (str filename "-" timestamp
>
> (defn handle-upload [filename]
>  (upload-file (gallery-path) (add-timestamp (:filename filename)))
>  (resp/redirect "/upload"))
>
> (defroutes upload-routes
>   (GET "/upload" [info] (upload-page {:info info}))
>   (POST "/upload" [file] (handle-upload file)))
>

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


Helping newcomers get involved in Clojure projects

2014-01-25 Thread Bridget
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.


Re: Clojure memory usage

2014-01-25 Thread Jarrod Swart
This was talked about here: 
https://groups.google.com/forum/#!searchin/clojure/user$3A$20g$20vim/clojure/XqPGnX5aSAI/PoLYaydgX3cJ

TLDR: The JVM carves out its own chunk of memory from the OS.  It then uses 
very advanced and finely tuned means to manage said memory.  So even though 
the app isn't doing anything the JVM is still using its memory.  Best to 
load up your app and profile it with VisualVM to see what is actually going 
on.

On Saturday, January 25, 2014 12:44:28 PM UTC-5, Anurag Ramdasan wrote:
>
> I've been playing around with clojure for a while now but never actually 
> made anything in it.
> Today I started looking around into pedestal and started following its 
> tutorials. Once I kept the 
> server running for a few hours I noticed that it took upto 500MB of my ram 
> even though it wasn't really 
> doing anything. Is pedestal usually this memory hungry? 
>
> I know that usually things running on JVM have some amount of memory 
> usage. Are all full-fledged apps 
> written in Clojure usually memory intensive? If not, does clojure have a 
> lightweight, less memory consuming 
> web framework?
>
> Thanks,
> Anurag Ramdasan.
>

-- 
-- 
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-25 Thread Jarrod Swart
I've thought about this in the past, but the callback style node requires 
is not very appealing to me for scripting.  Most python scripts I write are 
very imperative/sequential, does CLJS abstract any of that away?

On Saturday, January 25, 2014 2:14:05 AM UTC-5, 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 from this group and stop receiving emails from it, send 
> an email to clojure+u...@googlegroups.com  (mailto:
> 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

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

2014-01-25 Thread Sam Ritchie

Nice! Aphyr's interval-metrics also does a really nice job here:

https://github.com/aphyr/interval-metrics


Stuart Sierra 
January 25, 2014 10:39 AM
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.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com 
Twitter // Facebook 



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

2014-01-25 Thread Mimmo Cosenza
Thanks David, 
it could be even better if someone explains to me how to make austin to run in 
a browser connected REPL with `:none` optimization ;-)

mimmo

On Jan 25, 2014, at 6:37 PM, David Nolen  wrote:

> This is great, thank you!
> 
> 
> On Sat, Jan 25, 2014 at 10: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
> 
> 
> 
> -- 
> 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.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Clojure memory usage

2014-01-25 Thread Anurag Ramdasan
I've been playing around with clojure for a while now but never actually 
made anything in it.
Today I started looking around into pedestal and started following its 
tutorials. Once I kept the 
server running for a few hours I noticed that it took upto 500MB of my ram 
even though it wasn't really 
doing anything. Is pedestal usually this memory hungry? 

I know that usually things running on JVM have some amount of memory usage. 
Are all full-fledged apps 
written in Clojure usually memory intensive? If not, does clojure have a 
lightweight, less memory consuming 
web framework?

Thanks,
Anurag Ramdasan.

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

2014-01-25 Thread Stuart Sierra
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: [ClojureScript] [ANN] om-start lein template for nrepl compliant editors/IDEs

2014-01-25 Thread David Nolen
This is great, thank you!


On Sat, Jan 25, 2014 at 10: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: [ClojureScript] [ANN] om-start lein template for nrepl compliant editors/IDEs

2014-01-25 Thread Mimmo Cosenza
Thanks Laurent! 

Has been a pleasure to interact with you!

mimmo

On Jan 25, 2014, at 5:56 PM, Laurent PETIT  wrote:

> Thanks a lot Mimmo, you're invaluable in helping people cross bridges between 
> tools, libraries, and a real bright light for newcomers also !
> 
> Le samedi 25 janvier 2014, Mimmo Cosenza  a écrit :
> 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
> 
> 
> -- 
> 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.



signature.asc
Description: Message signed with OpenPGP using GPGMail


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

2014-01-25 Thread Laurent PETIT
Thanks a lot Mimmo, you're invaluable in helping people cross bridges
between tools, libraries, and a real bright light for newcomers also !

Le samedi 25 janvier 2014, Mimmo Cosenza  a écrit :

> 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: What's your testing flow with the current clj tools?

2014-01-25 Thread Jay Fields
sorry, I forgot to mention you can you also expectations/run-all-tests
(with or without a regex) if you're the kind of developer who likes to
live in the repl.

On Sat, Jan 25, 2014 at 8:19 AM, Jay Fields  wrote:
> I use emacs & expectations[1]
>
> These days I do more repl-driven-development than
> test-driven-development, so the tests tend to come after solving the
> problem at hand. At that point I run all the tests via "lein
> expectations"[2] to get an idea of what's broken. Now that I know what
> test namespaces contain broken tests, I'll open those namespaces in
> emacs and execute them individually with expectations-mode[3]. One
> execution makes it clear which tests are broken, and my next step is
> to fix the existing tests. Once that's done, I take a look at my
> current changes, and determine if any new tests need to be written.
>
> A few friends of mine prefer a more continuous testing style, which is
> also possible if you use lein-autoexpect[4]. One of my friends wrote
> up his experiences on continuous testing here:
> http://jakemccrary.com/blog/2011/12/16/continuous-testing-with-clojure-and-expectations/
>
> I would say above all, you should try out all the tools that are
> available to you, and find out what works best for you. The
> testing/coding flow seems to vary greatly by person, so what's "most
> effective" will largely be driven by you, not by the tools.
>
> [1] http://jayfields.com/expectations/
> [2] https://github.com/gar3thjon3s/lein-expectations
> [3] https://github.com/gar3thjon3s/expectations-mode
> [4] https://github.com/jakemcc/lein-autoexpect
>
> On Sat, Jan 25, 2014 at 12:57 AM, Alexandr Kurilin  wrote:
>> I've been running my app's tests through `lein test` (most often for
>> specific namespaces) for a long time now, but after reading Leiningen's
>> recommendation to run them from the REPL I decided I should figure out how
>> to make this happen.
>>
>> I've heard a few options on this subject, and would love to know what you
>> yourselves use. A couple I stumbled upon were:
>>
>> In your favorite editor with nrepl/cider, do some work in the ns you're
>> testing, reload it from within the editor, then switch to the testing ns and
>> run (clojure.test/run-tests) from within. Then when you're done with your
>> work, run a `lein test` just in case your state while nrepling in was
>> corrupted or another ns was affected etc.
>> Use your favorite editor with nrepl/cider to work on the app's ns, but then
>> switch to a repl started within `lein repl` in which you're only running
>> tests. This potentially helps with a slightly cleaner state. (I'm not clear
>> how you'd reload the app's ns without the hassle of having to always
>> (require) the right set of changed nses)
>> In a new `lein repl`, use bultitude, load all test nses, use
>> clojure.test/run-all-tests with the right regex. Like `lein repl`, minus
>> having to spin up a new JVM every time.
>>
>> I'm currently playing around with the first approach. I'd love to know if I
>> missed something much more effective, or if I can make this a bit simpler
>> and less manual. Tips would be greatly welcome.
>>
>> Cheers!
>>
>>
>> --
>> Alexandr Kurilin
>> 206.687.8740 | @alex_kurilin | blog
>>
>> --
>> --
>> 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: What's your testing flow with the current clj tools?

2014-01-25 Thread Stuart Sierra
I use tools.namespace  to 
cleanly reload all source files which have changed, then `
clojure.test/run-all-tests`
 
with a regex.

-S


On Saturday, January 25, 2014 12:57:23 AM UTC-5, Alexandr Kurilin wrote:
>
> I've been running my app's tests through `lein test` (most often for 
> specific namespaces) for a long time now, but after reading Leiningen's 
> recommendationto
>  run them from the REPL I decided I should figure out how to make this 
> happen.
>
> I've heard a few options on this subject, and would love to know what you 
> yourselves use.
>

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

2014-01-25 Thread Mimmo Cosenza
On Jan 25, 2014, at 2:12 AM, Alexandr Kurilin  wrote:

> 
> I'd love to be able to set breakpoints in a running clojure application, step 
> through the code and inspect locals and the referencing environment. Anything 
> that gets me off of the time-consuming process of adding 
> timbre/clojure.tools.trace statements would be really welcome. Is vim-redl 
> the closest I can get to that, or is ritz the way to go? Any other 
> recommendations?
> 

The paradox is that you can have a simulacra of those features with 
ClojureScript by using :source-map and  Chrome Developer Tools. But AFAIK you 
loose something at the moment (e.g. cljs completion, cljs documentation). 

That said, when the scenario allows it, I always write portable CLJ/CLJS code 
by using cljx plugin. This way I can have an almost full powered REPL 
experience with CLJ REPL and when I really need to set breakpoints or inspect 
locals  (very rare), I switch to CLJS….

mimmo




signature.asc
Description: Message signed with OpenPGP using GPGMail


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

2014-01-25 Thread Mimmo Cosenza
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



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: core.async over websocket + cljs + clojure

2014-01-25 Thread Patrick Logan
In CSP you might have a limited size buffer, but then block on the next Put. 
That's not something you want to casually attempt over a distance. It seems you 
want an interface like Channels that deal in fully formed objects, but you 
don't want CSP blocking semantics.

-- 
-- 
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: What's your testing flow with the current clj tools?

2014-01-25 Thread Jay Fields
I use emacs & expectations[1]

These days I do more repl-driven-development than
test-driven-development, so the tests tend to come after solving the
problem at hand. At that point I run all the tests via "lein
expectations"[2] to get an idea of what's broken. Now that I know what
test namespaces contain broken tests, I'll open those namespaces in
emacs and execute them individually with expectations-mode[3]. One
execution makes it clear which tests are broken, and my next step is
to fix the existing tests. Once that's done, I take a look at my
current changes, and determine if any new tests need to be written.

A few friends of mine prefer a more continuous testing style, which is
also possible if you use lein-autoexpect[4]. One of my friends wrote
up his experiences on continuous testing here:
http://jakemccrary.com/blog/2011/12/16/continuous-testing-with-clojure-and-expectations/

I would say above all, you should try out all the tools that are
available to you, and find out what works best for you. The
testing/coding flow seems to vary greatly by person, so what's "most
effective" will largely be driven by you, not by the tools.

[1] http://jayfields.com/expectations/
[2] https://github.com/gar3thjon3s/lein-expectations
[3] https://github.com/gar3thjon3s/expectations-mode
[4] https://github.com/jakemcc/lein-autoexpect

On Sat, Jan 25, 2014 at 12:57 AM, Alexandr Kurilin  wrote:
> I've been running my app's tests through `lein test` (most often for
> specific namespaces) for a long time now, but after reading Leiningen's
> recommendation to run them from the REPL I decided I should figure out how
> to make this happen.
>
> I've heard a few options on this subject, and would love to know what you
> yourselves use. A couple I stumbled upon were:
>
> In your favorite editor with nrepl/cider, do some work in the ns you're
> testing, reload it from within the editor, then switch to the testing ns and
> run (clojure.test/run-tests) from within. Then when you're done with your
> work, run a `lein test` just in case your state while nrepling in was
> corrupted or another ns was affected etc.
> Use your favorite editor with nrepl/cider to work on the app's ns, but then
> switch to a repl started within `lein repl` in which you're only running
> tests. This potentially helps with a slightly cleaner state. (I'm not clear
> how you'd reload the app's ns without the hassle of having to always
> (require) the right set of changed nses)
> In a new `lein repl`, use bultitude, load all test nses, use
> clojure.test/run-all-tests with the right regex. Like `lein repl`, minus
> having to spin up a new JVM every time.
>
> I'm currently playing around with the first approach. I'd love to know if I
> missed something much more effective, or if I can make this a bit simpler
> and less manual. Tips would be greatly welcome.
>
> Cheers!
>
>
> --
> Alexandr Kurilin
> 206.687.8740 | @alex_kurilin | blog
>
> --
> --
> 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: problems installing lighttable:

2014-01-25 Thread Jozef Wagner
There is a dedicated group to the LightTable at 
https://groups.google.com/forum/#!forum/light-table-discussion 

On Saturday, January 25, 2014 9:43:45 AM UTC+1, t x wrote:
>
> I'm on OSX:
>
> xs-mbp-2% git clone https://github.com/LightTable/LightTable.git
> Cloning into 'LightTable'...
> remote: Reusing existing pack: 4986, done.
> remote: Counting objects: 159, done.
> remote: Compressing objects: 100% (128/128), done.
> remote: Total 5145 (delta 73), reused 79 (delta 9)
> Receiving objects: 100% (5145/5145), 6.31 MiB | 2.71 MiB/s, done.
> Resolving deltas: 100% (2519/2519), done.
> Checking connectivity... done
> xs-mbp-2% cd LightTable
> xs-mbp-2% sh osx_deps.sh 
> lein version must be 2.1 or above. Do a lein upgrade first
> xs-mbp-2% lein --version
> Leiningen 2.2.0 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
>
>
> I believe the problem is as follows:
>
> if [ "$(echo `lein version` | grep 'Leiningen 1.\|2.0')" ]; then
> echo "lein version must be 2.1 or above. Do a lein upgrade first"; 
> exit 1;
> fi
>
> also matches "2.2.0"
>
> Removing that line *appears* to make things work.
>
>
> Has anyone else run into this problem / can confirm this problem/solution?
>
> 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.


problems installing lighttable:

2014-01-25 Thread t x
I'm on OSX:

xs-mbp-2% git clone https://github.com/LightTable/LightTable.git
Cloning into 'LightTable'...
remote: Reusing existing pack: 4986, done.
remote: Counting objects: 159, done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 5145 (delta 73), reused 79 (delta 9)
Receiving objects: 100% (5145/5145), 6.31 MiB | 2.71 MiB/s, done.
Resolving deltas: 100% (2519/2519), done.
Checking connectivity... done
xs-mbp-2% cd LightTable
xs-mbp-2% sh osx_deps.sh
lein version must be 2.1 or above. Do a lein upgrade first
xs-mbp-2% lein --version
Leiningen 2.2.0 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM


I believe the problem is as follows:

if [ "$(echo `lein version` | grep 'Leiningen 1.\|2.0')" ]; then
echo "lein version must be 2.1 or above. Do a lein upgrade first";
exit 1;
fi

also matches "2.2.0"

Removing that line *appears* to make things work.


Has anyone else run into this problem / can confirm this problem/solution?

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

2014-01-25 Thread t x
https://github.com/GeorgeJahad/debug-repl/blob/master/src/alex_and_georges/debug_repl.clj

is some of the most enlightening clojure code I have read.


Any other suggestions?

Criteria for code I'm looking for:

* need not be production use

* ideally short

* focus is "demonstrate key idea, not necessarily worry about production
use"




On Fri, Jan 24, 2014 at 9:12 PM, Jarrod Swart  wrote:

> Its a part of Chapter 17, just so you know its only a small exercise
> showing the beauty of Clojure, Lisp and Macros.  Its only about 6 six
> pages.  The footnote:
>
> The code in this section is based on *debug-repl* created by the amazing
> George Jahad,
> extended by Alex Osborne, and integrated into Swank-Clojure by Hugo Duncan.
>
> So maybe check those out.  That said I think its a really good book and
> Manning often has specials going so you get Joy of Clojure 1 & 2 for cheap.
>
> On Friday, January 24, 2014 8:51:16 PM UTC-5, t x wrote:
>
>> I am willing to buy the book for this chapter alone.
>>
>> However, looking at http://www.manning.com/fogus2/ I can't seem to find
>> it. Which chapter is it?
>>
>>
>>
>> On Fri, Jan 24, 2014 at 3:46 PM, Jarrod Swart  wrote:
>>
>>> The second version of The Joy of Clojure talks about building a
>>> debugging repl that allows insertion of breakpoints into code.  Perhaps
>>> something similar could be done here.
>>>
>>>
>>> On Friday, January 24, 2014 4:38:59 PM UTC-5, t x wrote:
>>>
 Found it, apparently it's

 debug-repl => swank-clojure => CDT => ritz

 It appears cider does not yet support this, so ritz is probably the
 "most powerful" at the moment.


 On Fri, Jan 24, 2014 at 3:39 AM, t x  wrote:

> Hi,
>
>   One thing I miss from pre-Clojure scheme days is as follows:
>
> ## What I want
>
> 1 => (foo) ;; I'm calling foo at the repl
> ... foo executes ...
> ... at some point, an exception is thrown ...
>
> 2 => my interpreter _starts a new repl_
>   * at the point where the exception was thrown
>   * lets me examine local environment variables
>   * lets me execute commands
>   * lets me "resume" the execution
>
>
> ## Why "it can't work"
>
> Now, I understand why this can not work in general in Clojure, i.e.
> the following example:
>
> (defn foo []
>   (.someJavaFunctionThatThrowsException object))
>
> In this case, the above is impossible since the exception is thrown
> from _java land_ rather than Clojure land.
>
>
> ## Why it might work
>
> Now, I'm not writing any code in java. The work I'm doing is pure
> clojure. I can throw when the exception is thrown.
>
>
> Is there some library, where instead of doing
>
> (defn foo []
>   ...
>   (throw (ex-data ...))
>   ...)
>
> I instead do:
>
> (defn foo []
>   ...
>   (something-went-wrong-please-fire-up-a-repl)
>   ...)
>
> ?
>
> Thanks!
>

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