Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 27 21:52
    noctisatrae commented #1258
  • Jun 27 21:06
    noctisatrae commented #1258
  • Jun 27 21:04
    noctisatrae commented #1258
  • Jun 27 21:03
    noctisatrae commented #1258
  • Jun 27 02:00
    bmatusiak commented #1258
  • Jun 26 22:29
    noctisatrae reopened #1258
  • Jun 26 22:29
    noctisatrae commented #1258
  • Jun 26 21:43
    amark commented #1258
  • Jun 26 21:42
    amark commented #1258
  • Jun 26 21:35
    noctisatrae closed #1258
  • Jun 26 21:35
    noctisatrae commented #1258
  • Jun 26 14:15
    draeder updated the wiki
  • Jun 26 14:14
    draeder updated the wiki
  • Jun 26 11:02

    amark on master

    Thanks @gabriellemon Gabriel fo… (compare)

  • Jun 25 23:26
    d3x0r commented #404
  • Jun 25 19:47
    noctisatrae commented #1258
  • Jun 25 19:46
    noctisatrae commented #1258
  • Jun 25 19:42
    noctisatrae commented #1258
  • Jun 25 19:11
    noctisatrae commented #1258
  • Jun 25 14:45
    bmatusiak commented #1258
Wasis Haryo Sasoko
@yokowasis
this doesn't work
gun.get('chat').get({'.' : {'>' : '2021/06' },'%' : 50000 }).map().once(s=>{
  console.log (s);
})

gun.get('chat').get({'.':{'>':'2021/06'},'%':50000}).map().once(Gun.log)
Jabis Sevon
@jabis
I believe it would need all the radix etc files as well
Wasis Haryo Sasoko
@yokowasis
like I said, it fails silently. Callback is not called. Do I really need to put things first before it get fired ?
can you try it @jabis ?
when I do the put, all of pending callback is fired
image.png
Jabis Sevon
@jabis
image.png
lol, someone has connected to my peer and spammed the chat
the last results is a timer thing unrelated
should clear my peer again some old gunk in there x)
But yes what you said wasn't working gives output anyways
Wasis Haryo Sasoko
@yokowasis
@jabis can you try using gun from jsdelivr.net ? if it doesn't work, then that means gun from jsdelivr is broken and shoudln't be used.
Jabis Sevon
@jabis
I can't it's a live site
Wasis Haryo Sasoko
@yokowasis
can you try it in localhost ? please ?
this is my init.
        const gun = Gun({
                    localStorage : false,
                    axe : false,
                    file : "test",
                })
Jabis Sevon
@jabis
I'm busy with work - you could try changing jsdelivr includes from npm to gh/amark/gun@master/gun.js tho yourself to see
https://cdn.jsdelivr.net/gh/user/repo@version/file
is the format that is
Wasis Haryo Sasoko
@yokowasis
tried within react, using npm install, still doesn't work.
Jabis Sevon
@jabis
both your local and the versions you pull for browser need to be at the same version, to escape possible bugs
Wasis Haryo Sasoko
@yokowasis
I don't use the browser
Wasis Haryo Sasoko
@yokowasis
now it's working. I literally did nothing to the code. I am just too tired. go watch video on youtube. try to running the same code , and it works. I was like wtf 😣
Wasis Haryo Sasoko
@yokowasis
now another problem arise. Instead of grabbing matching criteria, it only grab 1.

anybody have a working gists of

This will grab keys with '2019/06/' matching prefix (grab all chats in July!) up to a limited number of bytes.

like in the docs ? https://gun.eco/docs/RAD#lex

Jabis Sevon
@jabis
image.png
Wasis Haryo Sasoko
@yokowasis
Now that I look at it, why '2019/06' is called july
@jabis can you return more than 1 matching results ?
let's say you have a chat from may to june. and you want to return june only
Jabis Sevon
@jabis
@yokowasis https://pastebin.com/H76i6Mzc here's my test script
it's a copy of my other SEA debugging script on node, I created test/ directory inside gun-folder and save that file there and run in the same directory
ie node test2.js in this case
wait I'll add a third result that's in 06 too
Jabis Sevon
@jabis
image.png
Wasis Haryo Sasoko
@yokowasis
@jabis thanks
Jabis Sevon
@jabis
@yokowasis there we go, 2 results as expected
https://pastebin.com/cx5s0Xnj here the updated one
Wasis Haryo Sasoko
@yokowasis
I think it's a bug. LEX/RAD able to get the result, but for some reason, it didn't fire the callback. The result is there, it's just the callback is not fired. But when you put something on the node, all of pending callback is get fired at once. @amark does this sound familiar to you ? maybe you heard a bug about the callback not get fired ?
Freddie
@Fredaroo_twitter
Hi guys, I've been playing around with Gun it the past few days. It's great :)
I have a few basic/conceptual questions I wasn't able to get with the docs though. I didn't want to bother you here so I opened it on StackOverflow if you want to have a look: stackOverflow link Hopefully I'm not the only one with such questions
Wasis Haryo Sasoko
@yokowasis
@jabis the reason it's get called only once before, is because I still have your data of 2019/06/22 I put more data something like 2019/06/22:10:10:10.30 2019/06/22:10:10:10.33, etc. it only read your data. the lex is {'.': {'*': '2019/06/22'}, "%" : 5000}
Jabis Sevon
@jabis
is 5000 bytes too low
50000bytes is max
Wasis Haryo Sasoko
@yokowasis
but when i change the lexical to {'.': {'*': '2019/06/22:'}, "%" : 5000} it results multiple of my data
5KB is still a lot for just hello world node.
Jabis Sevon
@jabis
yeah true
I note you have 2019/06/22:10:10:10.33 I don't how lex sorting on multiple : : : would work, that's not a date format imo
Wasis Haryo Sasoko
@yokowasis
can you try my finding :
put something like 2019/06, 2019/06/21, 2019/06/22, 2019/06/23, 2019/06/24
here is my complete data
{
  "2019/05/25:10:10:10.30": {
    "#": "chat/2019/05/25:10:10:10.30"
  },
  "2019/05/21:10:10:10.30": {
    "#": "chat/2019/05/21:10:10:10.30"
  },
  "2019/05/22:10:10:10.30": {
    "#": "chat/2019/05/22:10:10:10.30"
  },
  "2019/05/23:10:10:10.30": {
    "#": "chat/2019/05/23:10:10:10.30"
  },
  "2019/06/23:10:10:10.30": {
    "#": "chat/2019/06/23:10:10:10.30"
  },
  "2019/06/21:10:10:10.30": {
    "#": "chat/2019/06/21:10:10:10.30"
  },
  "2019/06/22:10:10:10.30": {
    "#": "chat/2019/06/22:10:10:10.30"
  },
  "2019/06/24:10:10:10.30": {
    "#": "chat/2019/06/24:10:10:10.30"
  },
  "2019/06/25:10:10:10.30": {
    "#": "chat/2019/06/25:10:10:10.30"
  },
  "2019/06/20:10:10:10.30": {
    "#": "chat/2019/06/20:10:10:10.30"
  },
  "2019/05": {
    "#": "chat/2019/05"
  }
}
gunHeroku.get('chat').get({'.': {'*': '2019/05'}, "%" : 5000}).map().once(s=>{
  console.log (s);  //This only fired once
})
is this an expected result ?

I note you have 2019/06/22:10:10:10.33 I don't how lex sorting on multiple : : : would work, that's not a date format imo

I copied it from the docs.

Wasis Haryo Sasoko
@yokowasis

from the docs :

* prefix match or (2 <) match. If {'*': 'key'} is specified, (2 >) will not match.

what do (2<) and (2>) means ?