[Poll] Which "whales" are more important?

In ancient times, it was believed that the Earth rested on three whales.

Software “whales”:

  • Linux
  • macOS
  • Windows

(The order is according to the English alphabet)

And although Zig is theoretically mostly OS-independent,
the code does not always run smoothly on all platforms (at least in my own projects).
The purpose of the poll is to determine the usage of the language on this trio.

This will help answer the questions:

  • For which OS to develop and test for first
  • How well Zig itself is tested on this OS.

I emphasize - this is not about desire (of course, we want it to run on everything),
but about the current situation.

Therefore, I chose a simple criterion - the use of ‘zig build testfor this OS on GitHub or similar platforms,
because it indicates active development and testing.

I run zig build test on:
  • Linux (ubuntu in yml)
  • macOS (macos in yml)
  • Windows (windows in yml)
0 voters

What is yml?

1 Like

Sorry
It’s “script” for running software on github etc.
Below example for zig and all oses:

name: CI

on: [push, pull_request]

jobs:
  build:
    name: Build and test
    runs-on: ${{ matrix.os }}-latest
    strategy:
      fail-fast: false
      matrix:
        os: [macos, ubuntu, windows]

    steps:
      - if: matrix.os == 'windows'
        run: git config --global core.autocrlf false

      - uses: actions/checkout@v2
        with:
          submodules: true

      - uses: mlugg/setup-zig@v2
        with:
          version: 0.14.1
          use-cache: false

      - run: zig build test -freference-trace --summary all

You can see that ‘zig build test’ is running on

matrix:
os: [macos, ubuntu, windows]

all “whales”

1 Like

It depends on the target user. If your target is other developers, test on Linux. If your target is ordinary PC users, test on Windows.

Personally, I’m not very comfortable developing software for macOS; it’s a very developer-unfriendly platform! But if you’ve already passed Linux testing, testing on macOS isn’t difficult.

2 Likes

If test is not failed :grinning_face:

Becuase I am developing on Linux, every failure of the test
on Mac is challenge

But my point is slightly different - if we are not tested on all platforms, we don’t help to Zig itself to be more mature

And I am also guilty - don’t test on WIndows, at least for now :joy:

YAML, aka the most overengineered and terrible .ini replacement humankind has come up with yet :wink:

5 Likes

As opposed to .ini, the second most under specified and often ad-hoc configuration format?

(First is obviously CSV)

1 Like

looks yaml is whale :scream:

Might be a hot take, but IMHO the best format for this kind of stuff is ‘relaxed’ json with trailing commas and comments, and a json schema (which allows code completion). The problem with YAML is that it requires a very complex parser (eg 5kloc for the defacto standard python yaml parser)

I run CI on all three (plus WASM for some projects) but sometimes remove either Windows or macOS from the build matrix because something broke in the Zig nightly (while breakage on Linux seems very rare, I guess Zig is mostly developed on Linux)

I thought this title goes to XML.

3 Likes

I simply have 3 files one per os

On github you can manually “disable flow” (means file)
So you don’t need any editiing

And on this page you can see that Windows is disabled

1 Like

HTML is even worse. Probably invented by some amateur in the 80’s of the previous millennium. Now we are stuck :slight_smile:

1 Like

I mean… modern HTML can essentially be reduced to <div/> with Javascript event handlers attached, so it’s not too bad :wink:

4 Likes

Talking about javascript… well I guess it has its advantages

Interesting - macOs and Windows go head to head

My expectation was - Windows forever last

(Just for prevention of some responces - most time I developed for Windows, from device driver to distributed proprietary file system.
So “nothing presonal”)

I still find it weird to see such graphs and Windows doesn’t sit at a solid 90% tbh :wink:

Zig has a substantial games contingent, so I don’t find this surprising.

1 Like

games for me is terra incognita
I always developed “invisible” software

1 Like

Well, from experience of library developers developing Windows first leads to less problems down the line and a cleaner design because of the way Windows handles dynamic linking.

And well, I see Zig as a systems programming language which includes writing libraries which are usable from OTHER languages.

But of course, not every library is intended to run on every operating system. For example why should you test a iouring library on Windows (and how would you even do that)?

In case somebody in interested for why, here a talk from CppCon: https://www.youtube.com/watch?v=_enXuIxuNV4

And how one comment on the video there mentioned:

One consequence of the differences in Windows vs. POSIX symbol handling is that there is no such thing as the C runtime or the STL on Windows. Every module (EXE or DLL) choses which C/C++ standard library it uses. You can’t assume that memory allocated by malloc/new in one module can be released by free/delete in a different module. You can’t assume that STL objects like std::vector can be shared across modules.
You can avoid these problems if you control all of the modules, can dictate how they’re built, and force them to use the same standard runtimes. But it only takes one external DLL dependency to ruin that plan.

3 Likes