IRC channel logs
2025-04-06.log
back to list of logs
<Guest2348>Does owning a copyright or patent for stage0 mean forcing all consumers to eventually be licensees of a few programmers? <daddy>Guest2348: well, stage0-posix is copyrighted and licensed GPL. you _want_ this to be the case - if you're using intellectual property you don't own, you should have some form of license to use it. <daddy>that said, the GPL license means you can do nearly whatever so long as you don't tamper with the license itself. <stikonas>Guest2348: also stage0-posix is not patentable <stikonas>it's just a very simple compiler with a few simple tools. <stikonas>and as for GPL, you don't even have to accept GPL terms to use the software, you only need to comply to GPL if you are modifying or redistributing it <nimaje>(well, you also have to accept it to use it, but it has no restrictions on using, except the no warranty clause which most open source licenses have in some form) <oriansj>Guest2348: it is also possible for anyone to write a stage0 spec and have a different programmer write compatible implementation under any license you want. <oriansj>In which case, I could write you those specs for hex0, hex1, hex2, M0, M1 and cc_* <oriansj>M2-Planet is still being worked on by gtker, so it'll be a bit before that stablizes enough for me to write you a full specification (but I can provide a partial) <stikonas>well, the goal for M2-Planet is to be C compatible... <stikonas>I don't think we'll reach 100% compatibility but that's the spec... <stikonas>still, after the last 2 months or so M2-Planet advanced quite a lot in terms of C compatibility <oriansj>and thank you stikonas for running M2-Planet so well. <stikonas>well, I was mostly just trying to keep up with reviews... <Guest2348>I'm speaking from the perspective of a consumer who wants to own all code running on his hardware. If I write low level code myself, then doesn't yours sit in a position where I can't help but reinvent work from here? <Guest2348>Being forced to be a licensee is worrying when the stakes are whether I fully own my own hardware. <Guest2348>(licensee of code from this community, I mean) <Guest2348>Having specs is nice, but I'd rather help people build a reading list or courseware to compete in this domain. <deesix>I guess you have to define "own", but if that means "I wrote it", then for sure you are going to reinvent lots of wheels at all levels of the stack. <lanodan>If you're just a user, GPL just grants usage, done. The restrictions are for distribution. <agg1>and even then, if developers consented with contracting for commercial use, you could ask the developers for dual-licensing Guest2348 <agg1>for example, to relieve from copyleft restrictions, which is a fair agreement with GPL, developers must be asked <agg1>furthermore, even with "public domain", this wouldn't relieve from "Berne Convention" agreement <agg1>which means, in practice, at least you had to correctly cite where you've salvaged ideas from <Guest2348>I understand. I think where my confusion starts comes down to how ownership works in this domain in the first place. <Guest2348>At some point, programming becomes following specs. If we all can't help but do the same things, then who owns the first copyrights over those things? <Guest2348>My goal here is not to take on the same scope of stage0, but just to focus on my ISAs in my home's hardware. I want to be sure that the code I write does not infringe on code in stage0. <Guest2348>I can avoid copying the code, but there's so much overlap that even writing the code on my own means using similar conventions: hex notation, line comments, shell subsets... What's original "enough"? <matrix_bridge><gtker> Guest2348: A lot of the concepts are simple enough that they basically can't be copyrighted. Like it's not possible to copyright the concept of converting numerical digits to byte values, but it is possible to copyright the exact way that we do it <matrix_bridge><gtker> The same that way it isn't possible to copyright the concept of a wizard boy going to wizard school, but it is possible to copyright the Harry Potter books <Guest2348>Does the copyright include coverage over conventions like using ;/# comments to store both freeform text and assembly among hex digits? <Guest2348>It seems so because those conventions determine program form, but there are also so few conventions available. If I was writing about a wizard boy going to wizard school using a language 1/1000th the size and complexity of English, then it's harder to avoid the kind of overlap I'm seeing. <matrix_bridge><gtker> It's very much uncharted waters and unclear exactly how small of a piece of code is actually copyrightable but I'm 100% certain that the concept of using a single character for comments isn't copyrightable <matrix_bridge><gtker> At least in the West, if you develop something that "accidentally" ends up like something that already exists because of a narrow problem domain you aren't infringing copyright <matrix_bridge><gtker> I also very much doubt that even if you had very precise descriptions of every application in the bootstrap chain that the final output would appear to be infringing the copyright of stage0 <lfam>What happens instead of copyright is patent, when it comes to implementation of an idea <matrix_bridge><gtker> Copyright is automatically assigned when a work is created whereas a patent has to be awarded, at least in the jurisdictions I'm familiar with <lfam>Also, something that is trivial or obvious is not eligible for copyright <Guest2348>I know I can produce something distinct. I'll still share what I end up with to make sure there's no issues. <agg1>in practice lfam, for example, j-core.org project argued they rather picked a hardware design they knew patents must have expired already <agg1>than hit by surprise with any other <lfam>Right. But it's also impossible to know for sure if something is patented or not. You basically just have to find out <matrix_bridge><gtker> Guest2348: Outside of very deliberate circumvention, if you haven't seen the source code of stage0 you are unable to infringe upon it and it is very unlikely that you will ever be in a situation where people will think that you have infringed upon it <matrix_bridge><gtker> Because of how different your solution is likely to be, even though it does the exact same thing <matrix_bridge><gtker> The clang compiler suite is deliberately trying to maintain GCC compatibility, and it is not infringing upon GCC <lfam>This is probably the most important caselaw to understand <agg1>it's not entirely clear how "copyrightability of APIs" was defined <agg1>for example, if some x86 hardware needed some bootloader for bootstrapping, would this be subject to copyright claims from the hardware manufacturer? <stikonas>if hardware manufacturer wrote that bootloader, then yes <agg1>well, intel didn't implement posix-stage0 of yours <agg1>and courts had _different_ opinions about this <stikonas>I don't think Intel can claim any copyright on that... <stikonas>it's just like neither Intel nor AMD can't own copyright on every program that uses x86 ISA <agg1>and it's just like they 2impose micros~1 software onto everyone <lfam>agg1: Courts had different opinions, but ultimately on the final opinion counts <lfam>Only the final opinion, I mean <agg1>lfam: which "the Supreme Court ruled in a 62 decision" <agg1>to my understanding, google simply tried to make the jre/jdk run on android, to accomodate developers, and in favor of competition <agg1>a job Oracle could have dome themselves, but didn't; and in return Oracle demanded a dozen billion cash, from google, rather than compensating the work that google did <lfam>agg1: Every Supreme Court decision is final, regardless of if the decision is unanimous. <lfam>Whether it is 4-3 or 7-0, it has the same impact on American jurisprudence <agg1>"In fact it found that Google had tried to prevent interoperability with other Java and had previously been refused a license by Sun for that reason." <oriansj>well, documenting all of the secrets to how executables work might be of some use to someone who wishes to know what assumptions exist out of the gate. <oriansj>for example, C in M2-Planet/cc_* don't have to use a single stack for both returns and local variables. It would be relatively simple to just do a malloc and use RBX (or its equivalent on different architectures) for the variable stack. (thus benefitting from stack overflow protection) <stikonas>oriansj: I don't recall exact details but gtker did make some similar changes for variadic functions <stikonas>hmm, let me try to see if I am misremembering <matrix_bridge><gtker> stikonas: We still use the normal stack for variadic functions. We just changed it to use the base pointer for function arguments, and a new locals pointer for local variables <matrix_bridge><gtker> We could use the same pointer for both, but then we would need to orient the function arguments in the opposite order which I didn't want to have to deal with <stikonas>I don't know how you manage to do basically 1 huge PR per day <matrix_bridge><gtker> A lot of the times I've basically been thinking about how to solve a problem for a relatively long time and then during the day I get an idea. Write it down and implement it after work <matrix_bridge><gtker> Sometimes the features naturally flow into each other so the PRs get a little big 😄 <stikonas>very strangely the code compiles if function name "test" is replaced with "main" <matrix_bridge><gtker> I saw, but I want to focus on the (hopefully last) feature needed for tcc_1_7 <stikonas>anyway, it's always up to person doing the work to decide what to work on next :) <matrix_bridge><gtker> I'm also aware of a few situations where codegen just isn't correct, but I'm trying to ignore it until I get casting working <stikonas>also we have various issues with operator priority (including in constant_load) but those might be hard to solve with our linear one pass parser <matrix_bridge><gtker> What is it needed for in libc where double pointers don't work instead? <stikonas>well, maybe we can use double pointer, but that was the signature of execvp <stikonas>int execvp(const char *file, char *const argv[]); <stikonas>anyway, we don't have to deal with this now... <stikonas>I was just trying to see how badly M2-Planet behaves when trying to build various files from meslibc... <stikonas>for tcc we will either need to extend M2libc or reuse something else such as meslibc <matrix_bridge><gtker> Yeah, and the constant expressions are incorrect and unfinished. And macro functions can't take more than 1 token 😕 <matrix_bridge><gtker> Alright. Not against it just wondering because I haven't really seen it used outside of main functions <stikonas>gtker: so #define SUM(X,Y) (X) + (Y) wouldn't work? <matrix_bridge><gtker> And even then it's usually just a double pointer in my experience <stikonas>yeah, in practice double pointer chould work for argv... <matrix_bridge><gtker> Ah, that makes sense. I thought it was for new functionality in M2libc <matrix_bridge><gtker> I'm not entirely sure how the whole mes/mescc/meslibc thing is structured, but from what I can tell it has a sort of pseudo standard lib like we have bootstrappable.h/c? <matrix_bridge><gtker> It would if it was called like "SUM(1, 2)" but not if it was called like "SUM(1 + 1, 2)" <stikonas>but it is more buggy than standard libraries like glibc or musl <matrix_bridge><gtker> Or if some hypothetical function was called with an "int*" since that's two tokens <matrix_bridge><gtker> It has something to do with the bug where an ifdef on the first line is considered an impossible define, but works on the second line <stikonas>gtker: oh SUM(1+1, 2) I think does work in M2-Mesoplanet