IRC channel logs

2023-06-16.log

back to list of logs

<kerravon>i exactly looked in the logs :-)
<kerravon>btw, unrelated - are you familiar with Sector C? released under cc0. and it inspired me to write a public domain multisector c in c90 instead of assembler
<kerravon>and made a mainframe target too
<kerravon> https://sourceforge.net/p/pdos/gitcode/ci/master/tree/util/multisc.c
<kerravon>(unrelated to my original question, but related to bootstrapping)
<kerravon>a subset of C in less than 512 bytes
<oriansj>kerravon: if you are referring to https://github.com/xorvoid/sectorc then absolutely we did discuss it.
<oriansj>and it is nice to see more people writing their own C compilers
<oriansj>cc_x86 weighs in at 14,239bytes of assembly if you want something powerful enough to bootstrap M2-Planet and ultimately GCC
<oriansj>and allows for locals, structs, arrays, gotos and with a target specific libc.M1 able to be ported to any operating system and produce valid binaries for that operation systems (given proper M2libc bits)
<kerravon>i would want stepping stones to that 14,239 bytes. it's unclear to me if sector c is the only time i need to enter hex, so that i can code in a subset of c to get to "ultimately gcc". and also note that my interest is in a public domain solution (not copyrighted freeware). so it is subc that i would be trying to get to. after subc i'm still not at
<kerravon>c90 due to lack of a public domain c90 compiler, but there are 2 or 3 attempts currently underway to do that. i'm used to people giving up before getting there though
<pabs3>miraheze plans to close, so the bootstrapping wiki needs to move off ASAP
<pabs3> https://meta.miraheze.org/wiki/Board/Policies/20230615-Statement
<kerravon>i have a commercially-provided webhost (which is what pdos.org is on) if that would be helpful. i don't need donations either
<kerravon>can add an extra domain too - and wear the cost myself
<kerravon>and also make some sort of commitment to transfer the domain to someone else under some set of criteria
<kerravon>if requested
<kerravon>i don't want to maintain it though
<kerravon>If 550 of Miraheze's 300,000+ users gave only £12 (16.35 USD) once a year, Miraheze would exceed its budget requirements.
<kerravon>what's this supposed to mean?
<kerravon>how did they rack up US$9000/year?
<kerravon>dreamhost.com doesn't charge me that
<oriansj>kerravon: well the stepping stones in stage0 are hex0 (256bytes), hex1 (689 bytes), hex2 (1,405bytes), M0 (1,613bytes) and then cc_x86 is written in M0 assembly
<kerravon>my interest is in switching to C as soon as possible
<oriansj>at which point you have a good hex linker which supports arbitrary length labels, absolute and relative offsets of various sizes (8bits, 16bits, 32bits) and displacement calculations. A good macro assembly language that you can effectively work in.
<kerravon>i'd rather combine c code with #includes into a single file to avoid the linking requirement
<kerravon>which is what i realized sector c was doing
<kerravon>i didn't realize this was possible before seeing sector c
<oriansj>kerravon: well that certainly will result in a more complex compiler but yes it is an option for compilers that want to skip the external assembler/linker requirement
<kerravon>more complex compiler? the executable is less than 512 bytes
<oriansj>and doesn't support local variables
<kerravon>sure. so you need to build up to that
<kerravon>that's the exact plan
<kerravon>to get to subc
<kerravon>which has locals
<oriansj>you will also want structs and arrays
<kerravon>subc has that
<oriansj>well any C compiler that self-hosts generally tends to have those (or end up doing something very ugly to work around that)
<kerravon>yes, there are older versions of subc that have those ugly things
<kerravon>they would be part of the stepping stones
<oriansj>you don't need those stepping stones if you just have a simple macro assembler
<kerravon>i don't want to code in assembler
<oriansj>but you want to bootstrap in hex?
<kerravon>what alternative is there to start?
<kerravon>i need to enter the sector c binary
<oriansj>well bootOS is usually a good starting point
<oriansj>which is enough to setup builder-hex0 which then runs all the way to GCC+Linux
<kerravon>i am after public domain code all the way
<kerravon>neither gcc nor linux is a goal
<kerravon>pdos is
<oriansj>fair enough
<oriansj>I know of a project that has a goal of bootstrapping to a C89 compiler that is public domain (let me see if I can find a link)
<kerravon>cool!
<kerravon>but there's no c89 public domain compiler yet
<kerravon>subc is the closest
<oriansj> https://recc.robertelder.org/ (it is available under several different licenses)
<oriansj>kerravon: I'll even give you a public domain DOS port of cc_x86 if you are willing to help me add DOS support to M2libc
<kerravon>is it public domain or "copyright under different licenses"?
<kerravon>what do you require for m2libc? you can take any code you want from pdpclib - it is public domain
<kerravon>note that there is a pdclib from someone else but i don't know anything about it. i think there are couple more public domain c libraries too, but i don't know about them either
<kerravon>pdpclib certainly supports DOS
<kerravon>sorry - i know a little bit about pdclib - i took a quick look at it one day
<kerravon>and i might have got a replacement qsort from there too
<kerravon>i can't remember
<kerravon>i do remember a bug report on the qsort that i was using in pdpclib
<kerravon>and i believe i didn't need to fix it myself
<kerravon>actually, i think there was a modified qsort in pdclib and i found a fix in that, and brought it across to pdpclib
<kerravon>but i'm not sure
<kerravon> https://git.candlhat.org/?p=dosfstools.git;a=blob;f=mkfs.c;h=dee3a033a66675bbd90ddece645c6fb0663c4a55;hb=HEAD
<kerravon>i'm thinking of modifying this boot sector to provide a hex editor
<kerravon>if the "any key" is ctrl-c or something like that
<kerravon>not sure if that will fit in 512 bytes though
<kerravon>(starting line 52)
<oriansj>kerravon: well some countries don't have a public domain for copyright; that is why creative commons zero license exists and (for those who don't want their copyright statement deleted) the ISC is as permissive as legally possible (The Berne Convention has only be ratified by 181 of 195 countries)
<kerravon>i'm looking for either no copyright notice plus CC0 (or equivalent) or, a public domain notice
<kerravon>any claim of copyright and i'm not interested
<kerravon>as far as i know, every single c90-compliant compiler has got a copyright notice slapped on it
<kerravon>subc is the closest we get
<kerravon>and has both of the above
<stikonas[m]>Realistically you'll have trouble finding enough non copyrighted software to build your system...
<stikonas[m]>Most people will use at best permissive free software license
<kerravon>the only thing i'm missing is the C compiler
<stikonas[m]>It's not just toolchain, you need other user space stuff
<kerravon>and there are 2 or 3 efforts underway to close that gap
<kerravon>well - depends what you want to do
<stikonas[m]>Shell?
<kerravon>i have a shell similar to msdos
<stikonas[m]>Ok
<kerravon>note that this is already a functioning system
<kerravon>self-hosting
<kerravon>but using gcc 3.2.3 as part of that
<kerravon>that's the last thing to eliminate
<kerravon>well - sort of
<kerravon>the 16-bit bootloader for the 32-bit system has been built with Open Watcom
<stikonas[m]>Well, self-hosting is usually not too hard
<kerravon>it took me about 30 years
<stikonas[m]>Building more advanced stuff is harder
<kerravon>just getting public domain self-hosting is hard enough already
<stikonas[m]>256 byte hex0 is already self hosting
<kerravon>that's not an operating system plus toolchain
<stikonas[m]>Though hex0 is GPLv3
<stikonas[m]>No, it's not, though builder-hex0 plus stage0-posix is arguably both trivial OS and C compiler
<stikonas[m]>Anyway, that's not public domain
<stikonas[m]>At least not for a while...
<kerravon>what do you mean a while?
<stikonas[m]>Well all GPL software will eventually go into public domain
<kerravon>oh i see
<stikonas[m]>70 years after authors death or so
<kerravon>sure. they'll probably have trouble figuring out who the last author is too
<kerravon>last author to die
<kerravon>e.g. for gcc 3.2.3 which is what i'm interested in
<stikonas[m]>Yes, at least in countries that ratified Berne convention
<stikonas[m]>For GCC 3.2.3 70 years is not counting yet
<oriansj>kerravon: well the smallest operating system plus toolchain is BootOS at 510bytes
<oriansj>and it is self-hosting
<h01ger>„Copyright is for losers ©™“ (Banksy)
<h01ger>scnr
<oriansj>h01ger: Copyleft is for working together
<h01ger>well said
<stikonas[m]>Yeah, I think most people are happy enough with copyleft. You don't really have any benefits from software being in public domain...
<oriansj>weak pushover licenses well tend to get exactly what they are.
<oriansj>but people have preferences and ultimately who does decides
<muurkha>looks like miraheze is shutting down: https://meta.miraheze.org/wiki/Board/Policies/20230615-Statement