Recent

Author Topic: [UPDATE] Patch of the Week #1 - now with actual code ;)  (Read 12032 times)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
[UPDATE] Patch of the Week #1 - now with actual code ;)
« on: May 27, 2013, 08:05:10 am »
Patch of the Week #1

Goal: let new and old Lazarus/FPC users work together to improve Lazarus/FPC.
Getting more people submitting improvements looks like a good idea ;)

What: an "initiator" chooses any patch in the mantis bugtracker that people can work on for about a week.
People can contribute ideas, rough code, and patches in this thread before (hopefully) uploading a finished patch to the bugtracker issue.
After that week, another initiator starts a new Patch of the Week project.

How: initiator fills in the template and asks for people to create a patch for the issue. Forum users can then chip in and help as mentioned above.
After the end of the period, the next initiator can choose another patch and continue a new Patch of the Week in another thread, filling out the template etc.
If the new initiator does not want to do this, he/she or the original initiator must appoint a new one.

Prizes: eternal satisfaction if your patch gets in ;)... as well as the good feeling that you helped improve Lazarus.
« Last Edit: July 06, 2013, 08:24:34 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Patch of the Week #1
« Reply #1 on: May 27, 2013, 08:05:30 am »
Patch of the Week template
Please fill out at beginning of each Patch of the Week and post in a new Patch of the Week #<n> thread.

Patch of the Week number: <number>
Initiator: <name>
Bug tracker issue: <URL>
Issue background: <why you want this bug to be solved etc>

Difficulty: <difficulty level you think this is: easy/medium/hard>
End time - new PotW can start after this: <GMT date/time>
Next initiator: <(forum user)name of proposed next initiator>
« Last Edit: May 27, 2013, 09:15:15 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Patch of the Week #1
« Reply #2 on: May 27, 2013, 08:06:07 am »
Patch of the Week number: 1
Initiator: BigChimp
Bug tracker issue: http://bugs.freepascal.org/view.php?id=24482
Issue background:
Implementing a native FPC resource compiler should be fairly easy now we have fcl-res in FPC.
This would eliminate some dependency on external tools and allow resource compilation for more platforms.
It would also help when writing a resource extractor/manager etc.

PS: Yes, it's my own bugtracker issue, but it's at the bottom of my todo list and I think it can help improve FPC+Lazarus
PS2: We only need to support a subset of http://msdn.microsoft.com/en-us/library/windows/desktop/aa381043%28v=vs.85%29.aspx
... as much as is used by fpc today...

Difficulty: Medium. Excellent FCL-RES tutorial/documentation in CHM file http://ubuntuone.com/2lthRcKZbnCLmihZE3zW5Z
End time - new PotW can start after this: Sunday evening, 2 June, midnight GMT
Next initiator: JuhaManninen

Good luck!

« Last Edit: May 27, 2013, 03:12:40 pm by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4694
  • I like bugs.
Re: Patch of the Week #1
« Reply #3 on: May 27, 2013, 10:18:36 am »
Interesting idea, although I am suspicious about getting any actual code this way.

People can contribute ideas, rough code, and patches in this thread before (hopefully) uploading a finished patch to the bugtracker issue.

A forum thread is not the right place to maintain versions of source code.
This would be an ideal place for distributed development using Git. Just fork the Lazarus mirror repo in GitHub and make a branch. Then different people can work on the same code and merge their changes.
There is even no need for actual patch. I can pull the branch directly from GitHub, after it is well tested.

Anybody?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Patch of the Week #1
« Reply #4 on: May 27, 2013, 11:27:34 am »
@Juha: whether they put stuff on github or discuss/upload their code patches here or on e.g. dropbox with a link doesn't matter much to me.
I suppose not everybody is familiar with git, especially as the project itself uses svn. I'd like to keep the barrier for entry as low as possible.

As long as we get good code and can put the final patch in the bugtracker ;)

Clarification: I'm not talking about using the forum as a version control system for patches; I'm talking about showing your patch and letting people discuss it.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: Patch of the Week #1
« Reply #5 on: May 27, 2013, 11:40:12 am »
Interesting idea, although I am suspicious about getting any actual code this way.
<snip>
A forum thread is not the right place to maintain versions of source code.
This would be an ideal place for distributed development using Git. Just fork the Lazarus mirror repo in GitHub and make a branch. Then different people can work on the same code and merge their changes.
There is even no need for actual patch. I can pull the branch directly from GitHub, after it is well tested.
Bigchimp is trying to create some interest and momentum in a novel way. You are talking about tools. The tools existed before and from what I can see, they haven't attracted hordes of enthusiast code contributors.  So instead of lowering the first time effort to contribute code for Lazarus and make it more fun, your proposal just made it a step more difficult (create a branch, etc, etc,..)

Bigchimp's initiative also had some headroom for "initiators" doing some mentoring and for peer review/aid from fellow forum users. Confining candidate contributors to a github branch is lacking all the visibility/support you have in this community.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4694
  • I like bugs.
Re: Patch of the Week #1
« Reply #6 on: May 27, 2013, 01:19:13 pm »
BigChimp and ludob, you may be right.
Revision control is not important initially when someone starts making code. It would be an extra stress factor.

When a piece of code becomes bigger and many people are working on it, then revision control truly helps. A new coder starts to think of it after messing up some code and overwriting the code of others. Mayby this is the right order how things must proceed.

It is funny, I remember the "specialists" on this forum who wrote that we would get substantially more contributions if only Lazarus supported a distributed development model and Git. :)
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Patch of the Week #1
« Reply #7 on: May 28, 2013, 08:11:33 am »
The patch in this bug report shows which files to edit to change resource compiler invocation:
http://bugs.freepascal.org/view.php?id=24044

Seems useful for this part
- modifications in the fpc code that calls the resource compiler so it uses fcl-res when needed
of the PotW feature request.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Patch of the Week #1
« Reply #8 on: June 03, 2013, 08:54:06 am »
Well, that ended as Juha predicted. Glad to see we have so many people on the forum who want to help improve FPC/Lazarus..*cough* :(

Juha, you're welcome to continue with another issue if you want to... Perhaps something a bit less ambitious.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4694
  • I like bugs.
Re: Patch of the Week #1
« Reply #9 on: June 03, 2013, 10:30:47 am »
Juha, you're welcome to continue with another issue if you want to... Perhaps something a bit less ambitious.

I would go for this one :
24037: Implement text 'Select All' in code editor with mouse right-click
  http://bugs.freepascal.org/view.php?id=24037

It was listed in this thread:
  http://www.lazarus.freepascal.org/index.php/topic,20735.msg120598.html
and Martin even digged the exact location in source code for it.
It is an easy one although some time must be spent for jumping in the code and learning it.
It could also be a warm-up patch for someone who wants to contribute more.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Giu

  • Full Member
  • ***
  • Posts: 131
Re: Patch of the Week #1
« Reply #10 on: June 03, 2013, 10:54:13 am »
Well, that ended as Juha predicted. Glad to see we have so many people on the forum who want to help improve FPC/Lazarus..*cough* :(

Juha, you're welcome to continue with another issue if you want to... Perhaps something a bit less ambitious.

I would like to non-stop this initiative. I think could be very constructive. I don't have time right now, but I would like to start contributing to Lazarus soon, and for this, I need this type of posts, to understand how things internally works.

Keep the good work.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Patch of the Week #1
« Reply #11 on: June 03, 2013, 06:36:40 pm »
I would go for this one :
24037: Implement text 'Select All' in code editor with mouse right-click
  http://bugs.freepascal.org/view.php?id=24037

Well I had a go at this, since Martin had done all the spade-work already, and placed a patch in the bugtracker. Is it good enough to be accepted?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4694
  • I like bugs.
Re: Patch of the Week #1
« Reply #12 on: June 04, 2013, 08:32:45 am »
Well I had a go at this, since Martin had done all the spade-work already, and placed a patch in the bugtracker. Is it good enough to be accepted?

Yes it is good, I applied it. Thanks!
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Patch of the Week #1
« Reply #13 on: June 04, 2013, 09:24:41 am »
Seems like Patch of the week #2 is a success then ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4694
  • I like bugs.
Re: Patch of the Week #1
« Reply #14 on: June 04, 2013, 09:51:50 am »
Seems like Patch of the week #2 is a success then ;)

Yes, it was too easy. :)
If someone is interested, there are issues about saved state of package and project inspectors.
They are more complex than the editor's "Save All" menu item, but they are still straight-forward.
They can be solved be studying code of already saved settings, then copy pasting ...
There are no big decisions or innovations involved.

18804: Package dialog settings
  http://bugs.freepascal.org/view.php?id=18804

22609: Project Inspector doesn't remember settings
  http://bugs.freepascal.org/view.php?id=22609

---

Some issues require design decisions. They may be easy once the design is done though.
For example I don't really know how this should be fixed:

24337: Adding a single source file to project or to package is complicated
  http://bugs.freepascal.org/view.php?id=24337
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018