Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Daniel Raeder
@draeder
@ilhamgum something like this.. not tested as I wrote it directly in chat
const Gun = require('gun')
const SEA = require('gun/SEA')

const gun = new Gun()
const user = gun.user()
const pair = await SEA.pair()
user.auth(pair)
gun.on('auth', ack => {
  if(ack.ok) console.log('Authenticated')
})
Suleiman Zhukov
@SuleimanZhukov
@ilhamgum thanks
gunchatbridge
@gunchatbridge

[D]ironman: (NRC) NarCoins - Your own emission of currency (& goods).
So well, is it time to make a real people's currency? Yes, exactly.
Many countries impose restrictions on cryptocurrencies and fiat transfers. The way out is to make a completely community-driven currency that people will create with their name of ownership and be used in the web of trust in which we are transparent to each other. Yes, instead of Franklin, your name can be on the banknote or goods. πŸ™‚
People alone or in small groups cannot resist governments and corporations that violate human rights, so we must create from scratch a global corporation in which all assets will be the common property of the Umbrella social corporation.
*NarCoins - Narod (rus: People) Coins.

Need proof of concepts: 1) P2P Smart Contracts without any Server and commission.
2) I am developing now a P2P Marketplace, using Gundb with wallets we can use SEA.pair() for emission of NRC. But how can we add to Gundb immutable features in some cases?

I WIN
@zelenskyszebra:matrix.org
[m]
gunchatbridge?
where is gun chat?
rococtz
@rococtz:matrix.org
[m]
I WIN: that bridge is bringing in discussions that happen in the old discord channel which almost nobody uses nowadays ever since Mark was banned by Discord
1 reply
gunchatbridge
@gunchatbridge
[D]ironman: Yeah stupid web 2.0, you need thousands copy of me to talk in different domains. Shit!
igormuba
@igormuba_gitlab

Do you have any suggestion for Gun.js for scalability?

We are building a messaging app that could scale to millions of messages (possibly more considering some people may abuse). We are worried about storage limitations both for the client and server side.

I am searching for, but still did not find anything, about pagination on the client side, so that I can load only the most recent messages and relieve some of the load.
On the server side I have no idea yet, gun-mongo sounds useful but they warn that it also can't deal with very large sets of data, gun-mong-key seems like it is there to solve part of the issue, but I am learning the how and why of that.

gunchatbridge
@gunchatbridge
[D]ironman: @igormuba_gitlab, i think making decentralized app and store messages in centralized server is the fake way of decentralization.
igormuba
@igormuba_gitlab
Anyone can become a peer with gun.js, that is the goal
gunchatbridge
@gunchatbridge
[D]ironman: i storing messages on peer side. why not πŸ˜‰
igormuba
@igormuba_gitlab
Because some browsers may have limitations, and eventually some people with weaker devices can run into performance issues. Maybe gun.js does something to mitigate that, but from what I have read it doesn't seem like it
gunchatbridge
@gunchatbridge
[D]ironman: BTW, We need real independent media and resist fake news. πŸ€“ How can we achieve this goal?
First of all, we need a web of trust where people will use proof of location to each other. 🀝 Then we need to make a network of local activists who will point out and figured out local problems. Then add features, some kind of StackOverflow for solutions to solve local problems. Done! ✌️ I will add in https://wepower.red this future. Yeah StackOverflow for real life its should be useful.
[D]ironman: @igormuba_gitlab you mean storage? indexeddb gives enough memory
Bo
@worldpeaceenginelabs
@gunchatbridge look up https://cloudatlas.club, especially the infobutton behind Buckminster Fuller and the page behind Learn More. I think you will like it ;)
What you just wrote, is pretty much what i am up to...
I call it a social network for good deeds (Sustainable Development Goals oriented) or better said, a Spontacts (European social network for spontanious contacts, bbq, take a walk, cook together, etc.) but for good deeds only. With a online TV channel later, on which people can spread their successful missions or even livestreams to the curious watcher. The watcher will be able to join via livechat and give crypto donations.
gunchatbridge
@gunchatbridge
[D]ironman: @worldpeaceenginelabs, yes we need decentralized community intelligence, but first of all, we should understand what the common good and common assets of uniting people are. And with this understanding, it will be easier to work in one umbrella corporation. Without it, everyone will be trying to change the world alone or in a small group of people.
Hr4rjuku
@Hr4rjuku
Does anyone got GunDB into react-native ? It doesn't work for me. I get a log message 'warning: no localstorage...'
Suleiman Zhukov
@SuleimanZhukov
i can't use User Api within my react app , it keeps give an error that gun.user() is not a function , any advices ?
Suleiman Zhukov
@SuleimanZhukov
guys?
igormuba
@igormuba_gitlab
@SuleimanZhukov you need to import import SEA from "gun/sea"; even if it is not used, I don't know why
Bo
@worldpeaceenginelabs

@gunchatbridge

Without it, everyone will be trying to change the world alone or in a small group of people.

This is why i dont set the rules myself. The rules are the SDG's, the human rights, the fundamental rights, the physics, chemistry, and math laws and the legal laws of each country or area. but this time, the judge is either community driven or artificial or a combination from both. we'll see.

Bo
@worldpeaceenginelabs

@gunchatbridge

Also i have a very straigt view on human beings and their values https://worldpeaceengine.pubpub.org/pub/human-os/release/18

image.png
Bo
@worldpeaceenginelabs

@Hr4rjuku @ilhamgum

Hey everyone,

I like to share something with the community, because i am reading a lot here, that you guys still use react.

Definitely check out the following stack, you'll never do anything else again(pure JS), i shit you not πŸ˜‚

+++

Jamstack (JS, API, Markup)
WTF is Jamstack? https://jamstack.org/

Put your sourcecode on GitHub for free, put the "static" output on CDN for free (Cloudflare Pages, pulls build from Github itself, awesome versioning and A/B testing with generous free tier, other dependency or node versions with build variables, easyyyy)

My Cloud Atlas app's typical load time is around 392 ms worldwide
https://blog.cloudflare.com/cloudflare-pages-is-lightning-fast/#:~:text=But%20how%20is%20Pages%20so,the%20world's%20Internet%2Dconnected%20population.

+++

Svelte in 100 seconds https://youtu.be/rv3Yq-B8qp4

Svelte (not Kit) with Vite Bundler
npm create vite@latest, then select svelte-ts
https://vitejs.dev/guide/#scaffolding-your-first-vite-project

Svelte Material UI https://sveltematerialui.com/

  • no boilerplate, small code to write, small code to safe (Cloud Atlas with compression from 4,3MB(react) to 1,02MB(svelte)), fastest execution(automatic vanilla js export), readable on anything that has a browser. future proof. Svelte is a compiler, not a framework, nothing new to learn here πŸ˜‰

  • I've only been actively coding in js for a 4 few weeks now, but I can already convert react code to svelte, sooo easy as pie svelte is. (i just cut the react shit away, leave the js, and replace useeffect with onMount(async () => {}); sometimes)

+++

In Svelte, every component is also a page. Every component/page is splitted in <script><markup><css> connected via exports and modals with the other pages/components (no virtual DOM) So you just need to know JS 🀯

+++

With the just described stack you can build a static website, a dynamic website (hydrated via API), a crypto site 😜 or even full blown apps like my Cloud Atlas. (the planet in the background is not a picture, but a dynamic WebGL application like Google Earth, but open-source and with the possibility to build games into this Google Earth like environment via Unreal Engine 5) 😎
https://cloudatlas.club

As I said, maybe 4 weeks of active coding, 20 years ago HTML, CSS, some javascript, but reading source-code in different languages since. If i can do it, you can too.

Definitely check out the stack. Lightspeed for free.

Have a great day everybody!

Mark Nadal
@amark
@haveanicedavid want to join the calls?
@SuleimanZhukov :+1: @ilhamgum .
@EmilOvcina_twitter that is correct. Then maybe your local IP/ports are wrong? Or you have to trigger a gun.get('foo').put({blah:1})?
@ilhamgum :clap: @draeder
discord@ironman @zelenskyszebra:matrix.org @worldpeaceenginelabs :clap: @rococtz:matrix.org . (FYI, this is not a place to talk about coins, plenty of other places for that. In general, please, devs follow news on all those popular libs a ton already, it clutters the chat here. Feel free to show off your apps, but elsewise please keep links related to GUN. If you want to promote something, help blog about GUN, tweet/reddit/hn it, etc. but in general, devs here build&ship, not really shill.)
@igormuba_gitlab how many monthly active users do you currently have? How much funding does your team have (DM me if you want, twitter better)?
@Hr4rjuku you followed this guide already? https://github.com/aethiop/jot ? and you made sure to add these dependencies? https://gun.eco/docs/React-Native ?
@SuleimanZhukov :clap: @igormuba_gitlab .
Hr4rjuku
@Hr4rjuku
@amark Thanks for your response, I have the same packages installed like JOT and App.js + useGun Hook is nearly the same. In the official Documentation is mentioned the asyncstorage, which isn't used at the JOT project. So I deleted this part, too.
One Difference is: I DON'T use Expo. It also work without it?
Bradley Matusiak
@bmatusiak
:)
belowtoxic
@blwtxc
Perhaps someone of you knows some answer to that. Stumbled upon something. When I set peers at instantiation time they disappear if they are not reachable anymore (e.g. network cuts off, peer shuts down, or whatever). If I set peers via opt on the instance they persist, even if the peers are gone. I don't know which behaviour I'd prefer, but inconsistency worries me a bit....
Bradley Matusiak
@bmatusiak
friday is everyday, without gun
Bradley Matusiak
@bmatusiak
@blwtxc it should persist. i think there is a timeout for reconnecting.
Hr4rjuku
@Hr4rjuku
@amark Here is my Gun Setup
image.png
haveanicedavid
@haveanicedavid:matrix.org
[m]
@amark: i'm heading out of country in 2 days for a couple weeks, but would love to join those calls if you don't mind me mainly listening to learn - not sure how much i'll be able to contribute
does anyone know if LEX should work on mapped, nested data data? like if I have a user { name: 'david' }, should gun.get('users').map().get('name').get([ LEX QUERY ]) work?
haveanicedavid
@haveanicedavid:matrix.org
[m]
I realize I can index name separately and query that (seems to work), just curious
belowtoxic
@blwtxc
@bmatusiak Thanks for your answer and the link. So I suspect the desired behaviour is the one shown when setting peers on the instance not at instantiation?
Suleiman Zhukov
@SuleimanZhukov
@igormuba_gitlab Thank you!
siegfried
@siegfried
Hi @amark , I want to leverage content addressing in our project. Does GUN only support SHA256 hashing? Is it possible to extend it from the user side? Our project requires SHA3 with 256 digest and Blake2s with 224 digest.
Suleiman Zhukov
@SuleimanZhukov
Hey guys! A question from a noob:
What happens under the hood when I create user, and then what happens when I auth? Does Gun create a node for the user, and then when I auth Gun creates another "auth" node? And what does this code "gun.on('auth', (cb) => {})" mean?
Suleiman Zhukov
@SuleimanZhukov
Guys?
rococtz
@rococtz:matrix.org
[m]
@SuleimanZhukov: when you create a user, a node is created under gun root ~yourPublicKey. Not sure what you mean by auth node. That looks like a callback that gets called when you perform gun.user().auth(...)
Suleiman Zhukov
@SuleimanZhukov

@rococtz:matrix.org Thanks for the answer
By auth node, I mean:
In some example in github, I saw this code "gun.on('auth', () => {$('sign').hide() user.get('said').map().on(and here adding stuff to list)})", when I logged in (user.auth), that code started to work, so my question was, does gun create auth node, because how that code works.
So, I don't understand how this code works and why it even works: "gun.on('auth', () => {})"?

And here is the link where I saw this stuff, see line 38:
https://github.com/amark/gun/blob/master/examples/basic/user.html

I tried it, it works very well
And also, when I "user.leave()", it somehow knows that I signed out and shows the stuff it hided in that code I mentioned above. So, I'm quite confused here
Daniel Raeder
@draeder
@SuleimanZhukov gun.on('auth', ...) is an event that is fired when the user is logged in, or if there's an error. The cb is an object that will have either an ok property, or err property: cb.ok=1 or cb.err='some error string'. As you may be aware, users don't need to be logged in to use Gun. But by logging in, the user can have its own graph that is only mutable by that logged in user.
Suleiman Zhukov
@SuleimanZhukov
@draeder Thanks, man
I just looked it up in the documentation, turns out it was written in User API/gun.user.secret, and I didn't see it
@amark Just some feedback:
I feel like the documentation needs to be re-designed, and the website also lagging a little bit especially the FAQ section.
ashtyn3
@ashtyn3
@SuleimanZhukov i definitely agree
with the website redesign