Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xorblurb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
151.
▲
by
xorblurb
10y ago
Most parts of the NT API have never been officially documented, officially supported, stable (in the "won't change" meaning), and the tiny parts that have actually been documented come with caveats that they are susceptible t
152.
▲
by
xorblurb
10y ago
Well, you can do it on some versions of Windows. On Windows 10, and even future version of Windows 10, not so sure...
153.
▲
by
xorblurb
10y ago
You are right, but those points are details. FD under modern Unixes (esp. Linux, but probably others) serves exactly the same purpose (resource management). The FD where read/write can't be used just don't define those (same
154.
▲
by
xorblurb
10y ago
Well, tiny parts of the NT API (callable from userspace) are documented, but then often with the caveat that they are not stable (in practice, even some undocumented ones can be considered stable if used by enough programs in the wild, espe
155.
▲
by
xorblurb
10y ago
Cygwin is layered above Win32. Win32 has no provision to nicely handle forks. So even if there was an NT API fork syscall (I'm don't think there is on Windows 10, WSL does not use the NT API, there is not any more Posix/SFU&#
156.
▲
by
xorblurb
10y ago
Well, that's an (unbacked) opinion, and I don't share it. NT design is not too bad (obviously especially in contrast with Consumer Windows), and especially given what was achieved on the first few releases (that was made easier by
157.
▲
by
xorblurb
10y ago
Well, large parts of the NT API are very close from Win32 API for obvious reasons, and so are often in the realm of dozen of params and even more crazy Ex functions. Internally there are redundancies that do not make much sense (like multip
158.
▲
by
xorblurb
10y ago
fork() is properly implemented by the NT kernel. WSL is not layered above Win32.
159.
▲
by
xorblurb
10y ago
A list of (at least partly) supported syscalls is here: https://msdn.microsoft.com/en-us/commandline/wsl/release_not... Not details on which one are fully or partly supported, though.
160.
▲
by
xorblurb
10y ago
Well for now their top priority is to make a binary compatible way to run pre-existing (parts of) Linux distro, and it works quite well for beta software (I would not have said the same if it was released software in the same state, but the
161.
▲
by
xorblurb
10y ago
IIRC you formally can't promote some memory orders without in some case introducing new behaviors. (You formally can't serialize in some cases, which is quite insane.) But this is only anecdotal to my point. What I'm especial
162.
▲
by
xorblurb
10y ago
On that particular point of memory orders, this is true. But on other points about how compiler optimize the simple alternative (-O0) is the binary to be painfully slow, while you still have a dozen of flag to make the binary both fast an
163.
▲
by
xorblurb
10y ago
This prevents debugging, probably does not really optimize (except 1% in useless microbenchmarks), and increases compiler complexity and the risk of bugs in it. A similar thing has already happen in the past: compiler started to introduce s
164.
▲
by
xorblurb
10y ago
It is not the particular situation people are upset about (well, at least me). It is the reasoning, especially in the context of "you shall not write undefined behavior according to the standard even if it should makes sens given the c
165.
▲
by
xorblurb
10y ago
Can't you see the pattern here? Even LLVM devs are incapable of doing what they are requiring from random regular developers. If that does not motivate to address that kind of craziness more in depth in a systematic way to restore safe
166.
▲
by
xorblurb
10y ago
> An implementation is not bound by the standard in its own use of the standard library functions. The implementation can use a function like memcpy in ways that would be formally undefined if they occured in user code; its implementatio
167.
▲
by
xorblurb
11y ago
Maybe you are partly right. Anyway, GNU is still here, still very strong, so much that's even what is mainly advertised (GNU bash + the usual gnu tools that you think of when you think about GNU bash) by Microsoft (the demo goes even b
168.
▲
by
xorblurb
11y ago
It is not very probable that only public interfaces are used to implement this subsystem. Therefore, we can think that the special exception of the GPL that exclude major components of the OS would not apply. It also explicitly won't a
169.
▲
by
xorblurb
11y ago
I'm not talking about that. I'm talking about the hypothetical situation where an API itself is considered inheriting copyrights from the reference implementation -- similar to what Oracle argued about Java and Android.
170.
▲
by
xorblurb
11y ago
They don't. Canonical ships the GPLv3 software.
171.
▲
by
xorblurb
11y ago
This implementation is definitively a work derived from the NT kernel. If reimplementing and API propagates copyright, the only allowed licensing situation would be that MS releases the complete NT kernel under the GNU GPLv2 license. This i
172.
▲
by
xorblurb
11y ago
More than a decade ago, MS used to kind of have that, and mostly consistent at the architecture level, but I think it was only by chance (win 3.1 programs still had all their legacy dialogs, including open file), because they just did not h
173.
▲
by
xorblurb
11y ago
And switch from UTF-16 to UTF-8, like everybody else on the planet. Or at least provide a completely working UTF-8 codepage...
174.
▲
by
xorblurb
11y ago
Well, MSYS/MSYS2 lets do that today. It would just be more elegant to use native unported Linux binaries from an existing repository (which probably has more tools available too), but even with the low level syscall thing being solved,
175.
▲
by
xorblurb
11y ago
IIRC Allwinner does not have public datasheets, and honestly I prefer to have an half-documented half-accessible x86 platform rather than a theoretically fully-accessible ARM one that in practice is 1/10 publicly usable (the cpu alone
176.
▲
by
xorblurb
11y ago
> Apple has always been far more willing than Microsoft to break old stuff after a few years if it happens to conflict with their new stuff. Sidetracking this conversation a little, but I'm more and more wondering whether MS actuall
177.
▲
by
xorblurb
11y ago
I think it won't be able to run windows program, at least at first, and the reason is probably mainly technical: detecting fork/exec pairs of calls where it should be possible to spawn a PE is non-trivial, especially since you mai
178.
▲
by
xorblurb
11y ago
If you want a Linux container on Windows (which they do not seem to propose right away, but it seems a logical step), you need a Linux ABI.
179.
▲
by
xorblurb
11y ago
By default, but you can tell Cygwin to use /c/ though. Really handy when you switch between the two, and actually makes more sense (what else would be /c/ ?)
180.
▲
by
xorblurb
11y ago
There is no need to use actual Linux code to implement its interface, so no GPL'ing of NT, and implementing /proc is not a big deal compared to other things. And this seems to be implemented as an NT subsystem, which makes tons of
More ›