Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 04 23:41
    amark commented #852
  • Dec 04 11:53
    nmaro opened #852
  • Dec 03 14:36
    sirpy commented #522
  • Dec 02 22:54
    amark closed #851
  • Dec 02 22:53
    bionicles opened #851
  • Dec 02 17:59
    trokster opened #850
  • Nov 29 14:35
    mmalmi commented #819
  • Nov 29 10:26
    mhelander commented on b2709e2
  • Nov 29 09:43
    sirpy commented #819
  • Nov 29 09:42
    sirpy synchronize #819
  • Nov 28 11:53
    glensimister updated the wiki
  • Nov 28 09:46
    glensimister updated the wiki
  • Nov 28 09:09
    mmalmi commented #819
  • Nov 28 09:08
    mmalmi commented #819
  • Nov 27 08:50
    sirpy commented #844
  • Nov 27 06:42
    sirpy commented #819
  • Nov 27 00:54
    DaveWelling commented #849
  • Nov 27 00:47
    DaveWelling commented #849
  • Nov 27 00:19
    DaveWelling commented #849
  • Nov 26 22:19
    DaveWelling commented #849
Jachen Duschletta
@Dletta
[D]Renegade: <@583707253094350850> so what should I do
Jachen Duschletta
@Dletta
[D]allindeveloper: If i understood your scenario well.
this is how i would approach it.
      gun.get('nasa/public').get('outbox').map().on((data) => {inPosts.push(data)})
      console.log(inPosts)
      inPosts.forEach((post) => {
        this.setState({post:post})
      }) 

      // call this where you want the <li> to be created 
      renderList = (posts)=>{
          let nodeElems = [];
          for (let i in posts){
              posts.push(
                  <li>{posts[i]}</li>
              );
          }
          return nodeElems;
      }

      this.renderList(this.state.posts)
Jachen Duschletta
@Dletta
[D]circles: <@470186445945176065> have you looked into using iris-lib? It’s a social network library built on top of gun
Jachen Duschletta
@Dletta
[D]Dletta: Let’s see if discord supports URIs data:text/plain;charset=utf-16;base64,OCY5JjomOyY8Jj4mPyY=
Jachen Duschletta
@Dletta
[D]Dletta: The answer is no
nanotronic
@nanotronic
Hello, everybody,
following scenario: I use SEA to authenticate users.
First, I try to log the user in with his credentials. If there is an error, the user is created with user.create. His data is then stored under the user node. So far so good.
Now the user tries to log in to another device which has no internet connection. The user account is newly created and there is a new key. The user data of the first device are now of course not accessible.
Do you have any ideas how to make sure that the user data is always under the same key?
Jachen Duschletta
@Dletta
[D]Dletta: <@635370385180983298>tronic the only thing you could do is reconcile the users on your superpeer or I guess once you come online and your app logic detects these are the same people
[D]Dletta: @ nanotronic
Jachen Duschletta
@Dletta
[D]Dletta: <@178314946201780224> @TensorTom in Browser is FileReader and in node fs.readFile the normal method to get files? If so, it’s very possible to make a wrapper that uses their output then gun.get(files).set({filname: name, data:btoa(data), format:format})
Jachen Duschletta
@Dletta
[D]Renegade: How do make a user node
[D]Dletta: gun.user().get(key).put(data)
[D]Dletta: Or var user = gun.user(); user.get.out
Jachen Duschletta
@Dletta
[D]Renegade: And just clarify what does user.get().put() do
Jachen Duschletta
@Dletta
[D]Sayari:
[D]Dyno: Welcome <@651916610277212160>!!! GUN (https://github.com/amark/gun) is a P2P protocol for syncing data used by 8M+ people monthly across Internet Archive, HackerNoon, DTube (decentralized youtube), Notabug (p2p reddit), & more. Please try the 5min tutorial (https://gun.eco/docs/Todo-Dapp) to get started!
Jachen Duschletta
@Dletta
[D]nmaro: Mark is typing! To go to sleep or not to go to sleep? 🤔
[D]marknadal: <@470186445945176065> you need to add /gun.
<@321271119304720384> the UUIDs should be (in same instance) linear and monotonically increasing in loops. However, they are cast to strings, and depending upon how long a decimal is (whether it is padded or postfixed with 0 or not) I'm guessing the length of the IDs could be different, and ?JavaScript String Sort prefers shorter strings to longer ones. Maybe that decimal postfix combined with random is causing th eproblem, between a UID that doesn't have a postfix and one that does?
But yes, you are correct, it SHOULD be as you say.
gunjs uses RAD.
NOTE HackerNoon reactivated loading GUN for us to do testing before launching the new feature, so that means there are now ~4K peers connected to the same peer you use https://gunjs.herokuapp.com/stats.html so PLEASE NOTIFY ME if you notice any problems ever happen, as that will also impact/hurt HackerNoon.
Yeesh, I need to finish the DHT sharding sooner than later apparently, so we can load balance all these peers across everybody's superpeers! <@600559712420757507> :D
<@470186445945176065> who is using VS Code on a Phone!??? I'm building tools to code on a phone 😛 ideally. Look slike you are dealing with async versus sync code, thanks <@583707253094350850> for helping, he showed you how to put your sync code after the async code.
<@635370385180983298>tronic oye, correct, alias are not unique, so what you did is create 2 accounts, not 1, so different data. Yeah, you'd need to prevent offline account creation, or only login based on Public Key rather than alias.
<@651916610277212160> welcome 🙂 I was with you when you joined the channel. He is gonna help us work on Rust + WebGL rendering layout engine, <@258493519662940171> etc.
[D]marknadal: <@321271119304720384> haha
[D]marknadal: just adding - fixes? nice, tho extra byte rather not
[D]marknadal: but yes, it should be monotonic
Jachen Duschletta
@Dletta
[D]nmaro: I mean, it's a problem only if you create a lot of uuids in a row... That's what why pasted text to collaborative editor was garbled! 🙂
[D]marknadal: interesting!
[D]marknadal: yes, this is a good approach
[D]marknadal: surprised this hasn't popped up before, can you workaround for now? (you can pass a custom Gun({uuid: func...) but PR a fix too if you think of something (tho would like to not have extra non-entropic bytes).
Jachen Duschletta
@Dletta

[D]nmaro: Yep, I'm fine with custom uuid function for now. Been working on improving collaborative editor experience, tricky :)
an other more charitable approach would be State.lex = function(){ return State().toString(36).replace('.','|') }
this would work because the character | comes after all alphabet, so you would have

'k3r7wszf'   + 'QuKfuVDe5Rx0'  = 'k3r7wszfQuKfuVDe5Rx0'
'k3r7wszf|01' + 'aAV2F7Sod7Xab' = 'k3r7wszf|01aAV2F7Sod7Xab'

kind of awkward, but extra bit comes only when creating uuids in rapid succession

Jachen Duschletta
@Dletta
[D]marknadal: oh shoot, is the . still in the other UIDs?
Jachen Duschletta
@Dletta

[D]anoxy: <@178314946201780224> or @someoneelse if I would like to create a gun node online for my apps, is thet any recommendations for the CPU, RAM etc.. ? Of course I know that it depends on the traffic , but any guidance here is appreciated.

Also is it possible to create backups of the GunDB database in the node, just in case something goes wrong and restore the data ?

[D]anoxy: Is there any list of free for use GunDB peers out there ? I do know about the heroku GunDB peer, but a list would be good to have
Jachen Duschletta
@Dletta
[D]Dletta: You can copy the radata directory and move it to a backup every so often
[D]Dletta: You could run a free heroku peer
[D]Dletta: And point your local peer to it, saving yourself having to get a static IP
Jachen Duschletta
@Dletta

[D]anoxy: <@612728945313316904> thx for the information.

Is there any guide on how to run a free Heroku Gun peer with persistent data ?

[D]Dletta: I don’t think so... i made a non-persistence superpeer
[D]anoxy: Damn sorry just saw that it was deprecated
[D]Dletta: Use a fork of http.js to deploy
[D]anoxy: Non persistent mean that the data is lost upon reboot of server right ? Or did I miss something?
[D]Dletta: Correct, but if you have a local peer, it can be persistent
Jachen Duschletta
@Dletta
[D]anoxy: Ok thx
Jachen Duschletta
@Dletta
[D]marknadal: <@366349503265112074> yeah, use the one mentioned right in the center of the main README docs https://github.com/amark/gun#deploy 😛
Jachen Duschletta
@Dletta
[D]nmaro: I'm getting a message in the console: "IDENTIFI HAS HIJACKED SEA's SIGNATURE VERIFICATION FOR SECURITY REASONS!"
Jachen Duschletta
@Dletta
[D]nmaro: ^ apparently that message was caused by the PARTY chrome plugin
Jachen Duschletta
@Dletta
[D]Dletta: Correct
Jachen Duschletta
@Dletta
[D]Evgeny | Fluence:
[D]Dyno: Welcome <@491276361722232843>!!! GUN (https://github.com/amark/gun) is a P2P protocol for syncing data used by 8M+ people monthly across Internet Archive, HackerNoon, DTube (decentralized youtube), Notabug (p2p reddit), & more. Please try the 5min tutorial (https://gun.eco/docs/Todo-Dapp) to get started!
[D]Dletta: Welcome <@491276361722232843> How did you hear about gun? What are you building? What are you passionate about?
Jachen Duschletta
@Dletta
[D]Capitalist Dog: How quickly will we regret experimenting with encoded images for storefronts? Enforcing a sizeax of say, half mb?
Jachen Duschletta
@Dletta
[D]Dletta: As far as I know there is no upper bound, but bandwith can kill you on big strings. I’d say try to order and stream chuncks?
[D]Dletta: It’s still websockets and it’s strings, so performance can’t be that bad
Adebowale Samson
@netwrkx
Hello, is https://github.com/gundb/gun-schema still a valid plugin to use