mafintosh: do you get what im saying about the 'checkout last state before write started' thing
mafintosh
ogd: yup!
ogd: i'm talking about auto merging
ogd
mafintosh: ok so when import2 finishes
mafintosh: assuming import1 has finished already
karissa
we might have to explore what optimistic merges look like later. they'd be a feature afterward i think
ogd
mafintosh: then couldnt the import2 process be like 'hey import1 finished. lets try and make it appear to the user that we never forked in the first place'
mafintosh: and they do a diff of import1's branch and their (import2's) branch
mafintosh
ogd: imo thats too magic
karissa
are you always going to be sure that is the case, though?
mafintosh
ogd: i mean - you are doing a concurrent write in the first place
karissa
would it break down on shared drives?
ogd
karissa: not sure what case you are talking about
karissa
are you sure that import1 and import2 aren't conflicting and/or done by the same person
mafintosh
ogd: which would create forks if it was done on multiple machines
ogd
mafintosh: the output of import2 will either be 'finished import, automerged into master' or 'finished import, created new branch abc123'
karissa: well thats what the diff tells us
mafintosh
ogd: would you do the same thing if the forks happened on two different machines and we replicated?
karissa
mafintosh: i wouldn't.
ogd
mafintosh: no because the other machine doesnt have write privileges on my computer :)
i dont feel strongly
i am just trying to think through the options
mafintosh
yup!
karissa
its a lot to think about, and a lot to implement.
ogd
i do think we need to be able to detect if a write is happening in the middle of another write
karissa
ogd: +1
mafintosh
ogd: start->batch->...->end solves that i agree
karissa
my initial instinct is to at least be able to do that and tell the user what the consequences are of that write if they are to complete the action
and the start->batch->end sounds like a good idea
ogd
karissa: so like when import2 starts it would prompt and say 'there is an import happening write now, your import will be put into a new fork, is that ok?'?
mafintosh
ogd: but detecting that that write is "dead" is a bit hard to impl because of multiprocess
karissa
ogd: yeah. that'd be nice to have for beta at least, if its possible. gonna go to sweetbar brb
freeall joined the channel
mafintosh
ogd: since we would have to message all processes if any of them are currently writing a specific stream etc
ogd
mafintosh: well now im not sure when we need to detect a 'dead import
mafintosh
ogd: if dat crashes?
ogd
yea it crashes
mafintosh
ogd: so you have start->batch->batch on disk with no end
ogd
you open a new process, start a new import
it just goes in a new branch
mafintosh
ogd: and you'd have two heads?
ogd
yea to the new import it appears just like the first import (that is dead) is still happening
mafintosh
i forgot that it would "rollback" to the last start node - that part makes sense
ah cool
ogd
im not sure what you do to fix it though
mafintosh
ok - you're convincing me
ogd
its kinda like having a dirty working directory in git
mafintosh
ogd: when we add a undo api for a "remove head" api you'd do that
ogd
you need to stash or 'checkout .' to revert
or reset --hard
ah yea
if we record time when we write the 'start
mafintosh
ogd: basically the user knows that the import failed
ogd
then we can show 'Import has been running for 38 minutes' in ' dat status'
mafintosh: yea
mafintosh
ogd: "end" should store the message
as well
ogd
mafintosh: the commit message?
mafintosh
ogd: yea
ogd
yea agreed
mafintosh
ogd: or maybe we add that to the start node?
ogd
hmm actually yea im not sure
mafintosh
ogd: hmm well you want to checkout the end node - thats the important one actually
ogd: since that describes the previous state
ogd
i need to go get more coffee afk
mafintosh
ogd, karissa: btw try running npm install level
no more compilation \o/
ogd
mafintosh: nice it worked
mafintosh
ogd: i like the start->batch->end idea
ogd: we probably shouldn't replicate a branch without an end node as well
ogd
mafintosh: yea true
mafintosh: purgatory branch
hehe
mafintosh
ogd: so that is basically a dat commit
ogd: brb reallocting
ogd: whats a better word that commit for this thing? :)
TheLink joined the channel
nvcexploder has quit
dam______ has quit
tixz has quit
wa7son has quit
finnp has quit
jden has quit
karissa
ogd: mafintosh: we might just want to use commit if its exactly the same as git
calvinmetcalf joined the channel
ogd: mafintosh i guess there's no staging area..
mafintosh
karissa: its staging as long as you don't have the end node inserted
*as long as you don't have the end node
ogd
yea like if you do a writestream, the writestream is 'staging' until it finishes
karissa
ogd: mafintosh ah right. but that state probably wont be very common, as most writes will finish
jlord
mafintosh: what does reallocating mean!?
mafintosh
jlord: i was moving cafes
jlord
Ohhh relocating
haha
ogd
lol i thought it said reallocating
mafintosh
whats the difference?
ogd
relocating reallocating
allocate means to reserve
mafintosh
ah got it, lol
ogd
sounds kinda robotic lol
but i guess it makes sense.. you are reallocating space for yourself to occupy
mafintosh
karissa: maybe its not just a write stream - maybe its just a commit you're working on :)
jlord
allocate: distribute (resources or duties) for a particular purpose
mafintosh
karissa: add some data, then some files, then other stuff and then you "close" the commit after a few days with the end node
jlord, ogd: its one of those english words i've learned from movies
ogd
mafintosh: haha nice
erikg joined the channel
jlord
mor
is a word I learned from tv
omfordele
is a word i just looked up
mafintosh
rød grød med fløde :)
karissa
mafintosh: ah i see
ogd
roh goh muh fohhh
mafintosh: kinda seems like a writestream should have its own start/end
mafintosh: and a commit should have just an end
mafintosh: dunno for sure though
clkao joined the channel
richardlitt joined the channel
nvcexploder joined the channel
karissa
i think its hard to tell without some clear examples
dam______ joined the channel
are you guys wanting to prioritize this or are you just musing for the future?
mafintosh
i think what we have now works ok as long as you don't do concurrent writes so this is future stuff
substack
toss them in a queue?
tixz joined the channel
karissa
ogd: mafintosh: okay cool. it'd be nice if one of us could write up some of this discussion from today on an issue so we have a reference for later/other people can weigh in
mafintosh
substack: thats basically what we're gonna do
substack: (except the queue will be graph nodes with a single parent)
ogd, karissa this is basically a transaction api actually
ogd
yea thats what i was thinking earlier
mafintosh
you cover a write stream in a transaction - then you add a tag/commit node with a friendly message
kumavis joined the channel
and if you are in the middle of a transaction and start a new one you'd checkout the transaction start node first
wa7son joined the channel
mikolalysenko joined the channel
finnp joined the channel
jden joined the channel
ogd, karissa this is good a simple - i like it
ogd
mafintosh: i think tag/commit is separate though
pfraze joined the channel
mafintosh: and we shouldnt add it now
mafintosh: but we should add the transaction thing
mafintosh
i'll do the transaction api
ogd, karissa whats missing for doing the beta release?
ogd
mafintosh: i gotta finish making the cli match the docs, and add tests