Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 21:03

    amark on master

    subscribe only on backpropagati… Merge branch 'master' of http:/… PANIC 4: AXE get subscriptions (compare)

  • Aug 13 18:58

    amark on master

    Panic tests for rod & radix.js … (compare)

  • Aug 13 18:58
    amark closed #1269
  • Aug 13 18:57
    amark commented #1269
  • Aug 13 01:17
    amark commented #1271
  • Aug 10 23:56

    amark on master

    reduce not-found acks if via/re… test undo tmp (compare)

  • Aug 10 21:45
    amark updated the wiki
  • Aug 10 20:18
    amark commented #1271
  • Aug 10 18:47
    amark commented #1268
  • Aug 10 18:16
    amark commented #1271
  • Aug 10 16:57
    draeder commented #1271
  • Aug 10 16:56
    draeder commented #1271
  • Aug 10 12:10
    mmalmi synchronize #1269
  • Aug 10 11:59
    draeder commented #1271
  • Aug 10 11:55
    draeder commented #1271
  • Aug 10 11:37
    draeder commented #1271
  • Aug 10 05:54
    Azarattum commented #1271
  • Aug 10 05:15
    Azarattum commented #1271
  • Aug 09 22:58
    draeder commented #1271
  • Aug 09 22:33

    amark on master

    unbuild - PUBLISHED! 1238 (compare)

Mark Nadal
@amark
ok, gotta wake up in 5 hours :( cheers, cya!
(oh last comment: eventually one of these games is gonna explode, and AXE already cant handle the existing millinos of users, so we need need need DHT team to get things scaling ASAP! For the existing users, let alone for intense apps like gaming, will be even more performance/benchmark needing!)
Connor Davis
@connor-davis
Sweet @amark
James
@u007
@amark ive a stopper issue with nodejs where it hang on auth function, can u help?
lain
@lain:iwakura.xyz
[m]
lain
@lain:iwakura.xyz
[m]
ill try esbuild out
Robin Bron
@finwo
Unless you're doing a lot of metadata reflection things in typescript, esbuild works pretty well (and fast) for most platforms (node, browser, etc)
lain
@lain:iwakura.xyz
[m]
still getting the warnings with esbuild
Robin Bron
@finwo
Then at least it's not webpack specific.
@amark Any idea what section of gun may produce that warning?
lain
@lain:iwakura.xyz
[m]
i think it might be causing issues with my vercel build of the site but not 100% sure
it works locally, but on the vercel site im getting this error
may be unrelated to gun tho
Robin Bron
@finwo
That's trying to perform regular math between a bigint and a number, so probably something like bigint(5) * 12
6 replies
Manwë
@Manwe-777
yeah @amark 11am CA works for me too !
lain
@lain:iwakura.xyz
[m]
i dont use bigints anywhere, wasn't sure if gun did or something
Zlynt
@Zlynt
Greetings,
Does anyone know if Gun uses too much data when being used in a mobile app (when compared to a mobile app using a centralized architecture)?
James
@u007
Ya i think tend to sync data from all peers including clients
Robin Bron
@finwo
The n notation, so the 19n for example, are bigints
@lain:iwakura.xyz That line is fully using bigints, not mixing types, so that issue is rather odd
lain
@lain:iwakura.xyz
[m]
i found this which seems to be the same thing, doesnt look like a gun issue
Filipe Vieira
@fsvieira
Hi, I am new to gun, and I have a very basic question but its confusing me a lot. I am trying to make the friends example but I don't understand how to get/listen to alice friends. My code looks like this:
const GUN = require('gun/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 => console.log("Alice Friend", friend));

alice.get('friends').set(bob);
But alice.get('friends').map ... doesnt print anything.
Jasper Molgvits
@jaspermolgvits_gitlab

AFAIK you can just do:
gun.get('friends').get('name').put('alice')
gun.get('friends').get('name').put('bob')

Currently you're not putting anything into 'friends'.

Filipe Vieira
@fsvieira
I don't understand, I am making bob alice friend ?
on the last line
Jasper Molgvits
@jaspermolgvits_gitlab
Oh right
You're not making Bob Alice's friend. You're putting the Gun constructor in there
I think 'bob' should be a string
Filipe Vieira
@fsvieira

I copy from docs:

var gun = Gun();
var bob = gun.get('bob').put({name: "Bob"});
var dave = gun.get('dave').put({name: "Dave"});

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

But I don't know how to listen/get/use it

Filipe Vieira
@fsvieira
@jaspermolgvits_gitlab on your first example didn't you overwrite friends name = alice, and then overwrite with bob ?
lain
@lain:iwakura.xyz
[m]
so ive trying to understand how gun works but im a bit confused on some stuff. if i create a key value pair in my user graph that only i can update, how is this guaranteed? peers can reject the update if its not me that tried to update the value, but given the value can i prove that i was the only one that updated it?
Manwë
@Manwe-777
@lain:iwakura.xyz yes, because your public key is in the graph key, so you send that + a signature (SEA does this)
lain
@lain:iwakura.xyz
[m]
hmmmmm i think im, starting to get it. i keep thinking of it in terms of an immutable blockchain where you can view the whole history of a value, but if im understanding this right this is mutable in that you can only read the current value, not any past values
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?