Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 23:40
    SuaYoo updated the wiki
  • 03:50
    resession updated the wiki
  • 03:49
    resession updated the wiki
  • Oct 19 22:32
    resession commented #404
  • Oct 19 02:55
    mimiza commented #1137
  • Oct 17 02:47
    rococtz updated the wiki
  • Oct 17 01:22
    cryptoboid updated the wiki
  • Oct 16 11:59
    Choko256 opened #1152
  • Oct 16 11:50
    Choko256 commented #972
  • Oct 16 03:41
    amark updated the wiki
  • Oct 16 02:37
    amark updated the wiki
  • Oct 16 02:28
    amark updated the wiki
  • Oct 15 23:36
    amark updated the wiki
  • Oct 15 19:22
    noctisatrae commented #1141
  • Oct 15 19:20
    noctisatrae synchronize #1141
  • Oct 15 19:18
    noctisatrae synchronize #1141
  • Oct 15 19:16
    noctisatrae synchronize #1141
  • Oct 15 09:23
    ruslanjan commented #1145
  • Oct 15 09:04
    amark closed #1149
  • Oct 15 09:04
    amark commented #1149
Jachen Duschletta
@Dletta
[D]RobChristian: Hi <@!178314946201780224>, any feedback on this PR? amark/gun#854
Anything you would like me to change to move this forward? Thanks much.
pszabop
@pszabop
@amark nevermind I now see the option for multi-cast. Say, after I get nodejs test running I'd be happy to help fix the docs, maybe add a nodejs how-to guide
@amark okay got rid of the multicast option. Still hanging with 2 TCP sockets open not listening. I think I got an idea how to debug this I'll ask for help only if stuck for a day
Jachen Duschletta
@Dletta
[D]RobChristian: <@!178314946201780224> would you please tell me why this PR is getting ignored? You've asked me to be helpful, and this PR is me doing just that. I can't help if you won't acknowledge or engage with me. If you are unhappy with the PR content, would you please tell me what you would like me to change?
Jachen Duschletta
@Dletta
[D]danlugo92: Hello guys, cannot find in the docs the events to listen for to detect login and logoff.
pszabop
@pszabop
@amark Found it. You have several places in the gun code where you call setInterval(). If you add an .unref() to those calls the process exist cleanly (with multicast disabled, I haven't verified otherwise). See https://stackoverflow.com/questions/30058371/setinterval-keeps-node-js-process-running
@amark you want me to file a bug and a merge request?
@amark it still takes about 10 seconds to exit, I suspect one of the intervals has to terminate. Also multicast definitely hangs. In general, it would be nice to have a clean shutdown. Would require an event that every subsystem would have to handle (e.g. 'close'). I could try and patch that. I bet you think there are other important things to do though.
Jachen Duschletta
@Dletta
[D]RobChristian: <@!178314946201780224> for example, the guys behind OrbitDB provide the following disclaimer. This is the same spirit behind the PR I'm asking you to merge. I'm open to your feedback. Please help me come up with a mutually amicable disclaimer that will help new users quickly become aware of gun's present development status.
pszabop
@pszabop
Say, what is the correct syntax for specifying peers in the gun constructor? I cannot use options if I specify an array of strings, and I can't seem to get the peer if I use options.peers where that looks like { 'http://localhost:8080/gun': {} }
also the code hangs when I try to create a user and a peer can't be connected to. That doesn't seem to be offline first.
Jachen Duschletta
@Dletta
[D]bmatusiak: offline first is the concept of not needing a user account to start using the database.. you can just start writing and reading data and export the data and import the data what ever
pszabop
@pszabop
So the user is not offline first API?
Jachen Duschletta
@Dletta
[D]Dletta: It’s recommended to be online for creation and after that it can be offline, however upon login on a new device, it’s recommended to be online as well
pszabop
@pszabop
Interesting. Ethereum allows offline-first user creation (because a user is just a 256 random value and collisions are impossibly rare). If the primary key is the public key and not the alias that would be possible.
Jachen Duschletta
@Dletta
[D]jussir: <@178314946201780224> the voting system is veery simple. The app is used with live audiences so i doubt anyone has any interest in hacking it. So no authentication of any kind, just create a random user id (stored in localStorage) and set your vote with it: gun.get(namespace).get(userId).put(voteId). Before a new vote reset all votes to null's.
Jachen Duschletta
@Dletta
[D]xenister: hi what's the maximum storage capacity of gun ?
Jachen Duschletta
@Dletta
[D]danlugo92: Hello guys, are there any events that I can subscribe to, for listening on auth status? something like user.on('auth'), cannot find anything on it on docs.
[D]danlugo92: might help to make my app more declarative
[D]Dletta: I think auth is an event, but it would be via Gun.on(‘auth’)
[D]Dletta: <@178314946201780224> ^
[D]Dletta: Also <@178314946201780224> Gun just arrived at 11’000 stars on Github 👏
[D]Dyno: Welcome <@547550778257309697>!!! GUN (https://github.com/amark/gun) is a P2P protocol for syncing data used by 8M+ people monthly across Internet Archive, HackerNoon, DTube (decentralized youtube), Notabug (p2p reddit), & more. Please try the 5min tutorial (https://gun.eco/docs/Todo-Dapp) to get started!
[D]Yakulu:
Jachen Duschletta
@Dletta
[D]danlugo92: <@!612728945313316904> gun.on('auth') didn't work.
gun = Gun()
Gun {_: {…}}
user = gun.user() 
User {_: {…}}
gun.on('auth', console.log)
Gun {_: {…}}
user.auth('numericx', '12345678')
User {_: {…}}
gun.js:198 {gun: Gun, $: Gun, root: {…}, id: 4, back: {…}, …}
user.is.pub
"yYhLaCfPklnRCAsiLYmrkqC2vPIolENLDn2ZwsTwKWk.tQ-9Z39vktnFthfYV7D07Zzy4Z_Zb37ctXr9pTEkzw0"
[D]Dletta: gun._.on(‘auth’ is how you would register the hook, but I wasn’t 100% sure. Mark will let you know once he comes online if there is an event

[D]danlugo92: actually it did work. Sorry :/.

Line gun.js:198 {gun: Gun, $: Gun, root: {…}, id: 4, back: {…}, …}

[D]danlugo92: that's the console log.
[D]danlugo92: need another cup of coffee
[D]Dletta: Lol
[D]danlugo92: gun.on('leave') doesn't though. maybe it's another constant?
Jachen Duschletta
@Dletta
[D]Dletta: No clue on that one, could just be a naming thing, not sure where the names are kept (‘onto’ is the event system’
Jachen Duschletta
@Dletta
[D]jabis: leave doesn't emit afair
[D]jabis: and its code commented that Gun.on(auth should be moved to user to emit instead of root
Jachen Duschletta
@Dletta
[D]danlugo92: yeah I figured it should be user.on('auth')
Stefdv
@Stefdv
@KINKCreative Hey, i really would like to help you out with gun-tag. Can you provide me with a basic example of what you are doing ( or how you use gun-tag) ? I use gun-tag all the time and to me the documentation looks solid, but then again...maybe i'm overlooking something that isn't well documented at all :(
Jachen Duschletta
@Dletta
[D]RobChristian: <@!103660564651212800> probably hasn't been tested, but in theory, it's whatever maximum your backend supports. Gun is really just a frontend for a database engine like LMDB.
Jachen Duschletta
@Dletta
[D]danlugo92: how would I go about implementing a isPubKey(anyString) => boolean ?
pszabop
@pszabop
What is the correct syntax for specifying peers in the gun constructor? I cannot use options if I specify an array of strings, and I can't seem to get the peer if I use options.peers where that looks like { 'http://localhost:8080/gun': {} }
Stefdv
@Stefdv
@KINKCreative i posted a quick - working - example on github Stefdv/gun-tag#3
Stefdv
@Stefdv
@amark do you still use PANIC for testing ? If so, is there any documentation for it ?
Jachen Duschletta
@Dletta
[D]danlugo92: on('auth') only supports a single listener 🤦‍♂️
Jachen Duschletta
@Dletta
[D]jabis: @pszabop, the constructor will obj_map over the peers in Gun.chain.opt, try to pass them in opt.peers as ["srv1/gun","srv2/gun"]
Jabis Sevon
@jabis
image.png
pszabop
@pszabop
@Dletta okay, tried that, it worked. The documentation says options.peers is an object, where the URLs are properties, and the value is an empty object.
thanks!
Jabis Sevon
@jabis
@pszabop was actually me answering from discord ^^ and yes I think that method should check if the opt.peers is an object or an array there, might constitute an issue into github :)
in object format way it's iterated there, the signature then should be {""+url:{url:url}} not just empty object
now to sleep bbl ->
pszabop
@pszabop
ok will file issue. An array is fine