Page 1 of 1

Broken sourcecode

Posted: Tue Dec 10, 2019 6:56 pm
by utopiomania
Is updates to newer PB versions still breaking old sourcecode? It's a fantastic language, but the fact that
a new update meant endless hours of fixing errors in programs and libraries of sourecode written
in the prior versions made me leave, somewhere between 2007 and 2013.
Is PB still this way? Do you still change syntax and brake old code with each update?

Re: Broken sourcecode

Posted: Tue Dec 10, 2019 7:09 pm
by mk-soft
There are sometimes major updates that require a major adjustment of the code.

Problems are usually caused by user libraries where you don't have source code for it. These are then mostly no longer compatible with the current version of PB.

For some projects I do this adjustment for myself.
But for very old projects I still use the appropriate PB compiler.
You can install several versions and all versions are available in the museum ;)

Translated with www.DeepL.com/Translator (free version)

Re: Broken sourcecode

Posted: Tue Dec 10, 2019 7:12 pm
by Tenaja
It is very rare, but there was an update between 5 and 5.2 that changed pointer declaration--that is the one "big" change. There have been some occasional updates to make commands more consistent (i.e. renamed SoundFrequency() to SetSoundFrequency() )

View the change log:
https://www.purebasic.com/documentation ... story.html

None of the changes are difficult to accommodate, and the "breaking" changes offer errors that make them easy to deal with.

I hope you come back.

Re: Broken sourcecode

Posted: Tue Dec 10, 2019 7:15 pm
by Tenaja
Regarding the pointer update, it's easy to deal with--it's basically deleting the .i from the declaration. You get errors, so unless you have thousands and thousands of them, it's not hard, and in that case you could write a simple regex to fix them all at once.

Re: Broken sourcecode

Posted: Tue Dec 10, 2019 7:42 pm
by IdeasVacuum
The major issue is User Libs that are very useful but not kept up to date for a variety of reasons (including, unfortunately, the mortal loss of the developer).

Steer clear of anything you don't have the source code for and the updates have very little effect - most can be fixed with a simple find-replace.

Re: Broken sourcecode

Posted: Tue Dec 10, 2019 7:57 pm
by utopiomania
Ok, the changelog, use the appropriate compiler from the museum if necessary, and everything
isn't as gloomy as I remeber.. Sorry about that, but is my favourite, the webgadget still going strong ?

Re: Broken sourcecode

Posted: Tue Dec 10, 2019 8:10 pm
by mk-soft
The WebGadget works as usual. But there are also new HTTP functions.

The only problem at the moment is Linux with the new versions (Ubuntu 19.xx). There are some LibWebKit libraries missing which need PB.

Re: Broken sourcecode

Posted: Wed Dec 11, 2019 6:16 am
by Tenaja
IdeasVacuum wrote:Steer clear of anything you don't have the source code for and the updates have very little effect - most can be fixed with a simple find-replace.
Thankfully, I've kept that philosophy.

Updates that break code are always annoying. On the other hand, there are always compelling reasons to do so, so I always view it as growing pains. Heck, even C has changed a bit, and it doesn't even have any "native libraries" to speak of. I learned it back when the function declarations had the variables after the declaration... It's goofy looking now when I look at it.

Re: Broken sourcecode

Posted: Wed Dec 11, 2019 6:19 am
by Tenaja
mk-soft wrote:The WebGadget works as usual. But there are also new HTTP functions.

The only problem at the moment is Linux with the new versions (Ubuntu 19.xx). There are some LibWebKit libraries missing which need PB.
Do a search, I think I recall someone here making an alternative based on an open source browser (chromer?). You'd likely have to use a library if that's the case, but at least if it's os you could update if necessary.