PureBasic 4.20 Beta1 (Windows) -- Happy New year!

Developed or developing a new product in PureBasic? Tell the world about it.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

PureBasic 4.20 Beta1 (Windows) -- Happy New year!

Post by freak »

Hello everybody,

After one week of playing with your Christmas presents and getting bored of them,
now is the time to try out something real cool... a new PB version! :)

It comes with a ton of new libraries, some useful new debugger features, and of course: DirectX9 support!

Here is the news:

Code: Select all

- Added: Mail library
- Added: Ftp library
- Added: RegularExpression library
- Added: Http library
- Added: SerialPort library
- Added: FLAC library
- Added: SQLite library
- Added: DirectX 9 subsystem

- Added: #PB_Sound_MultiChannel
- Added: Streaming for OGG and FLAC
- Added: Streaming support for CatchSound()

- Added: #PB_Compiler_Procedure
- Added: #PB_Round_Nearest support (+#PB_Round_Up and #PB_Round_Down) for Round()
- Added: CreateImageMenu(), CreateImagePopupMenu() for Office-style menus
- Added: #PB_Button_Toggle for ButtonImageGadget()
- Added: SetGadgetAttribute() with #PB_Button_Image and #PB_Button_PressedImage for ButtonImageGadget

- Added: SHA1FingerPrint() and SHA1FileFingerPrint()
- Added: ExamineMD5Fingerprint(), ExamineSHA1Fingerprint(), NextFingerprint(), FinishFingerprint()
- Added: CRC32FileFingerprint()
- Added: new parameter for CRC32Fingerprint() for start value

- Changed: last Mid() parameter optional

IDE / Debugger:

- Added: New "Profiler" tool for the Debugger menu to monitor how often lines are called in the code.
- Added: Debugger can now evaluate expressions (see Debug output)
- Added: The Memory Viewer can accept any expression as the start/end address
- Added: Adding a "+" at the "end address" field of the Memory viewer makes the end address relative
- Added: Placing the mouse over a Variable will display its value while the program runs.
- Added: Selecting a more complex expression and placing the mouse over it will evaluate the expression in
         the running program (if possible)

You can download it on your user account as usual. Keep in mind that things like the DX9 subsystem
still need a lot of testing, so don't be surprised of a few glitches and please report any problems
you encounter. Lets do some beta testing! :)

Linux and OSX Betas will follow soon.

The manual is not up to date yet, so here is some more information on the new things:

Libraries / Commands

The readme of the beta package comes with a list of new commands in these libraries and
some basic example codes. If things are unclear, just ask on the forum. The Alpha testers
already have some experience with them, and we can give further information as well.

On a sidenote: We switched the compiler used to compile the PB libraries on Windows to VC8, which should
provide a better code quality. The GUI libraries which are usually very big are optimized
for size, while the other libraries where speed is more important are optimized for speed.

The Profiler tool

A profiler analyzes the performance of a program with the goal to show areas which
slow the program down and where improvement would make most sense.
The profiler included with PB counts the number of times each source line is executed.
It collects no timing information (as other profilers do), because this information would
be false anyway from the precence of the debugger.

Inside the profiler window (Debugger->Profiler in the menu), the recoring of line calls
can be controlled with the buttons on the left side. Start, Stop, Reset enables/disables
the recording or sets all counts to 0. Update will request the latest data from the executable
for display.

The collected data can then be viewed in the graph one file at a time, or multiple files
at once to easier compare them. For programs with multiple source files, the list at the
bottom also shows how many lines were executed in each file to get a quick overview
where the program spends its time.

By default the profiler starts recording from the start of the executable, but this
can be also disabled in the preferences. (there is no big speed impact though, so this does not hurt.)


Expression evaluation in the debugger

The debugger is now able to evaluate PB expressions (actually calculations only, no keywords),
which makes it possible to easily get the value of a variable, an array field, or anything else
from the running program.

Things like the following can be evaluated:
"SomeArray(2, SomeVariable*5, A+B)\Structurefield[more_calculations*100]"

Variables, Arrays, Lists even pointers that are visible in the current scope can be used.
Furthermore label pointers and constants (both from residents and from the code) can be accessed.
Also functions from the Math, Memory and String libraries are available. (only those that have no side-effects, so no PokeX() etc)

What cannot be evaluated:
- Procedures from the code
- PB functions except for those mentioned above.


This new evaluation possibility finds its place in multiple places:

- In the debug output window, you can enter expressions which will be evaluated and the result
displayed, to quickly view any variable or other data from the program.

- In the memory viewer, the start and end addresses can be given as expressions as well.
Furthermore, if the end address starts with a "+", it will be interpreted relative to the start one.

Examples:
"*MyBuffer" to "+1000" - shows the 1000 bytes at the address in *MyBuffer
"@Array(5)" to "@Array(10)" - shows the memory occupied by the array elements between 5 and 10

- While the programm is running, placing the mouse cursor over a variable will show its value (if the variable is in scope)

- To see the value of a more complex expression in the code, select the entire expression and place the cursor
over it to get the evaluated result displayed.



Finally

We wish to thank everyone who helped support the PureBasic development through feedback, bugreports
and participating in the forum community during the last year. We wish you all a happy new Year 2008 and may it bring a lot of new
PB Versions! :)

The PureBasic Team
quidquid Latine dictum sit altum videtur
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Nice!
The Human Code Machine / Masters' Design Group
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

I am the first!
[Shit! Im the second!] LOL

Thank you.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

IceSoft wrote:I am the first!
[Shit! Im the second!] LOL

Thank you.
Wrong, third :P
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Berikco wrote:
IceSoft wrote:I am the first!
[Shit! Im the second!] LOL

Thank you.
Wrong, third :P
:D



Thanks!
Dare2 cut down to size
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Happy new year, and thanks again for the support, PureBasic couln't be without you all !

A small speed test to illustrate the VC8 optimisations:

Code: Select all

#Size = 100000000
*Pointer = AllocateMemory(#Size)

a.l = ElapsedMilliseconds()

	a$ = MD5Fingerprint(*Pointer, #Size)

s = ElapsedMilliseconds()-a

MessageRequester("",Str(s))
On my computer:

v4.10: 1250 ms
v4.20: 600 ms

8)
Last edited by Fred on Sun Dec 30, 2007 10:46 pm, edited 2 times in total.
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

Brilliant, I'm off to get it now. Happy New Year to the team and everyone else. :D :D
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

:shock: :P :P :P :D ! Happy New Year !!!

Darn! you just FORCED me to reboot to Windows !!! :lol:

Thanks so much ... runs off to do some testing !!!

Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Post by storck »

Thank you very much for the new beta and a happy new year to all of you!

/ Storck
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

@Team Could you please give us some more info about the new DX9 subsystem? What's supported and what's not? By simply changing the subsystem to DX9 I'll get some weird effects. My game shows only some border gfx and freezes. I'll try to hunt down, what's causing the troubles.
The Human Code Machine / Masters' Design Group
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

BTW:

Happy new year to the hard-working PureBasic team.

In appreciation of your efforts, you guys can have some time off in July 2011. Let's say the first Saturday afternoon, 3pm to 6:30pm.
Dare2 cut down to size
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

THCM wrote:@Team Could you please give us some more info about the new DX9 subsystem? What's supported and what's not? By simply changing the subsystem to DX9 I'll get some weird effects. My game shows only some border gfx and freezes. I'll try to hunt down, what's causing the troubles.
The nativ DirectX9 subsystem is called DirectX9 not DX9
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

thanks pb-team for your great effort. i wish you guys and of course the other pb members a happy new year.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

@IceSoft I was too lazy to write DirectX9 and yes I chose the right subsystem. By the way the old DX9 subsystem made by Stefan works quite good, but is quite slow and I can't use Ogre with it.

@Team I replaced all DisplayTransparentSprite by DisplaySprite and I'm loading all gfx data to the videocard now. There seems to be a problem with clipsprite. I'll investigate further.
The Human Code Machine / Masters' Design Group
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Fred wrote:On my computer:

v4.10: 1250 ms
v4.20: 600 ms

8)
V4.10: 862 ms
v4.20: 390 ms :)
Post Reply