Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 19 01:14

    whilo on master

    Allow iteration of keys in a st… Merge remote-tracking branch 'u… Fix init memory store. and 9 more (compare)

  • Nov 19 01:14
    whilo closed #29
  • Nov 18 19:56
    csm synchronize #29
  • Nov 18 19:53
    csm synchronize #29
  • Nov 17 19:21
    csm synchronize #29
  • Nov 17 19:09
    csm synchronize #29
  • Nov 17 18:48
    csm synchronize #29
  • Nov 17 04:55
    csm synchronize #29
  • Nov 15 22:19
    csm commented #29
  • Nov 15 21:58
    csm opened #29
  • Nov 11 12:14
    whilo closed #10
  • Nov 11 12:14
    whilo commented #10
  • Nov 09 17:34
    MrEbbinghaus opened #10
  • Oct 16 22:30
    danielsz commented #28
  • Oct 16 22:14
    whilo commented #28
  • Oct 16 22:13
    whilo closed #28
  • Oct 16 22:13
    whilo commented #28
  • Oct 16 12:44
    danielsz commented #28
  • Oct 16 10:16
    whilo commented #28
  • Oct 15 12:38
    whilo commented #27
Christian Weilbach
@whilo
by example: [[123 :knows "Peter" 1], [123 :name "Susi" 1]] would encode the relation that Susi knows Peter at time 1.
@lxsameer does this make sense?
Christian Weilbach
@whilo
New bugfix release for the hitchhiker-tree and datahike https://github.com/replikativ/datahike
Alexandr Sugak
@AlexSugak
Hi! I am trying to get started using ormap sample (http://replikativ.io/tut/get-started.html) and cannot understand the streaming behavior. E.g. if I do assoc :name "Peter" then I see my "streamed-to" atom updated. Then I do dissoc :name and see it empty. But if I do assoc :name "Peter" again - it is still empty. Changing name to another value works though, e.g. assoc :name "Sam" will change the name. Does every transaction have to have a "unique" value?
Christian Weilbach
@whilo
@AlexSugak Oh, gitter is not notifying me.
Do you mean you have used calls like: (<?? S (ors/assoc! stage-b [user ormap-id] :name [['assoc [:name "Peter"]]]))?
This is a bit clumsy, I know.
The point is that decouple the associativity from the semantics of the operations, but in hindsight we should have just skipped the nested assoc.
Christian Weilbach
@whilo
You should be able to assign the same value multiple times. If not then this is a bug.
Please open an issue. We are not doing much work on replikativ itself at the moment, but plan to lift its features into datalog land to make it easier :).
Christian Weilbach
@whilo
@kordano has rebased datahike on the current version of datascript, which support "not" and "or" clauses. Feel free to test our beta release and give feedback :).
Christian Weilbach
@whilo
I have given a talk about our integrated datalog stack at https://www.youtube.com/watch?v=A2CZwOHOb6U
Dan Fornika
@dfornika
That was a really interesting talk. I've been tinkering with the datopia abci-host example project a bit (https://github.com/datopia/abci-host/tree/master/example). I'm curious how you expect people to format keys in their applications.
The docs describe using keywords like :a but I'd expect that in order to be useful, the keys should combine some sort of namespace with some sort of identifier. Would it be possible to use something like :org.mynamepace.app/uuid as a key?
Dan Fornika
@dfornika
I've tried doing this but seem to have problems when the uuid starts with a number.
Christian Weilbach
@whilo
@dfornika In the abci-host example?
Dan Fornika
@dfornika
Yes
Moe Aboulkheir
@moea
@dfornika The example is restricted to storing keywords only. If you want to store things which can't be represented as keywords (i.e. strings with leading digits), then you'd want to change the application to accept strings.
The underlying store is fine with strings containing leading digits, but the transaction validation code in the example application is contrived to reject non-keyword keys.
But in general about expectations - it's a toy application - I'm not expecting people to build on it, necessarily - it only serves as a demonstration of the underlying library.
Moe Aboulkheir
@moea
I may have misread your problem - if there's a valid keyword that's rejected by the example application, that may be a bug.
Moe Aboulkheir
@moea
I should probably spend a day factoring the data structure out of https://github.com/nervous-systems/sputter into an artifact that offers the same functionality - a disk-persistent merkle trie w/ a k/v interface - but without the Ethereum-specific RLP encoding overhead, and a runtime-configurable key decomposition scheme.
Christian Weilbach
@whilo
What is the RPL encoding?
Moe Aboulkheir
@moea
Recursive Length-Prefix, it's like homegrown netstrings
with the ability to represent sequences. It's necessary for an EVM implementation (because the hash of the RLP encoding is part of the proof protocol, etc.), but the data structure would be more generally useful without it.
it's transparent to the user, but it's still overhead.
Christian Weilbach
@whilo
I see. Yes, it is like a serialization format, right?
Could you use something like fressian directly?
Moe Aboulkheir
@moea
Yeah - I'd generalize the interface such that it's the user's responsibility to provide an implementation of a serialization/deserialization protocol, so the artifact could be used by sputter and by users who e.g. want to use fressian
Moe Aboulkheir
@moea
and per above, have the radix be configurable, rather than fixed (to provide Ethereum-conformant proofs, the keys have to be decomposed into nibbles)
these are trivial changes
Christian Weilbach
@whilo
@moea the post is a good read
Moe Aboulkheir
@moea
thanks. the RLP stuff is actually in the follow up
Christian Weilbach
@whilo
right
again, a very good read
tries are in general not balanced
are there use cases where they are particularly useful, e.g. in the EVM
?
Christian Weilbach
@whilo
i have asked you that before, and i think your general answer was that it is not particularly useful. i imagine that tries are good to implement search index datastructures
i mean fulltext search
well, forget about it. i have no idea, i need to think about it more
Moe Aboulkheir
@moea
i'm not actually sure that it's an ideal datastructure for the EVM, as the advantages emerge when there's a high degree of shared structure in the keyspace (e.g. namespace prefixes, per the above example) - the ability to perform prefix searches, etc. - but Ethereum's keys are cryptographic hashes - so it's an unusual choice, because they have no structure to speak of
Moe Aboulkheir
@moea
so yeah, there's a bunch of cases where they're useful, but the EVM ought to have used an AVL tree or something like that
Christian Weilbach
@whilo
right, cryptographic hashes distribute uniformly by design
Moe Aboulkheir
@moea
their argument was just that they're easier to implement than self-balancing trees, which is not a good argument
but a merkle trie is an interesting data structure, just not for their use case ;)
Christian Weilbach
@whilo
hehe, right
Dan Fornika
@dfornika
@moea Thanks for your comments about keys on the abci-host example, that makes sense.
Christian Weilbach
@whilo
in case somebody missed it, we now have datahike in better shape and aim to incorporate replikativ's replication work into it. https://github.com/replikativ/datahike