Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 16 08:22
    davay42 updated the wiki
  • Jan 16 08:20
    davay42 updated the wiki
  • Jan 16 06:22
    Orimay opened #1191
  • Jan 16 05:22

    amark on master

    Update README.md (#1181) (compare)

  • Jan 16 05:22
    amark closed #1181
  • Jan 16 05:22
    amark commented #1181
  • Jan 15 00:46
    mbround18 commented #404
  • Jan 15 00:39
    mbround18 commented #404
  • Jan 15 00:38
    mbround18 commented #404
  • Jan 15 00:38
    mbround18 commented #404
  • Jan 15 00:38
    mbround18 commented #404
  • Jan 15 00:29
    mbround18 commented #404
  • Jan 14 23:39
    Orimay synchronize #1189
  • Jan 14 23:36
    Orimay synchronize #1189
  • Jan 14 23:35
    Orimay synchronize #1189
  • Jan 14 14:13
    shemeshg edited #1190
  • Jan 14 12:55
    shemeshg opened #1190
  • Jan 14 12:54
    soulsam480 commented #1174
  • Jan 14 12:51
    shemeshg closed #1188
  • Jan 14 03:39
    draeder updated the wiki
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
will be back on later tonight.
Ally Jr
@3210jr
Hey all! Is it a best practice to not have nodes you wish to delete later as root nodes? As you cannot set primitive values (null tombstone) to it?
The docs seem to indicate I can just gun.get('uid').put(null) to delete something but I keep getting the same error as @huberttl but for react-native: TypeError: Cannot read property 'push' of undefined, js engine: hermes
libensveto
@libensveto_twitter

yep, the rejection is bc i got no eth to pay for it. I should play around on a testnet. The mvp would be

product creation -> checkout generator with product built in snippet -> analytics of all transactions that checkout produces -> potential profiling of repeat customers & streamlining for them.

Then b2b functionality for business to start trading in eth, with automated payments, one off payments and invoicing in eth.

like if xero or quickbooks could do b2b transactions and plug and play checkouts

@amark
libensveto
@libensveto_twitter
successful transaction with data put in a bucket on the other end
rococtz
@rococtz:matrix.org
[m]
@3210jr: It's not best practice to use root nodes in the first place because root nodes are part of the public space. That means that everybody can delete/edit that data and you don't want that. If you want to build a real app, you must use the user space which everyone can read, but the write is restricted. By default, only the owner of the user space can write, but you can grant other people write access using SEA.certify. These certificates can allow specific people or even everybody but based on certain rules (for example, you can write under my user node, but only into a sub-node that contains your pub key).
1 reply
achilles
@achilldotes_twitter
Hello all, I have finished up a project and have a lot more free time to study gun. I learn best by reverse engineering pre built things while following along with the documentation. My main concerns are understanding how log in and register systems work on gundb. I am looking for a project that performs logging/registering and perhaps some other tasks like private messaging if possible. The first open source project that pops up into my mind would be NotABug. I haven't had the time to look into their code, but the site seems very well formed from the outside. Is this the best possible project I could devoid my time to? Or has a more impressive forum/chat open source project been made for gun? Thank you for your time.
rococtz
@rococtz:matrix.org
[m]
@achilldotes_twitter: The authentication part is actually part of the SEA module, not really part of the core of Gun.
If you are interested in chat/messaging/social media built with gun, you can checkout iris messenger:
https://github.com/irislib/iris-messenger
https://github.com/irislib/iris-lib
Also, if you want to reverse engineer it, why not just straight-forward engineering without reversing it?
https://gun.eco/docs/Porting-GUN
achilles
@achilldotes_twitter
@rococtz:matrix.org thank you so much, I think this might be my prime choice as long as it's open source. Looks very robust. My only complaint is how it automatically creates an account on first page visit. However, I bet that is more of a DAPP thing and is pretty well respected in the DAPP community. I will be considering that in my implementation.
rococtz
@rococtz:matrix.org
[m]
who creates an account on first visit? iris messenger?
that's nothing to do with gun
it's just an app decision in iris messenger
Mark Nadal
@amark
@3210jr :wave: ! :clap: @rococtz:matrix.org
@libensveto_twitter ahh duh I should have realized that lol sorry. Interesting. I'm not super familiar with blockchain/payment world, so is what gun is doing here is realtime updates - but don't they depend upon reading ethereum status, so therefore just as slow?
@achilldotes_twitter :wave: ! :clap: :clap: @rococtz:matrix.org !
libensveto
@libensveto_twitter
@amark a failed transaction -> failed gun put() so yea just as slow. Guns the backbone for attaching wallets to people, analytics for sales and inventory management.
Ruslan Jankurazov
@ruslanjan
Does .then() no longer required?