»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
colomon is once again wishing C++ were Perl 6... 01:02
sorear hello 01:05
colomon o/ 01:15
moritz good morning 06:13
sorear good morning moritz !! 06:19
sorear out 06:45
tadzik good morning 07:56
colomon \o 12:34
sorear good * #perl6 13:57
mathw good * sorear 13:57
pmurias sorear: hi 14:28
sorear hi pmurias 14:52
hi lichtkind
pmurias sorear: how's niecza doing?
sorear ok I guess 14:53
it'll be doing much better in a week, after finals
pmurias good luck with the finals 14:54
sorear thanks
sorear buubot_backup: eval 2 + 2 15:47
buubot_backup sorear: 4
sorear \o/
lichtkind sorear: hai
clintongormley1 hi all - i'm hoping that somebody with language design experience (<cough>TimToady</cough>) might give me a bit of advice 16:07
i'm trying to design an SQL::Abstract style interface to send queries to ElasticSearch, a lucene based full text search engine
in case you're not familiar, SQL::Abstract parses constructs like { foo=>'bar', num => { '>' => 5}} 16:09
so there are the obvious operators, like > < != etc
but there are a number of other query types, like 'prefix', 'fuzzy' which i'm considering allowing operators for, as opposed to saying { field => {prefix => 'foo'}} 16:10
here is what i have: gist.github.com/a90fc626d4f849b41100
and i'm wondering what you think. do the proposed operators work? or are they too invented, and should i just stick to using words (ie 'prefix', 'wildcard' etc) 16:11
sorear hello clintongormley1.
clintongormley1 hiya
sorear who sent you here? :)
PerlJam I think it's well known that this is a good place to find TimToady
clintongormley1 sorear: nobody. i know what #perl6 is, but i thought this was the place with the highest concentration of operator experts :)
clintongormley1 s/operator/language/ 16:12
i realise this is OT, but hoping for some feedback anyway
PerlJam Well, in your case, you don't have much of a "language" :)
clintongormley1 yes, i realise 16:13
PerlJam I assume the | are meta-syntax in your examples.
clintongormley1 the > | < etc
yes, i mean > or < or >=
PerlJam how do you say "and" and "or" ?
clintongormley1 in SQL::Abstract, you say it with {} or [], so: 16:14
{ foo => bar, num => 1} is: foo == bar and num == 1
PerlJam oh. I get it.
clintongormley1 in [] would be or
i can support eg the word 'prefix' plus the op, but i'm wondering if the ops are just too unfamiliar to be useful, and would be better left out 16:15
PerlJam clintongormley1: if your users are perl programmers, some of those would be analogous to regex or glob and so make sense I guess. 16:18
clintongormley1 any that you think work, and any that you would dismiss?
(and yes, they are Perl users)
PerlJam I'd probably use '^' for "starts with" and "*" for glob and '~' for full text search. 16:20
'~~' doesn't quite do it for me, nor does '*~'
(but that's just me)
(and you could use '$' for "ends with" if you needed it) 16:21
clintongormley1 yep - that one doesn't exist
that makes sense - any idea about how to distinguish between 'text' and 'query_string' then?
query_string is commonly used, and thus is longer than i'd like
PerlJam well, maybe just "query" ? 16:23
clintongormley1 yeah, although that is used elsewhere
to distinguish between queries (which have their "relevance" scored) and filters, which just ... filter :)
PerlJam fuzzy and query_string both want to be text-ish rather than operator-ish in my head. so, I'd use "fuzzy" and "query" 16:24
or perhaps "fts" for query_string
clintongormley1 ok - yeah that makes sense 16:25
thanks PerlJam
PerlJam sure 16:26
clintongormley1: Can you do arithmetic on the keys? or is that planned?
clintongormley1 no 16:27
neither
PerlJam okay, that would make a difference to using "*" to mean glob or not
clintongormley1 right
PerlJam in fact, to be conservative, you should use "glob" instead to allow for *-as-multiplication in the future. 16:29
But that's your call :)
clintongormley1 no, it definitely won't be an option
following your logic of query|fuzzy what if i added 'text' in there, and made fuzzy ~ 16:30
PerlJam Is there a particular reason you're looking for operator-like names rather than stringy names? 16:31
clintongormley1 just compactness really
that's why i wanted a sense check - afraid i was going overboard :)
PerlJam Would you have regex as an option in the future? 16:31
clintongormley1 it is a possibility 16:32
right, so reserve ~ for regex
PerlJam well, you could use '=~' for regex, but then ~-as-fuzzy wouldn't make as much sense
(IMHO)
clintongormley1 yeah
and really, for fuzzy you have to provide a number of parameters, eg min similarity 16:33
so making the op a short symbol is probably not worthwhile
PerlJam The real design trick is to not accidently limit your future options by poor choices today. TimToady excels at imagining the future, but he's had lots of practice I think :) 16:36
clintongormley1 heh yeah
PerlJam (and made lots of mistakes ... thus #perl6 :)
clintongormley1 again, many thanks. you've helped a lot
tadzik hello zebras 18:03
sorear hey tadzik 18:51
tadzik finals, eh? I'm jealous 18:53
sorear jealous? 18:57
sorear why? 18:59
tadzik mine end on July the 1st 19:09
5 weeks after the start of GSoC
sorear hey, at least you got in 19:11
tadzik you didn't? 19:13
I mean, were you trying and didn't get in? 19:14
sorear tadzik: I was trying but there wasn't a project for me in time 19:26
sorear possibly relevant: I live a few hundred km south of Google's HQ 19:26
maybe they just looked at all schools within $DISTANCE when they were planning schedules 19:27
tadzik well, looks like it's only Poland which is fscked :) 19:30
Tene sorear: where do you live? That sounds like almost a reasonable driving distance from me. 19:52
sorear Tene: san diego 19:55
suburbs
Tene Ah, that's a bit more than a casual drive. Good to know, though. 20:01
sorear Where are you? 20:02
Tene sunnyvale, so often within walking distance of google HQ 20:03
sorear nod 20:06
tylercurtis tadzik: if it makes you feel any better, my finals don't begin until June 6th. 20:31
tadzik thanks, I feel better now :) 20:32
tylercurtis Fortunately, I'm not taking any courses with final papers this quarter, so finals week shouldn't be too busy. 20:37
tadzik yay, I hacked a kernel module and it still works 20:40
Moukeddar hello fellows 23:53