Live data from Hacker News

Clang 5 in a Docker container for C++17

solarianprogrammer.com

1–10 of 69 posts

Re: Clang 5 in a Docker container for C++17

#2
It feels like cargo-cult computer usage.

The description states: "Running Clang in a container has the advantage that it is light on resources and won’t mess with your underlying OS.". Containers aren't really light on resources if the host kernel is not Linux and not messing with OS is easily attainable by installing the binaries in a custom prefix directory (e.g. ~/bin). This is especially true for compilers which have minimal or zero dependencies.

Re: Clang 5 in a Docker container for C++17

#4
Just pick a random tool, throw it in docker and farm karma.

IIRC even though windows 10 might support docker through WSL sometime in the future, for now it's just spinning up a vm like on mac. Is it possible to have multiple lxss with different base images in windows 10(because then you'd just use a ppa or something)?

So we have a VM which pulls in a bunch of layers. At that point, you might as well just distribute a full vm through vagrant, then your vagrant up is just a one liner.

I dual boot my laptop with macos and linux, but am I seriously the only one with 256GB space that has to worry about how many vms/docker layers get pulled?

I kinda liked gentoo prefix, far superior to homebrew imho. I used to update some llvm patch for various versions[1], but the lack of binary packages and smooth developer experience is what killed it IMHO.

[1]: https://github.com/fishman/timebomb-gentoo-osx-overlay/tree/...

Re: Clang 5 in a Docker container for C++17

#6
post #4

Just pick a random tool, throw it in docker and farm karma. IIRC even though windows 10 might support docker through WSL sometime in the future, for now it's just spinning up a vm like on mac. Is it possible to have multiple lxss with different base images in windows 10(because then you'd just use a ppa or something)? So we have a VM which pulls in a bunch of layers. At that point, you might as well just distribute a…

Docker for mac doesn't use a virtualbox, it uses "HyperKit".

> Docker for Mac does not use VirtualBox, but rather HyperKit, a lightweight macOS virtualization solution built on top of Hypervisor.framework in macOS 10.10 Yosemite and higher.

https://docs.docker.com/docker-for-mac/docker-toolbox/

Re: Clang 5 in a Docker container for C++17

#7
post #2

It feels like cargo-cult computer usage. The description states: "Running Clang in a container has the advantage that it is light on resources and won’t mess with your underlying OS.". Containers aren't really light on resources if the host kernel is not Linux and not messing with OS is easily attainable by installing the binaries in a custom prefix directory (e.g. ~/bin). This is especially true for compilers which…

My thought exactly. Not only that, but MSVC supports C++17 features natively so I have no idea why you'd want to do this on Windows.

Granted, the state of C++ on MacOS is embarrassingly bad.

Re: Clang 5 in a Docker container for C++17

#8
post #6
post #4

Just pick a random tool, throw it in docker and farm karma. IIRC even though windows 10 might support docker through WSL sometime in the future, for now it's just spinning up a vm like on mac. Is it possible to have multiple lxss with different base images in windows 10(because then you'd just use a ppa or something)? So we have a VM which pulls in a bunch of layers. At that point, you might as well just distribute a…

Docker for mac doesn't use a virtualbox, it uses "HyperKit". > Docker for Mac does not use VirtualBox, but rather HyperKit, a lightweight macOS virtualization solution built on top of Hypervisor.framework in macOS 10.10 Yosemite and higher. https://docs.docker.com/docker-for-mac/docker-toolbox/

Yeah, that's a VM they're describing. They need a tiny wrapper running with its own Linux kernel.

Re: Clang 5 in a Docker container for C++17

#9
post #2

It feels like cargo-cult computer usage. The description states: "Running Clang in a container has the advantage that it is light on resources and won’t mess with your underlying OS.". Containers aren't really light on resources if the host kernel is not Linux and not messing with OS is easily attainable by installing the binaries in a custom prefix directory (e.g. ~/bin). This is especially true for compilers which…

My thought exactly. Not only that, but MSVC supports C++17 features natively so I have no idea why you'd want to do this on Windows. Granted, the state of C++ on MacOS is embarrassingly bad.

> so I have no idea why you'd want to do this on Windows.

If you're trying to write portable software, that's the easiest way to validate compilation for Linux without: a) using an external CI, or b) running a full VM in parallel.

Re: Clang 5 in a Docker container for C++17

#10
post #9

Earlier quoted context omitted.

My thought exactly. Not only that, but MSVC supports C++17 features natively so I have no idea why you'd want to do this on Windows. Granted, the state of C++ on MacOS is embarrassingly bad.

> so I have no idea why you'd want to do this on Windows. If you're trying to write portable software, that's the easiest way to validate compilation for Linux without: a) using an external CI, or b) running a full VM in parallel.

but you can also install clang 5 in windows... I don't think it would be that different. I don't use it too much, but I have it for clang-format
Post reply on HN