Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #536706 > unrolled thread
| Started by | F Russell <fr@random.info> |
|---|---|
| First post | 2019-10-14 23:54 +0000 |
| Last post | 2019-10-16 23:36 +0000 |
| Articles | 20 on this page of 169 — 18 participants |
Back to article view | Back to comp.os.linux.advocacy
Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-14 23:54 +0000
Re: Vote Your No. 1 Linux Program Idaho Homo Joe <dick_lick@aol.com> - 2019-10-14 20:05 -0400
Re: Vote Your No. 1 Linux Program Joel <joelcrump@gmail.com> - 2019-10-14 20:34 -0400
The good news is that Russell will one day bite the dust "Simon, the Senior" <john.h.gohde@gmail.com> - 2019-10-15 05:01 -0700
Re:The good news is that Russell will one day bite the dust melzzzzz <mel@melzzzzz.com> - 2019-10-15 14:05 +0200
MelzzZzz? Don't make Moi laugh. "Simon, the Senior" <john.h.gohde@gmail.com> - 2019-10-15 05:19 -0700
Re:MelzzZzz? Don't make Moi laugh. melzzzzz <mel@melzzzzz.com> - 2019-10-15 14:32 +0200
Re:MelzzZzz? Don't make Moi laugh. vallor <vallor@cultnix.org> - 2019-10-16 20:08 +0000
Re: MelzzZzz? Don't make Moi laugh. Joel <joelcrump@gmail.com> - 2019-10-16 16:20 -0400
Re: MelzzZzz? Don't make Moi laugh. Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-17 01:27 +0000
Russell is a Bone Head "Simon, the Senior" <john.h.gohde@gmail.com> - 2019-10-15 04:58 -0700
Re:Russell is a Bone Head melzzzzz <mel@melzzzzz.com> - 2019-10-15 14:08 +0200
Re: Russell is a Bone Head chrisv <chrisv@nospam.invalid> - 2019-10-15 07:16 -0500
Home Computer based Email is NOT obsolete, Says the chrisv Fossil "Simon, the Senior" <john.h.gohde@gmail.com> - 2019-10-15 05:25 -0700
Re:Home Computer based Email is NOT obsolete, Says the chrisv Fossil melzzzzz <mel@melzzzzz.com> - 2019-10-15 14:34 +0200
MelzzZzz is fixated on Woody Allen "Simon, the Senior" <john.h.gohde@gmail.com> - 2019-10-15 05:39 -0700
"Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-15 07:55 -0500
Re:"Smart phones" suck, says the chrisv fossil melzzzzz <mel@melzzzzz.com> - 2019-10-15 15:25 +0200
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-15 11:49 -0500
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-15 12:47 -0500
Re: "Smart phones" suck, says the chrisv fossil DFS <nospam@dfs.com> - 2019-10-15 09:37 -0400
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-15 07:27 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-15 11:09 -0500
Re: "Smart phones" suck, says the chrisv fossil Steve Carroll <fretwizzer@gmail.com> - 2019-10-15 09:47 -0700
Re: "Smart phones" suck, says the chrisv fossil AnonLinuxUser <Anon@Linuxusers.net> - 2019-10-15 16:29 -0600
Re: "Smart phones" suck, says the chrisv fossil Steve Carroll <fretwizzer@gmail.com> - 2019-10-15 16:44 -0700
Re: "Smart phones" suck, says the chrisv fossil AnonLinuxUser <Anon@Linuxusers.net> - 2019-10-15 22:42 -0600
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-15 10:38 -0700
Re: "Smart phones" suck, says the chrisv fossil melzzzzz <mel@melzzzzz.com> - 2019-10-15 19:40 +0200
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-15 11:10 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-15 13:35 -0500
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-15 12:26 -0700
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-15 12:52 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-16 09:51 -0500
The Largest companies ( by market cap, in trillions of USD ). Jeff-Relf.Me @. - 2019-10-15 15:08 -0700
Re: "Smart phones" suck, says the chrisv fossil DFS <nospam@dfs.com> - 2019-10-15 18:39 -0400
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-16 08:50 -0500
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-16 12:38 -0700
Re: "Smart phones" suck, says the chrisv fossil DFS <nospam@dfs.com> - 2019-10-17 11:53 -0400
Re: "Smart phones" suck, says the chrisv fossil fr314159@gmail.com - 2019-10-16 06:13 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-16 08:59 -0500
Re: "Smart phones" suck, says the chrisv fossil Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-16 18:43 +0000
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-15 06:58 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-15 11:43 -0500
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-15 11:00 -0700
Re: "Smart phones" suck, says the chrisv fossil vallor <vallor@cultnix.org> - 2019-10-16 20:44 +0000
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-16 14:21 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-17 07:01 -0500
Re: "Smart phones" suck, says the chrisv fossil vallor <vallor@cultnix.org> - 2019-10-17 15:52 +0000
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-17 09:47 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-17 12:07 -0500
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-17 10:27 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-17 11:57 -0500
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-17 12:17 -0500
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-17 10:28 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-18 07:08 -0500
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-18 07:42 -0700
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-18 09:52 -0500
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-18 11:39 -0500
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-18 11:39 -0700
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-17 10:29 -0700
Re: "Smart phones" suck, says the chrisv fossil -hh <recscuba_google@huntzinger.com> - 2019-10-17 13:43 -0700
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-17 13:56 -0700
Re: "Smart phones" suck, says the chrisv fossil vallor <vallor@cultnix.org> - 2019-10-18 05:07 +0000
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-18 06:58 -0500
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-18 09:37 -0500
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-18 10:02 -0500
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-18 11:40 -0700
Re: "Smart phones" suck, says the chrisv fossil Snit <usenet@gallopinginsanity.com> - 2019-10-18 11:42 -0700
Re: "Smart phones" suck, says the chrisv fossil Brian Dee <skills4uifuwant@hotmail.org> - 2019-10-15 10:05 -0400
Re: "Smart phones" suck, says the chrisv fossil vallor <vallor@cultnix.org> - 2019-10-16 20:19 +0000
Re: "Smart phones" suck, says the chrisv fossil chrisv <chrisv@nospam.invalid> - 2019-10-17 07:08 -0500
Little? Moi has a little one. Don't go there, chrisv. "Simon, the Senior" <john.h.gohde@gmail.com> - 2019-10-15 19:17 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-15 10:13 -0400
Re: Vote Your No. 1 Linux Program melzzzzz <mel@melzzzzz.com> - 2019-10-15 17:51 +0200
Re: Vote Your No. 1 Linux Program fr314159@gmail.com - 2019-10-16 06:22 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-15 07:34 -0700
Linux voted #1 by sperm swallowers! Idaho Homo Joe <dick_lick@aol.com> - 2019-10-15 15:18 -0400
Re:Linux voted #1 by sperm swallowers! melzzzzz <mel@melzzzzz.com> - 2019-10-15 22:22 +0200
Re: Linux voted #1 by sperm swallowers! chrisv <chrisv@nospam.invalid> - 2019-10-16 07:16 -0500
Re: Linux voted #1 by sperm swallowers! Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-16 18:41 +0000
Re: Vote Your No. 1 Linux Program fr314159@gmail.com - 2019-10-16 06:18 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <"Steve Carroll"@noSPAM.none> - 2019-10-16 15:29 +0000
Re: Vote Your No. 1 Linux Program fr314159@gmail.com - 2019-10-16 08:41 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-16 09:12 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-16 09:14 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-16 13:15 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <"Steve Carroll"@noSPAM.none> - 2019-10-16 17:25 +0000
Re: Vote Your No. 1 Linux Program fr314159@gmail.com - 2019-10-16 10:27 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-16 18:04 -0400
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-16 23:47 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-17 11:50 -0400
Re: Vote Your No. 1 Linux Program melzzzzz <mel@melzzzzz.com> - 2019-10-16 18:23 +0200
Re: Vote Your No. 1 Linux Program Steve Carroll <"Steve Carroll"@noSPAM.none> - 2019-10-16 16:42 +0000
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-16 18:36 +0000
Re: Vote Your No. 1 Linux Program fr314159@gmail.com - 2019-10-16 09:42 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <"Steve Carroll"@noSPAM.none> - 2019-10-16 16:59 +0000
Re: Vote Your No. 1 Linux Program fr314159@gmail.com - 2019-10-16 10:05 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <"Steve Carroll"@noSPAM.none> - 2019-10-16 17:14 +0000
Re: Vote Your No. 1 Linux Program fr314159@gmail.com - 2019-10-16 10:25 -0700
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-16 18:40 +0000
Re: Vote Your No. 1 Linux Program vallor <vallor@cultnix.org> - 2019-10-16 22:21 +0000
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-16 15:46 -0700
Re: Vote Your No. 1 Linux Program Snit <usenet@gallopinginsanity.com> - 2019-10-16 16:33 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-16 19:46 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-16 17:01 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-16 23:11 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-17 08:04 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-17 08:28 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-18 10:36 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-18 15:15 -0700
Re: Vote Your No. 1 Linux Program Snit <usenet@gallopinginsanity.com> - 2019-10-18 16:23 -0700
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-19 00:09 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-18 22:01 -0400
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 10:17 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 08:18 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 12:22 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 09:44 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 10:19 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 11:19 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 11:29 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 15:21 -0400
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 15:15 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 12:19 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 17:48 -0400
Re: Vote Your No. 1 Linux Program owl <owl@rooftop.invalid> - 2019-10-19 22:22 +0000
Re: Vote Your No. 1 Linux Program owl <owl@rooftop.invalid> - 2019-10-19 22:27 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 18:54 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 15:59 -0700
Re: Vote Your No. 1 Linux Program vallor <vallor@cultnix.org> - 2019-10-20 03:39 +0000
Re: Vote Your No. 1 Linux Program vallor <vallor@cultnix.org> - 2019-10-20 04:10 +0000
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-20 09:47 -0700
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 15:54 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-20 19:12 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <"Steve Carroll"@noSPAM.none> - 2019-10-21 15:02 +0000
Re: Vote Your No. 1 Linux Program vallor <vallor@cultnix.org> - 2019-10-20 03:29 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-23 11:17 -0400
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-23 22:36 +0000
Re: Vote Your No. 1 Linux Program chrisv <chrisv@nospam.invalid> - 2019-10-21 07:06 -0500
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-22 10:21 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-22 08:10 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-22 11:58 -0400
Re: Vote Your No. 1 Linux Program Snit <usenet@gallopinginsanity.com> - 2019-10-22 16:02 +0000
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-22 09:20 -0700
Re: Vote Your No. 1 Linux Program chrisv <chrisv@nospam.invalid> - 2019-10-22 12:33 -0500
Re: Vote Your No. 1 Linux Program chrisv <chrisv@nospam.invalid> - 2019-10-22 14:26 -0500
Re: Vote Your No. 1 Linux Program AnonLinuxUser <Anon@Linuxusers.net> - 2019-10-22 09:44 -0600
Re: Vote Your No. 1 Linux Program Snit <usenet@gallopinginsanity.com> - 2019-10-22 16:00 +0000
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-19 13:28 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 10:37 -0400
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-19 15:05 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-19 11:51 -0400
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-19 18:31 +0000
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-19 20:43 +0000
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-19 21:38 +0000
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-20 09:51 -0700
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-20 17:06 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-20 17:57 -0400
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-21 14:55 +0000
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-19 08:26 -0700
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-18 21:16 -0400
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-17 11:48 -0400
Re: Vote Your No. 1 Linux Program Steve Carroll <fretwizzer@gmail.com> - 2019-10-17 09:15 -0700
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-16 23:52 +0000
Proving once again, that Moi is smarter than Russell "Simon, the Senior" <john.h.gohde@gmail.com> - 2019-10-17 05:11 -0700
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-16 18:38 +0000
Re: Vote Your No. 1 Linux Program Melzzzzz <Melzzzzz@zzzzz.com> - 2019-10-16 18:37 +0000
Re: Vote Your No. 1 Linux Program DFS <nospam@dfs.com> - 2019-10-16 17:55 -0400
Re: Vote Your No. 1 Linux Program F Russell <fr@random.info> - 2019-10-16 23:36 +0000
Page 7 of 9 — ← Prev page 1 2 3 4 5 6 [7] 8 9 Next page →
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2019-10-19 11:29 -0700 |
| Message-ID | <76dbdb1d-c158-46d8-9c65-8006b00d2254@googlegroups.com> |
| In reply to | #536983 |
On Saturday, October 19, 2019 at 12:19:16 PM UTC-6, Steve Carroll wrote:
> On Saturday, October 19, 2019 at 11:19:42 AM UTC-6, Steve Carroll wrote:
> > On Saturday, October 19, 2019 at 10:44:17 AM UTC-6, Steve Carroll wrote:
> > > On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
> >
> > (snip)
> >
> > > > >>> <2/10ths of a second to go thru 370K words... can I get a BOOM!
> > > > >
> > > > > Is that one of the word lists from the github page you mentioned?
> > > >
> > > > Yes. The words_alpha.txt file from
> > > > https://github.com/dwyl/english-words
> > > >
> > > >
> > > >
> > > >
> > > > > Node isn't quite that fast with the 'words_dictionary.json' file:
> > > > >
> > > > > <https://imgur.com/a/3VETXBJ>
> > > >
> > > > What ops are done with: const data = require('./words_dictionary.json')
> > > >
> > > > Does it actually import the data from the text file into a memory structure?
> > >
> > > I believe so.
> >
> > I added an image to that link which answers the question:
> > <https://imgur.com/a/3VETXBJ>
> >
> > So it seems 'push' is a lot slower of an operation.
>
> What about splitting the dictionary on letters and having each permutation
> only look up as based on starting letter of the given permutation?
That came to me while waiting for another run of 'replays':
<https://imgur.com/a/O0kPbWt>
I knew (from my previous run) it would never find anything past 's',
so why bother looking? Aside from having much smaller dictionaries
to muddle through it seemed a good idea to stop when there's nothing
left to find ;)
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2019-10-19 15:21 -0400 |
| Message-ID | <e%IqF.184844$LG2.69398@fx48.iad> |
| In reply to | #536985 |
On 10/19/2019 2:29 PM, Steve Carroll wrote:
> On Saturday, October 19, 2019 at 12:19:16 PM UTC-6, Steve Carroll wrote:
>> On Saturday, October 19, 2019 at 11:19:42 AM UTC-6, Steve Carroll wrote:
>>> On Saturday, October 19, 2019 at 10:44:17 AM UTC-6, Steve Carroll wrote:
>>>> On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
>>>
>>> (snip)
>>>
>>>>>>>> <2/10ths of a second to go thru 370K words... can I get a BOOM!
>>>>>>
>>>>>> Is that one of the word lists from the github page you mentioned?
>>>>>
>>>>> Yes. The words_alpha.txt file from
>>>>> https://github.com/dwyl/english-words
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Node isn't quite that fast with the 'words_dictionary.json' file:
>>>>>>
>>>>>> <https://imgur.com/a/3VETXBJ>
>>>>>
>>>>> What ops are done with: const data = require('./words_dictionary.json')
>>>>>
>>>>> Does it actually import the data from the text file into a memory structure?
>>>>
>>>> I believe so.
>>>
>>> I added an image to that link which answers the question:
>>> <https://imgur.com/a/3VETXBJ>
>>>
>>> So it seems 'push' is a lot slower of an operation.
>>
>> What about splitting the dictionary on letters and having each permutation
>> only look up as based on starting letter of the given permutation?
>
> That came to me while waiting for another run of 'replays':
> <https://imgur.com/a/O0kPbWt>
>
> I knew (from my previous run) it would never find anything past 's',
> so why bother looking? Aside from having much smaller dictionaries
> to muddle through it seemed a good idea to stop when there's nothing
> left to find ;)
You might try this:
sort the letters of each word in the dictionary alphabetically, then
sort your search word alphabetically (replays => aelprsy) and look for
matches that way.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2019-10-19 15:15 -0400 |
| Message-ID | <cYIqF.30074$ZR2.13711@fx16.iad> |
| In reply to | #536979 |
On 10/19/2019 12:44 PM, Steve Carroll wrote:
> On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
>>> Node isn't quite that fast with the 'words_dictionary.json'
>>> file:
>>>
>>> <https://imgur.com/a/3VETXBJ>
>>
>> What ops are done with: const data =
>> require('./words_dictionary.json')
>>
>> Does it actually import the data from the text file into a memory
>> structure?
>
> I believe so.
>
>> My C program takes about 2.2 seconds to import the 370K words and
>> do the prime factors calculation.
>
> So it gets permutations but doesn't check 'em against a dictionary
> yet, which is where the real slow down would occur, I'd imagine.
It doesn't determine any permutations of the words. For each word it
calculates a 'prime factors' number based on the prime numbers assigned
to each letter of the word.
a=2
b=3
c=5
d=7
e=11
...
cab = 5*2*3 = 30. 30 is unique to all combos of abc.
cat = 5*2*71 = 710. 710 is unique to all combos of act.
deal = 7*11*2*37 = 5698. 5698 is unique to all combos of adel.
astro = 27276638, which is unique to all combos of aorst.
https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
The program puts each of the 370K words and their prime factor into a
data structure (I'm using a C struct which accomodates different data
types). Then it checks the prime factor of the input word and finds
all pf matches in the data where the word is different.
Searching for anagrams of 'astro'...
astor ratos roast rotas taros toras
6 anagram(s) found in 0.0115s
"Astor, my ratos! I'm roasting rotas and taros with a side of toras!
> Even using that version with splice and shift:
>
> <https://imgur.com/a/ptQs7bC>
>
> Hook that up to the dictionary (and check it stupidly slowly like I
> did) and it takes forever.
Yeah, there's no need to generate permutations and check each one
against the dictionary. Depending on the algorithm,that's wildly
inefficient.
> Feeb's right, in fact, it's worse than
> that, I'm just a wannabe code monkey. LOL!
So is Feeb.
"I need to train some stupid bitch to do the coding for me..."
> Dude, I don't know Timsort from Dim Sum ;)
LOL! Maybe you can write the Dimsort algorithm?
>> I was thrilled with 0.1827s and pretty code, but 0.0106s and uglier
>> code is even better.
>
> I hate it when Relf is right ;)
ha!
Relf's code is ungodly ugly, but it seems to work. But no sane software
manager would employ him and let him deliver code in his inscrutable
style. No way.
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2019-10-19 12:19 -0700 |
| Message-ID | <b668debd-3dc9-4027-a3ca-904818aaa67c@googlegroups.com> |
| In reply to | #536990 |
On Saturday, October 19, 2019 at 12:53:00 PM UTC-6, DFS wrote:
> On 10/19/2019 12:44 PM, Steve Carroll wrote:
> > On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
>
>
> >>> Node isn't quite that fast with the 'words_dictionary.json'
> >>> file:
> >>>
> >>> <https://imgur.com/a/3VETXBJ>
> >>
> >> What ops are done with: const data =
> >> require('./words_dictionary.json')
> >>
> >> Does it actually import the data from the text file into a memory
> >> structure?
> >
> > I believe so.
> >
> >> My C program takes about 2.2 seconds to import the 370K words and
> >> do the prime factors calculation.
> >
> > So it gets permutations but doesn't check 'em against a dictionary
> > yet, which is where the real slow down would occur, I'd imagine.
>
>
> It doesn't determine any permutations of the words. For each word it
> calculates a 'prime factors' number based on the prime numbers assigned
> to each letter of the word.
>
> a=2
> b=3
> c=5
> d=7
> e=11
> ...
>
> cab = 5*2*3 = 30. 30 is unique to all combos of abc.
> cat = 5*2*71 = 710. 710 is unique to all combos of act.
> deal = 7*11*2*37 = 5698. 5698 is unique to all combos of adel.
> astro = 27276638, which is unique to all combos of aorst.
That's sort of what I started my routine with, not the slower one I grabbed
from the 'net and hooked up to the dictionary (it's not the author of that
routine's fault how I accessed it):
<https://imgur.com/a/4KzPvli>
Is that not what you're talking about?
> https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
>
>
> The program puts each of the 370K words and their prime factor into a
> data structure (I'm using a C struct which accomodates different data
> types). Then it checks the prime factor of the input word and finds
> all pf matches in the data where the word is different.
>
> Searching for anagrams of 'astro'...
> astor ratos roast rotas taros toras
> 6 anagram(s) found in 0.0115s
>
>
> "Astor, my ratos! I'm roasting rotas and taros with a side of toras!
>
>
> > Even using that version with splice and shift:
> >
> > <https://imgur.com/a/ptQs7bC>
> >
> > Hook that up to the dictionary (and check it stupidly slowly like I
> > did) and it takes forever.
>
> Yeah, there's no need to generate permutations and check each one
> against the dictionary. Depending on the algorithm,that's wildly
> inefficient.
Bigtime.
> > Feeb's right, in fact, it's worse than
> > that, I'm just a wannabe code monkey. LOL!
>
> So is Feeb.
He knows a lot more than I'll ever know but I'll kick his ass in an air
guitar contest ;)
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2019-10-19 17:48 -0400 |
| Message-ID | <ixLqF.181780$GS.6736@fx37.iad> |
| In reply to | #536992 |
On 10/19/2019 3:19 PM, Steve Carroll wrote:
> On Saturday, October 19, 2019 at 12:53:00 PM UTC-6, DFS wrote:
>> On 10/19/2019 12:44 PM, Steve Carroll wrote:
>>> On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
>>
>>
>>>>> Node isn't quite that fast with the 'words_dictionary.json'
>>>>> file:
>>>>>
>>>>> <https://imgur.com/a/3VETXBJ>
>>>>
>>>> What ops are done with: const data =
>>>> require('./words_dictionary.json')
>>>>
>>>> Does it actually import the data from the text file into a memory
>>>> structure?
>>>
>>> I believe so.
>>>
>>>> My C program takes about 2.2 seconds to import the 370K words and
>>>> do the prime factors calculation.
>>>
>>> So it gets permutations but doesn't check 'em against a dictionary
>>> yet, which is where the real slow down would occur, I'd imagine.
>>
>>
>> It doesn't determine any permutations of the words. For each word it
>> calculates a 'prime factors' number based on the prime numbers assigned
>> to each letter of the word.
>>
>> a=2
>> b=3
>> c=5
>> d=7
>> e=11
>> ...
>>
>> cab = 5*2*3 = 30. 30 is unique to all combos of abc.
>> cat = 5*2*71 = 710. 710 is unique to all combos of act.
>> deal = 7*11*2*37 = 5698. 5698 is unique to all combos of adel.
>> astro = 27276638, which is unique to all combos of aorst.
>
> That's sort of what I started my routine with, not the slower one I grabbed
> from the 'net and hooked up to the dictionary (it's not the author of that
> routine's fault how I accessed it):
Careful, or you could ruin his reputation.
> <https://imgur.com/a/4KzPvli>
>
> Is that not what you're talking about?
That's it.
Now load each word from the dictionary (and it's 'prime factors' number)
into a memory structure. Then search against the pf number. It's
blazing fast in C, even on an unsorted list. I bet it will be fast in
JS, too, at which point you can shove it down Feeb's throat with a rusty
spoon.
>> https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
>>
>>
>> The program puts each of the 370K words and their prime factor into a
>> data structure (I'm using a C struct which accomodates different data
>> types). Then it checks the prime factor of the input word and finds
>> all pf matches in the data where the word is different.
>>
>> Searching for anagrams of 'astro'...
>> astor ratos roast rotas taros toras
>> 6 anagram(s) found in 0.0115s
>>
>>
>> "Astor, my ratos! I'm roasting rotas and taros with a side of toras!
>>
>>
>>> Even using that version with splice and shift:
>>>
>>> <https://imgur.com/a/ptQs7bC>
>>>
>>> Hook that up to the dictionary (and check it stupidly slowly like I
>>> did) and it takes forever.
>>
>> Yeah, there's no need to generate permutations and check each one
>> against the dictionary. Depending on the algorithm,that's wildly
>> inefficient.
>
> Bigtime.
Let me show you something interesting.
===========================================
$ anagrams words_alpha.txt roast
loading data...
1.1136s to load 370106 words
Contents of struct (word, pf)
0. a 2
1. aa 4
2. aaa 8
3. aah 76
4. aahed 5852
5. aahing 1277788
6. aahs 5092
7. aal 148
8. aalii 78292
9. aaliis 5245564
370096. zwanziger 19103747476418
370097. zwieback 1972436070
370098. zwiebacks 132153216690
370099. zwieselite 1038886419549253
370100. zwinglian 10315082135494
370101. zwinglianism 651717204402646400
370102. zwinglianist 1128583451526534000
370103. zwitter 652178563399
370104. zwitterion 30315216162475716
370105. zwitterionic 3486249858684707300
Searching for anagrams of 'roast'...
astor ratos rotas taros toras
5 anagram(s) found in 0.0055s
Done
===========================================
The load and search times are HALF what they were a little earlier today.
This morning I had messed with the clock multipliers in my BIOS, and I
just now reset them back to what they've been for years.
The code is now finding all the anagrams in 5.5/1000ths of a second.
Holy Shith! Pretty soon I'll be moving back in time!
And it's still not as efficient as possible, because it's making 370K
prime factor comparisons, even if there's only one anagram found.
Most of those comparisons are fruitless because the numeric data is
unsorted. If I can figure out how to sort that data and break from the
loop once the pf in the data > the pf of the searchword, the time will
drop a LOT.
Hey, I'm glad you're working on this, too. It's much more fun when
several of us are hacking on an idea at the same time, using different tech.
>>> Feeb's right, in fact, it's worse than
>>> that, I'm just a wannabe code monkey. LOL!
>>
>> So is Feeb.
>
> He knows a lot more than I'll ever know
Doesn't do any good if you can't express what you know in code.
> but I'll kick his ass in an air
> guitar contest ;)
Start thinking about your cola medley of Christmas tunes on guitar.
Flattie gave us one on piano a few years ago.
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2019-10-19 22:22 +0000 |
| Message-ID | <suba9903ta.y3@rooftop.invalid> |
| In reply to | #536996 |
DFS <nospam@dfs.com> wrote:
> On 10/19/2019 3:19 PM, Steve Carroll wrote:
>> On Saturday, October 19, 2019 at 12:53:00 PM UTC-6, DFS wrote:
>>> On 10/19/2019 12:44 PM, Steve Carroll wrote:
>>>> On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
>>>
>>>
>>>>>> Node isn't quite that fast with the 'words_dictionary.json'
>>>>>> file:
>>>>>>
>>>>>> <https://imgur.com/a/3VETXBJ>
>>>>>
>>>>> What ops are done with: const data =
>>>>> require('./words_dictionary.json')
>>>>>
>>>>> Does it actually import the data from the text file into a memory
>>>>> structure?
>>>>
>>>> I believe so.
>>>>
>>>>> My C program takes about 2.2 seconds to import the 370K words and
>>>>> do the prime factors calculation.
>>>>
>>>> So it gets permutations but doesn't check 'em against a dictionary
>>>> yet, which is where the real slow down would occur, I'd imagine.
>>>
>>>
>>> It doesn't determine any permutations of the words. For each word it
>>> calculates a 'prime factors' number based on the prime numbers assigned
>>> to each letter of the word.
>>>
>>> a=2
>>> b=3
>>> c=5
>>> d=7
>>> e=11
>>> ...
>>>
>>> cab = 5*2*3 = 30. 30 is unique to all combos of abc.
>>> cat = 5*2*71 = 710. 710 is unique to all combos of act.
>>> deal = 7*11*2*37 = 5698. 5698 is unique to all combos of adel.
>>> astro = 27276638, which is unique to all combos of aorst.
>>
>> That's sort of what I started my routine with, not the slower one I grabbed
>> from the 'net and hooked up to the dictionary (it's not the author of that
>> routine's fault how I accessed it):
>
> Careful, or you could ruin his reputation.
>
>
>
>> <https://imgur.com/a/4KzPvli>
>>
>> Is that not what you're talking about?
>
> That's it.
>
> Now load each word from the dictionary (and it's 'prime factors' number)
> into a memory structure. Then search against the pf number. It's
> blazing fast in C, even on an unsorted list. I bet it will be fast in
> JS, too, at which point you can shove it down Feeb's throat with a rusty
> spoon.
>
>
>
>>> https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
>>>
>>>
>>> The program puts each of the 370K words and their prime factor into a
>>> data structure (I'm using a C struct which accomodates different data
>>> types). Then it checks the prime factor of the input word and finds
>>> all pf matches in the data where the word is different.
>>>
>>> Searching for anagrams of 'astro'...
>>> astor ratos roast rotas taros toras
>>> 6 anagram(s) found in 0.0115s
>>>
>>>
>>> "Astor, my ratos! I'm roasting rotas and taros with a side of toras!
>>>
>>>
>>>> Even using that version with splice and shift:
>>>>
>>>> <https://imgur.com/a/ptQs7bC>
>>>>
>>>> Hook that up to the dictionary (and check it stupidly slowly like I
>>>> did) and it takes forever.
>>>
>>> Yeah, there's no need to generate permutations and check each one
>>> against the dictionary. Depending on the algorithm,that's wildly
>>> inefficient.
>>
>> Bigtime.
>
>
> Let me show you something interesting.
>
> ===========================================
> $ anagrams words_alpha.txt roast
>
> loading data...
> 1.1136s to load 370106 words
>
> Contents of struct (word, pf)
> 0. a 2
> 1. aa 4
> 2. aaa 8
> 3. aah 76
> 4. aahed 5852
> 5. aahing 1277788
> 6. aahs 5092
> 7. aal 148
> 8. aalii 78292
> 9. aaliis 5245564
> 370096. zwanziger 19103747476418
> 370097. zwieback 1972436070
> 370098. zwiebacks 132153216690
> 370099. zwieselite 1038886419549253
> 370100. zwinglian 10315082135494
> 370101. zwinglianism 651717204402646400
> 370102. zwinglianist 1128583451526534000
> 370103. zwitter 652178563399
> 370104. zwitterion 30315216162475716
> 370105. zwitterionic 3486249858684707300
>
> Searching for anagrams of 'roast'...
> astor ratos rotas taros toras
> 5 anagram(s) found in 0.0055s
> Done
> ===========================================
>
> The load and search times are HALF what they were a little earlier today.
>
> This morning I had messed with the clock multipliers in my BIOS, and I
> just now reset them back to what they've been for years.
>
> The code is now finding all the anagrams in 5.5/1000ths of a second.
> Holy Shith! Pretty soon I'll be moving back in time!
>
> And it's still not as efficient as possible, because it's making 370K
> prime factor comparisons, even if there's only one anagram found.
>
> Most of those comparisons are fruitless because the numeric data is
> unsorted. If I can figure out how to sort that data and break from the
> loop once the pf in the data > the pf of the searchword, the time will
> drop a LOT.
>
> Hey, I'm glad you're working on this, too. It's much more fun when
> several of us are hacking on an idea at the same time, using different tech.
>
>
>
>>>> Feeb's right, in fact, it's worse than
>>>> that, I'm just a wannabe code monkey. LOL!
>>>
>>> So is Feeb.
>>
>> He knows a lot more than I'll ever know
>
> Doesn't do any good if you can't express what you know in code.
>
>
>> but I'll kick his ass in an air
>> guitar contest ;)
>
>
> Start thinking about your cola medley of Christmas tunes on guitar.
> Flattie gave us one on piano a few years ago.
>
AN(6) Games Manual AN(6)
NAME
an - Anagram generator
SYNOPSIS
an [-w] [-c string] [-d dictionary] [-l number_words] [-m word_length]
[-u string] [-n number_anagrams] [-h] [-v] [--words] [--contain string]
[--dict dictionary] [--length number_words] [--minimum word_length]
[--used string] [--number number_anagrams] [--help] [--version] PHRASE
DESCRIPTION
an finds all anagrams which can be made from the letters in PHRASE, us???
ing words in the specified dictionary. The default is to use
/usr/share/dict/words.
OPTIONS
-w, --words
Print words that the letters in PHRASE can make, then exit.
-c, --contain string
Only print anagrams which contain string.
...
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2019-10-19 22:27 +0000 |
| Message-ID | <subz00b03g.ah@rooftop.invalid> |
| In reply to | #536997 |
owl <owl@rooftop.invalid> wrote:
> DFS <nospam@dfs.com> wrote:
>> Start thinking about your cola medley of Christmas tunes on guitar.
>> Flattie gave us one on piano a few years ago.
>>
>
> AN(6) Games Manual AN(6)
>
> NAME
> an - Anagram generator
>
> SYNOPSIS
> an [-w] [-c string] [-d dictionary] [-l number_words] [-m word_length]
> [-u string] [-n number_anagrams] [-h] [-v] [--words] [--contain string]
> [--dict dictionary] [--length number_words] [--minimum word_length]
> [--used string] [--number number_anagrams] [--help] [--version] PHRASE
>
> DESCRIPTION
> an finds all anagrams which can be made from the letters in PHRASE, us???
> ing words in the specified dictionary. The default is to use
> /usr/share/dict/words.
>
> OPTIONS
> -w, --words
> Print words that the letters in PHRASE can make, then exit.
>
> -c, --contain string
> Only print anagrams which contain string.
>
> ...
>
<quote>
THANKS
Richard Jones (richard@deep-thought.org)
- Coding and algorithm design of original version.
Julian Assange (proff@suburbia.net)
- Algorithm design of original version.
</quote>
It probably leaks.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2019-10-19 18:54 -0400 |
| Message-ID | <svMqF.193965$kQ.163889@fx40.iad> |
| In reply to | #536997 |
On 10/19/2019 6:22 PM, owl wrote: > > AN(6) Games Manual AN(6) > > NAME > an - Anagram generator > > SYNOPSIS > an [-w] [-c string] [-d dictionary] [-l number_words] [-m word_length] > [-u string] [-n number_anagrams] [-h] [-v] [--words] [--contain string] > [--dict dictionary] [--length number_words] [--minimum word_length] > [--used string] [--number number_anagrams] [--help] [--version] PHRASE > > DESCRIPTION > an finds all anagrams which can be made from the letters in PHRASE, us??? > ing words in the specified dictionary. The default is to use > /usr/share/dict/words. > > OPTIONS > -w, --words > Print words that the letters in PHRASE can make, then exit. > > -c, --contain string > Only print anagrams which contain string. > > ... http://fatphil.org/words/an.html an.c = 1697 lines "The 'an' program was originally written by Richard Jones, with contributions by Julian Assange." an 'let me out'
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2019-10-19 15:59 -0700 |
| Message-ID | <0a7211c1-fbeb-42ac-ad01-67912482d0a0@googlegroups.com> |
| In reply to | #536997 |
On Saturday, October 19, 2019 at 4:22:50 PM UTC-6, owl wrote:
> DFS <nospam@dfs.com> wrote:
> > On 10/19/2019 3:19 PM, Steve Carroll wrote:
> >> On Saturday, October 19, 2019 at 12:53:00 PM UTC-6, DFS wrote:
> >>> On 10/19/2019 12:44 PM, Steve Carroll wrote:
> >>>> On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
> >>>
> >>>
> >>>>>> Node isn't quite that fast with the 'words_dictionary.json'
> >>>>>> file:
> >>>>>>
> >>>>>> <https://imgur.com/a/3VETXBJ>
> >>>>>
> >>>>> What ops are done with: const data =
> >>>>> require('./words_dictionary.json')
> >>>>>
> >>>>> Does it actually import the data from the text file into a memory
> >>>>> structure?
> >>>>
> >>>> I believe so.
> >>>>
> >>>>> My C program takes about 2.2 seconds to import the 370K words and
> >>>>> do the prime factors calculation.
> >>>>
> >>>> So it gets permutations but doesn't check 'em against a dictionary
> >>>> yet, which is where the real slow down would occur, I'd imagine.
> >>>
> >>>
> >>> It doesn't determine any permutations of the words. For each word it
> >>> calculates a 'prime factors' number based on the prime numbers assigned
> >>> to each letter of the word.
> >>>
> >>> a=2
> >>> b=3
> >>> c=5
> >>> d=7
> >>> e=11
> >>> ...
> >>>
> >>> cab = 5*2*3 = 30. 30 is unique to all combos of abc.
> >>> cat = 5*2*71 = 710. 710 is unique to all combos of act.
> >>> deal = 7*11*2*37 = 5698. 5698 is unique to all combos of adel.
> >>> astro = 27276638, which is unique to all combos of aorst.
> >>
> >> That's sort of what I started my routine with, not the slower one I grabbed
> >> from the 'net and hooked up to the dictionary (it's not the author of that
> >> routine's fault how I accessed it):
> >
> > Careful, or you could ruin his reputation.
> >
> >
> >
> >> <https://imgur.com/a/4KzPvli>
> >>
> >> Is that not what you're talking about?
> >
> > That's it.
> >
> > Now load each word from the dictionary (and it's 'prime factors' number)
> > into a memory structure. Then search against the pf number. It's
> > blazing fast in C, even on an unsorted list. I bet it will be fast in
> > JS, too, at which point you can shove it down Feeb's throat with a rusty
> > spoon.
> >
> >
> >
> >>> https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
> >>>
> >>>
> >>> The program puts each of the 370K words and their prime factor into a
> >>> data structure (I'm using a C struct which accomodates different data
> >>> types). Then it checks the prime factor of the input word and finds
> >>> all pf matches in the data where the word is different.
> >>>
> >>> Searching for anagrams of 'astro'...
> >>> astor ratos roast rotas taros toras
> >>> 6 anagram(s) found in 0.0115s
> >>>
> >>>
> >>> "Astor, my ratos! I'm roasting rotas and taros with a side of toras!
> >>>
> >>>
> >>>> Even using that version with splice and shift:
> >>>>
> >>>> <https://imgur.com/a/ptQs7bC>
> >>>>
> >>>> Hook that up to the dictionary (and check it stupidly slowly like I
> >>>> did) and it takes forever.
> >>>
> >>> Yeah, there's no need to generate permutations and check each one
> >>> against the dictionary. Depending on the algorithm,that's wildly
> >>> inefficient.
> >>
> >> Bigtime.
> >
> >
> > Let me show you something interesting.
> >
> > ===========================================
> > $ anagrams words_alpha.txt roast
> >
> > loading data...
> > 1.1136s to load 370106 words
> >
> > Contents of struct (word, pf)
> > 0. a 2
> > 1. aa 4
> > 2. aaa 8
> > 3. aah 76
> > 4. aahed 5852
> > 5. aahing 1277788
> > 6. aahs 5092
> > 7. aal 148
> > 8. aalii 78292
> > 9. aaliis 5245564
> > 370096. zwanziger 19103747476418
> > 370097. zwieback 1972436070
> > 370098. zwiebacks 132153216690
> > 370099. zwieselite 1038886419549253
> > 370100. zwinglian 10315082135494
> > 370101. zwinglianism 651717204402646400
> > 370102. zwinglianist 1128583451526534000
> > 370103. zwitter 652178563399
> > 370104. zwitterion 30315216162475716
> > 370105. zwitterionic 3486249858684707300
> >
> > Searching for anagrams of 'roast'...
> > astor ratos rotas taros toras
> > 5 anagram(s) found in 0.0055s
> > Done
> > ===========================================
> >
> > The load and search times are HALF what they were a little earlier today.
> >
> > This morning I had messed with the clock multipliers in my BIOS, and I
> > just now reset them back to what they've been for years.
> >
> > The code is now finding all the anagrams in 5.5/1000ths of a second.
> > Holy Shith! Pretty soon I'll be moving back in time!
> >
> > And it's still not as efficient as possible, because it's making 370K
> > prime factor comparisons, even if there's only one anagram found.
> >
> > Most of those comparisons are fruitless because the numeric data is
> > unsorted. If I can figure out how to sort that data and break from the
> > loop once the pf in the data > the pf of the searchword, the time will
> > drop a LOT.
> >
> > Hey, I'm glad you're working on this, too. It's much more fun when
> > several of us are hacking on an idea at the same time, using different tech.
> >
> >
> >
> >>>> Feeb's right, in fact, it's worse than
> >>>> that, I'm just a wannabe code monkey. LOL!
> >>>
> >>> So is Feeb.
> >>
> >> He knows a lot more than I'll ever know
> >
> > Doesn't do any good if you can't express what you know in code.
> >
> >
> >> but I'll kick his ass in an air
> >> guitar contest ;)
> >
> >
> > Start thinking about your cola medley of Christmas tunes on guitar.
> > Flattie gave us one on piano a few years ago.
> >
>
> AN(6) Games Manual AN(6)
>
> NAME
> an - Anagram generator
>
> SYNOPSIS
> an [-w] [-c string] [-d dictionary] [-l number_words] [-m word_length]
> [-u string] [-n number_anagrams] [-h] [-v] [--words] [--contain string]
> [--dict dictionary] [--length number_words] [--minimum word_length]
> [--used string] [--number number_anagrams] [--help] [--version] PHRASE
>
> DESCRIPTION
> an finds all anagrams which can be made from the letters in PHRASE, us???
> ing words in the specified dictionary. The default is to use
> /usr/share/dict/words.
>
> OPTIONS
> -w, --words
> Print words that the letters in PHRASE can make, then exit.
>
> -c, --contain string
> Only print anagrams which contain string.
>
> ...
"Here are the modified an.c and Makefile files, and precompiled binaries,
for windoze, for linux/x86, and binary for Nokia n900 (same source as x86
obviously). Note that the source an.c is identical in the two top packages."
<http://fatphil.org/words/an.html>
("windoze"... but no 'Mack' version)
[toc] | [prev] | [next] | [standalone]
| From | vallor <vallor@cultnix.org> |
|---|---|
| Date | 2019-10-20 03:39 +0000 |
| Message-ID | <h1237cFqt7sU4@mid.individual.net> |
| In reply to | #537001 |
On Sat, 19 Oct 2019 15:59:31 -0700, Steve Carroll wrote:
> On Saturday, October 19, 2019 at 4:22:50 PM UTC-6, owl wrote:
>> DFS <nospam@dfs.com> wrote:
>> > On 10/19/2019 3:19 PM, Steve Carroll wrote:
>> >> On Saturday, October 19, 2019 at 12:53:00 PM UTC-6, DFS wrote:
>> >>> On 10/19/2019 12:44 PM, Steve Carroll wrote:
>> >>>> On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
>> >>>
>> >>>
>> >>>>>> Node isn't quite that fast with the 'words_dictionary.json'
>> >>>>>> file:
>> >>>>>>
>> >>>>>> <https://imgur.com/a/3VETXBJ>
>> >>>>>
>> >>>>> What ops are done with: const data =
>> >>>>> require('./words_dictionary.json')
>> >>>>>
>> >>>>> Does it actually import the data from the text file into a memory
>> >>>>> structure?
>> >>>>
>> >>>> I believe so.
>> >>>>
>> >>>>> My C program takes about 2.2 seconds to import the 370K words and
>> >>>>> do the prime factors calculation.
>> >>>>
>> >>>> So it gets permutations but doesn't check 'em against a dictionary
>> >>>> yet, which is where the real slow down would occur, I'd imagine.
>> >>>
>> >>>
>> >>> It doesn't determine any permutations of the words. For each word
>> >>> it calculates a 'prime factors' number based on the prime numbers
>> >>> assigned to each letter of the word.
>> >>>
>> >>> a=2 b=3 c=5 d=7 e=11 ...
>> >>>
>> >>> cab = 5*2*3 = 30. 30 is unique to all combos of abc.
>> >>> cat = 5*2*71 = 710. 710 is unique to all combos of act.
>> >>> deal = 7*11*2*37 = 5698. 5698 is unique to all combos of adel.
>> >>> astro = 27276638, which is unique to all combos of aorst.
>> >>
>> >> That's sort of what I started my routine with, not the slower one I
>> >> grabbed from the 'net and hooked up to the dictionary (it's not the
>> >> author of that routine's fault how I accessed it):
>> >
>> > Careful, or you could ruin his reputation.
>> >
>> >
>> >
>> >> <https://imgur.com/a/4KzPvli>
>> >>
>> >> Is that not what you're talking about?
>> >
>> > That's it.
>> >
>> > Now load each word from the dictionary (and it's 'prime factors'
>> > number) into a memory structure. Then search against the pf number.
>> > It's blazing fast in C, even on an unsorted list. I bet it will be
>> > fast in JS, too, at which point you can shove it down Feeb's throat
>> > with a rusty spoon.
>> >
>> >
>> >
>> >>> https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
>> >>>
>> >>>
>> >>> The program puts each of the 370K words and their prime factor into
>> >>> a data structure (I'm using a C struct which accomodates different
>> >>> data types). Then it checks the prime factor of the input word and
>> >>> finds all pf matches in the data where the word is different.
>> >>>
>> >>> Searching for anagrams of 'astro'...
>> >>> astor ratos roast rotas taros toras 6 anagram(s) found in 0.0115s
>> >>>
>> >>>
>> >>> "Astor, my ratos! I'm roasting rotas and taros with a side of
>> >>> toras!
>> >>>
>> >>>
>> >>>> Even using that version with splice and shift:
>> >>>>
>> >>>> <https://imgur.com/a/ptQs7bC>
>> >>>>
>> >>>> Hook that up to the dictionary (and check it stupidly slowly like
>> >>>> I did) and it takes forever.
>> >>>
>> >>> Yeah, there's no need to generate permutations and check each one
>> >>> against the dictionary. Depending on the algorithm,that's wildly
>> >>> inefficient.
>> >>
>> >> Bigtime.
>> >
>> >
>> > Let me show you something interesting.
>> >
>> > ===========================================
>> > $ anagrams words_alpha.txt roast
>> >
>> > loading data...
>> > 1.1136s to load 370106 words
>> >
>> > Contents of struct (word, pf)
>> > 0. a 2 1. aa 4 2. aaa
>> > 8 3. aah 76 4. aahed
>> > 5852 5. aahing 1277788 6. aahs
>> > 5092 7. aal 148 8. aalii 78292
>> > 9. aaliis 5245564 370096. zwanziger
>> > 19103747476418 370097. zwieback 1972436070 370098.
>> > zwiebacks 132153216690 370099. zwieselite
>> > 1038886419549253 370100. zwinglian 10315082135494
>> > 370101. zwinglianism 651717204402646400 370102.
>> > zwinglianist 1128583451526534000 370103. zwitter
>> > 652178563399 370104. zwitterion 30315216162475716
>> > 370105. zwitterionic 3486249858684707300
>> >
>> > Searching for anagrams of 'roast'...
>> > astor ratos rotas taros toras 5 anagram(s) found in 0.0055s Done
>> > ===========================================
>> >
>> > The load and search times are HALF what they were a little earlier
>> > today.
>> >
>> > This morning I had messed with the clock multipliers in my BIOS, and
>> > I just now reset them back to what they've been for years.
>> >
>> > The code is now finding all the anagrams in 5.5/1000ths of a second.
>> > Holy Shith! Pretty soon I'll be moving back in time!
>> >
>> > And it's still not as efficient as possible, because it's making 370K
>> > prime factor comparisons, even if there's only one anagram found.
>> >
>> > Most of those comparisons are fruitless because the numeric data is
>> > unsorted. If I can figure out how to sort that data and break from
>> > the loop once the pf in the data > the pf of the searchword, the time
>> > will drop a LOT.
>> >
>> > Hey, I'm glad you're working on this, too. It's much more fun when
>> > several of us are hacking on an idea at the same time, using
>> > different tech.
>> >
>> >
>> >
>> >>>> Feeb's right, in fact, it's worse than that, I'm just a wannabe
>> >>>> code monkey. LOL!
>> >>>
>> >>> So is Feeb.
>> >>
>> >> He knows a lot more than I'll ever know
>> >
>> > Doesn't do any good if you can't express what you know in code.
>> >
>> >
>> >> but I'll kick his ass in an air guitar contest ;)
>> >
>> >
>> > Start thinking about your cola medley of Christmas tunes on guitar.
>> > Flattie gave us one on piano a few years ago.
>> >
>> >
>> AN(6) Games Manual
>> AN(6)
>>
>> NAME
>> an - Anagram generator
>>
>> SYNOPSIS
>> an [-w] [-c string] [-d dictionary] [-l number_words] [-m
>> word_length] [-u string] [-n number_anagrams] [-h] [-v]
>> [--words] [--contain string] [--dict dictionary] [--length
>> number_words] [--minimum word_length] [--used string] [--number
>> number_anagrams] [--help] [--version] PHRASE
>>
>> DESCRIPTION
>> an finds all anagrams which can be made from the letters in
>> PHRASE, us???
>> ing words in the specified dictionary. The default is
>> to use /usr/share/dict/words.
>>
>> OPTIONS
>> -w, --words
>> Print words that the letters in PHRASE can make, then
>> exit.
>>
>> -c, --contain string
>> Only print anagrams which contain string.
>>
>> ...
>
> "Here are the modified an.c and Makefile files, and precompiled
> binaries, for windoze, for linux/x86, and binary for Nokia n900 (same
> source as x86 obviously). Note that the source an.c is identical in the
> two top packages."
>
> <http://fatphil.org/words/an.html>
> ("windoze"... but no 'Mack' version)
It might be in "ports", or whatever that system is that lets you get FOSS
for MacOS.
Going to look for it using the wife's iMac...haven't played with whatever
the ports system is for a while, now.
--
-v | Two-time winner of the Checky™.
[toc] | [prev] | [next] | [standalone]
| From | vallor <vallor@cultnix.org> |
|---|---|
| Date | 2019-10-20 04:10 +0000 |
| Message-ID | <h1251jFqt7sU5@mid.individual.net> |
| In reply to | #537004 |
On Sun, 20 Oct 2019 03:39:24 +0000, vallor wrote:
>> <http://fatphil.org/words/an.html> ("windoze"... but no 'Mack' version)
>
> It might be in "ports", or whatever that system is that lets you get
> FOSS for MacOS.
>
> Going to look for it using the wife's iMac...haven't played with
> whatever the ports system is for a while, now.
I didn't find it in macports, but I did find one called "wordplay"
https://www.macports.org
...then
_[/Users/x/src]_(x@x)_
$ sudo port install wordplay
Password:
---> Fetching archive for wordplay
---> Attempting to fetch wordplay-7.22_1.darwin_18.x86_64.tbz2 from
https://packages.macports.org/wordplay
---> Attempting to fetch wordplay-7.22_1.darwin_18.x86_64.tbz2.rmd160
from https://packages.macports.org/wordplay
---> Installing wordplay @7.22_1
---> Activating wordplay @7.22_1
---> Cleaning wordplay
---> Scanning binaries for linking errors
---> No broken files found.
---> No broken ports found.
_[/Users/x/src]_(x@x)_
$ wordplay wine
Wordplay Version 7.22 03-20-96, 1991 by Evans A Criswell
University of Alabama in Huntsville criswell@cs.uah.edu
Candidate word list : no
Anagram Generation : yes
Adjacent duplicates : no
Vowel-free words OK : no
Max anagram depth : 32
Maximum word length : 128
Minimum word length : 0
Word list file : "/opt/local/share/wordplay/words721.txt"
String to anagram : "WINE"
Initializing. Please wait while words are being loaded
and unnecessary words are being filtered out ...
7 words loaded (4096 byte block). Longest kept: 4 letters.
Anagrams found:
1. WINE
2. NEW I
3. WE IN
--
-v | Two-time winner of the Checky™.
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2019-10-20 09:47 -0700 |
| Message-ID | <e18e77d7-1c67-4879-868e-a726103797e7@googlegroups.com> |
| In reply to | #537006 |
On Saturday, October 19, 2019 at 10:10:30 PM UTC-6, vallor wrote:
> On Sun, 20 Oct 2019 03:39:24 +0000, vallor wrote:
>
> >> <http://fatphil.org/words/an.html> ("windoze"... but no 'Mack' version)
> >
> > It might be in "ports", or whatever that system is that lets you get
> > FOSS for MacOS.
> >
> > Going to look for it using the wife's iMac...haven't played with
> > whatever the ports system is for a while, now.
>
> I didn't find it in macports, but I did find one called "wordplay"
>
> https://www.macports.org
>
> ...then
>
> _[/Users/x/src]_(x@x)_
> $ sudo port install wordplay
> Password:
> ---> Fetching archive for wordplay
> ---> Attempting to fetch wordplay-7.22_1.darwin_18.x86_64.tbz2 from
> https://packages.macports.org/wordplay
> ---> Attempting to fetch wordplay-7.22_1.darwin_18.x86_64.tbz2.rmd160
> from https://packages.macports.org/wordplay
> ---> Installing wordplay @7.22_1
> ---> Activating wordplay @7.22_1
> ---> Cleaning wordplay
> ---> Scanning binaries for linking errors
> ---> No broken files found.
> ---> No broken ports found.
>
> _[/Users/x/src]_(x@x)_
> $ wordplay wine
> Wordplay Version 7.22 03-20-96, 1991 by Evans A Criswell
> University of Alabama in Huntsville criswell@cs.uah.edu
>
>
> Candidate word list : no
> Anagram Generation : yes
> Adjacent duplicates : no
> Vowel-free words OK : no
>
> Max anagram depth : 32
> Maximum word length : 128
> Minimum word length : 0
>
> Word list file : "/opt/local/share/wordplay/words721.txt"
> String to anagram : "WINE"
>
>
> Initializing. Please wait while words are being loaded
> and unnecessary words are being filtered out ...
>
> 7 words loaded (4096 byte block). Longest kept: 4 letters.
>
> Anagrams found:
> 1. WINE
> 2. NEW I
> 3. WE IN
>
Thanks for that... I got it from Homebrew: "brew install wordplay" !
And Feeb's wrong again... it's not Wed. night bingo, it's scrabble ;)
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2019-10-19 15:54 -0700 |
| Message-ID | <83e3e940-188f-4f87-8108-a5e5bf04caef@googlegroups.com> |
| In reply to | #536996 |
On Saturday, October 19, 2019 at 3:49:05 PM UTC-6, DFS wrote: (snip) > > <https://imgur.com/a/4KzPvli> > > > > Is that not what you're talking about? > > That's it. > > Now load each word from the dictionary (and it's 'prime factors' number) > into a memory structure. So I need to use my getPrimes function to generate a product for each word in the dictionary and attach it to its associated word entry so I can reference it instead of the silliness I've been doing. > Then search against the pf number. No more crashing in node?! > It's blazing fast in C, even on an unsorted list. I bet it will be fast in > JS, too, at which point you can shove it down Feeb's throat with a rusty > spoon. Is there any room down there? Melzzzz just took a shot at him, he could be swollen for awhile ;) > >> https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic > >> > >> > >> The program puts each of the 370K words and their prime factor into a > >> data structure (I'm using a C struct which accomodates different data > >> types). Then it checks the prime factor of the input word and finds > >> all pf matches in the data where the word is different. > >> > >> Searching for anagrams of 'astro'... > >> astor ratos roast rotas taros toras > >> 6 anagram(s) found in 0.0115s > >> > >> > >> "Astor, my ratos! I'm roasting rotas and taros with a side of toras! > >> > >> > >>> Even using that version with splice and shift: > >>> > >>> <https://imgur.com/a/ptQs7bC> > >>> > >>> Hook that up to the dictionary (and check it stupidly slowly like I > >>> did) and it takes forever. > >> > >> Yeah, there's no need to generate permutations and check each one > >> against the dictionary. Depending on the algorithm,that's wildly > >> inefficient. > > > > Bigtime. > > > Let me show you something interesting. > > =========================================== > $ anagrams words_alpha.txt roast > > loading data... > 1.1136s to load 370106 words > > Contents of struct (word, pf) > 0. a 2 > 1. aa 4 > 2. aaa 8 > 3. aah 76 > 4. aahed 5852 > 5. aahing 1277788 > 6. aahs 5092 > 7. aal 148 > 8. aalii 78292 > 9. aaliis 5245564 > 370096. zwanziger 19103747476418 > 370097. zwieback 1972436070 > 370098. zwiebacks 132153216690 > 370099. zwieselite 1038886419549253 > 370100. zwinglian 10315082135494 > 370101. zwinglianism 651717204402646400 > 370102. zwinglianist 1128583451526534000 > 370103. zwitter 652178563399 > 370104. zwitterion 30315216162475716 > 370105. zwitterionic 3486249858684707300 This 'struct' thing still hasn't struck me... > Searching for anagrams of 'roast'... > astor ratos rotas taros toras > 5 anagram(s) found in 0.0055s > Done > =========================================== > > The load and search times are HALF what they were a little earlier today. > > This morning I had messed with the clock multipliers in my BIOS, and I > just now reset them back to what they've been for years. > > The code is now finding all the anagrams in 5.5/1000ths of a second. > Holy Shith! Pretty soon I'll be moving back in time! Somethin' seems fishy, doesn't it? Why is it this fast? > And it's still not as efficient as possible, because it's making 370K > prime factor comparisons, even if there's only one anagram found. > > Most of those comparisons are fruitless because the numeric data is > unsorted. If I can figure out how to sort that data and break from the > loop once the pf in the data > the pf of the searchword, the time will > drop a LOT. Fruitless comparisons... yeah, I have those down pat... and node doesn't like it a bit. > Hey, I'm glad you're working on this, too. It's much more fun when > several of us are hacking on an idea at the same time, using different tech. LOL! Dude, *you're* working on it. I'm like a guy trying to move around in a dark room holding a flashlight (you) while wearing a blind fold, missing one leg... and there's no foot on the other. > >>> Feeb's right, in fact, it's worse than > >>> that, I'm just a wannabe code monkey. LOL! > >> > >> So is Feeb. > > > > He knows a lot more than I'll ever know > > Doesn't do any good if you can't express what you know in code. I suspect he can. > > but I'll kick his ass in an air > > guitar contest ;) > > > Start thinking about your cola medley of Christmas tunes on guitar. > Flattie gave us one on piano a few years ago. LOL! Like that's gonna happen. What might be fun is if we had an X-mas jam, where the track was passed around and everyone contributed a bit. Fun... in a slit your throat, poke your eye out fashion. I wanna hear Feeb play a Frankenboard solo.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2019-10-20 19:12 -0400 |
| Message-ID | <WS5rF.23489$oU2.13398@fx21.iad> |
| In reply to | #536999 |
On 10/19/2019 6:54 PM, Steve Carroll wrote:
> On Saturday, October 19, 2019 at 3:49:05 PM UTC-6, DFS wrote:
>
> (snip)
>
>>> <https://imgur.com/a/4KzPvli>
>>>
>>> Is that not what you're talking about?
>>
>> That's it.
>>
>> Now load each word from the dictionary (and it's 'prime factors' number)
>> into a memory structure.
>
> So I need to use my getPrimes function to generate a product for each word
> in the dictionary and attach it to its associated word entry so I can reference
> it instead of the silliness I've been doing.
That's it. Put both pieces of info into an array, loop thru the array
seaching for the prime factor(s) matching the prime factor of your input
word, ie "players", check that the word in the array isn't also the
input word, and you're done.
>> Then search against the pf number.
>
> No more crashing in node?!
>
>> It's blazing fast in C, even on an unsorted list. I bet it will be fast in
>> JS, too, at which point you can shove it down Feeb's throat with a rusty
>> spoon.
>
> Is there any room down there? Melzzzz just took a shot at him, he could be
> swollen for awhile ;)
Melzzzzz carries Feeb's ass around with him, and hands parts of it back
to Feeb whenever he feels like.
>> Let me show you something interesting.
>>
>> ===========================================
>> $ anagrams words_alpha.txt roast
>>
>> loading data...
>> 1.1136s to load 370106 words
>>
>> Contents of struct (word, pf)
>> 0. a 2
>> 1. aa 4
>> 2. aaa 8
>> 3. aah 76
>> 4. aahed 5852
>> 5. aahing 1277788
>> 6. aahs 5092
>> 7. aal 148
>> 8. aalii 78292
>> 9. aaliis 5245564
>> 370096. zwanziger 19103747476418
>> 370097. zwieback 1972436070
>> 370098. zwiebacks 132153216690
>> 370099. zwieselite 1038886419549253
>> 370100. zwinglian 10315082135494
>> 370101. zwinglianism 651717204402646400
>> 370102. zwinglianist 1128583451526534000
>> 370103. zwitter 652178563399
>> 370104. zwitterion 30315216162475716
>> 370105. zwitterionic 3486249858684707300
>
> This 'struct' thing still hasn't struck me...
It's a C data structure used to store unrelated types of info:
struct student {
int id;
char *lastname;
char *firstname;
char *cellphone
int age;
float lunchmoney;
};
Fill it with data and it's like a db table residing in memory, but you
have to write a bunch of code to do anything with it.
In my anagram code it's simpler than that:
struct words {
char *word;
double wordpf;
};
The variable used to store the pf data is a double precision floating
point because the pf get so large - many quintillions and up.
hydroxydehydrocorticosterone 354994003426527000000000000000000000000000
Clearly you don't need such large numbers as a key to a table of only
370K entries, so rather than calculate potentially huge prime factors
you could create smaller hash values
https://en.wikipedia.org/wiki/Hash_function#Hashing_variable-length_data
https://stackoverflow.com/questions/14409466/simple-hash-functions
>> Searching for anagrams of 'roast'...
>> astor ratos rotas taros toras
>> 5 anagram(s) found in 0.0055s
>> Done
>> ===========================================
>>
>> The load and search times are HALF what they were a little earlier today.
>>
>> This morning I had messed with the clock multipliers in my BIOS, and I
>> just now reset them back to what they've been for years.
>>
>> The code is now finding all the anagrams in 5.5/1000ths of a second.
>> Holy Shith! Pretty soon I'll be moving back in time!
>
> Somethin' seems fishy, doesn't it? Why is it this fast?
I was thinking the same thing, but that's what the Windows
QueryPerformanceCounter() function says.
https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps
On my system the QueryPerformanceFrequency is 1310192. The reciprocal
(= the tick interval) is 0.000000763, which is 763 nanoseconds (the
smallest time interval that can be measured on my computer).
Back to the anagram program.
Finally, with the help of comp.lang.c gurus, the qsort() works!
0.3203s to qsort on prime factors
Contents of sorted struct (word, pf)
0. a 2
1. b 3
2. aa 4
3. c 5
4. ab 6
5. ba 6
6. d 7
7. aaa 8
8. bb 9
9. ac 10
370094. microspectrophotometrical 1410868750453570100000000000000000000
370095. immunoelectrophoretically 1789942497187722500000000000000000000
370096. superincomprehensibleness 2116343913154240100000000000000000000
370097. antidisestablishmentarianism
10816738360843397000000000000000000000
370098. microspectrophotometrically
5063607945377863500000000000000000000000
370099. dichlorodiphenyltrichloroetha
29387878280664888000000000000000000000000
370100. hydroxydesoxycorticosterone
260918185927817140000000000000000000000000
370101. hydroxydehydrocorticosterone
354994003426527000000000000000000000000000
370102. cyclotrimethylenetrinitramine
1816546187380119700000000000000000000000000
370103. trinitrophenylmethylnitramine
286030059853623620000000000000000000000000000
Since the data is sorted you can now add a break statement when the
search routine reaches prime factor values greater than the prime factor
of the search word:
Option 1:
for 0 to array size
if array pf < search pf then continue
if array pf = search pf then
if array(word) <> searchword then
anagram match
continue
if array pf > search pf then break
Option 2:
for 0 to array size
if array pf < search pf then
continue
elseif array pf = search pf then
if array(word) <> searchword then
anagram match
elseif array pf > search pf then
break
Either option will execute the same number of comparisons. I like
Option 1 (no elses).
Previous (data sorted by word)
Searching for anagrams of 'players'...
asperly pyrales parsley parleys replays sparely splayer
7 anagram(s) found in 0.0062s
Now (data sorted by prime factor)
Searching for anagrams of 'players'...
asperly parleys parsley pyrales replays sparely splayer
7 anagram(s) found in 0.0036s
42% faster. More for small words early in the alphabet.
Searching for anagrams of 'cat'...
act
1 anagram(s) found in 0.00012s
1/10,000th of a second. Instantaneous.
on the other end
Searching for anagrams of 'trinitrophenylmethylnitramine'...
0 anagram(s) found in 0.01329s
13/1000ths of a second. Not too shabby for a senior citizen Intel chip
(10-year-old i5-750).
>> And it's still not as efficient as possible, because it's making 370K
>> prime factor comparisons, even if there's only one anagram found.
>>
>> Most of those comparisons are fruitless because the numeric data is
>> unsorted. If I can figure out how to sort that data and break from the
>> loop once the pf in the data > the pf of the searchword, the time will
>> drop a LOT.
>
> Fruitless comparisons... yeah, I have those down pat... and node doesn't
> like it a bit.
The vid <https://streamable.com/5hupl> is gone but earlier you said:
"The 7 letter one took like 5 minutes ("asperly" and "pyrales"?)!"
For real?
>> Hey, I'm glad you're working on this, too. It's much more fun when
>> several of us are hacking on an idea at the same time, using different tech.
>
> LOL! Dude, *you're* working on it. I'm like a guy trying to move around in
> a dark room holding a flashlight (you) while wearing a blind fold, missing
> one leg... and there's no foot on the other.
Keep at it and you'll soon have a JS anagram finder. The first in
cola's history.
>>>>> Feeb's right, in fact, it's worse than
>>>>> that, I'm just a wannabe code monkey. LOL!
>>>>
>>>> So is Feeb.
>>>
>>> He knows a lot more than I'll ever know
>>
>> Doesn't do any good if you can't express what you know in code.
>
> I suspect he can.
>
>> > but I'll kick his ass in an air
>>> guitar contest ;)
>>
>>
>> Start thinking about your cola medley of Christmas tunes on guitar.
>> Flattie gave us one on piano a few years ago.
>
> LOL! Like that's gonna happen.
Give us 10 seconds each of your guitar interpretation of some popular
Christmas songs. Electric or acoustic doesn't matter. It'll be great.
> What might be fun is if we had an X-mas
> jam, where the track was passed around and everyone contributed a bit.
> Fun... in a slit your throat, poke your eye out fashion.
ha! I shudder at the thought of such a track. I'll try to drop a
Bonham Purdie shuffle in to give it some class.
https://www.youtube.com/watch?v=bQqD1F053gk
> I wanna hear Feeb play a Frankenboard solo.
Feeb wants to be Yanni.
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <"Steve Carroll"@noSPAM.none> |
|---|---|
| Date | 2019-10-21 15:02 +0000 |
| Message-ID | <qokha3$qr7$1@dont-email.me> |
| In reply to | #537062 |
On 2019-10-20, DFS <nospam@dfs.com> wrote:
> On 10/19/2019 6:54 PM, Steve Carroll wrote:
>> On Saturday, October 19, 2019 at 3:49:05 PM UTC-6, DFS wrote:
>>
>> (snip)
>>
>>>> <https://imgur.com/a/4KzPvli>
>>>>
>>>> Is that not what you're talking about?
>>>
>>> That's it.
>>>
>>> Now load each word from the dictionary (and it's 'prime factors' number)
>>> into a memory structure.
>>
>> So I need to use my getPrimes function to generate a product for each word
>> in the dictionary and attach it to its associated word entry so I can reference
>> it instead of the silliness I've been doing.
>
> That's it. Put both pieces of info into an array, loop thru the array
> seaching for the prime factor(s) matching the prime factor of your input
> word, ie "players", check that the word in the array isn't also the
> input word, and you're done.
I think I'm already done ;) I did gen up an example but it's a singular,
flat object, not an array of objects, which seems more like what you're
talking about as done in JS (shown below): <https://imgur.com/a/hy7FDme>
---
const list = [
{"abc": 30},
{"zs": 6767}
];
---
(snip)
> The variable used to store the pf data is a double precision floating
> point because the pf get so large - many quintillions and up.
>
> hydroxydehydrocorticosterone 354994003426527000000000000000000000000000
Vallor just pointed me to the anagram program, 'wordplay', for the Mac
and I permanently replaced it's miniscule dictionary with the one we've
been using and I noticed that word was it in (along with a bunch of
other 'longest single word anagram' entries). Somethin' tells me that JS
is gonna do what Feeb keeps tellin' me it'll do when face with REAL MAN
work ;)
> Clearly you don't need such large numbers as a key to a table of only
> 370K entries, so rather than calculate potentially huge prime factors
> you could create smaller hash values
>
> https://en.wikipedia.org/wiki/Hash_function#Hashing_variable-length_data
> https://stackoverflow.com/questions/14409466/simple-hash-functions
A headache... and it' barely 9 a.m.
>>> Searching for anagrams of 'roast'...
>>> astor ratos rotas taros toras
>>> 5 anagram(s) found in 0.0055s
>>> Done
>>> ===========================================
>>>
>>> The load and search times are HALF what they were a little earlier today.
>>>
>>> This morning I had messed with the clock multipliers in my BIOS, and I
>>> just now reset them back to what they've been for years.
>>>
>>> The code is now finding all the anagrams in 5.5/1000ths of a second.
>>> Holy Shith! Pretty soon I'll be moving back in time!
>>
>> Somethin' seems fishy, doesn't it? Why is it this fast?
>
>
> I was thinking the same thing, but that's what the Windows
> QueryPerformanceCounter() function says.
>
> https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps
>
> On my system the QueryPerformanceFrequency is 1310192. The reciprocal
> (= the tick interval) is 0.000000763, which is 763 nanoseconds (the
> smallest time interval that can be measured on my computer).
I think the JS hrtime (high res) in node does do nanoseconds, never
tried, though. Before hrtime was available, JS only had a funky timer.
> Back to the anagram program.
>
> Finally, with the help of comp.lang.c gurus, the qsort() works!
>
> 0.3203s to qsort on prime factors
>
> Contents of sorted struct (word, pf)
> 0. a 2
> 1. b 3
> 2. aa 4
> 3. c 5
> 4. ab 6
> 5. ba 6
> 6. d 7
> 7. aaa 8
> 8. bb 9
> 9. ac 10
> 370094. microspectrophotometrical 1410868750453570100000000000000000000
> 370095. immunoelectrophoretically 1789942497187722500000000000000000000
> 370096. superincomprehensibleness 2116343913154240100000000000000000000
> 370097. antidisestablishmentarianism
> 10816738360843397000000000000000000000
> 370098. microspectrophotometrically
> 5063607945377863500000000000000000000000
> 370099. dichlorodiphenyltrichloroetha
> 29387878280664888000000000000000000000000
> 370100. hydroxydesoxycorticosterone
> 260918185927817140000000000000000000000000
> 370101. hydroxydehydrocorticosterone
> 354994003426527000000000000000000000000000
> 370102. cyclotrimethylenetrinitramine
> 1816546187380119700000000000000000000000000
> 370103. trinitrophenylmethylnitramine
> 286030059853623620000000000000000000000000000
>
>
> Since the data is sorted you can now add a break statement when the
> search routine reaches prime factor values greater than the prime factor
> of the search word:
That's what I was driving at earlier, that I wasn't doing in the one
(slow) function I showed, as I later responded with:
<76dbdb1d-c158-46d8-9c65-8006b00d2254@googlegroups.com>
> Option 1:
> for 0 to array size
> if array pf < search pf then continue
> if array pf = search pf then
> if array(word) <> searchword then
> anagram match
> continue
> if array pf > search pf then break
>
> Option 2:
> for 0 to array size
> if array pf < search pf then
> continue
> elseif array pf = search pf then
> if array(word) <> searchword then
> anagram match
> elseif array pf > search pf then
> break
>
> Either option will execute the same number of comparisons. I like
> Option 1 (no elses).
>
>
> Previous (data sorted by word)
> Searching for anagrams of 'players'...
> asperly pyrales parsley parleys replays sparely splayer
> 7 anagram(s) found in 0.0062s
>
> Now (data sorted by prime factor)
> Searching for anagrams of 'players'...
> asperly parleys parsley pyrales replays sparely splayer
> 7 anagram(s) found in 0.0036s
>
> 42% faster. More for small words early in the alphabet.
>
> Searching for anagrams of 'cat'...
> act
> 1 anagram(s) found in 0.00012s
>
> 1/10,000th of a second. Instantaneous.
>
> on the other end
> Searching for anagrams of 'trinitrophenylmethylnitramine'...
> 0 anagram(s) found in 0.01329s
>
> 13/1000ths of a second. Not too shabby for a senior citizen Intel chip
> (10-year-old i5-750).
It's incredible how much overhead higher languages add.
>>> And it's still not as efficient as possible, because it's making 370K
>>> prime factor comparisons, even if there's only one anagram found.
>>>
>>> Most of those comparisons are fruitless because the numeric data is
>>> unsorted. If I can figure out how to sort that data and break from the
>>> loop once the pf in the data > the pf of the searchword, the time will
>>> drop a LOT.
>>
>> Fruitless comparisons... yeah, I have those down pat... and node doesn't
>> like it a bit.
>
>
> The vid <https://streamable.com/5hupl> is gone but earlier you said:
>
> "The 7 letter one took like 5 minutes ("asperly" and "pyrales"?)!"
>
> For real?
If you look at the image as linked to in the post I linked to above...
<https://imgur.com/a/O0kPbWt>
... you'll see it's twice that!
>>> Hey, I'm glad you're working on this, too. It's much more fun when
>>> several of us are hacking on an idea at the same time, using different tech.
>>
>> LOL! Dude, *you're* working on it. I'm like a guy trying to move around in
>> a dark room holding a flashlight (you) while wearing a blind fold, missing
>> one leg... and there's no foot on the other.
>
> Keep at it and you'll soon have a JS anagram finder. The first in
> cola's history.
I already did that! When I simultaneously showed I built the slowest
anagram finder in *all* of history ;)
>>>>>> Feeb's right, in fact, it's worse than
>>>>>> that, I'm just a wannabe code monkey. LOL!
>>>>>
>>>>> So is Feeb.
>>>>
>>>> He knows a lot more than I'll ever know
>>>
>>> Doesn't do any good if you can't express what you know in code.
>>
>> I suspect he can.
>>
>>> > but I'll kick his ass in an air
>>>> guitar contest ;)
>>>
>>>
>>> Start thinking about your cola medley of Christmas tunes on guitar.
>>> Flattie gave us one on piano a few years ago.
>>
>> LOL! Like that's gonna happen.
>
> Give us 10 seconds each of your guitar interpretation of some popular
> Christmas songs. Electric or acoustic doesn't matter. It'll be great.
It'll either be non-existent or traveling through the space-time
continuum Mel and Feeb are arguing about.
>> What might be fun is if we had an X-mas
>> jam, where the track was passed around and everyone contributed a bit.
>> Fun... in a slit your throat, poke your eye out fashion.
>
> ha! I shudder at the thought of such a track. I'll try to drop a
> Bonham Purdie shuffle in to give it some class.
>
> https://www.youtube.com/watch?v=bQqD1F053gk
<https://www.youtube.com/watch?v=5DyC02BM_P4>
>> I wanna hear Feeb play a Frankenboard solo.
>
> Feeb wants to be Yanni.
He'll need something better than his tweaked, old Acer to get there.
[toc] | [prev] | [next] | [standalone]
| From | vallor <vallor@cultnix.org> |
|---|---|
| Date | 2019-10-20 03:29 +0000 |
| Message-ID | <h122l0Fqt7sU3@mid.individual.net> |
| In reply to | #536990 |
On Sat, 19 Oct 2019 15:15:37 -0400, DFS wrote:
> On 10/19/2019 12:44 PM, Steve Carroll wrote:
>> On Saturday, October 19, 2019 at 10:20:49 AM UTC-6, DFS wrote:
>
>
>>>> Node isn't quite that fast with the 'words_dictionary.json'
>>>> file:
>>>>
>>>> <https://imgur.com/a/3VETXBJ>
>>>
>>> What ops are done with: const data =
>>> require('./words_dictionary.json')
>>>
>>> Does it actually import the data from the text file into a memory
>>> structure?
>>
>> I believe so.
>>
>>> My C program takes about 2.2 seconds to import the 370K words and do
>>> the prime factors calculation.
>>
>> So it gets permutations but doesn't check 'em against a dictionary yet,
>> which is where the real slow down would occur, I'd imagine.
>
>
> It doesn't determine any permutations of the words. For each word it
> calculates a 'prime factors' number based on the prime numbers assigned
> to each letter of the word.
>
> a=2 b=3 c=5 d=7 e=11 ...
>
> cab = 5*2*3 = 30. 30 is unique to all combos of abc.
> cat = 5*2*71 = 710. 710 is unique to all combos of act.
> deal = 7*11*2*37 = 5698. 5698 is unique to all combos of adel.
> astro = 27276638, which is unique to all combos of aorst.
>
> https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
>
>
> The program puts each of the 370K words and their prime factor into a
> data structure (I'm using a C struct which accomodates different data
> types). Then it checks the prime factor of the input word and finds all
> pf matches in the data where the word is different.
>
> Searching for anagrams of 'astro'...
> astor ratos roast rotas taros toras 6 anagram(s) found in 0.0115s
>
>
> "Astor, my ratos! I'm roasting rotas and taros with a side of toras!
>
>
>> Even using that version with splice and shift:
>>
>> <https://imgur.com/a/ptQs7bC>
>>
>> Hook that up to the dictionary (and check it stupidly slowly like I
>> did) and it takes forever.
>
> Yeah, there's no need to generate permutations and check each one
> against the dictionary. Depending on the algorithm,that's wildly
> inefficient.
What I find hilarious is that how you're doing it:
1) Was poo-pooed by Feeb, and
2) Is basically how he described he'd do it
What ol' Feeb doesn't get is that assigning prime numbers to each letter
and multiplying them together is _exactly_ the hash function he wish he'd
thought of!
--
-v | Two-time winner of the Checky™.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2019-10-23 11:17 -0400 |
| Message-ID | <sa_rF.83196$rR2.6159@fx23.iad> |
| In reply to | #537003 |
On 10/19/2019 11:29 PM, vallor wrote:
> On Sat, 19 Oct 2019 15:15:37 -0400, DFS wrote:
>
> What I find hilarious is that how you're doing it:
>
> 1) Was poo-pooed by Feeb, and
> 2) Is basically how he described he'd do it
>
> What ol' Feeb doesn't get is that assigning prime numbers to each letter
> and multiplying them together is _exactly_ the hash function he wish he'd
> thought of!
He probably did think of it, in the womb.
Feeb is a self-described:
ARCHITECT
COMPOSER
CREATIVE man
REAL MAN
businessperson
computer scientist
computing virtuoso
creator
developer
electrical engineer
ex-con (who "did hard time")
man of realness
mathematician
mechanical engineer
music producer
programmer ("seasoned and worldly")
prostitute
research scientist
straight A college student
true innovator
When he admitted he was a prostitute he meant he uses Windows to make a
living. MS is his pimp.
[toc] | [prev] | [next] | [standalone]
| From | F Russell <fr@random.info> |
|---|---|
| Date | 2019-10-23 22:36 +0000 |
| Message-ID | <qoqklf23c9@news2.newsguy.com> |
| In reply to | #537222 |
On Wed, 23 Oct 2019 11:17:45 -0400, DFS wrote: > On 10/19/2019 11:29 PM, vallor wrote: >> >> What ol' Feeb doesn't get is that assigning prime numbers to each letter >> and multiplying them together is _exactly_ the hash function he wish he'd >> thought of! > Sorry, but you are both (expectedly) fucked. The prime product is NOT the hash function. The hash function involves transforming the prime product into a more suitable form for a hash table. Idiot duo.
[toc] | [prev] | [next] | [standalone]
| From | chrisv <chrisv@nospam.invalid> |
|---|---|
| Date | 2019-10-21 07:06 -0500 |
| Message-ID | <817rqehqdlabotjhrv1h8cpuoe78q3uh6l@4ax.com> |
| In reply to | #536975 |
Steve Carroll wrote: > DumFSck wrote: >> You probably won't care but I'll explain the code tweaks anyway, so you >> can doze off to sleep: > >E if I don't get everything 100% I still like studying this stuff. "Steve" clearly knows something about programming. Yet the snit refused to condemn his shitty pal DumFSck for *obviously* *lying* to attack me. Anyone who has ever even looked at a computer program, or even knew what a computer program is, would figure-out that they would have to be tested to make sure that they work. But, in here, we have losers, like "DFS" and "Steve", who are so inferior to me, and so *desperate* to attack, so *unable* to find a chink in my armor (well, I have been known to curse), that they *shamelessly* claim that I'm not aware of that. What's more likely, that I've never written a fscking computer program, EVER? Or that they are a couple of ridiculous, desperate, lying losers? It's quite amazing, what a snit can claim something "appears like". Watch them, now, join-together to attack me. Snits will defend the most *ludicrous* of claims. There will be LOL's, sneers, and claims of victory. I won't read it, but, again, others may enjoy the spectacle. -- "As you gave that appearance" - "Steve Carroll", lying shamelessly
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2019-10-22 10:21 -0400 |
| Message-ID | <1hErF.290245$iJ2.38215@fx47.iad> |
| In reply to | #537068 |
On 10/21/2019 8:06 AM, crazyassholev wrote: > Steve Carroll wrote: > >> DumFSck wrote: > >>> You probably won't care but I'll explain the code tweaks anyway, so you >>> can doze off to sleep: >> >> E if I don't get everything 100% I still like studying this stuff. > > "Steve" clearly knows something about programming. > > Yet the snit refused to condemn his shitty pal DumFSck for *obviously* > *lying* to attack me. Anyone who has ever even looked at a computer > program, or even knew what a computer program is, would figure-out > that they would have to be tested to make sure that they work. What lie are you referring to? > But, in here, we have losers, like "DFS" and "Steve", who are so > inferior to me, and so *desperate* to attack, so *unable* to find a > chink in my armor (well, I have been known to curse), that they > *shamelessly* claim that I'm not aware of that. Another of your lies: neither I nor Carroll ever claimed you were unaware of the need for testing. The issue everyone has is that you think testing is stupid compared to compiler warnings. It's ridiculous. > What's more likely, that I've never written a fscking computer > program, EVER? Or that they are a couple of ridiculous, desperate, > lying losers? No lies or desperation on our part, bozo. You said what you said: ==================================================================== This reminds me of a Relf classic. "Testing is how you know if the code works or not, not compile-time warnings." - Jeff Relf Heh. One doesn't need to be a pro, to know how stupid that is... ==================================================================== > It's quite amazing, what a snit can claim something "appears like". > > Watch them, now, join-together to attack me. Snits will defend the > most *ludicrous* of claims. There will be LOL's, sneers, and claims > of victory. I won't read it, but, again, others may enjoy the > spectacle. And you really are a spectacle sometimes: "so inferior to me" "I'm intellectually superior" "I'm morally superior" "I'm superior in every way" "jealous of the intelligence implied by my BSEE" What a blabbermouth. Your parents must be warped.
[toc] | [prev] | [next] | [standalone]
Page 7 of 9 — ← Prev page 1 2 3 4 5 6 [7] 8 9 Next page →
Back to top | Article view | comp.os.linux.advocacy
csiph-web