Author

Topic: NXT :: descendant of Bitcoin - Updated Information - page 1095. (Read 2761629 times)

sr. member
Activity: 897
Merit: 284
Anybody here from NxtCrypto.org have an issue with me using a cropped version of the Nxt on fire within my installer as seen below? I'm trying to spice it up a bit.

legendary
Activity: 1176
Merit: 1134
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.
You are confusing me. Are you agreeing with me or saying that somehow subleq is pure academics and not proven.

I found open source C compiler with example programs all that generate subleq, a single opcode for every instruction. If there is a C compiler, we can use all the existing C code out there as long as we honor VM limitations.

So, please explain why C compiler -> higher_subleq -> subleq is useless academic and not a practical solution. You have to remember I have been proven to be incompetent in technical stuff so I need to have things explained to me, even if it is obvious to the smart guys

James
sr. member
Activity: 460
Merit: 250
Great job everyone, these last few pages of juicy dev talk are giving me the first nxt hard-on this february.
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
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.
legendary
Activity: 1176
Merit: 1134
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
legendary
Activity: 1470
Merit: 1004
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.
legendary
Activity: 1176
Merit: 1134
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?
legendary
Activity: 1176
Merit: 1134
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
sr. member
Activity: 490
Merit: 250
I don't really come from outer space.
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.
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
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
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
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.
legendary
Activity: 1470
Merit: 1004


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.
legendary
Activity: 1232
Merit: 1001
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.
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
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.
hero member
Activity: 1115
Merit: 535
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?

legendary
Activity: 1176
Merit: 1134
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
sr. member
Activity: 490
Merit: 250
I don't really come from outer space.
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.
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
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....
legendary
Activity: 1176
Merit: 1134
FPGA and compiler for subleq computer

http://arxiv.org/pdf/1106.2593.pdf
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
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!
Jump to: