Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:58
    mmalmi commented #1282
  • 04:07
    Alengeorge-01 commented #1279
  • 04:07
    Alengeorge-01 commented #1279
  • 04:06
    Alengeorge-01 commented #1279
  • Sep 27 23:41
    amark closed #1283
  • Sep 27 23:41
    amark commented #1283
  • Sep 27 23:39
    amark commented #1280
  • Sep 27 23:25
    amark edited #1279
  • Sep 27 23:24
    amark commented #1279
  • Sep 27 23:21
    amark closed #1273
  • Sep 27 23:21
    amark commented #1273
  • Sep 27 23:16
    amark commented #1271
  • Sep 27 23:10
    amark commented #1282
  • Sep 27 23:02
    amark commented #1277
  • Sep 27 22:59
    amark commented #1024
  • Sep 27 22:48
    amark commented #1275
  • Sep 24 23:36
    syonfox updated the wiki
  • Sep 23 21:10
    qgustavor commented #1280
  • Sep 23 21:06
    qgustavor commented #1280
  • Sep 23 21:05
    qgustavor commented #1280
Wasis Haryo Sasoko
@yokowasis
you mean
gun.get({'#': 'chat', '.' = '2019/06/20:10:10:10.30'}).once(s=>{
  console.log(s);
})
Jachen Duschletta
@Dletta
[D]jabis: no
Wasis Haryo Sasoko
@yokowasis
gun.get({'#': 'chat', '=' : '2019/06/20:10:10:10.30'}).once(s=>{
  console.log(s);
})
?
Jachen Duschletta
@Dletta
[D]jabis: {'.': {'>': 'dave', '<': 'fred'}, '%': 50000} , so it would be .get('chat').get({'.':{'=':'2019/06/20:10:10:10.30'}})
[D]jabis: also include the byte percentage for hit
[D]jabis: and you NEED to use map with all rad queries
[D]jabis: without map in there it won't trigger the lex portion at all
Wasis Haryo Sasoko
@yokowasis

tried

gun.get('chat').get({'.':{'=':'2019/06/20:10:10:10.30'}}).map().once(s=>{
  console.log(s);
})

straight up doesn't work. the callback didn't get called.

I didn't know whether this is a gun bug, or just mistakes on the docs.
Jabis Sevon
@jabis
image.png
probably your gun version
might have a bug there
(note I'm using my browser's location.host +'-testing' as "sandbox" for these random debuggings, to not put unnamespaced testing stuff to the root :)
Wasis Haryo Sasoko
@yokowasis
@jabis , are you doing put before running the script ? can you try running the script without putting it in the same command ?
Jabis Sevon
@jabis
gun.get(window.location.host+'-testing').get('chat').get('2021/06/31').put({stuff:'this is shown'}).once(Gun.log)
and
gun.get(window.location.host+'-testing').get('chat').get('2021/05/31').put({stuff:'this is hidden'}).once(Gun.log)
so you see I pulled records '>':'2021/06'
and only the "this is shown" was shown
without map it returned the both
gun.get(window.location.host+'-testing').get('chat').get({'.':{'>':'2021/06'},'%':50000}).map().once(Gun.log)
you can drop the first get out
leave the rest (well modify the timestamp)
Wasis Haryo Sasoko
@yokowasis
yap, doesn't work on me.
Jabis Sevon
@jabis
I used 2021/05 and 2021/06 vs your 2019/06 whatevs :)
image.png
also tested the '=' operator and it matches
I have no idea tho what my gun version is, so can't help much more than this :D
Wasis Haryo Sasoko
@yokowasis
send your gun.js file here
this works
gun.get('chat').get('2021/06/31').put({stuff:'this is shown'}).once(Gun.log)

gun.get('chat').get({'.' : {'>' : '2021/06' },'%' : 50000 }).map().once(s=>{
  console.log (s);
})

gun.get('chat').get({'.':{'>':'2021/06'},'%':50000}).map().once(Gun.log)
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.