PureBasic-Reference-Wikipedia

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Splunk
User
User
Posts: 36
Joined: Wed Apr 21, 2021 6:53 pm

PureBasic-Reference-Wikipedia

Post by Splunk »

The "PureBasic-Reference", its description, hints and examples often turns out quite scarce and often it leaves more questions open than it answers. Also because of this -but not only- there is this forum to answer such questions. (eg. my last post: viewtopic.php?t=81949)

For the "PureBasic-Reference" I have therefore the following suggestion:

How would it be, if the PureBasic-Team would create something like a "PureBasic-Reference-Wikipedia" on their website, which all users of the forum could edit with more examples, additional descriptions, tips&tricks about the topic or whatever? (no discussions or anything...just facts!).

It happens often enough that questions are asked here in the forum that have already been answered several times. If it is found that the question results from the fact that the necessary information is missing in the reference, it is easy to add it. This would also relieve the PureBasic-Team.

Eventually you would have a reference that would provide ultimate answers.

What do you think about this?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic-Reference-Wikipedia

Post by Fred »

If you want to contribute to enhance the doc, you can do it on the github here: https://github.com/fantaisie-software/purebasic . It's not as easy than a wiki but it will be reflected in the IDE and online help which is great.
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

Re: PureBasic-Reference-Wikipedia

Post by Janni »

I very much agree with Splunk.
Often the examples are short or just too tricky understand (to us newcomers).

Contributing to the official help file is just for the pro's - I would never have the confidence to do it.

An easy way to add examples would easily improve people's understanding of many concepts. Forum is often a needle in the haystack.
Wiki is great, and also PHP.net is a good example where they have "user contributed notes" that everyone can vote up or down.
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: PureBasic-Reference-Wikipedia

Post by blueb »

Janni wrote: Thu Jul 06, 2023 7:16 am I very much agree with Splunk.
Often the examples are short or just too tricky understand (to us newcomers).
A good PureBasic source is the Rosetta Code site with about 600 PureBasic examples.

https://rosettacode.org/wiki/Category:PureBasic
- It was too lonely at the top.

System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

Re: PureBasic-Reference-Wikipedia

Post by Janni »

blueb wrote: Thu Jul 06, 2023 12:26 pm
Janni wrote: Thu Jul 06, 2023 7:16 am I very much agree with Splunk.
Often the examples are short or just too tricky understand (to us newcomers).
A good PureBasic source is the Rosetta Code site with about 600 PureBasic examples.

https://rosettacode.org/wiki/Category:PureBasic
Thank you! nice to know.
I still think a better solution would be what's mentioned within the Purebasic domain.
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: PureBasic-Reference-Wikipedia

Post by Tenaja »

Janni wrote: Thu Jul 06, 2023 12:37 pm
blueb wrote: Thu Jul 06, 2023 12:26 pm
Janni wrote: Thu Jul 06, 2023 7:16 am I very much agree with Splunk.
Often the examples are short or just too tricky understand (to us newcomers).
A good PureBasic source is the Rosetta Code site with about 600 PureBasic examples.

https://rosettacode.org/wiki/Category:PureBasic
Thank you! nice to know.
I still think a better solution would be what's mentioned within the Purebasic domain.
The biggest problem with Rosetta is that most of the examples look like they weren't written by an experienced PB user. They appear to be copied and modified from another example. That process isn't bad if done by an expert, but otherwise misses out on many features that make PB stand out.

Somebody with free time could remedy that, and correct some misconceptions that Rosetta conveys. It should be done... In addition to an official pb wiki, which has been suggested before.
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: PureBasic-Reference-Wikipedia

Post by Demivec »

Tenaja wrote: Thu Jul 06, 2023 1:27 pm The biggest problem with Rosetta is that most of the examples look like they weren't written by an experienced PB user. They appear to be copied and modified from another example. That process isn't bad if done by an expert, but otherwise misses out on many features that make PB stand out.

Somebody with free time could remedy that, and correct some misconceptions that Rosetta conveys. It should be done... In addition to an official pb wiki, which has been suggested before.
The code examples on the Rosetta Code site serve a different need than those in the PB Reference Manual. Rosetta's purpose is to demonstrate how to accomplish a specific task in different languages. The examples in the PB Reference are to illustrate the use of a PureBasic language or library feature. Both sets of examples are typically written without wasting lines of code on extraneous elements, such as using an elaborate GUI for code that is written to show how to use math operators.

Many PureBasic examples on Rosetta Code were written in 2010. Many examples in the PB Reference Manual were written before 2005 or were written at the time a new feature or library was first added.

Any reference source is easy to do and complete in every way if the task is handed over to an 'expert' who has 'some free time'. :wink:

Rosetta Code is a Wiki and anyone could make modifications there, line by line if needed. A PureBasic Wiki was done before but eventually died on the vine after a few years. Here's a link to some discussions in the forum about it, https://www.purebasic.fr/english/viewtopic.php?p=112054&hilit=Wiki#p112054. They have a familiar ring to them.

After all that background, my opinion is that many of the examples in the Reference Manual can definitely be improved. Things start to get more complicated when you try to answer some of the questions that come next (in no particular order):
  • How should the existing examples be improved?
  • Should code include EnableExplicit?
  • How should code be commented (none, minimal, verbose) ?
  • Should code use Debug statements or a GUI for output?
  • How should variables be named and what capitlization, if any, should be used?
  • Should examples for different commands and librarys utilize identical structures or invent new structures for variety?
  • Should object IDs be numeric constants, enumerated constants, or generated with #PB_Any?
  • Should several short code samples be included or one longer one that combines the short ones?

I followed the link that Fred posted earlier for GitHub but it didn't seem to help me discern what I could do to help in any way or if things are even moving along there.
moricode
Enthusiast
Enthusiast
Posts: 162
Joined: Thu May 25, 2023 3:55 am

Re: PureBasic-Reference-Wikipedia

Post by moricode »

+1 , agree with Splunk, the DOC is outdated long and miss out many new informations and extensive examples ,
many examples were found same as is PB 4.x , and there was some "undocumented" features suppose to be documented
some way but was left out ages.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic-Reference-Wikipedia

Post by Fred »

I don't agree, the doc is kept up-to-date with current features, if you find something wrong, please report it in the doc bug forums. If you want to submit more examples for a single command, you can also open a thread with your new example and it will be added.
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: PureBasic-Reference-Wikipedia

Post by AZJIO »

Splunk
I made my own selection, but everyone has their own preferences, so it's all purely individual. And on the forum you can find if you try different requests. Sometimes the answer is hidden in a lot of results, then I use the output of results only in the topic title. So experiment and find what you are looking for.
My reference
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PureBasic-Reference-Wikipedia

Post by Little John »

Demivec wrote: After all that background, my opinion is that many of the examples in the Reference Manual can definitely be improved. Things start to get more complicated when you try to answer some of the questions that come next (in no particular order):
Yes, there is something to discuss. :-)
Anyway, a first obvious step is e.g. to use constants with meaningful names, rather than using 0 for different purposes.

By the way, hopefully someone will change the title of this thread, which is wrong and misleading:
This thread is about a PureBassic wiki, while wikipedia is this: https://www.wikipedia.org
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: PureBasic-Reference-Wikipedia

Post by AZJIO »

Demivec
Not a single question is confusing.
Since there are many window elements, in each example you can show different programming options.
EnableExplicit - only for large examples. You can use one "EnableExplicit" for every 10 examples so that the user can quickly see it and look at the description of what it is for.
Standard debugger "Debug".
Variable names can be discussed. I've never had any problems with this.
Structures do not need to be invented, except for structures in the structure section
Identifiers are always constant (#btn) or #PB_Any, alternating between options, but NEVER use numbers. Why show the wrong way of programming and then get rid of it. That is, I copy the example from the help and start changing numbers to constants. I would rather not do this useless work.
Examples can be made large if their concise versions increase the overall size of the code through repetition.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic-Reference-Wikipedia

Post by Fred »

I setup a wikimedia here: https://www.purebasic.com/wiki/index.php/Main_Page, feel free to toy with it. BTW @AZJIO your reference is very nicely done !
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

Re: PureBasic-Reference-Wikipedia

Post by Janni »

Fred wrote: Fri Jul 07, 2023 1:51 pm I setup a wikimedia here: https://www.purebasic.com/wiki/index.php/Main_Page, feel free to toy with it. BTW @AZJIO your reference is very nicely done !
That's really great Fred! :D

I hope people will contribute with examples! May I suggest that all articles uses the same name as from the official PB commandindex (https://www.purebasic.com/documentation ... index.html)

That way a dynamic link to the wiki can even be added under examples in the official docs.

First page: https://www.purebasic.com/wiki/index.php/ACos
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
Splunk
User
User
Posts: 36
Joined: Wed Apr 21, 2021 6:53 pm

Re: PureBasic-Reference-Wikipedia

Post by Splunk »

:mrgreen:

I think Fred is not a fan of long discussions - he does!
Post Reply