Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Dec 03 04:33
    ndaidong closed #1292
  • Dec 01 16:01
    ameoba32 opened #1295
  • Dec 01 07:28

    amark on master

    toString must be stringy! (compare)

  • Dec 01 05:29
    amark commented #1287
  • Dec 01 05:21
    amark commented #1289
  • Dec 01 05:20
    amark commented #1293
  • Dec 01 05:12
    amark commented #1294
  • Nov 30 08:27
    soulofmischief commented #1294
  • Nov 28 23:07
    ViteOrder opened #1294
  • Nov 24 06:51
    expelledboy synchronize #1276
  • Nov 22 18:04
    BrendanDN commented #1290
  • Nov 22 18:04
    BrendanDN closed #1290
  • Nov 22 18:04
    BrendanDN commented #1290
  • Nov 22 17:59
    BrendanDN commented #1292
  • Nov 22 04:07
    ndaidong commented #1292
  • Nov 21 20:28
    verschmelzen opened #1293
  • Nov 21 19:44
    BrendanDN commented #1292
  • Nov 21 14:50
    ndaidong opened #1292
  • Nov 19 17:41
    estebanrfp commented #1080
  • Nov 18 21:26
    @rogowski banned @jesus:halogen.city
Jachen Duschletta
[D]Dletta: Inte
[D]Dletta: Interesting
Jachen Duschletta
[D]anoxy: <@103660564651212800> do you have an online GUN instance or do you run it locally with onΓΆt requiring Gun()?
I used to have same issue when K only required Gun() and as soon as I initiated the online Gun instance I didn't have problems after refresh ( to stay logged in )
Jachen Duschletta
[D]bmatusiak: o, snap, hes here
Jachen Duschletta
[D]Dyno: Welcome <@292435188003241984>!!! 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]applemaster2000: Hello
Hello, I'm still attempting to get a basic nodejs test running. Now when I end the test nodejs hangs and leaked-handles is indicating three leaked file handles.
'use strict'
const tape = require('tape')
const _test = require('tape-promise').default // <---- notice 'default'
const test = _test(tape) // decorate tape
const Gun = require('gun');
const Sea = require('gun/sea');

    fullStack: true, // use full stack traces 
    timeout: 20000, // run every 5 seconds instead of 5. 
    debugSockets: true // pretty print tcp thrown exceptions. 

test('create a key value pair using callbacks', async function (t) {
  const gun = Gun();
  const value = 'value';

  gun.get('key').put({property: value }).once(result => {
    t.equal(result.property, value, 'result  was what we put in');
    gun.get('key').once(result2 => {
      t.equal(result2.property, value, 'result2  was what we put in');
      setTimeout(function () {
        t.ok(true, 'test shold end now');
      }, 11000)
is there some sort of call to close the gun database and get it to close any file handles?
It looks to me like the built in storage mechanism doesn't ever close.
Jachen Duschletta
[D]marknadal: <@!366349503265112074> <3 Binary data adapters can be added in future, but people have been using Base64 with HD videos now/already. (3) is correct, `get(nodeKey).put(null)` will null out the *reference* to that -- ah <@!612728945313316904> already helped <3! If you null 1st then save data again, it will be a NEW node that blows out the old one, not merge with the old one. You cannot save nested data to a null (or any primitive) parent, you'd have to re-save it as a nested document/object like <@!139291366869041153> thought of & <@!280426612900757504> showed. Hard delete full node :/ not quite possible yet, as GUN cannot determine if it was an accidental data loss to resync or intentional unless tombstone (null). w00t, I could have just skimmed this, I didn't even need to reply-as-I-read. SO EXCITING AND COOL to see so much help/support. :) <@!647370527635144704> I deeply appreciate that, thank you. Yes, very much consider non-code contributions as important ❀️ especially community kindness/generosity.
<@!621036850697601053> do you need a GUI yet for your CMS? I'm trying to move https://github.com/eraeco/joydb in that direction, but πŸ˜› have no time. Toss a static page up on GitHub Pages or Netlify, + free heroku relay peer + dynamic realtime updating secure (because of you!) page! Or Ghost or something?
<@!624103263482150912> πŸ˜„ πŸ˜„ πŸ˜„ mind sharing your Gatsby + GUN integration????
<@!491228220520136704> πŸ‘
<@!103660564651212800> :/ :/ ? ? ? https://stackoverflow.com/questions/53578591/keeping-a-gun-db-user-authenticated-during-a-session/53741832#53741832 ? ? ? :/ :/
<@!280426612900757504> nice πŸ‘ , what is the πŸ‘‘ ?
@pszabop what I usually do in my tests is call process.exit() would that work? Yeah, GUN has HTTP server that stays alive, more than the fs.
<@!639386319251832832> <@!292435188003241984> WELCOME WELCOME WELCOME TO THE COMMUNITY!!!!!!!!!!!!!! ⚑ ⚑ ⚑ πŸ‘ How'd you hear about us??? What are you wanting to build??????
[D]bmatusiak: πŸ‘‘ is appended to your name in user's list
[D]bmatusiak: πŸ˜‹
Mark Nadal
@Dletta do me a favor and change your gitter profile pic to something unique, so it is easier for to scan when I check both sites? <3 <3 <3 thanks! Maybe something silly and super obvious (solid color?). Mostly cause gitter/github generates those pixel art avatars for people and they look very similar.
@jussiry w00t! More voting apps! Yours, NAB, @nmaro 's!
@PrzeoR_twitter WELCOME WELCOME WELCOME!!!!!!!! :zap: :zap: :clap: :clap: WELCOME TO THE COMMUNITY!!!! How'd you hear about us? What are you working on!???
@estebanrfp woops my reply was empty to you, you got things going? Need any more help?
Jachen Duschletta
[D]Dyno: Welcome <@84101467539017728>!!! 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]marknadal: <@!407331962269728768> the voting app (rock paper scissors) is gorgeous and game like! How do you do it!!!??
[D]marknadal: <@!84101467539017728> yo yo yo !!!!! WELCOME !!!!!!! ⚑ πŸ‘ ⚑ πŸ‘ what are you working on? How'd you hear about us?
[D]marknadal: <@!280426612900757504> ROFL, I didn't notice that, must have been <@!203666215502217216> doing who set up the Discord channel, haha. Oye, well, there are no πŸ‘‘ in decentralization, πŸ‘‘ to centralized. Down with πŸ‘‘ !
[D]bmatusiak: πŸ”₯
[D]bmatusiak: its burnt down. now
@amark process.exit() isn't very compatible with the Tape mechanism, as a summary may or may not get printed out. Is there something clean than process.exit()? Should I hack in a close event somewhere?
@amark Also I haven't enabled the HTTP server option yet.
Jachen Duschletta
[D]Pdbz199: Hi! I'm not really working on anything quite yet, just looking around for DB solutions. My friend recommended we take a look at gun db!
[D]marknadal: anybody ? ??? https://gun.eco/docs/Voting ??? thoughts <@!321271119304720384> <@!407331962269728768> @go1dfish
[D]marknadal: <@!84101467539017728> awesome πŸ˜„ glad to hear that. Would love to say hi to your friend too!
[D]applemaster2000: <@!178314946201780224> I'm Preston's friend
[D]bmatusiak: <@178314946201780224> got any ideas on my pr? he anything I need to do/fix
Jachen Duschletta
[D]marknadal: ha, I was just replying before I even saw this here. Replied.
[D]marknadal: I'm not that smart tho, just FYI.
[D]marknadal: BBL
[D]bmatusiak: Lol
@amark I think in general the advice should be "don't use the built in HTTP server" if you want a clean shutdown. That way I can use something like this: https://www.npmjs.com/package/http-shutdown . Seem reasonable?
Jachen Duschletta
[D]marknadal: @pszabop oh that is nice you don't have to depend upon it, you can just pass it a server instance. Since you have to pass server to GUN anyways, can you pass the same server to it in your test, or (?)
@amark i can manage the server and add the shutdown functionality to it. I tried it, it didn't work. There are udp4 sockets open. Is there something that is using UDP?
unknown handle Socket {
  _events: [Object: null prototype] {
    listening: [Function],
    message: [Function]
  _eventsCount: 2,
  _maxListeners: undefined,   
  type: 'udp4',
  [Symbol(asyncId)]: 22,
  [Symbol(state symbol)]: {   
    handle: UDP {
      lookup: [Function: bound lookup4],
      onmessage: [Function: onMessage],
      [Symbol(owner)]: [Circular]
    receiving: true,
    bindState: 2,
    connectState: 0,
    queue: undefined,
    reuseAddr: true,
    ipv6Only: undefined,
    recvBufferSize: undefined,
    sendBufferSize: undefined
Jachen Duschletta
[D]marknadal: @pszabop lol yeah, quite a few things in NodeJS try to auto-start, here is the list: https://github.com/amark/gun/blob/master/lib/server.js maybe you should just copy it and make/comment-out your own list, so it is easier.
@amark Should I submit a patch for options turn off things like multi-cast?
Jachen Duschletta
[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.
@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
[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
[D]danlugo92: Hello guys, cannot find in the docs the events to listen for to detect login and logoff.
@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
[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.
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.