#dat

/

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