Re: use-livecode Digest, Vol 222, Issue 8

2022-03-11 Thread J. Landman Gay via use-livecode

Ditto Boggle, the longer the word the more points you get.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 11, 2022 8:03:20 AM Craig Newman via use-livecode 
 wrote:



I play Scrabble, not Boggle.

Regardless of which dictionary people use, there are many more words of  8 
- 10 characters than of 4 - 6 characters.



Craig


On Mar 10, 2022, at 5:25 PM, doc hawk via use-livecode 
 wrote:



jacqui jawed,



filter tHugeDict without regex pattern "[qkxyz]”


I expect that would be faster.

But it will also bring words that are too long, although I have no idea 
whether or not there would be enough to matter.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-11 Thread Craig Newman via use-livecode
I play Scrabble, not Boggle.

Regardless of which dictionary people use, there are many more words of  8 - 10 
characters than of 4 - 6 characters. 


Craig


> On Mar 10, 2022, at 5:25 PM, doc hawk via use-livecode 
>  wrote:
> 
> 
> jacqui jawed,
> 
> 
>> filter tHugeDict without regex pattern "[qkxyz]”
> 
> I expect that would be faster.
> 
> But it will also bring words that are too long, although I have no idea 
> whether or not there would be enough to matter.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-10 Thread doc hawk via use-livecode

jacqui jawed,


>  filter tHugeDict without regex pattern "[qkxyz]”

I expect that would be faster.

But it will also bring words that are too long, although I have no idea whether 
or not there would be enough to matter.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-10 Thread J. Landman Gay via use-livecode

On 3/9/22 3:42 PM, doc hawk via use-livecode wrote:

Something like


^[manl]\{2,5\}$

which matches all strings of length 2 to 5 composed exclusively of the letters m, 
a, n, & l ?


I want to eliminate all words contains any of the letters in the group. I didn't get 
confirmation that my regex is correct but it seems to work:


  filter tHugeDict without regex pattern "[qkxyz]"

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-09 Thread doc hawk via use-livecode


jacqui juggled,
> 
> Funny you should bring this up, as I was playing with it last night. Turns 
> out that multiple filters do slow down on the Pixel so I was looking for the 
> One True Regex.


Something like


^[manl]\{2,5\}$

which matches all strings of length 2 to 5 composed exclusively of the letters 
m, a, n, & l ?

[this assumes one word per line, of course]

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-07 Thread J. Landman Gay via use-livecode
Funny you should bring this up, as I was playing with it last night. Turns 
out that multiple filters do slow down on the Pixel so I was looking for 
the One True Regex.


I'm not great at this so would like verification from those who know if 
this is what I need:


put "[" & tUnusedLetters & "]" into tRegex
filter tHugeDict without regex pattern tRegex

It seems to work but I'm not positive. Does that look right?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 7, 2022 3:01:19 AM Quentin Long via use-livecode 
 wrote:



My first attempt at the regex is…
filter lines of WordList without "*[AbsentChars]*"
However, that will remove all words that contain at least one letter in the 
specific character string "absentchars", which is not what I want. So, 
bring out the "do" keyword…
do ("filter lines of WordList without" && quote & "*" & AbsentChars & "*" & 
quote)





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-07 Thread Andy Marshman via use-livecode
Hi Mark,

In regex the full stop stands for any single character whereby the * means
any other characters. If you want to only find things that begin with a
character put a ^ infront of the character you are searching for. So ^a.
should only return apple in your example.


Regards

Andy

On Mon, 7 Mar 2022, 16:46 Mark Smith via use-livecode, <
use-livecode@lists.runrev.com> wrote:

> So, playing around a bit more I discovered “a.*” does not return words
> that “start with”, but rather words that “contain” the letter. So that
> explains “apple, banana”. What isn’t clear to me is I get the exact same
> result using “a.” with no asterisk, but if I search for “y.” it returns
> nothing rather than cherry. Consequentially I realize my confusion is due
> to a limitation of what these characters mean to regex. Can anyone clarify
> for me what the “.” and “*” are doing to change the filter?
>
> Thanks
>
> > On Mar 7, 2022, at 11:05 AM, Mark Smith  wrote:
> >
> > I am not an expert in regex or filtering by any means so Quentin’s
> message prompted me to take a closer look. I started with the dictionary
> entry for filter and I found this simple example:
> > filter items of "apple,banana,cherry" with regex pattern "b.*"
> >
> > Since we are not specifying a destination, the result is going into the
> “it" variable. I tried that and got the expected result “banana”. Next I
> tried “c.*” and got cherry and “d.*’ and got nothing. All good. Finally I
> tried “a.*” and got “apple, banana”. I was a bit surprised by that. Does
> anyone know why “a.*” breaks the pattern of returning a single item? Does
> it have something to do with the item being in the first position in the
> string?
> >
> > BTW, I did try putting the result into a variable and displaying that (…
> into temp; put temp) and got the same result.
> >
> > Also, I thought I might try a few experiments using “without regex
> pattern” and using “a.*” as the argument returned “cherry” so at least
> whatever it is doing it is consistent.
> >
> > Mark
> >
> >
> >> On Mar 7, 2022, at 8:58 AM, Quentin Long via use-livecode <
> use-livecode@lists.runrev.com >
> wrote:
> >>
> >> sez j. landman gay:
> >>> Interesting idea. There are 25 letters on each board, some are always
> repeats. I think I'd need
> >>> a good regex so I wouldn't have to run the filter command multiple
> times. How's your regex?
> >>
> >> I see you've already implemented something, but just for grins, here's
> my thought re: the One True Regex for this situation:
> >> AbsentChars is the name of a variable which contains all the letters
> that *aren't* on the board. My first attempt at the regex is…
> >> filter lines of WordList without "*[AbsentChars]*"
> >> However, that will remove all words that contain at least one letter in
> the specific character string "absentchars", which is not what I want. So,
> bring out the "do" keyword…
> >> do ("filter lines of WordList without" && quote & "*" & AbsentChars &
> "*" & quote)
> >>
> >> "Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the
> webcomic at [ http://www.atarmslength.net 
> ]! If you like "At Arm's Length", support it at [
> http://www.patreon.com/DarkwingDude 
> ].
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com 
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-07 Thread Mark Smith via use-livecode
So, playing around a bit more I discovered “a.*” does not return words that 
“start with”, but rather words that “contain” the letter. So that explains 
“apple, banana”. What isn’t clear to me is I get the exact same result using 
“a.” with no asterisk, but if I search for “y.” it returns nothing rather than 
cherry. Consequentially I realize my confusion is due to a limitation of what 
these characters mean to regex. Can anyone clarify for me what the “.” and “*” 
are doing to change the filter? 

Thanks

> On Mar 7, 2022, at 11:05 AM, Mark Smith  wrote:
> 
> I am not an expert in regex or filtering by any means so Quentin’s message 
> prompted me to take a closer look. I started with the dictionary entry for 
> filter and I found this simple example:
> filter items of "apple,banana,cherry" with regex pattern "b.*"
> 
> Since we are not specifying a destination, the result is going into the “it" 
> variable. I tried that and got the expected result “banana”. Next I tried 
> “c.*” and got cherry and “d.*’ and got nothing. All good. Finally I tried 
> “a.*” and got “apple, banana”. I was a bit surprised by that. Does anyone 
> know why “a.*” breaks the pattern of returning a single item? Does it have 
> something to do with the item being in the first position in the string? 
> 
> BTW, I did try putting the result into a variable and displaying that (… into 
> temp; put temp) and got the same result. 
> 
> Also, I thought I might try a few experiments using “without regex pattern” 
> and using “a.*” as the argument returned “cherry” so at least whatever it is 
> doing it is consistent.
> 
> Mark
> 
> 
>> On Mar 7, 2022, at 8:58 AM, Quentin Long via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>> sez j. landman gay:
>>> Interesting idea. There are 25 letters on each board, some are always 
>>> repeats. I think I'd need 
>>> a good regex so I wouldn't have to run the filter command multiple times. 
>>> How's your regex?
>> 
>> I see you've already implemented something, but just for grins, here's my 
>> thought re: the One True Regex for this situation:
>> AbsentChars is the name of a variable which contains all the letters that 
>> *aren't* on the board. My first attempt at the regex is…
>> filter lines of WordList without "*[AbsentChars]*"
>> However, that will remove all words that contain at least one letter in the 
>> specific character string "absentchars", which is not what I want. So, bring 
>> out the "do" keyword…
>> do ("filter lines of WordList without" && quote & "*" & AbsentChars & "*" & 
>> quote)
>> 
>> "Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the 
>> webcomic at [ http://www.atarmslength.net  ]! 
>> If you like "At Arm's Length", support it at [ 
>> http://www.patreon.com/DarkwingDude  ].
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com 
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-07 Thread Mark Smith via use-livecode
I am not an expert in regex or filtering by any means so Quentin’s message 
prompted me to take a closer look. I started with the dictionary entry for 
filter and I found this simple example:
filter items of "apple,banana,cherry" with regex pattern "b.*"

Since we are not specifying a destination, the result is going into the “it" 
variable. I tried that and got the expected result “banana”. Next I tried “c.*” 
and got cherry and “d.*’ and got nothing. All good. Finally I tried “a.*” and 
got “apple, banana”. I was a bit surprised by that. Does anyone know why “a.*” 
breaks the pattern of returning a single item? Does it have something to do 
with the item being in the first position in the string? 

BTW, I did try putting the result into a variable and displaying that (… into 
temp; put temp) and got the same result. 

Also, I thought I might try a few experiments using “without regex pattern” and 
using “a.*” as the argument returned “cherry” so at least whatever it is doing 
it is consistent.

Mark


> On Mar 7, 2022, at 8:58 AM, Quentin Long via use-livecode 
>  wrote:
> 
> sez j. landman gay:
>> Interesting idea. There are 25 letters on each board, some are always 
>> repeats. I think I'd need 
>> a good regex so I wouldn't have to run the filter command multiple times. 
>> How's your regex?
> 
> I see you've already implemented something, but just for grins, here's my 
> thought re: the One True Regex for this situation:
> AbsentChars is the name of a variable which contains all the letters that 
> *aren't* on the board. My first attempt at the regex is…
> filter lines of WordList without "*[AbsentChars]*"
> However, that will remove all words that contain at least one letter in the 
> specific character string "absentchars", which is not what I want. So, bring 
> out the "do" keyword…
> do ("filter lines of WordList without" && quote & "*" & AbsentChars & "*" & 
> quote)
> 
> "Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the 
> webcomic at [ http://www.atarmslength.net ]! If you like "At Arm's Length", 
> support it at [ http://www.patreon.com/DarkwingDude ].
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: use-livecode Digest, Vol 222, Issue 8

2022-03-07 Thread Quentin Long via use-livecode
sez j. landman gay:
> Interesting idea. There are 25 letters on each board, some are always 
> repeats. I think I'd need 
> a good regex so I wouldn't have to run the filter command multiple times. 
> How's your regex?

I see you've already implemented something, but just for grins, here's my 
thought re: the One True Regex for this situation:
AbsentChars is the name of a variable which contains all the letters that 
*aren't* on the board. My first attempt at the regex is…
filter lines of WordList without "*[AbsentChars]*"
However, that will remove all words that contain at least one letter in the 
specific character string "absentchars", which is not what I want. So, bring 
out the "do" keyword…
do ("filter lines of WordList without" && quote & "*" & AbsentChars & "*" & 
quote)

"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the 
webcomic at [ http://www.atarmslength.net ]! If you like "At Arm's Length", 
support it at [ http://www.patreon.com/DarkwingDude ].
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode