Bitcoin Forum
September 05, 2025, 10:34:18 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 [1458] 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 ... 2548 »
  Print  
Author Topic: NXT :: descendant of Bitcoin - Updated Information  (Read 2761737 times)
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 04, 2014, 11:21:11 PM
 #29141

I found a language with only 8 opcodes but i'm not sure that this will
be a good for your needs as the language is completely f*d up and if you uset it can f**k up your brain.
Smiley

I called brain fuck.
http://www.muppetlabs.com/~breadbox/bf/


Brainfuck requires too much memory.
I found turing complete langauges with ONE opcode!?
http://en.wikipedia.org/wiki/One_instruction_set_computer

Holy shit.
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1134


View Profile WWW
February 04, 2014, 11:21:46 PM
 #29142

I found a language with only 8 opcodes but i'm not sure that this will
be a good for your needs as the language is completely f*d up and if you uset it can f**k up your brain.
Smiley

I called brain fuck.
http://www.muppetlabs.com/~breadbox/bf/


Brainfuck requires too much memory.
I found turing complete langauges with ONE opcode!?
http://en.wikipedia.org/wiki/One_instruction_set_computer

I think I win contest Smiley

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

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
bitcoinpaul
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1000



View Profile
February 04, 2014, 11:22:11 PM
 #29143

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.



Smiley
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 04, 2014, 11:24:04 PM
 #29144

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!
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1134


View Profile WWW
February 04, 2014, 11:24:36 PM
 #29145

FPGA and compiler for subleq computer

http://arxiv.org/pdf/1106.2593.pdf

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 04, 2014, 11:25:37 PM
 #29146

I found a language with only 8 opcodes but i'm not sure that this will
be a good for your needs as the language is completely f*d up and if you uset it can f**k up your brain.
Smiley

I called brain fuck.
http://www.muppetlabs.com/~breadbox/bf/


Brainfuck requires too much memory.
I found turing complete langauges with ONE opcode!?
http://en.wikipedia.org/wiki/One_instruction_set_computer

I think I win contest Smiley


Yah, yah....
xyzzyx
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


I don't really come from outer space.


View Profile
February 04, 2014, 11:26:00 PM
 #29147

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 Offline

Activity: 1176
Merit: 1134


View Profile WWW
February 04, 2014, 11:27:04 PM
 #29148

FPGA and compiler for subleq computer

http://arxiv.org/pdf/1106.2593.pdf


 
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

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
freigeist
Hero Member
*****
Offline Offline

Activity: 1121
Merit: 535


View Profile
February 04, 2014, 11:27:58 PM
 #29149

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.



Smiley

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 Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 04, 2014, 11:30:18 PM
 #29150

FPGA and compiler for subleq computer

http://arxiv.org/pdf/1106.2593.pdf


 
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 Offline

Activity: 1232
Merit: 1001


View Profile
February 04, 2014, 11:30:35 PM
 #29151

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.

Notable projects 2019: Semux, Dero, Wagerr, BEAM
msin
Legendary
*
Offline Offline

Activity: 1512
Merit: 1006


View Profile
February 04, 2014, 11:30:58 PM
 #29152



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 Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 04, 2014, 11:31:40 PM
 #29153

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.



Smiley

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 Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 04, 2014, 11:33:15 PM
 #29154

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. Wink
xyzzyx
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


I don't really come from outer space.


View Profile
February 04, 2014, 11:34:39 PM
 #29155

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 Offline

Activity: 1176
Merit: 1134


View Profile WWW
February 04, 2014, 11:34:58 PM
 #29156

FPGA and compiler for subleq computer

http://arxiv.org/pdf/1106.2593.pdf


 
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_Subleq
here is source to C compiler: http://mazonka.com/subleq/hsq.cpp

James

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1134


View Profile WWW
February 04, 2014, 11:37:48 PM
 #29157

FPGA and compiler for subleq computer

http://arxiv.org/pdf/1106.2593.pdf


 
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.

Libraries/Demo

Libraries for programs written in SUBLEQ assembly, as accepted by sqasm, are available.

They provide several common functions:

getint (read integer from input)
gets (read string from input)
putint (write integer to output)
puts (write string to output)

Several useful procedures are also available:

bubblesort (sort a string of characters)
calc (perform a given operation on two integers)
factorial (calculate the factorial of a positive integer)
primes (generate and print a list of primes)
Usage information and equivalent C code (where appropriate) is provided in the comments of each of these files.

A menu-driven program demonstrating the above libraries is also provided. Simply call make run in the project root directory to run the demo program.

Interpreter
A very minimal (only 222 bytes in size) SUBLEQ interpreter written in C is available:
_____________

What everyday operations do you have in mind?

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
msin
Legendary
*
Offline Offline

Activity: 1512
Merit: 1006


View Profile
February 04, 2014, 11:38:23 PM
 #29158

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. Wink

I'm starting to like ChuckOne.
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1134


View Profile WWW
February 04, 2014, 11:40:15 PM
 #29159

CfB, what is your opinion of subleq? It seems we just need to implement one opcode.

There already exists Higher_subleq (assembly language) and C compiler, so that sure sounds like the quickest path. The CPU model they use doesn't seem too crazy.

James

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
February 04, 2014, 11:42:44 PM
 #29160

FPGA and compiler for subleq computer

http://arxiv.org/pdf/1106.2593.pdf


 
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_Subleq
here is source to C compiler: http://mazonka.com/subleq/hsq.cpp

James

That's the point in being turing complete, right?

turing-complete = you can calculate whatever is computable.

So, C is turing complete and subleq is turing complete. That is, they are equivalent: there is a C program for every subleq program that delivers the very same output for the very same input and vice-versa.

But anyway, I would always go with proven technology.

I mean C and subleq are just ideas/standards/concepts.

There are many, many compilers/programs/bits'n'bytes for them. There is where the problem occurs not on the paper but in the source code. There are the bugs and optimization potentials.

Therefore: use what's already there and has been proven itself in millions of devices for years.
Pages: « 1 ... 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 [1458] 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 ... 2548 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!