Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Mark Nadal
@amark
I'm also known as "that guy who tries to read & follow up with all questions with help if they're missing" however since I was gone for 2 week I will <<<<NOT>>>> be trying to catch up on things.
Tho, does anyone have off the top of their head a bunch of new people they can tag for me so I can say hi hi hi hi??? :) :) :)
David Dahl
@daviddahl
I am on session and moving off of signal
Mark Nadal
@amark
let me try to DM you here
David Dahl
@daviddahl
ok
Lorenzo Mangani @qxip
@lmangani:matrix.org
[m]
welcome back @amark 🥳
rococtz
@rococtz:matrix.org
[m]
@ruslanjan: nothing stops users from wiping out pubic nodes. That's why you have to use the user space (SEA)
rococtz
@rococtz:matrix.org
[m]
@huberttl: it's probably referring to node.js peers (if you run gun in node as opposed to browser)
azdez
@azdez:matrix.org
[m]
i am using gun/lib/unset .unset() but i keep getting error

const rel = Gun.val.link.; // '#'

TypeError: Cannot read property 'link' of undefined

tedd pasta
@azdez:matrix.org
[m]
is gun/lib/unset not supported anymore?
rococtz
@rococtz:matrix.org
[m]
tedd pasta: I am not aware of any news about not being supported anymore, but it's just a small wrapper for .put(null). It's probably safer to just go with that
Mark Nadal
@amark
:D :) <3
@rococtz:matrix.org I tried to just DM you (let me know if matrix picks it up)
rococtz
@rococtz:matrix.org
[m]
@amark: I got it and replied as DM
libensveto
@libensveto_twitter
Dont know if you remember our convo on discord about erapay (im @blevvys) but had clarity and am rebuilding it to be 100% OSS and would like, if you would be happy about it, for it to be called erapay. Its come a long way and ill drop a demo in a day or two
@amark
βτεsηΘω
@bresnow
I deployed two gundb containers and tried to play in the browser console. The metadata shows up but the websocket connection fails immediately after i call Gun(<url>)... I get the Gun object back though
is this normal
Mark Nadal
@amark
@rococtz:matrix.org yay!
@libensveto_twitter :fire: :fire: :fire: :fire: :fire: OPEN SOURCE FOR THE WIN!!!! oooo so excited for the demo :D
@bresnow yo! Thanks for jumping in (you should show off some of your design skills!). It is possible that either:
(A) forgot the /gun, (B) the load balancer / etc. does not support sticky sockets or needs extra configuration (C) https vs http issues
@bresnow just noticed that @finwo also knows traeffik, so maybe you can collaborate on this wiki: https://github.com/amark/gun/wiki/Traefik see if his is working, see if his is missing stuff in yours, and then update it with the best of both???
libensveto
@libensveto_twitter
done is better than perfect so heres a quick preview of a gun version of stripe
libensveto
@libensveto_twitter
the app takes an input of a product name and price and gives you a checkout connected to your dashboard based off iris, so no sign-ups. The checkout is pre-stylised with tailwind. More data needs to be funnelled and categorised on the dash to make it more biz friendly. If anyone wants to help drop a dm
mimiza
@mimiza
@amark welcome back!!
awaisnazir21
@awaisnazir21
@amark gun is a wonderful project. its power lies in its simplicity. i really liked the .map() function. I now try to think in map terms than sql query terms.
@amark can you write an exact code to change the user login credentials. I know we can change password by setting parameter in user.auth, but I am lost how to change the username/email. I have searched documentation, google, github, this chat forum, but can't figure out. Maybe update the documentation also regarding username change.
@amark I have found a problem with .map(). It works ok alone, but when coupled with promises, it doesn't work anymore. Also .then() don't work with .map() in my experience, even vanilla javascript promises also don't work with .map() in my experience. I know .map() is still experimental, but you said to report any bugs, so thats it.
awaisnazir21
@awaisnazir21
@amark I also want to contribute to the gun codebase and its documentation, how should I even start?
rococtz
@rococtz:matrix.org
[m]
@awaisnazir21: Have you included the then module?
https://gun.eco/docs/API#-a-name-then-a-gun-then-cb-not-official-yet-
You can start by reading & understanding the docs. Whenever you find something that is not documented enough, you can update the wiki with more and better examples. Next level is to actually create a real app using gun, a proper app with features, users, etc. This way we can see gun in real use cases and discover bugs.
huberttl
@huberttl

Hi There. I am actually creating a gun app for PoC for next week using Svelte as framework. So far it works fine. I only have few questions
Deleting Object.
It seems that when deleting an object it returned error.

const db = GUN()
db.get('object1').put({price: 200})
db.get('object1').put(null) // returns run time error

db.get('object1').put({price: null}) it works

The ERROR as follow:
gun.js:1008 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
at walk (gun.js:1008)
at Gun.chain.put (gun.js:1045)
at App.svelte:12
at run (index.mjs:18)
at Array.map (<anonymous>)
at index.mjs:1731
at flush (index.mjs:1039)
at init (index.mjs:1823)
at new App (App.svelte:12)
at main.ts:5

I also would like to clean my local network (localhost:5000),

  • localStorage.clear()
    kill server but I can't find the data.json file to delete

Can someone please give me few hints (Thanks :))

mundane_pftts
@mundane_pftts:matrix.org
[m]

The docs say relay peers are greedy, but is there a way to restrict it's data persistence ?

If I have multiple root nodes , is it possible for that peer to only persist one particular node ?
( You can assume I will have multiple peers- some relay, some not)

If not , what are alternate approaches ?

Thank you in advance 😁
Jabis Sevon
@jabis
@mundane_pftts:matrix.org you'd need to stab the gun.js with super:1 to stop the greedy behaviour basically
@huberttl Cannot read properties of undefined (reading 'push') is a svelte error - have a looksie on the wiki for svelte integrations
probably something to do with the data-store there - can't reconsile previous object to null or something to that extent
Ruslan Jankurazov
@ruslanjan
Is it good idea to store arrays as json strings? I don't need to query it only to get it as part of post?
Jabis Sevon
@jabis

then for clearing gun - stop all your gun instances, node or whatever, throw in (function(){ localStorage.clear()})() for browsers in your scripts - clear the gun's radata folder from existence and keep it so for a good period of time - one peer coming back to life with the full graph is all that's needed to fill an emptied one :)
1 reply
Jabis Sevon
@jabis
@mundane_pftts:matrix.org for your question about separated gun instances - you might have a few answers from our meething multisocket guns - where one path is one room and none is persisted https://github.com/meething/gundb-multisocket
βτεsηΘω
@bresnow
@amark thanks I'll look into it. And I'm working on something to show you soon
Martti Malmi
@mmalmi
@rococtz I just pushed the www directory which has a usage example https://github.com/mmalmi/rusty-gun/tree/master/www
I haven’t actually tried integrating my npm package with anything else yet
βτεsηΘω
@bresnow
@amark lol... i forgot the /gun
gunchatbridge
@gunchatbridge
[D]ralev: hey, I would like to try to contribute on GUN for Dart/Flutter 🚀
is there a public repo for this already?
gunchatbridge
@gunchatbridge
[D]roco: <@!669808734318624809> most of us moved away from discord (together with Mark) to gitter https://gitter.im/amark/gun
Ruslan Jankurazov
@ruslanjan
how to load nested references? in bulk
rococtz
@rococtz:matrix.org
[m]
@ruslanjan: do you have a use scase? a scenario?
gunchatbridge
@gunchatbridge
[D]ralev: thanks for letting me know <@!788943121278173204>
Ruslan Jankurazov
@ruslanjan
@rococtz:matrix.org I have a deeply nested things like array in array in array. I know arrays are bad but I need them. I think It is better to just throw them in JSON string.
I did that for now, and it works. Before I called await gun.get(data) all the time
Mark Nadal
@amark
@libensveto_twitter w00000! Thanks for the demo :D tho can you explain the reject part its confusing me? Basically the realtime gun powered dashboard still gets updates of all attempted transactions? Is that the intent of the demo?
@mimiza <3 <3 <3 <3
@awaisnazir21 thank you! Yesss! map is very much there for table/sql like thinking ( https://gun.eco/docs/Graph-Guide ) .(what do you mean email/password?) :clap: @rococtz:matrix.org is correct that .then() does not work with map because JS Streams are not Promises.
@huberttl you can't save primitives to root level nodes, it should log such a warning rather than crashing but looks like I need to fix that, thanks for the heads up, I'll make that more clear with an error.
@mundane_pftts:matrix.org :wave: :). :clap: @jabis ! Great pro tip on how to reset dev gun network!
@ruslanjan either as an Array Object, or stringify, or .set( for loosely ordered lists.
@bresnow :fire:
@mmalmi I AM SO EXCITED THIS IS SO COOL!!!!! Just got off multiple hour call with you seeing this, so epic.
@gunchatbridge hi ralev!
@ruslanjan check out .open( in docs/API#open