Search found 2870 matches

by Richard
Apr 01, 2019 20:05
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

Richard has been a downer on the compression idea , but I've used so much of his code in my programs, i thought I'd include him anyways. @Albert. Please don't include or associate me with your data compression ideas. I would really like to maintain some distance between myself and the liability. I ...
by Richard
Mar 24, 2019 23:09
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

I think i got the compressor working.. There's no way to decompress yet.. @Albert. There is no way your grid approach is going to be reversible. You need to stop posting hash functions and get back to us when you have a package that will compress to 50% or more, and will decompress to the original ...
by Richard
Mar 24, 2019 2:23
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

Albert wrote:I found an algorithm that works!!
Albert wrote:The compression and decompression are extremely fast... I still need to run some tests , to see if it decompresses properly..
How do you know it works if you have not thoroughly tested it.
Your compression factor is subject to the Dunning-Kruger effect.
by Richard
Mar 24, 2019 0:43
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

It would be easier to give the compressor away for free... And then charge a monthly fee when a connection tries to decompress. Then the company records all the credit and debit card numbers.. You are dreaming. To give it away requires you must first write a compressor that actually works. What i'm...
by Richard
Mar 23, 2019 4:32
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

A pre-decided compression will work only for a known redundant data type such as strings of only decimal digits. Compression cannot be done efficiently on a general bitfield by a pre-decided algorithm. To compress general data you must look for and find repeated sequences. That requires pattern reco...
by Richard
Mar 19, 2019 18:30
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

So with the grid idea: You can probably cancel all the values with 1 to 8 1's in the entire grid. Likewise you can probably cancel all the values of 1 to 8 0's in the entire grid. Most of the possible grids never occur in real life file data.. When you compress data you must keep a record of the pr...
by Richard
Mar 19, 2019 3:15
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

Compress the universe to a 1 x 1 grid and you have your singularity! The interesting question there is the size of the dictionary needed to regenerate the universe from 1 bit. Many string theory physicists believe that the content of a volume of the universe is fully expressed as a hologram on the ...
by Richard
Mar 15, 2019 23:36
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

I think you already wrote it , but i need a converter , to convert base 256 ascii , to base 10. Can you give me a link to it? I don't know exactly what you mean. My converters go both ways so you need to accurately and separately describe the two formats you are converting between. Is the data in a...
by Richard
Mar 15, 2019 14:55
Forum: General
Topic: Self-referential initialisation by Dim.
Replies: 7
Views: 321

Re: Self-referential initialisation by Dim.

For the most curious case, it seems that "dim as integer x = x" means "dim as integer x = any" , yes? Dim As Integer x = Any; does not initialise x so it saves time. Dim As Integer x = x; has the same outcome but wastes time doing it, so I see no advantage in the feature. Where ...
by Richard
Mar 15, 2019 2:20
Forum: General
Topic: Self-referential initialisation by Dim.
Replies: 7
Views: 321

Self-referential initialisation by Dim.

There was a time when Constants could be declared that referred to themselves. That time has now passed and the compiler correctly complains. But now I find I can Dim and initialise a self-referential variable. Is this a new bug, or is it necessary or acceptable for some reason ? Dim As Double a = a...
by Richard
Mar 14, 2019 22:58
Forum: General
Topic: Substitute text into a string
Replies: 4
Views: 307

Re: Substitute text into a string

Thanks @Foneo.
Your demonstration code solved the problem neatly.
by Richard
Mar 14, 2019 7:15
Forum: General
Topic: Substitute text into a string
Replies: 4
Views: 307

Substitute text into a string

How can I put the body of a #define into a string so it can be printed ?
If I use #define identifier “body” the quotes get in the way of substitution elsewhere.

Code: Select all

#define identifier body
Dim As String txt
txt = " identifier "
Print txt  ' I want it to print 'body', not 'identifier'
by Richard
Mar 13, 2019 5:19
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

Albert wrote:Whats the opposite of the "Big Bang"?
What do they call it , when the universe compresses back to a single star?
The Big Crunch.
https://en.wikipedia.org/wiki/Big_Crunch
by Richard
Mar 10, 2019 12:36
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

If dodicat had not shown While...Wend was faster than Do While .. Loop and eliminated the If, I would not have looked for and found x Xor= x And -x. When I found that I went looking to see if it was already in play. That is when I found Brian Kernighan’s x And= x-1. So if Albert hadn't asked, dodica...
by Richard
Mar 10, 2019 8:30
Forum: General
Topic: Squares
Replies: 6360
Views: 362790

Re: Squares

Avoiding the terminal test 2/3 of the time only made it 7% faster, but here, even with the terminal test always done, it is about 33% faster. ' Brian Kernighan’s Algorithm Function fast_bitcount( Byval x As Ulongint ) As Integer Dim As Integer count = 0 While x x And= x - 1 count += 1 Wend Return co...

Go to advanced search