0:04 AM
andy has quit
0:09 AM
tg joined the channel
0:27 AM
Yrl has quit
0:40 AM
pfrazee joined the channel
0:41 AM
bgcarlisle joined the channel
1:44 AM
creationix
noffle: that sounds pretty easy using some of the libraries. I might make that.
1:50 AM
millette joined the channel
1:51 AM
mafintosh: is there a way to make a dat peer that doesn't store stuff locally?
1:51 AM
it's just a network proxy and fetches from peers on demand
1:52 AM
well, not full dat, it just needs hypercore and dat compatable discovery
1:55 AM
millette
1:56 AM
noffle
creationix: ideally I'd type 'drop-dat file1 file2 ...' and I'd get some http url on stdout
1:56 AM
re interface
1:57 AM
creationix
noffle: the http part will require someone to host a service (freemium business model or self host I'd guess)
1:57 AM
but I can open source the software at least :)
1:59 AM
noffle
if self hosting was a nice little one-liner cli that'd be great
1:59 AM
creationix
if you don't need to push updates to the fileset later, it makes bookeeping easy. Just throw away the private key after the files are added
1:59 AM
yeah, a node CLI host tool seems pretty trivial
1:59 AM
you'll need some way to auth with your self-hosted instance
1:59 AM
and configure it's public URL
2:01 AM
millette
2:06 AM
creationix
so my plan is to create a hyperdrive using memory or some temporary storage, adding the file(s) and then pushing to a server over websocket before letting it go
2:17 AM
tg has quit
3:05 AM
tg joined the channel
3:18 AM
noffle: state 1 done. Create a temporary dat and share with network `npm i -g drop-dat`
3:19 AM
so `drop-dat some-file.txt another-file.log` and copy-paste the url into beaker or dat clone somewhere
3:19 AM
step 2 is to make a hosting service with an API for adding DATs and integrate it with the CLI tool
3:20 AM
3:25 AM
noffle
3:25 AM
though I can't seem to get it working
3:25 AM
wow nice progress :)
3:26 AM
creationix
noffle: yeah, there is that existing gateway, but it doesn't always work
3:26 AM
noffle
npm install'ing..
3:27 AM
woah, async/await stuff? what version of node do I need? I'm on 6.9.5
3:27 AM
creationix
that's probably fine
3:27 AM
noffle
nah, it crashes
3:27 AM
creationix
let me know if there are issues and I can tame the JS a bit
3:27 AM
noffle
async function main (argv) {
3:27 AM
^^^^^^^^
3:28 AM
SyntaxError: Unexpected token function
3:28 AM
gbonneville joined the channel
3:28 AM
creationix
bleh, I'll test on 6.x since many people are still on that
3:28 AM
noffle
:(
3:48 AM
creationix
noffle: I published a new version using babel to compile down to node 6. syntax. Installing 6.x now to test
3:53 AM
noffle
creationix: excited about your hacking!
4:11 AM
creationix
so I think I'll make a second CLI tool where you pipe it a dat url and it converts it to an http url
4:20 AM
tg joined the channel
5:43 AM
noffle: still around?
5:52 AM
nevermind, it doesn't work over actual internet
5:52 AM
timeouts break stuff
6:08 AM
pfrazee has quit
6:09 AM
chjh joined the channel
6:22 AM
chjh has quit
7:37 AM
mafintosh
creationix: cool stuff!
7:40 AM
creationix: why do you read the first 32 bytes off the socket?
7:40 AM
if you use hypercore-protocol it'll emit feed with the discoveryKey
8:02 AM
vmx joined the channel
8:42 AM
chjh joined the channel
8:59 AM
chjh has quit
9:01 AM
chjh joined the channel
9:11 AM
chjh has quit
9:14 AM
obensource has quit
9:22 AM
chjh joined the channel
9:26 AM
chjh has quit
9:26 AM
chjh joined the channel
9:29 AM
chjh has quit
9:29 AM
chjh joined the channel
9:30 AM
obensource joined the channel
9:31 AM
cblgh
does dat's version history save the date of each version?
9:32 AM
currently thinking about dat wrt archiving websites, and if dat makes sense for that usecase
9:32 AM
i mean ipfs makes arguably more sense, but it's also a bit cumbersome and i just like dat more atm:~
10:02 AM
mafintosh
cblgh: only the unix metadata for each file. we can add a field for "user data" though. i have other use cases for it
10:05 AM
millette
cblgh, do you mean like dat://{hash}{[+version]}/{path} ? (version is 1, 2, 3, 4...)
10:05 AM
10:09 AM
mafintosh
dat cli should support that
10:10 AM
(i don't think it does atm, but i'm saying it should)
10:29 AM
cblgh
mafintosh: yeah i was just thinking that for that case it would be nice to know exactly when the website was scraped
10:29 AM
and thought of git commits and how they all have a datetime
10:33 AM
mafintosh
cblgh: we've been going back on fourth on how to do this actually
10:33 AM
cblgh: and the latest thinking was that it'd be nice if explicit snapshots were just files
10:34 AM
like: "Scraped yahoo.com" 2017/10/05 12:31 version=42
10:34 AM
in a file called .versions or something
10:35 AM
cblgh
mafintosh: yeah, i like that. seems similar to tagging release commits on github
10:35 AM
mafintosh
yea
10:35 AM
cblgh
also easy to interact with a simple file
10:36 AM
mafintosh
we were talking about having this file be a third hypercore feed in the dat as well
10:36 AM
but you can do it today by just using a simple flat file :)
10:41 AM
chjh has quit
10:45 AM
cblgh
i'll prolly do that
10:46 AM
a json file with a map of {link: <link>, last_scraped: <datetime>, version: <latest dat archive version for link>}
10:46 AM
anyone know of prior art for dat scrapers, yt to dat and the like?
10:47 AM
brb lunch
11:11 AM
mafintosh
cblgh: i have one for soundcloud
11:11 AM
but i just used ytdl hehe
11:11 AM
ogd is my go to scraper question person though
11:39 AM
cblgh
ohh yeah mafintosh i loved that one
11:41 AM
ralphtheninja[m] has left the channel
11:44 AM
dat-gitter
(e-e-e) hey mafintosh: have you had a chance to glance at those pr’s I opened on hyperdrive
11:47 AM
mafintosh
@e-e-e oh you are too fast for me haha, didn't realised you fixed all the issues!
11:47 AM
will take a look + merge after i give this talk
11:53 AM
G-Ray joined the channel
11:53 AM
dat-gitter
(e-e-e) cool. Thanks mafintosh:
11:53 AM
(e-e-e) are you giving a talk?
11:54 AM
G-Ray joined the channel
11:54 AM
mafintosh
ya
11:54 AM
in dublin
11:54 AM
about containers
11:56 AM
dat-gitter
(e-e-e) ah cool - hope you kill it!
11:56 AM
chjh joined the channel
11:56 AM
mafintosh
@e-e-e your prs look great
11:56 AM
chjh has quit
11:56 AM
chjh joined the channel
11:57 AM
11:57 AM
dat-gitter
(e-e-e) ahh - easy
11:57 AM
mafintosh
@e-e-e in the future it'd be really nice if we could pass a prefix to .download to only download a single folder / file
11:57 AM
just food for thought
11:57 AM
looking at your code that might be easy to add
11:58 AM
dat-gitter
(e-e-e) super easy i think
11:59 AM
mafintosh
12:01 PM
dat-gitter
(e-e-e) mafintosh: removed the .only - would be simple to add path option, but perhaps best as another pr, with its own tests.
12:01 PM
mafintosh
12:01 PM
@e-e-e if the / was an arg it would just work right?
12:01 PM
an arg that defaulted to /
12:02 PM
dat-gitter
(e-e-e) mafintosh: yeah - thats what I was thinking too.
12:02 PM
(e-e-e) recursion as default would not be an issue?
12:02 PM
mafintosh
@e-e-e nice, i'm just gonna merge the PR as is now and we can make another pr
12:03 PM
for that feature
12:04 PM
dat-gitter
(e-e-e) ah dont worry I am doing it right now
12:05 PM
mafintosh
12:05 PM
we don't emit errors else where, so just to stick to be pattern
12:05 PM
(non "critical" errors)
12:05 PM
critical meaning that drive is messed up beyond repair
12:05 PM
dat-gitter
(e-e-e) ah...
12:06 PM
(e-e-e) thanks so much
12:06 PM
(e-e-e) worderful comments
12:08 PM
mafintosh
ha
12:08 PM
thanks
12:12 PM
cblgh
mafintosh: haha hell ya
12:20 PM
dat-gitter
(e-e-e) mafintosh: also realised I had not added docs for the function - in the process I realised that callback was not optional too - so i made it optional.
12:21 PM
(e-e-e) now path can be passed to download specific files.
12:21 PM
(e-e-e) :)
12:21 PM
mafintosh
Sweeeet
12:21 PM
gbonneville has quit
12:28 PM
chjh has quit
12:30 PM
chjh joined the channel
12:35 PM
chjh has quit
12:36 PM
chjh joined the channel
12:36 PM
gbonneville joined the channel
12:50 PM
audy has quit
12:51 PM
creationix
mafintosh: good point about the protocol emitting the key. I wonder how I would do that though. I can't create an archive before I k ow the key and I can't speak the protocol without the archive instance to call replicate on right?