ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
February 04, 2014, 11:05:35 PM |
|
(Regarding going beyond NXT, say Email or other external services... I don't know. But would like to have them just in case.)
I see it this way: 1. Script composes email and stores as AM. 2. External service takes the email and sends it. In case size of email is bigger than AM does it get splited in more AMs? Can it be made that the AM only contains the email header data and the body part with message and attachments is send off chain to the service provider and then like mentioned above the service process the email further on?! Think, we will have file sharing blockchain anyway.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
February 04, 2014, 11:17:11 PM |
|
Why not? Ethereum code could send transactions. Sounds legit to me.
If you say, external data should be embedded into the blockchain then u use an external interface to get this data.
Internal is just the 'memory'. The RAM of the virtual env.
If u let scripts to ask for data from external world then u won't be able to achieve 1000 tps. External world is supposed to push data into the blockchain, scripts pulling the data from external world is a bad way. So the script will be able to access any AM in the blockchain. The app needs to seed the script with the required block#, etc. Will the scripts have an easy way to access alias data also? If so, that could be another way to pass data to the script
|
|
|
|
Uniqueorn
Full Member
Offline
Activity: 182
Merit: 100
NXT.org
|
|
February 04, 2014, 11:18:21 PM |
|
looks like a fancy chocolate birthday cake While I commend you for your work, I am wondering what is this for specifically? I thought we all agreed that coins and similar representations should not be a thing in NXT? NXTs logo is all we really need? Why do we need a geometric shape?
|
|
|
|
|
ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
February 04, 2014, 11:21:11 PM |
|
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
February 04, 2014, 11:21:46 PM |
|
I think I win contest Subtract and branch if less than or equal to zero[edit] The subleq instruction ("SUbtract and Branch if Less than or EQual to zero") subtracts the contents at address a from the contents at address b, stores the result at address b, and then, if the result is not positive, transfers control to address c (if the result is positive, execution proceeds to the next instruction in sequence).[3]:4-7 Pseudocode: subleq a, b, c ; Mem = Mem - Mem[a] ; if (Mem ≤ 0) goto c Conditional branching can be suppressed by setting the third operand equal to the address of the next instruction in sequence. If the third operand is not written, this suppression is implied. A variant is also possible with two operands and an internal accumulator, where the accumulator is subtracted from the memory location specified by the first operand. The result is stored in both the accumulator and the memory location, and the second operand specifies the branch address: subleq2 a, b ; Mem[a] = Mem[a] - ACCUM ; ACCUM = Mem[a] ; if (Mem[a] ≤ 0) goto b Although this uses only two (instead of three) operands per instruction, correspondingly more instructions are then needed to effect various logical operations. Synthesized instructions[edit] It is possible to synthesize many types of higher-order instructions using only the subleq instruction.[3]:9-10 Unconditional branch: JMP c == subleq Z, Z, c Addition can be performed by repeated subtraction, with no conditional branching; e.g., the following instructions result in the content at location a being added to the content at location b: ADD a, b == subleq a, Z subleq Z, b subleq Z, Z The first instruction subtracts the content at location a from the content at location Z (which is 0) and stores the result (which is the negative of the content at a) in location Z. The second instruction subtracts this result from b, storing in b this difference (which is now the sum of the contents originally at a and b); the third instruction restores the value 0 to Z. A copy instruction can be implemented similarly; e.g., the following instructions result in the content at location b getting replaced by the content at location a, again assuming the content at location Z is maintained as 0: MOV a, b == subleq b, b subleq a, Z subleq Z, b subleq Z, Z Any desired arithmetic test can be built. For example, a branch-if-zero condition can be assembled from the following instructions: BEQ b, c == subleq b, Z, L1 subleq Z, Z, OUT L1: subleq Z, Z subleq Z, b, c OUT: ... Subleq2 can also be used to synthesize higher-order instructions, although it generally requires more operations for a given task. For example no fewer than 10 subleq2 instructions are required to flip all the bits in a given byte: NOT a == subleq2 tmp ; tmp = 0 (tmp = temporary register) subleq2 tmp subleq2 minus_one ; acc = -1 subleq2 a ; a' = a + 1 subleq2 Z ; Z = - a - 1 subleq2 tmp ; tmp = a + 1 subleq2 a ; a' = 0 subleq2 tmp ; load tmp into acc subleq2 a ; a' = - a - 1 ( = ~a ) subleq2 Z ; set Z back to 0
|
|
|
|
bitcoinpaul
|
|
February 04, 2014, 11:22:11 PM |
|
In the meantime, I wish to report that 0.7.0 is running successfully with an H2 database backend, no more serialized java object files. No need to keep all blocks and transactions in memory anymore.
|
|
|
|
ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
February 04, 2014, 11:24:04 PM |
|
In the meantime, I wish to report that 0.7.0 is running successfully with an H2 database backend, no more serialized java object files. No need to keep all blocks and transactions in memory anymore.
Congrats!
|
|
|
|
|
ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
February 04, 2014, 11:25:37 PM |
|
I think I win contest Yah, yah....
|
|
|
|
xyzzyx
Sr. Member
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
|
February 04, 2014, 11:26:00 PM |
|
Very good if it's 28, coz I know only a solution with 32 opcodes.
It's actually more, but immediate-mode and register-to-register operations use a symmetry in opcode encoding to use the same dispatch code in the switch (case) statement. This was done on purpose to make the VM more compact. You have move register-register and move immediate, for example that use the same dispatch code. These ops use the same dispatch code: move (MOV, MOVI), move 1's complement (MVN, MVNI), add (ADD, ADDI), subtract (SUB, SUBI), multiply (MUL, MULI), divide (DIV, DIVI), modulus (MOD, MODI), compare (CMP, CMPI). There are several ops which we don't need. For example, there is an op to read an integer from the Oberon text stream. We have no use for that. Although, these could be re-purposed for blockchain I/O instead.
|
"An awful lot of code is being written ... in languages that aren't very good by people who don't know what they're doing." -- Barbara Liskov
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
February 04, 2014, 11:27:04 PM |
|
Below is a "Hello world" program adapted from Lawrence Woodman helloworld.sq [10]. It is exceptionally terse, but is a good example of Subleq efficiency. L:H (-1); U L; U ?+2; Z H (-1); Z Z L . U:-1 H:"hello, world\n" Z:0 A special variable called Z is often used in Subleq as an intermediate temporary variable within a highly small scope. It is commonly assumed that this variable is initialised at zero and left at zero after every usage. The program above consists of five instructions. First instruction prints the character pointed by its first operand (the first pointer) which is initialised to the beginning of the data string – the letter ’h’. Second instruction increments that pointer – the first operand of the first instruction. Third instruction increments the second pointer, which is the second operand of the fourth instruction. Fourth instruction tests the value pointed by the second pointer and halts the program when the value is zero. It becomes zero when the pointer reaches the cell one after the end of the data string, which is Z:0. The fifth instruction loops back to the beginning
|
|
|
|
freigeist
|
|
February 04, 2014, 11:27:58 PM |
|
In the meantime, I wish to report that 0.7.0 is running successfully with an H2 database backend, no more serialized java object files. No need to keep all blocks and transactions in memory anymore.
Does it still have the web client interface on http://localhost:7874 and https://localhost:7875 ?! What are the plans for the web client in future? Will be developed further on or will be removed from the distribution?
|
|
|
|
ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
February 04, 2014, 11:30:18 PM |
|
Below is a "Hello world" program adapted from Lawrence Woodman helloworld.sq [10]. It is exceptionally terse, but is a good example of Subleq efficiency. L:H (-1); U L; U ?+2; Z H (-1); Z Z L . U:-1 H:"hello, world\n" Z:0 A special variable called Z is often used in Subleq as an intermediate temporary variable within a highly small scope. It is commonly assumed that this variable is initialised at zero and left at zero after every usage. The program above consists of five instructions. First instruction prints the character pointed by its first operand (the first pointer) which is initialised to the beginning of the data string – the letter ’h’. Second instruction increments that pointer – the first operand of the first instruction. Third instruction increments the second pointer, which is the second operand of the fourth instruction. Fourth instruction tests the value pointed by the second pointer and halts the program when the value is zero. It becomes zero when the pointer reaches the cell one after the end of the data string, which is Z:0. The fifth instruction loops back to the beginning Come on. It's academic. You have to do a lot more to do everyday operations.
|
|
|
|
xibeijan
Legendary
Offline
Activity: 1232
Merit: 1001
|
|
February 04, 2014, 11:30:35 PM |
|
In the meantime, I wish to report that 0.7.0 is running successfully with an H2 database backend, no more serialized java object files. No need to keep all blocks and transactions in memory anymore.
Magic! nice work.
|
|
|
|
msin
Legendary
Offline
Activity: 1470
Merit: 1004
|
|
February 04, 2014, 11:30:58 PM |
|
While I commend you for your work, I am wondering what is this for specifically?
I thought we all agreed that coins and similar representations should not be a thing in NXT? NXTs logo is all we really need? Why do we need a geometric shape?
It's called, freedom to do whatever the fuck you want. And CFB asked for it, so please accept it.
|
|
|
|
ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
February 04, 2014, 11:31:40 PM |
|
In the meantime, I wish to report that 0.7.0 is running successfully with an H2 database backend, no more serialized java object files. No need to keep all blocks and transactions in memory anymore.
Does it still have the web client interface on http://localhost:7874 and https://localhost:7875 ?! What are the plans for the web client in future? Will be developed further on or will be removed from the distribution? The plan: no NRC.
|
|
|
|
ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
February 04, 2014, 11:33:15 PM |
|
In the meantime, I wish to report that 0.7.0 is running successfully with an H2 database backend, no more serialized java object files. No need to keep all blocks and transactions in memory anymore.
Magic! nice work. No, computer science.
|
|
|
|
xyzzyx
Sr. Member
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
|
February 04, 2014, 11:34:39 PM |
|
What are the plans for the web client in future? Will be developed further on or will be removed from the distribution?
The plan: no NRC. There's no stopping anyone from packaging the current web client as a stand-alone program, though. With the javascript Curve25519 implementation, it should be possible to sign transactions locally, too, and safely point the web client at a public node.
|
"An awful lot of code is being written ... in languages that aren't very good by people who don't know what they're doing." -- Barbara Liskov
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
February 04, 2014, 11:34:58 PM |
|
Below is a "Hello world" program adapted from Lawrence Woodman helloworld.sq [10]. It is exceptionally terse, but is a good example of Subleq efficiency. L:H (-1); U L; U ?+2; Z H (-1); Z Z L . U:-1 H:"hello, world\n" Z:0 A special variable called Z is often used in Subleq as an intermediate temporary variable within a highly small scope. It is commonly assumed that this variable is initialised at zero and left at zero after every usage. The program above consists of five instructions. First instruction prints the character pointed by its first operand (the first pointer) which is initialised to the beginning of the data string – the letter ’h’. Second instruction increments that pointer – the first operand of the first instruction. Third instruction increments the second pointer, which is the second operand of the fourth instruction. Fourth instruction tests the value pointed by the second pointer and halts the program when the value is zero. It becomes zero when the pointer reaches the cell one after the end of the data string, which is Z:0. The fifth instruction loops back to the beginning Come on. It's academic. You have to do a lot more to do everyday operations. Check out http://da.vidr.cc/projects/subleq/Is it really just academic theoretical? They explain how they made C compiler in PDF, there is a chip that implements this I only know about this from when I found it, and not sure if it is usable, but if there is a C compiler for it, then it sure sounds usable to me. http://esolangs.org/wiki/Higher_Subleqhere is source to C compiler: http://mazonka.com/subleq/hsq.cppJames
|
|
|
|
|