Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:54
    Azarattum commented #1271
  • 05:15
    Azarattum commented #1271
  • Aug 09 22:58
    draeder commented #1271
  • Aug 09 22:33

    amark on master

    unbuild - PUBLISHED! 1238 (compare)

  • Aug 09 22:24
    amark commented #1266
  • Aug 09 22:24

    amark on master

    SEA - Update sea.work to suppor… (compare)

  • Aug 09 22:24
    amark closed #1266
  • Aug 09 22:17

    amark on master

    stupid cache miss kills me all … (compare)

  • Aug 09 20:08
    amark closed #1270
  • Aug 09 20:08
    amark commented #1270
  • Aug 09 20:08
    amark commented #1271
  • Aug 09 19:29
    amark commented #1269
  • Aug 09 16:05
    Azarattum commented #1271
  • Aug 09 15:14
    Azarattum commented #1271
  • Aug 09 13:43
    Azarattum commented #1271
  • Aug 09 13:39
    Azarattum commented #1271
  • Aug 09 13:25
    Azarattum opened #1271
  • Aug 09 12:03
    chanyabuangern opened #1270
  • Aug 09 08:40
    mmalmi opened #1269
  • Aug 07 00:47
    amark updated the wiki
Adam Bowman
@abow
@adamblvck try using: require("gun/sea");
tedd pasta
@azdez:matrix.org
[m]
pushed some updates on https://github.com/resession/gun-fetch i took rangermauve's suggestion and started using headers, basic GET request is done. if you add the header X-Gun: 'NOT', then the get response will use .net() function, if the X-Gun header is not used, then it will respond by just getting the data from .once() and returning that. also there is a X-Auth header that way you can use the alias. should be able to use pubkeys right now, but i gotta look at that later
.not() function / gun/lib/not **
WILL
@WillWang002_twitter
Hello @rococtz. Hello. I get a question. The message list in gunDB will increase to a very large size and will crash the app. the history message should be cleared up. How can i delete the message list? I use the .set API to set the message into the message list About your answer, use .put to replace .set. How can i store the message list in gunDB
Radu
@rococtz

@WillWang002_twitter I am not sure I understand the question. You store like it this:

const message = { id: Uuid.v4(), text: 'how are you', timestamp: Date.now()};
gun.get('messages').get(message.id).put(message);

(Uuid is an npm package that generates random ids)

Wasis Haryo Sasoko
@yokowasis

@WillWang002_twitter from the docs

Querying is not provided out of the box, but path traversal and map functions can do a lot of the heavy lifting. gun.get(‘index’).map().on(callback) or .once(callback) will execute / traverse all children of that index and given a callback that can check properties against a query will return the data as a query result.

To keep queries performant your data model should keep data accessible in small networks. This can be done in using specialized indices to keep the set of data small. For example, querying for a person with the name 'Alice' in a huge database by following the 'allNodesIndex' will perform poorly, as the gun.get('allNodes').map().once(callback) will execute the callback on each node in the graph, while a 'person' index only iterates over the person nodes in the graph. And if your data includes gender, you may have a 'female' index, reducing the search space further.

If you have arbitrary values, such as ages or numbers or multi-node data points, you can build a binary tree structure for indexing.

Modeling your data for your use case and for your most common queries can greatly increase the performance of your queries. Often the best approach is to start studying graphs and knowledge representation in depth instead of trying to use something like SQL queries in an attempt to keep using old data approaches.

libensveto
@libensveto_twitter
redoing erapay with metamask standby everyone!
awaisnazir21
@awaisnazir21
Hi. I am a new Gun User. And it is all that I wanted: Javascript, Graph DB, Authentication, Opensource, Functional Reactive Programming, and number of stars on Github shows its relative maturity. Many methods are still experimental, but if one sticks to main methods, then it works well enough. And I hope gun.js becomes part of the Javascript API at ECMASCRIPT and Node.js and other platforms. It is just so much convenient.

Anyway my main question is: how to change the username email address. I searched this forum, and Mark pointed out to change the pubkey by .set() method. I tried unsuccessfully, maybe I am not writing the correct code. Can someone suggest a sample working code like e.g. user.get("is").get("alias").put("blah@blah.com"); to point in the right direction?

where
let user = gun.user().recall({sessionStorage: true});

ADAM BLVCK
@adamblvck

@adamblvck try using: require("gun/sea");

@abow

Hi Adam, sadly, this doesn't work! Metro still complains about dynamic requires at line 5 in 'gun/sea', which are not supported. What Expo SDK are you using?

Radu
@rococtz
@awaisnazir21 You want to change your alias or your login credentials? You cannot change those, they would generate a different pair
awaisnazir21
@awaisnazir21
@rococtz I am coding the dashboard page, and I need to change the login email address. so yes, login credentials. I was also thinking that pub and epub keys are kind of encrypted with the email id i guess, so they shouldn't change on direct set. So, where to set the login email directly without dealing with all the encryption stuff.
pwFoo
@pwFoo
Hi,
is an example available how to prevent duplicates? For example people with the same name? If I create a person with the same name two times I have a duplicate node / object. How to prevent nodes / object with the same attributes?
A small list of people would be easy to verify if such a object exists in UI / data, but maybe there is a easier way to verify during save data to merge by attribute names?
Connor Davis
@connor-davis
Can anyone help me with making my gun relay a super peer and stopping local storage in the browser?
Lorenzo Mangani @qxip
@lmangani:matrix.org
[m]
this will spawn a new ephemeral instance by changing url and the client will remember nothing from previous sessions (being new each time the url changes) - not exactly what you wanted but mixed with no storage settings in the client produces a similar effect
Ruslan Jankurazov
@ruslanjan
I want to my simple posting web site
How can I prevent other users from deleting posted reference to post saved in SEA
Ruslan Jankurazov
@ruslanjan
But I think users still can delete this post
Ruslan Jankurazov
@ruslanjan
And what stop users to wipe out every public data that is not bound to user via SEA
JavaScript Raj
@coding-island-js
I'm able to create a relay peer that will save the data and the data persists even if I open a new browser with cleared local storage. however, when I try to display the data in HTML using JS the data briefly displays and then the page refreshes and the data is not displayed. do you know why? when I didn't have the relay peer, the data would display and refresh. i think its because i added this line to the client side JS, but don't know why it refreshes. this causes the page to refresh after briefly displaying the data: let gun = Gun(["http://localhost:8765/gun"]);
cont' let gun = Gun(); does work, but then I have no relay peer and can't access the data from another browser
huberttl
@huberttl
Hi Guys. I tried to clean slate data for development. It's mentioned that after localStorage.clean(), I need to rm data.json. Where is this data.json file? Please give me some hint. Thanks
Mark Nadal
@amark

H E L L O ! E V E R Y O N E !

I am back!!!!!

David Dahl
@daviddahl
w00t
Mark Nadal
@amark
maybe people forget who I was while I was gone (family emergency, legal deadlines). I'm one of the authors.
David Dahl
@daviddahl
i'm still obsessed with gun, fwiw
Mark Nadal
@amark
<3 <3 <3
let's do a call?
David Dahl
@daviddahl
sure
lemme know what works, I am in EDT
Mark Nadal
@amark
today? tomorrow? good times?
David Dahl
@daviddahl
I can do today or tomorrow or Friday
Mark Nadal
@amark
DM me on twitter and I'll send you a link?
David Dahl
@daviddahl
I nuked my twitter years ago :)
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)