New sub forum for sharing small code snippets or small programs lazarus / 8-Other ---------------------------------------------------------------------- JiaXing · 2020-04-28 16:40 I got this idea from the FreeBASIC forum. Our forum lacked a sub box like that. It's for beginners and old people migrated from Turbo Pascal and doesn't good at Lazarus to share their old school small programs or code snippets. ---------------------------------------------------------------------- Thaddy · 2020-04-28 16:48 Well, it may be a good idea to just filter out the programs from this forum, because a lot of some people already write full and working examples over the history of this forum. There are some real gems. And they are more or less tied to a topic. ---------------------------------------------------------------------- Martin_fr · 2020-04-28 18:34 IMHO a forum is not a good tool to maintain a snippet/code database. Though I also have no idea what tools there are for this (nor do I know, how much work any of the actual server admins are willing to put into this). ---------------------------------------------------------------------- lucamar · 2020-04-28 18:46 I would prefer seeing code snippets/examples about some feature in the corresponding wiki page. For "general" kind of things we might also create a page or category in the wiki. In a sub forum or topic those type of posts would tend to get lost quite quickly. Though maybe not as quickly as now  Whatever the case, it would need some curating to maintain the general quality, subjective as that is, wouldn't it? Any volunteer? ETA: BTW, wasn't there a similar topic before? I kind of recall having seen this quite recently, in the last month or two ... ---------------------------------------------------------------------- 440bx · 2020-04-28 19:09 Quote from: Martin_fr on April 28, 2020, 08:34:16 pmIMHO a forum is not a good tool to maintain a snippet/code database. In a way I agree but, one thing that really bugs me is that it is not possible to search the forum for posts that have attachments. If that were possible then the entire forum would be a way for everyone to share small code snippets or programs.  Lots of members have attached interesting examples and there doesn't seem to be a way to get a list of them.  One great advantage of the forum is that it is free form and very dynamic.  The wiki requires being a bit more "organized" and formal and, in addition to that, there is no directly associated thread where a related question can be posted (a new thread can always be created but, it's not quite the same as asking the question directly in the thread where the attachment resides.) Maybe a "solution" might be to adopt a convention whereby anyone who attaches something to a post, includes a string like "[attachment]" (or something along those lines) in the post.  That way, searching for that string would produce a list of posts that have attachments... it's just a thought.  The ideal solution would obviously be for the forum software to be able to search for posts with attachments. ---------------------------------------------------------------------- lucamar · 2020-04-28 19:19 Quote from: 440bx on April 28, 2020, 09:09:36 pmIn a way I agree but, one thing that really bugs me is that it is not possible to search the forum for posts that have attachments. Yep, +1 to that. Also would be nice if there were a way to search for post with embedded code i.e. with one or more [code=pascal] blocks. ---------------------------------------------------------------------- Martin_fr · 2020-04-28 20:12 Quote from: lucamar on April 28, 2020, 09:19:57 pmYep, +1 to that. Also would be nice if there were a way to search for post with embedded code i.e. with one or more [code=pascal] blocks. Have you tried to put exactly that in the search box (no quotes)?  + any other words to search for ---------------------------------------------------------------------- marcov · 2020-04-28 20:23 Then it just needs a team to collect snippets on a github repo, and then use the FPC fultext search engine to index it? Lightweight, and most elements are there already. Then you can also do as add some metadata in comments, and track it over time, build indexes etc. ---------------------------------------------------------------------- avra · 2020-04-28 22:53 I have not seen a good online code snippet system which supports Pascal. Especially not a forum based one. Until then maybe these offline solutions can be of assistance to someone in need: https://github.com/taazz/CodeLibrarian https://github.com/delphidabbler/codesnip ---------------------------------------------------------------------- lainz · 2020-04-29 03:18 I search the forum with Google and most times I find the code that I need in the first results. ---------------------------------------------------------------------- AsleyCruz · 2020-04-29 03:36 Like lainz, I use Google too. Example for browsing just on the forum: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i the title site:forum.lazarus.freepascal.org - Is there any section (on the forum only) to share our applications? Like showcase ---------------------------------------------------------------------- Martin_fr · 2020-04-29 13:01 Quote from: AsleyCruz on April 29, 2020, 05:36:54 amIs there any section (on the forum only) to share our applications? Like showcase Not really, and for a reason. If people actually search the forum before asking their question, the results should not include lots of stuff about other peoples app. Unless the 3rd party tool is a add on package to the IDE.  Or otherwise related to using the FPC/IDE, like fpcupdeluxe. Or, chats that are not so much about the product, as they are about the techniques used to code them (as that again may be something that helps others in their coding experience) I do know that the wiki pages (for showcasing) have very little exposure. So they do not really appeal much for that purpose. They also do not have an option for commenting. However, mind you that "commenting" here, should explicitly refer to something like a thumbs up/down (or 1 to  5 stars), with a real short bit of text. The forum does not offer such a vote-system. If you put the showcase on the forum, you end up with long discussions. Yet, if someone wants to discuss there product at length, then for that they should have their own forum. (exception are the above mentioned rules). This forum is about the FPC and the Lazarus IDE, and it should be kept like that. (Yes there are probably 1 or 2 exception that slipped in, it will be monitored, and if need arises it will be addressed) Our main homepage features the  "random project" and a link to https://wiki.freepascal.org/Lazarus_Application_Gallery The selection of "random projects" from that page is currently really small. If anyone wants to improve that (collect projects, make concise descriptions, prepare the image in the correct size, pack it all together to ONE update every now and then), please get in contact with me. (Don't, if you have just one single app you want to get added. I am not looking to get flooded by everyones individual request ) Same for the "tip of the day" ---------------------------------------------------------------------- trev · 2020-04-29 23:43 Quote from: lucamar on April 28, 2020, 08:46:00 pmETA: BTW, wasn't there a similar topic before? I kind of recall having seen this quite recently, in the last month or two ... Indeed, and it was implemented. See the Wiki How-to Demos Portal.