Search found 1548 matches

by angros47
Apr 07, 2020 0:11
Forum: General
Topic: Squares
Replies: 7687
Views: 481081

Re: Squares

I sit and think of a formula , sometimes it takes a couple days.. Then i try it , no matter how senseless it seems.. Sometimes it expands the data , and then the Zlib will somehow compress it , to smaller... ( never know. ) Once Nikola Tesla said “If he [Thomas Edison] had a needle to find in a hay...
by angros47
Apr 06, 2020 21:48
Forum: General
Topic: Squares
Replies: 7687
Views: 481081

Re: Squares

If "bin( count - 1 )" is written as an 8 bit sequence, each time you will encounter a sequence that has less than 8 consecutive zeroes you will replace them with 8 binary digits, and in that way you will make the file longer, not shorter. Instead, if "bin( count - 1 )" is express...
by angros47
Apr 03, 2020 20:22
Forum: General
Topic: Squares
Replies: 7687
Views: 481081

Re: Squares

Duplicate, Albert:

Code: Select all

000 100 = 0 31
101 110 = 03 1
by angros47
Apr 03, 2020 13:12
Forum: General
Topic: the mathematical analog clock
Replies: 6
Views: 240

Re: the mathematical analog clock

This is absolutely NOT recommended: SLEEP (1) sec = sec + 1 minute = minute + (1 / 60) hour = hour + (1 / 3600) k$ = INKEY$ The command SLEEP doesn't guarantee to pause exactly one second (if a key is pressed, for example, SLEEP terminates immediately). Even worse, other instructions, like INKEY, LI...
by angros47
Apr 02, 2020 14:32
Forum: General
Topic: Squares
Replies: 7687
Views: 481081

Re: Yah-Zip ( swap )

albert wrote:Can it be undone???


No, it can't.

Apply it to all values from 0 to 255, and you will see that it doesn't work. It's the pigeon hole problem.
by angros47
Apr 01, 2020 21:18
Forum: General
Topic: Squares
Replies: 7687
Views: 481081

Re: Yah-Zip ( swap )

albert wrote:Can it be undone????



No, it can't. I don't even need to check your code to know: with your premises, it's unavoidable to have duplicates: check it, and you'll find some.
by angros47
Apr 01, 2020 16:43
Forum: General
Topic: turing machine try
Replies: 1
Views: 100

Re: turing machine try

You made a mistake in for i = 1 to 3 for j = 0 to 2 read code( i , j ) next j next i It should have been for i = 0 to 2 Otherwise, in the array, you will store the first instruction into code (1,0), then you read the instruction in code (0,0) (because you set "i = 0" in your code), and it ...
by angros47
Mar 29, 2020 20:54
Forum: Projects
Topic: Charger - A General FreeBASIC Framework
Replies: 11
Views: 483

Re: Charger - A General FreeBASIC Framework

Are you sure you linked the right repository? All I can see in that github is the license file, and nothing else
by angros47
Mar 29, 2020 20:19
Forum: Libraries
Topic: FLTK-C-1.3.3 for FreeBASIC
Replies: 391
Views: 81577

Re: FLTK-C-1.3.3 for FreeBASIC

Just my curiosity.... but in case of FLTK, what prevents from using it directly from FreeBasic, without a C wrapper? I had a look at the include files, they seem normal class (and I know FreeBasic is compatible with C++ at least at ABI level)
by angros47
Mar 28, 2020 16:17
Forum: Community Discussion
Topic: Multiplatform coroutines in C and also in FreeBasic
Replies: 6
Views: 329

Re: Multiplatform coroutines in C and also in FreeBasic

I would like if it could be integrated in the language. I can already see an use for OpenGL programs (since OpenGL is not thread safe, and it can be accessed only by the thread that created the context). The keyword "fork" should not be used for that, anyway, since it would create confusio...
by angros47
Mar 28, 2020 14:53
Forum: Community Discussion
Topic: Multiplatform coroutines in C and also in FreeBasic
Replies: 6
Views: 329

Re: Multiplatform coroutines in C and also in FreeBasic

Ok, it works in FreeBasic, too. First of all, you need to download the files, and compile the library with: gcc -c libco.c You should get the file libco.o (it can be done in DOS, in Windows and in Linux) Then, the header for FreeBasic (that must be saved as "libco.bi") is: ' libco v20 (201...
by angros47
Mar 28, 2020 1:00
Forum: Community Discussion
Topic: Multiplatform coroutines in C and also in FreeBasic
Replies: 6
Views: 329

Multiplatform coroutines in C and also in FreeBasic

I found this:
https://byuu.org/projects/libco

I guess it can be ported to FreeBasic. Or perhaps it can be integrated in the runtime and compiler? (in the past I remember someone wanted to add coroutine support in FB)
by angros47
Mar 17, 2020 23:50
Forum: General
Topic: Squares
Replies: 7687
Views: 481081

Re: Squares

Albert, are you competing for the Hutter Prize? http://prize.hutter1.net/ https://en.wikipedia.org/wiki/Hutter_Prize For everyone else, I'll also share this link: https://www.quora.com/What-is-the-most-compressed-file-ever-In-percent-decrease-Post-the-original-size-and-the-output-size-Also-include-t...
by angros47
Mar 03, 2020 17:33
Forum: Community Discussion
Topic: Very different result
Replies: 22
Views: 844

Re: Very different result

nov79 wrote:I'm using Linux. Terminal is XFCE4-Terminal.


Try running your program from xterm, and see if the speed changes
by angros47
Mar 02, 2020 17:03
Forum: Community Discussion
Topic: Very different result
Replies: 22
Views: 844

Re: Very different result

Not needed. I diagnosed the problem. The problem is in the print to screen part, not the calculating of the sequence. Free Basic's Print is much slower than crt's printf. You are not the first to mention this, actually: https://freebasic.net/forum/viewtopic.php?f=3&t=26204 Are you using Linux o...

Go to advanced search