PureBasic 5.40 LTS beta 10 is out !

Developed or developing a new product in PureBasic? Tell the world about it.
JCV
Enthusiast
Enthusiast
Posts: 580
Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines

Re: PureBasic 5.40 LTS beta 3 is out !

Post by JCV »

Just wondering which library has increased in size. Maybe he used http library that now uses curl?
I'm using before curl dll but now no need. 200kb is small compared to added feature.

http://www.purebasic.fr/english/viewtop ... 36#p470736

[Registered PB User since 2006]
[PureBasic 6.20][SpiderBasic 2.2]
[RP4 x64][Win 11 x64][Ubuntu x64]
supercdfr
User
User
Posts: 54
Joined: Tue Mar 16, 2010 9:28 pm

Re: PureBasic 5.40 LTS beta 3 is out !

Post by supercdfr »

something that i never seen in purebasic but is in c : when you compile, make a warning about orphan variable.

Ex : the variable XXX is define but never use.

It's just a idea.
User avatar
langinagel
Enthusiast
Enthusiast
Posts: 131
Joined: Fri Jan 28, 2005 11:53 pm
Location: Germany
Contact:

Re: PureBasic 5.40 LTS beta 3 is out !

Post by langinagel »

@supercdr
some kind of a lint program would be fine for Purebasic - either inside the compiler or extern.
But this would require to define some common coding rules before:
no orphan variables,
no dead code,
just one procedurereturn per procedure,
...
MISRA rules or JSF could provide some orientation.

..and ..by the way:

THX Fred, Freak and all of PB team for the great work.

just a hint: checkinstall may need an update.

Greetings
LN
https://www.doerpsoft.org

Boost. Work. Efficiency.
User_Russian
Addict
Addict
Posts: 1517
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: PureBasic 5.40 LTS beta 3 is out !

Post by User_Russian »

supercdfr wrote:something that i never seen in purebasic but is in c : when you compile, make a warning about orphan variable.
It is a good idea. It is a pity that the PB is not supported.
Example where necessary.

Code: Select all

EnableExplicit

Procedure.q File_Size(File.s)
  Protected Size.q
  Size=FileSize(File)
  ProcedureReturn Size
EndProcedure

Procedure.q File_Size_2(File.s)
  Protected Size,q
  Size=FileSize(File)
  ProcedureReturn Size
EndProcedure
It seems that these two procedures are identical, but File_Size_2() will return an incorrect result of its file size is greater than 2 GB.
Find this error is difficult.
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

Re: PureBasic 5.40 LTS beta 3 is out !

Post by HanPBF »

As a first, single-pass compiler friendly solution:

Code: Select all

procedure test()
    beginProtected
       a.q
       b.s
       c.d
    endProtected
    ; ...
endProcedure ; test
or

Code: Select all

procedure test()
    var
       a.q
       b.s
       c.d
    endVar
    ; ...
endProcedure ; test
davenull
User
User
Posts: 25
Joined: Sat Sep 17, 2005 5:31 pm
Location: Finland

Re: PureBasic 5.40 LTS beta 3 is out !

Post by davenull »

Great update, thanks!

I was testing the CGI library and it seems that the WriteCGIStringN command doesn't accept the string encoding parameter:

Code: Select all

WriteCGIStringN(Response, #PB_Ascii)
Result:
WriteCGIStringN(): Incorrect number of parameters.

Cheers.
User avatar
langinagel
Enthusiast
Enthusiast
Posts: 131
Joined: Fri Jan 28, 2005 11:53 pm
Location: Germany
Contact:

Re: PureBasic 5.40 LTS beta 3 is out !

Post by langinagel »

There were voices here complaining about big library sizes.
I thought some kind of useless maximum would be interesting to see:

Code: Select all

UseSQLiteDatabase()
UsePostgreSQLDatabase()
UseODBCDatabase()
UseJPEG2000ImageDecoder()
UseJPEG2000ImageEncoder()
UseJPEGImageDecoder()
UseJPEGImageEncoder()
UsePNGImageDecoder()
UsePNGImageEncoder()
UseTGAImageDecoder()
UseTIFFImageDecoder()

UseBriefLZPacker()
UseJCALG1Packer()
UseLZMAPacker()
UseTARPacker()
UseZipPacker()
UseFLACSoundDecoder()
UseOGGSoundDecoder()

InitJoystick()
InitKeyboard()
InitMouse()
InitMovie()
InitNetwork()
InitSprite()

OpenConsole()

Input()
This ended up with 2,248,304 compiled Bytes under 5.40 beta with Ubuntu x86 Linux.

This might be big, but the current PC RAMs range higher. Even Raspberry Pi could work with this...
I have seen other compilers ending up with about 1 MB only for print "hello world".

So...don't worry, be happy.
https://www.doerpsoft.org

Boost. Work. Efficiency.
User avatar
deseven
Enthusiast
Enthusiast
Posts: 367
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: PureBasic 5.40 LTS beta 3 is out !

Post by deseven »

This api function stopped working in the latest beta:

Code: Select all

CreateSemaphore_(0,0,1,"test")
The error is "Bad parameter type, number expected instead of string."
According to msdn, the last parameter should be LPCTSTR. What should i do now? Send a pointer instead?
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: PureBasic 5.40 LTS beta 3 is out !

Post by Keya »

yes change "test" to @"test"
User avatar
deseven
Enthusiast
Enthusiast
Posts: 367
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: PureBasic 5.40 LTS beta 3 is out !

Post by deseven »

Keya wrote:yes change "test" to @"test"
Thanks. Seems to be working.
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 5.40 LTS beta 4 is out !

Post by Fred »

Beta 4 is out ! Thanks all for testing.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: PureBasic 5.40 LTS beta 4 is out !

Post by freak »

The following changes have been made to the VectorDrawing lib since beta 3:
  • The DotPath(), DashPath() & CustomDashPath() commands now have an optional 'StartOffset' parameter
  • The 'Distance' parameter of DotPath() has been changed: It now refers to the distance between the center of each dot (not the space between the dots)
quidquid Latine dictum sit altum videtur
User avatar
deseven
Enthusiast
Enthusiast
Posts: 367
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: PureBasic 5.40 LTS beta 4 is out !

Post by deseven »

Thanks!

However, there is something really wrong with at least some winapi functions.

Try this:

Code: Select all

; this one is ok
MessageBox_(0,"test","test",#MB_OK|#MB_ICONINFORMATION)

; this one will show yes and no buttons if the debugger is on
test.s = "test"
MessageBox_(0,"test" + test,"test",#MB_OK|#MB_ICONINFORMATION)

; this one will die with invalid memory access
test.s = "testtesttest"
MessageBox_(0,"test" + test,"test",#MB_OK|#MB_ICONINFORMATION)

; this one will fail to compile with assembler error (PureBasic.asm [237])
test.s = "test"
MessageBox_(0,"test " + test + "test","test",#MB_OK|#MB_ICONINFORMATION)
User avatar
skywalk
Addict
Addict
Posts: 4210
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: PureBasic 5.40 LTS beta 4 is out !

Post by skywalk »

deseven wrote:Thanks!
However, there is something really wrong with at least some winapi functions.

Code: Select all

[/quote]
[url=http://www.purebasic.fr/english/viewtopic.php?f=4&t=63349]Same problem mentioned here[/url] when concatenating strings in api calls.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 5.40 LTS beta 5 is out !

Post by Fred »

Beta 5 is out and only fix one bug with API and string concatenation (which could prevent further testing). On a side note, we have signed the OS X apps since the 5.40 beta, can OS X users tests if it works with gatekeeper activated ? The IDE should open after displaying a warning message without changing the default security features.
Post Reply