[ANN] Re-ops, REPL driven operations

2018-02-14 Thread ronen
Re-ops , is a project that takes a different approach for configuration 
management and VM orchestration, by using a live Clojure REPL it enables 
rapid change and flexibility beyond that of existing tools.

It uses pure functions and datastructures to define pipelines and 
operations thus making it more  composable and easy to adapt.

Main components:

Re-core  - for managing VM's accross 
AWS, Digitalocean and KVM (Linux native virtualization).

Re-mote  - for performing remote 
operations on machines using either SSH or ZeroMQ (re-gent).

Re-gent  - A ZeroMQ based Agent for 
running distributed clojure functions in rapid intervals.

You can view a short demo that covers the high level API:
  
  https://www.youtube.com/watch?v=pdmGBA9mirs

And a talk I gave about the project: 

   https://www.youtube.com/watch?v=iopuirQuK-s

Feedback is welcome.


-- 
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] re-mote , A live coding environment for configuration management (https://github.com/re-ops/re-mote)

2017-05-24 Thread ronen


Most (if not all) configuration management tools currently are static in 
nature, you write you code deploy it and apply (rinse and repeat).


Still our live environments change rapidly and having this cycle in place 
really slows our reaction time down.


RE-mote is a re-take on how remote operations would look like when using a 
live REPL to drive them.

Feedback is welcome https://github.com/re-ops/re-mote

-- 
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] mixfix syntax for clojure

2015-09-10 Thread ronen
Cool library, only a small comment id rather that it didn't use the 
clojure.tools ns (an official ns)


On Wednesday, September 9, 2015 at 3:07:04 PM UTC+3, David Larsson wrote:
>
> I totally agree. I will keep this library in the back of my head!
>
> On Wednesday, September 9, 2015 at 12:52:46 AM UTC+2, Matching Socks wrote:
>>
>> The Readme is excellent and illuminates some of the depth behind the 
>> brief example that opened this thread.  If it is possible for depth to be 
>> behind.  In this case I believe it is.
>>
>

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


Re: clojure edn function reader

2015-05-28 Thread ronen
Gary your last comment hits what I look for exactly:

If you are looking for an encoding of clojure's syntax extensions into 
pure edn reader tags (as my crystall ball tells me you might be), I haven't 
encountered such a thing yet, even though it's conceivable.

My use case is to pass functions in configuration files (thus effecting 
behavior), sending functions over the wire or storing them is another use 
case 

Its not enough to include the body, but also include required namespaces, 
params it expects etc..

Thanks

On Thursday, May 28, 2015 at 8:14:41 PM UTC+3, Gary Verhaegen wrote:

 Not very clear to me either, but, in the spirit of reducing the field of 
 possible understandings of the question: are you aware of eval? If so, can 
 you reframe your question around it, i.e. what is it missing for your 
 use-case or haw it's not a good fit? (If you are not yet aware of eval, 
 know that it is just as bad as read security-wise.)

 Or perhaps you already have a clear idea of what you would want to do with 
 the data structures in your edn file, and you're actually asking about how 
 to register your custom literal reader with the edn reader?

 On Thursday, 28 May 2015, Herwig Hochleitner hhochl...@gmail.com 
 javascript: wrote:

 2015-05-27 18:14 GMT+02:00 ronen nark...@gmail.com:

 Ok ill expand the question a bit hoping to make it clearer :)


 Still not clear to me, but I'll try to expand a bit in the hope of 
 showing what is unclear.

 Clojure EDN has support for literal tags 
 https://github.com/edn-format/edn#inst-rfc-3339-format and the 
 ability of extending it with custom ones (records for example 
 https://github.com/miner/tagged). 


 Right, so what additional functionality are you looking for then? Clojure 
 is basically EDN + a bit of additional syntax, like anonymous fns #(), vars 
 #', deref @, syntax-quote ` ~ ~@, discarded expressions #_, read eval #= 
 and recently read cond #? I suppose you're not talking about that 
 additional syntax, because then it wouldn't be EDN anymore.

 I have a use case for storing functions in EDN and Iv found this 
 https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FDatomic%2Fday-of-datomic%2Fblob%2Fmaster%2Fresources%2Fday-of-datomic%2Fclojure-data-functions.ednsa=Dsntz=1usg=AFQjCNHi_41fzdbV7ygT3-_g3oI4ZeJVJw,
  
 which seems to be an EDN form containing serialized Clojure functions for 
 Datomic (which is closed source so I can't use its reader). 


 As I implied above, Clojure code not utilizing any of the extra syntax is 
 perfectly readable by any EDN implementation. As far as datomic #db/fn is 
 concerned: If you pass clojure code in a string, I'm pretty sure it uses 
 clojure.core/read to read it. If you pass forms, as in the example you 
 posted, I guess it just uses those forms as they were and they will already 
 have been preprocessed by the reader before being passed to the reader 
 function of #db/fn, so again, clojure.core/read (normally).

 My question is if there is any open source implementation, I can't seem 
 to find one.


 There are many readers capable of reading EDN (clojure.tools.reader, 
 edn-java, haskell's edn, clojure.core/read, cljs reader, ...) some of those 
 will also be able to read the extensions that make clojure syntax.

 If you are looking for an encoding of clojure's syntax extensions into 
 pure edn reader tags (as my crystall ball tells me you might be), I haven't 
 encountered such a thing yet, even though it's conceivable.

 kind regards

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



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


Re: clojure edn function reader

2015-05-28 Thread ronen
Leon spot on, maybe ill get to implement such a thing :)


On Friday, May 29, 2015 at 2:44:04 AM UTC+3, ronen wrote:

 Gary your last comment hits what I look for exactly:

 If you are looking for an encoding of clojure's syntax extensions into 
 pure edn reader tags (as my crystall ball tells me you might be), I haven't 
 encountered such a thing yet, even though it's conceivable.

 My use case is to pass functions in configuration files (thus effecting 
 behavior), sending functions over the wire or storing them is another use 
 case 

 Its not enough to include the body, but also include required namespaces, 
 params it expects etc..

 Thanks

 On Thursday, May 28, 2015 at 8:14:41 PM UTC+3, Gary Verhaegen wrote:

 Not very clear to me either, but, in the spirit of reducing the field of 
 possible understandings of the question: are you aware of eval? If so, can 
 you reframe your question around it, i.e. what is it missing for your 
 use-case or haw it's not a good fit? (If you are not yet aware of eval, 
 know that it is just as bad as read security-wise.)

 Or perhaps you already have a clear idea of what you would want to do 
 with the data structures in your edn file, and you're actually asking about 
 how to register your custom literal reader with the edn reader?

 On Thursday, 28 May 2015, Herwig Hochleitner hhochl...@gmail.com wrote:

 2015-05-27 18:14 GMT+02:00 ronen nark...@gmail.com:

 Ok ill expand the question a bit hoping to make it clearer :)


 Still not clear to me, but I'll try to expand a bit in the hope of 
 showing what is unclear.

 Clojure EDN has support for literal tags 
 https://github.com/edn-format/edn#inst-rfc-3339-format and the 
 ability of extending it with custom ones (records for example 
 https://github.com/miner/tagged). 


 Right, so what additional functionality are you looking for then? 
 Clojure is basically EDN + a bit of additional syntax, like anonymous fns 
 #(), vars #', deref @, syntax-quote ` ~ ~@, discarded expressions #_, read 
 eval #= and recently read cond #? I suppose you're not talking about that 
 additional syntax, because then it wouldn't be EDN anymore.

 I have a use case for storing functions in EDN and Iv found this 
 https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FDatomic%2Fday-of-datomic%2Fblob%2Fmaster%2Fresources%2Fday-of-datomic%2Fclojure-data-functions.ednsa=Dsntz=1usg=AFQjCNHi_41fzdbV7ygT3-_g3oI4ZeJVJw,
  
 which seems to be an EDN form containing serialized Clojure functions for 
 Datomic (which is closed source so I can't use its reader). 


 As I implied above, Clojure code not utilizing any of the extra syntax 
 is perfectly readable by any EDN implementation. As far as datomic #db/fn 
 is concerned: If you pass clojure code in a string, I'm pretty sure it uses 
 clojure.core/read to read it. If you pass forms, as in the example you 
 posted, I guess it just uses those forms as they were and they will already 
 have been preprocessed by the reader before being passed to the reader 
 function of #db/fn, so again, clojure.core/read (normally).

 My question is if there is any open source implementation, I can't seem 
 to find one.


 There are many readers capable of reading EDN (clojure.tools.reader, 
 edn-java, haskell's edn, clojure.core/read, cljs reader, ...) some of those 
 will also be able to read the extensions that make clojure syntax.

 If you are looking for an encoding of clojure's syntax extensions into 
 pure edn reader tags (as my crystall ball tells me you might be), I haven't 
 encountered such a thing yet, even though it's conceivable.

 kind regards

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

clojure edn function reader

2015-05-27 Thread ronen
Hey, I'm looking for an edn data read for clojure functions (similar 
to 
https://github.com/Datomic/day-of-datomic/blob/master/resources/day-of-datomic/clojure-data-functions.edn)

Is there any known implementation? 

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


Re: clojure edn function reader

2015-05-27 Thread ronen
Ok ill expand the question a bit hoping to make it clearer :)

I'm well aware of read/read-string and the security implications they bring 
(not interested in those), 

Clojure EDN has support for literal tags 
https://github.com/edn-format/edn#inst-rfc-3339-format and the ability of 
extending it with custom ones (records for example 
https://github.com/miner/tagged). 

I have a use case for storing functions in EDN and Iv found this 
https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FDatomic%2Fday-of-datomic%2Fblob%2Fmaster%2Fresources%2Fday-of-datomic%2Fclojure-data-functions.ednsa=Dsntz=1usg=AFQjCNHi_41fzdbV7ygT3-_g3oI4ZeJVJw,
 
which seems to be an EDN form containing serialized Clojure functions for 
Datomic (which is closed source so I can't use its reader). 

My question is if there is any open source implementation, I can't seem to 
find one.

Thanks

On Wednesday, May 27, 2015 at 5:36:20 PM UTC+3, Andy Fingerhut wrote:

 I am not sure I understand your question.  I will answer some questions 
 with some of the same key words in them, and then you can decide if one of 
 them was close to yours :)

 Clojure includes clojure.core/read [1] and clojure.core/read-string, which 
 can read any Clojure code, but they can be dangerous in allowing side 
 effects, including arbitrary code execution, so they are really only 
 intended for reading from trusted sources (e.g. code or data your wrote 
 yourself).

 Since Clojure 1.5.1, it also includes clojure.edn/read [2] and 
 clojure.edn/read-string.  Those are intended for reading data in edn 
 format.  They have limitations, of which I don't remember them all, but 
 IIRC at least one is that they cannot read back in records in some of the 
 ways that Clojure code can print them out.  They work well when the data 
 you have is just lists, vectors, sets, maps, and primitive types.

 There is also the tools.reader library [3], which has its own 
 implementations of all of the functions above, implemented in Clojure 
 itself.

 If none of those is what you are looking for, can you rephrase your 
 question?

 Andy

 [1] 
 http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/read
 [2] http://clojure.github.io/clojure/clojure.edn-api.html#clojure.edn/read
 [3] https://github.com/clojure/tools.reader



 On Wed, May 27, 2015 at 6:02 AM, ronen nar...@gmail.com javascript: 
 wrote:

 Hey, I'm looking for an edn data read for clojure functions (similar to 
 https://github.com/Datomic/day-of-datomic/blob/master/resources/day-of-datomic/clojure-data-functions.edn
 )

 Is there any known implementation? 

 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 
 javascript:
 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 javascript:
 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 javascript:.
 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: [ANN] munge-tout 0.1.2

2015-03-12 Thread ronen
How this compares to clojure.java.data?

Thanks

On Thursday, March 12, 2015 at 12:47:59 AM UTC+2, Edward Kimber wrote:

 Munge Tout is a Java-Clojure interop library that helps convert Java 
 Objects into Clojure data structures.  It supports conversion of Java 
 primitives, Lists, Sets, Maps and Enums and can be configured to perform 
 custom conversions on a per-property basis, or generally for a type by 
 extending the Mungeable protocol. 

 We use this to construct Java classes to feed into legacy Java libraries. 
  Some of our classes have a complex structure with properties being lists 
 of other classes and so on and this tool makes interop with our legacy code 
 significantly simpler.  Hopefully it may also be of use to others. 
  Feedback welcomed.

 https://github.com/flybe-dev/munge-tout
 https://clojars.org/munge-tout

 Edward


-- 
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] munge-tout 0.1.2

2015-03-12 Thread ronen
Nice work! ill check it out thanks

On Thursday, March 12, 2015 at 7:19:42 PM UTC+2, Edward Kimber wrote:

 Hi Ronen,

 It's essentially the same idea as clojure.java.data but it can do quite a 
 bit more, including:
 - generic parameters - so if you have ListFoo in your class that's no 
 problem, nor is MapString, ListFoo etc.
 - creation of n-dimensional ragged arrays of any type
 - setting fields if property accessors are not present
 - camel-case to dash-separated keyword conversion
 - custom constructors by property name as well as type
 - breaking encapsulation and setting private fields (well, sometimes you 
 really do need to do it!)

 Edward

 On Thursday, 12 March 2015 13:59:10 UTC, ronen wrote:

 How this compares to clojure.java.data?

 Thanks

 On Thursday, March 12, 2015 at 12:47:59 AM UTC+2, Edward Kimber wrote:

 Munge Tout is a Java-Clojure interop library that helps convert Java 
 Objects into Clojure data structures.  It supports conversion of Java 
 primitives, Lists, Sets, Maps and Enums and can be configured to perform 
 custom conversions on a per-property basis, or generally for a type by 
 extending the Mungeable protocol. 

 We use this to construct Java classes to feed into legacy Java 
 libraries.  Some of our classes have a complex structure with properties 
 being lists of other classes and so on and this tool makes interop with our 
 legacy code significantly simpler.  Hopefully it may also be of use to 
 others.  Feedback welcomed.

 https://github.com/flybe-dev/munge-tout
 https://clojars.org/munge-tout

 Edward



-- 
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] Supernal, A Clojure based take on Capistrano/Fabric remote automation

2014-10-23 Thread ronen
Supernal is an automation tool similar to Capistrano/Fabric implemented in 
pure Clojure utilizing a Clojure based DSL.

This project aims to offer:

   - 
   
   A clear roles to host matching model which can be extended easily.
   - 
   
   Can be used both as a library and as a standalone tool.
   - 
   
   An easy to follow Clojure DSL.
   - 
   
   Functional interface.
   - 
   
   Be inspired by Capistrano but more flexible.
   
More info can be found at:

https://github.com/celestial-ops/supernal

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


Re: Spawn external process and read from output

2014-03-23 Thread ronen
I highly recommend https://github.com/Raynes/conch, it has a nicer UI and 
it supports timeouts pipelining etc..

On Friday, March 21, 2014 8:34:02 AM UTC+2, Sean Corfield wrote:

 On Mar 20, 2014, at 9:41 PM, gvim gvi...@gmail.com javascript: wrote: 
  I'm not familiar with the Java standard library and didn't find anything 
 matching my question on Google so here goes. From my Clojure app I need to 
 call an executable written in C and parse the text output within my Clojure 
 app. What's the standard way to call an external process and read its 
 output? In Ruby I use: 
  
  ext = IO.popen '/path/to/file' 
  ext.readlines.each {|line| process line} 
  ext.close 

 (- (clojure.java.shell/sh /path/to/file) 
 :out 
 (clojure.string/split #\n)) 

 See: 
 
 http://clojure.github.io/clojure/clojure.java.shell-api.html#clojure.java.shell/sh
  
 and: 
 
 http://clojure.github.io/clojure/clojure.string-api.html#clojure.string/split 

 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) 





-- 
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] self-build, a self contained build server

2014-03-09 Thread ronen


self-build is a simple build server currently focused on simplicity and 
easy setup, its main goal is to enable a continues build by just running:

$ lein self-build jobs.edn

Right from within a lein project thus saving us from the need to setup 
Jenkins or other more complex solutions.

Check https://github.com/narkisr/self-build for more info

-- 
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] Leiningen 2.3.4 released

2013-11-20 Thread ronen
Thanks guys for the hard work 

On Wednesday, November 20, 2013 4:30:03 PM UTC+2, Tim Visher wrote:

 Thanks so much to Phil, Nelson, Jean Niklas, and the rest of the Leiningen 
 team! 

 On Tue, Nov 19, 2013 at 1:41 PM, Phil Hagelberg 
 ph...@hagelb.orgjavascript: 
 wrote: 
  
  Hello folks. I'm happy to announce the release of Leiningen 2.3.4. 
  
  This one is primarily a bugfix release; though there are a few minor 
  enhancements. 
  
  ## 2.3.4 / 2013-11-18 
  
  * Suggest `:exclusions` to possibly confusing `:pedantic?` dependencies. 
 (Nelson Morris, Phil Hagelberg) 
  * Optionally look for snapshot templates in `new` task. (Travis Vachon) 
  * Allow task chains to be declared without commas in project.clj. (Jean 
 Niklas L'orange) 
  * Support extra configurability in `:pom-plugins`. (Dominik Dziedzic) 
  * Fix a bug where implicit :aot warning triggered incorrectly. (Jean 
 Niklas L'orange) 
  * Fix a bug where `lein repl connect` ignored port argument. (Toby 
 Crawley) 
  
  This brings all the functionality of the deprecated lein-pedantic plugin 
  into Leiningen itself. The snapshot template functionality allows 
  template developers to test their changes more easily, and the support 
  for improved task chaining allows us to express higher-order task 
  invocations in project.clj in a properly nested way without resorting to 
  commas, which are a hack to work around shell arguments' lack of 
  structuring. 
  
  As usual, running `lein upgrade` will pull in the latest stable release, 
  and if you run into any issues you can always run `lein downgrade 2.3.3` 
  to go back to the previous release. Please report any issues on the 
  Leiningen mailing list or the GitHub issue tracker. 
  
  Thanks to all the contributors and users who helped us get to this 
 release. 
  
  -Phil 


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

2013-11-18 Thread ronen
First note that Im not a security expert so take my advice with a grain of 
salt, 

There are couple of middlewares that are worth checking out (in addition to 
friend):

* https://github.com/weavejester/ring-anti-forgery
* https://github.com/myfreeweb/ring-ratelimit

Regarding SQL injection quoting 
OWSAPhttps://www.owasp.org/index.php/Preventing_SQL_Injection_in_Java
:

   - All queries should be parametrized.
   - All dynamic data should be explicitly bound to parametrized queries.
   - String concatenation should never be used to create dynamic SQL.

It looks like https://github.com/clojure/java.jdbc there is such 
separation, 

Regarding XSS you can escape html 
http://stackoverflow.com/questions/2897587/escape-sanitize-user-input-in-clojure-compojureon
 
the server side but following 
OWSAPhttps://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet
 is 
recommended

It would be nice to have a website dedicated for security best practices in 
Clojure webapps, 

Thanks

On Monday, November 18, 2013 9:19:56 PM UTC+2, wm.ma...@gmail.com wrote:

 This list seems somewhat inactive, which I find a bit surprising, but I am 
 very interested in one particular aspect of security when I build Clojure 
 apps.

 Right now my interest is in building REST web services and web 
 applications backed by a relational database with something like Angular or 
 Backbone at the front-end. I'm therefore interested in applying best 
 practices in securing web applications for the public internet.

 I don't have a deep background in security, but as a seasoned Java 
 developer I have a good idea of some of the security considerations for web 
 applications, and I agree with another post here that OWASP is a very 
 useful resource. My specific interests in security are mainly mitigations 
 against:

 1. SQL injection;
 2. Cross-site scripting;
 3. Request forgery.

 When it comes to the many libraries available for Clojure I struggle to 
 find good information on these topics, so I'm unsure what is my 
 responsibility as an app developer and what is being provided by those 
 libraries for me.

 For example, based on Clojure tutorials I have built a Compojure web 
 application that:

 1. Accepts JSON from a client;
 2. Inserts a database record based on the JSON (using the official JDBC 
 wrappers).

 This is implemented in the most simple way possible: the JSON map is 
 basically passed directly to the function that inserts that map in the 
 database. I don't even name database columns and I don't filter text to 
 mitigate against attacks. 

 In my equivalent Java web application, I'd know to white-list keys for my 
 JSON unmarshalling, I'd name explicit columns in my database operations, 
 and I'd run the submitted user text through filters to strip out any 
 malicious scripts or whatever, or escape the text when reading data back.

 I would have no confidence hosting this web application on the public 
 internet in its current state.

 Now, admittedly my Clojure experience is limited (at time of writing I 
 have about three part-time days of experience!), so these things may be 
 obvious to others here, but right now this is the sort of thing I simply 
 don't know how to do with Clojure and the third party libraries I'm using.

 By the way, I do use Friend already and I am finding it really useful.

 On Friday, 14 December 2012 17:36:57 UTC, Chas Emerick wrote:

 Some recent discussions related to my development of Friend have prompted 
 me to create a new group: 

 https://groups.google.com/group/clojure-sec 
 Dedicated to discussing security issues affecting those building 
 applications with Clojure and its variants. 

 I'm sure many of us are building applications that have security 
 considerations.  I think it would be helpful at this point if there were a 
 dedicated place for discussions around addressing those considerations; 
 thus, clojure-sec. 

 We'll see what people actually want to talk about, but I'd be happy if 
 any of these classes of topics become common: 

 * usage and design of particular security-related libraries and tools 
 * security-related tech available in the various host environments that 
 we can leverage from Clojure(Script/.CLR/-py/c/etc) 
 * Clojure-specific concerns (e.g. untrusted code evaluation / jailing) 
 * issues or weaknesses in particular Clojure implementations, libraries, 
 etc. 
 * discussion of more general-interest security topics that nevertheless 
 impinge upon our work in Clojure 
 * more, more, more 

 I'm looking forward to learning. 

 Cheers, 

 - Chas 

 -- 
 http://cemerick.com 
 [Clojure Programming from O'Reilly](http://www.clojurebook.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

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-16 Thread Ronen Cohen
This look great! Is there a sample app anywhere?

On Wednesday, November 13, 2013 1:52:10 AM UTC+2, Ryan Spangler wrote:

 Hello Clojure,

 Excited to announce today the release of Caribou!  http://let-caribou.in/

 We have been building web sites and web applications with it for over two 
 years now and improving it every day.  Currently we have four people 
 working on it and another ten using it to build things, so it is getting a 
 lot of real world testing.

 It has been designed as a collection of independent libraries that could 
 each be useful on their own, but which come together as a meaningful whole.

 We have been spending the last couple months getting it ready for a full 
 open source release, and I am happy to say it is finally ready.  Funded and 
 supported by Instrument in Portland, OR:  http://weareinstrument.com/  We 
 have four projects using it in production, and several more about to be 
 launched (as well as over a dozen internal things).

 Documentation is here:  http://caribou.github.io/caribou/docs/outline.html

 Source is here:  http://github.com/caribou/caribou (use this for issues, 
 you don't actually need the source as it is installed through a lein 
 template).

 Some of the independently useful libraries Caribou is built on are:

 * Polaris -- Routing with data (not macros) and reverse routing! :  
 https://github.com/caribou/polaris
 * Lichen -- Image resizing to and from s3 or on disk: 
 https://github.com/caribou/lichen
 * Schmetterling -- Debugging Clojure processes from the browser:  
 https://github.com/prismofeverything/schmetterling
 * Antlers -- Useful extensions to mustache templating (helpers and blocks, 
 among other things):  https://github.com/caribou/antlers
 * Groundhog -- Replay http requests: 
 https://github.com/noisesmith/groundhog

 And many others.

 Basically this is an Alpha release, and I am announcing it here first in 
 order to get as much feedback from the community as possible.  We have made 
 it as useful as we can for our purposes and recognize that for it to 
 improve from here, we really need as many people using it and building 
 things with it as possible.  The documentation also needs to be put through 
 its paces:  we need to see how well people are able to use it who know 
 nothing about it, based only on the existing docs.

 All feedback welcome!  

 Thanks for reading!  I hope you find it useful.


-- 
-- 
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] Parkour: Hadoop MapReduce in idiomatic Clojure

2013-11-04 Thread ronen
Thanks for releasing this, I personally had to re-invent such functionality 
over clojure-hadoop 

Did you happen to test this over AWS EMR?


On Monday, November 4, 2013 3:55:23 PM UTC+2, Marshall Bockrath-Vandegrift 
wrote:

 I’m pleased to announce the first public release of Parkour, a library 
 for writing Hadoop MapReduce applications in idiomatic Clojure.  Parkour 
 takes your Clojure code’s functional gymnastics and sends it 
 free-running across the urban environment of your Hadoop cluster. 

 https://github.com/damballa/parkour/ 

 Parkour aims to provide deep Clojure integration for Hadoop.  Programs 
 using Parkour are normal Clojure programs, using standard Clojure 
 functions instead of new framework abstractions.  Programs using Parkour 
 are also full Hadoop programs, with complete access to absolutely 
 everything possible in raw Java Hadoop MapReduce.  If you know Clojure, 
 and you know Hadoop, then you’re most of the way to knowing Parkour. 

 Here is the core of the obligatory “word count” MapReduce program, 
 written using Parkour: 

 (defn mapper 
   [conf] 
   (fn [context input] 
 (- (mr/vals input) 
  (r/mapcat #(str/split % #\s+)) 
  (r/map #(- [% 1]) 
 
 (defn reducer 
   [conf] 
   (fn [context input] 
 (- (mr/keyvalgroups input) 
  (r/map (fn [[word counts]] 
   [word (r/reduce + 0 counts)]) 
 
 (defn word-count 
   [dseq dsink] 
   (- (pg/input dseq) 
   (pg/map #'mapper) 
   (pg/partition [Text LongWritable]) 
   (pg/combine #'reducer) 
   (pg/reduce #'reducer) 
   (pg/output dsink))) 

 Parkour includes detailed documentation, ranging from a quickstart 
 introduction through detailed discussions of several specific aspects: 

 https://github.com/damballa/parkour/#documentation 

 Although this is the first public release of Parkour, the Damballa RD 
 team has been using it extensively since beginning serious development 
 earlier this year.  We do also use and will continue to use Cascalog, 
 but we’ve found that Parkour’s simpler model and more direct Hadoop 
 integration is a better fit for many problems. 

 I am personally incredibly excited about this release.  I will be at 
 this year’s Clojure/conj, and will be more than happy to discuss Parkour 
 in detail with those interested. 

 Questions and pull requests welcome! 

 -- 
 Marshall Bockrath-Vandegrift lla...@damballa.com javascript: 
 Principal Software Engineer, Damballa RD 



-- 
-- 
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] Puny, a tiny layer for persisting Clojure maps into Redis hashes

2013-10-10 Thread ronen
Puny is a tiny layer for persisting Clojure maps into Redis hashes, it aims 
to reduce boilerplate and to enable end to end life cycle management of 
entities from validation to data migration and indexing.

It includes support for:

* Complete generated CRUD API.
* Automatic keys and id management (both generated and internal to the 
entity).
* Automatic Validation checks.
* Declaring indexes.
* Attaching persisted metadata like versioning etc..
* Defining interceptors on CRUD functions enabling support for security 
checks, automatic migration etc..

Puny is based on [carmin](https://github.com/ptaoussanis/carmine), a big 
thank you to Peter its author.

For more info please visit: https://github.com/narkisr/puny

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


RBAC/ACL using core.logic or similar

2013-09-29 Thread ronen
Hey, 

I was thinking about how to approach role and permission management in 
Clojure, https://shiro.apache.org/ is one example of same a framekwork 

It sounds like a problem that core.logic could solve but I'm not sure how 
to approach it

Thought and ideas are welcome

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: ANN swag a DSL for documenting Compojure routes using Swagger

2013-08-17 Thread ronen
Cool, let me know how it works out for you

On Saturday, August 17, 2013 5:01:46 AM UTC+3, Casper Clausen wrote:

 Nice work. Looking forward to giving it a spin.

 On Thursday, August 15, 2013 12:13:11 PM UTC+2, ronen wrote:

 Swagger https://developers.helloreverb.com/swagger/ is a cool project 
 for documenting Restful API's, 

 Swag is a DSL that wraps Compojure routes enabling them to be listed and 
 described automagically without the need of maintaining json

 https://github.com/narkisr/swag

 Feedback is welcome
 Ronen



-- 
-- 
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 swag a DSL for documenting Compojure routes using Swagger

2013-08-15 Thread ronen
Swagger https://developers.helloreverb.com/swagger/ is a cool project for 
documenting Restful API's, 

Swag is a DSL that wraps Compojure routes enabling them to be listed and 
described automagically without the need of maintaining json

https://github.com/narkisr/swag

Feedback is welcome
Ronen

-- 
-- 
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: substantiation, An opinionated nested maps validations library

2013-07-27 Thread ronen

Thanks for the feedback!

Hi,

 Some feedback and questions, as I've made something similar in the past.
 - allow normal fns and classes as a predicates.  

- having one global Var for predicates is an antipattern


The Var is only for the built in ones and is internal and private, external 
ones are stored in an atom, if you have better alternative id be happy to 
hear.
 

 - can you compose predicates logically (AND/OR)?


If you mean something along the lines of {:foo #{(or :String :Integer)}} 
then no, in that case I would suggest defining a new validation and use 
that:

(validation :int-or-str (when-not-nil #(or (string? %) (number? %)))

The predicates have implicit AND relation by default.
 

 - can you validate a contents of the vector?


You can write a predicate that goes through a vector and asserts its 
values, there no special support for asserting special positions, do you 
have an example?

As an inspiration, the validator I'm using allows for following rules, 
 which IMHO looks a bit cleaner:


Your using classes which is indeed useful for the basic types, however it 
complects description with implementation which is what I wanted to avoid, 

Nothing for example stops me from taking the description that I use and 
move it to clojurescript (which java classes prevents)

Hope it makes sense  
 

 (defn- uri?
   Checks if input is valid URI.
   [uri]
   (try
 (URI. uri)
 true
 (catch Exception e false)))

 (def location-rule {:name String :lat Number :long Number})

 (def contributor-rule {(required :id) uri? :gender #{m f}  :birthDate 
 String
:locales [String] :homeAddress location-rule})

 Best,
 Jozef


 On Saturday, July 27, 2013 5:50:14 AM UTC+2, ronen wrote:

 Substantiation is an opinionated simple nested map validation library:

- Predicates and description kept separate.
- Validation description map follows validated input structure. 
- Pure data structures to describe validations.
- Composability of validations is trivial.
- Validation predicates scope is limited (can only access the checked 
value).
- High level decisions such as when to activate a group of 
validations should happen on upper layer.
- Non strict, only described items checked.

 Github: https://github.com/narkisr/substantiation

 Feedback is welcome
 Ronen



-- 
-- 
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: substantiation, An opinionated nested maps validations library

2013-07-27 Thread ronen
When you state a function you bind it already to an implementation, in fact 
to a specific function from a specific ns.

While for simple functions its not that bad, things start to get hairy when 
you manage a large number of custom validations also using just string? 
leaves out metadata (like error messages etc..)

What Iv found after using a couple of existing frameworks is that id like 
to be able to define and compose validations declarations in a simple and 
clear manner with little ceremony.

In a lot of cases there is a base of validation that is common to a number 
of entities, they differ in some parts but there is a lot of duplication.

Its also very hard to follow a large number of validation if the structure 
of the definition is to far off from the structure of the input. 

I think that going through this 
nshttps://github.com/celestial-ops/celestial-core/blob/master/src/vc/validations.clj
 showcases 
some of these points, we have two maps to validate:

   - An entity, persisted into data store
   - A model which is used against a third party.

Both are quite similar but still different enough, hope it makes my points 
clearer.

Thanks


On Saturday, July 27, 2013 10:23:17 PM UTC+3, Ben wrote:

 Why not just use functions for the validations? string? instead of 
 :String. Then you get disjunction for free.


 On Sat, Jul 27, 2013 at 12:22 PM, ronen nar...@gmail.com javascript:wrote:


 Thanks for the feedback!

 Hi,

 Some feedback and questions, as I've made something similar in the past.
 - allow normal fns and classes as a predicates.  

 - having one global Var for predicates is an antipattern


 The Var is only for the built in ones and is internal and private, 
 external ones are stored in an atom, if you have better alternative id 
 be happy to hear.
  

 - can you compose predicates logically (AND/OR)?


 If you mean something along the lines of {:foo #{(or :String :Integer)}} 
 then no, in that case I would suggest defining a new validation and use 
 that:

 (validation :int-or-str (when-not-nil #(or (string? %) (number? %)))

 The predicates have implicit AND relation by default.
  

 - can you validate a contents of the vector?


 You can write a predicate that goes through a vector and asserts its 
 values, there no special support for asserting special positions, do you 
 have an example?

 As an inspiration, the validator I'm using allows for following rules, 
 which IMHO looks a bit cleaner:


 Your using classes which is indeed useful for the basic types, however it 
 complects description with implementation which is what I wanted to avoid, 

 Nothing for example stops me from taking the description that I use and 
 move it to clojurescript (which java classes prevents)

 Hope it makes sense  
  

 (defn- uri?
   Checks if input is valid URI.
   [uri]
   (try
 (URI. uri)
 true
 (catch Exception e false)))

 (def location-rule {:name String :lat Number :long Number})

 (def contributor-rule {(required :id) uri? :gender #{m f}  
 :birthDate String
:locales [String] :homeAddress location-rule})

 Best,
 Jozef


 On Saturday, July 27, 2013 5:50:14 AM UTC+2, ronen wrote:

 Substantiation is an opinionated simple nested map validation library:

- Predicates and description kept separate. 
- Validation description map follows validated input structure. 
- Pure data structures to describe validations.
- Composability of validations is trivial.
- Validation predicates scope is limited (can only access the 
checked value). 
- High level decisions such as when to activate a group of 
validations should happen on upper layer.
- Non strict, only described items checked.

 Github: 
 https://github.com/narkisr/**substantiationhttps://github.com/narkisr/substantiation

 Feedback is welcome
 Ronen

  -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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 javascript:
 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 javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




 -- 
 Ben Wolfson
 Human kind has used its intelligence to vary the flavour of drinks, which 
 may be sweet, aromatic, fermented or spirit-based. ... Family and social 
 life also offer numerous other occasions to consume drinks for pleasure. 
 [Larousse, Drink entry]

  

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group

Syncing channels

2013-07-27 Thread ronen
Iv been giving core.async a spin in clojurescript/nodejs settings and 
stumbled upon a simple use case:


   - You have two channels c1 and c2 both produced from http calls
   - c2 is produced from a call the consumes c1 result as an input


(let [id (! (POST /foo))]
(! (GET (str /foo/ id)))

The issue is that since there are two channels here the GET will be issued 
with nil (there is not synchronization between the two), 

One options that comes to mind is using alts! with :priority but from I can 
tell I cant pass the result of the first channel to the second.

My solution was to use take!:

(take! (POST /foo)
  (fn [id] (GET (str /foo/ id)))

But this is a bit backwards and gets me back to callback land, 

Any suggestion will be appreciated

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.




ANN: substantiation, An opinionated nested maps validations library

2013-07-26 Thread ronen


Substantiation is an opinionated simple nested map validation library:

   - Predicates and description kept separate.
   - Validation description map follows validated input structure. 
   - Pure data structures to describe validations.
   - Composability of validations is trivial.
   - Validation predicates scope is limited (can only access the checked 
   value).
   - High level decisions such as when to activate a group of validations 
   should happen on upper layer.
   - Non strict, only described items checked.

Github: https://github.com/narkisr/substantiation

Feedback is welcome
Ronen

-- 
-- 
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: core.match 0.2.0-beta2

2013-06-17 Thread ronen
Thank you!

On Monday, June 17, 2013 8:10:19 AM UTC+3, Ambrose Bonnaire-Sergeant wrote:

 Fantastic news!


 On Mon, Jun 17, 2013 at 1:04 PM, David Nolen dnolen...@gmail.comjavascript:
  wrote:

 At long last I've come around to overhauling core.match.

 Changes/Fixes/Enhancements are documented here: 
 http://github.com/clojure/core.match/blob/master/CHANGES.md

 core.match should no longer have AOT issues as far as I know and many 
 long outstanding bugs have been eliminated. The ClojureScript support is 
 now more or less at parity with Clojure JVM.

 Less obvious - because of the overhaul, addressing issues should now be 
 considerably simpler. Feedback very welcome and I promise to be more 
 responsive on core.match issues moving forward :)

 http://github.com/clojure/core.match

 David

 -- 
 Note that posts from new members are moderated - please be patient with 
 your first post.
 --- 
 You received this message because you are subscribed to the Google Groups 
 ClojureScript group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojurescrip...@googlegroups.com javascript:.
 To post to this group, send email to clojur...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/clojurescript.
  
  




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




Re: Clojure for Map Reduce (on hadoop 0.22)

2013-06-03 Thread ronen
Iv used Alex version and works great (on that note thank you Alex for 
keeping it going)

Ronen

On Wednesday, May 29, 2013 11:45:13 AM UTC+3, Alex Ott wrote:

 Hi

 https://github.com/alexott/clojure-hadoop - updated version


 On Wed, May 29, 2013 at 1:55 AM, Ramesh ramesh1...@gmail.comjavascript:
  wrote:

 Hi All,

 I want to use clojure to write map reduce tasks on Hadoop version  0.22. 
 I was wondering if this is possible with Stuart Sierra's clojure hadoop 
 https://github.com/stuartsierra/clojure-hadoop

 If not, are there other libraries which allow me to write map-reduce jobs 
 in clojure?


 -ramesh
  
 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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 javascript:
 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 javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




 -- 
 With best wishes,Alex Ott
 http://alexott.net/
 Twitter: alexott_en (English), alexott (Russian)
 Skype: alex.ott 


-- 
-- 
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: vim-redl -- advanced fuzzy omnicompletion and VimClojure-style repl with enhanced debugging features

2013-04-04 Thread ronen
Very nice work, 

Thank you

On Wednesday, April 3, 2013 11:08:30 PM UTC+3, dgrnbrg wrote:

 Although I've announced vim-redl in the past, now you can reap the 
 benefits of all of its features without leaving fireplace behind! Just go 
 to https://github.com/dgrnbrg/vim-redl for installation instructions, and 
 you'll end up with advanced fuzzy omnicompletion and a full-fledged repl 
 (accessible via :ReplHere).

 Redl includes a Debug Repl, which allows you to freeze a REPL and inspect 
 local variables. See a sample session in action to understand better: 
 https://github.com/dgrnbrg/redl#debug-repl

 Pull requests and feature requests welcome!


-- 
-- 
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] analyze 0.3.0 - Hygienic transformation

2013-02-15 Thread ronen
Great! 

The Clojure eco system is really fast paced

Ronen

On Friday, February 15, 2013 9:30:19 AM UTC+2, Ambrose Bonnaire-Sergeant 
wrote:

 Jonas already has another project which uses analyze 
 https://github.com/jonase/eastwood

 On Fri, Feb 15, 2013 at 12:19 PM, ronen nar...@gmail.com javascript:wrote:


 It looks as if https://github.com/jonase/kibit/ is a lint/check style 
 tool that only reads the source code, this limits its utilization:

 Kibit 
 readshttp://clojure.github.com/clojure/clojure.core-api.html#clojure.core/read
  source 
 code without any macro expansion or evaluation. A macro can therefor easily 
 invalidate a rule. Also, kibit will not know if the symbol + in the form (+ 
 x 1) actually refers to a local or to a function in a namespace other 
 than clojure.core. Expect some false positives.

 So there is a place for an AST based one (more similar to findbugs I 
 guess)

 On Wednesday, February 13, 2013 9:21:52 AM UTC+2, Ambrose 
 Bonnaire-Sergeant wrote:

 IMO that's the job of a linter-style tool, which can be written easily 
 with `analyze`.

 On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esio...@gmail.comwrote:

 It might be useful, though, to be able to enable warnings for shadowed
 variables.

 On 12 February 2013 17:38, Timothy Baldridge tbald...@gmail.com 
 wrote:
  This sort of pattern is used quite a lot in clojure (even in core):
 
  (let [data (if (string? data) (read-string data) data)
data (if (string? (first data)) (first data) (next data))
data (if (string? (first data)) (first data) (next data))]
   data)
 
  Throwing exceptions on overridden variable names would not only break
  Clojure code, but also is very non-lispy.
 
  Timothy
 
 
 
  On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote:
 
  it makes sense to not throw now that I think about it, when using _
  instead of a
  I'm also thinking of cases like:
  = (let [a 1]
   (let [b 2 a 3]
 (println a b)))
  3 2
  nil
 
  is there something that would let me know I'm overwriting a ? I 
 figure
  if something like this would slip by would be tough to track down
 
 
  On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esio...@gmail.com 
 wrote:

 
  On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
   what would this do:
  
   (let [a 1, a 2] a)
   becomes:
   (let [a 1, a123 2] a)
   or
   (let [a 1, a123 2] a123)
   or
   exception[I prefer]
 
  It would be the second option, i.e.:
 
  (let [a 1, a123 2] a123)
 
  The original code is valid, so it would not throw an exception.
 
   On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
  
   Processing a hygienic AST relieves the burden of worrying about
   shadowing
   of locals.
  
   Wherever a binding would normally be shadowed, it is instead 
 renamed
   to a
   local binding currently not in scope.
  
   eg. (let [a 1, a a] a)
  
   becomes
  
   (let [a 1, a123 a] a123)
  
   It can be useful for those processing Clojure's analysis results.
  
   Thanks,
   Ambrose
  
  
   On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta 
 kovas@gmail.com

   wrote:
  
   What is a hygienic AST?
  
   Thanks
   k
  
  
   On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
Hi everyone,
   
Happy to release analyze 0.3.0 with new hygienic code
transformation
capabilities.
   
[analyze 0.3.0]
   
In a line:
   
analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
   
Hygienic AST's have enabled large performance boosts in 
 core.typed.
I'm
excited to see how it could
be as useful to others.
   
Note: hygienic AST's (those transformed with
`analyze.hygienic/ast-hy` can
be printed normally with `analyze.emit-form/emit-form`, and
hygienically
with `analyze.hygienic/emit-hy`.
   
https://github.com/frenchy64/**analyzehttps://github.com/frenchy64/analyze
   
Thanks,
Ambrose
   
--
--
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=enhttp://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 https://groups.google.com/groups/opt_out.
   
   
  
   --
   --
   You received this message because you

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-14 Thread ronen

It looks as if https://github.com/jonase/kibit/ is a lint/check style tool 
that only reads the source code, this limits its utilization:

Kibit 
readshttp://clojure.github.com/clojure/clojure.core-api.html#clojure.core/read
 source 
code without any macro expansion or evaluation. A macro can therefor easily 
invalidate a rule. Also, kibit will not know if the symbol + in the form (+ 
x 1) actually refers to a local or to a function in a namespace other than 
clojure.core. Expect some false positives.

So there is a place for an AST based one (more similar to findbugs I guess)

On Wednesday, February 13, 2013 9:21:52 AM UTC+2, Ambrose Bonnaire-Sergeant 
wrote:

 IMO that's the job of a linter-style tool, which can be written easily 
 with `analyze`.

 On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esio...@gmail.comjavascript:
  wrote:

 It might be useful, though, to be able to enable warnings for shadowed
 variables.

 On 12 February 2013 17:38, Timothy Baldridge 
 tbald...@gmail.comjavascript: 
 wrote:
  This sort of pattern is used quite a lot in clojure (even in core):
 
  (let [data (if (string? data) (read-string data) data)
data (if (string? (first data)) (first data) (next data))
data (if (string? (first data)) (first data) (next data))]
   data)
 
  Throwing exceptions on overridden variable names would not only break
  Clojure code, but also is very non-lispy.
 
  Timothy
 
 
 
  On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com javascript: 
 wrote:
 
  it makes sense to not throw now that I think about it, when using _
  instead of a
  I'm also thinking of cases like:
  = (let [a 1]
   (let [b 2 a 3]
 (println a b)))
  3 2
  nil
 
  is there something that would let me know I'm overwriting a ? I 
 figure
  if something like this would slip by would be tough to track down
 
 
  On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood 
  esio...@gmail.comjavascript: 
 wrote:
 
  On 12 February 2013 12:28, AtKaaZ atk...@gmail.com javascript: 
 wrote:
   what would this do:
  
   (let [a 1, a 2] a)
   becomes:
   (let [a 1, a123 2] a)
   or
   (let [a 1, a123 2] a123)
   or
   exception[I prefer]
 
  It would be the second option, i.e.:
 
  (let [a 1, a123 2] a123)
 
  The original code is valid, so it would not throw an exception.
 
   On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com javascript: wrote:
  
   Processing a hygienic AST relieves the burden of worrying about
   shadowing
   of locals.
  
   Wherever a binding would normally be shadowed, it is instead 
 renamed
   to a
   local binding currently not in scope.
  
   eg. (let [a 1, a a] a)
  
   becomes
  
   (let [a 1, a123 a] a123)
  
   It can be useful for those processing Clojure's analysis results.
  
   Thanks,
   Ambrose
  
  
   On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta 
   kovas@gmail.comjavascript:
 
   wrote:
  
   What is a hygienic AST?
  
   Thanks
   k
  
  
   On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com javascript: wrote:
Hi everyone,
   
Happy to release analyze 0.3.0 with new hygienic code
transformation
capabilities.
   
[analyze 0.3.0]
   
In a line:
   
analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
   
Hygienic AST's have enabled large performance boosts in 
 core.typed.
I'm
excited to see how it could
be as useful to others.
   
Note: hygienic AST's (those transformed with
`analyze.hygienic/ast-hy` can
be printed normally with `analyze.emit-form/emit-form`, and
hygienically
with `analyze.hygienic/emit-hy`.
   
https://github.com/frenchy64/analyze
   
Thanks,
Ambrose
   
--
--
You received this message because you are subscribed to the 
 Google
Groups Clojure group.
To post to this group, send email to 
clo...@googlegroups.comjavascript:
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 javascript:
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 javascript:.
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.comjavascript:
   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 

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-11 Thread ronen
My educated guess is that each symbol has a separate representation 

analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922

In this example the first a is a in the AST the second one is a2921

This prevents collisions when working with the AST, gensyms in macros 
achieve similar results

I guess this is useful in typed Clojure or similar tools to perform type 
checking 

Ronen

On Monday, February 11, 2013 7:54:31 PM UTC+2, kovasb wrote:

 What is a hygienic AST? 

 Thanks 
 k 


 On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant 
 abonnair...@gmail.com javascript: wrote: 
  Hi everyone, 
  
  Happy to release analyze 0.3.0 with new hygienic code transformation 
  capabilities. 
  
  [analyze 0.3.0] 
  
  In a line: 
  
  analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy) 
  ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922 
  
  Hygienic AST's have enabled large performance boosts in core.typed. I'm 
  excited to see how it could 
  be as useful to others. 
  
  Note: hygienic AST's (those transformed with `analyze.hygienic/ast-hy` 
 can 
  be printed normally with `analyze.emit-form/emit-form`, and hygienically 
  with `analyze.hygienic/emit-hy`. 
  
  https://github.com/frenchy64/analyze 
  
  Thanks, 
  Ambrose 
  
  -- 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.comjavascript: 
  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 javascript: 
  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 javascript:. 
  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: lein-open and lein-grep 0.1.0

2013-02-04 Thread ronen
Nice plugins!

Thanks for releasing 

On Monday, February 4, 2013 2:21:09 PM UTC+2, Gabriel Horner wrote:

 Announcing two leiningen plugins:

 lein-open, http://github.com/cldwalker/lein-open, opens a local jar in an 
 editor easily e.g. `lein open compojure`. By default it opens dependencies 
 in your project.clj but if you specify a full name and version that works 
 as well e.g. `lein open ring/ring-core 1.1.0`.

 lein-grep,  http://github.com/cldwalker/lein-grep, improves on the 
 default search by displaying one result per line in a well formatted table. 
 I recommend the readme to compare its output to `lein search`.

 Feedback welcome.
 Thanks,
 Gabriel


-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-01-29 Thread ronen
Amazing work Prismatic team, is there a plan to release Flop?

http://lanyrd.com/2012/clojurewest/spdfg/

Thanks!
Ronen

On Tuesday, January 29, 2013 8:46:54 PM UTC+2, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing. 
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year. 
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or 
 feature requests. We use this library very heavily throughout our code and 
 hope others find it useful as well.

  Best, Aria


-- 
-- 
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: Prismatic Plumbing and Graph Open-Source Release

2013-01-29 Thread ronen
Great! 

Thanks again 
Ronen

On Wednesday, January 30, 2013 2:53:06 AM UTC+2, Aria Haghighi wrote:

 Yes, we'll be releasing flop soon. 

 On Tuesday, January 29, 2013 4:49:45 PM UTC-8, ronen wrote:

 Amazing work Prismatic team, is there a plan to release Flop?

 http://lanyrd.com/2012/clojurewest/spdfg/

 Thanks!
 Ronen

 On Tuesday, January 29, 2013 8:46:54 PM UTC+2, Aria Haghighi wrote:

 Hey all,

  Prismatic has open-sourced our Plumbing and Graph library on 
 githubhttps://github.com/prismatic/plumbing. 
 Jason Wolfe gave a 
 talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
  how we use graph for systems composition at Strange loop last year. 
 Please give the library
 a whirl and let us know if you're using it and if you find any issues or 
 feature requests. We use this library very heavily throughout our code and 
 hope others find it useful as well.

  Best, Aria



-- 
-- 
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: New Clojure user group in Israel

2013-01-10 Thread ronen
Great initiative guys, I remember the days when Clojure was an exotic beast 
no one heard of 

Its great to have a Clojurian meetup

Ronen

On Monday, December 17, 2012 12:58:21 PM UTC+2, Daniel Szmulewicz wrote:

 Hi everybody, 

 Happy to announce that Israel has its first Clojure user group.

 http://www.meetup.com/Clojure-Israel/

 Sincerely,

 Daniel Szmulewicz


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

Re: ANN: codeq

2012-10-10 Thread ronen
Awesome! this is my gateway drug into Datomic

On Wednesday, October 10, 2012 4:27:37 PM UTC+2, Rich Hickey wrote:

 I released a little app today that imports Git repos into Datomic. My hope 
 is that it can be used as the underpinnings of some interesting Clojure 
 tooling. 

 More info here: 

 http://blog.datomic.com/2012/10/codeq.html 

 Rich 



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

Re: is this a problem for clojure.contrib.dataflow? Or something else?

2012-08-21 Thread ronen
BTW you can give it a go using Amazon EMR, that way you can check it 
without investing in the infra before hand

Ronen

On Tuesday, August 21, 2012 11:02:18 PM UTC+3, matt hoffman wrote:

 Great, thanks -- I hadn't looked too closely at Cascalog yet only because 
 I don't currently have the rest of the Hadoop infrastructure. But adding 
 that in isn't out of the question, so I'll definitely look at it more 
 closely.  And I may have underestimated the utility of Cascalog without 
 Hadoop... 



 On Tue, Aug 21, 2012 at 4:38 AM, Sam Ritchie sritc...@gmail.comjavascript:
  wrote:

 Definitely +1 for Cascalog -- I maintain Cascalog, along with Nathan 
 Marz. Here's the wiki:

 https://github.com/nathanmarz/cascalog/wiki

 Head on over to the 
 cascalog-userhttps://groups.google.com/forum/?fromgroups#!forum/cascalog-user
  mailing 
 list with any questions. Looking forward to seeing you there.


 On Mon, Aug 20, 2012 at 5:55 PM, ronen nar...@gmail.com javascript:wrote:

 Terabyte size and chain of dependent tasks might hint toward 
 Cascaloghttps://github.com/nathanmarz/cascalog/wiki this assumes that 
 your doing batch job processing (on top of hadoop) 

 If you need a more soft real time datalog based query then I would check 
 datomic http://www.datomic.com/ although from your description is 
 sounds less so.

 Ronen

 On Tuesday, August 21, 2012 3:14:23 AM UTC+3, Leif wrote:

 +1.  I know of a couple tools in python for this purpose that are 
 called workflow management systems.   It would be good to know if there 
 is a robust one in clojure.

 On Monday, August 20, 2012 12:18:54 AM UTC-4, matt hoffman wrote:

 I have a problem that I'm trying to figure out how to tackle. I'm new 
 to Clojure, but I'm interested, and perhaps this will be my excuse to 
 give 
 it a try. Any of the following answers would help:
 What you're describing really sounds like X
 You could think of that problem like this, instead
 You may want to search for term 'Y'...it sounds related (I imagine 
 I'm probably describing some well-established domain...I just don't know 
 the right terms to search for)

 So, the problem:
 I have an app that is in production doing some fairly complex 
 calculations on large-ish (terabyte-range) amounts of data.  The 
 calculations are expressed as chains of dependent tasks, where each tasks 
 can have a number of inputs and outputs. But the code has become hard to 
 maintain, full of accidental complexity and very difficult for newer 
 developers to understand. So, I'm trying to find the right abstractions 
 to 
 put in place to keep things simple. 
 One of the sources of complexity is the intermingling of code 
 involving loading data, dividing up data to be executed in parallel, 
 processing data, persisting data, and handling the execution flow on an 
 individual datum (configuring pipelines of components,etc.) I'd like to 
 keep the functions pure and push the other concerns off to a framework -- 
 and, ideally, not have to write that framework. 

 So I think my problem statement is this: 
 I'd like to be able to define functions that specify, somehow, what 
 input they want, and perhaps what output they produce. Then I'd like to 
 push the concern of how those inputs are calculated -- loaded from a db, 
 calculated from source data -- off on some other party. 

 For example, if I define a function that requires foo, and I call 
 that function without providing foo, I'd like for _something_ to step 
 in 
 and say, Ok, you require foo. I have this function over here that 
 produces 
 foo. Let me call that for you, then hand you the output.  Perhaps 
 instead 
 of a framework that transparently looks up and executes that function and 
 provides a Future for the result, perhaps I can explicitly build a 
 dependency graph up-front containing all the functions required to 
 produce 
 the end result, and then execute them all in order... I think the effect 
 is 
 the same. 

 From a bit of searching I've done today, dataflow programming like 
 clojure.contrib.dataflow sounds like it might be close to what I'm 
 looking 
 for, but I'd love to hear ideas.   Am I describing something that already 
 exists?  Would this actually be simpler than it seems using some clever 
 macros? Are there some keywords I should search for to get started?  Or 
 perhaps I'm coming at this problem wrong, and I should think about it a 
 different way...

  -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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 javascript:
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en




 -- 
 Sam Ritchie, Twitter Inc
 703.662.1337
 @sritchie

 (Too brief? Here's why! http://emailcharter.org)

  -- 
 You received

Re: is this a problem for clojure.contrib.dataflow? Or something else?

2012-08-20 Thread ronen
Terabyte size and chain of dependent tasks might hint toward 
Cascaloghttps://github.com/nathanmarz/cascalog/wiki this assumes that 
your doing batch job processing (on top of hadoop) 

If you need a more soft real time datalog based query then I would check 
datomic http://www.datomic.com/ although from your description is sounds 
less so.

Ronen

On Tuesday, August 21, 2012 3:14:23 AM UTC+3, Leif wrote:

 +1.  I know of a couple tools in python for this purpose that are called 
 workflow management systems.   It would be good to know if there is a 
 robust one in clojure.

 On Monday, August 20, 2012 12:18:54 AM UTC-4, matt hoffman wrote:

 I have a problem that I'm trying to figure out how to tackle. I'm new to 
 Clojure, but I'm interested, and perhaps this will be my excuse to give it 
 a try. Any of the following answers would help:
 What you're describing really sounds like X
 You could think of that problem like this, instead
 You may want to search for term 'Y'...it sounds related (I imagine I'm 
 probably describing some well-established domain...I just don't know the 
 right terms to search for)

 So, the problem:
 I have an app that is in production doing some fairly complex 
 calculations on large-ish (terabyte-range) amounts of data.  The 
 calculations are expressed as chains of dependent tasks, where each tasks 
 can have a number of inputs and outputs. But the code has become hard to 
 maintain, full of accidental complexity and very difficult for newer 
 developers to understand. So, I'm trying to find the right abstractions to 
 put in place to keep things simple. 
 One of the sources of complexity is the intermingling of code involving 
 loading data, dividing up data to be executed in parallel, processing data, 
 persisting data, and handling the execution flow on an individual datum 
 (configuring pipelines of components,etc.) I'd like to keep the functions 
 pure and push the other concerns off to a framework -- and, ideally, not 
 have to write that framework. 

 So I think my problem statement is this: 
 I'd like to be able to define functions that specify, somehow, what input 
 they want, and perhaps what output they produce. Then I'd like to push the 
 concern of how those inputs are calculated -- loaded from a db, calculated 
 from source data -- off on some other party. 

 For example, if I define a function that requires foo, and I call that 
 function without providing foo, I'd like for _something_ to step in and 
 say, Ok, you require foo. I have this function over here that produces 
 foo. Let me call that for you, then hand you the output.  Perhaps instead 
 of a framework that transparently looks up and executes that function and 
 provides a Future for the result, perhaps I can explicitly build a 
 dependency graph up-front containing all the functions required to produce 
 the end result, and then execute them all in order... I think the effect is 
 the same. 

 From a bit of searching I've done today, dataflow programming like 
 clojure.contrib.dataflow sounds like it might be close to what I'm looking 
 for, but I'd love to hear ideas.   Am I describing something that already 
 exists?  Would this actually be simpler than it seems using some clever 
 macros? Are there some keywords I should search for to get started?  Or 
 perhaps I'm coming at this problem wrong, and I should think about it a 
 different way...



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

Re: is this a problem for clojure.contrib.dataflow? Or something else?

2012-08-20 Thread ronen
Also last time I checked dataflow in contrib was dead, Cascalog, datomic 
and to some extent core.logic fill this niche 

Ronen

On Tuesday, August 21, 2012 3:55:46 AM UTC+3, ronen wrote:

 Terabyte size and chain of dependent tasks might hint toward 
 Cascaloghttps://github.com/nathanmarz/cascalog/wiki this assumes that 
 your doing batch job processing (on top of hadoop) 

 If you need a more soft real time datalog based query then I would check 
 datomic http://www.datomic.com/ although from your description is 
 sounds less so.

 Ronen

 On Tuesday, August 21, 2012 3:14:23 AM UTC+3, Leif wrote:

 +1.  I know of a couple tools in python for this purpose that are called 
 workflow management systems.   It would be good to know if there is a 
 robust one in clojure.

 On Monday, August 20, 2012 12:18:54 AM UTC-4, matt hoffman wrote:

 I have a problem that I'm trying to figure out how to tackle. I'm new to 
 Clojure, but I'm interested, and perhaps this will be my excuse to give it 
 a try. Any of the following answers would help:
 What you're describing really sounds like X
 You could think of that problem like this, instead
 You may want to search for term 'Y'...it sounds related (I imagine I'm 
 probably describing some well-established domain...I just don't know the 
 right terms to search for)

 So, the problem:
 I have an app that is in production doing some fairly complex 
 calculations on large-ish (terabyte-range) amounts of data.  The 
 calculations are expressed as chains of dependent tasks, where each tasks 
 can have a number of inputs and outputs. But the code has become hard to 
 maintain, full of accidental complexity and very difficult for newer 
 developers to understand. So, I'm trying to find the right abstractions to 
 put in place to keep things simple. 
 One of the sources of complexity is the intermingling of code involving 
 loading data, dividing up data to be executed in parallel, processing data, 
 persisting data, and handling the execution flow on an individual datum 
 (configuring pipelines of components,etc.) I'd like to keep the functions 
 pure and push the other concerns off to a framework -- and, ideally, not 
 have to write that framework. 

 So I think my problem statement is this: 
 I'd like to be able to define functions that specify, somehow, what 
 input they want, and perhaps what output they produce. Then I'd like to 
 push the concern of how those inputs are calculated -- loaded from a db, 
 calculated from source data -- off on some other party. 

 For example, if I define a function that requires foo, and I call that 
 function without providing foo, I'd like for _something_ to step in and 
 say, Ok, you require foo. I have this function over here that produces 
 foo. Let me call that for you, then hand you the output.  Perhaps instead 
 of a framework that transparently looks up and executes that function and 
 provides a Future for the result, perhaps I can explicitly build a 
 dependency graph up-front containing all the functions required to produce 
 the end result, and then execute them all in order... I think the effect is 
 the same. 

 From a bit of searching I've done today, dataflow programming like 
 clojure.contrib.dataflow sounds like it might be close to what I'm looking 
 for, but I'd love to hear ideas.   Am I describing something that already 
 exists?  Would this actually be simpler than it seems using some clever 
 macros? Are there some keywords I should search for to get started?  Or 
 perhaps I'm coming at this problem wrong, and I should think about it a 
 different way...



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

Re: How to measure pieces of Clojure code?

2012-08-10 Thread ronen
Hmm if by space you mean memory then I think that only a profiler can help 
with that, regarding time using https://github.com/hugoduncan/criterium for 
benchmarking is the path I would take

Ronen

On Saturday, August 11, 2012 1:21:05 AM UTC+3, Hussein B. wrote:

 Hi,
 I want to measure how much space an algorithm is taking and then trying to 
 change some aspects to see how things are going to differ.
 I also want to measure how much time it takes to complete an operation.

 What tools can I use?

 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

Gelfino

2012-02-04 Thread ronen
Hey,

Iv just released Gelfino, a tiny embedded GELF server implemented in
Clojure,

Gelfino enables to filter GELF streams and define actions that will be
taken upon them, as an example its easy to forward messages from
graylog2-server into it and then forward them into fnordmetric.

For further information http://documentup.com/narkisr/gelfino/

Feedback is welcome
Ronen

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


Re: ANN: Midje 1.3.0

2011-12-15 Thread ronen
Joining the congrats, one of the must have tools for any Clojure
project

Ronen

On Dec 14, 8:01 am, Denis Labaye denis.lab...@gmail.com wrote:
 Midje is getting better and better.

 Congrats!







 On Mon, Dec 12, 2011 at 5:41 PM, Brian Marick mar...@exampler.com wrote:
  Midje 1.3's most important feature is compatibility with Clojure 1.3.
 https://github.com/marick/Midje

  Midje is a test framework for Clojure that supports top-down as well as
  bottom-up testing,  encourages readable tests, provides a smooth migration
  path from clojure.test, supports a balance between abstraction and
  concreteness, and tries to be gracious in its treatment of its user.

  Other major changes in 1.3 are:

  * Colorized output
   https://github.com/marick/Midje/wiki/Colorizing

  * Monitoring and rerunning changed files (autotest/lazytest)
   (under Leiningen:https://github.com/marick/Midje/wiki/Lein-midje)

  * Partial prerequisites (makes it easier to add new behavior to existing
  code)
   https://github.com/marick/Midje/wiki/Partial-prerequisites

  * Data prerequisites (avoiding overcommitment to data representation)
   https://github.com/marick/Midje/wiki/Data-prerequisites

  More here:https://github.com/marick/Midje/blob/master/HISTORY.md

  Thanks especially to Alex Baranosky, who did a lot of work on this release.

  Enjoy.

  -
  Brian Marick, Artisanal Labrador
  Now working athttp://path11.com
  Contract programming in Ruby and Clojure
  Occasional consulting on Agile

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


Clojure on the reversim podcast

2011-11-09 Thread ronen
Iv been hosted on reversim (an Israeli software podcast) for a talk
about Clojure,

The talk is in Hebrew: http://www.reversim.com/

Ronen

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


Re: Spread work onto multiple threads (in pure Clojure)

2011-09-22 Thread ronen
Sorry for my delayed reply (busy day),

Andy: Ill check Medusa, the number of threads in pmap does impose a
limit but in my case I can live with that.

Nathan: Yes the reason I wanted futures because of the blocking IO, I
don't know why I figured out that futures are lazy, this indeed makes
pmap redundant.

Sean: I could use pmap, but ill be limited in number of threads still
in my case I can live with that.

Thank you all for clearing it out, looks like I was on the right track

Ronen

On Sep 22, 8:00 am, Sean Corfield seancorfi...@gmail.com wrote:
 On Wed, Sep 21, 2011 at 6:06 PM, ronen nark...@gmail.com wrote:
  (defn email-approved [approved]
   (doall (pmap deref (for [req approved] (future (email-request
  req))

 Wouldn't the following be close enough to what you want?

 (defn email-approved [approved]
   (doall (pmap email-request approved)))
 --
 Sean A Corfield -- (904) 302-SEAN
 An Architect's View --http://corfield.org/
 World Singles, LLC. --http://worldsingles.com/
 Railo Technologies, Inc. --http://www.getrailo.com/

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

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


Using match library (latest snapshot) ns not found

2011-09-22 Thread ronen
Iv been using the cool match library right up until it was moved into
core, using the latest snapshot (match-0.2.0-20110809.143608-2.jar):

$ lein compile

Caused by: java.io.FileNotFoundException: Could not locate clojure/
core/match/core__init.class or clojure/core/match/core.clj on
classpath:

Peeking into the jar it is there, Iv also tried using:

match.core


but failed again, any idea on how to resolve this?

Thanks
Ronen

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


Re: Using match library (latest snapshot) ns not found

2011-09-22 Thread ronen
Thanks David, the ns is found now (using lein checkouts), one of the
reasons iv tried moving to latest snapshot was an error during
compilation for the following fn:

(defn email-request [req]
  (match [req]
   [{:name _ :repo (r :when (comp not nil?)) :email email}] (notify-
user-constrained email Your repository access request has been
approved ( Verify that you can access it by cloning ~(:repo req)
repository.) @config)
   [{:name _ :key _ :email email}] (notify-user-constrained email
Your key request in gitolite was approved ( Please verify that
your public key matches ~(:key req)) @config)
   ))

Exception in thread main java.lang.Exception: Unable to resolve
symbol: email in this context (notification.clj:43), it somehow passes
when I the repl but fails during compilation,

I guess id rather open an issue for this :),

Thank you David for an awesome library
Ronen

On Sep 23, 1:33 am, David Nolen dnolen.li...@gmail.com wrote:
 I'm temporarily bringing back project.clj until we get a proper release out
 the door (hopefully soon). Let me know if HEAD works for you.

 David







 On Thu, Sep 22, 2011 at 6:31 PM, ronen nark...@gmail.com wrote:
  Iv been using the cool match library right up until it was moved into
  core, using the latest snapshot (match-0.2.0-20110809.143608-2.jar):

  $ lein compile

  Caused by: java.io.FileNotFoundException: Could not locate clojure/
  core/match/core__init.class or clojure/core/match/core.clj on
  classpath:

  Peeking into the jar it is there, Iv also tried using:

  match.core

  but failed again, any idea on how to resolve this?

  Thanks
  Ronen

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


Re: Using match library (latest snapshot) ns not found

2011-09-22 Thread ronen
Just did

Ronen

On Sep 23, 1:59 am, David Nolen dnolen.li...@gmail.com wrote:
 On Thu, Sep 22, 2011 at 6:56 PM, ronen nark...@gmail.com wrote:
  Thanks David, the ns is found now (using lein checkouts), one of the
  reasons iv tried moving to latest snapshot was an error during
  compilation for the following fn:

  (defn email-request [req]
   (match [req]
            [{:name _ :repo (r :when (comp not nil?)) :email email}] (notify-
  user-constrained email Your repository access request has been
  approved ( Verify that you can access it by cloning ~(:repo req)
  repository.) @config)
            [{:name _ :key _ :email email}] (notify-user-constrained email
  Your key request in gitolite was approved ( Please verify that
  your public key matches ~(:key req)) @config)
            ))

  Exception in thread main java.lang.Exception: Unable to resolve
  symbol: email in this context (notification.clj:43), it somehow passes
  when I the repl but fails during compilation,

  I guess id rather open an issue for this :),

  Thank you David for an awesome library
  Ronen

 Looks like a legitimate bug around bindings. Please create JIRA 
 ticket,http://dev.clojure.org/jira/browse/MATCH. It would be easier for me if 
 you
 can submit an isolated sample case that exhibits the bug.

 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


Spread work onto multiple threads (in pure Clojure)

2011-09-21 Thread ronen
I was looking for a pure Clojure solution to run multiple non-
dependant tasks on multiple threads, iv considered using Agent,
Promises or Futures, yet the simplest cleanest succinct solution iv
found is:

(defn email-approved [approved]
  (doall (pmap deref (for [req approved] (future (email-request
req))

The only thing that I don't like about it is the use of pmap, main
since Im using the parallel mapping action just for side effects
(triggering the consumptions of futures by derefing them).

Iv seen solution that involve Java service executor and the Work
project (https://github.com/getwoven/work), yet id rather achieve this
in pure Clojure.

Thanks
Ronen

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


Re: napalm

2011-08-17 Thread ronen
Very nice work, it sure does cures a pain point in Java land.

Ronen

On Aug 16, 1:20 am, Miro Bezjak bezjak.m...@gmail.com wrote:
 First, apologies to anyone not interested. This isn't clojure project but it
 helps to setup it. Windows users can skip this announcement because napalm
 doesn't help them very much.

 Napalm is a tool to help manage multiple versions of clojure and other java
 like projects. It's a small project written as a bash script therefore it
 should work in most Linux distributions. Definitely works in Arch Linux,
 Linux Mint and Ubuntu. It should even work in Mac but I haven't tried it.

 Here is a quick summary:
 Automate installation of archived (zip, gz, bz2, jar) programs that are
 unsuited or unavailable from a package repository.

 Screenshots for the impatient that show how to use 
 it:https://github.com/mbezjak/napalm/wiki

 And documentation for the rest:https://github.com/mbezjak/napalm

 Feedback is always appreciated.

 Cheers,
 Miro

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


Re: Alright, fess up, who's unhappy with clojurescript?

2011-07-28 Thread ronen
Im not a javascript guru but from my experience JQuery isn't suitable
for large web application, starting with the JQueryUi immaturity and
the plethora of plugins that sometime work and sometime don't.

Rich and the rest of the core team, don't be discouraged by such
comments, if it wasn't for your work id wouldn't be so much excited
with javascript as I am now!

Iv bought the Closure book and I can't wait to see all the cool stuff
that the Clojure community will bring to this arena!

Ronen

On Jul 25, 10:38 am, Mark Derricutt m...@talios.com wrote:
 Oracle announced/talked about Nashorn at the recent JVM Languages summit, 
 this is an Invoke Dynamic based Javascript runtime which is (aiming) for 
 inclusion in JDK8.

 I do so hope however that someone manages to pull that out for a lets run 
 this NOW on Java 7 as that would be a great improvement over rhino.

 On 25/07/2011, at 3:54 AM, Stuart Halloway wrote:

  Rhino is an implementation detail of the development platform. That 
  implementation detail could and probably should change.



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


Couch-fuse

2010-05-08 Thread ronen
Iv just released the first version of couch-fuse a Couchdb fuse
filesystem that is implemented in Clojure, for more details head on to
http://github.com/narkisr/couch-fuse.

Ronen

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


Re: Something similar to (match) from scheme?

2010-03-12 Thread ronen
http://www.brool.com/index.php/pattern-matching-in-clojure

On Mar 11, 2:02 pm, Luka luka.stojano...@gmail.com wrote:
 Is there a way to do pattern matching on values in clojure similar to
 this:

  http://docs.plt-scheme.org/reference/match.html

 What I'm trying to do is simple lexing/parsing:  I would match parts
 of strings with regexp, and then do a parsing with match form. What is
 the best way of doing this in clojure?

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


Re: insert-rows

2009-12-04 Thread ronen
Hey mark I guess that you are using ClojureQL, can you post your
function call?

Ronen

On Nov 25, 6:39 pm, Mark Stang markjst...@gmail.com wrote:
 Hi,
 I am working on reading a pipe delimited file into a SQL database.

 I can read the lines using
   (doseq [line (read-lines myfile.csv)]

 and format the lines using

     (map #(format \%s\ %) (re-split #\| line))

 This results in list for each line.

 I have created a table that has one column for each value in the list.
 The values are like (mark stang employee).

 What I can figure out is how to convert the list into something that
 can be passed to insert-rows.  

 The error I get is that insert into mytable values ()  I have tried
 converting the row into a vector

     (vec (map #(format \%s\ %) (re-split #\| line)))

 Which when I print it, it looks like [mark stang employee] but the
 insert-rows function isn't seeing it.  I have tried doing a let for each
 line and passing the name, but no such luck.

 It seems that I could get it to work with insert-values, but that seems
 like a lot of overhead.

 I would think I should be able to call insert-rows with the results of
 reading the entire file.

 Thoughts?

 Thanks,

 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


Re: Mocking (with EasyMock?) java calls

2009-11-15 Thread ronen
Id recommend using mockito instead:

http://mockito.org/

On Nov 12, 1:55 am, Howard Lewis Ship hls...@gmail.com wrote:
 Try looking at this:

 http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade...



 On Thu, Nov 5, 2009 at 5:00 AM, vanallan vanal...@gmail.com wrote:

  Hi
  Im trying to convert a couple of Java methods in a Java project to
  Clojure. The Java methods have test methods that mocks other part of
  the whole system with EasyMock. Is it possible to something similar in
  Clojure? I want to call a Java function and get a predetermined value
  from that function in return to test with. This is because the java
  method is using a database that I don't reach, and I want to use the
  correct method call right from the start. Any one got any experience
  in this?

  :)
  --~--~-~--~~~---~--~~
  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
  -~--~~~~--~~--~--~---

 --
 Howard M. Lewis Ship

 Creator of Apache Tapestry

 The source for Tapestry training, mentoring and support. Contact me to
 learn how I can get you up and productive in Tapestry fast!

 (971) 678-5210http://howardlewisship.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


Re: ANN: Clojure live-repl

2009-10-28 Thread ronen

Under Linux I had to fix the paths in liverepl.sh to include the build
folder:

java -cp $LIVEREPL_HOME/build/*:$JDK_HOME/lib/tools.jar
net.djpowell.liverepl.client.Main $CLOJURE_JAR $LIVEREPL_HOME/build/
liverepl-agent.jar $LIVEREPL_HOME/build/liverepl-server.jar $@

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



Re: for those who just can't get enough of monads

2009-09-07 Thread ronen

Thank for the link +2
I think that Java  C# languages (not the platforms) are not the
places for monads (or functional programming in that respect).
As for the success of ideas, not long ago functional languages them-
selfs were thought of as too academic for practical use (multicore
change all that)
Its interesting to watch how paradigms shift around.

Ronen

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



Re: Fixing production systems on-the-fly

2009-09-05 Thread ronen

Not Clojure specific, the Spring framework has refreshable beans
support which enables partial code swap on production systems (http://
tiny.cc/3zctU), its much more limited than Erlang but still might
proove to be useful.

On Sep 4, 9:30 pm, tmountain tinymount...@gmail.com wrote:
 I just put together some example code to demonstrate hot updates
 with Clojure.

 http://paste.lisp.org/display/86576

 It allows you to connect to a REPL via port 12345 and dynamically
 update things as necessary. To address the issue of updating multiple
 definitions at once, you'd do something like the following (after
 modifying main.clj):

 tra...@travis-desktop:~$ nc localhost 12345
 clojure.core= (require 'main :reload)

 Right now the main thread simply prints message in a loop, but I've
 tried changing main.clj to modify both the print-hello function and
 value of message, and it worked great. You can also connect to the
 repl and do something like the following, but it doesn't provide the
 same safety as the seemingly atomic require function does.

 clojure.core= (ns main)
 nil
 main= (def message hola)
 #'main/message

 -Travis

 On Sep 4, 4:22 am, Krukow karl.kru...@gmail.com wrote:

  I was thinking about the capability of changing production systems on
  the fly. E.g. by having an accessible repl in a running production
  system.

  If you have a bug in a function, you can fix it by re-def'ing it -
  that is great. However, suppose you want to do a system upgrade where
  you want to change several things. Now you could just re-def each var
  one at a time, but this might produce an inconsistent program in the
  interval where you have re-def'ed some but not all vars.

  This first thing you would want is sort-of a atomic update of all
  vars, similarly to what is possible with refs. Is this possible
  somehow? If not are there any techniques or best practices for these
  system upgrades?

  /Karl
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Fixing production systems on-the-fly

2009-09-05 Thread ronen

Not Clojure specific, the Spring framework has refreshable beans
support which enables partial code swap on production systems (http://
tiny.cc/3zctU), its much more limited than Erlang but still might
proove to be useful.

On Sep 4, 9:30 pm, tmountain tinymount...@gmail.com wrote:
 I just put together some example code to demonstrate hot updates
 with Clojure.

 http://paste.lisp.org/display/86576

 It allows you to connect to a REPL via port 12345 and dynamically
 update things as necessary. To address the issue of updating multiple
 definitions at once, you'd do something like the following (after
 modifying main.clj):

 tra...@travis-desktop:~$ nc localhost 12345
 clojure.core= (require 'main :reload)

 Right now the main thread simply prints message in a loop, but I've
 tried changing main.clj to modify both the print-hello function and
 value of message, and it worked great. You can also connect to the
 repl and do something like the following, but it doesn't provide the
 same safety as the seemingly atomic require function does.

 clojure.core= (ns main)
 nil
 main= (def message hola)
 #'main/message

 -Travis

 On Sep 4, 4:22 am, Krukow karl.kru...@gmail.com wrote:

  I was thinking about the capability of changing production systems on
  the fly. E.g. by having an accessible repl in a running production
  system.

  If you have a bug in a function, you can fix it by re-def'ing it -
  that is great. However, suppose you want to do a system upgrade where
  you want to change several things. Now you could just re-def each var
  one at a time, but this might produce an inconsistent program in the
  interval where you have re-def'ed some but not all vars.

  This first thing you would want is sort-of a atomic update of all
  vars, similarly to what is possible with refs. Is this possible
  somehow? If not are there any techniques or best practices for these
  system upgrades?

  /Karl
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: maplocalleader vimclojure

2009-09-05 Thread ronen

Ok, iv done two steps, iv cleared my .vim  started from scratch (i
guess that i had some old version laying around there)  iv noticed an
error in my classpath (iv added clojure jar twice instead of clojure-
contrib),
The main thing that i would add to the docs is a trouble shooting
section that consist of common user mistakes how to check them 
possible fixes, I think that the installation procedure can be further
automated (as mentioned before me).

Im willing to do a small screen cast that shows how simple it is to
install  some usage functionality  load it up to Youtube (if you are
interested).

Thank you for your patience  hard work
Ronen

On Sep 5, 11:03 am, Meikel Brandmeyer m...@kotka.de wrote:
 Hi,

 Am 04.09.2009 um 00:00 schrieb ronen:



  Im also not getting Clojure when calling :nmap,

  n  NL        * /+.\{-1,}+CRc/+/eCR
  n  \gp         * :GitPullRebaseCR
  n  \gc         * :GitCommitCR
  n  \gA         * :GitAdd cfileCR
  n  \ga         * :GitAddCR
  n  \gl         * :GitLogCR
  n  \gs         * :GitStatusCR
  n  \gD         * :GitDiff --cachedCR
  n  \gd         * :GitDiffCR
  n  \C            :call CapitalizeCenterAndMoveDown()CR
    bp            Esc:bpCR
    bn            Esc:bnCR
  n  gx            PlugNetrwBrowseX
    st            a)Esc^i(Esc$:wCR
  n  PlugNetrwBrowseX * :call netrw#NetrwBrowseX(expand(cWORD),0)
  CR
    M-Up        gk
    M-Down      gj

 That means that the ftplugin is not executed correctly for some  
 reason. Can you zip me a small source tree, where this happens and  
 send it to me?

  Which exact version of contrib should be used?

 2.1.2 was tested with revision 919 of the old subversion repo, but the  
 1.0-compatible branch of the git repo should also work. The most  
 difficult point is the move of c.c.stacktrace into core.

 Sincerely
 Meikel

  smime.p7s
 2KViewDownload
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



maplocalleader vimclojure

2009-09-02 Thread ronen

Iv been trying to use the Nailgun functionlity of vimclojure but Im
stuck on a silly issue, Im hitting LocalLeaderel inside:
(println hello)

 And nothing happens, same goes for the rest options.

In addition its not clear to me how to start the REPL the doc/
README.txt says:

Start a Repl via the |sr| shortcut. At the prompt just type
expressions

Im typing sr with and without pipes with no avail.

My vimrc settings are:
 Vim Clojure
let vimclojure#NailgunClient = /home/ronen/.vimclojure/ng
let clj_want_gorilla = 1
let clj_paren_rainbow = 1
let clj_highlight_builtins = 1
let clj_highlight_contrib = 1

Im starting Nailgun with:

java -cp ../.clojure/:build/vimclojure.jar:src/
com.martiansoftware.nailgun.NGServer 127.0.0.1

Im using the latest  greatest 2.1.2 plugin version, on a macbook
running Ubuntu using vim 7.2.79
Any help is appreciated!

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



Re: When to use macros

2009-08-30 Thread ronen

Cool, I guess that there is no one correct answer but more a
question of style  experience,
the separation of logic   code mangling into two parts makes the most
sense to me.

Ill continue to sharp my macro foo ;)

On Aug 30, 8:16 pm, Vagif Verdi vagif.ve...@gmail.com wrote:
 I would argue that macros always should be syntax wrappers for
 functions. Coding the logic into a macro in most cases is a mistake.
 So first write the function that does the work. Then write a macro
 that simplifies a syntax to call that function.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



When to use macros

2009-08-29 Thread ronen

In a lot of cases its seems that macros are used even when a function
can do the same task,
Macros seems to be less readable than their functional counterparts 
more complex to write (to me at least).

Its clear that there are special cases in which macros are the perfect
solution (like partial evaluation of expressions, if-else constructs
etc..).

Id appreciate any thoughts on this topic.

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



Re: ANN: FnParse, a functional parsing library

2009-07-14 Thread ronen

Looks quite nice, can you tell how it compares (performance wise) to
other parsing libraries?

On Jul 6, 3:55 am, Wilson MacGyver wmacgy...@gmail.com wrote:
 Thanks for the tip on looking at clojure.contrib. I keep forgetting to  
 check there.

 On Jul 5, 2009, at 4:20 PM, samppi rbysam...@gmail.com wrote:



  If you need a JSON parser, there's already a good one included with
  clojure.contrib. The one with the FnParse library is just a sample to
  show how it works. But please feel free to use it however it can be
  useful to you. :)

  On Jul 4, 1:45 pm, Wilson MacGyver wmacgy...@gmail.com wrote:
  Very timely, I need to parse a bunch on JSON files on Monday :) good
  work

  Sent from my iPhone

  On Jul 4, 2009, at 3:16 PM, samppi rbysam...@gmail.com wrote:

  I'm pleased to announce FnParse, a monadic functional parsing  
  library
  for Clojure, half a year in the making. I started on FnParse in
  December as my first Clojure project, and now it has matured to
  something that I believe is very and immediately useful. Currently,
  I'm writing a YAML parser using FnParse.

  With FnParse, you can easily parse a string or any sequence of  
  tokens
  into native data structures. FnParse is based on the concept of the
  rule, a self-contained function that accepts a state data structure,
  containing a sequence of tokens, and either consumes some tokens--
  turning them into new data--or fails. Rules correspond nicely to  
  EBNF
  productions and productions in other sort of grammars. FnParse
  provides common rules, functions that create new rules, and  
  functions
  that facilitate using rules.

  A sample JSON parser is athttp://wiki.github.com/joshua-choi/
  fnparse/sample-json-parser
  .
  Online documentation is available at:http://wiki.github.com/joshua-
  choi/fnparse
  .
  The source is at:http://github.com/joshua-choi/fnparse.

  If you are confused about anything or find any bugs, please create  
  an
  issue on GitHub (http://github.com/joshua-choi/fnparse/issues) or  
  send
  me a message on GitHub.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: The - . nested usage

2009-06-08 Thread ronen

I see, using - with . will not create a chain of new
invocations, the best solution that iv found is:
user= (String. (String.))

user= (macroexpand (String. (String.)))

user= (macroexpand `(String. (String.)))
(new java.lang.String (java.lang.String.))

Nesting is a must :)
Thank you both for your helpful reply

On Jun 8, 10:51 pm, Kevin Downey redc...@gmail.com wrote:
 you need to pass something in.
 example:

 = (- foo String. String.)
 foo

 = (macroexpand '(- String. String.))
 (new String String.)

 = (macroexpand '(- foo String. String.))
 (new String (clojure.core/- foo String.))
 = (macroexpand '(- foo String.))
 (new String foo)

 String. is only treated as new String ...  when it is placed in the
 function position (String. ...)
  in (- String. String.) the first String. is never put in the
 function position, so effectively you get
 (String. String.)



 On Mon, Jun 8, 2009 at 12:38 PM, ronennark...@gmail.com wrote:

  Following a blog post on building large object graphs I was suggested
  with the following solution:
   (def nested-object (- GrandFather. Father. GrandSon.))

  this indeed seems to be correct however fails in even in a simple
  example:

  user= (- String. String.)
  java.lang.ClassNotFoundException: String. (NO_SOURCE_FILE:7)

  expanding the macros involved seems to reveal the issue:

  user= (macroexpand-1 `(- String. String.))
  (java.lang.String. java.lang.String.)

  the . macro isn't expanded.

  Is there a way of applying nested macros?
  (iv searched for applying nested macros with no results).

 --
 And what is good, Phaedrus,
 And what is not good—
 Need we ask anyone to tell us these things?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: The - . nested usage

2009-06-08 Thread ronen

Great! that was the missing bit i was looking for.
thanks for clearing it out

( it seems that String. is indeed a macro)

On Jun 8, 11:05 pm, Kevin Downey redc...@gmail.com wrote:
 sure it can, you just need to pass in an initial value.

 (- (String.) String. String.) ; works
 (- x String. String.) ;works for any x where string has a constructor
 that takes something of type x

 for example

 (- file.txt File. FileReader. BufferedReader.)

 will return a buffered reader on file.txt (assuming you import those
 classes from java.io)



 On Mon, Jun 8, 2009 at 12:59 PM, ronennark...@gmail.com wrote:

  I see, using - with . will not create a chain of new
  invocations, the best solution that iv found is:
  user= (String. (String.))
  
  user= (macroexpand (String. (String.)))
  
  user= (macroexpand `(String. (String.)))
  (new java.lang.String (java.lang.String.))

  Nesting is a must :)
  Thank you both for your helpful reply

  On Jun 8, 10:51 pm, Kevin Downey redc...@gmail.com wrote:
  you need to pass something in.
  example:

  = (- foo String. String.)
  foo

  = (macroexpand '(- String. String.))
  (new String String.)

  = (macroexpand '(- foo String. String.))
  (new String (clojure.core/- foo String.))
  = (macroexpand '(- foo String.))
  (new String foo)

  String. is only treated as new String ...  when it is placed in the
  function position (String. ...)
   in (- String. String.) the first String. is never put in the
  function position, so effectively you get
  (String. String.)

  On Mon, Jun 8, 2009 at 12:38 PM, ronennark...@gmail.com wrote:

   Following a blog post on building large object graphs I was suggested
   with the following solution:
    (def nested-object (- GrandFather. Father. GrandSon.))

   this indeed seems to be correct however fails in even in a simple
   example:

   user= (- String. String.)
   java.lang.ClassNotFoundException: String. (NO_SOURCE_FILE:7)

   expanding the macros involved seems to reveal the issue:

   user= (macroexpand-1 `(- String. String.))
   (java.lang.String. java.lang.String.)

   the . macro isn't expanded.

   Is there a way of applying nested macros?
   (iv searched for applying nested macros with no results).

  --
  And what is good, Phaedrus,
  And what is not good—
  Need we ask anyone to tell us these things?

 --
 And what is good, Phaedrus,
 And what is not good—
 Need we ask anyone to tell us these things?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: how would I do this functionally? (internally mutable state)

2009-06-02 Thread ronen

As mentioned before, most file systems have the ability of providing
callback to changes in files/directories, at SE 6 using this ability
requires resorting to native code (JNA or JNI, see 
http://jnotify.sourceforge.net/)
, in SE 7 this will be implemented in NIO 2 (http://java.sun.com/
developer/technicalArticles/javase/nio/).

I would look into rsync, as far as i know it implements a very
efficient algorithm for comparing folders, there is a Java
implementation http://jarsync.sourceforge.net/

On May 29, 4:09 pm, Korny Sietsma ko...@sietsma.com wrote:
 I keep reading this thread when I should be going to bed :)  Sadly,
 this stuff is in what I call my 0.2% time so I'm not working very
 hard on it right now.

 The ruby code, which basically works (but is rather ugly in parts)
 relies on reading the whole file tree into memory, and then traversing
 the tree, saving each node (file or dir) in a repostory, which
 internally detects duplicates as they are added.

 The repository stores all known nodes, indexed by size, and then
 grouped into clumps of identical nodes.  When you add a new node, it
 compares it to all clumps of the same size as the node, looking for an
 identical clump; if it finds one, the new node is added to the clump,
 otherwise it forms a new clump.
 (sorry if this is a bit of a vague description, I haven't worked on
 this code for a while so all the details are a bit vague)

 Once the repository is built, it's pretty easy to throw away all
 non-duplicate nodes, and report on the duplicates.

 This works, but has some issues:
 - it's got some kind-of ugly handling for some special cases, like
 making sure a directory doesn't match it's own children if it only has
 one child
 - it's a bit slow, and uses a lot of memory
 - it *only* handles exact matches.

 I've been playing with shingling and sketching algorithms that are
 used by search engines to identify nearly-identical documents, and I
 think they could be applied to this problem; in fact I suspect they
 could speed it up considerably.  (If you want to know more about this
 the best reference online seems to be the book Introduction to
 Information Retrieval which is 
 athttp://www-csli.stanford.edu/~hinrich/information-retrieval-book.html
 - the chapter most relevant is 
 athttp://nlp.stanford.edu/IR-book/html/htmledition/near-duplicates-and-...
 )

 But, like I said, this is my 0.2% time project, so it might be some
 time before I really do more than think about this. :)

 - Korny



 On Fri, May 29, 2009 at 4:51 PM, Daniel Lyons fus...@storytotell.org wrote:

  For whatever reason I just can't seem to put this problem down.

  I have rewritten the code substantially. A major bottleneck was using
  Java's MD5 classes. The Fast MD5 library really is, and that helped
  a lot. I did get the - notation to work and I have a reasonable HOF
  now for doing the winnowing, which might even be applicable to another
  program someday, maybe.

  Anyway I uploaded it here: 
  http://clojure.googlegroups.com/web/dupfinder.clj
    and again I'd love any feedback anyone cares to give.

  Just to add insult to injury, I went ahead and programmed it again in
  Ruby. The good news is that I can't seem to get Ruby to find all the
  files the Clojure one finds, but the bad news is that the Ruby version
  is like four times faster. I'd love to understand that. So I uploaded
  that too: http://clojure.googlegroups.com/web/dupfinder.rb. Of
  course it must be benefiting to some extent from the fact that the
  Ruby version has a lot less abstraction, but I don't see how the
  approach is fundamentally any different or why there would be such a
  large performance disparity. I must be missing something big.

  On May 28, 2009, at 6:50 AM, Korny Sietsma wrote:
  By the way, in response to whoever suggested pre-sorting files; I
  sort-of do this (in the old ruby version) but actually, mostly the
  program is looking for duplicate *directories* of files - the goal is
  to point it at my archive disk, and have it find the biggest identical
  subdirectories.  Duplicate file checking is needed for this, but it's
  only a tiny part.

  And I'm playing with sketching algorithms at work right now, which
  look very handy for the next phase, which is to find the biggest
  *similar* subdirectories.  That's the real goal - point a program at a
  terabyte archive disk, and have it spit out :
  /archive/old_disks/laptop_2007a is 312gb and 99% similar to
  /archive/misc/stuff_from_2007
  ... or sorting by file count:
  /archive/source/old_projects/c_stuff/1996 is 20,324 files and 97%
  similar to /archive/old/disks/laptop2006/unsorted/old_drives/
  old_archive/c_cpp_stuff/90s

  I can think of three ways to approach this, none of which are
  particularly easy.

  The first is to take the duplicate file finding function and look for
  common suffixes of paths. It could almost be like running a fuzzy
  duplicate finder against your duplicates. I suspect the performance
  

Re: Method overloading proxy method

2009-05-09 Thread ronen

Well the solution in my case was to create a map from visited types to
visited members (http://tinyurl.com/poq5e2) the visitation logic uses
this map in order to invoke the next visit (http://tinyurl.com/
pkugra).

This pattern enables visitors to be implemented in Clojure for pure
Java based frameworks (like AST visitors).

On May 5, 6:00 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
 On May 4, 11:52 pm, Alex Osborne a...@meshy.org wrote:

  Thankfully, Mark managed to figure out a way of doing it with with gen-
  class by using an undocumented (?) feature where you can put types
  into the method names so as to pick the exact one you want to
  override:

  (ns org.example.FancyInputStream
    (:gen-class :extends java.io.InputStream))
  (defn -read-void [this]
    (int \a))

 Related: You can also use the :exposes-methods argument to gen-class
 to access superclass methods.

 -Stuart Sierra
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: clojure dependency management and build

2009-04-10 Thread ronen

Iv been using gant which has built in support for Ivy  Ant (for
example http://tiny.cc/tRGKB), since the build scripts are code they
make it easier to keep build scripts DRY.


On Apr 9, 9:40 pm, Bradford Cross bradford.n.cr...@gmail.com wrote:
 On Thu, Apr 9, 2009 at 11:34 AM, Stuart Sierra
 the.stuart.sie...@gmail.comwrote:





  I keep a Clojure stuff dir with the latest revisions of all the
  projects I track -- Clojure, contrib, swank, slime, etc. -- and update
  them all with a shell script that runs the various svn update and
  git pull commands.  So I always have access to the latest version of
  everything.  But I don't automatically use the latest releases in my
  projects!

  Each project that I work on has a lib dir for JARs, including
  Clojure.  I manage the JARs manually, but they're part of my source
  control repository.  I update the the JARs only when some new
  functionality or bug fix that I depend on comes out.  That way I know
  that a project won't suddenly break just because I've updated to the
  latest Clojure SVN.

  I use Ant for build management, with separate build dirs for compiled
  Java code and AOT-compiled Clojure code.  Here's my build.xml:
 http://tinyurl.com/c5vkfm

 Cool, thanks, I will look over this stuff today.  Sounds like more or less
 what I have been doing.  What are you doing about building up the classpath
 for your projects in slime/swan? Where does the rake come into play?



  Multi-version dependency tracking is HARD.  I've never seen a system
  that does it perfectly -- Rubygems, CPAN, Maven, you name it.

 Yea, I don't imagine will solve things beautifully at first, but we should
 be able to at least streamline things a bit.



  -Stuart S

  On Apr 8, 3:31 pm, Bradford Cross bradford.n.cr...@gmail.com wrote:
    When you are building something real with Clojure and Emacs/Slime/Swank
  -
   things can get a bit hairy with dependency management.

   I have scoured the inter-tubes in the past couple days to see what I
  could
   find.

   I found Lancet, for builds:
 http://github.com/stuarthalloway/lancet/tree/master

   I haven't tried it yet.

   I found some people doing things with Maven:

   Creating a clojurue app with maven:
 http://pupeno.com/blog/how-to-create-a-clojure-application?set_langua...

   clojure-pom:http://github.com/dysinger/clojure-pom/tree/master

   I heard some chatter yesterday on #clojure about using Ivy with Clojure.

   So there is a flurry of activity.  Please let me know if there are other
   things that I am missing.

   What I am doing now from my emacs / slime-repl is hacking things in
  manually
   to my  swank-clojure-extra-classpaths.  This doesn't scale for working
  with
   multiple clojure projects in emacs.

   I will probably create a script to make things a bit nicer.  But I'd like
   something fundamentally better.

   Here are the issues:

   -I download lots of little projects things from github and i want to
  munge
   them all together for my app. This means I need to build jars (some with
   ant, otehrs with maven, etc.)  and in other cases I want to depend
  directly
   on the .clj files using clojures namespace-to-dir-structure conventions.
   So
   there are a couple different ways to build of the classpath - one for
  .clj
   and one for .jar.
   -Many projects also have their own lib foler - with both jars and cljs,
  so I
   need to pick those deps up transatively.
   -The work in the Clojure community is proceeding very fast, so I'd like
   updating all the projects from git to be automated as well.

   So what is a good solution to these problems?  Perhaps it would be cool
  to
   build some git/maven/lancet aware infrastructure to do this refreshing of
   deps, building the deps, and building up the classpath.  It may also be
  good
   to configure .emacs to be able to load projects and rebuild the classpath
   dynamically based on lancet build files - much in the way that intelliJ
  or
   eclipse load projects from ant .builds or maven poms.

   Is all this too much, am I missing something that already exists?
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Method overloading proxy method

2009-03-21 Thread ronen

Hello there,
Iv been trying to implement a proxy on a class (
http://code.google.com/p/javaparser/source/browse/trunk/JavaParser/src/japa/parser/ast/visitor/VoidVisitorAdapter.java?spec=svn77r=77)
that has multiple overloaded methods (same arity different types),
trying

(defn create-visitor []
  (proxy [VoidVisitorAdapter] []
(visit [method, arg]
  (println method))
(visit [exp, arg]
  (println type

This results with compilation error Caused by:
java.lang.IllegalArgumentException: Method 'visit' redefined.

Type hints didn't help either:

(defn create-visitor []
  (proxy [VoidVisitorAdapter] []
(visit [#^MethodDeclaration method, arg]
  (println method))
(visit [#^AssignExpr exp, arg]
  (println type

Any ideas?
Thanx



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