Recent

Author Topic: Uploading all project code for wiki samples in .zip format  (Read 6718 times)

ArminLinder

  • Sr. Member
  • ****
  • Posts: 316
  • Keep it simple.
Uploading all project code for wiki samples in .zip format
« on: February 01, 2022, 12:28:59 pm »
Hi all,

I wanted to contribute to the wiki and provide a complete code sample (including the lfm files) in zip format. Unfortunately the wiki will let me only upload several graphics file formats, but no zip archives.

Is there a way to provide a complete code sample project?

Thnx, Armin.
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

wp

  • Hero Member
  • *****
  • Posts: 12457
Re: Uploading all project code for wiki samples in .zip format
« Reply #1 on: February 01, 2022, 12:32:45 pm »
AFAIK this is not possible. In my TAChart tutorials I worked around this issue by pasting the code into the wiki article (https://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Stacked_BarSeries#Source_code). Awful, but at least something...

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Uploading all project code for wiki samples in .zip format
« Reply #2 on: February 01, 2022, 12:34:07 pm »
Maybe, just maybe, have a look at this please -
https://wiki.freepascal.org/Lazarus_Examples_Window

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

ArminLinder

  • Sr. Member
  • ****
  • Posts: 316
  • Keep it simple.
Re: Uploading all project code for wiki samples in .zip format
« Reply #3 on: February 01, 2022, 01:03:38 pm »
Hi Davo,

Not sure what you are after :-)

- Advocate to allow an archive format in the forum attachments, or
- Advocate to publish the complete code samples through [your?] git and put a link in the wiki?
- Something else?

I do, at least, see common ground in what we think an Entrepeneur ("Beginner") can expect in 2022 if he does decide to give Lazarus and FPC a try. Hardly a 10 page article teaching how to compile Lazarus and FPC from source is helpful :-). Instead, GUI examples working right out of the box are expected.

Armin.
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

ArminLinder

  • Sr. Member
  • ****
  • Posts: 316
  • Keep it simple.
Re: Uploading all project code for wiki samples in .zip format
« Reply #4 on: February 01, 2022, 01:08:00 pm »
AFAIK this is not possible. In my TAChart tutorials I worked around this issue by pasting the code into the wiki article (https://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Stacked_BarSeries#Source_code). Awful, but at least something...

Awful, indeed. I also thought about ignoring the GUI/Object Inspector and assign all properties in code. Maybe this would [for my rather short code samples] be a better way to deal with the problem than delivering resource files.
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2032
  • Former Delphi 1-7, 10.2 user
Re: Uploading all project code for wiki samples in .zip format
« Reply #5 on: February 01, 2022, 11:09:43 pm »
I wanted to contribute to the wiki and provide a complete code sample (including the lfm files) in zip format. Unfortunately the wiki will let me only upload several graphics file formats, but no zip archives.

Is there a way to provide a complete code sample project?

Someone pays for the disk space and bandwidth that the Wiki occupies which I believe is behind the restricted upload formats. My solution is simply to link to a SourceForge repo.

As for Forum attachments -- if I recall correctly -- these can be purged at any time for the same reasons.

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Uploading all project code for wiki samples in .zip format
« Reply #6 on: February 02, 2022, 12:25:59 am »
- Advocate to allow an archive format in the forum attachments, or
- Advocate to publish the complete code samples through [your?] git and put a link in the wiki?
- Something else?

Something else !   This came out a discussion about the existing collection of examples that are shipped with Lazarus. The feeling was that they are, in many cases, poorly documented, some are dated, some don't work and, as such, are not very useful to end users, especially new users.

On the other hand, there is a lot of valuable content in there and there could be a lot more if people like yourself, wanting to write a short tutorial had a easy place to put the sample code.

So, no, forum or wiki attachments are not the solution and shipping all the examples with Lazarus may not be a good idea either. Trev I think suggested an online repo and I suggested a metadata model to both classify and allow sensible searching.  So, the idea is that the repo you see will eventually end up in the FPC github site and a replacement Examples Window in Lazarus allows an end user to find and download just the example they want to play with.

There are already a number of examples in the 'kit' that relate to wiki based tutorials. That sounds just like what you were asking for. 

So far, I have classified about 50 examples, maybe 20% of the total. Its enough for me to get a feel of the quality there and I think my current category list needs some revision. For example, the "Techniques" category is too big, maybe needs to separate out "Drawing" At present, its just a proof of concept and a spare time activity for me.

But clearly, soon, it will need more people classifying and contributing and we need an indication from the Lazarus developers that we are on the right track still.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

ArminLinder

  • Sr. Member
  • ****
  • Posts: 316
  • Keep it simple.
Re: Uploading all project code for wiki samples in .zip format
« Reply #7 on: February 02, 2022, 06:20:10 pm »
Something else !   This came out a discussion about the existing collection of examples that are shipped with Lazarus. The feeling was that they are, in many cases, poorly documented, some are dated, some don't work and, as such, are not very useful to end users, especially new users.

Yes. Yes. YES! I have been entering the Lazarus/Pascal world recently, and had a really hard time finding even the most basic things, and all of the critics above apply 110%.

So, no, forum or wiki attachments are not the solution and shipping all the examples with Lazarus may not be a good idea either. Trev I think suggested an online repo and I suggested a metadata model to both classify and allow sensible searching.  So, the idea is that the repo you see will eventually end up in the FPC github site and a replacement Examples Window in Lazarus allows an end user to find and download just the example they want to play with.

There are already a number of examples in the 'kit' that relate to wiki based tutorials. That sounds just like what you were asking for. 

This is exactly how things need to be done, IMHO. How can I contribute? I have worked on service/daemon development recently, and started to update the wiki as far as I could whenever I got something working I was happy with. The Windows sample is working perfectly, and I am currently working on the Linux version, I expect a tested code sample till tomorrow evening. Since I do always try to support both worlds with one source there will be some minor changes flowing back into the Windows version when Linux is running, and then the sample is done.

How can I add the sample to the git, once done? Do you give me write access? Or do you want the source files beforehand and see if they qualify?

Armin.
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

af0815

  • Hero Member
  • *****
  • Posts: 1379
Re: Uploading all project code for wiki samples in .zip format
« Reply #8 on: February 02, 2022, 06:55:47 pm »
There is another project for samples here in the forum.
regards
Andreas

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Uploading all project code for wiki samples in .zip format
« Reply #9 on: February 03, 2022, 12:27:49 am »
There is another project for samples here in the forum.

Is there ?   Where please ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Uploading all project code for wiki samples in .zip format
« Reply #10 on: February 03, 2022, 12:40:06 am »

This is exactly how things need to be done, IMHO. How can I contribute? I have worked on service/daemon development recently, and started to update the wiki as far as I could whenever I got something working I was happy with. The Windows sample is working perfectly, and I am currently working on the Linux version, I expect a tested code sample till tomorrow evening. Since I do always try to support both worlds with one source there will be some minor changes flowing back into the Windows version when Linux is running, and then the sample is done.

How can I add the sample to the git, once done? Do you give me write access? Or do you want the source files beforehand and see if they qualify?

Armin.

Great !  You ask how do you help ?  Depends on what you want to do.  If you just want to add your one particular example to the set, easy, just post a zip file to me one way or another (here, as a pull request on the gitlab repo (if its all done up with its metafile) or direct to me, I can give you my email as a Personal Message).

On the other hand, if you want to work through some of those existing examples, testing, categorizing and adding meta - brilliant, I am happy to give anyone with a reasonable profile here on the forum write access. You might like to have a play with the tool I made to manage things too, hero code is always ugly !

(Sounds like I had better write up some how to use docs too)

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

ArminLinder

  • Sr. Member
  • ****
  • Posts: 316
  • Keep it simple.
Re: Uploading all project code for wiki samples in .zip format
« Reply #11 on: February 03, 2022, 10:37:20 am »
You got a PM!
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

Zvoni

  • Hero Member
  • *****
  • Posts: 2737
Re: Uploading all project code for wiki samples in .zip format
« Reply #12 on: February 03, 2022, 11:23:01 am »
I remember there being a section (don't remember if it was Freepascal-Section or Lazarus-section) on the Lazarus-Homepage, where people could upload their projects, Packages, Samples, whatever.
But it seems to be gone (probably for the reasons stated: Disk-space, Bandwidth?)

OTOH, in another Forum i'm a longtime-member of (vbforums.com) they have a Forum-Section called "codebank"
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

ArminLinder

  • Sr. Member
  • ****
  • Posts: 316
  • Keep it simple.
Re: Uploading all project code for wiki samples in .zip format
« Reply #13 on: February 03, 2022, 11:30:22 am »
I'd prefer Davo's git. I have git running anyway, and if I get the reputation I hope I could one day do changes in my own samples all by myself, without having to bug Davo every time.

I do also not see any reason not to allow .zip file attachments in the wiki, since any Lazarus project, stripped down to the essential source files, is far smaller than a single screenshot. Nevertheless I like Davo's broader approach better.

TREVs remark that forum/wiki(?) attachment files might get purged some day is also bolstering the git approach. Though it remains to be seen, with M$ having taken over, how long it takes until a greedy M$ employee speaks up and suggests to somehow wrest some money out of Git some day.
« Last Edit: February 03, 2022, 12:23:20 pm by Nimral »
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

Zvoni

  • Hero Member
  • *****
  • Posts: 2737
Re: Uploading all project code for wiki samples in .zip format
« Reply #14 on: February 03, 2022, 12:00:49 pm »
Though it remains to be seen, with M$ having taken over, how long it takes until a greedy employee speaks up and suggests to wrest some money out of Git some day.
Nevermind deciding: "Oh? This Source-Code is not written with a MS-Product. DIE!!"
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018