Re: [ANN][book] Clojure Reactive Programming

2015-04-20 Thread Leonardo Borges

On Saturday, April 11, 2015 at 7:21:21 AM UTC+10, Shaun Mahood wrote:
>
> Finished my first read-through last night, I really enjoyed the book and 
> thought it was an excellent and informative read. Best resource I've read 
> yet for understanding reactive programming as a whole. Thanks for writing 
> it!


That is great to hear! I'm extremely glad you enjoyed the book! :)

Cheers,

 

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


Re: [ANN] Clojure 1.7.0-beta1 released

2015-04-20 Thread Alex Miller
The serializable thing is not intentional -  would definitely like to fix it!

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


Re: [ANN] Clojure 1.7.0-beta1 released

2015-04-20 Thread Jason Wolfe
Just tried the beta on our test suite.  Aside from warnings from new 
Clojure functions now shadowed by existing functions and obvious cases of 
hash sensitivity, there are a couple less clear-cut cases (which likely 
fall into the above hash case but will require further investigation), and 
we also notice that (range 100) cannot be serialized because 
clojure.lang.LongRange$LongChunk 
is not Serializable -- not sure if that's intentional.  

Will follow up when we resolve the remaining test failures.  Looking 
forward to the release -- thanks!  

On Friday, April 10, 2015 at 12:26:16 PM UTC-7, Alex Miller wrote:
>
> Clojure 1.7.0-beta1 is now available.
>
> Try it via
> - Download: 
> https://repo1.maven.org/maven2/org/clojure/clojure/1.7.0-beta1/
> - Leiningen: [org.clojure/clojure "1.7.0-beta1"]
>
> Regression fixes since 1.7.0-alpha6:
>
> 1) CLJ-1692 - make iterate match prior laziness
> 2) CLJ-1694 - make cycle match prior laziness
> 3) CLJ-1685 - correctly handle :eof option in read and read-string
>
> One faster sequence and reduce path that didn't quite make it into alpha6 
> is now available - range is now faster for both the traditional sequence 
> use case (both chunked and unchunked traversal) and the fast reduce path.
>
> Also, since alpha6 was released, reader conditionals were ported to 
> tools.reader and the latest ClojureScript release now supports them, so now 
> is a great time to try them out!
>   
> For all changes new in beta1, see the issues marked "(beta1)" in the
> full changes below.
>
> 
> Clojure 1.7.0-beta1 has the following updates since 1.6.0:
>
> # Changes to Clojure in Version 1.7
>
> ## 1 New and Improved Features
>
> ### 1.1 Transducers
>
> Transducers is a new way to decouple algorithmic transformations from their
> application in different contexts. Transducers are functions that transform
> reducing functions to build up a "recipe" for transformation.
>
> Also see: http://clojure.org/transducers
>
> Many existing sequence functions now have a new arity (one fewer argument
> than before). This arity will return a transducer that represents the same
> logic but is independent of lazy sequence processing. Functions included 
> are:
>
> * conj (conjs to [])
> * map
> * mapcat
> * filter
> * remove
> * take
> * take-while
> * drop
> * drop-while
> * take-nth
> * replace
> * partition-by
> * partition-all
> * keep
> * keep-indexed
> * map-indexed
> * distinct
> * interpose
>
> Additionally some new transducer functions have been added:
>
> * cat - concatenates the contents of each input
> * de-dupe - removes consecutive duplicated values
> * random-sample - returns items from coll with random probability
>
> And this function can be used to make completing transforms:
>
> * completing
>
> There are also several new or modified functions that can be used to apply
> transducers in different ways:
>
> * sequence - takes a transformation and a coll and produces a lazy seq
> * transduce - reduce with a transformation (eager)
> * eduction - returns a reducible/iterable of applications of the 
> transducer to items in coll. Applications are re-performed with every 
> reduce/iterator.
> * run! - run the transformation for side effects on the collection
>
> There have been a number of internal changes to support transducers:
>
> * volatiles - there are a new set of functions (volatile!, vswap!, 
> vreset!, volatile?) to create and use volatile "boxes" to hold state in 
> stateful transducers. Volatiles are faster than atoms but give up atomicity 
> guarantees so should only be used with thread isolation.
> * array iterators - added support for iterators over arrays
>
> Some related issues addressed during development:
> * [CLJ-1511](http://dev.clojure.org/jira/browse/CLJ-1511)
> * [CLJ-1497](http://dev.clojure.org/jira/browse/CLJ-1497)
> * [CLJ-1549](http://dev.clojure.org/jira/browse/CLJ-1549)
> * [CLJ-1537](http://dev.clojure.org/jira/browse/CLJ-1537)
> * [CLJ-1554](http://dev.clojure.org/jira/browse/CLJ-1554)
> * [CLJ-1601](http://dev.clojure.org/jira/browse/CLJ-1601)
> * [CLJ-1606](http://dev.clojure.org/jira/browse/CLJ-1606)
> * [CLJ-1621](http://dev.clojure.org/jira/browse/CLJ-1621)
> * [CLJ-1600](http://dev.clojure.org/jira/browse/CLJ-1600)
> * [CLJ-1635](http://dev.clojure.org/jira/browse/CLJ-1635)
> * [CLJ-1683](http://dev.clojure.org/jira/browse/CLJ-1683)
> * [CLJ-1669](http://dev.clojure.org/jira/browse/CLJ-1669)
>
> ### 1.2 Reader Conditionals
>
> Reader Conditionals are a new capability to support portable code that
> can run on multiple Clojure platforms with only small changes. In
> particular, this feature aims to support the increasingly common case
> of libraries targeting both Clojure and ClojureScript.
>
> Code intended to be common across multiple platforms should use a new
> supported file extension: ".cljc". When requested to load a namespace,
> the platform-specific file extension (.clj, .cljs) will

Re: [ANN] descjop v0.1.0

2015-04-20 Thread Kazuhiro Hara
Thanks, Ivan.

leiningen template descjop version 0.1.1 released today.

lein-template-descjop
https://github.com/karad/lein_template_descjop
clojars
https://clojars.org/descjop/lein-template

changes :

* grunt-download-atom-shell does not work 
https://github.com/karad/lein_template_descjop/issues/1

try it out!




2015年4月20日月曜日 21時26分12秒 UTC+9 Ivan Reese:
>
> This is really cool! It's wonderfully gratifying to take a web app I'd 
> been making with CLJS, dump the compiled html/css/js into the app/ folder, 
> and it just magically works as a "native" app.
>
> Note to other people checking out the template:
>
> Since atom-shell was recently renamed "Electron", I had to do to some 
> fiddling with one of the grunt scripts to get it to work, but it only took 
> about 5 minutes to figure out what changes to make. I wrote up my 
> workaround here: https://github.com/karad/lein_template_descjop/issues/1
>
> Thanks Kazuhiro!
>
> Ivan Reese
> ivanish.ca
>

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


Re: How do I create streaming XML response?

2015-04-20 Thread Marc Schneider
Thank you for your answer, Nelson.

I was near to your solution. Thank you for reminding me to flush the writer.

Now I detected the real problem in my application: I did not use the jetty 
adapter but the http-kit  server. http-kit buffers 
whole response body from InputStream before sending to client 
.

I switched to jetty, added the flush and everything works like a charm.

Am Montag, 20. April 2015 21:49:42 UTC+2 schrieb Nelson Morris:
>
> The `clojure.data.xml/emit` function will stream xml to a Writer. To hook 
> it up to `piped-input-stream` requires a little bit of book keeping work. 
> `piped-input-stream` provides an OutputStream and we need to convert that 
> to a Writer.  Luckily `clojure.java.io/writer` 
>  can handle that for us.  Additionally, 
> we'll need to `flush` at the end in order to make sure this intermediate 
> writer is not buffering any data before `piped-input-stream` closes the 
> OutputStream.  All together, a ring response could be generated like:
>
> ```
> (response/response 
> 
>
>  (ring-io/piped-input-stream   
> 
>
>   #(->> (io/make-writer % {}) 
> 
> 
> (xml/emit (data)) 
> 
> 
> .flush)))
> ```
>
> A complete example is available at https://www.refheap.com/99829.  When I 
> run the jetty server and use curl, going to http://localhost:8080/stream 
> begins streaming "quickly", where as http://localhost:8080 waits until 
> the entire response is generated.
>
> -
> Nelson
>
> On Mon, Apr 20, 2015 at 11:40 AM, Herwig Hochleitner  > wrote:
>
>> The way enlive does it, is to create a lazy sequence of strings. A 
>> response body such as that can be immediately be used by ring. However, I 
>> don't know from the top of my head how to generate it from data.xml.​
>> I'll be glad to get some input on that, otherwise I'll think about this 
>> more, the next time I come around to hacking on it.
>>
>> -- 
>> 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/d/optout.
>>
>
>

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


Re: What is current "best practice" regarding exceptions?

2015-04-20 Thread Timothy Baldridge
On a project I worked on we used a bit of a heavy handed method. Our system
was rather distributed, where servers processed messages off of durable
queues. So we took a simplistic approach: Exceptions that bubbled all the
way up to the top level of the application caused a hard exit of the JVM.
That's right, we crashed the entire JVM (and restarted it) every time we
had a un-handled exception.

Over time we refined this approach to whitelist some exceptions. So a
clojure read exception wouldn't crash the JVM it would only re-try the
message processing. Since our application used durable queues, and because
we had about 20 machines consuming from each queue, a single JVM restarting
here and there wasn't bad. And we gained the assurance that an error
wouldn't leave the JVM in a bad state.

Won't work in all (or most) situations, but it worked pretty well for us.

Timothy

On Mon, Apr 20, 2015 at 2:05 PM, Luc Préfontaine <
lprefonta...@softaddicts.ca> wrote:

> 1) no
> 2) no
> 3) yes at all cost
> 4) both, exceptions are logged with context (current bindings, etc)
> 5) undecided, under close examination however
> 6) never have to restart, we check what cause the error and correct it
> externally if required
> most errors are reported immediately, may depend on the failed process
> being critical
> or not.
>
> Up times above 250 days, restarts only required when upgrading stuff.
>
> Luc P.
>
>
> >
> > I'm curious, how are people in the Clojure community currently dealing
> with
> > exceptions? I have a diverse set of questions on this topic.
> >
> > 1.) How many have adopted an Erlang "die fast and restart" strategy?
> >
> > 2.) How many use something like Supervisor to spin up new JVMs? If not
> > Supervisor, then what?
> >
> > 3.) How many try to catch all exceptions and therefore try to keep the
> app
> > running under all circumstances?
> >
> > 4.) If you use something like Kafka to log events, do you use the same
> log
> > to track exceptions, or do you track exceptions separately?
> >
> > 5.) How many use a catch/restart library such as Ribol?
> >
> > 6.) In general, how bad do you expect things to be before you allow the
> > software to die, have Nagios send a pager alert to your sysadmin, drag
> them
> > out of bed at 3 AM, and have a human examine the issue and restart things
> > manually?
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with
> your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> --
> Luc Préfontaine sent by ibisMail!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



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


Re: What is current "best practice" regarding exceptions?

2015-04-20 Thread Luc Préfontaine
1) no
2) no
3) yes at all cost
4) both, exceptions are logged with context (current bindings, etc)
5) undecided, under close examination however
6) never have to restart, we check what cause the error and correct it 
externally if required
most errors are reported immediately, may depend on the failed process 
being critical
or not.

Up times above 250 days, restarts only required when upgrading stuff.

Luc P.


> 
> I'm curious, how are people in the Clojure community currently dealing with 
> exceptions? I have a diverse set of questions on this topic. 
> 
> 1.) How many have adopted an Erlang "die fast and restart" strategy?
> 
> 2.) How many use something like Supervisor to spin up new JVMs? If not 
> Supervisor, then what?
> 
> 3.) How many try to catch all exceptions and therefore try to keep the app 
> running under all circumstances? 
> 
> 4.) If you use something like Kafka to log events, do you use the same log 
> to track exceptions, or do you track exceptions separately?
> 
> 5.) How many use a catch/restart library such as Ribol? 
> 
> 6.) In general, how bad do you expect things to be before you allow the 
> software to die, have Nagios send a pager alert to your sysadmin, drag them 
> out of bed at 3 AM, and have a human examine the issue and restart things 
> manually? 
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
--
Luc Préfontaine sent by ibisMail!

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


Re: How do I create streaming XML response?

2015-04-20 Thread Nelson Morris
The `clojure.data.xml/emit` function will stream xml to a Writer. To hook
it up to `piped-input-stream` requires a little bit of book keeping work.
`piped-input-stream` provides an OutputStream and we need to convert that
to a Writer.  Luckily `clojure.java.io/writer` can handle that for us.
Additionally, we'll need to `flush` at the end in order to make sure this
intermediate writer is not buffering any data before `piped-input-stream`
closes the OutputStream.  All together, a ring response could be generated
like:

```
(response/response


 (ring-io/piped-input-stream


  #(->> (io/make-writer % {})


(xml/emit (data))


.flush)))
```

A complete example is available at https://www.refheap.com/99829.  When I
run the jetty server and use curl, going to http://localhost:8080/stream
begins streaming "quickly", where as http://localhost:8080 waits until the
entire response is generated.

-
Nelson

On Mon, Apr 20, 2015 at 11:40 AM, Herwig Hochleitner  wrote:

> The way enlive does it, is to create a lazy sequence of strings. A
> response body such as that can be immediately be used by ring. However, I
> don't know from the top of my head how to generate it from data.xml.​
> I'll be glad to get some input on that, otherwise I'll think about this
> more, the next time I come around to hacking on it.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


What is current "best practice" regarding exceptions?

2015-04-20 Thread larry google groups

I'm curious, how are people in the Clojure community currently dealing with 
exceptions? I have a diverse set of questions on this topic. 

1.) How many have adopted an Erlang "die fast and restart" strategy?

2.) How many use something like Supervisor to spin up new JVMs? If not 
Supervisor, then what?

3.) How many try to catch all exceptions and therefore try to keep the app 
running under all circumstances? 

4.) If you use something like Kafka to log events, do you use the same log 
to track exceptions, or do you track exceptions separately?

5.) How many use a catch/restart library such as Ribol? 

6.) In general, how bad do you expect things to be before you allow the 
software to die, have Nagios send a pager alert to your sysadmin, drag them 
out of bed at 3 AM, and have a human examine the issue and restart things 
manually? 


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


Re: How do I create streaming XML response?

2015-04-20 Thread Herwig Hochleitner
The way enlive does it, is to create a lazy sequence of strings. A response
body such as that can be immediately be used by ring. However, I don't know
from the top of my head how to generate it from data.xml.​
I'll be glad to get some input on that, otherwise I'll think about this
more, the next time I come around to hacking on it.

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


New Functional Programming Job Opportunities

2015-04-20 Thread Functional Jobs
Here are some functional programming job opportunities that were posted

recently:



Mid/Senior Software Development Engineer at Lookingglass Cyber Solutions

http://functionaljobs.com/jobs/8810-mid-senior-software-development-engineer-at-lookingglass-cyber-solutions



Senior/Principal Software Development Engineer at Lookingglass Cyber

Solutions

http://functionaljobs.com/jobs/8809-senior-principal-software-development-engineer-at-lookingglass-cyber-solutions



Cheers,

Sean Murphy

FunctionalJobs.com


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


Re: [ANN] Expectations v2.1.1

2015-04-20 Thread Ivan Reese
(Clojure newcomer remarks in 3... 2... 1...) This looks neat!

One note — the website suggests installing an out of date 
version: http://jayfields.com/expectations/installing.html

Might it be better to just link to Clojars?

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


How do I create streaming XML response?

2015-04-20 Thread Marc Schneider
I am writing an application that reads some data from a database and need 
to transform that data to XML. That XML should be streamed as a response to 
a web request.

The code for creating the XML elements is already working. I am using 
clojure.data.xml for that and it works very nice.

My problem now is that I don't know how to stream the XML to the response 
in a Ring application. I only can get the whole XML string in one piece out 
to the client. 

That gives a certain delay until first data gets to the client and memory 
consumption is quite high.

I already tried to get it with ring.util.io/piped-input-stream connected to 
the :body of a Ring response but had no success.

Can anyone please give me a hint?

Thanks a lot in advance,

Marc

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


Re: [ANN] descjop v0.1.0

2015-04-20 Thread Ivan Reese
This is really cool! It's wonderfully gratifying to take a web app I'd been 
making with CLJS, dump the compiled html/css/js into the app/ folder, and 
it just magically works as a "native" app.

Note to other people checking out the template:

Since atom-shell was recently renamed "Electron", I had to do to some 
fiddling with one of the grunt scripts to get it to work, but it only took 
about 5 minutes to figure out what changes to make. I wrote up my 
workaround here: https://github.com/karad/lein_template_descjop/issues/1

Thanks Kazuhiro!

Ivan Reese
ivanish.ca

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


ANN: Kibit 0.1.2 is released

2015-04-20 Thread Daniel Compton
I'm incredibly excited to announce that Kibit 0.1.2 has been released.
Kibit is a Leiningen plugin that inspects your code and suggests more
idiomatic ways of expression the same thing, e.g.

(+ 1 num) can be rewritten as (inc num)

The headlining features of this release are:
* Clojurescript/Cljx support (cljc support coming soon). This just works *™*,
kibit will pick up your source paths from your project.clj's :source-paths,
[:cljsbuild :builds], and [:cljx :builds].
* Non-zero exit codes. Kibit now exits non-zero when one or more
suggestions are made. This is particularly useful for those running checks
in a CI environment.
* You can now run kibit on any Clojure project without a project.clj file.
Just call `lein kibit` with any number of files and folders and it will
inspect the Clojure files contained within.

There are also a number of bug fixes, and new suggestions in this release.

You can install kibit by adding [lein-kibit "0.1.2"] to your :plugins
vector in your :user profile. More instructions and details are available
at https://github.com/jonase/kibit.

--
Daniel Compton.

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