-
Notifications
You must be signed in to change notification settings - Fork 58.3k
Add Scratch to the Linux kernel #1363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @Belu-cat! Thanks for your contribution to the Linux kernel! Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch. Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process. Here's what to do:
How do I format my contribution?The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations. Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea. You can create patches with Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary. Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with. Both of these are documented in the Submitting Patches documentation that is part of the kernel. Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this. Where do I send my contribution?The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes. If you don't already know what subsystem your change belongs to, the
Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches. It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.) How do I send my contribution?Use For more information about using How do I get help if I'm stuck?Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed. Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine. If you can't find an answer, there are a few places you can turn:
If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers! I sent my patch - now what?You wait. You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at. Then, you keep waiting. Three things may happen:
Further information
Happy hacking! This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot. |
imeesa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FireAcidCow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README looks great, but for the scratch/kernel/time.sb3, it appears to be a zip of the project files and not the project files themselves. Please upload the actual source code files instead of the repository.
bitmotte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im frothing at the mouth rn
The zip file is the source code. To open it, use an online editor (like https://scratch.mit.edu/ or https://turbowarp.org/) or install an offline editor. |
b-nn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there, thank you for your time, I have went through the scratch file you included and noticed that most custom code blocks are left undefined (image provided below)

I am not sure whether or not these are meant to be fixed later or, or if they are calls to external functions. (Given the fact that the "use" custom code block is also left undefined - therefore making it impossible to make calls to external bindings - I am inclined to believe it's the former.)
I request that you fix these functions before merging.
Thanks, Joe Biden.
The zip file contains the source code. As with the rest of the kernel, there are .c and .rs files that can be opened in a plaintext editor. This would be the same as downloading the zip file of a project on github and adding that as part of the source code. It requires extra steps that are unnecessary. I suggest using this tool to convert the scratch sb3 into something that makes sense in a github repository. It makes it simple to read and see changes without having to download then upload the file to another tool. |
stella23456789
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The .sb3 file is the only standard and accepted way to use and distribute Scratch 3.0 source code. Simply having the contents in a folder is not supported by official Scratch development tooling. Additionally, the tooling you suggested requires both GitHub Desktop and M*crosoft W*ndows. This software is not appropriate for Linux Kernel development. |
NakeleKantoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lacking bytes
You are lying. Typing this as we speak from this PR, and it run's great. Merge! |
NexusSfan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrite in goboscript
Scratch in the Linux kernel
Scratch is well-accepted by many to be the best programming language ever. Despite this, the Linux kernel has absolutely no Scratch in it! The advantages to Scratch in the kernel are clear:
Accessibility
With the Linux kernel written in Scratch, more people will be able to contribute to Linux. "Programming" "languages" like C and Rust are based of the assumption that everyone is a dev. This assumption is simply false.
Speed
While Scratch itself is slow, with the help of Turbowarp, it can be BLAZINGLY fast, by compiling Scratch to Javascript. This has the added benefit of allowing web developers to be able to more easily contribute to the kernel.
Simplicity
Scratch is simply cleaner. Code like
printf("Hello, world!\n");is simply bloated. In Scratch, it's as simple assay "Hello, world!". You don't have to worry about anything complex like the "terminal" or "types," whatever those are.In accordance with these, I have rewritten part of rust/kernel/time.rs in Scratch, and am starting the inclusion of Scratch in the kernel. Perhaps one day, we can rewrite the entire kernel in Scratch, and get all of these benefits without worrying about interoperability with C.
Request for comments
All comments will be added to the list
COMMENTS, in a project with the following code in the stage: