Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 15 19:03
    noctisatrae synchronize #1258
  • Aug 15 09:18
    saosophea9988 edited #1272
  • Aug 15 09:14
    saosophea9988 opened #1272
  • 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
@amark: thxs for the links but gundbclub has no public repository
Bradley Matusiak
@bmatusiak
@entermonke:matrix.org @rococtz:matrix.org there are methods to uniquely identify alias, my method takes the pubkey, and converts it to a number, this gives a pubkey a "somewhat unique" ID, using this ID combined with alias bring it to a more unique pointer. this allows me to pick a pubkey out of a list of alias
poiyo
@poiyo:matrix.org
[m]
do objects with many keys take longer to query?
nix
@quixnix:matrix.org
[m]
most of the examples use embedded scripts in html files. maybe something with my imports?
import express from "express"
import path from "node:path"
import Gun from "gun"
import { randomUUID } from "node:crypto"

const app = express()
var gundb = Gun()
rococtz
@rococtz:matrix.org
[m]
poiyo: It shouldn't. Gun queries are O(1)
1 reply
entermonke
@entermonke:matrix.org
[m]
where is the code for AXE?
H
@hadrienmp:matrix.org
[m]
Hello everyone ! Is there a way to stop "listening" on changes ? For example I did gun.get('room1').map().on.... Is there a way to stop getting updates ?
Daniel Raeder
@draeder
Improve your terminal app's vision with some vitamin A thanks to carets.. Wrote this so I can finish gunsafe's CLI example..
@hadrienmp:matrix.org gun.get('room1').map().off()
1 reply
Suleiman Zhukov
@SuleimanZhukov
@draeder @rococtz:matrix.org @bmatusiak @Manwe-777 @ilhamgum
Guys, what is this error Only a node can be linked! Not "undefined"!?
Daniel Raeder
@draeder
@SuleimanZhukov weird error! Can you share the code where it is happening?
@SuleimanZhukov Hmm.. looks like this is from lib/promise.js, which is an external lib dependency... What do you need it for?
8 replies
0xjimmy.eth
@DecentralisedTech
Hello
0xjimmy.eth
@DecentralisedTech
Where the the pass used in gun.user.create, Is the pass used only clientside?
Looking to use Metamask to create a session, would make sense to generate a keypair, and then ask the user to sign a message with Metamask to say they are using the current keypair
Daniel Raeder
@draeder
@DecentralisedTech gun.user().create() is essentially the same as SEA.pair(), which is a primitive of Gun, but user.create() provides developers with a familiar username/password interface. If you have a SEA pair, you can log into Gun wherever you are, local or not...
N
@nicholasoxford
Has anyone seen a work gun + Deno demo?
4 replies
Azarattum
@azarattum:matrix.org
[m]
Is there a way to see how many peers are connected to an app at the moment? And also is there some kind of sync acknowledgment from a peer?
2 replies
Sarah Kay
@SarahKay99

@Lexi:matrix.org JS set not compatible :(
@renji3:matrix.org :clap: @draeder :+1: @rococtz:matrix.org important words I strongly agree with. await gun.user(pubKey).get('epub')
@bresnow WebRTC ~ 6, but non-WebRTC ~ 10K
@Manwe-777 wouldn't you have to know the hash to lookup the login, but you won't know the hash until after login?
@hownowbrowncow_8635:matrix.org it gets cached locally, yes.
@Azarattum @azarattum:matrix.org :clap: @Lexi:matrix.org . Expiry, yupe. Else you'd need to have a 2nd index that you lookup that is a ban list.
lookups in GUN are O(1), so they're efficient.
Glad you're asking for help at 5min!
isn't your .on( getting called with both?
Oh wow, I haven't seen that github issues in years I thought it was closed... had no clue people were responding in it. (At some point... GitHub notifications just stopped/broke).
@Omarabuziad thanks for reminding a Q if it got missed! We're not perfect, so its very much appreciated if anyone just re-asks.
:clap: @bmatusiak @draeder . If you are on a permanent machine, then fs RAD is good enough. If you are on a machine that gets wiped/deleted every X hours, you probably want a backup in case not enough browsers are online.
@SarahKay99 looks correct. :clap: @rococtz:matrix.org . Not sure why not. does npm start 1337 work?
@SamiLaayouni_twitter possibly the login bug... if you hit login 3+ times, does it login?
@useWallie_twitter you should check out @davay42 's cool vue component that does that!
@SarahKay99 the Fireship chat app was public, so anyone can add/update the table, they just can't modify the message itself. With DM, you don't want a public table, so you either (A) have to https://gun.eco/docs/SEA.certify user A can edit user B's table that they both chat on or safer/better (B) "thread" the chats, by saving userA.get(userBpubKey).set(chat); and userB.get(userApubKey).set(chat)then you .map().on(function thread(){ ... on both and pass both into the UI, that you sort. Then later on you'll want to use LEX to paginate the chat (right now this may be a bit buggy... but we're working on some cool new features to make this rock solid).

Thanks so much Mark! I got the server running, the problem was i didnt npm install . as for the chat app issue i will rethink my code. tysm

rococtz
@rococtz:matrix.org
[m]
Azarattum: Gun uses WebRTC AND websockets under the hood. Yes, you really have to implement a heartbeat system where the users who want to be discovered simply register themselves every X seconds/minutes against some list say "I'm online" so others can see they are online
yorreraj
@yorreraj
Hi, can someone help me why the onDisconnect() doesn't fire after closing the browser or tab
and also the connected() does not trigger when we reconnect to the server even if we make a change in the data
yorreraj
@yorreraj
@amark
Lexi
@Lexi:matrix.org
[m]

I guess I don’t understand something. Isn’t there some kind of a built in mechanism for peer discovery?

That's the plan for AXE. Don't know how far it's done already.

Does it just use the list you provide and that’s it?

The list of peers in the GUN constructor? Yes, except if using AXE which is default.

I thought gun uses webRTC under the hood, so shouldn’t the connections information be already available?

WebRTC is used for p2p communication between browsers. For browser ↔️ NodeJS clients websockets are used. Remember to import lib/webrtc.js to enable WebRTC and even then it might not work for the current version. Would be cool if you'd test it and report back!

Does the ack in put comes from a remote peer?

I'm guessing it comes from one or all of the peers set up in the GUN constructor. If it's not properly described on the API could you report back? Extra points for testing and finding out again :-) That's kinda how it works for unstable GUN right now :\

Is there a way to know that an entire database is in sync? Let’s say I have a client making changes. I want to show user a spinner until his changes are successfully propagated through the network. (Or at least to the nearest relay peer)

The latter point is easy. As I said there's the ack callback for that in put(). The former could be done by recording the datetime of the last complete sync. Would that be what you want?

5 replies
tedd pasta
@azdez:matrix.org
[m]
can anyone tell me why i am getting a status 400 with the route /gun
require('dotenv').config()
const express = require('express')
const Gun = require('gun')
const cors = require('cors')

const app = express()

app.use(cors())
app.get('/', (req, res) => {
    return res.status(200).json('success')
})
app.use(Gun.serve)
app.get('*', (req, res) => {
    return res.status(400).json('unsuccessful')
})
Gun({web: app.listen(Number(process.env.PORT), '0.0.0.0'), radisk: true, file: './folder'})

console.log('Server started on port ' + process.env.PORT + ' with /gun')
trying to make my own gun relay with storage saved to disk. but the /gun route always gives me a 400
Daniel Raeder
@draeder
I've finished Gunsafe .. the example CLI might be a little buggy at times, and there appears to be a parsing issue with multiline documents that contain special characters.. but it's a start.
I wrote Carets to make working with multiline objects from the CLI for gunsafe a little less painful than readline and/or stdin by themselves
Azarattum
@azarattum:matrix.org
[m]
I’ve seen talks where Mark mentions AXE, but didn’t quite understand how exactly it is supposed to work from a technical (not conceptual) perspective.
3 replies
Also, ideologically, is GUN supposed to be one giant network or each application should implement it’s own network on top of GUN with it’s own rules?
3 replies
rococtz
@rococtz:matrix.org
[m]
Azarattum: AXE is part of the core of Gun. Some parts are working, some are missing, some are buggy. In the future, Gun is supposed to be a gigantic network with thousands of relays
entermonke
@entermonke:matrix.org
[m]
@mmalmi: impressed with iris's progress would be good if you had a matrix room to discuss it, iris has problems retaining content
fractal
@fractal:matrix.org
[m]
yes i like iris as well... been checking out a lot of projects and it is one of my favorite finds
fractal
@fractal:matrix.org
[m]
oh hey Evan
Evan
@evan-brass:matrix.org
[m]
Ahoy!
I heard there might be some juicy WebRTC DHT treasure going on here. Where could I start reading to get up to speed?
1 reply
Ghost
@ghost~62c3eb896da0373984998ff1
any hekp explain this install been at it for 2 days
harshavardhan282
@harshavardhan282
warn - ./node_modules/gun/gun.js
Critical dependency: the request of a dependency is an expression
can anyone explain how to resolve this error
Don Robert
@donlevirobert_gitlab
any chance someone can give direction in layperson terms, i am so frustrated
i have tried on kali
i have tried on wimdows and cant understand how to get this working
entermonke
@entermonke:matrix.org
[m]
use search in the element app?
If you only want a relay, then just do this:
npm install gun && cd node_modules/gun && npm start
Don Robert
@donlevirobert_gitlab
I guess I am pretty lost, I am new to this end of things. I know alot of peaple that are interested in getting out of the main stream bs, and would be interted in this. But I can not figure out how to set it up so they can down load as an app, or even get it working at all. I have to head to work but if someone wouldbe willing to give me some direction later it would be appreciated
Manwë
@Manwe-777
@donlevirobert_gitlab if youre running latest github it has some bugs , might want to try npm instead. Would be nice to know what you tried (as in code), to get an idea of what could be failing.
Don Robert
@donlevirobert_gitlab
@Manwe-777 honestly I have tried npm, git hub a few different ones https://www.youtube.com/watch?v=Rc2sIPDrX_k , https://www.youtube.com/watch?v=zvo6jC1OA3Y, https://www.youtube.com/watch?v=J5x3OMXjgMc&t=272s, https://gun.eco/docs/ (that was the most confusing thing to be honest) I trired with firebase, I tried with ste,
@Manwe-777 it have to be me, I really think a walk though to ppl that don't code, or build sites my help alot with getting this more main stream... I have want to help and get this out to my colleagues, that is why I ened up on the form... Honestly this is the second chat form I have every reached out to..
Don Robert
@donlevirobert_gitlab
I will even do it, once I figure it out lol