Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2025-06

Importing units

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Kevin Lyda

tl;dr How do I package reusable units for others?

Back in 1988/89, I took a computer science class in high school. Yes, we lacked fire back then, but we had a compiler so that was fine. Specifically a Turbo Pascal 3.0 compiler.

I had a bunch of fun writing code in it and even though pascal never appeared again in my software engineering career, I always thought it would be fun to work in again. And I have some time now and I came up with a project to work on in Object Pascal.

You folks have made a great compiler and an amazing std library. In the process of my project, I'm likely going to make some units that will be useful for others. I'd like to do them in a way that makes that easy.

I've been doing a bunch of Go the past several years. It's pretty fun and one useful thing is that you can do "go get
some.site/some/path/go-units" and then you can use modules from there. You could do something like that for free pascal with git submodules. Not exactly the same thing, but close. Is that what people do? Or is there a better way to provide units for others to use?

Thanks for any guidance,

Kevin

Reply by email

Matthew Phillips
to Kevin Lyda
Show quoted text 26 lines
On Jun 18, 2025, at 4:20 PM, Kevin Lyda via fpc-pascal wrote: tl;dr How do I package reusable units for others? Back in 1988/89, I took a computer science class in high school. Yes, we lacked fire back then, but we had a compiler so that was fine. Specifically a Turbo Pascal 3.0 compiler. I had a bunch of fun writing code in it and even though pascal never appeared again in my software engineering career, I always thought it would be fun to work in again. And I have some time now and I came up with a project to work on in Object Pascal. You folks have made a great compiler and an amazing std library. In the process of my project, I'm likely going to make some units that will be useful for others. I'd like to do them in a way that makes that easy. I've been doing a bunch of Go the past several years. It's pretty fun and one useful thing is that you can do "go get some.site/some/path/go-units" and then you can use modules from there. You could do something like that for free pascal with git submodules. Not exactly the same thing, but close. Is that what people do? Or is there a better way to provide units for others to use? Thanks for any guidance,

Hey Kevin, I’m new here as well, so take this with a grain of salt, but I think the answer is fppkg.

https://wiki.freepascal.org/fppkg

Reply by email

Ingemar Ragnemalm
Show quoted text 34 lines
From: Kevin Lyda To: FPC-Pascal users discussions Subject: [fpc-pascal] Importing units Message-ID: Content-Type: text/plain; charset="UTF-8" tl;dr How do I package reusable units for others? Back in 1988/89, I took a computer science class in high school. Yes, we lacked fire back then, but we had a compiler so that was fine. Specifically a Turbo Pascal 3.0 compiler. I had a bunch of fun writing code in it and even though pascal never appeared again in my software engineering career, I always thought it would be fun to work in again. And I have some time now and I came up with a project to work on in Object Pascal. You folks have made a great compiler and an amazing std library. In the process of my project, I'm likely going to make some units that will be useful for others. I'd like to do them in a way that makes that easy. I've been doing a bunch of Go the past several years. It's pretty fun and one useful thing is that you can do "go get some.site/some/path/go-units" and then you can use modules from there. You could do something like that for free pascal with git submodules. Not exactly the same thing, but close. Is that what people do? Or is there a better way to provide units for others to use? Thanks for any guidance, Kevin

I have written tens of thousands of lines of reusable FPC code that I don't mind sharing. I have just uploaded it to my own archives. Few find it and I don't upload often. That is a double-edged problem; If interest seems low I don't upload so much and since I don't upload so often...

Of course we can put everything on GitHub but that doesn't make it much more visible. What would be the best solution? A common "contributed code" archive somewhere?

/Ingemar

Reply by email