VanBreuk
|
 |
February 04, 2014, 11:43:14 PM |
|
Great job everyone, these last few pages of juicy dev talk are giving me the first nxt hard-on this february.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 04, 2014, 11:46:36 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 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
|
|
|
|
Mistafreeze
|
 |
February 04, 2014, 11:47:37 PM |
|
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. 
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 04, 2014, 11:48:36 PM |
|
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.  If that was BTC, it would be perfect for XCP logo, but for NXT it looks like you are burning NXT. Not sure it is so good.
|
|
|
|
ChuckOne
Sr. Member
  
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
 |
February 04, 2014, 11:50:14 PM |
|
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?
You really like it, right?  It's okay. Nevermind. It's just that I trust technology like that only after many years of production. That's all. It's not that I do not think they weren't capable of producing a good piece of compiler and libs. It's just that: nobody's perfect, especially no programmers. In the end, only time can 'prove' correctness.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 04, 2014, 11:58:07 PM |
|
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?
You really like it, right?  It's okay. Nevermind. It's just that I trust technology like that only after many years of production. That's all. It's not that I do not think they weren't capable of producing a good piece of compiler and libs. It's just that: nobody's perfect, especially no programmers. In the end, only time can 'prove' correctness. Well if we can use proven solution, then we wouldnt have to develop our own. Do you want to wait until etherium is proven and then use that? I am confused again. I think we can have a path to Turing complete script with C compiler and a small amount of functions. The alternative is to implement 28 or 32 opcodes, which is a lot more work as each opcode needs to be implemented and tested, etc. If CfB signs off on subleq VM, then we can start in parallel fleshing out and TESTING more and more C libraries based on subleq C compiler. I like being able to develop a project in separate pieces. As soon as we have subleq scripting, we can then hook up all the higher level stuff that has been ported and tested. Does that make sense? Anon, Alias, CIYAM, other smart guys. Please tell me if I am being incompetent again, or did I get lucky? James P.S. If CfB signs off on subleq VM, I will authorize bounties for getting the higher level functions done. It is clear to me that we need a layer of code that abstracts the details of script, AM, etc and allows higher level development. With a C compiler available, maybe one of the bounties will be to port a higher level language to subleq VM
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 04, 2014, 11:59:53 PM |
|
CfB?
Abandon subleq or push forward?
|
|
|
|
ChuckOne
Sr. Member
  
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
 |
February 05, 2014, 12:00:51 AM |
|
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
Hmmm. Where to start with? 1) Yes, it could be done with it. Why, because both languages are turing complete. (That's the stuff on the paper, proven with formulas etc.) 2) Yes, it could be practical. But, the bugs are not on the paper and not in the formulas. But in the source code of the compilers and the VM AND their respective compilers. It's not the mathematical proof that's wrong, it's just that programmers make mistakes as human usually do. 3) So, use proven technologies in the sense that time has proven them to be reliable. Not proven in the sense of formulas. It's more like robust or bulletproof code for VM and compilers. Less bugs, more support, because more people are using them right now. What if the subleq developers discontinue development? And so on. But anyway, yes. You won the contest. 1 Op-Code is cool.
|
|
|
|
swartzfeger
|
 |
February 05, 2014, 12:01:42 AM |
|
Great job everyone, these last few pages of juicy dev talk are giving me the first nxt hard-on this february.
Yup, better than the usual 'the sky is falling' bullshit. 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.  If that was BTC, it would be perfect for XCP logo, but for NXT it looks like you are burning NXT. Not sure it is so good. At first I thought 'wow, looks cool!' Then considered what James said... seeing something on fire may not be the best image when installing software.  I'm probably over-thinking this. Looks cool. Maybe a bit over the top. Nice to see an install screen spiced up, though.
|
|
|
|
ChuckOne
Sr. Member
  
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
 |
February 05, 2014, 12:03:37 AM |
|
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?
You really like it, right?  It's okay. Nevermind. It's just that I trust technology like that only after many years of production. That's all. It's not that I do not think they weren't capable of producing a good piece of compiler and libs. It's just that: nobody's perfect, especially no programmers. In the end, only time can 'prove' correctness. Well if we can use proven solution, then we wouldnt have to develop our own. Do you want to wait until etherium is proven and then use that? I am confused again. I think we can have a path to Turing complete script with C compiler and a small amount of functions. The alternative is to implement 28 or 32 opcodes, which is a lot more work as each opcode needs to be implemented and tested, etc. If CfB signs off on subleq VM, then we can start in parallel fleshing out and TESTING more and more C libraries based on subleq C compiler. I like being able to develop a project in separate pieces. As soon as we have subleq scripting, we can then hook up all the higher level stuff that has been ported and tested. Does that make sense? Anon, Alias, CIYAM, other smart guys. Please tell me if I am being incompetent again, or did I get lucky? James P.S. If CfB signs off on subleq VM, I will authorize bounties for getting the higher level functions done. It is clear to me that we need a layer of code that abstracts the details of script, AM, etc and allows higher level development. With a C compiler available, maybe one of the bounties will be to port a higher level language to subleq VM Ah yes. And if you have to pay per op, then you will get poor when using subleq.  It's really more expensive.
|
|
|
|
Jean-Luc
|
 |
February 05, 2014, 12:03:59 AM |
|
Yes. I haven't made any changes to the javascript client. What are the plans for the web client in future? Will be developed further on or will be removed from the distribution?
Will not be developed, will be removed only after a complete replacement client is available, web based or not.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 05, 2014, 12:05:24 AM |
|
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
Hmmm. Where to start with? 1) Yes, it could be done with it. Why, because both languages are turing complete. (That's the stuff on the paper, proven with formulas etc.) 2) Yes, it could be practical. But, the bugs are not on the paper and not in the formulas. But in the source code of the compilers and the VM AND their respective compilers. It's not the mathematical proof that's wrong, it's just that programmers make mistakes as human usually do. 3) So, use proven technologies in the sense that time has proven them to be reliable. Not proven in the sense of formulas. It's more like robust or bulletproof code for VM and compilers. Less bugs, more support, because more people are using them right now. What if the subleq developers discontinue development? And so on. But anyway, yes. You won the contest. 1 Op-Code is cool. Hey, as cool as one opcode is I much prefer to use 28 or 32 or whatever if it gives us a better starting point as far as fully debugged libraries, etc. goes. The less work we have to do to be able to construct useful solutions, the better. That is my metric. Does anybody know of any open source C compiler for the 28 opcode language? Libraries? If I have to choose between subleq and another unproven simple machine language ecosystem, I would choose subleq just because is to kind of cool with one opcode. But only if it is at the equivalent state. So, please anybody know of simplified machine language with open source C compiler and lots and lots of library code and projects verified on it? James
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 05, 2014, 12:07:14 AM |
|
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?
You really like it, right?  It's okay. Nevermind. It's just that I trust technology like that only after many years of production. That's all. It's not that I do not think they weren't capable of producing a good piece of compiler and libs. It's just that: nobody's perfect, especially no programmers. In the end, only time can 'prove' correctness. Well if we can use proven solution, then we wouldnt have to develop our own. Do you want to wait until etherium is proven and then use that? I am confused again. I think we can have a path to Turing complete script with C compiler and a small amount of functions. The alternative is to implement 28 or 32 opcodes, which is a lot more work as each opcode needs to be implemented and tested, etc. If CfB signs off on subleq VM, then we can start in parallel fleshing out and TESTING more and more C libraries based on subleq C compiler. I like being able to develop a project in separate pieces. As soon as we have subleq scripting, we can then hook up all the higher level stuff that has been ported and tested. Does that make sense? Anon, Alias, CIYAM, other smart guys. Please tell me if I am being incompetent again, or did I get lucky? James P.S. If CfB signs off on subleq VM, I will authorize bounties for getting the higher level functions done. It is clear to me that we need a layer of code that abstracts the details of script, AM, etc and allows higher level development. With a C compiler available, maybe one of the bounties will be to port a higher level language to subleq VM Ah yes. And if you have to pay per op, then you will get poor when using subleq.  It's really more expensive. Hmmm. maximizes transaction fees, unfortunate isn't it. I imagine much lower min fee would be needed as soon as we launch Turing complete scripts
|
|
|
|
ChuckOne
Sr. Member
  
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
 |
February 05, 2014, 12:08:06 AM |
|
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
Hmmm. Where to start with? 1) Yes, it could be done with it. Why, because both languages are turing complete. (That's the stuff on the paper, proven with formulas etc.) 2) Yes, it could be practical. But, the bugs are not on the paper and not in the formulas. But in the source code of the compilers and the VM AND their respective compilers. It's not the mathematical proof that's wrong, it's just that programmers make mistakes as human usually do. 3) So, use proven technologies in the sense that time has proven them to be reliable. Not proven in the sense of formulas. It's more like robust or bulletproof code for VM and compilers. Less bugs, more support, because more people are using them right now. What if the subleq developers discontinue development? And so on. But anyway, yes. You won the contest. 1 Op-Code is cool. Hey, as cool as one opcode is I much prefer to use 28 or 32 or whatever if it gives us a better starting point as far as fully debugged libraries, etc. goes. The less work we have to do to be able to construct useful solutions, the better. That is my metric. Does anybody know of any open source C compiler for the 28 opcode language? Libraries? If I have to choose between subleq and another unproven simple machine language ecosystem, I would choose subleq just because is to kind of cool with one opcode. But only if it is at the equivalent state. So, please anybody know of simplified machine language with open source C compiler and lots and lots of library code and projects verified on it? James ARM-RISC, there is. Compilers and VMs en masse. VM for ARM-RISC.... have to research that. But's time to catch some sleep.
|
|
|
|
dzarmush
Legendary
Offline
Activity: 1806
Merit: 1001
|
 |
February 05, 2014, 12:10:28 AM |
|
Looks like Nxt going to hell.
|
|
|
|
ChuckOne
Sr. Member
  
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
 |
February 05, 2014, 12:10:35 AM |
|
Ah yes. And if you have to pay per op, then you will get poor when using subleq.  It's really more expensive. Hmmm. maximizes transaction fees, unfortunate isn't it. I imagine much lower min fee would be needed as soon as we launch Turing complete scripts Yes, we would to. That's what you buy if you have only one op-code. That's also the reason why we have high-level languages. No code duplication = better maintainability is the goal.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
 |
February 05, 2014, 12:13:30 AM |
|
I have idea for high level language to put on top of C. Why not some subset of Java? If we can then allow access to a subset of Java (the safe ones) in the NXT core to the script, then it would be most powerful setup: Java -> C -> higher_subleq -> subleq -> subleq VM Since the C compiler for higher_subleq is relatively untested, this would require a project to port and validate the Java (subset) using that compiler. Anybody interested? How much work would it be? Just running a small java program could generate so much NXT! Probably not so practical, but for a tech demonstration on the power of NXT, it would certainly get a lot of PR. Also, depending on how we count transactions, 1000TPS now seems it might not be enough... James P.S. http://arxiv.org/pdf/1106.2593.pdf is the key paper on this
|
|
|
|
xyzzyx
Sr. Member
  
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
 |
February 05, 2014, 12:13:48 AM |
|
Does anybody know of any open source C compiler for the 28 opcode language? Libraries?
I know of an Oberon compiler for the 28 opcode language.  If I have to choose between subleq and another unproven simple machine language ecosystem, I would choose subleq just because is to kind of cool with one opcode. But only if it is at the equivalent state.
I don't really care what underlying architecture is ultimately chosen. I do think, however, that an expensive one in terms of overall performace vs. NXT cost will drive fragmentation to alternative less-costly architectures once the Nxt code is open. AST/Slim-binaries will win here.
|
"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 05, 2014, 12:14:46 AM |
|
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
Hmmm. Where to start with? 1) Yes, it could be done with it. Why, because both languages are turing complete. (That's the stuff on the paper, proven with formulas etc.) 2) Yes, it could be practical. But, the bugs are not on the paper and not in the formulas. But in the source code of the compilers and the VM AND their respective compilers. It's not the mathematical proof that's wrong, it's just that programmers make mistakes as human usually do. 3) So, use proven technologies in the sense that time has proven them to be reliable. Not proven in the sense of formulas. It's more like robust or bulletproof code for VM and compilers. Less bugs, more support, because more people are using them right now. What if the subleq developers discontinue development? And so on. But anyway, yes. You won the contest. 1 Op-Code is cool. Hey, as cool as one opcode is I much prefer to use 28 or 32 or whatever if it gives us a better starting point as far as fully debugged libraries, etc. goes. The less work we have to do to be able to construct useful solutions, the better. That is my metric. Does anybody know of any open source C compiler for the 28 opcode language? Libraries? If I have to choose between subleq and another unproven simple machine language ecosystem, I would choose subleq just because is to kind of cool with one opcode. But only if it is at the equivalent state. So, please anybody know of simplified machine language with open source C compiler and lots and lots of library code and projects verified on it? James ARM-RISC, there is. Compilers and VMs en masse. VM for ARM-RISC.... have to research that. But's time to catch some sleep. order of magnitude more work to implement ARM VM than OSIC VM, OSIC is the CPU they designed using subleq
|
|
|
|
EvilDave
|
 |
February 05, 2014, 12:15:37 AM |
|
Now that I've caught up with this thread, and it's almost bed time for the Evil one, I've got a couple of non-coding points to make: (love the code talk, btw, I can smell the big-brain coding skills from here, it's the smell of success!) Great job everyone, these last few pages of juicy dev talk are giving me the first nxt hard-on this february.
+1 Voting: NXTvote.com looks tight
Damn right on that, having nxtvote up and running will make decisions around here a lot easier and probably fairer. Most important bit: CfB and BCNext:We've always known that CfB wasn't going to be around forever as NXT dev-in-chief. He's a talented guy and without him, NXT would not be what it is today. But we have a lot of talented guys ( take a bow, everyone) and more coming in every day. NXT will carry on without CfB and will still be a success. We got thru 4 days without him last week, and made some good progress in that time. It's easy to see guys in important roles as irreplaceable leaders, but the truth is that anyone can be replaced. So stop looking at him like he's the Messiah, he's just a very naughty boy. BCNext has good reason to be Mr. Anonymouse, look at the amount of pressure that gets put on Dan/Fuserleer from eMunie. Every time he sneezes, eMunie catches a cold. He definitely doesn't want to be the Messiah.... With BCNext in the background, communicating only with mysterious prophesies and complex code, the NXT community is forced to step up and build almost everything we need ourselves, which makes NXT a lot stronger than if we always had the option to turn to BCNext and ask "What do we do now, Daddy?" Ask yourselves this: if CfB was always going to be here, and BCnext was actually present and working, what would NXT look like now ? A massive community, or 2 guys working and a 1000 watching? Last point: Get on with each other, ffs, save the fighting until we are on our island paradise in the Maldives.....we can build a Thunderdome!
|
|
|
|
|