HackerTrans
TopNewTrendsCommentsPastAskShowJobs

reltuk

no profile record

Submissions

[untitled]

1 points·by reltuk·3 года назад·0 comments

Some Useful Patterns for Go's OS/exec

dolthub.com
9 points·by reltuk·4 года назад·0 comments

Creating a Postgres Foreign Data Wrapper

dolthub.com
35 points·by reltuk·4 года назад·6 comments

Error handling with errgroups

dolthub.com
37 points·by reltuk·5 лет назад·17 comments

An Overview of DoltHub Infrastructure

dolthub.com
1 points·by reltuk·5 лет назад·0 comments

comments

reltuk
·4 года назад·discuss
Similar arguments are also seen in https://graphitemaster.github.io/aau/.

When using unsigned ints for backward iteration, I'm partial to looping as:

  for (i = size - 1; i < size; i--) {
    ...
  }
since it has so much symmetry with forward iteration.
reltuk
·4 года назад·discuss
To quickly answer these...

- it's content addresses / merkle DAG all the way down. The commit's hash is something like meta (author, description, timestamp) + parents hash + root value hash. The root value is composed of the schema, and pointers to table and index maps. Tables and indexes are merkle DAGs of the table data organized in a structure a bit like a B-tree, but with cut points chosen by a rolling value hash in order to probabilistically re-synchronize on incremental changes. Some details: https://www.dolthub.com/blog/2020-04-01-how-dolt-stores-tabl... , https://www.dolthub.com/blog/2020-05-13-dolt-commit-graph-an...

- currently table data is stored row major for full rows of the table and so diffing cannot efficiently ignore individual columns.

- direct conflicts are computed on a row-by-row basis, using the primary key of the row. And then constraints and foreign key references are maintained and validated across merges and edits.

HTH, happy to answer any further questions :).
reltuk
·4 года назад·discuss
It's a play on git, which is itself regional slang.
reltuk
·4 года назад·discuss
Yeah, pgx is quite impressive and is a great set of bindings with very accessible examples, etc. Definitely something to be aware of for people that prefer building things in Rust. Thanks for pointing it out here.
reltuk
·5 лет назад·discuss
I think the contract in the context package is that WithCancel may leak resources if cancel is not called and the parent context is cancelable but never canceled. At least, that seems to be the behavior I see in the implementation here:

https://github.com/golang/go/blob/master/src/context/context...

So in this case, errgroup probably doesn't have a choice and needs to call cancel() at some point.