Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2016-03-04

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
02:11 Big_G joined #darcs
02:12 Riastradh joined #darcs
02:47 ilbot3 joined #darcs
02:47 Topic for #darcs is now http://darcs.net/ | logs: http://irclog.perlgeek.de/darcs/ | darcs 2.10.3 is out http://darcs.net/Releases/2.10
03:21 mizu_no_oto joined #darcs
04:28 burp joined #darcs
04:32 byorgey joined #darcs
06:05 alexei joined #darcs
08:52 fr33domlover joined #darcs
08:52 fr33domlover hello
08:53 fr33domlover hey sm! i didn't look very deep into the ssh package's internals (and I don't know much about SSH internals... yet), but - do you think the ssh package could use 'tls' instead of 'HsOpenSSL' ?
08:54 fr33domlover i'm going to use 'ssh' for a repo hosting web app I'm writing so i may have some patches for it, and this could be one
08:54 fr33domlover or perhaps I should ask Heffalump
09:24 inhortte joined #darcs
11:38 maerwald joined #darcs
12:20 mizu_no_oto joined #darcs
13:47 Wu joined #darcs
14:18 Riastradh joined #darcs
14:35 sm hey fr33domlover! Yes ask Heffalump
14:35 sm patches would be great
14:50 sm hey all.. do you remember the name of that tool that was used a few years back to make a portable darcs binary that ran on any unix system ?
15:05 Big_G joined #darcs
16:01 sm (Ermine, it was)
16:39 Heffalump fr33domlover: no objections in general, what are the advantages/disadvantages?
16:39 Heffalump ok, native Haskell implementation could save quite a bit of hassle
17:18 fr33domlover Heffalump, I'll try to find some time then to give it a try (not sure 'tls' offers all the things 'ssh' needs from 'HsOpenSSL'). I'd also like to add some docs, because I'm using Darcsden's code to guide me through using the 'ssh' package
17:19 fr33domlover Stackage says Darcsden is the only user of the 'ssh' package, sad.. but my package will be another one soon :)
17:23 fr33domlover joined #darcs
17:34 sm fr33domlover: you might fix http://hub.darcs.net/ganesh/ssh/issue/3 as a result
17:40 fr33domlover sm, i'll look into it. once i get my ssh code working, such errors will probably annoy me a lot and will motivate me to attack the bugs :)
17:57 pointfree joined #darcs
18:13 alexei joined #darcs
18:13 pointfree Also, http://hub.darcs.net/ganesh/ssh/issue/5
18:13 pointfree I believe I've figured out the crypto side of it, but I or someone just needs to figure out the random number generator and ByteString vs Integer typing stuff (Crypto.Curve25519 expects ByteStrings and ganesh/ssh expects Integers).
18:13 pointfree I'm more of a firmware developer than a Haskell programmer hahas...
18:30 fr33domlover we'll get there :-)
18:33 fr33domlover Heffalump, 'ssh' question: Suppose I want my SSH server to access a database, or I want to do some logging, and use monadic approaches (e.g. monad-logger for logging or use a ReaderT to hold a DB connection pool). What if 'ssh' used mtl instead of transformers, or transformers + custom newtype based abstraction, so I could easily add these in my code? Right now Channel and Session are just StateT so the only
18:33 fr33domlover way is probably some hack like mmorph which strips the monad stack?
18:34 fr33domlover or just support a custom field in the StateT
19:09 Riastradh joined #darcs
19:39 castlelore joined #darcs
19:54 castlelore joined #darcs
20:36 Heffalump pointfree: if you have some unfinished code I can take a look at the Haskell-ish aspects
20:37 Heffalump fr33domlover: maybe I'm misremembering, but I thought transformers and mtl were compatible?
20:45 Heffalump It probably does make sense to hide the StateT behind a newtype in any case, so it doesn't interfere with anthing else
20:46 castlelore joined #darcs
21:01 pointfree Heffalump: http://hub.darcs.net/pointfree/ssh-curve25519-sha256/patch/64410527c840bddbd1acdef4d17654874f34e544
21:07 fr33domlover Heffalump, using mtl or other typeclass based solution is more general than using transformers alone. I'll just make my changes in a fork and then we'll see :)
21:18 fr33domlover can I fork a darcsden repo without the web UI?
21:18 fr33domlover i forgot my password :P
21:23 sm fr33domlover: yes, you can use the ssh "init" command to make an empty one and push. You can also get a pw reminder from the web
21:29 fr33domlover sm, if I make a repo named, say "darcsden", is it automatically considered a fork of yours?
21:29 fr33domlover or do I have to use the Fork button in the web UI?
21:30 Heffalump fr33domlover: oh, I see, you'd rather use MonadState constraints than the specific StateT, right.
21:30 fr33domlover Heffalump, yeah, that's exactly what I meant :P but i agree the StateT should be hidden in a newtype
21:30 Heffalump fr33domlover: you have to use 'Fork' in the web UI, but I think you can edit the parent afterwards
21:30 Heffalump if you don't, that is
21:31 Heffalump fr33domlover: hiding it in a newtype won't actually help if you really need the typeclass, right?
21:32 fr33domlover Heffalump, it will help just in the sense that you can change the monad in the ssh package (e.g. you want to add ReaderT on top) and nothing in the API will change etc.
21:32 Heffalump fr33domlover: agreed. But won't help you work with some more complicated monad.
21:32 fr33domlover yeah, agreed
21:33 Heffalump fr33domlover: I could also make SessionT = StateT SessionState, and then make all the signatures be MonadIO m => ... SessionT m a
21:33 Heffalump (where SessionT is a newtype to get proper abstraction, but that's orthogonal to switching to MonadIO)
21:40 Heffalump pointfree: so the wire format for the thing being passed to importPublic is actually an Integer?
21:42 Heffalump reading the docs for CV.importPublic, it expects a ByteString that's exactly 32 bytes long
21:42 Heffalump and readInteger reads a length, then that many bytes. So is the right thing to read a length, assert that it's 32, then read 32 bytes?
21:49 Heffalump pointfree: also, there's some error cases, e.g. importPublic might return Nothing, generatePrivate might return Left GenError
21:49 Heffalump do you just want to fail immediately in those cases?
21:51 pointfree Yeah, I wasn't sure how to go from an Integer to a ByteString... as for the error cases, yes, I would think it should just fail for now.
21:52 Heffalump what is the wire format for the Integer? Is it definitely a count of bytes followed by the bytes?
21:52 Heffalump because otherwise readInteger isn't right anyway
21:54 sm fr33domlover: no it's not automatic (alas), you have to use the fork button
21:58 Heffalump pointfree: also, 'digest' takes an Integer again, but 'e' is a PublicKey
21:58 Heffalump should we be using exportPublic somewhere before calling digest?
21:59 Heffalump and digest is then using 'integer' for the wire format, is that right?
21:59 pointfree Heffalump: According to http://hub.darcs.net/pointfree/ssh-curve25519-sha256/browse/src/SSH/NetReader.hs#27 it is a len followed by bytes.
21:59 Heffalump pointfree: right, that's what readInteger/integer do. But is that right for the wire format?
22:00 Heffalump oh, I see, you are just changing the existing code
22:00 Heffalump which already did that
22:02 Heffalump sorry, I don't really remember much of the details of this stuff. Is the general idea that the wire format is exactly the same for the different key exchange procedures, but the way to actually work with them changes?
22:04 pointfree I believe so, I just replaced DH with Curve25519 and replaced SHA1 with SHA256.
22:08 pointfree https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt
22:11 pointfree Still 32 byte keys.
22:11 Heffalump pointfree: http://hub.darcs.net/pointfree/ssh-curve25519-sha256/bundle/1
22:12 Heffalump I've fixed all the compile errors, but very hackily. See if you can now make it actually work :-)
22:12 Heffalump then we can discuss cleaning up the whole lot of code
22:44 fr33domlover hey Heffalump, i don't have access right now to make a fork, but i verified that 'ssh' builds with RSA 2.2 (which i need because that's the RSA version in LTS 5)
22:45 fr33domlover i'll make a record later unless you want to do it yourself (going to run the tests too now)
22:49 Heffalump go for it
22:53 fr33domlover ok cool
22:54 fr33domlover records will come in a few days
23:35 Heffalump is the 'branches' link on darcshub misbehaving? It's very slow/timing out for me.

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary