Re: [QUIL] select-input and select-output?

2017-04-19 Thread Jay Porcasi
my 'implementation' is actually nothing more than a function that runs your 
code :-)
meaning that it relies on an AOT dependency in the project for the java 
class, which i don't mind in a personal project like mine, but probably 
wouldn't cut for Quil

moreover my initial goal was for the function to actually return the file 
path, but as the underlying code runs asynchronously, and after a few 
failed attempts with while loops, futures, promises... i had to rely on the 
'global' atom instead as in your example
which again is not a big deal for me bacause i actually have a map to keep 
all the current events, and so i treat the file path as an 'event' of 
sort (file-input-selected, file-output-selected.. and so on, containing the 
file path as string) because i prefer 'polling' my map at each 'frame' 
instead of the event driven way of doing stuff

the reason why i prefer 'polling' to 'event driven' would be probably a bit 
convoluted to explain here, but it allows me to work in a truly modular 
way, where i can just write a new module for any change i want to make to 
the app, be it deleting, modifying or adding a new feature
call it 'additive' programming if you want
makes it easy to go back to previous versions, or to try new ideas, and 
generally keeps me sane while coding :-)

each module has the same structure of the whole app (each with its own 
:setup, :update, :draw, etc.) and gets 'compiled' (by a macro) to a plain 
middleware

and Quil middleware functionality is pure genius


On Monday, April 17, 2017 at 5:07:56 AM UTC+7, Nikita Beloglazov wrote:
>
> Glad to hear you worked it out. Feel free to contribute your 
> implementation of select-input/output/folder to Quil. 
>
> Nikita
>
> On Sun, Apr 16, 2017 at 2:52 AM Jay Porcasi  > wrote:
>
>> hello Nikita,
>> your example worked great!
>> and i was able to 'abstract' it into a select-input function that i can 
>> call to set the file-path
>> hopefully it will be straightforward to do the same for select-output and 
>> select-folder
>> by the way it would be great if something like that was available in quil 
>> by default
>> thank you a lot for your help,
>> Jay
>>
>>
>> On Thursday, April 13, 2017 at 8:20:21 PM UTC+7, Jay Porcasi wrote:
>>>
>>> thank you Nikita!
>>>
>>> i will try your example to understand it better
>>>
>>> a simple file chooser that returns the file path as string is all i need 
>>> actually, i don't get all the complication in Processing of passing a 
>>> callback function but i guess it must be there for a reason
>>>
>>> cheers,
>>> Jay
>>>
>>> -- 
>> 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 a topic in the 
>> Google Groups "Clojure" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/clojure/R61OvE4jYEc/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.


Carrot for Rabbit message queue retrial

2017-04-19 Thread Gábor Ráski
Hello,

I just want to announce that I've made a clumsy little library for 
supporting RabbitMQ with delayed and exponential retrial.
Please let me know what you think, what should be corrected, done 
differently. Feel free to use of course if you find it useful (and in 
working condition :) ).

https://github.com/raskig/carrot

Thanks,
Gabor

-- 
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] com.walmartlabs/lacinia 0.15.0

2017-04-19 Thread Howard Lewis Ship
Lacinia is an open-source implementation of Facebook's GraphQL
specification, in Clojure.

GraphQL is an outstanding approach to getting diverse clients and servers
exchanging data cleanly and efficiently.

The GitHub repository is https://github.com/walmartlabs/lacinia

Documentation: http://lacinia.readthedocs.io/en/latest/

This release adds:

- Asynchronous support
- Fixes to the type system to fully support list and non-null types in
combination
- Smaller fixes and performance improvements

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


[ANN] com.walmartlabs/pedestal-lacinia 0.1.0

2017-04-19 Thread Howard Lewis Ship
Lacinia is an open-source implementation of Facebook's GraphQL
specification, in Clojure.

pedestal-lacinia provides the support to expose a GraphQL schema as a web
endpoint, using Pedestal.
This includes optionally exposing a GraphiQL IDE.

The GitHub repository is https://github.com/walmartlabs/pedestal-lacinia


-- 
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: Has anyone tried building ClojureCLR using dontnet core on non-windows platforms?

2017-04-19 Thread dmiller
As mentioned, you likely will get more respone on the clojure-clr group.

The subject of this post mentions .net core.  From my understanding, you 
will not get ClojureCLR working on .Net Core on any platform due to Core's 
lack of support for System.Reflection.Emit.

Alan correctly mentions Arcadia/Unity, but that is a Mono project, not Core.



On Monday, April 17, 2017 at 1:51:21 PM UTC-5, Alex Miller wrote:
>
> Just FYI, might also want to ask on 
> https://groups.google.com/forum/#!forum/clojure-clr
>
> On Monday, April 17, 2017 at 1:15:10 PM UTC-5, Kashyap CK wrote:
>>
>> Hi,
>> I am attempting to build ClojureCLR on Mac- I was wondering if anyone's 
>> already done this.
>> Regards,
>> Kashyap
>>
>

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


Faster diffing for large-ish nested data structures

2017-04-19 Thread lvh
Hi,


I have two deeply nested data structures (consisting of maps, vecs and the
occasional seq; althoguh I can make it maps and vecs consistently if need
be). I want to compute (and store) diffs; ideally diffs that store [path
oldval newval] so that I can apply them in either direction.

Using clojure.data/diff on them takes a long time (well north of 10 minutes
on my new laptop).

If I flatten these nested map out to entries they have about 2E5 entries.
I'm expecting between 1E5 and 1E6 entries per map. These maps  represent
the same data at two close points in time, so I'm expecting small
differences. The tree is unbalanced: it has inconsistent depth and
branching factors, but they're still going to be consistent between
snapshots.

Here are some ideas I'm trying (but I'm open to suggestions, experiences):

- The machines I'm doing this on have plenty of beefy cores. Since the data
structures are immutable, I should be able to parallelize this operation
somewhat, even if it's only a constant speedup of ~4x or so. (I care about
minor speedups since it takes 10 minutes, not 10 hours, to do the diff
right now -- so it's entirely possible that enough small speedups add up.)

- clojure.data/diff builds a giant data structure of things that are the
same. I don't care about the parts that are the same; just parts that are
different. That takes time.

- clojure.data/diff doesn't use transients. While I'm not expecting a lot
of diffs, this might be a speedup.

I've found https://groups.google.com/forum/#!topic/clojure/VPpjlRC2INg ,
but it appears that mostly doesn't go anywhere unless I want to maintain
something that knows a lot about internal Clojure data structures :)


lvh

-- 
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: Faster diffing for large-ish nested data structures

2017-04-19 Thread Timothy Baldridge
I've gotten really fast diffing in Clojure by using the following concepts:

1) If you can sometimes make parts of A and B be identical, then your
differ can skip checking those parts by doing a (identical? A B), this
improves performance
2) Take a side effecting approach, pass into the differ a function of (fn
[path a-val b-val] ...), and whenever you see a difference call that
function, this turns the differ into a event generator. From there it's
trivial to use transients, tuples, etc. to improve performance
3) If you can restrict yourself to maps, vectors and seqs, you can use
reduce-kv for maps and vectors, and walk the seq with a index count for the
latter. This will result in some rather efficient walking.

I used these methods in writing my data differ for Odin:
https://github.com/halgari/odin/blob/update-indicies/src/com/tbaldridge/odin/contexts/data.clj#L259-L384


Not perfect, but it's the fastest method I've come up with so far. Could
probably also replace the calls to condp with nested case statements.

Timothy

On Wed, Apr 19, 2017 at 5:32 PM, lvh <_...@lvh.io> wrote:

> Hi,
>
>
> I have two deeply nested data structures (consisting of maps, vecs and the
> occasional seq; althoguh I can make it maps and vecs consistently if need
> be). I want to compute (and store) diffs; ideally diffs that store [path
> oldval newval] so that I can apply them in either direction.
>
> Using clojure.data/diff on them takes a long time (well north of 10
> minutes on my new laptop).
>
> If I flatten these nested map out to entries they have about 2E5 entries.
> I'm expecting between 1E5 and 1E6 entries per map. These maps  represent
> the same data at two close points in time, so I'm expecting small
> differences. The tree is unbalanced: it has inconsistent depth and
> branching factors, but they're still going to be consistent between
> snapshots.
>
> Here are some ideas I'm trying (but I'm open to suggestions, experiences):
>
> - The machines I'm doing this on have plenty of beefy cores. Since the
> data structures are immutable, I should be able to parallelize this
> operation somewhat, even if it's only a constant speedup of ~4x or so. (I
> care about minor speedups since it takes 10 minutes, not 10 hours, to do
> the diff right now -- so it's entirely possible that enough small speedups
> add up.)
>
> - clojure.data/diff builds a giant data structure of things that are the
> same. I don't care about the parts that are the same; just parts that are
> different. That takes time.
>
> - clojure.data/diff doesn't use transients. While I'm not expecting a lot
> of diffs, this might be a speedup.
>
> I've found https://groups.google.com/forum/#!topic/clojure/VPpjlRC2INg ,
> but it appears that mostly doesn't go anywhere unless I want to maintain
> something that knows a lot about internal Clojure data structures :)
>
>
> lvh
>
> --
> 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.