(matrixbot) `icarito` if I accidentally added files to a dat, can I remove them, even from history? I added some build artifacts that are bloating my dat needlessly
ogd
@icarito mafintosh if you delete a file it will get 'garbage collected' right? o/
dat-gitter
(matrixbot) `icarito` I thought dat preserved file history?
(matrixbot) `icarito` i.e. if I delete something from git it will linger in history, I assumed the same was true for dat?
(matrixbot) `icarito` normally that's desired except when adding files in error either realing secrets or bloating the repo
(matrixbot) `icarito` *revealing
karissa
the metadata lingers but not the content
so it's not slow like git
dat-gitter
(matrixbot) `icarito` I added `node_modules/` dir before putting it in `.datignore` and that increased my dat size significantly
(matrixbot) `icarito` but no worries it's not slow or humongous
(matrixbot) `icarito` :-)
(matrixbot) `icarito` thanks for DAT I love it !
karissa
woohoo.
pfrazee
@icarito in case you (or anybody else) is using beaker, beaker is sloppy right now and doesnt delete history. We decided to change that for 0.8
dat-gitter
(Redni) Thanks @joehand :) And yes, my mistake I wrote pears instead peers xD
mafintosh: so if your database was faster i would have never found this bug :)
mafintosh
ogd: thats another way to put it haha
ogd
mafintosh: ok i imported all the metadata into a hyperdb
mafintosh: im ready to fetch tarballs on demand now, i wanna do it through a REST API that you can hit that tells my server to download the tarball, put it into the dat, and return the GET call when the dat has the tarball you want, then you can fetch it by filename using hyperdrive
mafintosh
ogd: ya sounds good
use the hyperdrive js api
ogd
mafintosh: i can make a hyperdrive and a hyperdb on the same hypercore instance ok?
mafintosh
ogd: use a new hypercore but they can easily replicate together
just like how hyperdrive uses two cores
ogd: are you storing the package.json in hyperdb also? didn't see it in the gist
ogd
mafintosh: nope just versions
mafintosh
ogd: anyreason why?
ogd
mafintosh: just to minimize metadata overhead
mafintosh
ok
ogd
mafintosh: its 266M currently (just array of versions)
mafintosh
ogd: did i talk to you about protobuffing package.jsons or did i dream that?
ogd
mafintosh: sounds like something id say
ralphtheninja[m]
hehe
mafintosh
i was thinking that if we protobuf it + remove readme's etc it'd be pretty cool
cause then you can sync just the hyperdb and do any dependency resolution offlinne
ogd
mafintosh: do you need the whole package.json to do resolution?
mafintosh
ogd: just the dependencies/devDependencies/optionalDependencies etc
ogd
yea maybe ill add those
mafintosh
/module/version -> protobuf with those
ogd
oh yea
mafintosh
i'm hacking on iterators now
/module -> all-versions
or you could simply iterate /module/*
ralphtheninja[m]
mafintosh: could you see hyperdb as an abstract-leveldown compliant module?
mafintosh
(iteration will be slower)
ralphtheninja[m]: our iterators are a bit different
ralphtheninja[m]
nods
mafintosh
ralphtheninja[m]: moved
ogd: the version list can be easily compressed as an array of varints
one big array, each pair of 3 varints is the version