Just some little Requests :-)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Just some little Requests :-)

Post by Tranquil »

Hello Forum.

I'm an longtime user of PB and unfortunately, requirements to my favorite language for quick development, rises faster as the language itself. Currently, I'm at a point of thinking about switch to Java, which is not really in my favor but maybe a must. So I spend some time to collect some feature requests to keep PB as most as strong as other modern languages.

1.) Allow Overloading of Procedures with different signatures
2.) Date-Library: use 64 Bit values
3.) HTTP Library: native support of HTTPs connections
4.) Cipher: add functions to create string fingerprints (it took me at least an hour to find out, how to create a correct MD5 hash of a password for a swagger-api driven server)
5.) Better multimedia support. Maybe by supporting LibAV or MadVR (depending on the license, dont know them). For the Licensing issue with some external frameworks, I wish to have ...
6.) Paid AddOns which support the integration of frameworks which are not been able to redistributed with PB. This is also a good opportunity for the PB team to generate new benefits. :-)
7.) A better IDE. Sry to mention that, but the inbuild IDE is not that what a modern language is going to have.
8.) Networklib: a getlasterror() command that is harmonized with other platforms
9.) Database Lib: TimeOut for DatabaseUpdate and DatabaseQuery command
10.) Database Lib: ExecuteSQL() which executes a complete Script. I have problems with scripts that need commands before the SELECT query starts as DatabaseQuery only seem to work with one SQL command.
11.) ProcessLib: ReadProgramError() to support to read to a buffer which can be more then one line (required for ffmpeg for ex.)
12.) Allow Windows in Threads again. (I know this has been discussed a lot. In Windows it is allowed, Java does it always... why should we handle all the overhead from the threads to the mainloop for ex via the windows message queue?

Maybe more.... :-)
Tranquil
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Just some little Requests :-)

Post by luis »

Tranquil wrote: 1.) Allow Overloading of Procedures with different signatures
Already requested (more than once I believe) -> http://www.purebasic.fr/english/viewtop ... =3&t=55335

That's the kind of things I would prioritize more than mere libraries additions which, if really pressed about, can implement by myself a way or another. But I understand others can legitimately have a different opinion.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Just some little Requests :-)

Post by Tenaja »

If you do not like the IDE, then why are you using it? There are numerous free IDE's available...and I'd bet that any IDE that works with Java will also work with PB.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Just some little Requests :-)

Post by Tenaja »

...also, it seems like a few of your requests are not even native in Java. If you can download a lib for Java, you can download one for PB.
User avatar
TI-994A
Addict
Addict
Posts: 2704
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Just some little Requests :-)

Post by TI-994A »

Tranquil wrote:7.) A better IDE. Sry to mention that, but the inbuild IDE is not that what a modern language is going to have.
Hello Tranquil. To remain conducive to beginners and novice programmers, which I believe is PureBasic's target demographic, the clean and simple design of the current IDE should be maintained.

While the seasoned programmer would much prefer to have an interface chock-full of bells and whistles, it might deter new uninitiated users who find such interfaces overwhelming and not so user-friendly.

Perhaps a third party IDE for the experts, as Tenaja had suggested. :D
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
sancho2
User
User
Posts: 44
Joined: Wed Apr 15, 2015 5:14 am

Re: Just some little Requests :-)

Post by sancho2 »

Tranquil wrote:7.) A better IDE. Sry to mention that, but the inbuild IDE is not that what a modern language is going to have.
Its kind of ironic that I would truly welcome this IDE over in freebasic.
That said I would love it if the IDE was extensible, much like VB was (although overly complicated). It would be great if the programmer could develop add-ins that directly interacted with the menu bar, tool bar, and especially open source documents.
The tools are great but as far as I can tell the best you can do is work with the save files.
I built myself a couple of tools like that. One where it creates a source code file with pre-loaded documentation. This then needs to be opened manually for further code editing.
The other which put procedure declarations into the clipboard so then you just page-up to where you are declaring them and press shift insert.
It would be cool if the user driven part of these operations could be automated.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Just some little Requests :-)

Post by Shield »

1.) Allow Overloading of Procedures with different signatures
Definitely, this is something I've missed every time. Probably not easy to implement in
PB since it's not typed strictly enough, though certainly possible to some degree.

2.) Date-Library: use 64 Bit values
+1

3.) HTTP Library: native support of HTTPs connections
+1, needed this too before.

4.) Cipher: add functions to create string fingerprints (it took me at least an hour to find out,
how to create a correct MD5 hash of a password for a swagger-api driven server)

Well, it's not that difficult...

5.) Better multimedia support. Maybe by supporting LibAV or MadVR (depending on the license, dont know them).
For the Licensing issue with some external frameworks, I wish to have ...

Don't need, don't care.

6.) Paid AddOns which support the integration of frameworks which are not been able to redistributed with PB.
This is also a good opportunity for the PB team to generate new benefits. :-)

Well, that's never going to happen. :lol:

7.) A better IDE. Sry to mention that, but the inbuild IDE is not that what a modern language is going to have.
Meh, it's good enough I think. I'm missing some auto-complete features, but other than that
it's pretty nice compared to other IDEs for languages in PB's category.

8.) Networklib: a getlasterror() command that is harmonized with other platforms
Sure, why not. I'm always for better error handling. *caugh* Try / Catch anyone?

9.) Database Lib: TimeOut for DatabaseUpdate and DatabaseQuery command
I don't work with DBs in PB, but sure, sounds useful / necessary.

10.) Database Lib: ExecuteSQL() which executes a complete Script. I have problems with scripts that need commands
before the SELECT query starts as DatabaseQuery only seem to work with one SQL command.

Same as above.

11.) ProcessLib: ReadProgramError() to support to read to a buffer which can be more then one line (required for ffmpeg for ex.)
Don't know how it currently works, so no comment.

12.) Allow Windows in Threads again. (I know this has been discussed a lot. In Windows it is allowed,
Java does it always... why should we handle all the overhead from the threads to the mainloop for ex via the windows message queue?

Technically +1. However, this is probably not possible (anymore) due to PB's internals. While it is certainly allowed to create different windows in different threads,
it is not possible to split the message handling as window creation and message loop have to belong to the same thread. Java does use multiple threads,
however all events are always mapped back to the GUI thread. The same applies to, say, C# with WinForms where code from outside the GUI thread
must be routed specifically to avoid that issue.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Opcode
Enthusiast
Enthusiast
Posts: 138
Joined: Thu Jul 18, 2013 4:58 am

Re: Just some little Requests :-)

Post by Opcode »

3.) HTTP Library: native support of HTTPs connections
+1 probably one of the biggest missing features in PB.

It would be nice to have a fluid HTTP(S) library with cookie support and all of that. Using the WebGadget in a hidden window works but is not exactly the proper way.
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Just some little Requests :-)

Post by Keya »

A "Multi-OS" subforum in the "OS Specific" area please!!! a Topic Search for 'cross platform' alone found 95 results, there's already a lot to start it with :) :) and its one of Purebasics strengths, so a subforum would help grow that strength! (and make some searches easier!)
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Re: Just some little Requests :-)

Post by LuckyLuke »

2.) Date-Library: use 64 Bit values
Nice to have.
3.) HTTP Library: native support of HTTPs connections
Needed for new project. Please please please :D

Maybe we should start a Purebasic Library project where members can work together on some missing functionality ?
e.g. grid created by Said would be a nice starting point.

LuckyLuke
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Just some little Requests :-)

Post by Trond »

You have some suggestions, but you don't point out clearly what you want / what is wrong with the current situation.
Tranquil wrote:4.) Cipher: add functions to create string fingerprints (it took me at least an hour to find out, how to create a correct MD5 hash of a password for a swagger-api driven server)
The help file has an example:

Code: Select all

test.s = "This is a test string!"
Debug MD5Fingerprint(@test, StringByteLength(test))
What is wrong with it?
Different systems will always do things differently. Of course, if the swagger-api doesn't specify how it wants things it will take some guesswork, but that's not a PB problem.
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Just some little Requests :-)

Post by Little John »

Trond wrote:
Tranquil wrote:4.) Cipher: add functions to create string fingerprints (it took me at least an hour to find out, how to create a correct MD5 hash of a password for a swagger-api driven server)
The help file has an example:

Code: Select all

test.s = "This is a test string!"
Debug MD5Fingerprint(@test, StringByteLength(test))
What is wrong with it?
Functions in PB's cipher library such as Base64Encoder() and MD5Fingerprint() are not string functions, but operate on memory areas. However, they are often used with a string address, like in the example that you posted. Using such a function this way, the results will be different, depending on whether the program is compiled in ASCII mode or in Unicode mode. According to the posts of the last years here, most people do not expect/want that.

IMO the functions in the cipher library themselves are OK, but the information in the help file is rather misleading and incomplete. The difference between plain memory and strings in this context should be mentioned. And the first example should be one which uses a memory area, because that is the basis. Additionally, there should be an example how to use the functions properly with strings (i.e. yielding the same results in ASCII and in Unicode mode), because people often want to do so. Or the functions could get an additional optional format parameter for proper string handling. For more details please see MD5FingerPrint in Unicode.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Just some little Requests :-)

Post by Trond »

It seems from this topic (http://www.purebasic.fr/english/viewtop ... 5&start=15) that the OP needed the MD5 of an UTF-8 string, which wouldn't be solved by making MD5Fingerprint() take a string.

That's why I said the first post didn't include enough information about what he wanted.
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Just some little Requests :-)

Post by Little John »

Hello Trond,

I didn't want to contradict you. I am really sorry if you had this impression after reading my previous post.
I just wanted to outline existing issues with PB's cipher library, and how to fix them (mainly by writing a better documentation).
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Just some little Requests :-)

Post by Trond »

Ok. :)
Post Reply