Diff: [root] @ c7b1fa61a33 | faq | css

Merge branch 'master' of bitcheese.net:/var/gits/bwiki

Merged: <a href="/diff/6e20ae4e189ce0059e7088173dc64e88a2979eff">6e20ae4e189ce0059e7088173dc64e88a2979eff</a> <a href="/diff/379121ac95888d679e1581a1d47de2aed914d680">379121ac95888d679e1581a1d47de2aed914d680</a>

File: hellnet/protocols/HTTP [Diff]

diff --git a/hellnet/protocols/HTTP b/hellnet/protocols/HTTP
index c756d8c..cae7fee 100644
-- a/hellnet/protocols/HTTP
++ b/hellnet/protocols/HTTP
@@ -4,5 +4,5 @@ Peers are passing queries via HTTP queries (like GET /chunks/0a/04588fab48f or P

h2. Query types

\ No newline at end of file
|_. Query |_. Path |_. Static/dynamic |_. Description |
| GET | /chunks/([0-9a-f]+) | static | Chunk with hash $1 |
\ No newline at end of file
\ No newline at end of file

File: hellnet/tech/recursive-filelinks [Diff]

diff --git a/hellnet/tech/recursive-filelinks b/hellnet/tech/recursive-filelinks
index 0d07768..2b6bd3f 100644
-- a/hellnet/tech/recursive-filelinks
++ b/hellnet/tech/recursive-filelinks
@@ -2,6 +2,6 @@ h1. Extent-based filelinks

Filelink is a list of hashes of chunks of file. As Hellnet has limited chunk size[1] and filelinks have to be files too, and we can't use filelinks on filelinks, Hellnet has extent-based filelinks.

If chunk size is 64, 256, we can fit 1024 4096 hashes in it. That's 1.07 Gb of data. If file needs more than 1023 4095 hashes to describe it, we make another filelink chunk, fill it with the rest and append hash of that chunk to first one. Can be recursively repeated.

fn1. Currently 64 kbytes

\ No newline at end of file
fn1. Currently 256 kbytes
\ No newline at end of file

File: nopython [Diff]

diff --git a/nopython b/nopython
index d4d5528..8638d23 100644
-- a/nopython
++ b/nopython
@@ -14,6 +14,21 @@ h1. Python brokenness from developer's point of view.

h2. Python's broken syntax

h3. Learning Python

Ok, let's start with tutorial, the 'official' one. It says:

bq. The interpreter acts as a simple calculator: you can type an expression at it and it will write the value

That's wrong; @python@ can't be used as a simple calculator. Let's prove it:

bc. >>> 2.3 - 3.4
-1.1000000000000001

-1.1000000000000001 ?! It's just -1.1, the others are FPU intimate problems and shouldn't trouble the user. Imagine you come to shop and seller, whose cash machine's software is in python, gives you .00000000001 cent as change. That's not a simple calculator.

You can work around the problem by using @print 2.3 - 3.4@ instead. But that's definetely not simple.

h3. Indentation

Indenting code properly is good. But why make it part of syntax? To understand codemonkeys' code? They can write in one line anyway, and while you can convert this to proper indentation, you cannot do that vice-versa if indentation is wrong, and compiler wouldn't even complain.

By Alexander Markov on 2009-06-01 19:02:15 +0400 Powered by bitcheese wiki engine