OP_CHECKSEQUENCEVERIFY: why to put it into nSequence field if it is already into the script?

1
...
0 0
2
diff -r c89630a122b4 src/share/vm/c1/c1_GraphBuilder.cpp --- a/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/src/share/vm/c1/c1_GraphBuilder.cpp @@ -1459,7 +1459,7 @@ monitorexit(state()->lock_at(0), SynchronizationEntryBCI); } - if (need_mem_bar) { + if (need_mem_bar || AlwaysSafeConstructors) { append(new MemBar(lir_membar_storestore)); } @@ -1510,7 +1510,7 @@ append_split(new MonitorExit(receiver, state()->unlock())); } - if (need_mem_bar) { + if (need_mem_bar || AlwaysSafeConstructors) { append(new MemBar(lir_membar_storestore)); } diff -r c89630a122b4 src/share/vm/opto/parse1.cpp --- a/src/share/vm/opto/parse1.cpp +++ b/src/share/vm/opto/parse1.cpp @@ -907,7 +907,7 @@ Node* iophi = _exits.i_o(); _exits.set_i_o(gvn().transform(iophi)); - if (wrote_final()) { + if (wrote_final() || AlwaysSafeConstructors) { // This method (which must be a constructor by the rules of Java) // wrote a final. The effects of all initializations must be // committed to memory...
0 0
3

I have a game object prefab, say myPrefab.

On myPrefab, I have a script attached, which contains this line (I want myPrefab to follow ObjectToFollow, but that is irrelevant):

var ObjectToFollow: GameObject;

So now in the inspector, when I have myPrefab selected, under the aforementioned script theres: Object To Follow _______None (Game Object)

In the None (Game Object) field, I can drag and drop any other prefab.

I cannot however, drag and drop any game object from the Hierarchy into the None (Game Object) field. What should I do to put my gameObject to the Object To Follow slot in the Inspector?

The problem is that the ObjectToFollow is the main object of the game and it is already in the Hierarchy when the level begins.

I suppose theres something really basic that Im missing...

0 0
4
Into The Wild Script - transcript from the screenplay and/or the Emile Hirsch movie Voila! Finally, the Into The Wild script is here for all you fans of the Emile Hirsch movie from Sean Penn. This puppy is a transcript that was painstakingly transcribed using the screenplay and/or viewings of the movie to get the dialogue. I know, I know, I still need to get the cast names in there and all that jazz, so if you have any corrections, feel free to drop me a line. At least you'll have some Into The Wild quotes (or even a monologue or two) to annoy your coworkers with in the meantime, right? And swing on back to Drew's Script-O-Rama afterwards -- because reading is good for your noodle. Better than Farmville, anyway.

Into The Wild Script

Mom! Mom! Help me. What is it? I wasn't dreaming, Walt. I didn't imagine it. I heard him. I heard him. I heard him. I heard Chris. - I heard him! - I know. No. I wasn't imagining it, Walt. No, I did. He's... He's... - I heard...
0 0
5

For triggers, procedures, views and exceptions you can use CREATE OR ALTER syntax. But what happens when you want to add a column only if it does not already exist in a table.

If you use Firebird 2.0 or above, there is no need to program, you can write SQL script to do the job. You can run IF EXISTS in PSQL combined with EXECUTE STATEMENT to create the object. However, this needs to be wrapped in DDL block to work and this is where EXECUTE BLOCK statement gets in.

Here's an example how to add an integer field named C1 to table T1, if such field does not exist already:

EXECUTE block as
BEGIN
if (not exists(
select 1 from RDB$RELATION_FIELDS rf
where rf.RDB$RELATION_NAME = 'T1' and rf.RDB$FIELD_NAME = 'C1'))
then
execute statement 'ALTER TABLE T1 ADD C1 INTEGER';
END

If you use Firebird 1.5, there is not EXECUTE BLOCK available, but you can put this code into a stored procedure, like this:

...

0 0
6

I'm still alive but I'm barely breathing

Я все еще жив, но едва дышу,

Just prayed to a god that I don't believe in

Просто молюсь богу, в которого не верю.

Cos I got time while she got freedom

У меня есть время, а у неё - её свобода,

Cos when a heart breaks no it don't breakeven

Ведь когда сердце разбито его нельзя разбить вновь...

Her best days will be some of my worst

Самое счастливое время для нее было самым худшим для меня,

She finally met a man thats gonna put her 1st

Она наконец встретила свою любовь.

While I'm wide awake she's no trouble sleeping

Я теперь страдаю от бессонницы, хотя у неё нет такой проблемы,

Cos when a heart breaks no it don't breakeven even no

Ведь когда сердце разбито его нельзя разбить вновь...

What am I supposed to do when the best part of me was always you

Что же мне теперь делать, если лучшим в моей жизни всегда была ты?

What am...

0 0
7

They do not serve the same function.

Putting a relative locktime in the nSequence value means "this transaction cannot be mined until its input is at least that old".

Putting a relative locktime with OP_CSV in the script means "Require that the transaction spending this sets an nSequence of at least this value".

The reason why they are split up is to make transaction validation independent of time. If the value passed to OP_CSV would be compared against the time directly, and it failed, there would be no way to distinguish whether the transaction is just outright invalid or it's due to a temporary locktime/nsequence constraint.

In other words: splitting them up allows up to see the spending transaction, verify it once, and know for certain that it's valid. We never need to evaluate it again, as this validity never changes; if it is valid once, it is valid always. The question of when it can be mined remains independent of this, and can easily be checked...

0 0
8

The latest development in the Bitcoin ecosystem appears to be the source of some confusion within the community, with some Bitcoin users experiencing misinformation regarding the actual purpose of the changes. Bitcoin developers have been discussing the proposed changes for some time and describe both the motivation for the changes, and the implementation in some detail here.

To put it simply, CSV, or CHECKSEQUENCEVERIFY is a new opcode for use within the Bitcoin scripting system, essentially it is an amended version of an existing opcode known as NOP3. Bitcoin scripting provides a system which enables a variety of different parameters to be required before transferred bitcoins may be spent. A typical transaction between two parties has two requirements that must be fulfilled before its output is spendable; the public key must correspond to the destination address, and match the private key signature. Bitcoin scripts can also be used to require multiple signatures before a...

0 0
9

Once again my attempt to summarize and explain the weekly bitcoin developer meeting in layman's terms.
Link to last weeks summarization

Disclaimer

Please bear in mind I'm not a developer and I'd have problems coding "hello world!", so some things might be incorrect or plain wrong.
Like any other write-up it likely contains personal biases, although I try to stay as neutral as I can.
There are no decisions being made in these meetings, so if I say "everyone agrees" this means everyone present in the meeting, that's not consensus, but since a fair amount of devs are present it's a good representation.
The dev IRC and mailinglist are for bitcoin development purposes. If you have not contributed actual code to a bitcoin-implementation, this is probably not the place you want to reach out to. There are many places to discuss things that the developers read, including this sub-reddit.

link to this week logs
Meeting minutes by...

0 0