Bitcoin Forum
May 27, 2024, 01:01:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 ... 112 »
861  Other / Off-topic / Shortest path between 2 Wikipedia articles wins 1.453 BTC ($6) on: December 28, 2011, 04:28:44 PM
From:

http://en.wikipedia.org/wiki/Ultra_high_frequency

To:

http://en.wikipedia.org/wiki/Dromaeosaurus_minutus

Post your distances (but not solutions). After 20 posts, once the person with the shortest solution posts his distance, he wins. People have 1 day to post their solutions from the 20th post otherwise winner is the next person down.

Mine: took me 7 steps
862  Bitcoin / Bitcoin Discussion / Re: [eurobit] David Birch – Next Generation Money on: December 28, 2011, 03:44:52 PM
"if you think you're going to sell teh interwebz to the mass market because the general public wants a pseudonymous, distributed, relatively failsafe data transfer and publication protocol, I can proove to you, absolutely: they don't and you're completely wasting your time."

 Kiss

Is this a real quote? Who is this from?
863  Bitcoin / Wallet software / Re: libbitcoin on: December 28, 2011, 11:20:34 AM
I tell you what though, short of writing my own berkeley db wrapper there is no decent way to abstract this libary. Their 'C++ API' is essentially the same as their C one except you don't call DB->put(mydb, ...) but instead do mydb->put(...). Nice. Not sure why they bothered.
864  Bitcoin / Development & Technical Discussion / Re: [proposal] Overlay network protocol over Bitcoin on: December 28, 2011, 07:00:08 AM
The thing is not to get too caught up writing long proposals and documents. Think a little bit, code up an implementation, get rolling and refine your requirements as they become obvious. It's easier to ask for forgiveness than to ask for permission.
I disagree.  I think planning ahead always leads to better software even if the software development may be slower to start.  Better to find a problem in your proposal and rewrite that than to discover a problem in your code and redo a ton of work there IMO

Proposals are especially important when multiple people are working on a project as it makes it easier to work on different parts of the project at once.

You're advocating the ancient waterfall method which is basically out of fashion since the last decade.

Quote
genjix:~$ python
Python 2.7.2+ (default, Oct  4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.

If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
865  Bitcoin / Development & Technical Discussion / Re: [proposal] Overlay network protocol over Bitcoin on: December 28, 2011, 06:58:27 AM
The thing is not to get too caught up writing long proposals and documents. Think a little bit, code up an implementation, get rolling and refine your requirements as they become obvious. It's easier to ask for forgiveness than to ask for permission.
You have a fair point. But I'm extremely skeptical as to overall software architectural skills in the broad Bitcoin community. My absolute favorite is the inversion of control issue in Satoshi client exhibited by ThreadSafeAskFee(). Such a textbook case of an anti-pattern.

https://bitcointalk.org/index.php?topic=44330.msg538044#msg538044

The rationalization I heard why this "isn't a problem" or the workarounds proposed are quite enlightening and entertaining. Too bad that moderators deleted several flaming comments in that thread.



The bitcoin codebase is terrible architecturally.

You may be interested to review my codebase which is an asynchronous bitcoin toolkit library using proactors. Completion handlers using std::bind and std::function are passed to operations.

https://bitcointalk.org/index.php?topic=30646.0

Also a video on the design principles behind the API:

http://www.youtube.com/watch?v=zyKcSpx5xDg
866  Bitcoin / Wallet software / Re: libbitcoin on: December 28, 2011, 06:50:00 AM
The question here is not GPL or no GPL, the question is either:

AGPL or lesser AGPL.

I've been working with the Aaron Williamson of the SFLC and Richard Stallman of the FSF to fix a bug in the AGPL for bitcoin.

Then I will weigh up the various arguments for adding or not adding a lesser clause. It is whichever will promote development of the library the most. *GPL licenses mean you can either contribute sourcecode or $$$ to benefit the library (by buying proprietary licenses).

Right now as it stands, this library still needs to be completed so these arguments are a time waster Smiley

The bug I'm referring to is that the AGPL requires not only that you give the sourcecode on demand, but that you're proactive in providing the sourcecode visibly. This is problematic because if you make a small modification while developing or building on a compilation based system (like gentoo) then the act of connecting to the p2p network means you have to provide source. There is no means to do this in the bitcoin sourcecode and the idea itself is problematic; every build must store the sourcecode in a bundle which is served using custom bitcoin protocol extensions.

From my understanding, modifying the AGPL for them is complicated and so far the last proposal was:

Quote
> If the covered work has no means of communicating an offer to                                                                                                          
> provide Corresponding Source to the users interacting with it                                                                                                          
> remotely over a computer network, then you may comply with this                                                                                                        
> requirement by making the Corresponding Source for your version                                                                                                        
> available for anyone to copy, free of charge and under the terms of                                                                                                    
> this License, through a publicly available network server or other                                                                                                    
> readily accessible means.

This means that you are able to provide the source code through some other means (such as sending it via email if requested) and it solves the issue.

------

In an ideal world, copyrights, patents, trademarks and censorship wouldn't exist. Proprietary software would not be able to support itself against rampant piracy. And I would put my sourcecode out in the open for anyone to use as they like.

However, we don't live in that ideal world. And I will use what little power I have in the form of the GPL to fight this asymmetric warfare. The balance is totally tilted away from our favour, so why wouldn't you use the only protection afforded to you as a developer.

Licenses like the GPL hack the law, twisting it to our will. It is the best example of subversion.

When people talk about GPL or MIT licenses being free, they're talking about different kinds of freedom as they're essentially rivalrous freedoms. Being free does not always mean no rules necessarily:
Quote
According to Assange, "It’s not correct to put me in any one philosophical or economic camp, because I’ve learned from many. But one is American libertarianism, market libertarianism. So as far as markets are concerned I’m a libertarian, but I have enough expertise in politics and history to understand that a free market ends up as monopoly unless you force them to be free."

And this coming from a person with anarchist tendencies.
867  Bitcoin / Bitcoin Discussion / [eurobit] David Birch – Next Generation Money on: December 28, 2011, 04:40:24 AM
http://bitcoinmedia.com/eurobit-david-birch-next-generation-money/

I personally liked David Birch's talk and feel it added a lot- if not for understanding what the conventional wisdom is. He made us challenge and confront our beliefs, and doing so can only make you more confident of success if you are right.

An interesting talk.
868  Bitcoin / Development & Technical Discussion / Re: [proposal] Overlay network protocol over Bitcoin on: December 28, 2011, 03:10:46 AM
The thing is not to get too caught up writing long proposals and documents. Think a little bit, code up an implementation, get rolling and refine your requirements as they become obvious. It's easier to ask for forgiveness than to ask for permission.
869  Bitcoin / Project Development / Re: [contest] 2 BTC for suggesting a name of an overlay network on top of Bitcoin on: December 28, 2011, 12:19:34 AM
While you know my suggestions:

Electrite (my favourite)

and

Electrolyte
870  Bitcoin / Wallet software / Re: libbitcoin on: December 27, 2011, 07:05:04 AM
Yes. It isn't a requirement to be compliant with the protocol, but it is a little extra added security which is nice.
871  Bitcoin / Wallet software / Re: libbitcoin on: December 27, 2011, 03:51:42 AM
That was yes AND no, both to the second question, right?

No :p There are checkpoints in bitcoin as an added security measure. If they didn't exist then there would be no limits to reverse the chain. However it isn't a concern. The longest re-organisation ever was 6 blocks deep.
872  Other / Off-topic / Re: Answer the question above with a question. on: December 27, 2011, 03:11:04 AM
Why don't we start a quote pyramid?

Why should we?

Ok, but am I first or is ineededausername first?

Can someone ask dayfall to define first?
873  Bitcoin / Development & Technical Discussion / Re: More info than just "bitcoind getconnectioncount" on: December 27, 2011, 03:05:28 AM
Wouldn't work without modifying the protocol and sourcecode.
874  Bitcoin / Wallet software / Re: libbitcoin on: December 26, 2011, 10:46:41 PM
Is there any length after which a blockchain is 'permanent' in your code? Is it technically possible for a reorg after ten or one hundred blocks since the orphan-root?

Yes, theoretically.

No, practically, because of the checkpoints in the block validation code.
875  Bitcoin / Bitcoin Discussion / Re: Dont miss the Christmas Special! December 25th on BitTalk.TV! on: December 26, 2011, 09:41:01 AM
Weeeeeeeeeeeeeeee camping out here
876  Bitcoin / Bitcoin Discussion / Re: What do you want in a new Bitcoin Exchange? on: December 25, 2011, 09:45:21 PM
No offense, but if you're asking what is needed in a new exchange then you probably shouldn't be in this already saturated market. It should be blindingly obvious.
877  Bitcoin / Wallet software / Re: libbitcoin on: December 25, 2011, 08:29:00 PM
Max of 80 characters. 4 space indents.

Variables, functions, class-names, enums, typedefs are lowercase. Macros are uppercase. Private class member variables are suffixed with an _

Each line should be indented by either 1 or 2 levels on the next line, and 1 line for each successive indent.

If you're going more than 3 levels deep with each new line of code, then generally you are doing something wrong and code should be siphoned off into functions. Always prefer: flat over nested, dumb over clever, slow+clear over fast+obtuse.

Functions should never be defined in headers. Always in the implementation unless it's required to be in every translation unit (i.e template or constexpr functions).

Format for header file:
Code:
#ifndef LIBBITCOIN_FOO_H
#define LIBBITCOIN_FOO_H

// derived from project includes (i.e blaa.hpp)

// system includes:
// STD headers first
// boost headers second
// other headers last

// project bitcoin includes like <bitcoin/messages.hpp>

// local bitcoin includes "helper_foo.hpp"

// forward declarations
// class Db;

namespace libbitcoin {

// using ...

// typedefs

class foo
 : public blaa
{
public:
  // typedefs

  // functions logically grouped into blocks

  // variables

private:
  // same as for public block
};

} // libbitcoin

#endif


Format for cpp file:
Code:
#include <bitcoin/foo.hpp>

// same format as header files

namespace libbitcon {

foo::foo()
 : blaa(xyz)
{
}

} // libbitcoin


Every { occupies a newline except for namespaces.

Spaces between all operators: x = 5 * 8 + 4 * 2 ... If the order is confusing then use brackets: x = (5 * Cool + (4 * 2). Each : ; (in for loops) or , has a space after them.

All flow control should always happen on new lines.
Code:
// Bad
if (blaa) do_foo();

// Good
if (blaa)
    do_foo();

// Bad
something(); another_thing(); yadayada();

// Good
something();
another_thing();
yadayada();

It's nice if function names read like a sentence when used: write_to_stream(data_packet); or say_hello_to(my_friend);

Accepted short-hands

These are for variables and not for type names which should never use abbreviations.

tx = transaction

blk = block

ec = error_code

it = iterator
878  Bitcoin / Wallet software / Re: libbitcoin on: December 25, 2011, 08:09:58 PM
A document describing the functioning of the organize algorithm.

New blocks when they first come in are added to the orphans pool. The
pool does not order the blocks. To trace a chain of blocks from an endpoint
you have to keep looking up the previous block as you go backwards.



Assuming we have a valid genesis block, then this pool would produce
2 chains like this:



We loop through every block in the orphan's pool, setting each block to
processed each loop. This stops us re-processing a block when a new block is
added again to the pool, re-triggering the organize algorithm.

The blockchain is only ever stored as one main chain. In the blockchain
database is only stored the currently accepted history. Blocks added to the
blockchain are taken out of the orphan's pool, and returned back to the pool
when removed from the blockchain.

If we have the chain:

Code:
0 -> 1 -> 2a -> 3a

Then the remaining blocks in the orphan pool are 2b, 3b, 4b. Block 4b comes
into the pool and will trigger a re-organize. When we run the organize
algorithm, we find out that the chain 2b, 3b, 4b has greater difficulty.

  • Trace backwards through the pool until we cannot cycle backwards anymore. We call this the orphan-root.
  • Organize will first find the fork point within the blockchain to be at block 1 using the orphan-root's previous block hash.
  • The difficulty in the remaining blocks of the main chain and the chain in the orphan pool are calculated. If the main chain algorithm's difficulty is bigger than the orphan's, then the algorithm stops and the main chain is untouched.
  • The new blocks in the orphan pool will replace the ones in the main chain. The end blocks from the main chain are popped off and returned back to the orphan pool. The blocks from the orphan pool are added to the main chain as the new chain.
  • Reorganization has finished.

Code:
0 -> 1 -> 2b -> 3b -> 4b
879  Bitcoin / Wallet software / Re: libbitcoin on: December 25, 2011, 08:09:13 PM
We'll see about the license afterwards. It's always easier to switch to weaker copyleft than vice versa. For now I want to build.

Post about new organize algorithm below.
880  Bitcoin / Bitcoin Discussion / Re: Real names on: December 25, 2011, 12:44:34 PM
Should I do this?

I changed my name on IRC briefly to AmirTaaki and it just felt awkward and strange. I've been using genjix over 10 years now, and the name is a part of my identity. It has a rich history which I don't quite want to give up now. Like a warm blanket wrapped around me.

I don't mind my real name either. It's interesting and different. But genjix also means a lot to me as a faceless identity I grew as a person with. I kind of like to be anonymous sometimes. I will occasionally change my name on IRC and pretend not to be me or obfuscate my identity to new people. I spend a lot of time on 4chan. It has a nice concept where it is more important what you say, rather than what you do.

If there is a reason for me to switch though, then I will. It isn't a huge deal.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 ... 112 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!