Search found 5519 matches

by counting_pine
Jul 04, 2020 19:45
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 445
Views: 74586

Re: Where can I get a Recent-Git-Build of FreeBASIC?

java.net.UnknownHostException: freebasic.net A failure to resolve freebasic.net sounds like a DNS issue. It suggests the build server couldn't reach its DNS provider. So either the DNS provider had an outage, or the Internet connection went down. If you can configure the DNS server, Cloudflare (1.1...
by counting_pine
Jun 28, 2020 16:33
Forum: General
Topic: How would you find the shortest distance in a set of points?
Replies: 23
Views: 572

Re: How would you find the shortest distance in a set of points?

You could try partitioning the points into a grid of N*N cells. Then you’d only have to check the points in each cell against points in the same cell and neighbouring cells. Note, depending on the distribution of points, you might find that most points are clustered together in the same cell. In tha...
by counting_pine
Jun 28, 2020 16:24
Forum: Community Discussion
Topic: Mac OS X Support
Replies: 23
Views: 665

Re: Mac OS X Support

You could try the suggestions in viewtopic.php?p=174567#p174567, which explain how to compile your own ffi, or to disable it in FB.
by counting_pine
Jun 23, 2020 19:53
Forum: Beginners
Topic: Print# without extra characters
Replies: 4
Views: 250

Re: Print# without extra characters

I agree with Put #, but: open "blabla.txt" for output as #1 print #1, "AB"; close #1 Gives a 2-byte file here, and (without the semicolon): open "blabla.txt" for output as #1 print #1, "AB" close #1 A 3-byte file here. Last one 0x0A (LF). Probably 4 bytes on ...
by counting_pine
Jun 22, 2020 13:05
Forum: Beginners
Topic: Print# without extra characters
Replies: 4
Views: 250

Re: Print# without extra characters

You may be better off using Put # instead of Print.
Print is designed for text, and it may not always work properly with binary data.
If you want to omit the newline after Print, you can put a semicolon at the end of the line.
by counting_pine
Jun 18, 2020 14:34
Forum: General
Topic: Duplicates
Replies: 34
Views: 1090

Re: Duplicates

So we’re talking roughly a billion lines of text? ... A good strategy might be to sort the array, then duplicate checking is easy. Have you ever tried to sort a billion lines of text? Any idea how much time it will take? OK, fair enough.. Running the numbers, I guess a terabyte file of a billion li...
by counting_pine
Jun 17, 2020 18:43
Forum: General
Topic: Duplicates
Replies: 34
Views: 1090

Re: Duplicates

So we’re talking roughly a billion lines of text? One question that occurs to me is, how many unique lines are there likely to be? I think any hash-based method will need a table with at least that many entries, which could easily be gigabytes in size and might not easily fit in memory. And I’m not ...
by counting_pine
Jun 05, 2020 11:05
Forum: General
Topic: include files with same name not ignored
Replies: 20
Views: 561

Re: include files with same name not ignored

In general it's hard for #include/pragma once to detect when the same file is accessed multiple times through different paths, so it's worth combining it with something like #ifndef ... #define ... #endif. C/C++ have a similar problem: https://en.wikipedia.org/wiki/Pragma_once#Caveats I guess the id...
by counting_pine
May 25, 2020 20:55
Forum: General
Topic: Using a variable for Restore possible?
Replies: 10
Views: 403

Re: Using a variable for Restore possible?

Even if FB did support label pointers, it would still be a hassle to get them working with Restore, because labels aren't treated as code pointers with Data/Restore.. Data may not be the best method nowadays, but I guess something like this would work: #macro datalabel(l) l: sub restore_##l() restor...
by counting_pine
May 23, 2020 18:53
Forum: Projects
Topic: GifWriter - save frames of the screen (or memory) to an animated GIF
Replies: 8
Views: 408

Re: GifWriter - save frames of the screen (or memory) to an animated GIF

I've added the ability to set delays now, e.g. using .addDelay(10) for a 0.1sec delay (i.e. using the native "centisecond" unit). I've wondered whether I should have some sort of function for adding "realtime" delays, which would allow videos to run at the same speed they were re...
by counting_pine
May 22, 2020 13:29
Forum: Projects
Topic: GifWriter - save frames of the screen (or memory) to an animated GIF
Replies: 8
Views: 408

Re: GifWriter - save frames of the screen (or memory) to an animated GIF

Yeah, frame delays would be useful, I hope to look into that.
Looks like giflib has support for that, although it looks a little more convoluted than I hoped. (That’s been my experience with most things in GIF/giflib so far..)
by counting_pine
May 20, 2020 13:13
Forum: Projects
Topic: GifWriter - save frames of the screen (or memory) to an animated GIF
Replies: 8
Views: 408

Re: GifWriter - save frames of the screen (or memory) to an animated GIF

I can't test on Windows at the moment, but it's a good sign if gifwriter.bas compiles and links by itself.
What command line are you using? You either need to compile them both at the same time, or compile gifwriter.bas to a library and link example2.bas to that.

EDIT: glad you got it sorted!
by counting_pine
May 20, 2020 12:52
Forum: Projects
Topic: GifWriter - save frames of the screen (or memory) to an animated GIF
Replies: 8
Views: 408

Re: GifWriter - save frames of the screen (or memory) to an animated GIF

Those functions aren't from giflib, but are class methods implemented in gifwriter.bas. Are you compiling the example together with the class module?

PS. I'm using Linux, libgif7 version 5.1.4-2ubuntu0.1 amdb64.
__GIFLIB_VER__ is the default, i.e. 5. It probably wouldn't be hard to adapt it to 4.
by counting_pine
May 20, 2020 12:24
Forum: Projects
Topic: GifWriter - save frames of the screen (or memory) to an animated GIF
Replies: 8
Views: 408

GifWriter - save frames of the screen (or memory) to an animated GIF

I wanted to be able to record little GIF movies from FB graphics programs, but I was finding giflib a pain to work with, and not finding many good usage examples.. Then I found apparently it doesn't seem to do any attempt at frame size optimisation, which isn't ideal when outputting lots of similar ...
by counting_pine
May 17, 2020 15:40
Forum: Libraries
Topic: raylib headers
Replies: 46
Views: 2675

Re: raylib headers

Hi Mysoft, I'm glad that you found the headers posted here useful enough to adapt to your needs. Any improvements or contributions you want to make to the code are welcomed, and other people here may perhaps find them useful. But I'm sorry - we don't want that kind of abusive language or unconstruct...

Go to advanced search