amark on master
websocket ../index to ./index (β¦ (compare)
amark on master
PANIC tests + AXE get dedup + f⦠Merge branch 'master' of http:/⦠(compare)
amark on master
lib/ison: Use setTimeout instea⦠(compare)
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')
})
[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?
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
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.
@gunchatbridge
Also i have a very straigt view on human beings and their values https://worldpeaceengine.pubpub.org/pub/human-os/release/18
@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!
gun.get('foo').put({blah:1})
?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....
{ name: 'david' }
, should gun.get('users').map().get('name').get([ LEX QUERY ])
work?
name
separately and query that (seems to work), just curious
~yourPublicKey
. Not sure what you mean by auth node. That looks like a callback that gets called when you perform gun.user().auth(...)
@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
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.