Search found 1153 matches

by jj2007
Jul 06, 2019 9:21
Forum: Libraries
Topic: python experiment
Replies: 33
Views: 870

Re: python experiment

Python is slow - if you use native Python code in a speed-critical loop. If, however, you let its internal routines (coded in C or Assembly) do their job, it can by faster than anything else. Google fastest sort algorithm python to see what I mean.
by jj2007
Jul 05, 2019 1:20
Forum: Libraries
Topic: python experiment
Replies: 33
Views: 870

Re: python experiment

The final alternative is to create a Python function using the C API and have that function pass data between FB and Python. See https://stackoverflow.com/questions/13942128/how-to-pass-an-array-from-c-to-an-embedded-python-script. The SOF article speaks only about passing data to Python. You might...
by jj2007
Jul 04, 2019 13:53
Forum: Libraries
Topic: python experiment
Replies: 33
Views: 870

Re: python experiment

srvaldez wrote:I did a fair amount of web searching and pipes were among the hits, it's a pity that there's no simple and efficient way to exchange data.
I'm no Python expert, so it would cost me a steep learning curve, but memory-mapped files are also an option. Under Windows, you can also share data via a DLL.
by jj2007
Jul 04, 2019 10:29
Forum: Libraries
Topic: python experiment
Replies: 33
Views: 870

Re: python experiment

srvaldez wrote:the one hairy detail is: how to exchange data between the python script and FB, sure you could write it to a file and then read it, but that's not very efficient.
Maybe use a pipe?
by jj2007
Jun 21, 2019 13:34
Forum: Community Discussion
Topic: Pulsar2D
Replies: 6
Views: 318

Re: Pulsar2D

Thanks to everybody, will test your proposals asap.
by jj2007
Jun 21, 2019 12:01
Forum: Community Discussion
Topic: Pulsar2D
Replies: 6
Views: 318

Pulsar2D

Does anybody know how to set up the Pulsar library? The source code zip package has a FreeBasic folder, but I don't know where to put it. When I include with full path, the linker complains with "cannot find -lSDL2" etc - the usual trial and error game...
by jj2007
Jun 19, 2019 20:42
Forum: General
Topic: smart code formatter
Replies: 9
Views: 436

Re: smart code formatter

Do you want to make a test? If it's not confidential, upload it somewhere, otherwise post a hundred lines here. If you prefer, I can give you my email here, but it would disappear asap.
by jj2007
Jun 19, 2019 19:24
Forum: General
Topic: smart code formatter
Replies: 9
Views: 436

Re: smart code formatter

The RichMasm editor has an autoformat function, but it's very specialised on x86 assembler. It would be helpful if you posted a hundred lines of example code... how many lines is the source you want to reformat?
by jj2007
Jun 15, 2019 8:21
Forum: General
Topic: Squares
Replies: 6717
Views: 383148

Re: Squares

Topic summary: Nice idea but a little bit buggy (and I don't have the time now to fix it). Thanks for confirming that this is a real coding thread. For some time I was inclined to believe that "Squares" was some secret game where old FB insiders are pulling each others' legs. So much nons...
by jj2007
Jun 14, 2019 21:06
Forum: General
Topic: Squares
Replies: 6717
Views: 383148

Re: Squares

albert wrote:The hardness is the flexibility...
No.
by jj2007
Jun 14, 2019 10:44
Forum: General
Topic: Squares
Replies: 6717
Views: 383148

Re: Squares

albert wrote:Every time you cut the length in half the hardness doubles.
No, the hardness is a constant. Basics of engineering.
by jj2007
Jun 13, 2019 22:03
Forum: General
Topic: Squares
Replies: 6717
Views: 383148

Re: Squares

dodicat wrote:I was going to say that the Moh's hardness scale only applies to solids, but I see mercury documented as hardness 1.5.
The other liquid element at room temperature is bromine, but it is not listed.
The Mohs value for mercury is valid only for solid mercury at -38.89 Celsius grades and lower.
by jj2007
Jun 12, 2019 8:42
Forum: Community Discussion
Topic: FBC's Cairo clock example error
Replies: 52
Views: 1895

Re: FBC's Cairo clock example error

@dodicat: I get Clock.bas(120) error 24: Invalid data types:

Code: Select all

        Var g=Right("0"+Str(counter-1),2)
by jj2007
Jun 11, 2019 17:21
Forum: Community Discussion
Topic: FBC's Cairo clock example error
Replies: 52
Views: 1895

Re: FBC's Cairo clock example error

Nice, Knatterton!
Image
by jj2007
Jun 10, 2019 11:55
Forum: Projects
Topic: Windows only : another simple tool for cartesian plots
Replies: 4
Views: 315

Re: Windows only : another simple tool for cartesian plots

marpon wrote:very nice, but as you only provide an exe, no real interest for me.
The source is MasmBasic and still very confused. Perhaps when it is ready I could create a static lib to make the code accessible for FreeBasic (Win32 only, it's Gdi+).

Go to advanced search