-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add gelf, a gunified elf for managing pvp hypergraphs from elf world #1389
base: master
Are you sure you want to change the base?
Conversation
my favorite @tylerchilds ! :) 3 questions / concerns:
|
thanks for the time @amark!
More in 2.
https://github.com/tylerchilds/plan98/blob/plan98/client/public/module.js#L81 compared to in this PR, where the this variable can be exposed to be controlled by the intersection of gun+elf/tag as the brain. in my research, different approaches to atomically read,write, and react to data is slightly so different, that it would be more complicated to create a generic interface that I could comfortably call a definitive version of tag. in this fork of gun+elf/tag, I use this to anticipate a seed that can serve as a root node in a gun graph: binding this, which is { seed: 'something'} The contract I expect out of any elf/tag fork is that there's an html tag that can be utilized by hypertext authors. For context, this is a pure braid fork of elf/tag back to innerHTML, if it makes sense in the gun fork to throw a sanitizer around innerHTML, we can do that or we can pull in the vdom library i use in plan98 and we can disable scripts on innerHTML. I can also back this out entirely, I added this to make it easier to interface the lower level internals of the elf/tag data structures with guns as an opinionated fork by both authors.
From my end, it'll be easier to work off this fork as a baseline for that to maintain compatibility with the learn/teach functions to make sure the arrays are backwards compatible with elves that might get ported from their current local state to a more hyper state with gun. |
@amark i went ahead and added the array code to this pr |
@@ -1250,6 +1250,9 @@ | |||
} | |||
k && (to.path || (to.path = [])).push(k); | |||
if(!(v = valid(d)) && !(g = Gun.is(d))){ | |||
if(as.array && d instanceof Array) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is built from files in src, so you're going to have to add this change in src/put.js
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, thanks, added!
removed the innerHTML logic on gelf/note.html and added gelf/array-test.html i started updating gelf.js to use the gun.open api instead of JSON.stringify and JSON.parse, but need to investigate further what I might be missing. can push a wip commit with the broken state. |
This pull request binds a gun to a custom element generator and ports the basic/note.html example into it
The gelf.js file needs performance improvements before it is ready for production use. Currently, it stringifys the graph fragment for the custom element's data table as it goes into and out of the gun.
gelf.js support atomic data operations with the $.teach and can be reflected in gun per field to be the most optimized. In order to support this, gelf will need support for arrays as a primitive data structure.
We will solve the performance issues in the future as the existing is performant enough as gelf is an entity component system that drives towards shallow graph fragments.
Also to be solved in the future is the default router to support returning .js, such as the hello-world.html example that currently fails to resolve hello-world.js