Search found 3708 matches

by wilbert
Mon Sep 15, 2025 5:05 am
Forum: Off Topic
Topic: Active online forum!
Replies: 7
Views: 1696

Re: Active online forum!


Most of the forums I grew up with are gone or show very little activity.
That's true. I believe I first heard about PureBasic from you when we were active on the Koolmoves forum at Flash Kit.
The forum still exists but there haven't been any posts last few years.


We're fortunate to still have ...
by wilbert
Fri Jul 25, 2025 5:43 am
Forum: Coding Questions
Topic: how to make a mp3 file from the output of my morse code program?
Replies: 8
Views: 1650

Re: how to make a mp3 file from the output of my morse code program?

If you do want mp3 output for morse, I guess it should also be possible to have the mp3 data for a dot and the mp3 data for a dash and just chain them all together in the right way. :idea:
by wilbert
Tue Jul 15, 2025 7:48 am
Forum: Tricks 'n' Tips
Topic: morse code player
Replies: 12
Views: 1502

Re: morse code player


Decoding it is actually quite tricky. I would probably go with an FFT to find the frequency then feed it into goertzel which is like an DFT for a specific frequency. it outputs the magnitude so then you can feed it in and measure the on offs

Wouldn't it be possible to just look at volume ...
by wilbert
Sat May 17, 2025 5:28 am
Forum: Coding Questions
Topic: Proto without proper params
Replies: 7
Views: 1257

Re: Proto without proper params


But I always compile in x64, so if I understand you correctly, it shouldn't cause any problem (still going to do proper declarations for sure).

When using 64 bit, most procedure arguments are passed by registers but even if the stack is used, the 64 bit calling conventions require the caller to ...
by wilbert
Fri May 16, 2025 7:35 pm
Forum: Coding Questions
Topic: Proto without proper params
Replies: 7
Views: 1257

Re: Proto without proper params


In other words, is it a problem?

Yes, it's a problem (on Windows x86).

There are different calling conventions for different systems and processors.
On Windows x86 the default calling convention (stdcall) requires the callee to clean up the stack. In this case it's important the amount of ...
by wilbert
Fri May 09, 2025 10:42 am
Forum: Off Topic
Topic: And if we live in Black Hole from Universe ?
Replies: 12
Views: 3743

Re: And if we live in Black Hole from Universe ?

I didn't watch the whole movie, only the first part but I don't believe we live inside a black hole. 8)
by wilbert
Sun Apr 27, 2025 5:15 pm
Forum: Mac OSX
Topic: When is it needed to use NSAutoReleasePool?
Replies: 3
Views: 3371

Re: When is it needed to use NSAutoReleasePool?

Within the PureBasic event loop, the objects marked for autorelease, are released regularly.
If you need them to be released more often you can use your own autorelease pool.
by wilbert
Sun Apr 27, 2025 8:34 am
Forum: Off Topic
Topic: School is not the place for hackers
Replies: 18
Views: 5049

Re: School is not the place for hackers

School is part of a system. The whole system is broken (as I see it).
It's build on competition, striving to be 'better' as others and overrating intellectual capabilities.
So many people are struggling emotionally, are glued to a screen or have some other kind of addiction to escape from their ...
by wilbert
Sun Apr 27, 2025 5:38 am
Forum: Coding Questions
Topic: Convert C code
Replies: 9
Views: 1790

Re: Convert C code

It's hard to tell without seeing more code.
The C conversion looks fine.
It's indeed very important what variable types you used for these variables.
A wrong variable type can cause problems.

Are you sure the problem is with these two instructions ?
I don't know what "z80 all instructions exerciser ...
by wilbert
Wed Apr 23, 2025 6:15 am
Forum: Off Topic
Topic: Is findstring really slow?
Replies: 12
Views: 2916

Re: Is findstring really slow?


But recently I saw someone complain that "findstring" was slow

It depends on what you need it for.
It is especially slower as what you can achieve if you need to do multiple searches on a long string.
In the example code you posted you start FindString at a certain position but all characters ...
by wilbert
Sat Apr 12, 2025 4:24 pm
Forum: Coding Questions
Topic: char in string
Replies: 12
Views: 1390

Re: char in string

Small variation to the code of mk-soft

Code: Select all

Structure ArrayOfChar
  c.s{1}[0]
EndStructure

Define txt.s="Hello world!"
Define *txt.ArrayOfChar = @txt
Define _str.s

len = Len(txt) - 1
For i = 0 To len
_str =_str + *txt\c[i]
Next i

Debug (_str)
by wilbert
Wed Apr 09, 2025 9:27 am
Forum: Coding Questions
Topic: C-backend (x86) with assembler
Replies: 7
Views: 955

Re: C-backend (x86) with assembler

This is not a bug.
You can't use inline asm like this with the C backend.
The ! mark is used for inline C when you are using the C backend.

Procedure.d EnvolverAngulo(angle.d)
CompilerIf #PB_Compiler_Backend = #PB_Backend_C
!return remainder(v_angle, 6.2831853071795865);
CompilerElse
!fldpi ...
by wilbert
Mon Apr 07, 2025 5:50 am
Forum: Coding Questions
Topic: x86 vs x64
Replies: 18
Views: 1539

Re: x86 vs x64


There is a dispute, which executable should be used on Windows-x64 if there are two files x86 and x64?

On x64, a memory pointer is 8 bytes, on x86 it is 4 bytes.
If the software you are running uses a lot of memory pointers like for example it uses a huge linked list, the x64 version of the ...
by wilbert
Thu Feb 13, 2025 12:12 pm
Forum: Tricks 'n' Tips
Topic: Image posterization and dithering (with optional correction for gamma)
Replies: 20
Views: 5382

Re: Image posterization and dithering (with optional correction for gamma)


Because you don't check the blue very much, it misses out on magenta.

My code doesn't check the blue at all.
It's a choice you have to make.
Your red/magenta source image gets brighter at the right.
Your dithered image gets darker at the right.
Personally I don't like that side effect for real ...
by wilbert
Thu Feb 13, 2025 8:01 am
Forum: Tricks 'n' Tips
Topic: Image posterization and dithering (with optional correction for gamma)
Replies: 20
Views: 5382

Re: Image posterization and dithering (with optional correction for gamma)

I realized that I totally messed up my RGBY diffusion dithering code above. :oops:
That's probably why it also didn't work to convert it to a serpentine version.
I corrected and updated the code.
https://www.purebasic.fr/english/viewtopic.php?p=635147#p635147
Hopefully the output will look better ...