Bitcoin Forum
September 16, 2019, 07:39:15 AM *
News: Latest Bitcoin Core release: 0.18.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 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 1509 1510 1511 1512 1513 1514 1515 ... 2567 »
  Print  
Author Topic: NXT :: descendant of Bitcoin - Updated Information  (Read 2756161 times)
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:30:29 PM
 #29281

What about ARM aka RISC? As in accordance of NXT power efficiency.

We can't use ARM without virtualization. Current Nxt cores (Java and .NET versions) can't support virtualization.

What exactly do you mean by virtualization?
How else do you want to execute it on my machine? On real metal? No way!

You have to have an environment anyway.

That's why I mentioned virtualization.
1568619555
Hero Member
*
Offline Offline

Posts: 1568619555

View Profile Personal Message (Offline)

Ignore
1568619555
Reply with quote  #2

1568619555
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568619555
Hero Member
*
Offline Offline

Posts: 1568619555

View Profile Personal Message (Offline)

Ignore
1568619555
Reply with quote  #2

1568619555
Report to moderator
1568619555
Hero Member
*
Offline Offline

Posts: 1568619555

View Profile Personal Message (Offline)

Ignore
1568619555
Reply with quote  #2

1568619555
Report to moderator
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:31:26 PM
 #29282

Well, okay. You could pay per operation.

Yes, I like it too.
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

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


View Profile
February 04, 2014, 10:31:34 PM
 #29283

One problem with that is for instance the halting problem.

Halt is a legit way to terminate contract execution. At least Ethereum creators say so.

Well, okay. You could pay per operation.

The operator of the program gains the operation fees, I guess.
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

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


View Profile
February 04, 2014, 10:32:41 PM
 #29284

What about ARM aka RISC? As in accordance of NXT power efficiency.

We can't use ARM without virtualization. Current Nxt cores (Java and .NET versions) can't support virtualization.

What exactly do you mean by virtualization?
How else do you want to execute it on my machine? On real metal? No way!

You have to have an environment anyway.

That's why I mentioned virtualization.

Yes, and RISC is already tested in production almost everywhere. Just need a virt. env for that in J, C#, Python etc.
xyzzyx
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


I don't really come from outer space.


View Profile
February 04, 2014, 10:34:33 PM
 #29285

What about the VM outlined in N. Wirth's Compiler Construction?

I haven't heard about it so I can't answer.


This is it:

Code:
MODULE RISC; (*NW 27. 11. 05*)
 IMPORT SYSTEM, Texts;
 CONST MemSize* = 4096; ProgOrg = 2048; (*in bytes*)
 MOV = 0; MVN = 1; ADD = 2; SUB = 3; MUL = 4; Div = 5; Mod = 6; CMP = 7;
 MOVI = 16; MVNI = 17; ADDI = 18; SUBI = 19; MULI = 20; DIVI = 21; MODI = 22; CMPI = 23;
 CHKI = 24;
 LDW = 32; LDB = 33; POP = 34; STW = 36; STB = 37; PSH = 38;
 RD = 40; WRD= 41; WRH = 42; WRL = 43;
 BEQ = 48; BNE = 49; BLT = 50; BGE = 51; BLE = 52; BGT = 53; BR = 56; BSR = 57; RET = 58;
 VAR IR: LONGINT;
 N, Z: BOOLEAN;
 R*: ARRAY 16 OF LONGINT;
 M*: ARRAY MemSize DIV 4 OF LONGINT;
 W: Texts.Writer;
 (* R15] is PC, R[14] used as link register by BSR instruction*)
 PROCEDURE Execute*(start: LONGINT; VAR in: Texts.Scanner; out: Texts.Text);
 VAR opc, a, b, c, nxt: LONGINT;
 BEGIN R[14] := 0; R[15] := start + ProgOrg;
 LOOP (*interpretation cycle*)
 nxt := R[15] + 4; IR := M[R[15] DIV 4];
 opc := IR DIV 4000000H MOD 40H;
 a := IR DIV 400000H MOD 10H;
 b := IR DIV 40000H MOD 10H;
 c := IR MOD 40000H;
 IF opc < MOVI THEN (*F0*) c := R[IR MOD 10H]
 ELSIF opc < BEQ THEN
 (*F1, F2*) c := IR MOD 40000H;
 IF c >= 20000H THEN DEC(c, 40000H) END (*sign extension*)
 ELSE (*F3*) c := IR MOD 4000000H;
 IF c >= 2000000H THEN DEC(c, 4000000H) END (*sign extension*)
 END ;
 CASE opc OF
 MOV, MOVI: R[a] := ASH(c, b) (*arithmetic shift*)
 | MVN, MVNI: R[a] := -ASH(c, b)
 | ADD, ADDI: R[a] := R[b] + c
 | SUB, SUBI: R[a] := R[b] - c
 | MUL, MULI: R[a] := R[b] * c
 | Div, DIVI: R[a] := R[b] DIV c
 | Mod, MODI: R[a] := R[b] MOD c
 | CMP, CMPI: Z := R[b] = c; N := R[b] < c
 | CHKI: IF (R[a] < 0) OR (R[a] >= c) THEN R[a] := 0 END
 | LDW: R[a] := M[(R[b] + c) DIV 4]
 | LDB: (*not implemented*)
 | POP: R[a] := M[(R[b]) DIV 4]; INC(R[b], c)
 | STW: M[(R[b] + c) DIV 4] := R[a]
 | STB: (*not implemented*)
 | PSH: DEC(R[b], c); M[(R[b]) DIV 4] := R[a]
 | RD: Texts.Scan(in); R[a] := in.i
 | WRD: Texts.Write(W, " "); Texts.WriteInt(W, R[c], 1)
 | WRH: Texts.WriteHex(W, R[c])
 | WRL: Texts.WriteLn(W); Texts.Append(out, W.buf)
 | BEQ: IF Z THEN nxt := R[15] + c*4 END
 | BNE: IF ~Z THEN nxt := R[15] + c*4 END
 | BLT: IF N THEN nxt := R[15] + c*4 END
 | BGE: IF ~N THEN nxt := R[15] + c*4 END
 | BLE: IF Z OR N THEN nxt := R[15] + c*4 END
 | BGT: IF ~Z & ~N THEN nxt := R[15] + c*4 END
 | BR: nxt := R[15] + c*4
 | BSR: nxt := R[15] + c*4; R[14] := R[15] + 4
 | RET: nxt := R[c MOD 10H];
 IF nxt = 0 THEN EXIT END
 END ;
 R[15] := nxt
 END
 END Execute;
 PROCEDURE Load*(VAR code: ARRAY OF LONGINT; len: LONGINT);
 VAR i: INTEGER;
 BEGIN i := 0;
 WHILE i < len DO M[i + ProgOrg DIV 4] := code[i]; INC(i) END
 END Load;
BEGIN Texts.OpenWriter(W)
END RISC.

Sorry about the formatting.  Whitespace didn't copy clean.

"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
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

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


View Profile
February 04, 2014, 10:35:56 PM
 #29286

Well, okay. You could pay per operation.

Yes, I like it too.

More importantly, we need to define its external interfaces.

Say:

In NXT:
transactions allowed?
messages allowed?
etc.

Even further:
emails allowed?
tweets allowed?
etc.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:37:12 PM
 #29287


Could u use this texture - http://www.unsigneddesign.com/Slate%20Textures/12.jpg?

PS: Ornament doesn't look seamless in angles...
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:39:17 PM
 #29288

What about the VM outlined in N. Wirth's Compiler Construction?

I haven't heard about it so I can't answer.


This is it:

Code:
MODULE RISC; (*NW 27. 11. 05*)
 IMPORT SYSTEM, Texts;
 CONST MemSize* = 4096; ProgOrg = 2048; (*in bytes*)
 MOV = 0; MVN = 1; ADD = 2; SUB = 3; MUL = 4; Div = 5; Mod = 6; CMP = 7;
 MOVI = 16; MVNI = 17; ADDI = 18; SUBI = 19; MULI = 20; DIVI = 21; MODI = 22; CMPI = 23;
 CHKI = 24;
 LDW = 32; LDB = 33; POP = 34; STW = 36; STB = 37; PSH = 38;
 RD = 40; WRD= 41; WRH = 42; WRL = 43;
 BEQ = 48; BNE = 49; BLT = 50; BGE = 51; BLE = 52; BGT = 53; BR = 56; BSR = 57; RET = 58;
 VAR IR: LONGINT;
 N, Z: BOOLEAN;
 R*: ARRAY 16 OF LONGINT;
 M*: ARRAY MemSize DIV 4 OF LONGINT;
 W: Texts.Writer;
 (* R15] is PC, R[14] used as link register by BSR instruction*)
 PROCEDURE Execute*(start: LONGINT; VAR in: Texts.Scanner; out: Texts.Text);
 VAR opc, a, b, c, nxt: LONGINT;
 BEGIN R[14] := 0; R[15] := start + ProgOrg;
 LOOP (*interpretation cycle*)
 nxt := R[15] + 4; IR := M[R[15] DIV 4];
 opc := IR DIV 4000000H MOD 40H;
 a := IR DIV 400000H MOD 10H;
 b := IR DIV 40000H MOD 10H;
 c := IR MOD 40000H;
 IF opc < MOVI THEN (*F0*) c := R[IR MOD 10H]
 ELSIF opc < BEQ THEN
 (*F1, F2*) c := IR MOD 40000H;
 IF c >= 20000H THEN DEC(c, 40000H) END (*sign extension*)
 ELSE (*F3*) c := IR MOD 4000000H;
 IF c >= 2000000H THEN DEC(c, 4000000H) END (*sign extension*)
 END ;
 CASE opc OF
 MOV, MOVI: R[a] := ASH(c, b) (*arithmetic shift*)
 | MVN, MVNI: R[a] := -ASH(c, b)
 | ADD, ADDI: R[a] := R[b] + c
 | SUB, SUBI: R[a] := R[b] - c
 | MUL, MULI: R[a] := R[b] * c
 | Div, DIVI: R[a] := R[b] DIV c
 | Mod, MODI: R[a] := R[b] MOD c
 | CMP, CMPI: Z := R[b] = c; N := R[b] < c
 | CHKI: IF (R[a] < 0) OR (R[a] >= c) THEN R[a] := 0 END
 | LDW: R[a] := M[(R[b] + c) DIV 4]
 | LDB: (*not implemented*)
 | POP: R[a] := M[(R[b]) DIV 4]; INC(R[b], c)
 | STW: M[(R[b] + c) DIV 4] := R[a]
 | STB: (*not implemented*)
 | PSH: DEC(R[b], c); M[(R[b]) DIV 4] := R[a]
 | RD: Texts.Scan(in); R[a] := in.i
 | WRD: Texts.Write(W, " "); Texts.WriteInt(W, R[c], 1)
 | WRH: Texts.WriteHex(W, R[c])
 | WRL: Texts.WriteLn(W); Texts.Append(out, W.buf)
 | BEQ: IF Z THEN nxt := R[15] + c*4 END
 | BNE: IF ~Z THEN nxt := R[15] + c*4 END
 | BLT: IF N THEN nxt := R[15] + c*4 END
 | BGE: IF ~N THEN nxt := R[15] + c*4 END
 | BLE: IF Z OR N THEN nxt := R[15] + c*4 END
 | BGT: IF ~Z & ~N THEN nxt := R[15] + c*4 END
 | BR: nxt := R[15] + c*4
 | BSR: nxt := R[15] + c*4; R[14] := R[15] + 4
 | RET: nxt := R[c MOD 10H];
 IF nxt = 0 THEN EXIT END
 END ;
 R[15] := nxt
 END
 END Execute;
 PROCEDURE Load*(VAR code: ARRAY OF LONGINT; len: LONGINT);
 VAR i: INTEGER;
 BEGIN i := 0;
 WHILE i < len DO M[i + ProgOrg DIV 4] := code[i]; INC(i) END
 END Load;
BEGIN Texts.OpenWriter(W)
END RISC.

Sorry about the formatting.  Whitespace didn't copy clean.

How many unique opcodes here?
Fatih87SK
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500



View Profile
February 04, 2014, 10:39:46 PM
 #29289


I can use your texture. Thanks.

Angles are not seamless indeed. I'm struggling how I can do that nicely.

Maybe I can come to a solution. I will let you know with my next render.

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:40:58 PM
 #29290

Well, okay. You could pay per operation.

Yes, I like it too.

More importantly, we need to define its external interfaces.

Say:

In NXT:
transactions allowed?
messages allowed?
etc.

Even further:
emails allowed?
tweets allowed?
etc.

External interfaces r not allowed. If a script needs external data then it should be embedded into the blockchain using AM, aliases or something else.
xyzzyx
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


I don't really come from outer space.


View Profile
February 04, 2014, 10:41:42 PM
 #29291

How many unique opcodes here?

28 opcodes for that one.  It is only a starting point, though.

No, that's not right.  It's been a long time since I last looked at that code.  It's more, have to re-look.

"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: 1090


View Profile WWW
February 04, 2014, 10:43:20 PM
 #29292

Well, okay. You could pay per operation.

Yes, I like it too.

More importantly, we need to define its external interfaces.

Say:

In NXT:
transactions allowed?
messages allowed?
etc.

Even further:
emails allowed?
tweets allowed?
etc.

External interfaces r not allowed. If a script needs external data then it should be embedded into the blockchain using AM, aliases or something else.
Will a script be able to store data into an AM and then be able to access it a future block?
Data continuity is needed for scripts that interact with external blockchains.


http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:43:43 PM
 #29293

How many unique opcodes here?

28 opcodes for that one.  It is only a starting point, though.

No, that's not right.  It's been a long time since I last looked at that code.  It's more, have to re-look.

Very good if it's 28, coz I know only a solution with 32 opcodes.
^[GS]^
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 04, 2014, 10:44:50 PM
 #29294

Anyone know when version 0.6.0 comes out and that would change? Smiley
I am eager!
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

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


View Profile
February 04, 2014, 10:45:00 PM
 #29295

Well, okay. You could pay per operation.

Yes, I like it too.

More importantly, we need to define its external interfaces.

Say:

In NXT:
transactions allowed?
messages allowed?
etc.

Even further:
emails allowed?
tweets allowed?
etc.

External interfaces r not allowed. If a script needs external data then it should be embedded into the blockchain using AM, aliases or something else.

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.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:46:17 PM
 #29296

Will a script be able to store data into an AM and then be able to access it a future block?
Data continuity is needed for scripts that interact with external blockchains.

Yes, a script will be able to store any data via AM.
brooklynbtc
Sr. Member
****
Offline Offline

Activity: 336
Merit: 250

AKA jefdiesel


View Profile
February 04, 2014, 10:48:48 PM
 #29297



looks like a fancy chocolate birthday cake

SN
S   U   P   E   R    N   E   T
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀   
Uniting cryptocurrencies, Rewarding talent, Sharing benefits..

Blockchain Technology.

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2128
Merit: 1009

Newbie


View Profile
February 04, 2014, 10:48:48 PM
 #29298

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.
freigeist
Hero Member
*****
Online Online

Activity: 951
Merit: 502


View Profile
February 04, 2014, 10:52:50 PM
 #29299

How many unique opcodes here?

28 opcodes for that one.  It is only a starting point, though.

No, that's not right.  It's been a long time since I last looked at that code.  It's more, have to re-look.

Very good if it's 28, coz I know only a solution with 32 opcodes.

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/

ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

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


View Profile
February 04, 2014, 10:53:28 PM
 #29300

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

You already answered jl777's question with that it should be possible to access env-outside data.

To me, the virtual env is inside and everything beyond that is outside. So, the blockchain is like an SSD holding more data to be read by the program.

We need special access functions/ops or memory blocks for that.

(Regarding going beyond NXT, say Email or other external services... I don't know. But would like to have them just in case.)
Pages: « 1 ... 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 1509 1510 1511 1512 1513 1514 1515 ... 2567 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!