15:10 PM
mafintosh
creationix: also, VERY COOL
15:11 PM
creationix
15:11 PM
mafintosh
yea
15:11 PM
but its a bit thin on technical details
15:11 PM
creationix
also should I target current dat or the new HAMT based stuff?
15:12 PM
mafintosh
target current dat
15:12 PM
i'd get the hypercore layer working solidly first if i was you
15:12 PM
thats all the "hard" stuff
15:12 PM
yoshuawuyts
creationix: luvit, would that be in C or lua?
15:12 PM
creationix
both
15:12 PM
C for when needed
15:12 PM
lua for most stuff
15:12 PM
luajit is crazy fast for this kind of stuff when done right
15:12 PM
mafintosh
if you have protobuf, varints, flat-tree working you're quite far
15:13 PM
creationix
and it has built-in ffi as part of the jit
15:13 PM
yoshuawuyts
creationix: that's v cool
15:13 PM
creationix
I'm not a fan of protobuf :/
15:13 PM
but as long as your structure is stable, I can just write a manual codec
15:14 PM
mafintosh: do you use protobuf anywhere besides the hyperdrive entries?
15:14 PM
maybe in the hypercore signatures or something?
15:15 PM
mafintosh
creationix: only for hyperdrives entries and in the wire protocol
15:15 PM
nothing advances
15:15 PM
you can easily handroll the codec
15:15 PM
nothing crazy haha
15:16 PM
creationix
awesome. I just don't want to add protobuf as a dependency, it seems too heavy
15:16 PM
I wonder if I should use libsodium instead of tweetnacl and blake2 reference
15:17 PM
mafintosh
thats what i would do
15:17 PM
creationix
15:17 PM
mafintosh
we use xsalsa20 from libsodium as well
15:17 PM
creationix
I think that is in tweetnacl. The only thing I've found missing so far are blake2 and siphash24
15:18 PM
I'll see how small libsodium is though, it's not huge like openssl at least
15:18 PM
mafintosh
the shared lib is ~800kb
15:18 PM
creationix
hmm, larger than I would like
15:18 PM
does it allow TLS server and client though?
15:18 PM
because then I could drop openssl and/or mbedtls
15:19 PM
mafintosh
nope
15:19 PM
but its contains really fast impls of the methods though
15:19 PM
creationix: sorry, 400kb
15:19 PM
was looking at the wrong file
15:19 PM
creationix
ahh, much better
15:20 PM
My goal is to keep the binary part under 2Mb if possible
15:20 PM
luvi core is about 1Mb (luajit + libuv + zip asset loading)
15:20 PM
mafintosh
libsodium is the only larger thing you'll need
15:20 PM
creationix
libutp seems tiny
15:21 PM
I might not even need C for the DHT stuff. I assume I can do that logic on top of udp and utp primitives
15:21 PM
same for dns
15:21 PM
and mdns
15:21 PM
mafintosh
yea utp is tiny
15:21 PM
creationix
tls is always the hard part when designing these things
15:21 PM
mafintosh
the dht client is tiny as well
15:22 PM
what do you need tls for?
15:22 PM
creationix
https
15:22 PM
mafintosh
i mean, what do you need https for?
15:22 PM
creationix
I want https gateways like dathttps
15:22 PM
mafintosh
ah got it
15:22 PM
creationix
also need https client to make lets-encrypt calls
15:22 PM
and wss for browsers
15:22 PM
mafintosh
15:22 PM
creationix
though I might end up needing something to speak webrtc datachannel
15:22 PM
bedeho has quit
15:23 PM
mafintosh: yeah, that was awesome.
15:23 PM
that will help make the node/browser versions trimmer
15:24 PM
mafintosh
yea no deps needed now
15:24 PM
yoshuawuyts
creationix: if you find a good way to do webrtc datachannel it'd be heaps cool; think the best people are doing in Node now is shelling out to Electron 😱
15:24 PM
e.g. nobody can get the chromium source to compile well enough standalone haha
15:24 PM
jhand joined the channel
15:25 PM
creationix
yep, I've looked at it before, it's not super easy
15:25 PM
mafintosh
there is some c libs now
15:25 PM
but i'm not sure how tested they are
15:25 PM
creationix
easiest probably is start with the spec and build it from scratch using existing C libraries for the primitives
15:25 PM
DTLS, SCTP, etc.
15:25 PM
or test one of the new C libraries you mention and improve it
15:26 PM
mafintosh
yea
15:26 PM
creationix
it's not as clean as utp, but browsers can speak it!
15:26 PM
G-Ray_________ is now known as G-Ray
15:27 PM
yoshuawuyts: my idea for a hack was headless chrome speaking websocket to a local node process
15:27 PM
similar to the electron method
15:28 PM
but headless chrome is too heavy for our hardware I'm sure
15:28 PM
15:29 PM
unfortunately, without the Topaz Network Switch and 2x GbE Ethernet LAN ports :(
15:29 PM
I'm trying to get them added into the next design so we can sit in place of the router and not worry about NAT issues
15:33 PM
mafintosh
you need nat hole punching on your hardware?
15:33 PM
ie. you cannot just use websockets?
15:40 PM
creationix: dat://b31d07a6e90709759f200cc9a233085904480dec4415258cc0deac2064cba71c/dat-implementation-guide.md (wip)
15:41 PM
creationix
mafintosh: thanks!
15:41 PM
mafintosh
nothing much there yet, but i'll try to fill out more and more blanks
15:41 PM
creationix
still resolving though...
15:42 PM
so the current design is a device that connects to people's existing routers inside their lan
15:42 PM
it's hard to expose that as websocket to the public internet
15:42 PM
but holepunching techniques get around that for most cases
15:43 PM
but if we were directly connected to the modem, then we could just listen on port 443 and do websockets that way
15:43 PM
asking customers to do manual port forwarding is probably too much. We're going for non-technical users
15:43 PM
upnp is disabled by default on most devices because of security concerns
15:44 PM
holepunching only works in browsers if it's webrtc data channel
15:45 PM
mafintosh: weird, CLI dat found 5 peers, but beaker couldn't find any
15:46 PM
mafintosh
creationix: using a newer beaker?
15:46 PM
creationix
yep
15:46 PM
v0.7.3 OSX build
15:47 PM
creationix finally got an old macbook for OSX testing
15:48 PM
hmm, I think my beaker is just broken, I can't go to any dat urls
15:48 PM
@pfrazee ^
15:49 PM
pfrazee
creationix: example url?
15:49 PM
creationix
it can only find peers on my lan
15:49 PM
pfrazee
nothing on hashbase works?
15:49 PM
creationix
pfrazee: havn't tried hashbase yet
15:49 PM
pfrazee
creationix: try dat://todo2-summit.hashbase.io/
15:50 PM
creationix
15:50 PM
they do work if I manually clone using CLI and then sync. It can find 1 peer then (my local one)
15:50 PM
pfrazee
neither of those work?
15:50 PM
what version of OSX?
15:51 PM
creationix
the hashbase one doesn't work either
15:51 PM
pfrazee
creationix: what macOS version?
15:51 PM
creationix
OSX 10.12.5 (maxOS Sierra)
15:51 PM
pretty old hardware fwiw
15:51 PM
MBP 15 Mid 2012
15:51 PM
ebay special :)
15:51 PM
pfrazee
heh nice. I dont *think* that'd make a diff
15:52 PM
creationix
well maybe the network hardware has issues with udp or something
15:52 PM
you never know ;)
15:52 PM
pfrazee
my first thought is that utp-native is failing again, but if you cant load things off of hashbase then tcp is failing too
15:52 PM
creationix
I just figured official beaker build on latest OSX would be the most tested combination
15:52 PM
pfrazee
it is
15:52 PM
creationix
let me try on my linux box to see if it's a network thing
15:52 PM
pfrazee
15:53 PM
creationix
firewall is off
15:53 PM
pfrazee
ok
15:53 PM
creationix: try opening the app from the CLI and see if there's any errors
15:54 PM
open /Applications/Beaker\ Browser.app/
15:54 PM
oh no that's wrong, 1 sec
15:54 PM
creationix
yeah, no stdout that way
15:55 PM
pfrazee
looking for how to get it...
15:55 PM
creationix
` /Applications/Beaker\ Browser.app/Contents/MacOS/Beaker\ Browser`
15:56 PM
pfrazee
I tried that
15:56 PM
you get stdout?
15:56 PM
creationix
hmm, not much, just:
15:56 PM
2017-06-28 10:56:07.865 Beaker Browser Helper[6396:95459] Couldn't set selectedTextBackgroundColor from default ()
15:57 PM
mafintosh
pfrazee: btw, we fixed the old osx issue if you reinstall
15:57 PM
pfrazee
mafintosh: did you have it auto-fallback to webasm?
15:58 PM
mafintosh
pfrazee: yup
15:58 PM
pfrazee
mafintosh: nice
16:03 PM
bedeho joined the channel
16:03 PM
creationix: I cant figure out where the logs are going
16:04 PM
creationix
hmm, I'm getting similar timeouts on linux
16:04 PM
and the `npm start` logs are pretty quiet
16:04 PM
pfrazee
creationix: you build linux off master?
16:04 PM
creationix
yes, but the last commit was the 0.7.3 release
16:05 PM
43137...
16:05 PM
pfrazee
creationix: yeah. do this real quick: `rm package-lock.json; rm app/package-lock.json; npm run burnthemall`
16:05 PM
creationix
ok
16:05 PM
pfrazee
creationix: then try linux again and lmk if it's still off