Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 24 06:51
    expelledboy synchronize #1276
  • Nov 22 18:04
    BrendanDN commented #1290
  • Nov 22 18:04
    BrendanDN closed #1290
  • Nov 22 18:04
    BrendanDN commented #1290
  • Nov 22 17:59
    BrendanDN commented #1292
  • Nov 22 04:07
    ndaidong commented #1292
  • Nov 21 20:28
    verschmelzen opened #1293
  • Nov 21 19:44
    BrendanDN commented #1292
  • Nov 21 14:50
    ndaidong opened #1292
  • Nov 19 17:41
    estebanrfp commented #1080
  • Nov 18 21:26
    @rogowski banned @jesus:halogen.city
  • Nov 18 17:04
    yuetloo commented #1290
  • Nov 17 07:42
    expelledboy synchronize #1276
  • Nov 17 04:11
    ViteOrder opened #1291
  • Nov 16 21:00
    BrendanDN opened #1290
  • Nov 16 19:41
    sbrow commented #1238
  • Nov 14 14:04
    weirdo-neutrino commented #1265
  • Nov 13 11:28
    KrzysztofZawisla edited #1289
  • Nov 13 11:19
    KrzysztofZawisla opened #1289
  • Nov 11 23:56
    nsreed synchronize #1275
Daniel Raeder
@draeder
@ahg:it-dengler.de gun.user().is returns the logged in user's public keys. If the user is not logged in, it returns undefined
4 replies
Andre
@ahg:it-dengler.de
[m]
Would be nice to know if there are more useful "internal" events like auth. Workaround is a logout function which set logout state to vue store variable. That works for me
lightningx10
@lightningx10
Hey @amark just wondering if there's any way to natively integrate using the localForage library?
rococtz
@rococtz:matrix.org
[m]
@lightningx10: local forage is just a wrapper for local storage and for indexed db. Gun supports both. You can use IndexedDB if you like directly
Andre: There something like bye for leaving but that's not reliable. The right way to do it is to have that user update some node every x seconds/minutes saying "I am here, I am here, I am here". If you want to see if someone is online, you check that node's timestamp and make sure it's more recent than whatever seconds/minutes.
Mark Nadal
@amark
@tylerjwatson were you able to talk to @mmalmi about ROD? Definitely need more Rusters testing it out please.
@ahg:it-dengler.de correct, user-from-pair is missing account setup, you need to manually index it to an alias (something like gun.get('~@alias').set(user) I think, tho this is pointless without a password to derive a Proof-of-Work seed), this needs to get cleaned up - PRs welcome.
@abow I'd think RAD is causing some issues, but that'd be at startup when it has to check folder. Do you notice the CPU gets triggered after a certain event?
Could you PR the docker fixes/updates?
@realdocweird :clap: @realdocweird glad you found a fix, could you make a note of that in place you think would be appropriate in docs?
@estebanrfp <3 :)
@ahg:it-dengler.de :clap: @rococtz:matrix.org .
@davay42 :fire: :fire: :fire: I RTed your video on this the other day. :) :) and anyone else: Please make little videos of your projects!
@SuleimanZhukov :clap: @draeder .
@VittorioParagallo unfortunately. Would it bind to Rust tho?
@alterx book keeps every record lexically sorted, so any query will find a closest page - intentionally designing this for the plethora of chat apps to infinity scroll in by just tossing in +new Date for "give me most recent chat" (even if last messages were days old!) and lastSessionDate for "start me at where I was before", then you just take timestamp of lowest or highest chat as you scroll down or up, to continue the pages!
@SuleimanZhukov check out @rococtz:matrix.org examples & snippets, he's React expert here!
:clap: @davay42 :clap: @rococtz:matrix.org correct, your .put(data, ack => console.log(ack.err) will start erring. @lightningx10 GUN should not drop/delete old localStorage data, please report a bug if it does!!!
@champ5898 tried to save data to a user when not logged in yet? Something like that?
@worldpeaceenginelabs :fire: :fire: ! I'm not experienced with Cesium (but seeing their zoomable tiles gets me excited). (2) you need to make sure they're subscribed to the same list, so on page load you could do gun.get('pin-list').map().on(...) but (3) correct, as it grows over time, you'll want to limit that. Instead maybe do gun.get('pin-list-'+ cesium.tileX + cesium.tileY + cesium.tileZ (pseudo code! Check examples/move/index.html or examples/where in GUN for tile tips from Leaflet).
@ahg:it-dengler.de really should be a User event, not a GUN event - trying to fix that in future. leave is synchronous (not async) so no event needed - tho I get what you're saying, you can do your own custom events just by doing gun.on('foo', {data}) :). Oh, bye is for network logic, not User. Heartbeat :+1: .
@lightningx10 :clap: @rococtz:matrix.org .
Thanks @adam_blvck:matrix.org .
1 reply
Tyler Watson
@tylerjwatson
@amark Not yet man, still need to find more time to work on it, I am on struggle street with it atm
Bo
@worldpeaceenginelabs
image.png

@amark thx. i understand 2 and 3 now.

Related to 1.:

I think i will only leave the variable in cesium.js (yellow) but define it as addUserLocation = gun.get('pin-list' +latitude-range + longitude-range).map().on(...) (pseudo code) but without the blue text. Then the gun.get fills the variable addUserLocation with the blue text from the picture above, right?

So the question is, how can i feed the blue text/code below into a Gun object with gun.put? (all brackets included)

(
  viewer: Viewer,
  userLocation: GeolocationPosition,
  userLocationCartesian: Cartesian3,
  userLocationPointId: string
) => {
  viewer.entities.add(
    createPulsatingPoint(
      viewer,
      userLocationPointId,
      Cartesian3.fromDegrees(
        userLocation.coords.longitude,
        userLocation.coords.latitude,
        0
      ),
      Color.LIME
    )
  );
};

And cool sideffect!!! : Since we feed the objects on the globe from Gun in runtime, we have the hot reloading right from the start! And with @draeder Gunsafe or part of it, we can have hot reloading code in general, on top. Or even independent from / without cesiumjs.

Hr4rjuku
@Hr4rjuku

Hey guys, I have a question to open / on. When I'm using
gun.get('test').map().on((data) => console.log(data))
I'll get every entry with deepness of 1 Layer
BUT
gun.get('test').map().open((data) => console.log(data))
I would like to get every entry with full deepness.
-> I get only a view entrys (e.g. 3)

That's strange, how do I get the full list of entrys ?

1 reply
rococtz
@rococtz:matrix.org
[m]
@Hr4rjuku: Have you tried load? You need to import it
1 reply
check the docs
lightningx10
@lightningx10
Hey @amark or whoever is in charge of the types for Gun, the type for IGun is just wrong, when trying Gun.state.is(node, key), it comes up as a type error, because Gun.state is just a method that returns a number, so there is no is property on it. I feel like the types should just be disabled... But I don't know how without migrating all of my existing typescript code to JS, is there any other way?
Adam Bowman
@abow
@lightningx10 just create an instance of Gun and cast it to <any>
1 reply
<any>Gun({
peers: ["http://localhost:8765/gun"],
localStorage: false,
});
Bo
@worldpeaceenginelabs
@amark If i can make the globe run on the classic gun relay, how much work is there to do, to make it run on the gun rust relay?
And what would be the advantage of using a gun rust relay instead of the classic gun relay?
Bo
@worldpeaceenginelabs

@amark something else btw: i had a really great talk with a friend of mine the other day, and he introduced me to this dictionary which is like a universal language (pictures instead of words)

(arrow on the right to click trough some pages of the book)
https://www.bic-media.com/mobile/mobileWidget-jqm1.4.html?buyButton=no&clickTeaser=no&download=no&ePubScrolling=no&flipBook=no&fullscreen=yes&links=no&metadata=no&noMobilePreCover=no&optimizeSize=no&resizable=yes&showMenu=no&search=no&showExtraDownloadButton=no&showExtraFacebookButton=no&showExtraFullScreenButton=no&showExtraShopButton=no&showFullScreenButton=no&showLanguageButton=no&showTAFButton=no&tellafriend=no&isbn=978-3-12-514156-8

My idea: Lets create a universal language / translation app with Gun. (a Gun killer app, maybe named Translate-Gun or Universal Translator something like that)
Which will be basically a picture database with an index (not words, but topic pictograms like in the book), a rating function, and Gun sync of course.

Lets drop all 650 pictograms from the book into Gun as a basic dataset. (I would buy and scan them to files myself, or i just search for new free license ones) And then on top, users could add more, custom pictograms, but these need to get rated first (if they are internationally understandable) before they are allowed by the community to get dropped into the GunDB too.

Cool idea?

1 reply
Mark Nadal
@amark

QUICK UPDATE (will catch up later)
Dan just helped me get a brute-force version of the AXE dht into prototyping...
so warning, in coming weeks, your peers might get randomly DDoSed as I fix bugs & quirks.
BUT IT IS BECOMING ALIVE.
Already seeing some extremely promising results (and bugs need to fix). I am soooooo excited.
  • I'm tossing in some extra checks for the login system, to see if that'll get fixed too.
    More updates coming later!!!!
Bo
@worldpeaceenginelabs
yeahhhh!!! 🔥🔥🔥🥳
Manwë
@Manwe-777
@lightningx10 just pass gun to window as :any , sometimes its better like that unfortunately
lightningx10
@lightningx10
That doesn't actually work what what I'm trying to do, as I'm using the import GUN itself, not the db = GUN('host'), I can't figure out how to import that as any. On the other hand, I found // @ts-ignore, which does the job just fine and allows me to remove it in the future when the TS implementation is better.
Bo
@worldpeaceenginelabs
@amark @draeder do i maybe missunderstand the capabilities of Gun (loads text and images), but NEED Gunsafe (or part of it) to load code in runtime for my project?
fitouch
@fitouch
Hello everyone here. I have a problem storing image base64 in React Native “exception in stringify-ing message: subtle digest...”. It works fine on the web. Do you know this error?
6 replies
Carlos Vega
@alterx
Screen Shot 2022-08-04 at 10.24.52.png
Is this the error some of you have been getting?
fitouch
@fitouch
Not me
Carlos Vega
@alterx
After that I'm no longer able to write, seems like it's corrupted. This is with the latest version on npm (0.2020.1237)
4 replies
@amark
ADAM BLVCK
@adam_blvck:matrix.org
[m]
I encounter it whenever I'm processing something that's too big to put
Here's my snippet for chunking and encrypting. You can then put the encrypted pieces to GunDB, or your a storage place of your desire:
const chunkString = (str, length) => {
    return str.match(new RegExp('.{1,' + length + '}', 'g'));
}

const largeFile = {
    base64: '', // your base64
    type: '',
}

// chunk image / file into smaller pieces of ~10kbytes
const file_chunks = chunkString(largeFile.base64, 1024*10);

// create promise array
const encrypt_promises = file_chunks.map(chunk => SEA.encrypt(chunk, user._.sea));

// encrypt promises
const encrypted_chunks = await Promise.all(encrypt_promises);

// write chunks, either to CDN, S3, or GUN (large file so take care in GUN!)
ADAM BLVCK
@adam_blvck:matrix.org
[m]
Anyhow, I believe I'm working on a killer app, but not persè a gun-killer app. I'm still drawing out the architecture for robust data protection of gun-server nodes (small businesses or contributors), which offer services for consumption by gun-user nodes (apps)
Daniel Raeder
@draeder

@worldpeaceenginelabs

@amark @draeder do i maybe missunderstand the capabilities of Gun (loads text and images), but NEED Gunsafe (or part of it) to load code in runtime for my project?

Gunsafe stores code in gun, and provides a way to execute it. It really should not be considered "safe" for application use outside personal code snippet storage, retrieval and execution.

6 replies
ADAM BLVCK
@adam_blvck:matrix.org
[m]

So imagine this would work with gun, @worldpeaceenginelabs : you have users which are having a normal and general gundb experience with all the nice social features... but then they want someone to generate taylor-made videos or images using AI. So a service-provider can now 'advertise' its AI-image-creation-service through GunDB. Credits are bought through third-party payment channel, but tokens are registered to GunDB. The transactions then all complete, encrypted, and tracked within Gun:

  • User requests prompt / styles / video-prompts
  • Service nodes receives requests, processes according to token-economy and business logic
  • Service nodes put product, target-encrypted, on gun and notifies user
  • User receives notification and downloads digital good

One thing that's missing in this whole thing is lifecycle management, both from a data as from an information management perspective. How can Service-nodes protect their assets and 'service-ledger' so to speak? In my experiments, over the last few weeks, have shown that data can get corrupt sometime, or overwritten.

It's one thing to resolve conflicts when 30 parties are collaborating on a same canvas or document, but it's another thing to be certain from a business perspective, that while serving 10 000 k users daily, with about $3000 daily costs in AWS infrastructure (AI image generation), my private ledger is not fucked with, yet perfectly consistent with the rest of the network in case of trouble from the other nodes
ADAM BLVCK
@adam_blvck:matrix.org
[m]
And by "trouble", I mean the odd corrupt error like @alterx is getting. How to keep "one's service-node data" secure, backed-up, and reported on? How to entertain lifecycle and change management within a gun-only ecosystem, or ought one to introduce infrastructure gundb is meant to abolish (SQL for reporting, NoSQL for user-data, 3rd-party data-ingestion for dashboarding and viz)?
This is all enterprise architecture talk, but to go back to @worldpeaceenginelabs , a killer app requires an impeccable enterprise architecture, be it even a decentralised one where everyone can start an enterprise just by going to an url in his/her/* browser.
fitouch
@fitouch
Do anyone here know who can do merges for webview-crypto and react-native-webview-crypto? They seems are not update to the latest. I have a few fixes for them.
Fedox
@fedox:fedox.pl
[m]
Can anyone point me in the right direction? What should I do with error Invalid data: number at fh8q95.order.l6fhbcak.users.l6fhbcak.clockStatus.pausedAt.target. Where can I find further information about this error etc.
6 replies
Mark Nadal
@amark
OK.
Who is the person running a pirating site ontop of GUN?
Fess up now, to me, in a twitter DM.
Cause I turn on my DHT tests and my computer literally starts streaming 5MB/s of data from random peers out there
and when I peek at the data, its a whole catalogue if movie titles, descriptions, etc.
TBH, I have no clue how this is happening or working.
The DHT test is already connecting to random machines that should be impossible (it's already found Iris' rust peer, even tho we never coded it to find it, and I haven't even published the code yet! I'm not sure how this is possible.)
Ugh...
I've already seen the test crash multiple random relays.
I apologize, please watch your relays as they might get DDoSed as I'm trying to stabilize network.
And then I'll need everyone to upgrade code, so we're running the same stabilizers.
I guess I'll catch up with chats now instead, seeing some bugs reported.
Give me a bit to read thru & reply.
Mark Nadal
@amark
@VittorioParagallo I'm sorry to hear :( . My hope with Rust is that any/all other languages can bind/bridge to it easily, since it is hyped up as a "systems" language. Is that not true? I'd deeply appreciate it if you could share your experience with Rust+Flutter more, cause maybe it'll change my mind that Rust is not as universal as I thought. Anyone want to chime in here? Am I mistaken? + @tylerjwatson (PS, @mmalmi tyler was up for helping test Rust apps also.)
@worldpeaceenginelabs This is a cool idea. Tho I'm not actually sure what is going on with this pictogram app. ++ @adam_blvck:matrix.org 's ideas of scoring.
You want to have a separator between your lat/lon in your GUN get, so that way you don't accidentally mix them up on query. Further... lat/lon probably not what you want, you probably want to use the Z tile index + X/Y tile coordinates from the apps, not lat/lon. Unfortunately don't have time to explain it all.
(tho a neat thing: Is with the upcoming Book replacement in RAD and hopeful integration into AXE/GUN, could probably get "closest" data results from a query. Tho can't do 2 dimensions in 1 go... maybe would have to combine 2 different queries... not sure yet, will be cool to explore in future...).
Please be careful: never run arbitrary JS, it does not matter if it is encrypted or not, you risk security exploits. I am glad @draeder is repeating this. To me, getting access to hardware is easier attack ( + @adam_blvck:matrix.org ) than a lot of other types of attacks. NSA/etc. has all sorts of backdoors, even telecoms, for getting device ID etc. info.
@Hr4rjuku :clap: @Lexi:matrix.org :clap: @rococtz:matrix.org . I think this was a bug someone reported a while back... map().open(cb) is suppose to work (I thought it was) but they mentioned it doesn't. If you do just .open(cb) no map, do you see all items as sub-objects? Note, .open(cb, {depth: 5})may be a good idea - new feature! Tho that bug fix is needed. Anyone want to help?
@lightningx10 :clap: @abow :clap: @Manwe-777 .
@fitouch @adam_blvck:matrix.org webview-crypto-bridge is that slow? :( :( :/ I thought the bridge has access to all the real native cryptography standards, so digest/etc. should all be supported. No? Are you sure you're not in the non-bridge crypto.js shim?
@alterx @adam_blvck:matrix.org RAD is not updated to latest (it needs to be CPU scheduled, fix the enametoolong, etc.) so if you need storage you should probably stay on the older version. The process will start erring and fail to write, but please confirm: Old data / data on disk itself should not be corrupted, right? After a restart it reads?
The Book replacement in RAD is suppose to be the upgrade, and fixes the enametoolong issue which has been killing me for wayyyy too long - but this also requires migration, which I really really really don't want to write. But new RAD w/ Book hasn't been tested enough yet (Jonathan has been busy with real work, etc.). Overall, I'm just really scared about a lot of the storage stuff & upgrades, but current state also leads to errors too, so uuuggh. I feel stuck. Be nice if we could get some company or blockchain team to donate to have Jonathan work more hours, or if anyone else here can help contribute a bunch of testing - @alterx still willing to get on a screencall? You haven't sent me any times, tho lol, I also don't blame you, its tedious work.
@adam_blvck:matrix.org remember: GUN is NOT a globally consistent system, it is a highly available, partition tolerant system. Anything involving money should use a CP system, not AP. You can still do lifecycle/state management with GUN, like @davay42 just demoed with his kickstarter/gofundme example app (video & demo here) https://twitter.com/marknadal/status/1555405053569036288 , but actual money need/has to be transferred outside of the system. Likewise, the app should have a UI like he has, that lets both parties update whether the money was actually sent or not - so GUN can be used to track whether parties agree with each other or not.
1 reply
If both do, then it is probably safe to assume the non-GUN banking side (traditional, ACH, SWIFT, blockchain, whatever) succeeded, for programmatic purposes. But I always discourage people from doing banking on GUN itself, because its offline/local-first which is not how banks/payment systems work.
@fitouch OH WOW, that is wonderful to hear. Can you link me the PR or fork?
@fedox:fedox.pl oh odd, number is valid, that makes wonder if it is NaN since typeof NaN is number ROFL in js. Or Infinity is also a number that is not valid JSON (tho I want it to be valid in GUN. I LOVE infinity). :clap: @fitouch
Andre
@ahg:it-dengler.de
[m]

I really like petite-vue. Easy to use and works fine. Quickly started by gun listener updates the Vue reactivity objects. Changes direct written to gun and synced back by gun.on to Vue store.
Store is used for reactivity in ui.
But at the moment limited to simple data structure (object or table like. No object with collection / table for now). Can't direct follow references.

I read gun could be direct used in svelte as store, but recommended is a separate store object? Also saw svelte can handle promises with "if" blocks. And I can't svelte use direct by script tag at client side.
Examples are code, but don't know how to compile to a static app.

React and alpinejs looks similar to Vue, but which one is better and easier working with gun as backend / storage?

Best would be to work with native gun node objects for easier use of gun references between nodes?

Short tested gun nodes, but with reactivity the Vue proxy around the gun object kills use of get / map methods?
Hr4rjuku
@Hr4rjuku
@amark Thanks for your response. Yes when I'm using only .open (without map) it shows every item.
Bo
@worldpeaceenginelabs

@amark thx. the pictures are used instead of words in a translation or travel dictionary. so even if you in a country which language or even their signs you dont understand, you will have that handy, digital dictionary of pictures, which everybody in the world will understand by showing plus additional hand gestures...

and its lat/long i will use, because its what cesium devs use already and it works out. imagine the 3D globe has a coordinate overlay in 2D. only problem that comes up very seldom is on mountains, but cesium has a workaround integrated, so the position is visualized on top of the mountain at the end.

Is there any way to gun.put the blue code snippet from above plain into gun? i want to try out whats possible... and look for security later...

Bo
@worldpeaceenginelabs
@draeder is the code execution a gun feature or a gunsafe feature? is it possible to use the execution function from gunsafe solo?
@adam_blvck:matrix.org thx for the inspiration. i will copy paste your text and think it through.
fitouch
@fitouch
@amark here's my first PR for LEX fix amark/gun#1268
@amark this one is for webview-crypto webview-crypto/webview-crypto#16 but webview-crypto is still slow only when we use user graph or frozen graph. I can tell the difference when storing text, image, etc that takes more than 2 seconds in React Native than web.