Page 22 of 23
Re: PureBasic 6.10 LTS is out !
Posted: Wed Apr 10, 2024 3:08 pm
by Psychophanta
jacdelad wrote: Wed Apr 10, 2024 12:03 pm
What do you mean by accurate? It's more important to calculate 2+2 than to return the right result??
?
Indeed, I forgot tou add that "accurate" is always a subjective and relative thing, while the other 2 are purely objective.
@skywalk, also indeed. It is reductionism. Lets say it is referred to most generic codes.

Re: PureBasic 6.10 LTS is out !
Posted: Wed Apr 10, 2024 3:50 pm
by jacdelad
I meant calculate it fast than accurate, my fault. But seriously, what do you mean by "accurate"?
Re: PureBasic 6.10 LTS is out !
Posted: Wed Apr 10, 2024 5:11 pm
by skywalk
As Psychophanta said, accuracy can be subjective.
Search the forum for examples of math errors when mixing integers and floats.
The results depend on the order of the algebraic expression and can be very hard to find.
For floating point calculations, I prefix "0.0+" to force a floating point result.
Otherwise you run afoul of implied casting to integer and zero's or overflows appear.
Maybe I should rephrase "accuracy" as "defined behavior".
Whenever the compiler ventures into undefined behavior, I want a warning.
Re: PureBasic 6.10 LTS is out !
Posted: Sun Apr 14, 2024 10:45 pm
by PoorMan
Great job, thanks!
Can you make the output file smaller? In V6.1, it's five/six times bigger than before.
Re: PureBasic 6.10 LTS is out !
Posted: Sun Apr 14, 2024 11:31 pm
by jacdelad
Seriously? Is this the "someone asks this every day"-topic now? This is getting boring...
Re: PureBasic 6.10 LTS is out !
Posted: Mon Apr 15, 2024 4:29 am
by idle
PoorMan wrote: Sun Apr 14, 2024 10:45 pm
Great job, thanks!
Can you make the output file smaller? In V6.1, it's five/six times bigger than before.
on windows it's bigger because the c runtime (crt) has been updated for compatibility and security reasons.
the size hardly makes a difference unless your still using 1.44 floppy disks and a 10mb HD
Re: PureBasic 6.10 LTS is out !
Posted: Mon Apr 15, 2024 6:04 am
by useful
PoorMan wrote: Sun Apr 14, 2024 10:45 pm
Great job, thanks!
Can you make the output file smaller? In V6.1, it's five/six times bigger than before.
For those who care so much about size, you can embed the final UPX package directly into the IDE. It seems the license will allow it.
https://upx.github.io/
Re: PureBasic 6.10 LTS is out !
Posted: Mon Apr 15, 2024 7:43 am
by Marc56us
UPX simply compresses the EXE file. Once launched, the program is decompressed into memory, so the size in RAM does not change during execution.
No use since we no longer use floppy disks or analog modems.
Data transmitted over the Internet is also already compressed by the hardware whenever possible, so there's no benefit to transmission speed either.
EXE compressors also sometimes have the opposite effect on anti-virus software: they become suspect.

Re: PureBasic 6.10 LTS is out !
Posted: Mon Apr 15, 2024 8:04 am
by Psychophanta
The bottom line is not about getting the smallest in size, that too, but about efficiency of a compiler.
Saying or believing that size does not matter because we have gigabyte or tera data in our storage devices, is the SAME as saying that speed does not matter because we have more than 50 years of life.
The same applies to the case of microcontrollers and their consumption. Of course it matters, but not for the consumption itself, that too, but for the elegance and efficiency of a system.
Efficiency is like economics, the true meaning of "economics"; it is not only about consuming the minimum, that too, but about producing the minimum.
Re: PureBasic 6.10 LTS is out !
Posted: Mon Apr 15, 2024 8:24 am
by BarryG
Marc56us wrote: Mon Apr 15, 2024 7:43 amEXE compressors also sometimes have the opposite effect on anti-virus software: they become suspect.
With UPX it's no problem because it's so well-known that every AV just decompresses the exe before scanning.
Re: PureBasic 6.10 LTS is out !
Posted: Mon Apr 15, 2024 12:15 pm
by AZJIO
Yesterday I wanted to respond about UPX, but I didn’t send it. Yes, antivirus programs unpack it, but they may assume that the compressed UPX is not a company product, so they probably add a risk rating. And I also
read yesterday that the program loads only the executable part of the code into memory, and makes the rest a virtual copy and loads what is needed when needed. When you minimize a program, it does not go into a swap file but into a virtual copy of itself on disk, that is, it is read from itself again. If the program is in UPX, then it is all loaded into memory, and when minimized, it is unloaded into a swap file. Now everyone has a lot of memory, so this problem is insignificant.
Re: PureBasic 6.10 LTS is out !
Posted: Thu Apr 18, 2024 10:50 pm
by SPH
UPX is ok for programs without icon

Re: PureBasic 6.10 LTS is out !
Posted: Fri Apr 19, 2024 1:08 am
by DeanH
Marc56us wrote: Mon Apr 15, 2024 7:43 am
EXE compressors also sometimes have the opposite effect on anti-virus software: they become suspect.
Yes! When I tried UPX, the compressed exe's were declared the exe malicious, not just suspicious, by three different AV systems.
I discovered exe's embedded in BriefLZ compressed files appear to be not scanned by AV systems until they are unpacked. I mainly use BriefLZ format or LZH to distribute updates to my users.
Re: PureBasic 6.10 LTS is out !
Posted: Fri Apr 19, 2024 11:37 am
by BarryG
Marc56us wrote: Mon Apr 15, 2024 7:43 amEXE compressors also sometimes have the opposite effect on anti-virus software: they become suspect.
Hmm, not in my experience. Like I said, my apps get several false positives without UPX, and none with UPX.
But I also manually replace the 3 x "UPX" text bytes from the file header of the exe with zero bytes, so maybe that's confusing the AV apps into thinking it's not UPX-compressed?
And maybe it depends on the UPX flags used to compress? I alway use "--best" only.
Here's the VirusTotal scan of my UPX-compressed exe ->
https://i.imgur.com/TOPoE5Q.png
Re: PureBasic 6.10 LTS is out !
Posted: Fri Apr 19, 2024 12:06 pm
by Caronte3D
BarryG wrote: Fri Apr 19, 2024 11:37 am
But I also manually replace the 3 x "UPX" text bytes from the file header of the exe with zero bytes...
What a good idea!
