Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 24 23:36
    syonfox updated the wiki
  • Sep 23 21:10
    qgustavor commented #1280
  • Sep 23 21:06
    qgustavor commented #1280
  • Sep 23 21:05
    qgustavor commented #1280
  • Sep 23 20:57
    qgustavor commented #1280
  • Sep 23 20:40
    draeder commented #1282
  • Sep 23 20:38
    draeder commented #1280
  • Sep 23 20:36
    draeder commented #1283
  • Sep 23 10:21
    Codzaa opened #1283
  • Sep 23 02:25
    qgustavor commented #1280
  • Sep 21 09:26
    mmalmi opened #1282
  • Sep 19 21:08
    thiago-hs closed #1281
  • Sep 19 19:48
    thiago-hs edited #1281
  • Sep 19 19:33
    thiago-hs edited #1281
  • Sep 19 19:33
    thiago-hs opened #1281
  • Sep 18 20:15
    qgustavor opened #1280
  • Sep 15 05:02
    Alengeorge-01 edited #1279
  • Sep 13 21:32
    csharpner updated the wiki
  • Sep 13 08:12
    Alengeorge-01 opened #1279
  • Sep 12 13:13
    1MaddieX updated the wiki
Sascha1337
@sascha1337:matrix.org
[m]
$GUNFTW
Jabis Sevon
@jabis
@RamiMetry gun is not promisified, you'll need either gun/lib/then.js or gun/lib/promise.js to have the reactive chain working with promises - see the source of the extensions for more usage tips
Jabis Sevon
@jabis
or you can wrap your own - here some pseudo code, but do note that the most fun part about gun is the reactiveness :)
Gun.chain.promGet = function(key) { let chain = this; return new Promise(resolve=>{ chain.get(key).once(resolve) }) }

// usage after instantiating : let gun = Gun({...})
//either with async
(async()=>{
let results = await gun.get("myapp").promGet("key")
console.log("results",results)
})()
// or with regular promise-then
gun.get("myapp").promGet("key").then(results=>
  console.log(results);
})
Jabis Sevon
@jabis
First results recovered from .once might be incomplete depending on your peers, so you might have to replay it
1 reply
lightningx10
@lightningx10
Hey all, just wondering how NTS actually works? On the page for NTS, it says that server nodes do not obey NTS. This is fine and all, but I have a node relay running and my clients both have a different local time, the clients have a delay between receiving messages because the relay doesn't accept the message until its time has caught up. (relay running in a VM with a slow clock I think). It also says that they're meant to "catch up" or "resolve" with the node, but I don't see the clocks changing (I'm running the ntp example, with and without a sync to this node and either way it's the same time)
clararussell
@clararussell:matrix.org
[m]
This message was deleted
1 reply
RamiMetry
@RamiMetry
Capture.PNG
hello guys I have founded the issue but it is a new problem the import of gun in my react native app is not working
in this picture when I console log gun i get undefined
I already yarn add gun
and i tried the same way in react js it works normally but in react native the response is always undefined
any idea how can I fix it please
1 reply
and i am sure my relay server is working properly because it works in react js
11 replies
dev1n
@dev1n:matrix.org
[m]
Is there a way to stop gun once it's instantiated?
Meaning, force it to close peer connections.
My use case is low powered devices which would need to sync only temporarily, then disconnect, to conserve battery.
rococtz
@rococtz:matrix.org
[m]
dev1n: That doesn't sound like it has to do anything with Gun. Why not have a cron job to start the process and kill it?
it's just a node process
1 reply
Daniel Raeder
@draeder
@dev1n:matrix.org gun.get('someApp').get('someTopic').off()
2 replies
dev1n
@dev1n:matrix.org
[m]
Thanks @draeder Lexi
Lexi
@Lexi:matrix.org
[m]
dev1n: I wonder if anything can break when the opt of GUN is changed at exactly the wrong time … like during a "database transaction"
1 reply
Jerushan
@jerushan06:matrix.org
[m]

Hello guys,
I would like to develop a Family tree project using Gun JS. I want to make sure these 3 things can be done.

  1. Privacy of non-connected nodes
  2. Privacy of a node
  3. Privacy of a piece of data in a single node

2 different family tree data need to be separate. Currently all data shows up in developer tools of a browser. Is there a way to keep some data secret from others?

I can’t have all data visible to every family members

3 replies
Sascha1337
@sascha1337
sup im new here
lets see how active this place is
1 reply
Tarek Besbes
@Tarbez

Hello everyone, I want to create a social network based on GunJs.
Where do I start? Is there any repo I can clone and start with it?

My first goal for now:
Sign-up/Login
Displayed the signed in user in another page
then basically in another page pull all the users (Username) that signed up.

3 replies
rococtz
@rococtz:matrix.org
[m]
verschmelzen
@verschmelzen:matrix.org
[m]
Hey! I am working on renegotiation in webrtc.js now. Is there an example of how to setup 2-way message only communication between peers?
1 reply

message only meaning data is not kept in the graph like done here

right now that works only one way (only peers that joined first can message like this to the other peer)

verschmelzen
@verschmelzen:matrix.org
[m]
I guess I can use .put({}, function (_data, _key, msg) {...}) and use msg instead of _data inside callback for that matter 🤔? But that would still keep the data on the nodes
Frudas
@frudas:matrix.org
[m]
Hi
i found a bug here
1 reply
line 205 -> setTimeout.each(l, function(id){ var it = s[id]; // TODO: .keys( is slow?
fix -> setTimeout(l, function(id) .........
im getting erros on console
@amark: /\
Frudas
@frudas:matrix.org
[m]
or
fix -> setTimeout.each(ack, function(id){ .......
Object.keys maybe is what is trying to iterate
Frudas
@frudas:matrix.org
[m]
in firefox
chrome too
RamiMetry
@RamiMetry
hello any working github code with react-native so I can clone and check
i need only react native not react js code
verschmelzen
@verschmelzen:matrix.org
[m]
Day number N of trying to implement renegotiation in webrtc.js. I am at the same place as before root.on('out', just does not fire an event when I try to use it. but in original webrtc.js code it is definetly used for messaging
verschmelzen
@verschmelzen:matrix.org
[m]

Briefly, I am doing something like this

side One

gun.get('+'+opt.pid).on(function(last, key, msg){
    if(opt.rtc.start > msg.put['>']){ return }
    root.on('out', {'@': ''+msg['#'], '#': root.ask(open), ok: {rtc: {id: opt.pid}}}); 
});

side Two

gun.get('+'+ack.ok.rtc.id).put(opt.pid, open); // put stuff in the same node and expect respone in callback

but side Two never gets my ACK

gun.get('+'+opt.pid) and gun.get('+'+ack.ok.rtc.id) are the same node
Is there any docs or examples on how this messaging works? I am working around in circles here
Bo
@worldpeaceenginelabs
@amark Hey there. I found this and it is possible a really good companion to Gun? https://github.com/fireship-io/flamethrower , a bit explained here https://youtu.be/SJeBRW1QQMA (in the video he explaines also how to single compile React, Vue, Angular, Svelte components to use in React, Vue, Svelte etc, and vice versa. The whole video is gold i think. But here is a even better explainer on how to cross use components in different frameworks https://youtu.be/RbTM785zhG4 btw: did you get Bun get to run with Gun?