Author Topic: How to learn the bitshares_toolkit framework quickly for a newbie?  (Read 2794 times)

0 Members and 1 Guest are viewing this topic.

Offline bytemaster

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #15 on: April 18, 2014, 04:26:46 pm »
It accelerates compile times as well because it removes need to include headers in your headers that is only required for private data. 


Sent from my iPhone using Tapatalk
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #16 on: April 18, 2014, 04:28:34 pm »
Asset is an amount plus unit. 

Precision problems have been resolved by changing verification algo.


Sent from my iPhone using Tapatalk
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline vikram

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #17 on: April 22, 2014, 03:57:49 am »
What do the FC_REFLECT* macros enable you to do in the rest of the fc library?

Offline bytemaster

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #18 on: April 22, 2014, 11:57:29 am »
Serialized to json and binary, works with exception and logging infrastructure.

Eventually scripting language hooks etc. 


Sent from my iPhone using Tapatalk
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline vikram

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #19 on: April 22, 2014, 10:30:28 pm »
How do you envision the codebase being organized to enable easily developing and maintaining multiple DACs per family? Specifically, I am considering whether it is feasible and desirable to separate BTS/DNS/P2P specific code into a BTS::DNS::P2P namespace which overrides the relevant stubs in BTS::DNS (additional DNS family members would then follow the same pattern).

Offline bytemaster

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #20 on: April 22, 2014, 10:54:50 pm »
How do you envision the codebase being organized to enable easily developing and maintaining multiple DACs per family? Specifically, I am considering whether it is feasible and desirable to separate BTS/DNS/P2P specific code into a BTS::DNS::P2P namespace which overrides the relevant stubs in BTS::DNS (additional DNS family members would then follow the same pattern).

The difference between P2P and .dac etc should be config-file based and not code based. 

The only time I would derive from DNS is if I was going to change the rules from the base DNS system.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #21 on: April 22, 2014, 11:03:33 pm »
But all non .p2p blockchains will have different rulesets (at least the ones we make)

Sent from my SCH-I535 using Tapatalk

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline bytemaster

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #22 on: April 23, 2014, 12:23:22 am »
But all non .p2p blockchains will have different rulesets (at least the ones we make)

Sent from my SCH-I535 using Tapatalk

Not true.   You could have many different namespaces each with the same rules.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #23 on: April 23, 2014, 12:35:02 am »
You *could* but that would be ignoring the philosophy we endorsed after the discussion about the role of TLDs we had in the DNS section. Even if there are multiple TLDs with the same rules vikram's question still has merit because we specifically want to have other blockchains with other rulesets.
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline crazybit

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #24 on: May 10, 2014, 03:48:19 am »
Obviously,FC is the fundamental library of bitshare toolkit.  i would like to have an in-depth study, but do not know how/where to start, is there any documentation i can refer to? attached below are some of my questions, appreciated if anyone help to clarify.

1) there is some following code under the data object,what is the purpose? how it work?and when such code will be executed?
Code: [Select]
FC_REFLECT(..)
2)there are many multiple thread program like below in bitshare toolkit, i  don't quit understand how it work.

Code: [Select]
my->....complete = fc::async( [=](){ my->process..(); } );
3)Serialization is also frequently used in the toolkit,what data format are the following functions convert to? and where are the data saved after the serialization?any difference of the data format between the following serialization functions

Code: [Select]
fc::raw::pack( ...); 

pub.serialize();
« Last Edit: May 10, 2014, 03:56:06 am by CrazyBit »

Offline vikram

Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #25 on: May 10, 2014, 06:52:10 pm »
Until Dan chimes in, there is some sparse documentation at: http://bitshares.org/documentation/namespacefc.html

Offline Count of La Mancha

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: How to learn the bitshares_toolkit framework quickly for a newbie?
« Reply #26 on: May 10, 2014, 07:34:49 pm »
Obviously,FC is the fundamental library of bitshare toolkit.  i would like to have an in-depth study, but do not know how/where to start, is there any documentation i can refer to? attached below are some of my questions, appreciated if anyone help to clarify.

1) there is some following code under the data object,what is the purpose? how it work?and when such code will be executed?
Code: [Select]
FC_REFLECT(..)
2)there are many multiple thread program like below in bitshare toolkit, i  don't quit understand how it work.

Code: [Select]
my->....complete = fc::async( [=](){ my->process..(); } );
3)Serialization is also frequently used in the toolkit,what data format are the following functions convert to? and where are the data saved after the serialization?any difference of the data format between the following serialization functions

Code: [Select]
fc::raw::pack( ...); 

pub.serialize();

I am reviewing the code for the community and can shed some light on these questions based upon my observations.

Obviously,FC is the fundamental library of bitshare toolkit.  i would like to have an in-depth study, but do not know how/where to start, is there any documentation i can refer to? attached below are some of my questions, appreciated if anyone help to clarify.
1) there is some following code under the data object,what is the purpose? how it work?and when such code will be executed?
Code: [Select]
FC_REFLECT(..)

FC_REFLECT is a macro that expands into a template specialization that calls a method for each member.  It seems to enable the creation of different kinds of serialization techniques.   The two primary uses seems to be for what he calls 'raw' and 'json'.   raw appears to be just a binary representation and json is self explanatory.

Quote
2)there are many multiple thread program like below in bitshare toolkit, i  don't quit understand how it work.

Code: [Select]
my->....complete = fc::async( [=](){ my->process..(); } );

This code is actually cooperative multi-tasking and the fc library provides a scheduler that will manage the execution of multiple fibers in a single thread.  This is a very useful construct because you do not have to worry about context switching at arbitrary points like you do with multi-threading.   On the other hand if a fiber blocks without yielding the other tasks in the same thread will not get executed.     fc::async() dispatches a task to be run on the current thread the next time it yields.