Search found 5502 matches

by counting_pine
Oct 19, 2019 20:30
Forum: Beginners
Topic: Arithmetic overflow handling
Replies: 4
Views: 187

Re: Arithmetic overflow handling

Unlike FB, Visual Basic (up to 6 at least) and Qbasic, will give an error on arithmetic overflow, as opposed to saturating or wrapping. While this is useful for catching many bugs, I’ve often looked for workarounds to avoid triggering it. With 16-bit numbers, this isn’t as hard, and I think the best...
by counting_pine
Oct 01, 2019 13:34
Forum: Documentation
Topic: Wiki signups
Replies: 47
Views: 16798

Re: Wiki signups

Hi robert, sorry for the delay.
I think you've used the wiki before as RoBert? I'm going to resurrect that account with your requested password hash.
by counting_pine
Aug 02, 2019 19:57
Forum: Documentation
Topic: Wiki signups
Replies: 47
Views: 16798

Re: Wiki signups

Hi basicjohnny, thanks, I've added you to the wiki. Please set a secure password once you log in.
by counting_pine
Jun 14, 2019 12:40
Forum: Community Discussion
Topic: forum bug new topics dont subscribe
Replies: 2
Views: 2520

Re: forum bug new topics dont subscribe

Thanks for your report.. Is it just new topics, or any topic?
by counting_pine
Jun 08, 2019 14:55
Forum: Documentation
Topic: Compiler option: -w
Replies: 6
Views: 2820

Re: Compiler option: -w

Thanks for the report.
Note: the documentation files are produced from the FreeBASIC Wiki. This particular page is at /wiki/CompilerOptw.
From the history, it looks like Jeff corrected this last year.
by counting_pine
May 29, 2019 13:33
Forum: General
Topic: CVS | CVSHORT BUG
Replies: 3
Views: 386

Re: CVS | CVSHORT BUG

The simplest workaround for this is to pad the string with enough Null characters (i.e. 'Chr(0)') to make sure the string is long enough.

Code: Select all

dim as string s = chr(200)
print cvshort(s & chr(0))
print cvs(s & string(3, 0))
by counting_pine
May 14, 2019 20:10
Forum: Projects
Topic: 80486 emulator with SVGA in BASIC!!!!!
Replies: 17
Views: 2648

Re: 80486 emulator with SVGA in BASIC!!!!!

I happen to have a copy of the archive downloaded from this thread, which was, I am pretty sure, PCEM_FB486.rar. I've uploaded it as a Github repo: https://github.com/countingpine/PCEM_FB486 I couldn't find any copyright information in the archive. I was going to add copyright info from version 0.41...
by counting_pine
May 11, 2019 15:07
Forum: General
Topic: Problem writing 8GB array to disk
Replies: 25
Views: 1545

Re: Problem writing 8GB array to disk

I've drafted some drop-in replacement fread/fwrite functions for the rtlib: static __inline__ size_t fread_large( void *ptr, size_t size, size_t nmemb, FILE *stream ) { size_t total = 0, nread, nchunk, shift; if (size < 1 || nmemb < 1) return 0; /* read at least 1MB of items per chunk */ for (shift ...
by counting_pine
May 09, 2019 14:01
Forum: General
Topic: Problem writing 8GB array to disk
Replies: 25
Views: 1545

Re: Problem writing 8GB array to disk

Hmm, looks like it might be a bug not in FB itself, but in Windows fwrite(): https://stackoverflow.com/questions/18694889/c-fwrite-binary-file-bigger-than-4gb/18694929#18694929 https://brucebcampbell.wordpress.com/2014/07/15/4gb-c-standard-library-fwrite-limit/ We use it in https://github.com/freeba...
by counting_pine
May 09, 2019 7:45
Forum: General
Topic: Problem writing 8GB array to disk
Replies: 25
Views: 1545

Re: Problem writing 8GB array to disk

I suspect there may be a (signed?) 32-bit overflow somewhere, if 2GB is not working. Here's a function that writes a pointer in 1GB chunks. function putptr(p as any ptr, size as longint, count as longint, handle as integer, position as longint = 0) as integer if count <= 0 or size <= 0 then return 0...
by counting_pine
May 05, 2019 15:32
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 6774

Re: SWAP keyword

I think it’s enough to say that with variable-length strings, the descriptors are swapped without reallocating any string data memory. And for UDTs, the contents of the structures are swapped without any operators or methods being called. I don’t think it is worth discussing efficiency. The semantic...
by counting_pine
May 03, 2019 13:51
Forum: Community Discussion
Topic: Challenge : Sfx encrypted file, to verify it's security level
Replies: 9
Views: 2383

Re: Challenge : Sfx encrypted file, to verify it's security level

As far as I know, there are no cryptographers or reverse engineering experts on the forum.. Compiled source code is a powerful obfuscation barrier, but an expert would probably be able to estimate a reasonable timeframe for cracking that step. If you truly want to know how secure it is, share the al...
by counting_pine
May 03, 2019 13:18
Forum: DOS
Topic: FreeDOS 21st century?
Replies: 17
Views: 7317

Re: FreeDOS 21st century?

There seems to be a forum of sorts for the Night Kernel at https://groups.google.com/forum/#!forum ... dos-kernel
by counting_pine
Apr 23, 2019 12:49
Forum: Tips and Tricks
Topic: Rutt Etra Izer Effect v0.7
Replies: 2
Views: 2631

Re: Rutt Etra Izer Effect v0.6

Wow, that's pretty cool.

What does the effect do? Is it giving a Z coordinate based on the colour value?
by counting_pine
Apr 22, 2019 13:18
Forum: General
Topic: Programming/math "puzzle" for you, guys
Replies: 57
Views: 5432

Re: Programming/math "puzzle" for you, guys

Thanks for your update, xlucas. It's good to know this is a formally studied type of sequence, and there's at least one method of reliably generating them. I made a version based on the sample Python code on the Wikipedia page. The alphabet and the subsequence length are adjustable as constants: con...

Go to advanced search