Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:47
    capitalistdog commented #1156
  • 06:11
    amark commented #1164
  • 04:12
    amark updated the wiki
  • 04:05

    amark on master

    ReactNative/Expo fix for SEA (#… (compare)

  • 04:05
    amark closed #1169
  • 04:05
    amark commented #1169
  • 03:33
    amark commented #1156
  • Nov 28 22:33
    aethiop opened #1169
  • Nov 28 22:05
    i001962 commented #1168
  • Nov 28 14:49
    davay42 updated the wiki
  • Nov 28 10:46
    resession commented #1167
  • Nov 28 01:49
    fsvieira edited #1168
  • Nov 28 01:33
    fsvieira edited #1168
  • Nov 28 01:08
    fsvieira edited #1168
  • Nov 28 01:04
    fsvieira opened #1168
  • Nov 27 17:42
    amark commented #1164
  • Nov 27 12:29
    davay42 updated the wiki
  • Nov 26 19:12
    amark commented #1163
  • Nov 26 10:29
    aethiop commented #1163
  • Nov 25 20:02
    davay42 updated the wiki
salvobee
@salvobee
Hi everyone, @amark, thanks for this wonder that gun is....
davay
@davay42

Hey everyone! I'm heading back to building projects with GUN and here's my primer for the new adventures ) It's a proper dev setup to build apps with modern Vue 3 + VIte (with a couple of very handy plugins) + Gun . I should expand on it in the gun docs and, may be I'll make a video walk through for it. But for now here's the repo for you to play around. https://github.com/davay42/vite-gun-starter/

Play with it here https://davay42.github.io/vite-gun-starter/

There are two routes – the first just shows a pulse timestamp from the glitch relay peer and the other shows avatars for any visitor synced with their cursor position.

Have fun! I'm open to any optimization suggestions and PRs, of course )

And all the fanciness fits into less than 100 kB gzipped build ) Love it )
Radu
@rococtz
@davay42 how do you play it?
davay
@davay42
Sno game mechanics yet ))))
just a cursor to wiggle )
but it's properly wired inside – just add you flavor )))
Radu
@rococtz
just checked my resources, it uses 20% of my CPU
davay
@davay42
yeah, there's room to oprimize the view
debouncing and so on
it's running a bunch of setInterval(fn,10) and is more of a sketch. But the p2p db is up and running - it's the main thing here )
WILL
@WillWang002_twitter
Hello. Does anyone know what is the meaning on the console?
截屏2021-11-24 下午6.29.21.png
Ally Jr
@3210jr
Hey all, what is API for deleting users? Doing gun.user().delete(alias, pass) throws a "signature not verified" warning, also says the method is deprecated.
Anyone knows?
Mike Stone
@stonecodes:matrix.org
[m]
I will research more... I'm not sure sea.work is what I need for a system where each user is a "witness", basically need a way to make sure client isn't modifying js client with extensions , or if they do it won't count... I think something like https://github.com/amark/gun/blob/master/examples/game/space.html already has this built in with conflict resolution? 🤔
Mike Stone
@stonecodes:matrix.org
[m]
so like ideally without PoW
cryptoboid
@cryptoboid
by the way, I wonder if anyone had the same issue, I tried upgrading my gun app from localStorage to IndexedDB using RAD and RindexedDB, but I started having reports about crashes/errors for some users in Chrome/Brave Android. Has anyone else had this problem? I cant replicate it locally
salvobee
@salvobee
any guess why my instance of gun will not produce any WS connection to the peer that i've arbitrary passed to the constructor? (if i inspect my app from the browser)
it always try to sync with localhost / gun manhattan
salvobee
@salvobee
export const db = GUN({peers: ['http://mypeer.example/gun']});
Ally Jr
@3210jr
@WillWang002_twitter could be wrong but ... I think the message "0 length key" comes from trying to get something with a key that is an empty string or something like that. Please check for this. I just got rid of it on my end by fixing the key
i001962
@i001962:matrix.org
[m]
Just a heads up it’s that time of the month again and gun-manhattan has hit the Heroku free tier limit.
lain
@lain:iwakura.xyz
[m]
yo
Stone Codes
@stonecodes:matrix.org
[m]
I think i will write a util function that executes a function and then have n number of peers verify the result is roughly in range similar to having boundary states in conflict resolution
Stone Codes
@stonecodes:matrix.org
[m]
:point_up: Edit: I think i will write a util function that executes a function and then have n number of peers verify the result is roughly in range similar to how states have boundaries in conflict resolution
tedd pasta
@azdez:matrix.org
[m]
@amark: made another pull request, made some changes to lib/unset.js file. i know.unset() is basically .put(null), but i saw your post on stackoverflow about how .unset() is better to use for arrays. i make use of .unset() on gun-fetch, so thought i should try to add these changes.
YarnBall
@yarnball
Hi folks, has anyone integrated gun.js with the SMS/mobile phone number auth process?
tedd pasta
@azdez:matrix.org
[m]
@amark: here is the pull request, link is the same from my last pull request(by the way, thank you for accepting my last pull reuqest) amark/gun#1167
Mark Nadal
@amark
@rococtz is memo popular? :/ That's the frustrating thing. Devs are told to use the hype thing (TS, React, etc.), and unless memo is built in, they might not know how to use it either?
@3210jr hmm interesting, I know I have a unit test on it, I'll check again tho. Open a issue meanwhile to help track it?
deleting user may be buggy, sorry :( .
@connor-davis how many peers can you get up to before the browser slows down?
@salvobee :wave: :) <3 :)
@davay42 WOOOOOOOOAH MY pubkey circle avatar is following my mouse around the page!!!!! I'm a flying butterflllllly! So cool :) Nice job. Yes please, please, update docs wiki/awesome-gun ./Vite ./Vue all of them!
Hmm, setInterval might drain your CPU more than it helps debounce actually, just warning. JS is... yeah :(
@WillWang002_twitter :clap: @3210jr :+1: !! Yupe, like.get("").
@stonecodes:matrix.org without PoW you could have friends sign attestations as witnesses?
@cryptoboid how many users do you have?
@salvobee browsers will reject http on an https site, maybe that is why?
@i001962:matrix.org this'll be a faster driving force for me to finish AXE hahahaha than anything else. "So why did you build a world scale DHT?" "...Oh, Heroku runs out of hours at the end of the month, so I thought, if I load balance across different times of months, we wouldn't have to put in our credit card!" :laughing: .
@lain:iwakura.xyz :wave: !
@azdez:matrix.org thanks!
@yarnball nope :(
1 reply
cryptoboid
@cryptoboid
@amark currently just friends and family (AFAIK), have you ever heard reports like that? With RAD crashing/erroring?
rococtz
@rococtz:matrix.org
[m]

@amark: memo is part of standard React, it's a core feature. Long story short:

  • React.memo() is used to wrap a component. For example
    const Greeting = ({ name }) => <div> Hello, {name}!</div>;
    export default React.memo(Greeting);
    If the parent re-renders a million times, but the prop name stays the same, that component is not re-rendered, it's memoized so it "remembers" it should stay unchanged. This is a must for every real-life app.
  • useMemo is a hook that you use to memoize function results. For example, if you have a function that generates a deterministic result and it only depends on params, you generate the result only once. If I call the function a million times with the same param, it remembers the result without actually going through the function.

They are both very similar (identical maybe?) with Ramda memoizeWith
https://ramdajs.com/docs/#memoizeWith

Adam
@adam-12:matrix.org
[m]
TS and React are hype?
Maybe I misunderstand that.
PeacefulAF
@PeacefulAF
Hi, I am interested where is data stored and how to work with database in team collaboration?
Robin Bron
@finwo
@amark Any chance of the build process being reversed in the (near) future? So combining from smaller files instead of splitting the main file?
Using esbuild instead of other tools (webpack and browserify have too many artefacts for my taste), you could quickly merge everything, even just use require for your internal files, and compile to something compatible with both the browser and node
Radu
@rococtz
@adam-12:matrix.org React and Typescript in my opinion are the definition of hype, but that doesn't mean they aren't good. I have been working in React as my full-time job for at least 5 years now and I wouldn't trade React for anything else at this point (who knows what comes out next), but a lot of people are using them only because they are hype and unfortunately they are using them the wrong way
@PeacefulAF I think someone can write a book and it would still be in the scope of your answer :) I suggest you start with the introduction videos and then work your way through the docs and even try the hands-on tutorial:
https://gun.eco/docs/Introduction
If you invest 30-45 min of your time, you will have a lot of answers
Connor Davis
@connor-davis
@amark I tested it with @lmangani @Dletta and it seemed to be fast still, I need to know how to create multiple peers
Stone Codes
@stonecodes:matrix.org
[m]
Yes I think PoW is overkill, the Idea is if you are in a match with 5 people (nodes) you are just trying to figure if overall some people has massive advantage , if everyone in match is cheating then it's a fair match 😆
Stone Codes
@stonecodes:matrix.org
[m]
I can test with bots 😄
I will experiment 😊
Alex Caston
@aex12:matrix.org
[m]

Is there anyway I can implement on GUN some kind of authorization for writing to certain keys? I know there is gun.user() which gives the user the ability to write to their own graph which is publicly readable, but only he can write (or other users who are certified write access). However, for my use case, this is not feasible. What I need is a mix between the user graph and the public graph, a graph when anyone can write and read, but you can only update/delete graphs that you published.

So, if I do gun.get('forum').get('posts').set({ title: 'New exciting update!', content: 'Lorem ipsum dolor sit amet' }); my gun.user() is the only one allowed to update/delete that forum post. However, anyone can still add items to the forum/posts set

Mac16661
@Mac16661
Is there any way to implement SEA.verify() without promises?
Alex Caston
@aex12:matrix.org
[m]
I'm getting a weird bug. .map callback is called 3 times for the same data
davay
@davay42
Alex, you can link private user nodes to the public graph
So users store their posts and the forum thread is simply a list of the linked posts

@davay42:

So users store their posts and the forum thread is simply a list of the linked posts
Something like:
const post = user.get('posts').set(postData);
gun.get('forum').get('posts').set(post);
?
But is something preventing a bad actor doing gun.get('form').get('posts').put(null); ?