Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Manwë
@Manwe-777
Yeah this is definitely not like a blockchain :D
but the principles of authorization and ownership verification are the same
Filipe Vieira
@fsvieira

Found the problem,

const GUN = require('gun');

const gun = GUN(/*{localStorage: false, radisk: false}*/);

const alice = gun.get('alice').put({name: 'alice'});
const bob = gun.get('bob').put({name: 'bob'});

const users = gun.get('users');

users.map().on(user => console.log(user));

users.set(alice)
users.set(bob);

alice.get('friends').map().on((friend, k) => console.log("Alice Friend", friend, k));

alice.get('friends').set(bob);
alice.get('friends').set(alice);

So apparently I can't disable storage, so is there a way to run gun only in memory ?

Jasper Molgvits
@jaspermolgvits_gitlab
I think you need to run this before running GUN() to disable localstorage:
localStorage.clear();
rococtz
@rococtz:matrix.org
[m]
@fsvieira: Your example about friends it's only good to see how gun saves data, but it's not good for actually storing friends. You saved them using gun.get('users') which means they are in the public space which everyone edit/delete.
1 reply
If you want to store data that nobody can edit/delete, you have to save it in your own user sub-graph
gun.user().get('friends') (as opposed to gun.get('users')
Filipe Vieira
@fsvieira
@rococtz:matrix.org Hi, Thanks for the tip I didn't know that. But right now I am just experimenting with gun, and security or other users are not a concern right now. I am running this on node, and I would like to put this on unit tests of my project so having gun running only in memory it would be nice to have. So is there a way to run this only in memory, I was checking file adapter but it seems not to work with this example, it seems only to work with radisk.
rococtz
@rococtz:matrix.org
[m]
@fsvieira: I don't know how you can you do memory only, you probably have to build your own adapter. Maybe @amark can help you with some advice
tedd pasta
@resession
is app.element.io down for anyone?
rococtz
@rococtz:matrix.org
[m]
@resession: works for me
Connor Davis
@connor-davis
Keep in track of the LoneWolf Development - https://github.com/users/connor-davis/projects/1
petertjmills
@petertjmills
I want to use gun as a local graphdb solution (as there doesn't seem to be many out there) and gun looks great. All I really want it to do is stay in sync with a graphQL server. Presumably I will need to write an adapter, but I have 2 questions if any one if kind enough to answer. Is gun going to be overkill for just using as a local state management system, with all of the decentralization features, or will there be lots of overhead? And if not what is the easiest way to go about writing an adapter for a graphQL backend?
tedd pasta
@azdez:matrix.org
[m]
Is pagination and support for arrays planned for gundb?
Aspirational
@aspirational:matrix.org
[m]
Hey. Can we somehow check if subscription (.on) exists and if true do not subscribe on receiving this data again?
Norman 🔰
@nouman22194_twitter

Hi, I'm new to gun, just tried on local and now can store my first graph node

I'm wondering, will my stored data synchronized to other peers even though I'm not setting the peers at the start like the one mentioned in documentation here ?

Connor Davis
@connor-davis
Not unless you use gun.opt({ peers: ["peer url"] })
But, if you dont provide peers, and you have axe enabled I am pretty sure it will sync
Sam Mosna
@sammosna
I saw @resession fork about unset. I think I'm missing something because it still does not work.. Can you please provide a working example?
Barłomiej Bąk
@dweorh_twitter
hey guys, Does anyone knows how to off .map()?
I have something like gun.get('nodes').map().once(console.log) and I can't find a way to stop that map()
gunchatbridge
@gunchatbridge
[D]Dletta: ping
Mark Nadal
@amark
Everyone: @connor-davis @Dletta @Manuel-777 and I are doing a DHT + AXE call in 40min on meething (I'll paste link when I get back on laptop). I'll catch up with chats later today.
Connor Davis
@connor-davis
Sweet
Mark Nadal
@amark
  • @mmalmi of Iris and who is doing the Rust port
(that was suppose to be a + but it got turned into a bullet)
Mark Nadal
@amark
@Manuel-777 @connor-davis @mmalmi @Dletta link: https://us.meething.space/?room=marknadal&mesh=true
I can't see or hear either of you
Connor Davis
@connor-davis
You cant hear me?
Shoot
Mark Nadal
@amark
try refreshing?
Jachen Duschletta
@Dletta
try without mesh
might be a NAT issue
^^^^ new link,
@Dletta looks like meethign space relay is down
Martti Malmi
@mmalmi
I don’t see anyone without mesh=true
Mark Nadal
@amark
sfu.meething fails to connect
Connor Davis
@connor-davis
Same
Manwë
@Manwe-777
Same
Mark Nadal
@amark
:sob: I want to dogfood. But should we use zoom since we prob have more than 6-ish people?
Connor Davis
@connor-davis
Agreed
Barłomiej Bąk
@dweorh_twitter
btw. do you guys record those meetings and share them later, or there are private?
Mark Nadal
@amark
if someone is able to record that'd be gret
great
can someone generate a zoom link :sob:
Connor Davis
@connor-davis
Will now
Mark Nadal
@amark
I actually don't know how to create zoom links cause I use meething all the time
thanks connor
Martti Malmi
@mmalmi
I’ve used meet.google.com