Re: [ANN] Clojure 1.9.0-alpha12

2016-09-08 Thread lvh
Thanks for investigating this in-depth, Alex! Very much appreciated :) Sorry 
about filing the issue in several places; I genuinely wasn’t sure where the 
problem was :)

> On Sep 8, 2016, at 8:20 PM, Alex Miller  wrote:
> 
> I've commented on this in multiple other places but for the sake of 
> completeness...
> 
> Datascript is extending some defrecords to the IHashEq protocol to add custom 
> hash caching. In particular, this extension is adding custom fields __hash 
> and __hasheq, which happen to be the (obvious) names of the new fields added 
> in alpha12 via CLJ-1224 to support built-in hashcode caching (like maps). 
> 
> Records are designed to hash like maps and to have hashing provided by the 
> language, not customized by the user. Due to this, and to the use of fields 
> with __-prefix, I consider the existing Datascript code to be invalid. I have 
> examined all uses of __hash fields and IHashEq on Github (many many pages of 
> results) and have found no other examples of this in tandem with defrecord.
> 
> Note that deftype does NOT provide a hashing mechanism - deftypes are not 
> given map capabilities, hashing, or many of the things provided automatically 
> by defrecord. It is thus common, acceptable, and encouraged for deftype users 
> to provide a hashing strategy appropriate to the deftype. My comments above 
> apply only to defrecord, not to deftype.
> 
> Datascript should either remove these extensions or switch to using deftype 
> for these use cases.
> 
> On Wednesday, September 7, 2016 at 8:18:13 PM UTC-5, lvh ‌ wrote:
> CLJ-1224 appears to have broken Datascript, which now doesn’t compile:
> 
> Exception in thread "main" java.lang.AssertionError: The names in #{__hash 
> __meta __hasheq __extmap} cannot be used as field names for types or 
> records., compiling:(datascript/db.cljc:369:1)
> 
> The ticket mentions CLJS compat; it looks like it only adds __hash in CLJ:
> 
> https://github.com/tonsky/datascript/blob/0684c4102706bf4ee8b2496ad35c32ced08640fc/src/datascript/db.cljc
>  
> 
> 
> Not sure what the ideal way to solve this is…
> 
> 
> 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 
> .

-- 
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: durable-persistence for Clojure and ClojureScript

2016-09-08 Thread lvh

> On Sep 8, 2016, at 6:39 PM, dgrnbrg  wrote:
> 
> This sort of thing is also the goal of Datacrypt & Hitchhiker trees 
> (https://github.com/datacrypt-project/hitchhiker-tree), which are designed to 
> be highly optimized for I/O.
> 
> We've been making progress on the GC and adding new backends--it would be 
> awesome to be able add a CLJS port too :)

That’s awesome! What’s datacrypt, and how can I contribute? As a cryptographer 
who’s been working on CRDTs and does Clojure, this seems right in my wheelhouse 
:)

lvh

> Best,
> David
> 
> On Thursday, September 8, 2016 at 4:28:08 PM UTC-6, Christian Weilbach wrote:
> Hi, 
> 
> I have started some explorations for durable persitent indices in a 
> cross-platform fashion, that I wanted to for quite some time now. There 
> are some other implementations of persistent datastructures with 
> synchronous IO on the JVM, but I would like to go a step further and 
> generalize over any key-value store like medium. I am primarily 
> interested in critique and references to other work or experience 
> implementing efficient indices on disk. In the longer run I want to use 
> these indices as a building block for databases in Clojure(Script). 
> 
> https://github.com/replikativ/durable-persistence 
>  
> 
> From the README: 
> 
> This repository is for exploration of persistent datastructures on a 
> durable medium. The durable medium is abstracted away by a minimalistic 
> key-value protocol providing atomic operations (ACID) on single keys. 
> This decouples the implementation of the persistent datastructure from 
> the host and backend store. 
> 
> The repository contains an adaptation of the cookbook in-memory version 
> of a red black tree. Instead of keeping all fragments in memory we 
> introduce a Reference type to fragments in the store and dynamically 
> load and store fragments. The root can be assigned to a fixed key, 
> modelling a durable identity similar to a Clojure atom. 
> 
> The long term motivation is to provide efficient indices as a building 
> block for datatype management independent of JVM IO libraries spanning 
> also to ClojureScript and the Browser. With konserve an IndexedDB 
> storage backend for the Browser already exists. For this reason IO 
> should happen asynchronously through core.async in konserve. A durable 
> Index for DataScript would be nice :). 
> 
> 
> Feedback is appreciated :), 
> Christian 
> 
> 
> -- 
> 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: [ANN] Clojure 1.9.0-alpha12

2016-09-08 Thread Alex Miller
I've commented on this in multiple other places but for the sake of 
completeness...

Datascript is extending some defrecords to the IHashEq protocol to add 
custom hash caching. In particular, this extension is adding custom fields 
__hash and __hasheq, which happen to be the (obvious) names of the new 
fields added in alpha12 via CLJ-1224 to support built-in hashcode caching 
(like maps). 

Records are designed to hash like maps and to have hashing provided by the 
language, not customized by the user. Due to this, and to the use of fields 
with __-prefix, I consider the existing Datascript code to be invalid. I 
have examined all uses of __hash fields and IHashEq on Github (many many 
pages of results) and have found no other examples of this in tandem with 
defrecord.

Note that deftype does NOT provide a hashing mechanism - deftypes are not 
given map capabilities, hashing, or many of the things provided 
automatically by defrecord. It is thus common, acceptable, and encouraged 
for deftype users to provide a hashing strategy appropriate to the deftype. 
My comments above apply only to defrecord, not to deftype.

Datascript should either remove these extensions or switch to using deftype 
for these use cases.

On Wednesday, September 7, 2016 at 8:18:13 PM UTC-5, lvh ‌ wrote:

> CLJ-1224 appears to have broken Datascript, which now doesn’t compile:
>
> Exception in thread "main" java.lang.AssertionError: The names in #{__hash 
> __meta __hasheq __extmap} cannot be used as field names for types or 
> records., compiling:(datascript/db.cljc:369:1)
>
> The ticket mentions CLJS compat; it looks like it only adds __hash in CLJ:
>
>
> https://github.com/tonsky/datascript/blob/0684c4102706bf4ee8b2496ad35c32ced08640fc/src/datascript/db.cljc
>
> Not sure what the ideal way to solve this is…
>
>
> 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: ANN: durable-persistence for Clojure and ClojureScript

2016-09-08 Thread dgrnbrg
This sort of thing is also the goal of Datacrypt & Hitchhiker trees 
(https://github.com/datacrypt-project/hitchhiker-tree), which are designed 
to be highly optimized for I/O.

We've been making progress on the GC and adding new backends--it would be 
awesome to be able add a CLJS port too :)

Best,
David

On Thursday, September 8, 2016 at 4:28:08 PM UTC-6, Christian Weilbach 
wrote:
>
> Hi, 
>
> I have started some explorations for durable persitent indices in a 
> cross-platform fashion, that I wanted to for quite some time now. There 
> are some other implementations of persistent datastructures with 
> synchronous IO on the JVM, but I would like to go a step further and 
> generalize over any key-value store like medium. I am primarily 
> interested in critique and references to other work or experience 
> implementing efficient indices on disk. In the longer run I want to use 
> these indices as a building block for databases in Clojure(Script). 
>
> https://github.com/replikativ/durable-persistence 
>
> From the README: 
>
> This repository is for exploration of persistent datastructures on a 
> durable medium. The durable medium is abstracted away by a minimalistic 
> key-value protocol providing atomic operations (ACID) on single keys. 
> This decouples the implementation of the persistent datastructure from 
> the host and backend store. 
>
> The repository contains an adaptation of the cookbook in-memory version 
> of a red black tree. Instead of keeping all fragments in memory we 
> introduce a Reference type to fragments in the store and dynamically 
> load and store fragments. The root can be assigned to a fixed key, 
> modelling a durable identity similar to a Clojure atom. 
>
> The long term motivation is to provide efficient indices as a building 
> block for datatype management independent of JVM IO libraries spanning 
> also to ClojureScript and the Browser. With konserve an IndexedDB 
> storage backend for the Browser already exists. For this reason IO 
> should happen asynchronously through core.async in konserve. A durable 
> Index for DataScript would be nice :). 
>
>
> Feedback is appreciated :), 
> Christian 
>
>

-- 
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: durable-persistence for Clojure and ClojureScript

2016-09-08 Thread Christian Weilbach
Hi,

I have started some explorations for durable persitent indices in a
cross-platform fashion, that I wanted to for quite some time now. There
are some other implementations of persistent datastructures with
synchronous IO on the JVM, but I would like to go a step further and
generalize over any key-value store like medium. I am primarily
interested in critique and references to other work or experience
implementing efficient indices on disk. In the longer run I want to use
these indices as a building block for databases in Clojure(Script).

https://github.com/replikativ/durable-persistence

>From the README:

This repository is for exploration of persistent datastructures on a
durable medium. The durable medium is abstracted away by a minimalistic
key-value protocol providing atomic operations (ACID) on single keys.
This decouples the implementation of the persistent datastructure from
the host and backend store.

The repository contains an adaptation of the cookbook in-memory version
of a red black tree. Instead of keeping all fragments in memory we
introduce a Reference type to fragments in the store and dynamically
load and store fragments. The root can be assigned to a fixed key,
modelling a durable identity similar to a Clojure atom.

The long term motivation is to provide efficient indices as a building
block for datatype management independent of JVM IO libraries spanning
also to ClojureScript and the Browser. With konserve an IndexedDB
storage backend for the Browser already exists. For this reason IO
should happen asynchronously through core.async in konserve. A durable
Index for DataScript would be nice :).


Feedback is appreciated :),
Christian

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


signature.asc
Description: OpenPGP digital signature


Re: Clojure version and quil

2016-09-08 Thread Jonathan Fischer
You're probably using the leiningen that's packaged in Ubuntu, right? On 
Ubuntu 14.04, that's pulling in version 1.7.x, which is positively ancient. 
Remove the apt packaged version of leiningen and follow the installation 
instructions on the website (http://leiningen.org) and you'll probably be 
good to go.

On Tuesday, September 6, 2016 at 4:00:35 AM UTC-7, Jerome Manceau wrote:
>
> Hi,
>
> I'm very new to Clojure and hitting a wall trying to use quil.
>
> I've created a new project following an example "lein new quil drawing"
> It seemed to work but when checking the project.clj I saw that the quil 
> dependency was missing.
> Also, trying to start a first test application would only throw errors.
>
> Now, I realised that I need clojure version >= 1.7 to have quil working.
> But that's where it gets confusing:
>
> - When typing "clojure" in my terminal, I get : Clojure 1.4.0
>
> - When starting "lein repl" and then typing "(clojure-version)", I get: 
> "1.2.1"
>
> - When using the REPL on my IDE (NightCode) and typing "(clojure-version), 
> I get: "1.9.0-alpha11"
>
> So, how do I upgrade the clojure version in leiningen, so that I can call 
> "lein new quil drawing" and get the project created properly?
>
> I'm working on ubuntu 14.4
>
> Thanks for help
>

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