New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressed issue where class import does not conform to Clojure 1.10 ns spec #1

Merged
merged 1 commit into from Dec 17, 2018

Conversation

Projects
None yet
4 participants
@sxb8au
Copy link

sxb8au commented Dec 16, 2018

To replicate the issue, switch to a 1.10 (rc-5 at this point) and use the hitchhiker.tree.core ns:

Clojure 1.10.0-RC5
user=> (use 'hitchhiker.tree.core)
Syntax error macroexpanding clojure.core/ns at (core.cljc:1:1).
() - failed: Insufficient input at: [:ns-clauses :import :classes :package-list :classes] spec: :clojure.core.specs.alpha/package-list
[clojure.lang.PersistentTreeMap$BlackVal] - failed: simple-symbol? at: [:ns-clauses :import :classes :class] spec: :clojure.core.specs.alpha/import-list

Single class imports don't require vectors, although this used to work in 1.9 (obviously!)

@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 16, 2018

I just ran into this too!

@whilo whilo merged commit ee2e0fe into replikativ:master Dec 17, 2018

@whilo

This comment has been minimized.

Copy link
Member

whilo commented Dec 17, 2018

Thanks! What are you doing with the hitchhiker tree if I may ask? :)

@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 17, 2018

This shows up as a dependency on datahike. I'm afraid I'm not using it directly.

@whilo

This comment has been minimized.

Copy link
Member

whilo commented Dec 17, 2018

Ah, I see. Unfortunately you normally only hear back from people when there are issues in your open-source code. I have been wondering whether too good code is bad for community building ;).

@sxb8au

This comment has been minimized.

Copy link

sxb8au commented Dec 17, 2018

I'm also using it via datahike :) I'm largely using it as a way to conveniently distribute ~50 megabyte data sets around - with datahike providing a pleasant way of querying it - on fairly low spec'd nodes. Just getting my toes wet at present, nothing to write home about - but it's 'just worked' - so you might be right about the lack of feedback from others!

@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 17, 2018

I can see how that would be frustrating. I am using datahike as the database for a little link aggregator side project. I'll let you know once it's anything worth looking at :)

For what it's worth, while the code is probably great, it's likely the documentation that hinders adoption. I would have felt much more confident with going with datahike if there were:

  • Some more and more complete examples of projects using datahike
  • Some documentation around the upgrade path to datomic
  • A bit more performance info. How does it scale and when do I need to worry?
  • Information about the requirements. Can I run it on an AWS nano instance?
  • An indication which datascript version this is based on, especially now that tonsky is actively working on it thanks to the clojurists-together grant

There is also at least one big difference to datascript, and that's how to open a database/connection with a schema. I had to scour the issues to find that, and that made me worry about what else there might be that i'll run into. And the schema migration thing I mentioned in the other issue also worries me.

The datahike project is super cool and I'm very grateful for it, I'm just hoping to give an idea what goes through the mind of a newbie that is considering using it!

@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 17, 2018

Oh, also, would you mind cutting a datahike release with @sxb8au 's patch so I can use datahike on Clojure 1.10, please? :)

@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 17, 2018

I thought about this some more, a lot of these points could be addressed by a few paragraphs that say "use it for..." and "don't use it for...", like sqlite does here: https://www.sqlite.org/about.html and the executive summary on the same page

@sxb8au

This comment has been minimized.

Copy link

sxb8au commented Dec 17, 2018

Oh, also, would you mind cutting a datahike release with @sxb8au 's patch so I can use datahike on Clojure 1.10, please? :)

If you're using deps.edn, you can temporarily point at the deps branch of my fork until a new datahike version is released:

  io.replikativ/datahike {:git/url "https://github.com/sxb8au/datahike.git"
                          :sha "7f0f50def8cb036308155c351b71e5e2cbdf257d"}
@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 17, 2018

Thank you @sxb8au . I'm using leiningen for this project, that's definitely one of the things I appreciate about deps.edn!

@whilo

This comment has been minimized.

Copy link
Member

whilo commented Dec 18, 2018

I thought about this some more, a lot of these points could be addressed by a few paragraphs that say "use it for..." and "don't use it for...", like sqlite does here: https://www.sqlite.org/about.html and the executive summary on the same page

What would you extend in this section: https://github.com/replikativ/datahike#when-should-i-pick-what ?

@whilo

This comment has been minimized.

Copy link
Member

whilo commented Dec 18, 2018

For what it's worth, while the code is probably great, it's likely the documentation that hinders adoption. I would have felt much more confident with going with datahike if there were:

* Some more and more complete examples of projects using datahike

Do you mind open-sourcing yours? ;) In general it is best if the community could provide those.

* Some documentation around the upgrade path to datomic

Right. I guess we need to upgrade that a bit further. I had hoped that somebody would help, because the project definitely got a lot of positive feedback. In general the datahike.api should be a subset of datomic, so as long as you are using it an upgrade path to datomic should mostly consist in converting your schema and importing your datoms into it. There might be edge cases of things that are not supported in datomic, e.g. nested values, that datahike might still accept at the moment. We probably should pin that down with spec and try to keep it compatible, but this is subject to discussion, I think.

* A bit more performance info. How does it scale and when do I need to worry?

It should scale fine, but we are still exploring it. Annoyingly we haven't had the time to work on replikativ/datahike#7 yet though. But I have Christmas break next week. I also need to do some work on datopia though. I suspect it is either an issue with the hh-tree or the datascript query engine.

* Information about the requirements. Can I run it on an AWS nano instance?

I haven't tried. It should be possible though. Feel free to report back.

* An indication which datascript version this is based on, especially now that tonsky is actively working on it thanks to the clojurists-together grant

There is also at least one big difference to datascript, and that's how to open a database/connection with a schema. I had to scour the issues to find that, and that made me worry about what else there might be that i'll run into. And the schema migration thing I mentioned in the other issue also worries me.

Well, datahike is not a mainstream database, but it is exhaustively tested with the datascript tests. You should not lose data.

The datahike project is super cool and I'm very grateful for it, I'm just hoping to give an idea what goes through the mind of a newbie that is considering using it!

Thanks a lot for your feedback 👍

@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 21, 2018

What would you extend in this section: https://github.com/replikativ/datahike#when-should-i-pick-what ?

Probably just some stronger wording on the limitations that one would run into (like the schema, or performance/memory constraints, etc). I'd also like some more concrete steps on the datomic upgrade path, but that's probably separate. I'll think some more about it.

Do you mind open-sourcing yours? ;) In general it is best if the community could provide those.

Probably not this one, but if datahike proves as useful as I hope it to be, I'll try to write something open-sourcable. Or at least a short example that would have helped me to get started :)
And if it doesn't prove as useful I will let you know why. :)

Annoyingly we haven't had the time to work on replikativ/datahike#7 yet though. But I have Christmas break next week. I also need to do some work on datopia though

Merry christmas! (Frohe Weihnachten!?). What's datopia?

I haven't tried. It should be possible though. Feel free to report back.
Will do!

Would you mind releasing a snapshot with the fix? 😬

@mgerlach-klick

This comment has been minimized.

Copy link

mgerlach-klick commented Dec 27, 2018

@whilo, as promised, here's a writeup on why Datahike isn't as useful to me as I was hoping it would be: http://gerlach.coffee/posts-output/2018-12-27-taking-datahike-for-a-spin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment