CPCWiki forum

General Category => Programming => Topic started by: enteka on 17:23, 19 June 21

Title: Amstrad Github? or where to share the code?
Post by: enteka on 17:23, 19 June 21
As I advance on my gamebook, I'm starting to wonder where I could share my program and other files attached. I might end up sharing it in my gopher and webpage and such, but I was wondering if there was a specific hub for the Amstrad or 8 bit enthusiast... You know, not to re-invent the wheel and all that.
Title: Re: Amstrad Github? or where to share the code?
Post by: reidrac on 08:57, 20 June 21
Not as far as I know.

I tend to share my public projects on GH, because that's what most people know and it increases a little bit the chances of contributions (I had a few, unbelievable!). Other CPC related projects are there too.

The CPC Wiki itself can work as project page, but you probably want to host the code somewhere anyway (and I would not recommend releasing the projects using things like mediafire, that for some reason it is common in retro). In that case, I guess whatever works for you!

For example, I have my own page on the wiki: https://www.cpcwiki.eu/index.php/User:Reidrac

Title: Re: Amstrad Github? or where to share the code?
Post by: GUNHED on 18:48, 20 June 21
Github completely suxx! Please take anything else. Even the CPC Wiki.
Title: Re: Amstrad Github? or where to share the code?
Post by: pelrun on 06:40, 21 June 21
+1 to GitHub - I know it's not everyone's cup of tea (  ::) ) but it does the job well and it's a defacto standard for a reason.
Sticking zip files of code on wiki's is so 1998. Proper source control is so useful that only the people who haven't figured it out yet argue against it.
Title: Re: Amstrad Github? or where to share the code?
Post by: reidrac on 07:31, 21 June 21
Not everybody tags their projects (and also, with Amstrad CPC there's not consensus on the tag either), but you can see GH has some traction in the Amstrad community:

https://github.com/topics/amstrad
https://github.com/topics/amstrad-cpc
Title: Re: Amstrad Github? or where to share the code?
Post by: GUNHED on 12:56, 22 June 21
The interesting thing about standards is, that they always tend to be close to the worst.
There are numerous examples.
So, it's good to have this thread.
Title: Re: Amstrad Github? or where to share the code?
Post by: norecess464 on 13:18, 22 June 21
Quote from: GUNHED on 18:48, 20 June 21
Github completely suxx! Please take anything else.

When GitHub got bought by Microsoft, I switched to GitLab, which brings basically the same service. Mostly for ethical reasons.
Title: Re: Amstrad Github? or where to share the code?
Post by: eto on 13:20, 22 June 21
Is there any way to use Git or any other source control tool easily with Basic files? Or would committing the DSK binary be the best solution?
Title: Re: Amstrad Github? or where to share the code?
Post by: reidrac on 15:01, 22 June 21
Quote from: eto on 13:20, 22 June 21
Is there any way to use Git or any other source control tool easily with Basic files? Or would committing the DSK binary be the best solution?

I'm not sure what is your use case, but I would write the basic using a regular editor on a PC and keep it as a plain text file. Then using a tool like iDSK or whatever, "compile" into a DSK that can be load on the CPC.
Title: Re: Amstrad Github? or where to share the code?
Post by: reidrac on 15:14, 22 June 21
Just to be clear: I'm not advocating for GH or anything else, use whatever you want.

I'm only saying that there seem to be a number of projects already on GH and that I got some contributions on GH (arguably because GH is widely known and used; even when GitLab copies most of it, less people have account with GL).

I personally like Sourcehut (most features work without javascript or an account, 100% free and open source), but some of their workflows are completely alien to most.

To be honest, I'm not going to change how I do things based on any post here :D
Title: Re: Amstrad Github? or where to share the code?
Post by: SRS on 18:47, 22 June 21
Quote from: eto on 13:20, 22 June 21
Is there any way to use Git or any other source control tool easily with Basic files? Or would committing the DSK binary be the best solution?
Depends :)
I started with tokenized bas files, but then switched to ascii. See: https://github.com/deringenieur71/Adventures-in-LOCOMOTIVE-BASIC (https://github.com/deringenieur71/Adventures-in-LOCOMOTIVE-BASIC)
Title: Re: Amstrad Github? or where to share the code?
Post by: andycadley on 18:55, 22 June 21
ASCII will definitely work better with GitHub (or indeed any modern source control) than binary file, which are difficult to do diffs on etc.
Title: Re: Amstrad Github? or where to share the code?
Post by: eto on 20:21, 22 June 21
Quote from: SRS on 18:47, 22 June 21I started with tokenized bas files, but then switched to ascii.

can you automate this, or do you manually extract them?
Title: Re: Amstrad Github? or where to share the code?
Post by: SRS on 20:27, 22 June 21
I develop them mostly in Notepad++, and copypaste 'em to winape, so they are "native ascii"
Vice versa Winape allows you to convert loaded native BASIC to ascii.
See:
WinApe - File - AutoType

and

WinApe - Assembler - Read BASIC
You can have a "kind of " build pipeline with WinApe but I don't use that

QuoteWhen starting WinAPE a disc image filename can be specified as a parameter (without the slash option). The following parameters can be specified on the command line:

ParameterFunction
filenameSpecify the filename for the disc image to be used in Drive A:
/AAutomatically run the program in Drive A:. To specify the name of the program to run use /A:filename. To start a disc using a CP/M boot sector use /A:|CPM
/T:filenameAutomatically start typing from the given Auto-type file.
/SN:filenameSpecify a Snapshot file to be loaded and automatically started.
/SYM:filenameLoad a file containing assembler/debugger symbols.
/SHUTDOWNShut down Windows when WinAPE is closed. Use /SHUTDOWN:FORCE to force shutdown if required.
For example, to start WinAPE using the disc image frogger.dsk contained within a Zip file frogger.zip and run the program named frogger use:

WinAPE frogger.zip\:frogger.dsk /a:frogger

Maybe RIPADSK is of interest for you in that context: https://www.cpcwiki.eu/forum/programming/ripadsk-a-utility-to-automate-code-archiving/msg65758/#msg65758 (https://www.cpcwiki.eu/forum/programming/ripadsk-a-utility-to-automate-code-archiving/msg65758/#msg65758)

Title: Re: Amstrad Github? or where to share the code?
Post by: GUNHED on 21:33, 22 June 21
Quote from: andycadley on 18:55, 22 June 21
ASCII will definitely work better with GitHub (or indeed any modern source control) than binary file, which are difficult to do diffs on etc.
Sometimes. Looks like they store ASCII in UNIX format (at least not PC format) and after downloading to a PC there are some invisible crazy control codes.
Well, putting text into Notepad, and then copy it out helps some times. Not all the times.
It's just a waste of time.
Title: Re: Amstrad Github? or where to share the code?
Post by: andycadley on 22:00, 22 June 21
GIT can be configured to handle the difference between Unix and Windows line endings. So it's usually just a matter of setting your git.config file to bring them out in the correct format (or leave them untouched if you prefer)
Title: Re: Amstrad Github? or where to share the code?
Post by: GUNHED on 22:05, 22 June 21
See, that's the problem. We just need something working without the need of all that configuration (and before to find out how).

In addition the pages are organized in a way which is really not functional.


My solution: Pack everything in a ZIP and provide a download link - even better: put it in the Wiki.  ;)
Title: Re: Amstrad Github? or where to share the code?
Post by: pelrun on 05:43, 23 June 21
Setting *one* config value in a repo to correctly handle a file format is utterly trivial.

Make a .gitattributes file in the root of your repository, and add this line:

*.bas   text eol=crlf


Bingo bongo, any *.bas file will maintain it's DOS line endings, as AMSDOS expects.
But really, you're not looking for a solution, only a justification for sticking with your preferred option.
Title: Re: Amstrad Github? or where to share the code?
Post by: enteka on 22:42, 23 June 21
Quote from: eto on 13:20, 22 June 21
Is there any way to use Git or any other source control tool easily with Basic files? Or would committing the DSK binary be the best solution?
I've used git to keep track of a novel, if that helps :)
Title: Re: Amstrad Github? or where to share the code?
Post by: eto on 23:23, 23 June 21
Quote from: enteka on 22:42, 23 June 21
I've used git to keep track of a novel, if that helps :)

Only if you write your novel on an emulated CPC and store your text files in a DSK image.
Title: Re: Amstrad Github? or where to share the code?
Post by: GUNHED on 23:25, 23 June 21
Quote from: pelrun on 05:43, 23 June 21
Setting *one* config value in a repo to correctly handle a file format is utterly trivial.

Make a .gitattributes file in the root of your repository, and add this line:

*.bas   text eol=crlf


Bingo bongo, any *.bas file will maintain it's DOS line endings, as AMSDOS expects.
But really, you're not looking for a solution, only a justification for sticking with your preferred option.
:picard: :picard2:
Title: Re: Amstrad Github? or where to share the code?
Post by: zhulien on 05:27, 24 June 21
The problem with GitHub is that they don't allow public domain software there unless you want to make people have a licence to use your software (like making someone have a licence to drive a car).  If you want to allow anyone to use your software without a licence, it cannot go on GitHub.
Title: Re: Amstrad Github? or where to share the code?
Post by: pelrun on 06:20, 24 June 21
It's not possible to put any creative work into the actual public domain these days except through having it be old enough to hit the "70 years after the author's death" clause. Good luck doing that with software.

There are licenses specifically designed to allow as much freedom with the code as you wish, which is the only legal way to achieve a "public domain"-like status.
In any case, GitHub does nothing except suggest you add a license if a repo doesn't contain one, it does not stop you from uploading a repo in any way.
Title: Re: Amstrad Github? or where to share the code?
Post by: andycadley on 08:27, 24 June 21
They might make it more awkward, mostly because of people saying something was "in the public domain" and then getting upset when they saw someone else selling "their" software, however they can't prevent it.


Even if you were forced to add a licence, they can't actually make you enforce it either - so you can always add a very permissive license (like BSD) and then ignore any transgressions.
Title: Re: Amstrad Github? or where to share the code?
Post by: eto on 09:24, 24 June 21
Quote from: zhulien on 05:27, 24 June 21
The problem with GitHub is that they don't allow public domain software there unless you want to make people have a licence to use your software (like making someone have a licence to drive a car).  If you want to allow anyone to use your software without a licence, it cannot go on GitHub.

The car/drivers license example does not really fit. That would be, if Github would force anyone who gets the source code to proof, that they can code. It's more the equivalent if you rent a car during your holidays and confirm that you will not go offroad or to restricted areas. You still obviously can do that, but if anything happens, you will be in trouble.

If you want anyone to use your software without a license, you have to have a license that supports this. Sounds ironic, but you forget, that there are laws that otherwise, depending on your country, will apply which would prevent exactly that, what you want. Copyright, Urheberrecht, whatever... You need a license to make clear that these laws do not apply to your code. Without specifying a license, whoever is reusing your code, would immediately violate these laws if he doesn't reach out to receive your individual permission (which is also kind of a license). The lack of licenses was exactly the problem of "Public Domain". It's simply not defined what it means. Is it allowed to sell, modify, redistribute? Add a license to your code, and everybody can see what is permitted. The MIT license is, what I think is most closely to what I understand to be "Public Domain".

https://choosealicense.com/
Title: Re: Amstrad Github? or where to share the code?
Post by: zhulien on 00:30, 25 June 21
Quote from: eto on 09:24, 24 June 21
The car/drivers license example does not really fit. That would be, if Github would force anyone who gets the source code to proof, that they can code. It's more the equivalent if you rent a car during your holidays and confirm that you will not go offroad or to restricted areas. You still obviously can do that, but if anything happens, you will be in trouble.

If you want anyone to use your software without a license, you have to have a license that supports this. Sounds ironic, but you forget, that there are laws that otherwise, depending on your country, will apply which would prevent exactly that, what you want. Copyright, Urheberrecht, whatever... You need a license to make clear that these laws do not apply to your code. Without specifying a license, whoever is reusing your code, would immediately violate these laws if he doesn't reach out to receive your individual permission (which is also kind of a license). The lack of licenses was exactly the problem of "Public Domain". It's simply not defined what it means. Is it allowed to sell, modify, redistribute? Add a license to your code, and everybody can see what is permitted. The MIT license is, what I think is most closely to what I understand to be "Public Domain".

https://choosealicense.com/


There are no laws in Australia that require you to have a licence for software.  Putting it into the public domain and stating so with the software is not a licence but sufficient in Australia.  MIT is a licence, Public Domain is not.  GIT supports MIT but not Public Domain.

Title: Re: Amstrad Github? or where to share the code?
Post by: pelrun on 05:08, 25 June 21
> sufficient in Australia

Dunno where you get that from, thanks to the Berne Convention we're also subject to how other countries interpret copyright law. The person using your code needs a clearly stated license saying they can do so, or they put themselves at significant legal risk. Nothing stops an author from deciding to revoke the invalid "public domain" declaration at any time and launching legal action against a prior user of the code.

GitHub actually provides a license that provides the same permissions as "public domain", which you would have found if you'd looked: https://choosealicense.com/licenses/unlicense/ (https://choosealicense.com/licenses/unlicense/)

Note: this is for using *code*. You're conflating that with using *software*, which generally means a compiled executable which as you say doesn't need a license to use, but also doesn't support derivative works.
Title: Re: Amstrad Github? or where to share the code?
Post by: zhulien on 05:56, 25 June 21
Actually public domain software does NOT require the source code to be provided, that is a fallacy likely related to closed source (which is also not the same as closed software).


You can very well explain the process to create the public domain software without source code if it was created without source... such as the stream of hex numbers to type into a file.  Of course not much software is created these day like this, but it doesn't exclude that - as it is exactly how you need to program something like... let's say... a computer which only has a hex keypad.
Title: Re: Amstrad Github? or where to share the code?
Post by: zhulien on 06:00, 25 June 21
There is also a difference between copyrighted software which has no license and software that has a license (whether copyrighted or not).  In fact most software I have (with the exception of modern console games) do not have any license at all... can you see any license with your CPC copy of Ghosts n Goblins?  nope, nada, it does not exist.  It is copyrighted, but not licensed.  Can anyone stop me legally from using it as a door stop if I bought it?  Nope.
Title: Re: Amstrad Github? or where to share the code?
Post by: pelrun on 06:52, 25 June 21
I really don't know what you're trying to argue; GitHub is for sharing *source code* not software, so the laws around the latter are not directly relevant.
Title: Re: Amstrad Github? or where to share the code?
Post by: andycadley on 07:45, 25 June 21
Quote from: pelrun on 05:08, 25 June 21
. Nothing stops an author from deciding to revoke the invalid "public domain" declaration at any time and launching legal action against a prior user of the code.
Um, yes it does.


When you release something into the "Public Domain" you relinquish all control over it entirely. You no longer own it. You can't change your mind and suddenly try to retroactively apply rules, because it doesn't belong to you any more.


Public Domain has a very specific meaning in law, but it's one lots of developers don't seem to grasp. Which is why sites like GitHub prefer that you explicitly choose an actual license, because they are trying to protect people from their own lack of understanding.
Title: Re: Amstrad Github? or where to share the code?
Post by: pelrun on 17:55, 26 June 21
Quote from: andycadley on 07:45, 25 June 21
When you release something into the "Public Domain" you relinquish all control over it entirely. You no longer own it. You can't change your mind and suddenly try to retroactively apply rules, because it doesn't belong to you any more.


You're arguing from a logical perspective and not a legal liability one. Copyright law is overwhelmingly biased towards maintaining the rights of an author, and some jurisdictions simply don't allow you to put your works into the public domain. And the way the Berne Convention works you can still be liable even if you're not actually in that jurisdiction. So there is a very real legal risk for anyone using a work that's under such a declaration. If your intent is to guarantee that any and all potential users of your code can be confident that they can do so without threat of future legal action, a public domain declaration is simply insufficient.


That is the entire reason "no-rights-reserved" licenses exist - you can't reliably eliminate your ownership of a work, but you absolutely can provide others with the ability to *use* it in the same way they would if it was actually PD.


Quoting from the Creative Commons (https://creativecommons.org/share-your-work/public-domain/cc0): "Dedicating works to the public domain is difficult if not impossible for those wanting to contribute their works for public use before applicable copyright or database protection terms expire. Few if any jurisdictions have a process for doing so easily and reliably. Laws vary from jurisdiction to jurisdiction as to what rights are automatically granted and how and when they expire or may be voluntarily relinquished. More challenging yet, many legal systems effectively prohibit any attempt by these owners to surrender rights automatically conferred by law, particularly moral rights, even when the author wishing to do so is well informed and resolute about doing so and contributing their work to the public domain."
Title: Re: Amstrad Github? or where to share the code?
Post by: zhulien on 09:04, 29 June 21
Quote from: pelrun on 17:55, 26 June 21
some jurisdictions simply don't allow you to put your works into the public domain.


I read that also, bad luck for them I guess... just like bad luck for us living in a Police State (that does allow public domain).

Quote from: pelrun on 17:55, 26 June 21

And the way the Berne Convention works you can still be liable even if you're not actually in that jurisdiction. So there is a very real legal risk for anyone using a work that's under such a declaration. If your intent is to guarantee that any and all potential users of your code can be confident that they can do so without threat of future legal action, a public domain declaration is simply insufficient.

That is the entire reason "no-rights-reserved" licenses exist - you can't reliably eliminate your ownership of a work, but you absolutely can provide others with the ability to *use* it in the same way they would if it was actually PD.

Quoting from the Creative Commons (https://creativecommons.org/share-your-work/public-domain/cc0): "Dedicating works to the public domain is difficult if not impossible for those wanting to contribute their works for public use before applicable copyright or database protection terms expire. Few if any jurisdictions have a process for doing so easily and reliably. Laws vary from jurisdiction to jurisdiction as to what rights are automatically granted and how and when they expire or may be voluntarily relinquished. More challenging yet, many legal systems effectively prohibit any attempt by these owners to surrender rights automatically conferred by law, particularly moral rights, even when the author wishing to do so is well informed and resolute about doing so and contributing their work to the public domain."


I will continue to put 'sourcecode' and 'objectcode' (which is in BASIC, PHP, JS) into the public domain.  Too bad for github and those regions that don't like it.  Public domain is the only restriction-free way to distribute something - someone can take my public domain source or object code and rebrand it themselves and sell it which is the whole point... it is restriction free.

Title: Re: Amstrad Github? or where to share the code?
Post by: pelrun on 09:40, 29 June 21
 :picard: :picard2:
Just like time travel is a great way to fix mistakes, except for the tiny issue of it being physically impossible. The law flat out prevents you from putting your work in the public domain, and it doesn't care that you're sticking your fingers in your ears and going "lalalalala I can't hear you".

It does not matter if you're in Australia and Australia allows it (which I actually doubt, but lets for the sake of argument say it does.) You could still turn into an asshole tomorrow, and pick another jurisdiction that doesn't recognise the declaration, and sue everyone from there. A PD declaration might be great for you, but it's worse than useless to anyone actually trying to use your work.
Title: Re: Amstrad Github? or where to share the code?
Post by: zhulien on 04:14, 30 June 21
Pick another galaxy as the jurisdiction, 'no licence required, if you are stupid enough to think you need a licence to use this intergalactic software, then don't use it'
Powered by SMFPacks Menu Editor Mod