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]

-- a/hellnet/protocols/HTTP++ b/hellnet/protocols/HTTP
@@ -4,6 +4,6 @@

h2. Query types

|_. Query |_. Path |_. Static/dynamic |_. Description |
| GET | /chunks/([0-9a-f]+) | static | Chunk with hash $1 |

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

-- a/hellnet/tech/recursive-filelinks++ b/hellnet/tech/recursive-filelinks
@@ -2,7 +2,7 @@

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 256 kbytes

File: nopython [Diff]

-- a/nopython++ b/nopython
@@ -14,6 +14,21 @@

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 ?! 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 15:02:15 +0000