Re: Google Summer of Code 2014 proposal

2014-03-12 Thread Matteo Ceccarello
The student application opened, so I'm going to submit my proposal.
Does anyone have suggestions or requests?

Cheers,
Matteo

Il giorno lunedì 3 marzo 2014 15:36:43 UTC+1, Matteo Ceccarello ha scritto:
>
> Hello everybody,
>
> I’m Matteo Ceccarello, a PhD student in Computer Engineering from 
> university of
> Padova, Italy. Recently, I’ve started working with Clojure, a language 
> that I
> find both powerful and fun. I’ve participated to GSoC 2013 and 2012 with
> JPF . I’m interested in
> participating to GSoC 2014 with Clojure, in order to gain confidence with
> clojure under the guidance of a mentor while contributing to the 
> community. I’ll
> describe what I’d like to do below.
> Motivation 
>
> Currently, alongside my research on parallel graph algorithms, I’ve started
> writing a web crawler in Clojure. The reasons I want to do this in clojure 
> are
> many:
>
>- The web crawling software we are using
>(Heritrix ) performs blocking IO. I think 
>that in
>big crawls this is a showstopper, since to achieve a good throughput 
>one must
>use many Java threads (in the order of 500) that end up spending most 
>of their
>time performing blocking waits. 
>- Clojure has the wonderful core.async library, with all the magic 
>that go
>blocks and channels bring. 
>- The http-kit library makes possible to perform async requests to web
>servers in a very simple way. 
>- Clojure has an awesome support for concurrency. 
>
> What I want to achieve eventually is a concurrent asynchronous web crawler,
> without a single blocking call.
>
> Since I’m new to the language, before starting to get some real work done, 
> I’ve
> worked on a few small projects, to get a feel of the language. What I 
> learned is
> that everything you put in a ref or atom must be immutable. A fundamental
> component of a web crawler is a data structure that tells you if you have
> already visited a URL. Bloom filters are a common choice for the 
> implementation
> of this component. Since this bloom filter will be put in a ref, I want 
> it to
> be immutable and, for efficiency reasons, persistent. After some research 
> on the
> web, I found out that an immutable persistent implementation of the bloom 
> filter
> is still missing from the Clojure ecosystem.
>
> Since it seems that Clojure is missing a persistent implementation of many
> probabilistic data structures, I came up with the following idea.
> Persistent probabilistic data structures for Clojure 
>
> Clojure seems to miss persistent implementations of many useful 
> probabilistic
> data structures, in particular:
>
>- Bloom filters  
>- Counting Bloom 
> filters 
>- Compact approximators  
>- HyperLogLog 
> counters
>  
>- Count-min 
> sketches
>  
>
> Of course one can use one of the various implementations of these data 
> structures for
> Java, however, being these implementations mutable, they cannot be used
> in idiomatic concurrent clojure code (as for my understanding of idiomatic
> concurrent clojure code).
>
> What I propose to realize is an optimized persistent implementation of 
> these
> libraries. Hence I plan to explore different paths using
> benchmarks  as a guide,
> for instance to decide whether it’s more convenient to use standard 
> clojure vectors
> to represent bit vectors or to provide a custom persistent
> bit vector implementation.
>
> Since I like the feeling of having a static type checker that
> prevents common errors, the library will be annotated with
> Typed Clojure . Moreover I find interesting the 
> idea
> of using tests as machine checkable documentation, and
> midje-doc  seems the right tool 
> for the job.
>
> Is there someone interested in mentoring me with this project?
>
> Yours sincerely
> Matteo
>

-- 
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: Google Summer of Code 2014 proposal

2014-03-12 Thread Rob Day
I don't have enough experience in this field to comment very sensibly
(or offer to mentor), but I wanted to say that I think it would be
really nice to have a broader selection of specialised persistent data
structures available for Clojure.

On 12 March 2014 09:56, Matteo Ceccarello  wrote:
> The student application opened, so I'm going to submit my proposal.
> Does anyone have suggestions or requests?
>
> Cheers,
> Matteo
>
> Il giorno lunedì 3 marzo 2014 15:36:43 UTC+1, Matteo Ceccarello ha scritto:
>>
>> Hello everybody,
>>
>> I'm Matteo Ceccarello, a PhD student in Computer Engineering from
>> university of
>> Padova, Italy. Recently, I've started working with Clojure, a language
>> that I
>> find both powerful and fun. I've participated to GSoC 2013 and 2012 with
>> JPF. I'm interested in
>> participating to GSoC 2014 with Clojure, in order to gain confidence with
>> clojure under the guidance of a mentor while contributing to the
>> community. I'll
>> describe what I'd like to do below.
>>
>> Motivation
>>
>> Currently, alongside my research on parallel graph algorithms, I've
>> started
>> writing a web crawler in Clojure. The reasons I want to do this in clojure
>> are
>> many:
>>
>> The web crawling software we are using
>> (Heritrix) performs blocking IO. I think that in
>> big crawls this is a showstopper, since to achieve a good throughput one
>> must
>> use many Java threads (in the order of 500) that end up spending most of
>> their
>> time performing blocking waits.
>> Clojure has the wonderful core.async library, with all the magic that go
>> blocks and channels bring.
>> The http-kit library makes possible to perform async requests to web
>> servers in a very simple way.
>> Clojure has an awesome support for concurrency.
>>
>> What I want to achieve eventually is a concurrent asynchronous web
>> crawler,
>> without a single blocking call.
>>
>> Since I'm new to the language, before starting to get some real work done,
>> I've
>> worked on a few small projects, to get a feel of the language. What I
>> learned is
>> that everything you put in a ref or atom must be immutable. A fundamental
>> component of a web crawler is a data structure that tells you if you have
>> already visited a URL. Bloom filters are a common choice for the
>> implementation
>> of this component. Since this bloom filter will be put in a ref, I want it
>> to
>> be immutable and, for efficiency reasons, persistent. After some research
>> on the
>> web, I found out that an immutable persistent implementation of the bloom
>> filter
>> is still missing from the Clojure ecosystem.
>>
>> Since it seems that Clojure is missing a persistent implementation of many
>> probabilistic data structures, I came up with the following idea.
>>
>> Persistent probabilistic data structures for Clojure
>>
>> Clojure seems to miss persistent implementations of many useful
>> probabilistic
>> data structures, in particular:
>>
>> Bloom filters
>> Counting Bloom filters
>> Compact approximators
>> HyperLogLog counters
>> Count-min sketches
>>
>> Of course one can use one of the various implementations of these data
>> structures for
>> Java, however, being these implementations mutable, they cannot be used
>> in idiomatic concurrent clojure code (as for my understanding of idiomatic
>> concurrent clojure code).
>>
>> What I propose to realize is an optimized persistent implementation of
>> these
>> libraries. Hence I plan to explore different paths using
>> benchmarks as a guide,
>> for instance to decide whether it's more convenient to use standard
>> clojure vectors
>> to represent bit vectors or to provide a custom persistent
>> bit vector implementation.
>>
>> Since I like the feeling of having a static type checker that
>> prevents common errors, the library will be annotated with
>> Typed Clojure. Moreover I find interesting the idea
>> of using tests as machine checkable documentation, and
>> midje-doc seems the right tool for the job.
>>
>> Is there someone interested in mentoring me with this project?
>>
>> Yours sincerely
>> Matteo
>
> --
> 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 mod

Re: Quil for ClojureScript

2014-03-12 Thread Nikita Beloglazov
Hi Divyansh

You're welcome to submit a proposal for Quil in Clojurescript project. 
But please bear in mind that there are several students who're applying for 
the project so it may be wise to submit several applications for different 
projects.

Thank you,
Nikita

On Tuesday, March 11, 2014 12:26:18 PM UTC, Divyansh Prakash wrote:
>
> Hello!
>
> I am a Java developer, and the author of 
> 3Coffee, 
> a 2D Game Engine (with custom inbuilt physics) that I wrote some 2 years 
> back.
> I stumbled across Clojure while trying to solve one of the *many* 
> threading issues I seemed to have with swing.
>
> I have been Lisping ever since. Check 
> thisout.
>
> The point is: I like designing high-level APIs, and have a fairly good 
> understanding of Clojure (and working on it). I have worked with 
> graphics-processing before, and would like to work on the ClojureScript 
> port for Quil as a project for GSoC 2014.
>
> I have been busy with college all this while, but I'll start working on it 
> ASAP.
> Will keep you posted.
>

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


traversing amazonica (or other nested data) results

2014-03-12 Thread Dave Tenny
If I do something like a describe-instances call in amazonica, I get a 
typical clojure-y set of data fairly deeply nested data structures
that I have yet to master with respect to traversing  using basic clojure 
operations.

Given a result that basically ends up looking like pages of interleaved 
maps and arrays, what should I be using to pick out
nested key/value information?

{:reservations [{:reservation-id "r-3da23a55",
... pages of output ...
}]}]}]}
user=>

'get-in' won't do it because of the arrays (or PersistentArrayMaps, as the 
case may be).
I was hoping to avoid zippers, but maybe that is the idiomatic way to do 
it, I don't know.

 What's the easy way to traverse these things?  This is a very common data 
pattern in using clojure to access everything from html content to AWS data.
 I just want to pluck out the :instance k/v information in the nested 
morass of data printed at my REPL but I haven't yet found the intuitive and 
idiomatic way to do it.





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


Re: Question about importing java classes to Clojure

2014-03-12 Thread Brandon Barret


 
 Thanks everyone! I think I figured it out. Being new to Clojure, I wasn't 
really considering that I was passing an anonymous function and wasn't 
thinking about recursion. Coming fom an Object Oriented background, 
properly forming functions is a bit new to me. Thanks for all the pointers! 
I am going to do a bit more work tonight...again, thanks for all of the 
help and suggestions!

-- 
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] Clojure/West, San Francisco, Mar 24-26

2014-03-12 Thread Alex Miller
Clojure/West is coming up very soon! We have a great program lined up, and
are pleased that we can now announce that *John Hughes*, co-inventor of
Haskell and QuickCheck will be doing the keynote.

Tickets for both the conference and the pre-conference training (Clojure,
ClojureScript, and Datomic) are still available! We would love to see you
there.

- Schedule: http://www.clojurewest.org/schedule
- Registration:
https://www.eventbrite.com/e/clojurewest-2014-tickets-10153269703
- Training:
https://www.eventbrite.com/e/sf-clojure-training-intro-to-clojure-datomic-clojurescript-tickets-10165560465
- Sponsorship - http://www.clojurewest.org/sponsorship-prospectus.pdf

If you are in the area and not attending the conference, you are still
welcome to attend the unsessions and the hackfest!

- Unsessions, Mon Mar 24, 7-10 pm -
https://github.com/cognitect/ClojureWest/wiki/Clojure-West-Unsessions
- Hackfest, Wed Mar 26, 9 am - 2 pm -
https://github.com/cognitect/ClojureWest/wiki/Clojure-West-Hackfest

If you have any questions, please contact us at clojure-w...@cognitect.com.

Alex

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

2014-03-12 Thread Malcolm Sparks
Hi Joachim,

What you're describing is a dynamic system map, whereas the current pattern
as described by Stuart in his classic blog post
http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloadeddescribes
a static system map which is established at the beginning of a
reset cycle and remains. After all, it's a var, not an atom. The reset
pattern is intended as a development aid, with the bonus of providing some
architectural hygiene that comes in having system state located in a single
map (rather than as vars spread over many namespaces). There is no
intention to reset a production system.

However, there's no reason why you can't put an atom or ref in the system
map, have that atom or ref updated every time the config changes, and
connect everything together with core.async. Parts of your program that
need up-to-date configuration details can deref the atom or ref, just in
time, or watch the atom or ref in order to trigger database re-connections.

You definitely shouldn't be altering the global var root which contains the
system, as suggested in 2. You shouldn't access user/system in your program
code (although it's a useful thing to access in an exploratory REPL).
Instead, a component should pass the system it receives in the start phase
as an argument when building structures, such as Ring middle-ware chains,
connection managers, thread pools, etc.

Regards,

Malcolm





On 11 March 2014 15:17, Joachim De Beule  wrote:

> update: I made mistake at the end of my previous post: I mean "that the db
> component does NOT sufficiently encapsulate the internals" of course...
>
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/E0BdR_AksiA/unsubscribe.
> To unsubscribe from this group and all its topics, 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.


jquery/$ in cljs

2014-03-12 Thread t x
Hi,

  Consider 
https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57

  I want to know how to express "$.bullet" in cljs (when compiled with
optimiztaions: advanced).

  I know how to use things like


  (js/console.log ... )
  (js/MathJax ... )

  However, what I'm stuck on here is how to use "$" in cljs land.

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: jquery/$ in cljs

2014-03-12 Thread Timothy Baldridge
I think this should work:

(.bullet js/$ arg1 arg2)

Although this might not work with advanced compilation. In that case you
may need to provide extra info to the CLJS compiler to keep .bullet from
getting renamed.

Timothy


On Wed, Mar 12, 2014 at 11:14 AM, t x  wrote:

> Hi,
>
>   Consider
> https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57
>
>   I want to know how to express "$.bullet" in cljs (when compiled with
> optimiztaions: advanced).
>
>   I know how to use things like
>
>
>   (js/console.log ... )
>   (js/MathJax ... )
>
>   However, what I'm stuck on here is how to use "$" in cljs land.
>
> 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.
>



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

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


Re: jquery/$ in cljs

2014-03-12 Thread James Reeves
Take a look at jayq: https://github.com/ibdknox/jayq

- James


On 12 March 2014 17:14, t x  wrote:

> Hi,
>
>   Consider
> https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57
>
>   I want to know how to express "$.bullet" in cljs (when compiled with
> optimiztaions: advanced).
>
>   I know how to use things like
>
>
>   (js/console.log ... )
>   (js/MathJax ... )
>
>   However, what I'm stuck on here is how to use "$" in cljs land.
>
> 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.
>

-- 
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: traversing amazonica (or other nested data) results

2014-03-12 Thread Sam Halicke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Dave Tenny wrote:
> If I do something like a describe-instances call in amazonica, I get
> a typical clojure-y set of data fairly deeply nested data structures 
> that I have yet to master with respect to traversing  using basic 
> clojure operations.
> 
> Given a result that basically ends up looking like pages of
> interleaved maps and arrays, what should I be using to pick out 
> nested key/value information?
> 

Hi Dave,

You want to look at extending the IMarshall protocol -- it defines how
the java objects returned by the API are (de?)-serialized into Clojure
datastructures. You can flatten the results massively without much work.
Check the docs, but the examples in the source code are better (as
below). Look at how it's done for some of the API, e.g. S3:

(extend-protocol IMarshall
  S3Object
  (marshall [obj]
{:bucket-name   (.getBucketName obj)
 :key   (.getKey obj)
 :input-stream  (.getObjectContent obj)
 :object-content(.getObjectContent obj)
 :redirect-location (.getRedirectLocation obj)
 :object-metadata   (marshall
  (.getObjectMetadata obj))}))

Note that you can also nest calls recursively if you have to (e.g. some
objects are inexplicably tied to one another -- .getResourceRecordSet
comes to mind). Most calls are just chains of reflection, IIRC, so
indeed there are likely pages of arbitrary nesting.

You're also going to want the amazon java api docs handy in order to
figure out which methods you'll want for which objects you come across.
The REPL & a good autocomplete is invaluable here too.

Cheers,

- 
Sam Halicke
@samhalicke

> {:reservations [{:reservation-id "r-3da23a55", ... pages of output
> ... }]}]}]} user=>
> 
> 'get-in' won't do it because of the arrays (or PersistentArrayMaps,
> as the case may be). I was hoping to avoid zippers, but maybe that is
> the idiomatic way to do it, I don't know.
> 
> What's the easy way to traverse these things?  This is a very common 
> data pattern in using clojure to access everything from html content
> to AWS data. I just want to pluck out the :instance k/v information
> in the nested morass of data printed at my REPL but I haven't yet
> found the intuitive and idiomatic way to do it.
> 

Yeah, skip traversal and just get the information you want in as flat of
a data structure as you want using the marshalling/coercion bits.


> 
> 
> 
> 
> -- 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.
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCgAGBQJTIJtaAAoJELjsMLyBmkuqpj0H/132/iCDYvBszN8NBhmx2Ejw
eX8z2yiWWIbwL9XQTFB+/Y7gK1upfsnzgcHGFqXF4Iji+DaqJjGFBn3ad+icQK9i
xSXIlAzSU45azx8iKnI5Jw1/aErYYAJY3WL3bgORLNKikl8P1pPZMt3+N90Bgtn9
UBdvh6/KUwKPJ8gvaI+UBtsQ6dx6HZ5VHRH0O5n54EzciiY+pWL223OynLWlzWOJ
y3gsUuWU9/fTftj6H18nlsCIbCpgV5CDnXbp4HRX8HpjMGAi4ekqwgpDddTBbfYv
7tFs/KJxPzoi7FJgo5qwCJ15u7gy57z1+8Kz9d+6Cap+U73K7y96JzpSvxRfqsk=
=lZZr
-END PGP SIGNATURE-

-- 
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] EuroClojure 2014 CfP open

2014-03-12 Thread Marco Abis
Dear all,

   a quick one to announce that the CfP for this year's EuroClojure is
now open at http://cfp.euroclojure.com

Looking forward to receiving way too many proposals :-)

Marco

-- 
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: Quil for ClojureScript

2014-03-12 Thread adrian . medina
I wrote a small wrapper over processing.js over the week a few weeks ago, 
here are some examples with 
code: http://aamedina.github.io/processing.cljs. 

It was a lot of fun. =) Good luck with the port!

On Tuesday, March 11, 2014 8:26:18 AM UTC-4, Divyansh Prakash wrote:
>
> Hello!
>
> I am a Java developer, and the author of 
> 3Coffee, 
> a 2D Game Engine (with custom inbuilt physics) that I wrote some 2 years 
> back.
> I stumbled across Clojure while trying to solve one of the *many* 
> threading issues I seemed to have with swing.
>
> I have been Lisping ever since. Check 
> thisout.
>
> The point is: I like designing high-level APIs, and have a fairly good 
> understanding of Clojure (and working on it). I have worked with 
> graphics-processing before, and would like to work on the ClojureScript 
> port for Quil as a project for GSoC 2014.
>
> I have been busy with college all this while, but I'll start working on it 
> ASAP.
> Will keep you posted.
>

-- 
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: expectations 2.0 has been released

2014-03-12 Thread Sean Corfield
Since `given` was a relatively simple macro, we added it to 
worldsingles.util.test and switched all our test namespaces to refer given from 
there instead, and then upgraded to Expectations 2.0.6. Seems to have gone 
smoothly.

Love the new DSL features!

Sean

On Mar 11, 2014, at 8:28 PM, Sean Corfield  wrote:

> Looks great Jay - as you know I'm a big fan of Expectations.
> 
> One big issue I see here is that by removing 'given' you've made adoption of 
> 2.0 a bit "all or nothing": to use 2.0, I must update our entire test base to 
> rewrite all 'given' tests using the new syntax.
> 
> Is there an intermediate version that has both 'given' _and_ the new syntax 
> so folks can migrate piecemeal?
> 
> Sean
> 
> On Mar 11, 2014, at 6:28 PM, Jay Fields  wrote:
> 
>> expectations is a minimilist's unit testing framework
>> 
>> website: http://jayfields.com/expectations/
>> github: https://github.com/jaycfields/expectations
>> 
>> changelog: 
>> https://github.com/jaycfields/expectations/blob/master/CHANGELOG.md
>> 
>> some large changes that will hopefully result in even more concise and
>> maintainable tests.
>> 
>> feedback always welcome.
>> 
>> Jay
>> 
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: traversing amazonica (or other nested data) results

2014-03-12 Thread Michael Cohen
" I get a typical clojure-y set of data fairly deeply nested data 
structures that I have yet to master with respect to traversing  using 
basic clojure operations"

You get an arbitrarily nested Clojure, not Clojure-y, data structure 
precisely because those maps, lists, and sets suffice in 99% of cases and 
the language has probably the best set of functions (including those data 
structures themselves!) for working with them of any language out there. 
Honestly, Clojure's data structures and the suite of polymorphic functions 
that go with them are kind of the whole point of the language. Just keep 
practicing using them. 

2 maps, a flatten, a select-keys, anddata...

(->> (describe-instances)
   :reservations
   (map :instances)
   flatten
   (map #(select-keys % [:instance-id :instance-type 
:public-ip-address]))) ;; whatever other keys you're interested in



On Wednesday, March 12, 2014 4:13:06 AM UTC-7, Dave Tenny wrote:
>
> If I do something like a describe-instances call in amazonica, I get a 
> typical clojure-y set of data fairly deeply nested data structures
> that I have yet to master with respect to traversing  using basic clojure 
> operations.
>
> Given a result that basically ends up looking like pages of interleaved 
> maps and arrays, what should I be using to pick out
> nested key/value information?
>
> {:reservations [{:reservation-id "r-3da23a55",
> ... pages of output ...
> }]}]}]}
> user=>
>
> 'get-in' won't do it because of the arrays (or PersistentArrayMaps, as the 
> case may be).
> I was hoping to avoid zippers, but maybe that is the idiomatic way to do 
> it, I don't know.
>
>  What's the easy way to traverse these things?  This is a very common data 
> pattern in using clojure to access everything from html content to AWS data.
>  I just want to pluck out the :instance k/v information in the nested 
> morass of data printed at my REPL but I haven't yet found the intuitive and 
> idiomatic way to do it.
>
>
>
>
>
>

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


Re: jquery/$ in cljs

2014-03-12 Thread t x
@Timothy, James: Everything works now. Thanks!

On Wed, Mar 12, 2014 at 10:38 AM, James Reeves  wrote:
> Take a look at jayq: https://github.com/ibdknox/jayq
>
> - James
>
>
> On 12 March 2014 17:14, t x  wrote:
>>
>> Hi,
>>
>>   Consider
>> https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57
>>
>>   I want to know how to express "$.bullet" in cljs (when compiled with
>> optimiztaions: advanced).
>>
>>   I know how to use things like
>>
>>
>>   (js/console.log ... )
>>   (js/MathJax ... )
>>
>>   However, what I'm stuck on here is how to use "$" in cljs land.
>>
>> 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.
>
>
> --
> 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: Help a Startup use Clojure!

2014-03-12 Thread Jarrod Swart
David,

Awesome thanks for sharing!

I hope it works out for you!

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


shenandoah

2014-03-12 Thread Jacob Goodson
How many people have heard of this GC?  
http://www.jclarity.com/2014/02/19/shenandoah-a-new-low-pause-garbage-collection-algorithm-for-the-java-hotspot-jvm/

I want to know if this would benefit clojure.  I wrote a small asteroids 
game in clojure and the performance was not good.  I stuck to purity when 
writing the game, only "mutating" my data after it had passed through a 
bazillion pure functions.  I was wondering, would a GC like this one(or 
Azul's) make a significant impact so that I, or others, could make games in 
a more pure fashion?  I WANT MY EFFIN PURITY!

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

2014-03-12 Thread James Reeves
I've done a fair bit of experimentation with writing games in Clojure, and
I haven't noticed any major performance issues. If you're getting issues on
a 2D asteroids clone, I suspect there might be something inefficient in
your code. I find Criterium useful for benchmarking parts of my code in
isolation to get an idea of how its running.

- James


On 12 March 2014 21:53, Jacob Goodson  wrote:

> How many people have heard of this GC?
> http://www.jclarity.com/2014/02/19/shenandoah-a-new-low-pause-garbage-collection-algorithm-for-the-java-hotspot-jvm/
>
> I want to know if this would benefit clojure.  I wrote a small asteroids
> game in clojure and the performance was not good.  I stuck to purity when
> writing the game, only "mutating" my data after it had passed through a
> bazillion pure functions.  I was wondering, would a GC like this one(or
> Azul's) make a significant impact so that I, or others, could make games in
> a more pure fashion?  I WANT MY EFFIN PURITY!
>
> --
> 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: shenandoah

2014-03-12 Thread Raoul Duke
> bazillion pure functions.  I was wondering, would a GC like this one(or
> Azul's) make a significant impact so that I, or others, could make games in
> a more pure fashion?  I WANT MY EFFIN PURITY!

i'd rather have linear types or something like that, than some gc
solution. :-) i mean, if i'm dreaming.

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

2014-03-12 Thread Jacob Goodson
Let me state that, as long as it is a asteroids clone, it is fine.  
However, compared to Java, the performance was much worse(when just playing 
with it and drawing tons of asteroids in opengl).  Also, I do not know what 
you mean when you say that you have tested it... the 

pure way or the mutate objects in place way?  I can get great performance 
with clojure, no doubt about it, by violating the shat out of functional 
programming.  I can not get great performance with the beautiful, pure, 
composable, clojure that I desire!  I have seen many game 

examples in "clojure" where, basically, clojure is just a scripting 
language that wraps java.  It is no problem if this is the case, my 
question has jack crap to do about getting good performance writing 
asteroids.  My question is: Will clojure(the immutable composable side) 

benefit from shenandoah(blasted font) at all?  Can someone who knows a good 
bit about clojure tell me if a more powerful garbage collector would allow 
us clojurians to be more pure or is it something else inherently in 
immutable land that will "never"(it will take a long time) get fixed.

On Wednesday, March 12, 2014 6:53:43 PM UTC-4, James Reeves wrote:
>
> I've done a fair bit of experimentation with writing games in Clojure, and 
> I haven't noticed any major performance issues. If you're getting issues on 
> a 2D asteroids clone, I suspect there might be something inefficient in 
> your code. I find Criterium useful for benchmarking parts of my code in 
> isolation to get an idea of how its running.
>
> - James
>
>
> On 12 March 2014 21:53, Jacob Goodson  >wrote:
>
>> How many people have heard of this GC?  
>> http://www.jclarity.com/2014/02/19/shenandoah-a-new-low-pause-garbage-collection-algorithm-for-the-java-hotspot-jvm/
>>
>> I want to know if this would benefit clojure.  I wrote a small asteroids 
>> game in clojure and the performance was not good.  I stuck to purity when 
>> writing the game, only "mutating" my data after it had passed through a 
>> bazillion pure functions.  I was wondering, would a GC like this one(or 
>> Azul's) make a significant impact so that I, or others, could make games in 
>> a more pure fashion?  I WANT MY EFFIN PURITY!
>>  
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: shenandoah

2014-03-12 Thread Raoul Duke
> pure way or the mutate objects in place way?  I can get great performance
> with clojure, no doubt about it, by violating the shat out of functional
> programming.  I can not get great performance with the beautiful, pure,
> composable, clojure that I desire!

(personally i think this is a great topic, of great interest to me
personally, and if one squints at it and forgets about the "game"
aspect, is a very relevant thing in general in terms of defending,
improving, being able to use "pure" approaches more often. i'm sure a
lot of folks who have heard of fp and pure fp equate it with utterly
bad performance, true or not.)

depending on the structure of your system, clojure's transients might
help. maybe. quite often in real games, there are explicit memory
pools per game tick. sorta like the autorelease pools in objective-c,
say. that's perhaps akin to region based memory management. (the BitC
folks pondered and pontificated upon regions for a while, but i don't
believe there's any "production quality" language that supports them
yet.)

in general, have there been closer-to-pure-than-mutating high
performance apps written ever, in any programming language? and if so,
how? could they have been done on a mobile device, or do they only
work when you have 4GB of main RAM etc.?

i've seen examples of "pure" asteroids in Haskell and CAL. J. Hague is
one of the standard urls to paste into a discussion like this.
http://prog21.dadgum.com/23.html.

Would things like linear/affine/uniqueness types be a better approach?
Personally I think/hope in the long run they would be, because they
get us the ability to *safely mutate*. So far I think the only
language which is remotely near to something one could use for
production, along those lines, is ATS which compiles down to C/++. It
might well be possible in Shen, that would be pretty exciting I think.

sincerely.

-- 
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: Help a Startup use Clojure!

2014-03-12 Thread Alan Moore
My 2 cents worth...


   1. PHP is a dying language IMHO. The alternatives are just too 
   compelling unless you have an existing code base in PHP.
   2. Javascript is the lingua franca (or assembly lang) of the internet 
   for the time being and probably the foreseeable future.
   3. Many webapps are moving to the client-side instead of the server 
   centric PHP/CGI oriented designs of yesteryear. Again, this means 
   Javascript (and/or ClojureScript) primarily.
   4. You can adopt Javascript as your primary language for both the server 
   (nodejs) and client (browser.) This way you can use ClojureScript to target 
   both on an as-needed basis. This also lets you leverage lots of existing 
   libraries on both sides.
   5. If you need to target mobile devices PHP might be somewhat limited. 
   There are tons of Java (Android) and/or Javascript/ObjC (iOS) options to 
   target mobile clients.
   6. My guess is that most API integrations will be via either Java (on 
   the server) or in Javascript on the client.
   7. On the server you can serve different endpoints using different 
   technologies. Maybe your support.xyz.com is a hosted PHP forum app but your 
   REST API is built using Clojure/Ring.
   8. Many externally exposed APIs are actually network protocols (REST or 
   ZMQ, etc.) and are thus largely language neutral (assuming there is a 
   language binding for your chosen protocol.) However, I suspect that using 
   PHP will be very difficult from a protocol/binding point of view.

Hope this helps. Good luck!

Alan


On Tuesday, March 11, 2014 4:29:06 PM UTC-7, Jarrod Swart wrote:
>
> Sean,
>
> Oops I didn't realize you were asking these questions:
>
>
>- What are you building? 
>   - An application for businesses to help leverage the power of 
>   crowds in non-traditional "crowdsource" environments.  
>   - The main use-case for many will be that of integration with-in 
>   their own applications and I suspect the application will be more API 
> than 
>   App centric.  Sorry for being vague but I'm still learning too.  I will 
>   know more for sure when I actually have the meeting with the founders.
>- Why do _you_ think Clojure is a better choice than PHP? 
>- Due to the limited number of developers (just me initially) I think 
>   Clojure presents a tool chain that is familiar and fast.  Dynamic 
>   programming in a highly iterative development environment means that I 
> can 
>   solve challenges that the business will face rather than challenges 
>   presented by the programming language.
>  - Clojure is to programming what Lean\Agility are to business 
>  process
>  - Wanting to work with a set of tools also goes a long way 
>  toward dealing with the other hardships of an early stage company.  
> If I'm 
>  making less money and failure is a big part of the equation I want 
> to enjoy 
>  what I'm doing.  I think future hires would agree.
>   - The heavy amounts of text we will deal with is much easier to 
>   handle with the JVM than with PHP.  PHP support for UTF-* is fairly bad 
>   (compared to Golang or Clojure) and I have had enough personal trouble 
> with 
>   it.
>   - Again though we are not "Big Data" the first processing 
>   bottleneck will likely be dealing with large quantities of text.  This 
> is 
>   something that Clojure and the JVM have a lot more options for dealing 
> with.
>   - The JVM platform means that when it comes time to optimize for 
>   performance we have options rather than an app rewrite.
>
>
>
>

-- 
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: Help a Startup use Clojure!

2014-03-12 Thread Jarrod Swart
Alan,

Thanks for your input!  ClojureScript is something I have wanted to try 
more but it seems even more cutting edge than Clojure.  It might be too 
much effort to try and tackle that now. 

I do agree though that Clojure+Ring is a great back-end setup for 
connecting to with JavaScript.

Best,
Jarrod

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

2014-03-12 Thread Jacob Goodson
I use mutation generously inside of functions.  I do not consider that 
impure at all, pragmatic yes, impure no.  Has anyone used Azul's jvm and 
gotten a big bump in performance?

On Wednesday, March 12, 2014 7:28:44 PM UTC-4, raould wrote:
>
> > pure way or the mutate objects in place way?  I can get great 
> performance 
> > with clojure, no doubt about it, by violating the shat out of functional 
> > programming.  I can not get great performance with the beautiful, pure, 
> > composable, clojure that I desire! 
>
> (personally i think this is a great topic, of great interest to me 
> personally, and if one squints at it and forgets about the "game" 
> aspect, is a very relevant thing in general in terms of defending, 
> improving, being able to use "pure" approaches more often. i'm sure a 
> lot of folks who have heard of fp and pure fp equate it with utterly 
> bad performance, true or not.) 
>
> depending on the structure of your system, clojure's transients might 
> help. maybe. quite often in real games, there are explicit memory 
> pools per game tick. sorta like the autorelease pools in objective-c, 
> say. that's perhaps akin to region based memory management. (the BitC 
> folks pondered and pontificated upon regions for a while, but i don't 
> believe there's any "production quality" language that supports them 
> yet.) 
>
> in general, have there been closer-to-pure-than-mutating high 
> performance apps written ever, in any programming language? and if so, 
> how? could they have been done on a mobile device, or do they only 
> work when you have 4GB of main RAM etc.? 
>
> i've seen examples of "pure" asteroids in Haskell and CAL. J. Hague is 
> one of the standard urls to paste into a discussion like this. 
> http://prog21.dadgum.com/23.html. 
>
> Would things like linear/affine/uniqueness types be a better approach? 
> Personally I think/hope in the long run they would be, because they 
> get us the ability to *safely mutate*. So far I think the only 
> language which is remotely near to something one could use for 
> production, along those lines, is ATS which compiles down to C/++. It 
> might well be possible in Shen, that would be pretty exciting I think. 
>
> sincerely. 
>

-- 
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: Help a Startup use Clojure!

2014-03-12 Thread t x
I personally recommend ClojureScript + Erlang.

As for convincing your boss to use Erlang, ask him about WhatsApp. :-)

On Wed, Mar 12, 2014 at 5:06 PM, Jarrod Swart  wrote:
> Alan,
>
> Thanks for your input!  ClojureScript is something I have wanted to try more
> but it seems even more cutting edge than Clojure.  It might be too much
> effort to try and tackle that now.
>
> I do agree though that Clojure+Ring is a great back-end setup for connecting
> to with JavaScript.
>
> Best,
> Jarrod
>
> --
> 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.


[ANN] Instaparse 1.3.0

2014-03-12 Thread Mark Engelberg
Instaparse is a lightweight tool for generating parsers from context-free
grammars.



*https://github.com/engelberg/instaparse
*
The 1.3.0 release is compatible with Clojure 1.6 (and backwards-compatible
with 1.5.1).

Feature-wise, this release is identical to 1.2.16, so if you're still on
Clojure 1.5.1, you don't need to upgrade to 1.3.0.

I'll be giving a talk about Instaparse and its implementation at
Clojure/West on March 24.  Hope to meet some of you there!

-- 
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: Help a Startup use Clojure!

2014-03-12 Thread Mike Haney
Have you considered node.js?  It's fantastic for building web services, very 
easy to deploy (Heroku), and should scale well enough that most startups won't 
outgrow it (and if you do, that's a very good problem to have).

You can still build your app using Clojurescript, either for the entire thing, 
or just in areas where it makes the most sense, which would probably be more 
palatable for your investors and other business types.  

The thing is, most developers would probably rather use something like 
Clojurescript once they learn it, compared to writing raw JavaScript, so that 
would actually aid your adoption.  

Framing the choice as PHP vs Clojure makes it an all or nothing decision.  But 
shifting the discussion to the merits of node.js, you can easily justify why it 
makes sense for your application.  Then you can address the JS vs CLJS issue, 
and even if you lose initially, you still have the stealthy approach of using 
CLJS to solve a hairy problem in an isolated part of your app, then leveraging 
that to revisit the merits of using it on a larger scale.

-- 
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] Instaparse 1.3.0

2014-03-12 Thread Scott Thoman
Excellent!

I've actually been using instaparse on a small "filter expression"
compiler that looks headed for production now.  It has worked *very*
well and has been a pleasure to use!

Thanks for a great tool.

/stt

On Wed, Mar 12, 2014 at 8:53 PM, Mark Engelberg
 wrote:
> Instaparse is a lightweight tool for generating parsers from context-free
> grammars.
>
> https://github.com/engelberg/instaparse
>
> The 1.3.0 release is compatible with Clojure 1.6 (and backwards-compatible
> with 1.5.1).
>
> Feature-wise, this release is identical to 1.2.16, so if you're still on
> Clojure 1.5.1, you don't need to upgrade to 1.3.0.
>
> I'll be giving a talk about Instaparse and its implementation at
> Clojure/West on March 24.  Hope to meet some of you there!
>
> --
> 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.



-- 
"Very well, then, Mr. Knox, sir.
Let's have a little talk about tweetle beetles"
- Dr. S.

key: 4096R/0x2ED7F7450603
fingerprint: F720 335B 622A 3A93 F292 43BF 2ED7 F666 6745 0603

-- 
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: expectations 2.0 has been released

2014-03-12 Thread Jay Fields
On Wednesday, March 12, 2014 2:53:09 PM UTC-4, Sean Corfield wrote:
>
> Since `given` was a relatively simple macro, we added it to 
> worldsingles.util.test and switched all our test namespaces to refer given 
> from there instead, and then upgraded to Expectations 2.0.6. Seems to have 
> gone smoothly. 
>

Sorry, just saw this email. 'given is pretty simple, and well contained. 
Adding it as a util seems like a great solution for your case.

While you're converting, if you run into a test that you want to convert 
but can't quite figure how, a good first pass might be to wrap the whole 
thing in from-each, do a comparison on the last line, and (expect true 
...). You lose all of expectations' smarter comparisons and better failure 
messages, but it can be a pragmatic choice while converting - allowing you 
to revisit when you're not focusing strictly on conversion.

I'm glad you're happy with the changes. We've been running the new version 
in prod for a few weeks and all seems well for us. That said, let me know 
if you run into issues and I'll fix them up asap.

Jay

-- 
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: Help a Startup use Clojure!

2014-03-12 Thread Timothy Baldridge
This case study from Roomkey.com is a awesome starting place for a
conversation:

http://www.colinsteele.org/post/23103789647/against-the-grain-aws-clojure-startup
http://www.colinsteele.org/post/27929539434/60-000-growth-in-7-months-using-clojure-and-aws

Timothy


On Wed, Mar 12, 2014 at 6:47 PM, Mike Haney  wrote:

> Have you considered node.js?  It's fantastic for building web services,
> very easy to deploy (Heroku), and should scale well enough that most
> startups won't outgrow it (and if you do, that's a very good problem to
> have).
>
> You can still build your app using Clojurescript, either for the entire
> thing, or just in areas where it makes the most sense, which would probably
> be more palatable for your investors and other business types.
>
> The thing is, most developers would probably rather use something like
> Clojurescript once they learn it, compared to writing raw JavaScript, so
> that would actually aid your adoption.
>
> Framing the choice as PHP vs Clojure makes it an all or nothing decision.
>  But shifting the discussion to the merits of node.js, you can easily
> justify why it makes sense for your application.  Then you can address the
> JS vs CLJS issue, and even if you lose initially, you still have the
> stealthy approach of using CLJS to solve a hairy problem in an isolated
> part of your app, then leveraging that to revisit the merits of using it on
> a larger scale.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



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

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


Re: Adatx - Test driven development... literally.

2014-03-12 Thread Timothy Washington
This looks interesting. I was hammocking a solution that could use that.
But on Infoq, I recently
watchedWilliam
Byrd, describing just this feature in MiniKanren.

As such, I expect to see this feature will be in core.logic. Did you
explore that path? Was there something missing that prompted Adatx ?

Many thanks.


Tim Washington
Interruptsoftware.com 


On Sun, Mar 9, 2014 at 3:13 PM, Ludwik Grodzki  wrote:

> ... and here's an example of how it works:
>
> (def workings
>  (adatx/prob-solve
>   {
>   :symvec['+ '- '* '/ 'x1 'x2]
>   :prog-holder   '(fn [x1 x2] :adatx.prog-hold/prog)
>   :in-out-pairs  [{:in [1 2] :out 4}
>   {:in [1 3] :out 5}
>   {:in [2 3] :out 7}
>   {:in [4 3] :out 11}]
>   :sandbox :none}))
> (adatx/get-solution workings); => (fn [x1 x2] (+ x1 x1 x2))
>
>
>
>
>
> On Saturday, 8 March 2014 21:30:56 UTC, Ludwik Grodzki wrote:
>>
>> Hello Clojure Group.
>>
>> I've put together a little library that writes clojure code for you...
>> given test input/output examples and a heuristic of relevant functions.
>>
>> https://github.com/LudoTheHUN/adatx
>>
>> Feedback + contributions very welcome.
>>
>> Regards.
>>
>> Ludwik.
>>
>>  --
> 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: Adatx - Test driven development... literally.

2014-03-12 Thread Alex Baranosky
There goes my job...


On Wed, Mar 12, 2014 at 8:00 PM, Timothy Washington wrote:

> This looks interesting. I was hammocking a solution that could use that.
> But on Infoq, I recently 
> watchedWilliam
>  Byrd, describing just this feature in MiniKanren.
>
> As such, I expect to see this feature will be in core.logic. Did you
> explore that path? Was there something missing that prompted Adatx ?
>
> Many thanks.
>
>
> Tim Washington
> Interruptsoftware.com 
>
>
> On Sun, Mar 9, 2014 at 3:13 PM, Ludwik Grodzki  wrote:
>
>> ... and here's an example of how it works:
>>
>> (def workings
>>  (adatx/prob-solve
>>   {
>>   :symvec['+ '- '* '/ 'x1 'x2]
>>   :prog-holder   '(fn [x1 x2] :adatx.prog-hold/prog)
>>   :in-out-pairs  [{:in [1 2] :out 4}
>>   {:in [1 3] :out 5}
>>   {:in [2 3] :out 7}
>>   {:in [4 3] :out 11}]
>>   :sandbox :none}))
>> (adatx/get-solution workings); => (fn [x1 x2] (+ x1 x1 x2))
>>
>>
>>
>>
>>
>> On Saturday, 8 March 2014 21:30:56 UTC, Ludwik Grodzki wrote:
>>>
>>> Hello Clojure Group.
>>>
>>> I've put together a little library that writes clojure code for you...
>>> given test input/output examples and a heuristic of relevant functions.
>>>
>>> https://github.com/LudoTheHUN/adatx
>>>
>>> Feedback + contributions very welcome.
>>>
>>> Regards.
>>>
>>> Ludwik.
>>>
>>>  --
>> 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.
>

-- 
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: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-12 Thread David Toomey
Yes, that certainly did help. Can't believe I didn't see this and it still 
flew over my head when others pointed it out. 

Looks a bit hacky, but this is the result I came up with (for future 
person's reference): 

(GET  "/:profile-page" [profile-page]
(if (= (.indexOf profile-page " ") -1)
  (let [profile-page (clojure.string/replace profile-page #"-" " ")]
(let [[{user-profile :handle}] (db/get-users profile-page)]
  (if (not (nil? user-profile))
(layout/page-top
 (str profile-page"'s Profile Page")
 (profile/profile-page profile-page)))


It's sort of the finishing touches on a relatively complete project. Of 
course, gotta mind those anchors (thanks for that reminder, lest I'd see 
everything blow up). 

Thank you everyone for the time and patience. 

On Monday, March 10, 2014 11:00:32 PM UTC-7, Jarrod Swart wrote:
>
> No edit button so I have to post again, that first example should end with 
> ";; (make-profile-url "John Smith") => "/John-Smith"
>
> And to reiterate you decide what your url will look like in your template:
>
> http://myapp.com/JohnSmith";>View John Smith's Profile
> or
> http://myapp.com/John-Smith";>View John Smith's Profile
> or
> http://myapp.com/john-smith";>View John Smith's Profile
>
> Then compojure + your route handler respond to the browser requesting the 
> link:
>
> ;; obviously this is ALL just psedo code of the important elements to give 
> you an idea
> (GET "/:username" [username] (view-profile-page username)) ;; this route 
> definition will handle any of the above links
>
> ;; assume you chose the last link type, in stack-overflow style. this 
> means username from the route is "john-smith"
> (defn view-profile-page [username]
>   (let [user (db/get-user-by-username username)]
> (render-template user)))
>
> (defn get-user-by-username [username]
>   (let [no-dash (clojure.string/replace username #"-" " ") ;; munge 
> username to match what is in DB
>  capitalized (capitalize-words no-dash)]
> (select-user-by-name capitalized)))
>
> So as you can see whatever link or browser request is called, compojure 
> grabs that url param and passes it in.  You then modify that param to fit 
> what you expect and look it up in your DB.  You were essentially working 
> backwards I think.
>
> Hope that helps!
>
>

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