vinney on Nostr: From a persisted function’s perspective, there are two sources of data: its own and ...
From a persisted function’s perspective, there are two sources of data: its own and that which gets submitted from the outside.
the function is entirely responsible for the shape of its own data. it can add timestamps to it if it wants but they’re not there by default since there is no default.
all of the data coming in from the outside is the result of a “system call” which the persisted function had previously made, but beyond being associated with that system call, there is no metadata associated with it. one such system call you can make is to ask for the current time.
we try to do as little as possible in the runtime. anything which can be offered using software inside the system, should be. what you’re describing could be a library.
though i suspect that i don’t exactly get what you’re saying with fresh vs stale. my first thought is that if you’re concerned with this, you should ask your data sources to tag their data with time or sequence numbers, or do so yourself at insertion. but the data that we insert might not come from the outside, we could for example discard the input and update our state by simply incrementing it by one, or something. should the new state have the same timestamp as the input, or as the previous state?
Published at
2024-08-09 12:43:50Event JSON
{
"id": "8bab7054ca286c92a03aa4183748fbda992cf2c3f8c3557ef27a8aaee51c1328",
"pubkey": "2efaa715bbb46dd5be6b7da8d7700266d11674b913b8178addb5c2e63d987331",
"created_at": 1723207430,
"kind": 1,
"tags": [
[
"e",
"74f0f7005abe68d076743f14c2f3181d22947e4b69832a1f548fe3b6fc4a7b3a",
"",
"root"
],
[
"e",
"98dc1ae928de000fe6eb63536aa93c190c1af8b937ad673678b94568d9b7107d"
],
[
"e",
"b602209aca41fef35a3dcb092f095c2ad88240babae884de852de98541d808d5",
"",
"reply"
],
[
"p",
"2efaa715bbb46dd5be6b7da8d7700266d11674b913b8178addb5c2e63d987331"
],
[
"p",
"1e908fbc1d131c17a87f32069f53f64f45c75f91a2f6d43f8aa6410974da5562"
]
],
"content": "From a persisted function’s perspective, there are two sources of data: its own and that which gets submitted from the outside. \n\nthe function is entirely responsible for the shape of its own data. it can add timestamps to it if it wants but they’re not there by default since there is no default.\n\nall of the data coming in from the outside is the result of a “system call” which the persisted function had previously made, but beyond being associated with that system call, there is no metadata associated with it. one such system call you can make is to ask for the current time. \n\nwe try to do as little as possible in the runtime. anything which can be offered using software inside the system, should be. what you’re describing could be a library. \n\nthough i suspect that i don’t exactly get what you’re saying with fresh vs stale. my first thought is that if you’re concerned with this, you should ask your data sources to tag their data with time or sequence numbers, or do so yourself at insertion. but the data that we insert might not come from the outside, we could for example discard the input and update our state by simply incrementing it by one, or something. should the new state have the same timestamp as the input, or as the previous state?",
"sig": "1a6c25720edbb9c9415330d3854818eba832091f0e4a0773c162c55dff232340ae5064a561ae214adef7da0fba8015e6bb9ccbe596a7b008826be7df6fbaa4e0"
}