These are chat archives for vu3rdd/functorrent

25th
Jul 2015
Ramakrishnan Muthukrishnan
@vu3rdd
Jul 25 2015 01:26
@jaseemabid +1, go ahead and merge it.
I think I found the bug. I was writing at the offset of current piecelength piece number. It should have been previous piece length piecenumber.
oh. markdown. current piece length x piece number. it should have been previous piece length times piece number.
all these stuff would have to be thrown out when we do away with sequential piece download.
Ramakrishnan Muthukrishnan
@vu3rdd
Jul 25 2015 04:31
if any of you find yourself debugging the file download stuff, binary file comparison using the plain old 'cmp' program on Unix is very helpful.
there may be a lot of binary diff tools out there. But cmp does not need any installation and does the job quite well.
Jaseem Abid
@jaseemabid
Jul 25 2015 06:00
Even if you download randomly, cant you seek by an offset and write contents?
Ramakrishnan Muthukrishnan
@vu3rdd
Jul 25 2015 06:56
yes
current code does that.
In the Peer.hs in my fork: writeFileAtOffset
Out of need, I think we need UDP tracker protocol urgently. Very few trackers serve http since UDP trackers ar e a lot more efficient. Like around 50%.
Download is working fine now. I didn't download the entire file. Did up to the middle and it was as good as the ISO.
I mean, bit-to-bit same as ISO. Until some point. I didn't download the entire file. The peer I was downloading from, was quite slow today.
Ramakrishnan Muthukrishnan
@vu3rdd
Jul 25 2015 07:01
UDP efficiency is not a big thing for clients. But for trackers, it is a big deal.
Jaseem Abid
@jaseemabid
Jul 25 2015 07:43
I'm going to start with the book. Need to figure out the concurrency bits properly.
I am so ashamed of my code now, after looking at this wiki page.
Jaseem Abid
@jaseemabid
Jul 25 2015 11:59
We'll get there :)
Ramakrishnan Muthukrishnan
@vu3rdd
Jul 25 2015 16:10
Hope so. But whenever I see such code, my imposter syndrome comes out in fullest form.
I don't know if I will ever write such beautiful code. Such idioms never comes into my mind, perhaps because of prolonged exposure to imperative programming. Even my haskell looks like Scheme.
case in point: msgLoop.
Jaseem Abid
@jaseemabid
Jul 25 2015 17:18
Why do you have to get depressed once in a while ? :)
I went through first 4 chapters of the book from the concurrency section. Quite interesting.
Ramakrishnan Muthukrishnan
@vu3rdd
Jul 25 2015 17:20
Not depressed. Just that feeling that I am not graduating to the next level, no matter what I do.
I am writing the same old code. Not idiomatic at all.
class (Monad m) => MonadError e m | m -> e where ...
seeing this | m -> e thingie for the first time.
Jaseem Abid
@jaseemabid
Jul 25 2015 17:52
:P
There is always a newer nicer way to get things done. A few orders more in the case of Haskell.
I felt that I could write some decent python/js. Yet to get that feeling here.
The bot example is by Don Stewart. He is doing this professionally in both academia and industry since a very very long time. He probably started before I was born.
No hard feelings
This is awesome!