Recent

Author Topic: Why do Lazarus users share code via zip files rather than repo links?  (Read 5603 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11513
  • FPC developer.
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #15 on: February 24, 2024, 03:28:28 pm »
The title says it all.

Basically the ZIPs I post come from private repos.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4479
  • I like bugs.
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #16 on: February 24, 2024, 11:51:36 pm »
In past, when I did used 7z users wrote that they cannot handle that format, what is in your opinion a better than zip and compatible to all format?
.7z appears to be superior. IMO everybody should have tools to open a 7z package. Windows users must download and install something. No big deal, Windows users typically download and install many apps. Some Linux distros may not have support out of the box but it can be installed from their repository easily.

.tar.gz is also much better than .zip. I think it has improved over the years. IIRC I could easily open it on Windows, too, although I don't remember how exactly. Anyway it should be supported by everybody.

.rar can be dumped because of the license issues. I remember it was very popular in last millennium but now we have better choices. Still, thanks to "unrar" program I was able to open all .rar packages so far.

I guess I am spoiled by a modern Linux distro. It allows me to both open and create .7z and .tar.gz packages out of the box, without installing anything extra for it.
I tested the different formats by compressing RichMemo sources. Here :
Code: [Select]
richmemo.zip      638,5 kB
richmemo.tar.gz   616,2 kB
richmemo.7z       562,0 kB
With binary file compression 7z is even further ahead.

I suggest that those 3 compression formats are supported here. If somebody cannot open a 7z package, he can install an app for it instead of complaining here.
What do you think?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2216
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #17 on: February 25, 2024, 12:13:15 am »
What do you think?
Switching to 7z would make me more than happy, less data on forum to carry.
On the other side I have in my mind the crossplatform support by FPC/Lazarus, does a 7z/gz version exists for each OS that FPC/Lazarus support?

Crazy Idea:
My suggestion would be to add in forums user data a "radiobutton" (default zip) where users can/should select their non-zip archiver and it be displayed somewhere in footer or avatar area as text or small symbol.
That way no misunderstandings and we can save bits and bytes for forum storage and bandwidth.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

lainz

  • Hero Member
  • *****
  • Posts: 4504
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #18 on: February 25, 2024, 12:22:53 am »
7zip file manager is the best tool for Windows.
For Mac there's keka file archiver.

About repositories is better because as already said you can check the sources with the web browser. And download as zip or clone or make a fork.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4479
  • I like bugs.
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #19 on: February 25, 2024, 12:24:09 am »
Switching to 7z would make me more than happy, less data on forum to carry.
On the other side I have in my mind the crossplatform support by FPC/Lazarus, does a 7z/gz version exists for each OS that FPC/Lazarus support?
FPC supports a lot of things, including small embedded systems.
But yes, every development system where you can run Lazarus can be updated to support 7z and gz.
Also remember, we talk about attachments in this forum. A computer then has an internet connection and a browser. It surely has enough resources to handle any archives.

Quote
Crazy Idea:
My suggestion would be to add in forums user data a "radiobutton" (default zip) where users can/should select their non-zip archiver and it be displayed somewhere in footer or avatar area as text or small symbol.
That way no misunderstandings and we can save bits and bytes for forum storage and bandwidth.
Yes it was crazy. The same compression formats must be supported by everybody who wants to open the packages.
Listing different formats in a message footer does not help.
« Last Edit: February 25, 2024, 12:40:34 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Josh

  • Hero Member
  • *****
  • Posts: 1290
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #20 on: February 25, 2024, 12:41:37 am »
as zip is native to most os's i think it should be the archiver of choice, even though 7zip, rar etc may have better compression, you dont need to install third party software; which may have bloatware preloaded unless you locate the button to not install the bloatware, plus many company policies would not allow you to install them in the first place.

I like the fact that the code is in the forum text as well as project zipfiles , as its well indexed by google and you can find some golden snippets of code easily.
« Last Edit: February 25, 2024, 12:47:16 am by Josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4479
  • I like bugs.
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #21 on: February 25, 2024, 06:43:10 am »
as zip is native to most os's i think it should be the archiver of choice,
It is not native to any OS but it is most widely used because of historical reasons.

Quote
even though 7zip, rar etc may have better compression, you dont need to install third party software; which may have bloatware preloaded unless you locate the button to not install the bloatware,
Are you saying that installing 7z support for your OS is too risky and difficult and not worth the effort?
Maybe it is time to change your OS. At least in my modern OS everything works out of the box.
Now is year 2024 already, we are not in 1990's.

Quote
plus many company policies would not allow you to install them in the first place.
OK, that may be the only valid issue. Do companies really forbid 7z in their computers?

Quote
I like the fact that the code is in the forum text as well as project zipfiles , as its well indexed by google and you can find some golden snippets of code easily.
You can find golden snippets even better from .7z packages.   :D
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Josh

  • Hero Member
  • *****
  • Posts: 1290
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #22 on: February 25, 2024, 11:06:11 am »
a fresh install of a supported windows or macos should open a zip file.

7zip is easy to install, a lot of people will get scared when they see a warning about possible viruses.

most companies will have policies of what can be installed, if 7zip or whatever is not on list, it can be a reason for dismisal.
local governments offices that i deal with only allow zip files, all there machines are checked by IT department at least monthly, if something is installed that is not on there list of approved software it is removed immediately, and user is repremanded, as the GPO will have disabled installation of sofware.
I have also not been able to send them mails with anything but zip. if i try 7zip rar the attachment is removed.

i run a few a websites, and have tried in the past to attach data in 7zip format, but got so many users saying how do i open this format, it became a time consuming issue, even though i had text explaing where to get 7zip from,how to install it. you may be suprised how many people will just stop at that point.

slightly off topic
many website are now sending outputing content in gzip format to cut down on bandwidth, and the decompressing is done by deflate on the os's browser. ie this forum is gzip enabled.

curious
Quote
You can find golden snippets even better from .7z packages.

how can i search the web for something in 7zip?
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

VisualLab

  • Sr. Member
  • ****
  • Posts: 355
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #23 on: February 25, 2024, 12:21:42 pm »
As you know, this forum is intended to help solve programming problems with FPC/Lazarus. And as the previous ones said, code snippets or simple projects focusing on a specific case are usually published here. ZIP is sufficient/suitable for this purpose.

Repositories may (but do not have to) be suitable for complete, large projects. If there is an error (or other problem) in the project, providing help to the author of the project will still require a lot of time. Analyzing the code in the browser is not always sufficient (usually it does not help much, because the browser does not have the same functionality as the IDE, which is obvious).

dseligo

  • Hero Member
  • *****
  • Posts: 1246
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #24 on: February 25, 2024, 12:33:14 pm »
People often doesn't post code snippet or zip when asking help with their code. I think they will bother even less to set up repository.

lainz

  • Hero Member
  • *****
  • Posts: 4504
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #25 on: February 25, 2024, 12:45:45 pm »
Windows 11 is getting support for RAR and 7zip as well, I've seen in the news..

Edit: I already have it, tested uncompressing a 7z file with 'Extract file here...' from Windows context menu (that opens the Windows tool for opening compressed files), and it works.
« Last Edit: February 25, 2024, 12:47:31 pm by lainz »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2216
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #26 on: February 25, 2024, 12:59:09 pm »
most companies will have policies of what can be installed, if 7zip or whatever is not on list, it can be a reason for dismisal.
local governments offices that i deal with only allow zip files, all there machines are checked by IT department at least monthly, if something is installed that is not on there list of approved software it is removed immediately, and user is repremanded, as the GPO will have disabled installation of sofware.
I have also not been able to send them mails with anything but zip. if i try 7zip rar the attachment is removed.
Most companies do have an administrator for such belongings.
In our company 7z support is always integrated.
Besides of using an installer (msi/exe) you can also download a portable version.
If system is configured by admin in a white-list way, you need to contact him/her anyway to add it.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

TRon

  • Hero Member
  • *****
  • Posts: 2647
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #27 on: February 25, 2024, 01:11:58 pm »
Quote
Why do Lazarus users share code via zip files rather than repo links?
It is not a Lazarus users thing, it is a programmer's thing.

Code (snippets) have been shared for many years using an archiver, whether that is 7z, rar, lha, lzx, tar, zip or something else that had the best compression results back in the day. Primarily it was used to save bandwidth because when you use a dial up connection then literally every bit counts.

Before the interwebs even existed, there were BBS' (Bulletin Board Systems) and the use of archivers originates from there. There where boards that allowed you to exchange messages (also code) and files depending on the specialization of the BBS. Even back further archivers where used to be able to store more data onto a floppy disk (remember those ?) I remember the first ones I had having a whopping storage space of 360 KB (that is kilobytes). And even before that tapes (sequential. read/write, terribly slow).

So if you ask why lazarus users use that instead of using a repository the the answer is because it is easy to use, to the point and convenient. Using a repo isn't exactly that (creating an account, setting up your ssh credentials, setting up 2fa) etc. and then learn how to use git or another vcs. And yes it sometimes is more convenient to share code using a repository but in practice, if you are unable to isolate the problem then you have a real problem on your hands and one that does not concern the topic "how to share code"
« Last Edit: February 25, 2024, 01:30:40 pm by TRon »

TRon

  • Hero Member
  • *****
  • Posts: 2647
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #28 on: February 25, 2024, 02:32:17 pm »
.7z appears to be superior.
...
With binary file compression 7z is even further ahead.
Ever tried tar.xz ?

Quote
I suggest that those 3 compression formats are supported here. If somebody cannot open a 7z package, he can install an app for it instead of complaining here.
What do you think?
To get even more back into memory lane .. in BBS times it was common to accept any archive format and the upload handler would automatically repack to the format that had the best time/size compression ratio at that moment. Now there is an idea  ;)

lainz

  • Hero Member
  • *****
  • Posts: 4504
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Why do Lazarus users share code via zip files rather than repo links?
« Reply #29 on: February 25, 2024, 02:33:18 pm »
Common is really easy to create a repository. 2FA is easy as well and you need to use it only once in a while.
Then download Github desktop app, and is easy to clone and upload the repo.

Steps for repo
- New repo
- Give it a name
- Add readme
- Create
- Clone
- Paste files in the folder
- Commit
- Push

Steps for multiple examples in same repo
(example: https://github.com/bgrabitmap/demo)
- Create a new folder in the same repo
- Paste files in the folder
- Commit
- Push

Also in a repo you can share binaries for all platforms you wish. Without limit of 500kb like in the forum...

 

TinyPortal © 2005-2018