Re: [ANN] As I was missing this kind of library in clojure I created relational_mapper for dealing with querying relational databases

2016-04-04 Thread Oliver George
I like the idea of DB convention interfaces but that wasn't what I was 
thinking about specifically.

For tables, fields and relations in an application there may be conventions 
established by a framework but there are also likely to be exceptions on a 
table-by-table basis.  An schema interface provides a mechanism to default 
to a convention but also make an exception when necessary.  (Another case 
this supports is querying the database schema tables dynamically rather 
than hard coding)

I have some old code lying around from when I was experimenting with this a 
few weeks bacl, not saying it's perfect but perhaps it'll explain better. 
 In this case, pk defaults to :Id but in the case of the user table it is 
:UserId.


(defrecord SimpleSchema [pks rels]  IDBSchema  (pk [_ table-name](get pks 
table-name :Id))  (rel [_ from-table rel-name](if-let [[to-table 
field-mapping] (get-in rels [from-table rel-name])]  {:from from-table  
 :to   to-table   :on   field-mapping}))  (has-many?[db-schema 
table-name rel-name](if-let [{:keys [on]} (rel db-schema table-name 
rel-name)]  (not= [(pk db-schema table-name)] (vals on)



(let [test-schema  (map->TestSchema{:pks  {:Races :Id :Meetings :Id 
:Users :UserId} :rels {:Races{:Meeting [:Meetings {:MeetingId 
:Id}]}:Meetings {:Races [:Races {:Id :MeetingId}]}}})]

  ...)




On Monday, 4 April 2016 19:25:16 UTC+10, Krzysiek Herod wrote:
>
> Thanks :-)
>
> I was thinking about using protocols for defining interfaces of different 
> types of databases (e.g. MySQL, PostgreSQL), but with conventions I'm not 
> sure. 
> Most of the time conventions would not change, and once in a while 
> somebody will want to change only one of them (probably foreign-key). I 
> wouldn't want him to need to define a new record with all the conventions 
> (foreign-key, private-key) in such case. Or did I get it wrong?  
>
> On Thursday, March 31, 2016 at 2:59:56 AM UTC+2, Oliver George wrote:
>>
>> Fantastic.  Keep up the good work.
>>
>> Schema conventions could be made flexible with a protocol.
>>
>> (defprotocol IDBSchema  (pk [_ table-name])  (rel [_ table-name rel-name])  
>> (has-many? [_ table-name rel-name]))
>>
>>
>>
>>
>> On Thursday, 31 March 2016 09:23:00 UTC+11, Krzysiek Herod wrote:
>>>
>>> I just released version 0.3.0 of Relational Mapper. Customization of 
>>> keys and foreign keys is done now, as well as possibility to specify 
>>> relation with a different name than the corresponding table (
>>> https://github.com/netizer/relational_mapper#different-name-of-an-association-than-a-table-name).
>>>  
>>>
>>>
>>> @Oliver George: your example with SupervisorId, AnalystId would work 
>>> now, but have in mind that postgreSQL by default lowercases column names, 
>>> so I'd still recommend supervisor_id and analyst_id. 
>>>
>>> Cheers,
>>> Krzysiek 
>>>
>>> On Tuesday, March 1, 2016 at 11:35:46 PM UTC+1, Oliver George wrote:


 Both those ideas seem sensible to me.  Look foward to hearing more.

 On Tuesday, 1 March 2016 23:38:43 UTC+11, Krzysiek Herod wrote:
>
> I went through the paper very briefly, so I might be wrong, but from 
> the first look it seems like the algorithm would generate the actual SQL 
> queries . If so, although the idea seems interesting, I wouldn't go in 
> this 
> direction because of the loss of flexibility for the user of the library. 
> For example sometimes it happens, that the slowest SQL query called by 
> the 
> application is the one where database picked a sub-optimal index, or 
> sometimes combining data by adding one more join has a great performance 
> impact. 
>
> Actually I was thinking about giving the programmer more flexibility, 
> and maybe splitting the whole code into query part and stitch part, so 
> the 
> developer would choose the most efficient queries, but the stitching part 
> would put all those data together (with deep result structure). I'm 
> curious 
> what do you think about this direction. I'll comment on your issue (
> https://github.com/netizer/relational_mapper/issues/3) with more 
> details about the idea.
>
> Cheers,
> Krzysiek
>
> On Tue, Mar 1, 2016 at 6:03 AM, Oliver George  
> wrote:
>
>> Awesome, thanks.
>>
>> I did a little research last night looking for techniques for turning 
>> recursive queries into efficient SQL queries.  I came across an 
>> interesting 
>> paper:
>>
>> Cheney, James, Sam Lindley, and Philip Wadler. "Query shredding: 
>> Efficient relational evaluation of queries over nested multisets 
>> (extended 
>> version)."*arXiv preprint arXiv:1404.7078* (2014).
>>
>>
>> The details are obscured behind some intimidating equations but the 
>> concept seems pretty simple: The nested query gets normalised 

Re: Core.async performance with many channels

2016-04-04 Thread Howard Lewis Ship
You should perhaps look at github.com/walmartlabs/active-status if you want
a way to figure out what all those processes are doing.

I'd say the things we've worked on have had dozens of channels, and often
common core.async primitives (such as into, pipe, etc.) create additional
channels and CSPs behind the scenes.

David Nolen had an early ClojureScript core.async demo with thousands of
channels, controlling individual pixels.

On Sun, Apr 3, 2016 at 11:46 PM, JvJ  wrote:

> This thing just an idea at this point.  Basically, your typical game loop
> will consist of iterating over a collection of objects and calling some
> kind of update operation on each.  I would like to replace this with
> asynchronous signaling.  Signaling could include messages like "update this
> object".  These messages would trigger certain async processes to start in
> the object.  This may allow for more flexible and asynchronous programming,
> since not everything has to fit into an update cycle.
>
>
> On Sunday, 3 April 2016 21:10:16 UTC-7, Rangel Spasov wrote:
>>
>> Without knowing too much about the internals, but having used
>> core.async/channels a lot, I don't think "hundreds" of channels will be a
>> problem ever. However, as always the devil is in the details. People might
>> be able to give better feedback if you give more details about your use
>> case.
>>
>> On Saturday, April 2, 2016 at 7:59:50 PM UTC-7, JvJ wrote:
>>>
>>>
>>> Lately, I've been working on a game in Clojure, and I've been trying out
>>> various ways of modelling the game state and objects.
>>>
>>> One of these ideas is to give each object its own channel and make a
>>> fully asynchronous architecture.
>>>
>>> I would like to know if having potentially hundreds of channels
>>> operating at once would be a significant performance issue.
>>>
>>> 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.
>



-- 
Howard M. Lewis Ship

Senior Mobile Developer at Walmart Labs

Creator of Apache Tapestry

(971) 678-5210
http://howardlewisship.com
@hlship

-- 
You 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] [book] Mastering Clojure published!

2016-04-04 Thread Alan Thompson
I'm looking forward to reading it.  The printed version is half-way here,
and I already have the e-book!
Alan

On Sat, Apr 2, 2016 at 9:46 PM, Akhil Wali 
wrote:

> I'm pleased to announce that Mastering Clojure has been published.
> This book is a fast paced exploration of the more advanced features of the
> Clojure language.
> It also demonstrates a handful of interesting libraries, such as
> core.async, pulsar, core.logic and cats.
>
> https://www.packtpub.com/application-development/mastering-clojure
> https://github.com/PacktPublishing/Mastering-Clojure
> http://www.amazon.com/Mastering-Clojure-Akhil-Wali/dp/1785889745/
>
> It's been almost a year since I've started working on this book.
> A big thanks to everyone involved!
>
> --
> You 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: Downloading Clojure + Contrib Source

2016-04-04 Thread Sean Corfield
On 4/4/16, 3:07 AM, "Chris White"  wrote:
> I'm currently in the process of learning Clojure and would like to look 
> around the source code to see how it's laid out.

Given that the core of Clojure itself is a mix of Java and (often) 
non-idiomatic Clojure, I’m not sure what value any of it would be to _learning_ 
Clojure.

For any given function, you can read the docstring and view the source code in 
the REPL (via the ‘doc’ and ‘source’) functions – and that’s how most people 
work, I think.

As Stuart indicated, what you’ll find via the Clojure Toolbox and on Clojars 
(which will link to myriad GitHub repos) will probably be more educational in 
terms of reading “stuff built in Clojure”.

Good luck, and welcome to the community!

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.


Re: Cross platform date/time libarary

2016-04-04 Thread Sean Corfield
On 4/3/16, 11:41 PM, "JvJ"  wrote:
> OK.  As long as a single import in a cljc will suffice.

Nope. The Clojure time libraries all lean very heavily on Java interop so a 
single source solution really is not feasible.

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

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood





-- 
You 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] dali SVG library 0.7.0

2016-04-04 Thread Jules
This looks nice :-)

an off-the-wall question - exposing my ignorance about how SVG is handled 
in the browser...

given that I can server-push incremental DOM updates to my UI and that SVG 
seems to be expressed as a DOM (using reagent), could I do something 
similar with DALI to e.g. add nodes to a graph of a live feed etc ?

cheers


Jules


On Thursday, 11 February 2016 00:49:54 UTC, Stathis Sideris wrote:
>
> Hello all,
>
> dali is a Clojure library for representing the SVG graphics format. It 
> allows the creation and manipulation of SVG files. The syntax 
>  used 
> to describe the graphical elements is based on hiccup 
>  with a few extensions.
>
> The main advantage of dali is that it provides facilities to perform 
> complex layouts 
>  
> without having to position elements explicitly.
>
> The 0.7.0 brings a lot of new features and very complete documentation to 
> get you started.
>
> All feedback very welcome.
>
>
> Thanks,
>
> Stathis Sideris
>

-- 
You 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: Downloading Clojure + Contrib Source

2016-04-04 Thread Chris White


On Monday, April 4, 2016 at 5:31:21 AM UTC-7, Stuart Sierra wrote:
>
> Hi Chris,
>
> No, there is no single command I know of to automatically download all of 
> the contrib libraries. It's something you could do with a shell script, I 
> expect.
>
> But you probably don't need to do that if you're just interested in 
> learning Clojure.
>
> 'contrib' just means things contributed to “Clojure” as an organization, 
> governed by the same Contributor Agreement and patch process. The 'contrib' 
> libraries have many different authors, release cycles, and degrees of 
> maturity. They are not necessarily meant to be a “standard library,” 
> although some of them are more-or-less standard.
> What is Clojure Contrib? 
> 
>

Okay I guess the main thing I'm looking for is something that's been 
(outside of clojure/clojure of course) written by the people who made the 
language. Also it gives me an authoritative source for "how is this 
supposed to work" in case the docs don't have something explained. 
 

>
>
> If you're interested in learning about Clojure by reading source code, you 
> might look for popular Clojure libraries (not necessarily 'contrib') on 
> GitHub or sites like Clojure Toolbox . 
> Most Clojure books and online tutorials will also point you in the 
> direction of popular libraries.
>
> –S
>
>
I'm assuming Clojars  seems to be a good place to 
look around for such code. I'll take a look at Clojure Toolbox as well. 
Thanks for the response!

- Chris
 

>
> On Monday, April 4, 2016 at 8:16:45 AM UTC-4, Chris White wrote:
>>
>> I'm currently in the process of learning Clojure and would like to look 
>> around the source code to see how it's laid out. Unfortunately I'm having 
>> trouble finding an easy way to download not only the Clojure source code, 
>> but also the contrib packages. Currently it looks like I have to download 
>> everything in the clojure GitHub organization. Is there some kind of script 
>> used by developers to pull everything down into a single folder? Is there a 
>> way that all the contrib packages can be released as a single source 
>> tarball? Thanks ahead of time for any responses.
>>
>> - Chris White
>>
>

-- 
You 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: Downloading Clojure + Contrib Source

2016-04-04 Thread Stuart Sierra
Hi Chris,

No, there is no single command I know of to automatically download all of 
the contrib libraries. It's something you could do with a shell script, I 
expect.

But you probably don't need to do that if you're just interested in 
learning Clojure.

'contrib' just means things contributed to “Clojure” as an organization, 
governed by the same Contributor Agreement and patch process. The 'contrib' 
libraries have many different authors, release cycles, and degrees of 
maturity. They are not necessarily meant to be a “standard library,” 
although some of them are more-or-less standard.
What is Clojure Contrib? 


If you're interested in learning about Clojure by reading source code, you 
might look for popular Clojure libraries (not necessarily 'contrib') on 
GitHub or sites like Clojure Toolbox . 
Most Clojure books and online tutorials will also point you in the 
direction of popular libraries.

–S


On Monday, April 4, 2016 at 8:16:45 AM UTC-4, Chris White wrote:
>
> I'm currently in the process of learning Clojure and would like to look 
> around the source code to see how it's laid out. Unfortunately I'm having 
> trouble finding an easy way to download not only the Clojure source code, 
> but also the contrib packages. Currently it looks like I have to download 
> everything in the clojure GitHub organization. Is there some kind of script 
> used by developers to pull everything down into a single folder? Is there a 
> way that all the contrib packages can be released as a single source 
> tarball? Thanks ahead of time for any responses.
>
> - Chris White
>

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


Downloading Clojure + Contrib Source

2016-04-04 Thread Chris White
I'm currently in the process of learning Clojure and would like to look 
around the source code to see how it's laid out. Unfortunately I'm having 
trouble finding an easy way to download not only the Clojure source code, 
but also the contrib packages. Currently it looks like I have to download 
everything in the clojure GitHub organization. Is there some kind of script 
used by developers to pull everything down into a single folder? Is there a 
way that all the contrib packages can be released as a single source 
tarball? Thanks ahead of time for any responses.

- Chris White

-- 
You 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] kithara 0.1.0 - Reliable RabbitMQ Consumers for Clojure

2016-04-04 Thread Yannick Scherer
kithara aims to facilitate the creation of RabbitMQ consumers in Clojure.
It is based on Lyra (https://github.com/jhalterman/lyra) to provide 
recovery and retry mechanisms.
It _is not_ a universal RabbitMQ client.

- GitHub: https://github.com/xsc/kithara
- Generated Documentation: http://xsc.github.io/kithara/

I'm happy to answer any questions and concerns!
Yannick

-- 
You 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] Aleph 0.4.1

2016-04-04 Thread Alan Moore
Thanks for the awesome library!

My vote for UDP examples: mDNS (multicast DNS) or SSDP discovery protocols :-)

Alan

-- 
You 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] As I was missing this kind of library in clojure I created relational_mapper for dealing with querying relational databases

2016-04-04 Thread Krzysiek Herod
Thanks :-)

I was thinking about using protocols for defining interfaces of different 
types of databases (e.g. MySQL, PostgreSQL), but with conventions I'm not 
sure. 
Most of the time conventions would not change, and once in a while somebody 
will want to change only one of them (probably foreign-key). I wouldn't 
want him to need to define a new record with all the conventions 
(foreign-key, private-key) in such case. Or did I get it wrong?  

On Thursday, March 31, 2016 at 2:59:56 AM UTC+2, Oliver George wrote:
>
> Fantastic.  Keep up the good work.
>
> Schema conventions could be made flexible with a protocol.
>
> (defprotocol IDBSchema  (pk [_ table-name])  (rel [_ table-name rel-name])  
> (has-many? [_ table-name rel-name]))
>
>
>
>
> On Thursday, 31 March 2016 09:23:00 UTC+11, Krzysiek Herod wrote:
>>
>> I just released version 0.3.0 of Relational Mapper. Customization of keys 
>> and foreign keys is done now, as well as possibility to specify relation 
>> with a different name than the corresponding table (
>> https://github.com/netizer/relational_mapper#different-name-of-an-association-than-a-table-name).
>>  
>>
>>
>> @Oliver George: your example with SupervisorId, AnalystId would work now, 
>> but have in mind that postgreSQL by default lowercases column names, so I'd 
>> still recommend supervisor_id and analyst_id. 
>>
>> Cheers,
>> Krzysiek 
>>
>> On Tuesday, March 1, 2016 at 11:35:46 PM UTC+1, Oliver George wrote:
>>>
>>>
>>> Both those ideas seem sensible to me.  Look foward to hearing more.
>>>
>>> On Tuesday, 1 March 2016 23:38:43 UTC+11, Krzysiek Herod wrote:

 I went through the paper very briefly, so I might be wrong, but from 
 the first look it seems like the algorithm would generate the actual SQL 
 queries . If so, although the idea seems interesting, I wouldn't go in 
 this 
 direction because of the loss of flexibility for the user of the library. 
 For example sometimes it happens, that the slowest SQL query called by the 
 application is the one where database picked a sub-optimal index, or 
 sometimes combining data by adding one more join has a great performance 
 impact. 

 Actually I was thinking about giving the programmer more flexibility, 
 and maybe splitting the whole code into query part and stitch part, so the 
 developer would choose the most efficient queries, but the stitching part 
 would put all those data together (with deep result structure). I'm 
 curious 
 what do you think about this direction. I'll comment on your issue (
 https://github.com/netizer/relational_mapper/issues/3) with more 
 details about the idea.

 Cheers,
 Krzysiek

 On Tue, Mar 1, 2016 at 6:03 AM, Oliver George  
 wrote:

> Awesome, thanks.
>
> I did a little research last night looking for techniques for turning 
> recursive queries into efficient SQL queries.  I came across an 
> interesting 
> paper:
>
> Cheney, James, Sam Lindley, and Philip Wadler. "Query shredding: 
> Efficient relational evaluation of queries over nested multisets 
> (extended 
> version)."*arXiv preprint arXiv:1404.7078* (2014).
>
>
> The details are obscured behind some intimidating equations but the 
> concept seems pretty simple: The nested query gets normalised and then 
> shredded into a set of sql queries and the results of those queries are 
> stitched back together.
>
> There seem to be two version 
> 
>  
> of the paper.  This one looks to be more detailed  (26 pages):
>
> https://scholar.google.com/citations?view_op=view_citation=en=Iz-3VFQJ=pubdate_for_view=Iz-3VFQJ:9pM33mqn1YgC
>
>
>
>
> On Monday, 29 February 2016 21:06:23 UTC+11, Krzysiek Herod wrote:
>>
>> Thanks a lot for detailed notes.
>>
>> The problem with customization of foreign keys is on my TODO list. I 
>> hope to fix that before releasing version 1.0. That would solve the 
>> problem 
>> with SupervisorId and AnalystId. 
>>
>> What you said about deeper result structure (race -> meeting -> 
>> venue) is very inspiring. You can't do that with this library (you can 
>> fetch records with their - potentially indirect - relations, but those 
>> relations won't have own relations included), but definitely it's 
>> something 
>> worth considering. I added it to my TODO list in the README but I don't 
>> have a clear idea about how to do it well yet. 
>>
>> Cheers, 
>> Krzysiek
>>
>> On Monday, February 29, 2016 at 12:54:31 PM UTC+8, Oliver George 
>> wrote:
>>>
>>> Oops, one more.
>>>
>>> There was also a Users table (Id, 

Re: [ANN] [book] Mastering Clojure published!

2016-04-04 Thread Matching Socks
The publisher's blurb on Amazon says,

You'll start off by learning the details of sequences, concurrency 
primitives, and macros. Packed with a lot of examples, you'll get a 
walkthrough on orchestrating concurrency and parallelism, which will help 
you understand Clojure reducers, and we'll walk through composing 
transducers so you know about functional composition and process 
transformation inside 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/d/optout.


Re: Protocols in another namespace, retract-type possible ?

2016-04-04 Thread Niels van Klaveren
Hey Derek,

You're right, I just redefined the Associative implementation to identity, 
making it a no-op and then added an IPersistentMap implementation.
It seemed a bit hacky, but in this case performance doesn't matter too 
much, so it probably works out OK. It might be that the no-op gets 
optimized away by the JVM.



On Thursday, March 24, 2016 at 10:14:11 AM UTC+1, Niels van Klaveren wrote:
>
> In a project using clojure.java.jmx, I was extending it's Destract protocol 
> object->data function  to transform more of the JMX data structures 
> returned from calls or metadata queries into plain clojure data structures. 
> When I was done with the individual data structures, it should have been 
> possible to do a (walk/prewalk jmx/objects->data (jmx/operations 
> "java.lang:type=Threading")).
>
> However, in the Destract protocol there's an implementation of the 
> objects->data function for the type clojure.lang.Associative that would 
> mean maps would be processed incorrectly. I could add an implementation for 
> clojure.lang.IPersistentMap in my namespace, but since 
> clojure.lang.Associative is also an interface for maps this would not 
> work, and I ended up having to fork clojure.java.jmx because of it. If 
> there would be  a way to retract a protocol for a type within another 
> namespace I wouldn't have had to. Is there such a way, or would it even be 
> feasible to implement something like 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: Webassembly as a Clojure target platform

2016-04-04 Thread Kevin Downey
I recommend reading up on WebAssembly, a good place to start might be
https://github.com/WebAssembly/design/blob/master/FAQ.md#is-webassembly-only-for-cc-programmers/

In those three paragraphs, it is pretty clear that, at least as it
stands now, wasm is much closer semantically to actual asm than the jvm.
A whole host of facilities that you get both by running on the jvm, and
by compiling to javascript (garbage collection, types, etc) are not
available. No existing Clojure, ClojureScript, or some derivative there
of delivers those things themselves, they all build on some existing
runtime's facilities.

Some additional relevant reading is here:
https://github.com/WebAssembly/design/blob/master/GC.md

On 04/03/2016 11:50 PM, JvJ wrote:
> Is there any plan in the future to have clojure (or some dialect of
> clojure) compile to webassembly?  I can't say for sure if it is the
> "next big thing" for the web, but it is a very interesting concept.
> 
> I suppose that, if Java bytecode could cross-compile to Webassembly, we
> would essentially get this for free, but I'm not sure if that will happen.
> 
> -- 
> You 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.


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


Webassembly as a Clojure target platform

2016-04-04 Thread JvJ
Is there any plan in the future to have clojure (or some dialect of 
clojure) compile to webassembly?  I can't say for sure if it is the "next 
big thing" for the web, but it is a very interesting concept.

I suppose that, if Java bytecode could cross-compile to Webassembly, we 
would essentially get this for free, but I'm not sure if that will happen.

-- 
You 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: Core.async performance with many channels

2016-04-04 Thread JvJ
This thing just an idea at this point.  Basically, your typical game loop 
will consist of iterating over a collection of objects and calling some 
kind of update operation on each.  I would like to replace this with 
asynchronous signaling.  Signaling could include messages like "update this 
object".  These messages would trigger certain async processes to start in 
the object.  This may allow for more flexible and asynchronous programming, 
since not everything has to fit into an update cycle.

On Sunday, 3 April 2016 21:10:16 UTC-7, Rangel Spasov wrote:
>
> Without knowing too much about the internals, but having used 
> core.async/channels a lot, I don't think "hundreds" of channels will be a 
> problem ever. However, as always the devil is in the details. People might 
> be able to give better feedback if you give more details about your use 
> case. 
>
> On Saturday, April 2, 2016 at 7:59:50 PM UTC-7, JvJ wrote:
>>
>>
>> Lately, I've been working on a game in Clojure, and I've been trying out 
>> various ways of modelling the game state and objects.
>>
>> One of these ideas is to give each object its own channel and make a 
>> fully asynchronous architecture.
>>
>> I would like to know if having potentially hundreds of channels operating 
>> at once would be a significant performance issue.
>>
>> 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: Cross platform date/time libarary

2016-04-04 Thread JvJ
OK.  As long as a single import in a cljc will suffice.

On Sunday, 3 April 2016 21:20:54 UTC-7, Sean Corfield wrote:
>
> On 4/3/16, 7:36 PM, "JvJ"  behalf of kfjwh...@gmail.com > wrote: 
> > Is there a date/time library that is written for both clojure and 
> clojurescript? 
>
> Probably the closest thing is this pair of libraries: 
>
> https://github.com/clj-time/clj-time 
>
> https://github.com/andrewmcveigh/cljs-time 
>
> Same API, different implementations. 
>
> Sean Corfield -- (904) 302-SEAN 
> An Architect's View -- http://corfield.org/ 
>
> "If you're not annoying somebody, you're not really alive." 
> -- Margaret Atwood 
>
>
>
>
>
>
>

-- 
You 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: Protocols in another namespace, retract-type possible ?

2016-04-04 Thread Derek Troy-West
Hi Neils,

 If I've understood you correctly, can you just redefine the protocol 
implementation for Associative? E.g.

(defprotocol ProtX
  (do-thing [x]))
=> ProtX

(extend clojure.lang.Associative
  ProtX
  {:do-thing (fn [x] (str/lower-case (get x :a-val)))})
=> nil

(do-thing {:a-val "Some String"})
=> "some string"

(extend clojure.lang.Associative
  ProtX
  {:do-thing (fn [x] (str/upper-case (get x :a-val)))})
=> nil

(do-thing {:a-val "Some String"})
=> "SOME STRING"


On Thursday, March 24, 2016 at 10:14:11 PM UTC+13, Niels van Klaveren wrote:
>
> In a project using clojure.java.jmx, I was extending it's Destract protocol 
> object->data function  to transform more of the JMX data structures 
> returned from calls or metadata queries into plain clojure data structures. 
> When I was done with the individual data structures, it should have been 
> possible to do a (walk/prewalk jmx/objects->data (jmx/operations 
> "java.lang:type=Threading")).
>
> However, in the Destract protocol there's an implementation of the 
> objects->data function for the type clojure.lang.Associative that would 
> mean maps would be processed incorrectly. I could add an implementation for 
> clojure.lang.IPersistentMap in my namespace, but since 
> clojure.lang.Associative is also an interface for maps this would not 
> work, and I ended up having to fork clojure.java.jmx because of it. If 
> there would be  a way to retract a protocol for a type within another 
> namespace I wouldn't have had to. Is there such a way, or would it even be 
> feasible to implement something like 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.