qbe v1.2
harec 0.24.0
gcc 13.2.0 (Debian/Linux x86_64)
$ .bin/hare version
hare 0.24.0
$ ls -sh .bin/hare
1.6M .bin/hare
(compiled using the vanilla configs/linux.mk)
On 2024-02-21 05:03 UTC, Ember Sawady wrote:
> the thing to check for size would be qbe + harec + hare sources (without> the repo history)
Yeah, that is worse:
$ du -shc /usr/local/bin/{qbe,harec,hare} /usr/local/src/hare/stdlib/
552K /usr/local/bin/qbe
664K /usr/local/bin/harec
1.6M /usr/local/bin/hare
5.5M /usr/local/src/hare/stdlib/
8.3M total
Compressed is much better, but still not small enough:
$ tar -czf hare.tar.gz /usr/local/bin/{qbe,harec,hare} /usr/local/src/hare/stdlib/
$ ls -sh hare.tar.gz
1.6M hare.tar.gz
hm, yeah. that's not quite what i was thinking of measuring, but i still
came up with ~8mb for checkouts of ~sircmpwn/harec, ~sircmpwn/hare, and
the qbe git repo. not really sure what to do with this information, the
"fits on a floppy" marketing is quite cute but nothing immediately stood
out to me as being easily shrinkable and i don't want to make hare worse
in an attempt to fit it onto a floppy disk
On Wed Feb 21, 2024 at 12:12 AM EST, Jose Lombera wrote:
> On 2024-02-21 05:03 UTC, Ember Sawady wrote:>> > the thing to check for size would be qbe + harec + hare sources (without> > the repo history)>> Yeah, that is worse:>> $ du -shc /usr/local/bin/{qbe,harec,hare} /usr/local/src/hare/stdlib/> 552K /usr/local/bin/qbe> 664K /usr/local/bin/harec> 1.6M /usr/local/bin/hare> 5.5M /usr/local/src/hare/stdlib/> 8.3M total
Looks like these are qbe/harec/hare binaries? What's the size of the
qbe/harec/hare source code only?
On 2024-02-21 05:19 UTC, Ember Sawady wrote:
> hm, yeah. that's not quite what i was thinking of measuring, but i still> came up with ~8mb for checkouts of ~sircmpwn/harec, ~sircmpwn/hare, and> the qbe git repo.
Yeah, I realized I misunderstood you. Compressed archives of the
sources still fit in a floppy:
$ du -sch qbe-1.2.tar.gz harec-0.24.0.tar.gz hare-0.24.0.tar.gz
356K qbe-1.2.tar.gz
192K harec-0.24.0.tar.gz
752K hare-0.24.0.tar.gz
1.3M total
(generated with git-archive(1))
> not really sure what to do with this information, the> "fits on a floppy" marketing is quite cute but nothing immediately stood> out to me as being easily shrinkable and i don't want to make hare worse> in an attempt to fit it onto a floppy disk
I posted this as a joke; I don't think anyone would consider it a hard
requirement ;) Hare is still orders of magnitude smaller than almost
any other compiler (in source/binary size and compilation time).
i got a bit under 1mib with aggressive zstd compression. the current
hare-tls tree adds ~100kib, and if (pessimistically) we assume another
extra 100kib there and 200kib for the hosted compiler (matching the size
of bootstrap harec), we should still stay under the 1.41mib limit for a
floppy disk
regardless, it's not the end of the world if we aren't able to stay
under a floppy disk - worst case scenario, we just have to do the
releases on sets of two disks :)
On 2024-02-21 00:32 UTC, Sebastian wrote:
> On Wed Feb 21, 2024 at 12:12 AM EST, Jose Lombera wrote:> > On 2024-02-21 05:03 UTC, Ember Sawady wrote:> >> > > the thing to check for size would be qbe + harec + hare sources (without> > > the repo history)> >> > Yeah, that is worse:> >> > $ du -shc /usr/local/bin/{qbe,harec,hare} /usr/local/src/hare/stdlib/> > 552K /usr/local/bin/qbe> > 664K /usr/local/bin/harec> > 1.6M /usr/local/bin/hare> > 5.5M /usr/local/src/hare/stdlib/> > 8.3M total>> Looks like these are qbe/harec/hare binaries? What's the size of the> qbe/harec/hare source code only?
Yes, the compressed code is smaller. See the other sub-thread.
In my defense, I always thought they meant the binaries + stdlib would
fit in a floppy disk. And it would make sense to make that comparison
since, for instance, the binary of any LLVM-based compiler would be
hundreds of MBs, even if the actual compiler front-end code was small.
I have been keeping an eye on the size of qbe, harec, and the stdlib
sources, tar'd and xz'd. But it seems we may be approaching the limit,
eh? Oh well.
On Tue Feb 20, 2024 at 11:47 PM CST, Ember Sawady wrote:
> regardless, it's not the end of the world if we aren't able to stay> under a floppy disk - worst case scenario, we just have to do the> releases on sets of two disks :)
I'd say it would also be nice to ship an assembler with it so it can theoretically be
installed and used on an air-gapped system. Splitting up hare, qbe, and as onto one
floppy and the stdlib onto another or something would be fine with me!
I was hoping to purchase the floppy edition of Hare when it became available. It's cute
and also kinda funny, though I worry about the supply chain of floppy disks being a
problem :)
On Wed Feb 21, 2024 at 2:30 PM UTC, Noah Pederson wrote:
> On Tue Feb 20, 2024 at 11:47 PM CST, Ember Sawady wrote:> > regardless, it's not the end of the world if we aren't able to stay> > under a floppy disk - worst case scenario, we just have to do the> > releases on sets of two disks :)>> I'd say it would also be nice to ship an assembler with it so it can theoretically be> installed and used on an air-gapped system. Splitting up hare, qbe, and as onto one> floppy and the stdlib onto another or something would be fine with me!
yeah, ideally we would ship as and ld, the issue is that there's not
really an alternative to llvm/gnu binutils, and those definitely aren't
fitting on a floppy disk. we could look into porting
https://github.com/andrewchambers/minias to the other arches qbe
supports. https://git.sr.ht/~emersion/sld may also be worth looking
into, i managed to get it to work with a really old version of hare but
it's been 3 years since then
~/s/hare % git archive --prefix=hare-1.0/ HEAD | xz | wc -c
593460
Takes up just about half of a 1.44 MiB floppy disc for the stdlib.
Didn't measure harec+qbe as well but I think it all fits just fine.