xkapastel has quit [Quit: Connection closed for inactivity]
clacke_movim has left #picolisp [#picolisp]
clacke_movim has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
Regenaxer has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 248 seconds]
yunfan has quit [Quit: already be with hell]
clacke_movim has left #picolisp [#picolisp]
beneroth_ has joined #picolisp
beneroth_ has quit [Client Quit]
clacke_movim has joined #picolisp
xkapastel has joined #picolisp
miskatonic has joined #picolisp
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
orivej has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
miskatonic has joined #picolisp
beneroth_ has joined #picolisp
miskatonic has quit [Remote host closed the connection]
beneroth_ has left #picolisp [#picolisp]
beneroth has quit [Disconnected by services]
beneroth_ has joined #picolisp
beneroth has joined #picolisp
orivej has joined #picolisp
<beneroth>
hi all
<Regenaxer>
Hi beneroth
<beneroth>
hey Regenaxer :)
<beneroth>
Regenaxer, how to do (sect) with multiple lists (more than 2) ?
<Regenaxer>
It takes only 2 args, so a loop is needed
<Regenaxer>
Or do it manually, using 'find'?
<Regenaxer>
'filter' the first list with 'find' in all others
<Regenaxer>
this produces less garbage
ubLIX has joined #picolisp
<beneroth>
Regenaxer, thanks!
<beneroth>
I see
<beneroth>
Regenaxer, a question about a (+Sn +IdxFold +String) relation
<beneroth>
I can do:
<beneroth>
(?
<beneroth>
((id +Contact))
<beneroth>
(select (@Contact)
<beneroth>
(tolr "ocean" @Contact company) ))
<Regenaxer>
ok
<beneroth>
but how to make properly use of the index ?
<beneroth>
+Sn variant of (collect 'company '+Contact (fold SearchTerm)) ?
<Regenaxer>
It is unusual to use different attriautes
<Regenaxer>
id and company
<beneroth>
T
<Regenaxer>
why not ((copmany +Contact)) ?
<beneroth>
T
<Regenaxer>
or *also* id ?
<beneroth>
but its still a full index scan, right?
<beneroth>
I cannot filter the index directly for the soundex value?
<Regenaxer>
You mean only the snx indexes?
<beneroth>
I mean the generator clause ((company +Contact)) is matching ALL contacts with a company property set.
<Regenaxer>
iirc it does first an exact traversal
<Regenaxer>
then uses soundex
<beneroth>
T
<Regenaxer>
But with 'id' you traverse a different set
<beneroth>
yes, I'm aware
<Regenaxer>
so not a good idea
<beneroth>
my point is:
<beneroth>
I believe ((company +Contact "ocean")) (tolr "ocean" @Contact company) is wrong, isn't it?
<Regenaxer>
Looks good
<beneroth>
isn't the (tolr) pointless?
<beneroth>
only doing fuzzy matching after exact match of "ocean" ?
<Regenaxer>
yes, if it is the only index
<Regenaxer>
so (? (db company +Contact "ocean" @C)) is fine
<beneroth>
what good is then the +Sn index as in (+Sn +IdxFold +String)
<beneroth>
?
<Regenaxer>
select makes sense for multiple indexes
<beneroth>
T
<Regenaxer>
The +Sn *creates* the additional soundex entries
<beneroth>
in essence my question is: how to do fuzzy (soundex) search using the +Sn index, instead of (tolr) ?
<Regenaxer>
You could write another filter predicate
<beneroth>
<Regenaxer> The +Sn *creates* the additional soundex entries
<Regenaxer>
but what is wrong with 'tolr'?
<Regenaxer>
yes
<Regenaxer>
so these entries are generated tee
<Regenaxer>
too
<beneroth>
nothing wrong wiht tolr. but what does look at the addition +Sn index entries? I believe (collect) doesn't, and neither does the generator clause in select, right?
<Regenaxer>
collect does too
<beneroth>
probably I'm wrong about collect
<Regenaxer>
(collect 'nm '+Cls "BRGL")
<Regenaxer>
if "BRGL" is the soundex of the string
<Regenaxer>
You must search for it explicitly in 'cillect'
<beneroth>
so... (collect 'nm '+Cls (ext:Snx SearchTerm)) should work?
<Regenaxer>
collect
<Regenaxer>
yes
<beneroth>
it doesn't. so maybe my index is wrong...
<Regenaxer>
IIRC collect does no filtering
<Regenaxer>
or does it?
<Regenaxer>
no, should work
<Regenaxer>
collect just calls 'iter'
<Regenaxer>
So with the proper key(s) it should work
<beneroth>
company (+Sn +IdxFold +String)
<beneroth>
something must be wrong
<beneroth>
no arguments
<Regenaxer>
I dont remember well, perhaws +Sn creates a special format?
<Regenaxer>
ah
<beneroth>
the index data does not look like +Sn
<Regenaxer>
the Fold!
<Regenaxer>
Why not +Sn +Idx?
<Regenaxer>
no, Fold is fine, sorry :)
<beneroth>
according to your guide
<beneroth>
Personal Names
<beneroth>
(+Sn +IdxFold +String) tolr
<beneroth>
("axer" {C4}) {C4}
<beneroth>
("Regen Axer" . {C4}) {C4}
<beneroth>
("RSNSR" {C4} . T) {C4}
<beneroth>
("egen" {C4}) {C4}
<beneroth>
("gen" {C4}) {C4}
<beneroth>
("regenaxer" {C4}) {C4}
<beneroth>
("xer" {C4}) {C4}
<Regenaxer>
T
<Regenaxer>
("RSNSR" {2} . T) {2}
<beneroth>
but I don't see the soundex value in the index
<beneroth>
in my database
<Regenaxer>
With 'scan'?
<beneroth>
ah
rain2 has quit [Quit: WeeChat 1.6]
<beneroth>
yes, it is there. T
<beneroth>
but then why is my collect not returning anything...
<Regenaxer>
yeah, collect and db search only main entries
<beneroth>
main entries?
orivej has quit [Ping timeout: 248 seconds]
<Regenaxer>
See 'iter' ref
<Regenaxer>
it talks about "partial" keys
<beneroth>
ah, no-nil flag
<Regenaxer>
So you must use 'iter' directly
<Regenaxer>
yes, db and collect skip these
<Regenaxer>
otherwise you would get lots of irrelevant results
<beneroth>
ok
<beneroth>
but yeah, so these index entries are only for iter, and maybe pilog index traversal...
<Regenaxer>
Or init + step
<Regenaxer>
yes
DerGuteMoritz has quit [Ping timeout: 258 seconds]
<beneroth>
(? (db company +Contact "HNSLSTFTNS" @Item)) fails too
<Regenaxer>
yep
<Regenaxer>
You need perhaps an Sn-only index
<beneroth>
so.. practically your indexing guide is partially wrong, no? as +Sn does not matter at all for (collect) nor for (tolr) (which is working directly with the properties, nothing with index), no?
<beneroth>
you mean (+Sn +String) ?
<Regenaxer>
Something, but probably needs custom index
xkapastel has joined #picolisp
<beneroth>
you often work with (iter) directly?
<Regenaxer>
No
<Regenaxer>
not in E/R
<beneroth>
ok. same.
<Regenaxer>
but in some simple setups I did
<Regenaxer>
ie keep the state of a query
<beneroth>
I used it for pagination, instead of pilog
<Regenaxer>
yes, exactly
<Regenaxer>
Perhaps the wiki does that
<Regenaxer>
ie static pages
<Regenaxer>
the query state is passed in POST
<Regenaxer>
not in wiki
<Regenaxer>
What guid did you mean?
<Regenaxer>
indexing guide
<beneroth>
I guess "partial-keys" are all index entries with a T in the fin cell, right?
<beneroth>
Keywords
<beneroth>
("Regen Axer" . {2}) {2}
<beneroth>
"Regen Axer" {2}
<beneroth>
(+Key +String) head
<beneroth>
(+Ref +String) head
<beneroth>
Phone numbers
<beneroth>
(+Fold +Ref +String) fold
<beneroth>
("regenaxer" . {2}) {2}
<beneroth>
Personal Names
<beneroth>
(+Sn +IdxFold +String) tolr
<beneroth>
("RSNSR" {C4} . T) {C4}
<beneroth>
("Regen Axer" . {C4}) {C4}
<beneroth>
("axer" {C4}) {C4}
<beneroth>
("egen" {C4}) {C4}
<beneroth>
("gen" {C4}) {C4}
<beneroth>
("regenaxer" {C4}) {C4}
<beneroth>
("xer" {C4}) {C4}
<Regenaxer>
This is a full one: ("Miller" . {C3})
<Regenaxer>
or ("Regen Axer" . {C4})
<Regenaxer>
all others are partial I would say
<beneroth>
ok, so the entry being a list or a cons is the difference
<Regenaxer>
yes, (flg? (fin (car "X"))) in 'iter'
<Regenaxer>
no, nonsense
<beneroth>
nvm
<beneroth>
I found out that I want to use a (+Sn +String) relation
<Regenaxer>
Not nonsense! :)
<beneroth>
then I can do (collect .... (ext:Snx Term))
<Regenaxer>
(flg? (fin Key)) is right
<beneroth>
well no partials...hm
<Regenaxer>
The easiest is to store the Snx in an attr
<Regenaxer>
and make a +Ref
<beneroth>
kinda ugly
<Regenaxer>
yes
<Regenaxer>
redundant
<Regenaxer>
otherwise you need your own class
<beneroth>
or my own collect, using iter with partial keys
<Regenaxer>
yes
<beneroth>
what is THE use case for (+Sn +IdxFold +String) relation ???
<Regenaxer>
Only for person names
<Regenaxer>
I always use it for European human names
<beneroth>
yes yes, but which queries? only when using (iter) directly, no? the other ways don't use the index entries, do they?
<Regenaxer>
never items or companies
<Regenaxer>
only in select
<beneroth>
is (tolr) using the index partial entries?
<Regenaxer>
yes
<beneroth>
ok.
<beneroth>
so how do you do it, if user enters just a human name as search term? whats the query look like?
<Regenaxer>
and 'select' also treats +Sn specially
<Regenaxer>
as you one above, with contact instead of id
<beneroth>
my point is, I have a google-like search input box, and when the user types in a name, they should get a list of all +Contact which fuzzy matches that search input
<beneroth>
that's the idea
<beneroth>
not filtering, searching
<Regenaxer>
yes, good
<Regenaxer>
So the above select is perfect
<Regenaxer>
you need select and not db or collect
<Regenaxer>
because it searches twice
<beneroth>
aye, pilog select, which in this special case consists only of a single generator clause, that is the correct answer
<Regenaxer>
first with exact matches
<Regenaxer>
yep
<beneroth>
ok, makes sense
<beneroth>
so order of results would be "fuzziness" of match
<beneroth>
kinda
<Regenaxer>
right
<beneroth>
got it, thanks
<Regenaxer>
assumes the user scrolls dewn
<Regenaxer>
down
<Regenaxer>
;)
<beneroth>
T
<beneroth>
;-)
<Regenaxer>
the OnePlus has a protect on the display
<Regenaxer>
Penti often misses presses
<Regenaxer>
ie 'e' instead of 'o'
<beneroth>
i though I could maybe do something for soundex like for fold: (collect 'nm '+CuSu (fold Term)) - but maybe this usage is WRONG (incomplete results?) too?
<beneroth>
well I have a Huawei tablet, as you know :)
<Regenaxer>
des
<Regenaxer>
yes
<Regenaxer>
'collect' does the fold by itself
<Regenaxer>
if the class is of +Fold
<beneroth>
ok
<beneroth>
nvm
<beneroth>
I mixed something up
<Regenaxer>
me too
<Regenaxer>
I just used it for so many years
<Regenaxer>
without thinking about the details
<Regenaxer>
Maybe collect wont work
<Regenaxer>
Anyway, select is the recommended way
<Regenaxer>
I'm not sure if I should reove the protection foil
<Regenaxer>
it seems to stick very strong
<Regenaxer>
And I found no clear hints in the web
<Regenaxer>
s/reove/remove
ubLIX has quit [Quit: ubLIX]
useruser has joined #picolisp
<beneroth>
many thanks, I think I understand it now
<beneroth>
and I saw pilog uses (step), not iter :)
<beneroth>
many thanks
<beneroth>
bbl
miskatonic has joined #picolisp
alexshendi has joined #picolisp
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
clacke_movim has left #picolisp [#picolisp]
clacke_movim has joined #picolisp
alexshendi has quit [Ping timeout: 248 seconds]
useruser has quit [Ping timeout: 245 seconds]
beneroth has quit [Quit: Farewell]
orivej has joined #picolisp
_whitelogger has joined #picolisp
miskatonic has joined #picolisp
miskatonic has quit [Remote host closed the connection]
miskatonic has joined #picolisp
xkapastel has quit [Quit: Connection closed for inactivity]
useruser has joined #picolisp
freemint has joined #picolisp
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
useruser has quit [Remote host closed the connection]
useruser has joined #picolisp
useruser has quit [Remote host closed the connection]