Lazarus

Miscellaneous => Other => Topic started by: hawk on May 06, 2009, 06:44:00 am

Title: Can anyone share your source code?
Post by: hawk on May 06, 2009, 06:44:00 am
 Hi,everybody :)
I'm new to lazarus,and new to free pascal.
I need lots of source codes to study.I have google "free pascal source",but i could not find any.
So can anybody share your source codes.
I think it is a good idea if there is a forum doing this as "http://www.autoitscript.com/forum/index.php?showforum=9" do .
If there are some forums do that .Please tell me.
Sorry for my poor english.
Title: Re: Can anyone share your source code?
Post by: skalogryz on May 06, 2009, 07:52:25 am
there're some sources at Lazarus/Examples
Title: Re: Can anyone share your source code?
Post by: hawk on May 06, 2009, 08:07:36 am
Yes,I know but that is not enough
Title: Re: Can anyone share your source code?
Post by: Ñuño_Martínez on May 06, 2009, 05:59:35 pm
Which kind of applications are you looking for?
Title: Re: Can anyone share your source code?
Post by: hawk on May 07, 2009, 06:43:20 am
Which kind of applications are you looking for?
I just want to study free pascal and develop some applications under windows.
Title: Re: Can anyone share your source code?
Post by: Vincent Snijders on May 07, 2009, 07:53:09 am
To study free pascal, use the free pascal manuals. The unit reference manual also contains examples.
Title: Re: Can anyone share your source code?
Post by: Ñuño_Martínez on May 07, 2009, 11:12:09 am
Also the wiki has some tutorials (http://wiki.lazarus.freepascal.org/Special:Search?search=tutorial&go=Go).
Title: Re: Can anyone share your source code?
Post by: hawk on May 08, 2009, 06:05:05 am
OK,thanks.i will use the free pascal manuals.
But I still think it's a good idea if there are some forums like that.
Title: Re: Can anyone share your source code?
Post by: skalogryz on May 08, 2009, 07:48:12 am
OK,thanks.i will use the free pascal manuals.
But I still think it's a good idea if there are some forums like that.
[imho]
it's not possible to learn a programming language, just by studying other's sources.

Studying sources is usefull for experience programmers only. It's of pretty useless (and can be even dangerous) for unexperience programmers. Larger programs are created using advanced language features, like OOP or Interfaces. A lot of system features might be used like threads, that are not easy to understand for the newbie.

Learning a programming language require a big piece of practice first.
I'd suggest to learn the programming by creating small aps, using some basic tutorials.
When i started to learn Turbo Pascal, the first thing i wanted is to code simple Tetris game. When i came to delphi, the first thing i coded was the VCL-based Tetris game either :) After i moved to Lazarus, my first project was cross-platform (Win,Linux,OSX) Space Invaders (the difference from delphi is {$mode objfpc})

Creating smaller apps is fun and makes one to understand the language better.
[/imho]
Title: Re: Can anyone share your source code?
Post by: t321 on January 26, 2020, 08:06:27 pm
Is it possible for you to share your source code for Space Invaders?
Title: Re: Can anyone share your source code?
Post by: lucamar on January 26, 2020, 08:25:35 pm
I don't know about skalogryz's but a web search for -"space invaders" pascal- gives tons of results. Just saying 8)
Title: Re: Can anyone share your source code?
Post by: mr-highball on January 26, 2020, 11:52:54 pm
Here's my repos
https://github.com/mr-highball

Also, you can search github for repos written just in pascal
https://github.com/search?utf8=%E2%9C%93&q=language%3Apascal&type=
Title: Re: Can anyone share your source code?
Post by: kveroneau on February 28, 2020, 11:38:36 pm
Here's a few ObjectPascal programs which I know about which are open sourced, some mine, some made by others.  Now if only Microsoft would share the original Skype code built in Delphi....  But that's only a pipe dream.

WinFF:  https://github.com/WinFF/winff

My Gopher client(first published OBJPAS program of mine): https://bitbucket.org/kveroneau/gopherclient/src/default/

I have some examples in my kDocs: http://tech406.com/kdocs/sockets.xml

In fact my kDocs do have some very useful code snippets, such as Networking, like grabbing a document over HTTP and such, along with many other examples.

Oh, and I have my Cardiac program here: https://bitbucket.org/kveroneau/cardiac/src/default/

I go into detail on how I built it in this kDocs: http://tech406.com/kdocs/cardiac.xml

And yes, these kDocs are actual XML documents, not HTML documents.  8)

Hope these help you enter the wonder world of Write once, compile anywhere!  It is a true testament, as I was able to port my Gopher client over to Windows and MacOS with almost 0 code changes, MacOS was the only one which required a bit of UI tweaking, only because of how they present a menu bar to the user.
Title: Re: Can anyone share your source code?
Post by: RAW on February 29, 2020, 12:04:05 am
https://github.com/miselkrstovic/space-invaders-delphi/tree/master/src
https://www.youtube.com/watch?v=hPmJB0mS-GA
https://ralph-kokott.de/2011/space-invaders-delphi/

..maybe this is a starting point ...  :)
Title: Re: Can anyone share your source code?
Post by: AL on February 29, 2020, 03:17:27 am
A few sites with source codes:

https://wiki.lazarus.freepascal.org/Components_and_Code_examples
http://www.pp4s.co.uk/index.html
https://sourceforge.net/directory/language:lazarus/os:windows/

If you search you will find quite a lot.
You can also search for Delphi, most of the Delphi code is compatible/adaptable to Lazarus, but this is more after you are familiar with the Laz environment.
Good Luck
Title: Re: Can anyone share your source code?
Post by: dbannon on February 29, 2020, 08:25:35 am

15K lines, https://github.com/tomboy-notes/tomboy-ng

feel free to fix any bugs you see !

Davo
Title: Re: Can anyone share your source code?
Post by: marcov on February 29, 2020, 04:56:56 pm
there're some sources at Lazarus/Examples

And a very big example one directory higher:-)
Title: Re: Can anyone share your source code?
Post by: kveroneau on March 25, 2020, 12:26:35 am
Today, I just found out that one of the world's most popular and most used Installer programs for the Microsoft Windows platform, Inno Setup is actually made in Delphi!  This project has been around since the late 90s.

https://github.com/jrsoftware/issrc

Does not seem to build on Free Pascal/Lazarus according to the README.md file, but it is an example of a production grade ObjectPascal program of which you can analyze the source code for.
TinyPortal © 2005-2018