Re: [ANN] Lancaster 0.6.0 - Avro Schema Creation / Serialization / Deserialization

2018-11-17 Thread Alan Thompson
Looks nice.
Alan

On Sat, Nov 17, 2018 at 6:57 PM Chad Harrington 
wrote:

> https://github.com/deercreeklabs/lancaster
>
> Lancaster is an Apache Avro  library
> for Clojure and ClojureScript. It aims to be fully compliant with the Avro
> Specification . Lancaster
> is faster than JSON encoding / decoding and produces much smaller output.
> It also supports Avro schema evolution
> ,
> allowing your data formats to change over time without breaking things.
>
> Issues and PRs are welcomed.
>
> Chad Harrington
> chad.harring...@gmail.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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] Lancaster 0.6.0 - Avro Schema Creation / Serialization / Deserialization

2018-11-17 Thread Chad Harrington
https://github.com/deercreeklabs/lancaster

Lancaster is an Apache Avro  library
for Clojure and ClojureScript. It aims to be fully compliant with the Avro
Specification . Lancaster is
faster than JSON encoding / decoding and produces much smaller output. It
also supports Avro schema evolution
, allowing
your data formats to change over time without breaking things.

Issues and PRs are welcomed.

Chad Harrington
chad.harring...@gmail.com

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


Re: [Question] How to properly start up refs in web applications?

2018-11-17 Thread Thais Lima
Hello Sean,

I'm using refs for an exercise in which I have to handle state changes
without a database.

On Sat, 17 Nov 2018 at 22:32, Sean Corfield  wrote:

> This doesn’t answer your question but I’m wondering why you’re using refs
> at all? In production Clojure code I think they are extremely rare (we have
> about 85K lines of Clojure and no refs at all).
>
>
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>
> --
> *From:* clojure@googlegroups.com  on behalf of
> Thais Lima 
> *Sent:* Saturday, November 17, 2018 1:27:25 PM
> *To:* Clojure
> *Subject:* [Question] How to properly start up refs in web applications?
>
> Hi,
>
> I've started learning Clojure and I am creating a simple web application
> using Compojure and Ring.
> I have refs defined in my core.clj like this:
>
> (def my-ref1 (ref {}))
> (def my-ref2 (ref {}))
> (def my-ref3 (ref 0))
>
>
> And in my handler.clj, I call the functions from my core namespace that
> change those refs inside a dosync.
>
> The problem is: I've created tests for my handler and for my core, when I
> ran each of them separately, everything works fine.
> But when I ran
>
> lein test
>
> I get errors for my handler-test, because my refs were modified by the
> core-test and this messes up my expected results.
>
> Besides that problem, I wonder if there is a proper way of defining those
> refs in ring initialization.
>
> What is the proper way of initializing refs in a project?
>
> Thank you,
> Thais
>
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/Bx0lOp3m6bo/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.


Re: [Question] How to properly start up refs in web applications?

2018-11-17 Thread Oliver Muellerklein
I am working with Gary Johnson. Here is a great web app dev skeleton he
created.


https://gitlab.com/lambdatronic/clojure-webapp-template


Sat, Nov 17, 2018, 4:36 PM Oliver Muellerklein 
wrote:

> Hello,
>
> I also recently started learning Clojure and got throw into developing a
> web app using Ring and Clojurescript. Can we be something like pen pal but
> for Clojure dev? I have someone guiding me through a lot of the Clojure but
> it would be so helpful I think to both of us if we could bounce ideas and
> get help etc.
>
> Do you use Cider? It's great. You can great a Clojure REPL as you develop.
> I'm not sure what the answer to your problem is. But I think Leinegein is
> always looking for a deps.edn file right?
>
> -Oliver
>
> On Sat, Nov 17, 2018, 2:02 PM Thais Lima  wrote:
>
>> Hi,
>>
>> I've started learning Clojure and I am creating a simple web application
>> using Compojure and Ring.
>> I have refs defined in my core.clj like this:
>>
>> (def my-ref1 (ref {}))
>> (def my-ref2 (ref {}))
>> (def my-ref3 (ref 0))
>>
>>
>> And in my handler.clj, I call the functions from my core namespace that
>> change those refs inside a dosync.
>>
>> The problem is: I've created tests for my handler and for my core, when I
>> ran each of them separately, everything works fine.
>> But when I ran
>>
>> lein test
>>
>> I get errors for my handler-test, because my refs were modified by the
>> core-test and this messes up my expected results.
>>
>> Besides that problem, I wonder if there is a proper way of defining those
>> refs in ring initialization.
>>
>> What is the proper way of initializing refs in a project?
>>
>> Thank you,
>> Thais
>>
>> --
>> 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: [Question] How to properly start up refs in web applications?

2018-11-17 Thread Oliver Muellerklein
Hello,

I also recently started learning Clojure and got throw into developing a
web app using Ring and Clojurescript. Can we be something like pen pal but
for Clojure dev? I have someone guiding me through a lot of the Clojure but
it would be so helpful I think to both of us if we could bounce ideas and
get help etc.

Do you use Cider? It's great. You can great a Clojure REPL as you develop.
I'm not sure what the answer to your problem is. But I think Leinegein is
always looking for a deps.edn file right?

-Oliver

On Sat, Nov 17, 2018, 2:02 PM Thais Lima  wrote:

> Hi,
>
> I've started learning Clojure and I am creating a simple web application
> using Compojure and Ring.
> I have refs defined in my core.clj like this:
>
> (def my-ref1 (ref {}))
> (def my-ref2 (ref {}))
> (def my-ref3 (ref 0))
>
>
> And in my handler.clj, I call the functions from my core namespace that
> change those refs inside a dosync.
>
> The problem is: I've created tests for my handler and for my core, when I
> ran each of them separately, everything works fine.
> But when I ran
>
> lein test
>
> I get errors for my handler-test, because my refs were modified by the
> core-test and this messes up my expected results.
>
> Besides that problem, I wonder if there is a proper way of defining those
> refs in ring initialization.
>
> What is the proper way of initializing refs in a project?
>
> Thank you,
> Thais
>
> --
> 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: [Question] How to properly start up refs in web applications?

2018-11-17 Thread Sean Corfield
This doesn’t answer your question but I’m wondering why you’re using refs at 
all? In production Clojure code I think they are extremely rare (we have about 
85K lines of Clojure and no refs at all).

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

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


From: clojure@googlegroups.com  on behalf of Thais 
Lima 
Sent: Saturday, November 17, 2018 1:27:25 PM
To: Clojure
Subject: [Question] How to properly start up refs in web applications?

Hi,

I've started learning Clojure and I am creating a simple web application using 
Compojure and Ring.
I have refs defined in my core.clj like this:

(def my-ref1 (ref {}))
(def my-ref2 (ref {}))
(def my-ref3 (ref 0))


And in my handler.clj, I call the functions from my core namespace that change 
those refs inside a dosync.

The problem is: I've created tests for my handler and for my core, when I ran 
each of them separately, everything works fine.
But when I ran

lein test

I get errors for my handler-test, because my refs were modified by the 
core-test and this messes up my expected results.

Besides that problem, I wonder if there is a proper way of defining those refs 
in ring initialization.

What is the proper way of initializing refs in a project?

Thank you,
Thais

--
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: Efficient Predicate Dispatch [was ANN: Logos v0.6]

2018-11-17 Thread John Newman
In order to answer a SO question I ended up whipping up a quick and dirty 
implementation of predicate dispatch here 
.
 
(unless I'm misunderstanding the definition of "predicate dispatch")

If you know your dispatch set is going to be small, a first-one-wins 
strategy should be good enough, right? And we can't really measure the 
complexity of a user's supplied predicate function a priori anyway, so if 
an isa? hierarchy isn't supplied, we might as well just check them in the 
order they're provided from the user and let the first one win, right?

V/r

John

On Thursday, April 14, 2011 at 11:25:48 AM UTC-4, David Nolen wrote:
>
> When things begin to get recursive you may be on the right track :D
>
> Initially I was going to implement Nominal Logic Programming for Logos a 
> la William Byrd's dissertation, but I realized that his implementation 
> requires pattern matching. All the pattern matching libs I've seen thus far 
> for Clojure are too naive and too slow. Even more importantly pattern 
> matching is subsumed by predicate dispatch (CiteSeerX — Efficient 
> Predicate Dispatching 
> ).
>
> Rich Hickey mentioned many moons ago that he'd like to see a predicate 
> dispatch implementation for Clojure that didn't have the kind of hardwiring 
> found in the Chambers/Chen paper. He suggested investigating Datalog. After 
> much reading, I've decided that a runtime in-memory Datalog that handles 
> dispatching is going to be too slow for many useful scenarios (an efficient 
> Datalog based on Binary Decision Diagrams might be possible, but this is an 
> incredibly complex undertaking in itself, meh).
>
> What we want is Standard MLs efficient compilation from decision diagrams 
> to switch statements (CiteSeerX — Optimizing Pattern Matching 
> ). 
> However Standard ML (Haskell, OCaml, Scala as well) pattern-matching has 
> issues with order among other things (Programming in Standard ML 
> ).
>
> What if we allow a logic engine to drive the compilation of the decision 
> diagram? This would be done by users mapping logic predicates to Clojure 
> predicate functions. Relationships between predicates can be added to the 
> logic engine allowing compilation to produce a very efficient decision 
> diagram. Nothing is hard coded, everything is driven by the kinds of 
> predicates and relationships between predicates that a user actually cares 
> about.
>
> All this is to say that this means Logos needs the ability to load 
> database of facts, index those facts, and to accept new facts and 
> relationships and update accordingly. So this going to happen sooner rather 
> then later.
>
> I welcome any feedback from anyone who has thoughts on this approach to 
> implementing predicate dispatch efficiently!
>
> Some thoughts on what this might look like is evolving here, 
> https://github.com/swannodette/match/wiki/Crazy-Ideas.
>
> David
>
> On Mon, Apr 11, 2011 at 3:08 PM, David Nolen  > wrote:
>
>> On Mon, Apr 11, 2011 at 2:01 PM, Vagif Verdi > > wrote:
>>
>>> Can it be used as an inference (rule) engine ?
>>
>>
>> If you mean in the same way that you can build inference (rule) engines 
>> in Prolog - I don't see why not.
>>
>> However there is a bit of work to be done in order to make building 
>> efficient rule engines easier:
>>
>> * Be able to load a database (aka Clojure collection) of facts
>> * Indexing of facts
>> * Intelligently use indexed facts
>>
>> Currently I'm a bit more interested in exploring type inference (via 
>> nominal logic) so I'm not sure when exactly I'll get to these, tho I'll 
>> gladly take patches from people who want such features sooner rather than 
>> later :)
>>
>> David
>>
>
>

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


[Question] How to properly start up refs in web applications?

2018-11-17 Thread Thais Lima
Hi, 

I've started learning Clojure and I am creating a simple web application 
using Compojure and Ring.
I have refs defined in my core.clj like this:

(def my-ref1 (ref {}))
(def my-ref2 (ref {}))
(def my-ref3 (ref 0))


And in my handler.clj, I call the functions from my core namespace that 
change those refs inside a dosync.

The problem is: I've created tests for my handler and for my core, when I 
ran each of them separately, everything works fine. 
But when I ran 

lein test

I get errors for my handler-test, because my refs were modified by the 
core-test and this messes up my expected results.

Besides that problem, I wonder if there is a proper way of defining those 
refs in ring initialization. 

What is the proper way of initializing refs in a project?

Thank you,
Thais

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