@venezia is on PowPing!

PowPing is a place where you can earn Bitcoin simply by socializing, for FREE.
Never tried Bitcoin? It's OK! Just come, socialize, and earn Bitcoin.
Check out venezia's activities

Bitcoin Script

visit channel home
Total Economy: 0.34 USD
The looping part can be optimize to: OP_DUP OP_IF OP_TOALTSTACK OP_OVER OP_MUL OP_FROMALTSTACK OP_1SUB OP_ENDIF ( I use MiniForth to write it for convience. The do..loop will read the previous two parameters as the `stop` and `start` of loop at compile time, and default step is 1. )
adonsats tipped:
0.01 USD
1 year ago
adonsats tipped:
0.01 USD
1 year ago
covid replied:
Damn, need to try MiniForth one day, and indeed your script is much better !
venezia replied:
I am porting MiniForth to Javascript so that everyone can use it directly in the browser. And I wish we can embed MiniForth in sCrypt one day.
adonsats replied:
REST WELL miniforth with my money šŸ˜‡
light replied:
That's an interesting idea, a Forth implementation within a Javascript framework, on top of a Forth implementation.
adonsats replied:
there is an IF without ELSE in the code?
venezia replied:
@adonsatd Yes, we can use IF without ELSE like other languages.
So it would be like, if stack is a b OP_1 ; so right now the stack is a b c, with c=1 ;-- OP_1 OP_PICK ; a b c b OP_0 OP_EQUAL ; a b c (b==0) OP_IF OP_DUP OP_RETURN ; wtf ???? scrypt.studio is burning my top stack when I op_return within an OP_IF OP_ELSE ; a b c OP_2 OP_PICK ; a b c a OP_MUL ; a b (c*a) OP_1 OP_PICK ; a b (c*a) b OP_1SUB ; a b (c*a) (b-1) OP_ROT OP_ROT ; a (b-1) b (c*a) OP_NIP ; a (b-1) (c*a) OP_ENDIF ;-- Copy that 10 times.. Could be better (fast exponentiation, b>0 is not used here) but I did it by hand so I'm kinda proud ! So if you want to play with it on scrypt.studio Unlocking script : a b Locking script : OP_1 OP_1 OP_PICK OP_0 OP_EQUAL OP_IF OP_DUP OP_RETURN OP_ELSE OP_2 OP_PICK OP_MUL OP_1 OP_PICK OP_1SUB OP_ROT OP_ROT OP_NIP OP_ENDIF OP_1 OP_PICK OP_0 OP_EQUAL OP_IF OP_DUP OP_RETURN OP_ELSE OP_2 OP_PICK OP_MUL OP_1 OP_PICK OP_1SUB OP_ROT OP_ROT OP_NIP OP_ENDIF OP_1 OP_PICK OP_0 OP_EQUAL OP_IF OP_DUP OP_RETURN OP_ELSE OP_2 OP_PICK OP_MUL OP_1 OP_PICK OP_1SUB OP_ROT OP_ROT OP_NIP OP_ENDIF OP_1 OP_PICK OP_0 OP_EQUAL OP_IF OP_DUP OP_RETURN OP_ELSE OP_2 OP_PICK OP_MUL OP_1 OP_PICK OP_1SUB OP_ROT OP_ROT OP_NIP OP_ENDIF OP_1 OP_PICK OP_0 OP_EQUAL OP_IF OP_DUP OP_RETURN OP_ELSE OP_2 OP_PICK OP_MUL OP_1 OP_PICK OP_1SUB OP_ROT OP_ROT OP_NIP OP_ENDIF ... The copy pasting part is OP_1 OP_PICK OP_0 OP_EQUAL OP_IF OP_DUP OP_RETURN OP_ELSE OP_2 OP_PICK OP_MUL OP_1 OP_PICK OP_1SUB OP_ROT OP_ROT OP_NIP OP_ENDIF If you test with OP_4 OP_3 for the unlocking script you will get 40 as a result, wich is 64 = 4^3 in hex. Wow that was boring. Would love to work on scrypt btw, do they want to hire any intern ? Could be cool to either prove it (so that the transcription of a scrypt to a script is 100% correct, I guess when money is involved it's a nice thing to have), or work on the "optimization part" so that the resulting script is the cheapest possible. I took some compilation course maybe I can be usefull somehow.
venezia tipped:
0.01 USD
1 year ago
xhliu replied:
Shoot me an email at x.liu@scrypt.io for intern opportunity.
licnep tipped:
0.32 USD
1 year ago
venezia tipped:
0.01 USD
1 year ago
covid replied:
Email sent, thanks a lot !
adonsats replied:
OP_DUP OP_RETURN ; wtf ???? scrypt.studio is burning my top stack when I op_return šŸ˜‚šŸ˜‚šŸ¤£ forth is a burning head bro! you could read starting forth book... the kingping of programming
covid replied:
Added to my reading list thanks !