Search found 24 matches

by jimg
May 28, 2020 1:48
Forum: Community Discussion
Topic: which keyboard to choose?
Replies: 5
Views: 1240

Re: which keyboard to choose?

Still using my 30 yr old Northgate OmniKey Ultra every day. I'd buy another in a hearbeat if I could.
by jimg
May 01, 2020 1:58
Forum: General
Topic: Squares
Replies: 8041
Views: 773345

Re: Squares

Albert-
I'm confused as to what you are doing in this thread.
Are you saying you took the above code and compressed a file by 92%, then decompressed the result using the above code, and the input and output files were identical?
by jimg
Mar 29, 2020 5:09
Forum: Windows
Topic: win7 vs 8
Replies: 11
Views: 3090

Re: win7 vs 8

It's a huge pig at 2.5 megs, and it probably uses lots and lots of different api's to get the job done. If you decide to use it, use the standalone portable version, not the installable version. There is no reason to install it at all. Just unzip it to a folder and run it manually or drop a shortcut...
by jimg
Mar 28, 2020 16:27
Forum: Windows
Topic: win7 vs 8
Replies: 11
Views: 3090

Re: win7 vs 8

I use ShellFolderFixUI as a startup program to remember how I want each folder to show. Works great.
by jimg
Mar 11, 2020 4:47
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

albert- The data we have been using for testing, random numbers of the range 0-255, is not compressible, otherwise it wouldn't be very good random numbers. For example, I ran the generator for str1 and saved it to a file. That file was 190,000,000 bytes long. I then ran that file through 7-zip to co...
by jimg
Mar 09, 2020 2:01
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

I lifted your string generator to be sure we were working on the same input. I ran your last assembly version which I called tally, and my last version that wasn't reading a file (instrtest11) for comparison. This is what I got when running in a command window from a dos prompt: F:\FreeBasicProgs\Te...
by jimg
Mar 05, 2020 19:03
Forum: Beginners
Topic: need help with error
Replies: 3
Views: 1265

Re: need help with error

Thank you. It never occurred to me that an array would be on the stack.
by jimg
Mar 05, 2020 16:49
Forum: Beginners
Topic: need help with error
Replies: 3
Views: 1265

need help with error

This program just dies after the first input without going to the error routine, so I can't figure out what the error is. I'm sure it's obvious, I just can't see it. Any help will be appreciated. ' compile with -exx On Error GoTo fatal Dim erf As Long Dim As ULong dictcount(255,255) Dim As String di...
by jimg
Mar 04, 2020 23:01
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

albert- I know I said I was done, but I couldn't resist. Here is a program that reads in a file and creates the dictionaries. Using a 13 meg test file, on my machine ( with plenty of memory and fast cpu) it takes a grand total of 0.3 seconds. Is that fast enough? ( it did take 260 seconds for a 1.1 ...
by jimg
Mar 03, 2020 18:39
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

And finally, albert, this one uses separate dictionaries for each of 256 possible starting letters (dicts(255)). It runs in 8 seconds, so it takes longer to compile than to run. I'm done here unless you have other questions. '#Define debug Dim As ULong a,i,b,j,testsize Dim As UByte uu,vv,yy,onetime ...
by jimg
Mar 03, 2020 15:45
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

That last one takes 779 seconds on my computer. By sorting the dictionary so words starting with the same letter are grouped together, and only searching within the group needed, it take 16 seconds, almost down to usable speed. Here's the test program Dim As ULong a,i,b,j Dim As UByte uu,vv,yy,oneti...
by jimg
Mar 02, 2020 23:30
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

Using integers would look something like this. Still not terribly fast, but I don't see how you could run any faster using brute force code. To get any more speed, you would have to do some kind of hashing. Perhaps make 256 dictionaries, where all words in a dictionary would start with the same lett...
by jimg
Mar 02, 2020 22:05
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

If I understood you correctly, then your instr is not the right thing to use. As I showed in my example, it will find a match at byte two, which is not on a 4-byte boundary. If everything is to be in units of four bytes, then it should be faster to do everything in four-byte integers (longs), rather...
by jimg
Mar 02, 2020 15:05
Forum: General
Topic: Instr()
Replies: 25
Views: 3650

Re: Instr()

albert- with your instr instruction, you are testing for any occurrence of a four byte string. Did you mean for the match to occur anywhere within the string, or only at four byte boundaries? e.g. if str1 looks like- abcdefghijklmnopbcdefghi 1 2 3 4 5 6 7 8 9 and you pick up the fifth group (bcde) a...
by jimg
Feb 13, 2020 21:08
Forum: General
Topic: substrings
Replies: 41
Views: 6778

Re: substrings

a$[c,d] Won't work because: a) string index operator [] can only take one argument (index). b) this means, you'll need another construct (given by the language) Precisely what I'm proposing. A compiler update to allow the syntax of [startcol, optional end col] That's all I ever asked for. c) conclu...