So Mojo can use 🔥 as a file extension?

Zig says: “Hold my beer.”

$ mv src/main.zig src/main.⚡

In build.zig

        .root_source_file = b.path("src/main.⚡"),

Works like a charm. :lizard:

24 Likes

We need a “flex” category :rofl:

9 Likes

Yo this actually works I thought you were kidding at first. It doesnt, however, work with @import though as it thinks its receiving a module. Not even ./ in front of the filename can bypass that

2 Likes

:zap:is better :slight_smile:

1 Like

As fun as this is, you want to be careful with it. High Voltage is one of the older (Unicode 4.0) symbols which was “emojified” later, so it sometimes takes a U+FE0F as an invisible variation selector. So you have a file extension which might be three, or six, bytes long, and you won’t be able to visually distinguish those cases under many circumstances. If ⚡ and ⚡️ look the same on your screen, watch out, because as entered, one of those doesn’t have the variation selector.

Is this impossible to compensate for? It depends, if you’re looking for .zig already you can just look for .⚡️ in both flavors. But it can really waste someone’s time if it gets used in a script, and something decides to truncate the U+FEOF, or add it, as the case may be.

Not to be a buzzkill :zap::skull_and_crossbones:.

9 Likes

Wtf :face_with_raised_eyebrow:

Emoji on file extension is :cold_face:

Btw, “file extension” or more precisely, “file name extension” is a DOS/FAT thing,
there are 3 bytes in a directory record exactly for the purpose of storing this “extension”,
and the dot between name and it’s extension is not stored at all.
There is no such special place in extN (for ex.) file systems, file name is just a name,
without parts distinguishable at file system level, so I prefer to use term “suffix”: archive.tar.gz has two, gz and tar… or a single tar.gz :slight_smile:

Extensions are a 60s invention. 1961 MIT CTSS was the first to have a second name for how to process a file. 1964 PDP-6 multiprogrammed monitor used the term “filename extension” and the 8+3 name format. CP/M got it from PDP-6, and DOS got it from CP/M.

2 Likes

Ah the good old days of 8.3 filenames. AUTOEXEC.BAT, CONFIG.SYS… Then came Windows 95 with the “breakthrough” log filenames and the beautiful compatibility scheme
Program Files -> PROGRA~1. lol

I believe DEC’s VMS also used 8.3.

Yes, VMS was the OS of the VAX-11 (1977) but started as 32-bit extension of PDP-11 (1975).

1 Like

But also had version numbers.

You could have “FOO.TXT;3” “FOO.TXT;2” and “FOO.TXT;1” in your directory.

I miss that. A lot.

1 Like