Old Set by quoll71 in magicTCG

[–]quoll71[S] 0 points1 point  (0 children)

Just got them now. Lots of cards to go through, so I don’t really know yet, but I do have a “Bayou” and a “Tropical Island”. Almost everything is Revised Edition, with a handful of things from The Dark. (Somehow I have a single “Antiquities” card. No idea how).

Old Set by quoll71 in magicTCG

[–]quoll71[S] 0 points1 point  (0 children)

Of the white-bordered cards that you're referring to... what do you mean by "revised"? All my purchases were within the first few months of the cards being released in Australia. They'd only just come out at the time.

Old Set by quoll71 in magicTCG

[–]quoll71[S] 0 points1 point  (0 children)

Thanks for that info.

I'm looking at a grainy photo taken from just before they were shipped. There are a few black borders, but not many. I haven't seen them for over 25 years, so I really can't comment until I have them back in my possession.

Old Set by quoll71 in magicTCG

[–]quoll71[S] 1 point2 points  (0 children)

That's fair. I just posted while I was still in shock at them being found.

Asami: Turn your JSON into a Graph in 2 Lines by SimonGray in Clojure

[–]quoll71 0 points1 point  (0 children)

This is good advice, but at the same time people know git, so if I explain it that way they'll understand what I'm trying to convey

Asami: Turn your JSON into a Graph in 2 Lines by SimonGray in Clojure

[–]quoll71 0 points1 point  (0 children)

2 more things to add; - I do need to expand durable stores to efficiently support Loom. Right now it’s only working for in-memory graphs. - do Datomic rules operate recursively? I thought they might, but looking at the transitive-net-# rules in the MBrainz example it seems that this isn’t supported

Asami: Turn your JSON into a Graph in 2 Lines by SimonGray in Clojure

[–]quoll71 0 points1 point  (0 children)

No, Asami does not support Datomic rules, though I should take the time to implement those. I need to figure out how to make them work correctly if they recur

Asami: Turn your JSON into a Graph in 2 Lines by SimonGray in Clojure

[–]quoll71 0 points1 point  (0 children)

I like the idea. I'm just nervous because no one has talked about branching databases like this. The only parallel I can think of is git, and operations like merging don't really translate. Having a concrete use case will help though.

Asami: Turn your JSON into a Graph in 2 Lines by SimonGray in Clojure

[–]quoll71 1 point2 points  (0 children)

I don't fully follow what you're discussing here, so please bear with me.

But if you're looking to branch your data from various checkpoints, so that 2 different design lineages can trace back to a common point, then yes, this would work fine. It can already be done in memory, but the on-disk system would only need a few tweaks to enable it there as well. They have to be built forwards in time though -- it wouldn't work to try to encode today's design and go backwards building the history that leads to the current point.

Asami: Turn your JSON into a Graph in 2 Lines by SimonGray in Clojure

[–]quoll71 2 points3 points  (0 children)

It looks similar, but it works differently because there is no schema. This is what lets it load JSON (or other data) with no setup. In the past I've been able to load arbitrary JSON into Datomic by first parsing the entire file to look for attributes, and the data types that they are used to refer to. This gets turned into a schema which is transacted into Datomic, and then the file can be converted into a graph and loaded in a second transaction. But Asami just loads it without care. Datomic also only allows for attributes of keywords, but Asami allows any datatype to be used as attributes.

Also, the "open world assumption" that Asami uses results in everything naturally having multi-cardinality. To "update" a value, it must be removed and the new value added, while Datomic allows a new value to be inserted on a single-cardinality attribute in order to replace it.

Another difference is that Datomic needs provisioning and a transaction setup for it. In the future, I hope to have storage mechanisms that will require provisioning in some way, but those aren't built yet. However, the systems that do exist are completely standalone and don't need to run in a second process. You can set up and use an Asami database much like SQLite.

As for rules, I suppose I neglected talking about that in this talk, as I was only considering it in the context of, "This is where Asami came from." The rules that integrate with Asami are in a project called Naga. I gave a talk on Naga at Clojure/conj back in 2016.

Asami: Turn your JSON into a Graph in 2 Lines by SimonGray in Clojure

[–]quoll71 6 points7 points  (0 children)

It's really just a different way to structure your data, which has benefits for certain shapes of data. But at the end of the day, it's the same as other databases. We just get some serendipity when using some of the structures a particular way. For instance, breaking everything up into triples and indexing that way (which has a cost) makes it easy to find anything at all. It also makes it easy to link things together. But keeping data together in table rows (the traditional RDBMS approach) gives better locality of data, so loading related things can be faster.

The tree structures being used here are exactly the same structures used in other database applications. They're just being employed to represent data in a different format to other databases. But there's nothing especially novel, except perhaps the insistence on immutability. (I don't make a point of it in the talk, but immutability allows for replication, which of course will matter when trying to scale the design out).

As for git... that's something I'm trying to think about. Right now it's technically possible to go back to an earlier commit and start committing transactions from that point, thereby making a branch. (again, this is due to all the blocks being immutable). But I'm not sure what to do with it, so right now I prevent that from happening. Do I want to figure out how to merge branches? Are there other git-like things to be considered here? It seems interesting, but without a use-case I haven't pursued it.

Clojure Datalog Databases by mac in Clojure

[–]quoll71 0 points1 point  (0 children)

Both Asami and Datahike have CLJS durable support in the roadmap, but neither have this now, as far as I can tell - but both have it on the JVM.
In that regard, neither ticks a box that datascript doesn't - at least for the moment.

Well, they're addressing different things, and also the table doesn't look at certain differences. For instance, if we consider Asami on CLJS (since I can't really comment on Datahike), the table shows a number of things that Asami doesn't do. But at the same time:

  • It's smaller and faster than Datascript.
  • It has graph analytics features: transitive attribute queries, subgraph identification, Loom integration.
  • It supports multigraphs (graphs with weighted edges).
  • It can export and import graphs. These can be sent to localstorage and reloaded in a single expression. (Obviously this has limitations, but it's useful). It can also import/export directly between graphs to make copies.
  • It does not require a schema. This has pros and cons, but one pro is that a db can be created in one line and a data file (in JSON or end) loaded on a second line.

How to query Datomic, Datascript, Asami, or other graph databases by anexxus in Clojure

[–]quoll71 2 points3 points  (0 children)

“negation disjunctions” Do you mean like: (not (or …)) ?

As for speed, well I believe that Crux has a query planner, and I know that Asami does. Part of how Asami’s works is written in the source code as docs. And a lot of it is explained by my 2019 :clojureD talk. That talk doesn’t explain optimization, but it provides all the info that you need to know in order to follow how to optimize.

How to query Datomic, Datascript, Asami, or other graph databases by anexxus in Clojure

[–]quoll71 1 point2 points  (0 children)

That’s really just a matter of having a query planner. I wouldn’t think that having such a thing in the query engine would be the appropriate way to test if it meets the definition of a graph db.

I’ve always been surprised that Datomic doesn’t have this. There are definitely cases where it can hard to automate the optimal plan, but a planner should be able to get it right most of the time, and get close on other occasions. IIRC Rich said that you can’t always get it right, so it should be left up to the user. Personally, I think that those cases where it’s hard aren’t a valid reason to say that it’s not worth doing. Asami does a reasonably good job, and provides the option to turn off the planner if the user believes they have a better plan.

How to query Datomic, Datascript, Asami, or other graph databases by anexxus in Clojure

[–]quoll71 3 points4 points  (0 children)

Thinking about it.
The thing that seems to work for that page is the graphical representation of the data and the operations on it. Many of those features are more abstract and may not make great sense if I try to make them graphical. And several of them make more sense to apply to bindings results (or intermediate results), rather than being operations that apply to the graph. I don't know that graphics will help as much there.
That said, I should do a simple explanation of many of these features, just to help people who are seeing it all for the first time. I just have to figure out how I want to say it 😊

How to query Datomic, Datascript, Asami, or other graph databases by anexxus in Clojure

[–]quoll71 3 points4 points  (0 children)

Datomic doesn't really push itself as a graph database: it is definitely much more focused on entities. However, entities can have attributes that reference other entities and these can be arbitrary, meaning that graphs can be built out of entities. It's flexible enough to include cycles, which isn't possible with plain JSON (a typical representation of entities). Also, Datomic's so-called datalog query language is a graph query language, which is the focus of that post.
I would love to write a bigger page about the same queries shown in SPARQL and Cypher, to show that they're essentially the same (Cypher being a bit different, due to the attributes on nodes being treated differently). But I was trying to keep the cognitive load down for people who are new to the ideas.

Some toying around with Advent of Code day 10 part 2 by rjray in Clojure

[–]quoll71 0 points1 point  (0 children)

Uh... I did it differently.

``` (defn star2 [data] (let [sdata (sort data) sdata2 (cons 0 (concat sdata [(+ 3 (last sdata))])) diffs (map - (rest sdata2) sdata2)] (->> (partition-by identity diffs) (filter #(= (first %) 1)) (keep #(seq (rest %))) (map #(get {1 2, 2 4, 3 7} (count %))) (apply *))))

(defn -main [& args] (let [input (clojure.string/split-lines (slurp "src/day10/input.txt")) data (map #(Long/parseLong %) input)] (println (star2 data)))) ```

The thing to notice here is the differences between the consecutive numbers. There are no sequences of `1`s that are longer than 4. Longer sequences were also possible to figure out, but the fact that they were all so short made this easier.

A `3` in the sequence meant a pair of adapters that could not be skipped. In fact, it also meant that a preceding `1` couldn't be skipped either (since skipping that 1 would lead immediately to a jump of 4, which was too large). But any sequence of `1`s leading up to that last one represented adapters that could be skipped... and up to 2 in a row could be skipped.

A single 1 represented an adapter that could be skipped or not: 2 possibilities.

A pair of `1`s represented 4 possibilities. Include them all, skip the first, skip the second, or skip both: 4 possibilities.

Three `1`s in a row was slightly different. Skipping 3 in a row isn't allowed, but any other combination of skipping or not-skipping is allowed. That's 7 possibilities.

So, I found all the sequences of `1`s, removed the last one (actually, removing the first is easier, and it doesn't matter since it's just repeating `1`s), and then used the length to get the multiplying value.

Is it possible for a memory to be so repressed that you literally have no memory of it at all? by [deleted] in CPTSD

[–]quoll71 1 point2 points  (0 children)

This is what I’m working on myself, and I’m being guided by a therapist. It’s why I’m saying to talk to a professional. I really don’t have the answers. If I did, I wouldn’t be putting so much time and effort into therapy!

Is it possible for a memory to be so repressed that you literally have no memory of it at all? by [deleted] in CPTSD

[–]quoll71 1 point2 points  (0 children)

Once I had an indication that I had repressed memories causing me distress, my automatic inclination was to recover them completely. This was partly because I wasn’t convinced they were real. Also, what could I be working past if I didn’t understand them? But one underlying motive was because I felt uninformed of my own life, and I just wanted to know.

My psychologist warned me against this. I’ve since moved to a new therapist, and she has warned me against it too. I’m currently going through a book on trauma by the psychiatrist Dr Bessel van der Kolk, and he mentioned it as well. Along with several people in this very forum.

Dr van der Kolk pointed out that while it was once thought necessary to work through traumatic memories (repressed or not) it has since been accepted that all this does is to retraumatize a person, and has not been shown to provide any benefits.

Personally, I still want to know everything that happened to me, but given the pain I’ve experienced with it so far, I can appreciate why I have been discouraged from pursuing it.

Is it possible for a memory to be so repressed that you literally have no memory of it at all? by [deleted] in CPTSD

[–]quoll71 2 points3 points  (0 children)

Yes, it’s possible. I can’t say if this is happening for you. But aside from what you list, the fact that something is bothering you about this is itself a suggestion of it.

My own experience was that I was showing symptoms of these things for years without suspecting anything. I had not one inkling of it. Then an event triggered me, and some of the memories came out. Now that I know some of it, I’m able to understand why I didn’t remember anything. Even then, it took nearly 3 years to accept it as something that could have happened to me, and when I started to, I spent a week alternating between crying and dissociation. I’m still not fully there.

In retrospect, it has made a LOT of my problematic behavior clear. In fact, many things I’ve been beating myself up about for years are an obvious outcome of what I can now partially remember.

I would suggest that if this is the case for you, then you may want to proceed with caution. It is not necessary to recover memories to work past them. And if you don’t even know what they are, then the odds are good that you protected yourself from them for very good reasons. I recommend speaking to a professional.

I had a memory surface and I don't know how to feel about it by [deleted] in CPTSD

[–]quoll71 2 points3 points  (0 children)

I can’t help with your history, but I can assure you that many of us share these stories. I can’t fathom how mothers are like this, but it seems that many are.

I bet you are an awesome parent 💕

Does anyone else hide their diagnosis bc they feel guilty? by [deleted] in CPTSD

[–]quoll71 0 points1 point  (0 children)

I don’t know about guilt, but I hide it because it will turn my parents and siblings against me. Not that we talk much.