Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:06
    rococtz commented #1190
  • 03:05
    rococtz commented #1180
  • 03:04
    rococtz commented #1180
  • Jan 28 05:51
    madhav-madhusoodanan edited #1194
  • Jan 28 05:45
    madhav-madhusoodanan opened #1194
  • Jan 27 22:12
    phantomlsh commented #1193
  • Jan 27 22:06
    phantomlsh commented #1193
  • Jan 27 17:34
    amark commented #1193
  • Jan 27 17:34
    amark closed #1193
  • Jan 27 17:34
    amark commented #1193
  • Jan 27 17:04
    phantomlsh commented #1193
  • Jan 27 16:40
    phantomlsh commented #1193
  • Jan 27 16:38
    phantomlsh commented #1193
  • Jan 26 19:44
    dweorh updated the wiki
  • Jan 26 17:10
    phantomlsh commented #1193
  • Jan 26 12:22
    Jourdelune closed #1183
  • Jan 26 12:22
    Jourdelune commented #1183
  • Jan 26 10:17
    atordvairn commented #1183
  • Jan 26 10:16
    atordvairn commented #1183
  • Jan 26 01:36
    phantomlsh opened #1193
Jonathan Sheely
@jsheely
Anyone have a TL;DR code snippet on how to use erase plugin? /lib/erase.js
Jonathan Sheely
@jsheely
Feels like Gun is going through a major update and the code is in a transition period? Is that accurate?
GuillermoBondonno
@GuillermoBondonno
Hi everyone, noob question, I just did the Hello World example with an express server node as relay, but of course when I take down that server the client instances stop being in sync, after all the gun instance is directed to the server domain in the source code. Is the data still spread among the clients in this case? What would be the procedure to have every visitor of the domain share their part of the storage?
3 replies
Ally Jr
@3210jr
Hey all, I'm having performance issues with React Native and gun. Querying 100 records in a set can take up to a couple of seconds while entirely locking the UI on a mid-level phone (4GB RAM & 64GB Storage Samsung A21).
1 reply
Has anyone experienced the same? or is it expected to be this different from the web experience?
@rococtz:matrix.org @sirpy any thoughts on performance in react-native? or any particular common traps you have encountered?
rococtz
@rococtz:matrix.org
[m]
@3210jr: I have no idea, but it doesn't sound it works by design :) I suggest you try the same thing in pure React in the browser. If you have the same issue, it's definitely not React Native.
Mark Nadal
@amark
@GianmarcoTurchiano @jamesgibson14 heads up I often don't see sub-threads, so if you need me to read/reply to something, please use main.
@piboistudios :+1: , + this one: http://math.free.eco
@pm2l:matrix.org cool video!!! Sorry you're sick :( :( :( . Can you make another one with 2 windows next to each other, syncing, and maybe some explainer, that I tweet?
@AveApollo :clap: @rogowski @hamilton-lima @Orimay . Also ws docs has verify: option.
@hamilton-lima :laughing: @athanazio_twitter !
@isaac_tich_twitter :clap: @hamilton-lima ! Sounds like you 2 figured it out? Or not? Common thing people do is test against the example/basic/paste.html , if you see that syncing on your peer then things are fine, something is wrong with your app code instead.
@NuclearManatee :clap: @rogowski :clap: @Orimay :clap: @COCPORN ! Sounds like you'd like the https://gun.eco/docs/API#open extension. Warning useEffect does weird magic.
@jdubbsthedev_twitter unfortunately no job openings :( but OSS volunteer openings!!! Let me know if you're still interested?
@Tezza48 :+1: @rogowski .
@haveanicedavid:matrix.org oh wow, still remember the Netlify/Vercel thing huh! Do you know how to start? (Its kinda similar to that streaming SQLite thing).
@PlanetNoobGotHacked :clap: @NuclearManatee . :+1: @draeder :+1: @rococtz:matrix.org . Prob some of my code, sorry. Goal of AXE is that you just start GUN, don't need to worry about peers, AXE automatically does it.
@robhicks still not intended for financial apps. GUN will ONLY load the selected path, not any of the neighboring items.
@azdez:matrix.org (?)
@draeder :fire: ! Record a demo for me to RT? Wow, you did a rewrite fast! Was the this binding because of GUN? Rather than assigning you could use prototype in JS?
@Orimay @draeder if WebRTC then the peers become direct neighboring peers. You don't need all peers to be direct tho (this is bad), peers will relay for other peers (Alice <-> Bob <-> Carl), including browsers actually.
@piboistudios that'd be ideal, I bet it is supported across Browser/NodeJS/React-Native/RasPi/embedded tho now, so as long as someone can show it being consistent and interchanging fine then that's a good greenlight. But B64 not as bad as might think, its only +16% and is universally supported everywhere.
@jousi592 @wayjake πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…πŸ˜…
@Ca-moes true :( sorry haven't updated it to latest yet. Wanna help? Woah @wayjake what is that magic?
@mochic :wave: :) :) maybe the default axe one was down? Did switching to @draeder 's or others fix?
@mmalmi :fire: :fire: :fire: !!!! Ooooo! So we can start PANIC testing it? Sexy stats :D :D :D
@jerl__gitlab huh :clap: @rococtz:matrix.org I thought that was updated, somebody else mentioned this. Willing to copy it to latest & PR new link?
@mangledbottles see the bottom of the https://gun.eco/docs/SEA quickstart, then you can get the epub by doing await gun.user(pubkey).get('epub') of the other users, and share the pub keys via a URL or something. Ton of E2EE apps (Iris, etc.) here so hopefully some others can chime in with their example apps.
@AdrKacz do a quick check for me and make sure they're all have same clock? Or is Android out of clock sync? This is usually the first thing I check... let me know if not.
@jsheely :clap: @Orimay :clap: @wayjake :clap: @robhicks . Also , this errors properly (not gibberish) on latest GitHub. Haven't seen erase used in forever, may not work.
@GuillermoBondonno :clap: @robhicks !!
@3210jr oye oye oye! That isn't good. It should be CPU scheduling it so UI stays fresh, is this in-memory only or is this hitting a storage layer? There was issues with JS crypto shim for SEA on RN that was slow but ever since the webview bridge we haven't had those problems as much.
I'm unfortunately not able to get code stuff done the next couple weeks, just as warning, and like I mentioned the other day may still be pretty spotty here as I'm doing this legal stuff. Hope to be back to full speed in couple weeks (does life ever, these days, tho?). Thanks <3 :pray: all for doing such amazing job helping each other out. :) <3
Orimay
@Orimay
I'm open to help with useEffect magic
@amark, if WebRTC is not suitable for peers connection, then what is? I haven't found how you make the peeers talk to and be aware of each other without server
Also, I made a couple of pull requests to fix LEX and verify function a little
Orimay
@Orimay
Trying to adapt GUN to handle undefined, so that we could drop redundant keys as an opt-in, opposite to null that keeps the key. can't seem to find what handles null. Or it might be a storage adapter not configured to remove key on undefined input. Is there anything else I should pay attention to? Will update if I find it myself
Nuclear Manatee
@NuclearManatee
@amark I did a quick text in a code sandbox and .open() is the thing I needed!
@Orimay useEffect magic get worse and worse, but I'll try it with my proper stack before start banging my head against the wall - let's hope react-native and expo magic wouldn't be too bad.
Martti Malmi
@mmalmi
Gotta love the resilience of gun :heart: There was a sync error in my server and I thought I lost my Iris messages, but they popped up in the browser immediately when I opened iris.to on my phone which had saved them
@amark yes, we can panic test now
Now that I increased websocket frame size from 64kB -> 8MB, sync works very nicely but I see constantly increasing mem usage again. I think I’ll start measuring the total size of graph nodes and show it in stats, so it’s easier to see if memory is leaked or used for actual storage.
currently 25451 graph nodes and using 450 MB RAM
Martti Malmi
@mmalmi
if it’s just graph size, need least-recently-used or some other priority metric to forget the least important data when configurable graph_max_size is exceeded
6 replies
Jonathan Sheely
@jsheely
I'm calling gun.user(..).load() and the first time I get an empty object at the profile even though there is already data in there. If the other client does the redundant put operation user.get('profile').put({data:'test'}) then it eventually shows up automatically on the other client. Why is it not getting this initially?
6 replies
Daniel Raeder
@draeder
@amark The this bindings were a recommendation from @Orimay, and for pulling in the Bugout internals. It isn't quite yet a Gun chain extension.. That's on the agenda ... I will try to put together a video in the coming week!
Lexi
@Lexi:matrix.org
[m]

Hi everyone, could need some help :-)

Since map doesn't return a promise, how can I make sure that Javascript gets all the sub nodes before the next command?

I know I can use gun.get("names")._.put but is there some way to do that with the API? Does .load return a promise? That didn't work for me in the browser however :\

4 replies
Jonathan Sheely
@jsheely
@Lexi:matrix.org I'm struggling to get load to work initially but it supports a callback so in theory using the .then package would give you the promise by chaining .then() on the end of the load()
But right now when I do .load() I don't get the entire graph of the public key user which is frustrating me
Lexi
@Lexi:matrix.org
[m]

Ohh, .load didn't work in the browser because I needed to include open.js as well!

Yeah it didn't "load" anything on first execution for me either. However if I do (async () => {console.log(await gun.get("names").get("sizes"));})(); in the browser console it does seem to work :o I'm confused

Jonathan Sheely
@jsheely
Starting to lose faith that this is going to work for me.
1 reply
Lexi
@Lexi:matrix.org
[m]

:point_up: Edit: Ohh, .load didn't work in the browser because I needed to include open.js as well!

I just noticed I can just use .get however I can't seem to get Javascript to "await" it's execution. Does this work for anyone: let test; (async () => {await gun.get("names").get("sizes").then()); console.log(test);})();? I just get Promise pending. I think I'm doing something wrong. If I console.log(test) afterwards the data is there.

Jonathan Sheely
@jsheely
Yeah going through all the example folder when I try multiple clients none of them work how I'd expect them to even when I add a peer for them
I'd help fix them but I can't seem to get anything other than the basic to work but even then it's shakey
Lexi
@Lexi:matrix.org
[m]

:point_up: Edit: Ohh, .load didn't work in the browser because I needed to include open.js as well!

I just noticed I can just use .get however I can't seem to get Javascript to "await" it's execution. Does this work for anyone: let test; (async () => {await gun.get("names").get("sizes").then());})(); console.log(test);? I just get Promise pending. I think I'm doing something wrong. If I console.log(test) afterwards the data is there.

Jonathan Sheely
@jsheely
Not sure If "m doing something wrong, code doesn't work, or I have a miss understanding of how it's suppose to operate
Lexi
@Lexi:matrix.org
[m]

:point_up: Edit: Ohh, .load didn't work in the browser because I needed to include open.js as well!

I just noticed I can just use .get however I can't seem to get Javascript to "await" it's execution. Does this work for anyone: let test; (async () => {test = await gun.get("names").get("sizes").then());})(); console.log(test);? I just get Promise pending. I think I'm doing something wrong. If I console.log(test) afterwards the data is there.

21 replies
Jabis Sevon
@jabis
have you included gun/lib/then.js?
before invocation of Gun(...opts)
Gun.chain is not promisified because it's reactive - you might call a .get that traverses over multiple peers - first answer will be always your local storage/indexeddb - but as you're asking the actual network to provide the requested data, you can't be satisfied with the first answer - otherwise you'd have split state across all peers :)
Jabis Sevon
@jabis
the way promises work is they promise you a resolution and after they've concluded a resolution it's immutable, so in gun being reactive your .get(..).then() would be set in stone - so the requests you've made that are in-flight to the network would never get to the actual merging process
Jonathan Sheely
@jsheely
I only seem to get updates from peers after the peer has connected. If I ask for information I get nothing even if another peer has that data already. It's not until I update that data does it show up on the peer
7 replies
Jabis Sevon
@jabis
you can play with the wait param of .get(stuff,{params}).then() to decide the cutoff to let the network answer some, or then use some observable/proxy object to update your UI
1 reply
Jonathan Sheely
@jsheely
@jabis Do you have a specific version you recommend that I should use that is "stable"
Jabis Sevon
@jabis
@jsheely not really - I've frozen my own gun distros to some version of master a long while ago, where it just works, haven't checked recent builds in a while :)
but like I said - I'm serving the exact version from the same repo I checked out - no <script src="npm/jsdelivr"></script> on frontend contradicting the version I'm using on node side :)
Jonathan Sheely
@jsheely
Yea I'm using the same version as well served from the latest NPM version. Client is just two chrome profiles on the same express site
Jabis Sevon
@jabis
try to checkout the master from github and see if that changes things :)
Jonathan Sheely
@jsheely

Well here is a bit of news.... I'm switched the build target to ESNext and now it works vs ES2017. So now I'm curious on what got mangled. Not 100% this is the fix yet

Figured it had to be on my end

Dani
@Ca-moes
Hi, how can I get the alias of the current logged in user? in gun.user().is.alias there is data but it's not the correct alias
(current alias is chef1)
1 reply
image.png
Jonathan Sheely
@jsheely
Sadly, The ESNext wasn't the fix. Tried to replicate the solution and turns out it was just a fluke
Jonathan Sheely
@jsheely
Are web clients suppose to be able to communicate without a central peer?
Jonathan Sheely
@jsheely
I think I'm just having a bad week.. I decided to reboot my computer because :shrug: and now I"m having more reliable connection between the peers. So that's good but not sure why it was having a problem. Perhaps another sample project was conflicting?
rococtz
@rococtz:matrix.org
[m]
@Ca-moes: What you did was right and I can confirm it should work. Are you sure you were logged in using gun.user().auth ?