well… I was going to blame it on clj-refactor adding that dependency for me… but as I'm thinking about it it's doubtful…
As I said, the last thing I did was evaluate a db-function to wipe a table, which I did inside the buffer containing that namspace… I may have thought that I was in another of the namespaces associated with a file named core
(of which there are several in the Luminus template)… but still this would not have warranted inserting somehting in to the ns declaration just for a single eval… maybe I was just on autopilot or something… still find it hard to believe that I'd do anything like that consciously…
For the record: The same trouble has com up again… and this time I know why. It was indeed clj-refactor that automatically added the dependency: I qualified a function call from that namespace (`db.core`)` with the namespace db/myfun
… pressing TAB
one time too often automatically added the dependency, which had gone unnoticed.
Anyway, I'm really grateful for the helping hands in here (hasn't been the first time, won't be the last)… I just wish the root cause had turned out to be more substantial to warrant all the fuss (this had been an issue for three days now, so I finally chose to ask) Cheers!
which datalog library would you suggest for clojure? I want to use it as an in-memory db. Is datascript the right choice?
@meditans There is datascript, datahike, asami (datalevin is durable only faik)
And also datomic in memory which is proprietary
@meditans the datahike repo has a nice little description of the major differences between datascript datahike and datomic to guide your decision.
thanks @borkdude @denis.baudinot, checking!
what would be the closest thing to this datalog
package https://clojure.github.io/clojure-contrib/doc/datalog.html (which, if I understand correctly, is deprecated?). I'm exploring different possibilities, and maybe I could do without the overhead of connecting to a database and doing transactions. Basically I'd like to have the database as a value, and ask datalog queries
sorry for the vagueness, I just started learning Clojure and I'm quite unsure on how to orient myself in the ecosystem
@meditans That's basically an in-memory datalog database like you asked earlier right?
datascript is basically what this is, and there are some others
If you are a beginner I can recommend checking out the following resources: Conceptual Introduction with pseudo-syntax: https://x775.net/2019/03/18/Introduction-to-Datalog.html Interactive Tutorial with Clojure Datalog syntax: http://www.learndatalogtoday.org/
I have to look more into datomic. Does that force me in structuring my db around the datom though? What if I wanted to store relations in my database with bigger arities?
That is covered and its very simple
thanks @denis.baudinot. I'm a beginner in clojure indeed, I can write in prolog, and I'm trying to understand how to replicate some little features I need without talking to swi-prolog directly
like, to do the examples in learndatalogtoday in one of my projects, which package should I import?
http://www.learndatalogtoday.org/chapter/0 Here you’ll find the interactive widget at the bottom
the tutorial has little exercises with increasing complexity/concepts
the syntax is equal to datomic/datahike/datascript
to your other question: modelling relations is covered there. Essentially a value in a EAV dataom can be another entity (or several)
yes, I found that website a few days ago, and I did part of the tutorials. My first problem now is not that language (which is awesome) but what I have to do to use that in a project instead of the repl on that website
@meditans another tutorial project here https://github.com/Hendekagon/Datalog-tutorial with code examples for Datahike and Datascript
ahh I see. Well I would just use the recommendations we said above. Use datahike if you possibly need durability or datascript if you simply want a in-memory value
datomic for involved engineering requirements
thanks! I'll try installing datascript now
there is also a #beginners channel here to ask questions regarding Clojure
thanks! I'll go there too 🙏
also since your are comming from prolog don’t miss to also check out https://github.com/clojure/core.logic https://clojuredocs.org/clojure.core.logic
how can i submit edits to existing guides on the clojurescript site?
guides/webpack needs some love
thanks @dpsutton
Is there a common library which includes HTTP header parameter encoding, that will take care of all the encoding, commas, etc. for me? Particularly for parameterizing the Authorization header in a formencoded-ish style (but not quite, because commas instead of &). I feel unsafe when I write this code myself, as it's prone to going wrong :) e.g. foo=bar, baz=10
I think clj-http handles all of that for you
I don't think there is a single standard "header parameter encoding"
so for example https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization doesn't mention anything about keys value style stuff like foo=bar or comas, where https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate specifies a single required key=value pair and one optional key=value pair separated by a coma
@hiredman Definitely isn't standard across all headers. There are "auth-params" which are joined. RFC 7235 does provide a BNF for this stuff and there is infinite numbers of params that can go in.
(a friendly reminder from one of your Admins to encourage beginners to ask their questions in #beginners rather than #clojure as the folks in #beginners have "opted in" to helping beginners in depth)
Does anyone have a recommendation for a Stripe Client library?
I just call their API directly, it's pretty ok and a wrapper is unnecessary (not sure what it would do beyond a couple of utility functions)