World: r3wp
[Core] Discuss core issues
older newer | first last |
ICarii 3-Aug-2008 [10828] | ill probably just use C# and use regex :) |
Henrik 3-Aug-2008 [10829x2] | deep-find: func [blk str] [repeat i length? blk [all [find/any blk/:i str break/return at blk i]]] |
could probably be sped up with while or until | |
ICarii 3-Aug-2008 [10831x2] | or by length matching wildcard pattern |
because once i use the full 300,000+ word dictionary its gonna need to be fast :) | |
Henrik 3-Aug-2008 [10833] | it helps if you are searching a hash |
ICarii 3-Aug-2008 [10834] | wildcard searching a hash is rather messy tho isnt it? |
Henrik 3-Aug-2008 [10835x2] | I've not tried it, but find should be much faster in hashes. |
are you always searching from the beginning of the string? | |
ICarii 3-Aug-2008 [10837x2] | no |
eg "?ex??w*a" | |
Henrik 3-Aug-2008 [10839] | hmm |
ICarii 3-Aug-2008 [10840x2] | think crossword matching |
but without defined lengths | |
Henrik 3-Aug-2008 [10842] | then it wouldn't help to divide the dictionary in sections by first letter |
ICarii 3-Aug-2008 [10843x3] | only safe exclusions would be minimum desired length |
eg if someone does "*was" you can remove everything 2 letters or less | |
but that seems to be the limit of preprocessing the list | |
Henrik 3-Aug-2008 [10846x3] | I use similar code in LIST-VIEW and it searches about 30000 words in 0.1-0.2 seconds. It does no t use expression matching, though. |
and it also gets all results | |
rather than just the first one | |
ICarii 3-Aug-2008 [10849] | ive got some old code i did a few years ago in C# that uses regex to do it but I was just curious if rebol could do it in a timely manner |
Henrik 3-Aug-2008 [10850] | parse should probably not be ruled out. it's very fast. |
ICarii 3-Aug-2008 [10851x2] | im testing parse at the moment - ill test it on R2/R3 and see how it rates |
this by ladislav was interesting http://www.compkarori.com/vanilla/display/PARSE-Versus-Regexs | |
Anton 21-Aug-2008 [10853x2] | http://anton.wildit.net.au/rebol/library/string-search-functions.r http://anton.wildit.net.au/rebol/library/demo-string-search-functions.r |
(They don't do wildcard searching, though could be modified I suppose...) | |
Graham 2-Sep-2008 [10855x2] | Is there any windows setting, or anything else, which results in 'now not providing the timezone? |
I've got an encapped application which is failing, and it can only be failing if there is no timezone in the 'now data. | |
Oldes 2-Sep-2008 [10857x3] | yes... jeruzalem time-zone:) |
very interesting | |
it should be +2:00 but I have no timezone in rebol | |
Graham 2-Sep-2008 [10860] | why? |
Oldes 2-Sep-2008 [10861] | also you have to restart rebol to get changed timezone setting updated |
Graham 2-Sep-2008 [10862] | >> now == 2-Sep-2008/22:23:12+12:00 |
Oldes 2-Sep-2008 [10863] | ech.. no... now it's correct |
Graham 2-Sep-2008 [10864] | what happens for you? |
Oldes 2-Sep-2008 [10865x2] | so I'm not sure |
I'm changing timezones in settings and check 'now in Rebol... I got it without timezone once | |
Graham 2-Sep-2008 [10867] | oh .. bug then. |
Oldes 2-Sep-2008 [10868] | >> now == 2-Sep-2008/12:21:27 |
Graham 2-Sep-2008 [10869] | what timezone setting in windows? |
Oldes 2-Sep-2008 [10870x3] | now with Casablanca, Monrovia |
yes... it's every time... there is no timezone in windows settings as well for this zone | |
I guess there should be 0:0 in Rebol (not none) | |
Graham 2-Sep-2008 [10873x5] | >> now == 2-Sep-2008/11:28:35+1:00 |
In Vista .. using Casablanca. | |
>> now == 2-Sep-2008/10:29:40 | |
with daylight saving disabled | |
interesting. | |
older newer | first last |