Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 23:49
    amark commented #259
  • 14:34
    alfonsocuccaro commented #259
  • 14:15
    draeder commented #259
  • 08:41
    alfonsocuccaro commented #259
  • 04:58
    amark commented #259
  • Jun 29 00:31
    fysoul17 commented #743
  • Jun 28 19:31
    noctisatrae commented #1258
  • Jun 28 19:31
    noctisatrae commented #1258
  • Jun 28 19:30
    noctisatrae commented #1258
  • Jun 28 19:30
    noctisatrae commented #1258
  • Jun 28 17:05
    bmatusiak commented #1258
  • Jun 28 17:00
    bmatusiak commented #1258
  • Jun 27 21:52
    noctisatrae commented #1258
  • Jun 27 21:06
    noctisatrae commented #1258
  • Jun 27 21:04
    noctisatrae commented #1258
  • Jun 27 21:03
    noctisatrae commented #1258
  • Jun 27 02:00
    bmatusiak commented #1258
  • Jun 26 22:29
    noctisatrae reopened #1258
  • Jun 26 22:29
    noctisatrae commented #1258
  • Jun 26 21:43
    amark commented #1258
Jachen Duschletta
@Dletta
[D]anoxy: <@!280426612900757504> yes I am aware of that, but the nodeKeys are still there and probably withs data as well preserved at root, so whener I add a nodeKey back its content will be back or am I wrong <@!612728945313316904> ?
[D]vegardkrogh: <@!366349503265112074> thank you! I'll try to update the documents with as many sensible approaches as I can find. But I really think that https://github.com/irislib/iris-lib is a great example of proper usage of GUN in a library, but it's hard to make an approach like this fit the format of documentation examples
[D]anoxy: <@!139291366869041153> thanks I will test your coding.
indeed iris-lib is good, but I think we need more simple demos for making people to get used to both GUN and Svelte 🙂
Jachen Duschletta
@Dletta
[D]anoxy: Ok guys, I have issues now with deleting a node and later on adding some data to it.
https://jsbin.com/rorezebaho/edit?html,js,console,output

[D]anoxy: basically I add data to a node with:
user.get('notes').get('category').get(Gun.time.is()).put(objectData);

and I delete all the data with:
user.get('notes').get('category').put(null);

this works without any problems.... BUT I cannot add more data to that node again after setting it to null

so if I do this again:
user.get('notes').get('category').get(Gun.time.is()).put(objectData);

the data isnt added at all even though I cannot see the result of the object in the Console

[D]anoxy: please check the link above and tell me what I am doing wrong
[D]anoxy: note that I can delete nodeKeys without any problems, but this user.get('notes').get('category').put(null); doesnt work
Jachen Duschletta
@Dletta
[D]anoxy: Is this perhaps a bug?
pszabop
@pszabop
@amark in the bug I filed regarding the internal timeout errors (warnings?) I was able to reproduce it with just callbacks. Add a delay of about 10-20 seconds to the end of a test, they'll show up.
Jachen Duschletta
@Dletta
I sent you a DM
pszabop
@pszabop
@amark I'm starting to use ETL / scatter gather and once I get used to the idiosyncrasies of the Gun API it seems to work fine so far. In fact I'm writing a lightweight wrapper to hide the idiosyncrasies and I'd be happy to share when I've got something more substantial
Jachen Duschletta
@Dletta
[D]bmatusiak: <@!366349503265112074> i was able to re init the scope like
    user.get('notes').get('category').put({init:Gun.time.is()})
  });
[D]bmatusiak: so to you can do this to add them instead
var $gk = {};
  $gk[Gun.time.is()] = objectData;
    user.get('notes').get('category').put($gk)
Jachen Duschletta
@Dletta
[D]Dletta: <@366349503265112074> if you had other data on your key it will be back
[D]Dletta: But if you null them all out, then it will just show nulls
Jachen Duschletta
@Dletta

[D]anoxy: <@280426612900757504> by re-init do you mean: get back the node data ?

<@612728945313316904> so in other words, if I put null on a node for ie in my case if I do null on category by get('category') then only the node itself gets nulled, any other data or keyNodes which belongs to that node will still be present in the root right ?

[D]anoxy: How can I null out all data and nodeKeys which belongs to a nodem
[D]anoxy: <@280426612900757504> but why cannot I only use the regular method by using put(someData) in a node which has been nulled ?
[D]anoxy: I think this is an odd behavior, I should at least be able to use the regular put(someData) in a
nulled node.
Jachen Duschletta
@Dletta

[D]anoxy: @anoxy if you had other data on your key it will be back

<@612728945313316904> you wrote like this, can you please provide an example of this after using null on the node ?

[D]Dletta: So category only contains a reference to a sub node, so putting null there only removes the reference to the subnode, but subnode isn’t deleted. To delete a subnode you start at the lowest node you want delete and slowly work up nulling each property
Jachen Duschletta
@Dletta

[D]anoxy: How is that done in a smooth way ?
And yeah null only deletes the references I got that part, but why cannot I add new references to the nulled node ? This can be seen here
https://jsbin.com/rorezebaho/edit?html,js,console,output

Create a user and login, add some categories, and then delete the node. And try to add new categories. It just doesn't work. <@280426612900757504> sent some code to make it works but I think it should still be possible to give new references to a nulled node with put

[D]bmatusiak: i see, setting it as null i think stops it from adding props/more paths/nodes so setting a object with some data re-enables paths, so it a possible bug
[D]bmatusiak: like in js if you have var testing = null and do testing.something = "hello" it fails
Jachen Duschletta
@Dletta
[D]bmatusiak: but gun does reference it to root
[D]Dletta: testing = {}
[D]Dletta: You should first turn it back into an object , no?
[D]bmatusiak: yea exactly
[D]bmatusiak: thats what im thinking
[D]Dletta: Because null is not an object
[D]Dletta: <@366349503265112074> put {}
[D]Dletta: See if that works
[D]bmatusiak: yea he tried
[D]bmatusiak: <@!366349503265112074> https://pastebin.com/MDtwdHt5 this is what i have @ line 49
Jachen Duschletta
@Dletta
[D]bmatusiak: does anybody where use requirejs?
Jachen Duschletta
@Dletta
[D]anoxy: <@612728945313316904> I am mobile now but yeah it seems that put({}) works , didn't know that null in GUN acted exactly as in JS . Thanks .
Jachen Duschletta
@Dletta

[D]anoxy: <@280426612900757504> thanks for giving me a solution as well.

But now to my question if I want to delete all data and keys belonging to a node .
In my case it is :
user.get('notes').get('category')
Where it's "data" has the structure:

{Gun.time.is(): 
 {name: 'some text', prop2: 'some other text'},
Gun.time.is(): 
 {name: 'some text', prop2: 'some other text'}
}
Jachen Duschletta
@Dletta

[D]keymaker91: <@!178314946201780224> Thank you for the elaborate response. I understand your thought process, your ideas and the way you are pushing gun forward. Kudos to you for building such an amazing community and having such wonderful rhetorics.

GitHub counts comments/feedback as contributions. For the sake of great ideas behind gun, I hope you are counting them as well.

I have nothing else to contribute

Jachen Duschletta
@Dletta
[D]bmatusiak: <@!366349503265112074> <@!612728945313316904> amark/gun#865 its a start to use requirejs
Jachen Duschletta
@Dletta
[D]mhelander: I'm likely asking this again, but here it goes: what's lightweight, nice and good alternative CMS for Wordpress, which is (web-) programmer friendly?
Need to start lean & easy, but tinkering that in near future it'll get plenty of easy to use functionality and maybe Gun based chat or other features...
It must be great for both (desktop/tablet) browser and mobiles too. Some admin features are fine, but more complex issues via source editing etc will be my troubles thus likely not problem...
[D]mhelander: Ah, and I'm targeting to bargain hosting costs, like Hetzner sub-2€ monthly subscription or like. That seems to like PHP (not my favorite), so if any better global alternatives with great traffic capacity (for the future) with low cost is also nice... if managing videos etc fat media in future
Jachen Duschletta
@Dletta
[D]mhelander: In my past setup dedicated server in Hetzner and that was both cheap and extremely well working deal. No traffic cap or costs. Now trying to do leaner, but so that not blocking future expansion if it happens
[D]mhelander: PageKit https://pagekit.com/ looks promising, free, PHP+MySQL and Vue.js...
Jachen Duschletta
@Dletta
[D]RobChristian: <@!621036850697601053> wordpress is a nightmare. Some good alternatives: Expression Engine, OctoberCMS
[D]mhelander: I know, had professional integration experience with it, some customers were using custom themes/plugins with WP and we had nightmares to get our SaaS Chat service to work in those...
[D]RobChristian: Looking for a good CMS is originally what brought me to look at Gun. I've decided to instead to use Gatsby and Firebase to make an interactive React-based page, which can then be rendered out to static HTML for publishing.
Jachen Duschletta
@Dletta
[D]vegardkrogh: <@!621036850697601053> Try https://www.sanity.io for a generic CMS that delivers your content through and API and fits any type of client/build step
Jachen Duschletta
@Dletta
[D]bmatusiak: iven been working on a cms for a few years, called welder, and peersocial is going to replace it
[D]bmatusiak: the first use-case of welder became a point of sale, https://github.com/bmatusiak/welder-pos