~sircmpwn/hare-users

12 5

Hare 0.24.0 no longer fits in a floppy disk :)

Details
Message ID
<CZAHRPEMJNY2.2H71YDMSG6SAY@lombera.dev>
DKIM signature
pass
Download raw message
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)
Details
Message ID
<CZAHSI3UOOWP.KXIIMUB8QQ78@d2evs.net>
In-Reply-To
<CZAHRPEMJNY2.2H71YDMSG6SAY@lombera.dev> (view parent)
DKIM signature
pass
Download raw message
the thing to check for size would be qbe + harec + hare sources (without
the repo history)
Details
Message ID
<CZAHZK1Z2S72.2B4B8K46S1H21@lombera.dev>
In-Reply-To
<CZAHSI3UOOWP.KXIIMUB8QQ78@d2evs.net> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<CZAI4ZXXJBOU.3QT4L9L4VFFJ4@d2evs.net>
In-Reply-To
<CZAHZK1Z2S72.2B4B8K46S1H21@lombera.dev> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<CZAIEOYX5D8Q.2HI31VCF5Y18G@sebsite.pw>
In-Reply-To
<CZAHZK1Z2S72.2B4B8K46S1H21@lombera.dev> (view parent)
DKIM signature
pass
Download raw message
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?
Details
Message ID
<CZAIHXW991SS.1QD7BT0TBEPCM@lombera.dev>
In-Reply-To
<CZAI4ZXXJBOU.3QT4L9L4VFFJ4@d2evs.net> (view parent)
DKIM signature
pass
Download raw message
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).
Details
Message ID
<CZAIQFZS88GX.3N1FX0QN9LU2V@d2evs.net>
In-Reply-To
<CZAIHXW991SS.1QD7BT0TBEPCM@lombera.dev> (view parent)
DKIM signature
pass
Download raw message
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 :)
Details
Message ID
<CZAIQX431OEB.IVVK1CIWY656@lombera.dev>
In-Reply-To
<CZAIEOYX5D8Q.2HI31VCF5Y18G@sebsite.pw> (view parent)
DKIM signature
pass
Download raw message
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.
Details
Message ID
<CZANGS4VQD2C.1L6BNX15MAQIU@cmpwn.com>
In-Reply-To
<CZAIQX431OEB.IVVK1CIWY656@lombera.dev> (view parent)
DKIM signature
pass
Download raw message
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.
Details
Message ID
<CZATV1O7575I.2KYA7PC4TFHCC@packetlost.dev>
In-Reply-To
<CZAIQFZS88GX.3N1FX0QN9LU2V@d2evs.net> (view parent)
DKIM signature
pass
Download raw message
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 :)
Details
Message ID
<CZB1IIG26NCO.3R3AKX06NPZ58@d2evs.net>
In-Reply-To
<CZATV1O7575I.2KYA7PC4TFHCC@packetlost.dev> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<CZBOB6TW93CQ.HHVL9NLXK9CQ@cmpwn.com>
In-Reply-To
<CZAHRPEMJNY2.2H71YDMSG6SAY@lombera.dev> (view parent)
DKIM signature
pass
Download raw message
~/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.
Details
Message ID
<CZBQB0P226IB.192TSN8XZADH7@lombera.dev>
In-Reply-To
<CZBOB6TW93CQ.HHVL9NLXK9CQ@cmpwn.com> (view parent)
DKIM signature
pass
Download raw message
Yes.  I misunderstood and assumed the _binaries_ were meant to fit in a
floppy disk.  They were so small that this assumption made sense to me.
Reply to thread Export thread (mbox)