ChrisSD
ChrisSD on Hacker News
To be very pedantic, Python was always strongly typed in the sense that every value has a concrete type. This is very different to, e.g. C, where `void*` is often used to actually erase the type or, conversely, more abstract languages where there are only interfaces.
But of course Python function were always duck typed so it often didn't matter to the user.
A certain type of person (quite common in tech) really dislikes saying "I don't know". They seem to have a strong need for always having an answer, even if that answer is from google or a chatbot or simply pulled out of their arse.
The other other way would be more structured. Arguments are not just an array, they also contain `--switch` and key/value pairs (e.g. `--key value` or `--key=value` depending on who you ask). One problem with the flat array approach is there's no way to distinguish a literal value starting with `-` from a switch, which means there needs to be some way to workaround that (and users have to remember the workaround; how often do people remember to use `rm -- "$FILENAME"`).
In practice almost every application does still need to do its own parameter parsing; a flat array is not enough.
I think the point was more that it's hard to compose shell utilities to make something new that's not supported out of the box. Instead you do have to write an entirely new utility and use that.
That said having key/value semantics and not just stream of bytes would make the shell much more versatile, at the cost of making it bigger.
Note that GDPR did not mandate the cookie banners we see everywhere today. Those are a form of malicious compliance. Their goal is not to conform to regulation but to undermine the regulation itself in the eyes of the public.
Sometimes things are just common sense pure and simple.
But then that shifts the issue. You've now got an opaque binary blob being injected into programs. What if it is malicious?
You can call into the kernel just fine in Windows. The fact you use a function call wrapper instead of a raw syscall is not really relevant.
Most Windows NT kernel functions take a buffer to use rather than allocating their own memory. Even many Win32 functions don't allocate (although there you have to be much more careful).
Servo was sparsely maintained for years after Mozilla abandoned the project. Just in the last year it has picked steam as an independent project with a range of third party sponsors. Work is now progressing apace and it's becoming increasingly compatible with real-world websites.
Maybe give them a second? Yes, it's usable for applications web views if you're willing to restrict yourself but for general purpose web browsing there's still a lot that needs doing (but work is progressing). Under Google's management, web tech has grown fast. And it's an ever shifting living standard. There is a lot for any alternative browser engine to implement, let alone keep pace with the changes.
Like all such metrics, the specifics don't really matter. All that matters is that you can tell a story, over the course of the year, on how you've "improved". The goal is to use the story to highlight the work you've been doing while passing it off as evidence. This kind of story telling is something people in management positions tend to be very good at but it's also a skill people not in management should have some proficiency in.
Or you could use powershell and avoid the issue ;).
Though nowadays system files should be protected even from admin and even if you do manage to delete them, Windows can restore them.
VMs should have VirtIO RNG set up so there is a high quality entropy source at boot time, provided by the host system.
Yep, that's why I was asking. I'd be very interested to hear of more candidates for uplifting into std.
I guess saying "every project" has 5 dependencies might be somewhat hyperbolic (or at least domain specific) but it would be interesting to know the kinds of things they're talking about that haven't yet been uplifted.
Can you name 5 as an example?
In that specific sentence the source is cited (via hyperlink). So even if you read it out of all context you can still find out the source is UK's Children’s Commissioner Dame Rachel de Souza who said it, not "the EU" (whatever that means).
For this "story" to gain legs, someone must have pulled that sentence out of content without mentioning the source and then added some misleading context for the outrage.
Calling it from C does not mean you need a full C standard library to exist. For example, much of the C standard library is itself written in C. But it's a "freestanding" C which assumes only a minimal set of library functions exist (e.g. functions for copying memory from one place to another, filling memory with zeroes, etc).
And you can of course use non-C languages to call the Win32 API. Or even directly using assembly code.
You can open directories using high level win32 APIs. What you need NtCreateFile for is opening files relative to an open directory.
> WinAPI access for ACLs was added in Windows 10
I'm not sure which docs you mean but that's not true. The NT kernel has used ACLs long before rust was invented. But it's indeed true that rust adds platform-specific methods based on demand. The trouble with ACLs is it means either creating a large API surface in the standard library to handle them or else presenting a simple interface but having to manage raw pointers (likely using a wrapper type but even then it can't be made totally safe).
> the de-facto standard winapi crate, which provides access to the raw syscall
Since the official Microsoft `windows-sys` crate was released many years ago, the winapi crate has been effectively unmaintained (it accepts security patches but that's it).
Oh sorry, I thought this was just listing changes since the branch.
> Many projects including Chromium, boringssl, Firefox, and Rust call SystemFunction036 from advapi32.dll because it worked on versions older than Windows 8.
That's not true. They use ProcessPrng since versions earlier than 10 are no longer supported (well, rust also has a windows 7 target but that couldn't use ProcessPrng anyway since it wasn't available). The issue they linked is from a decade ago. E.g. here's Chromium: https://github.com/chromium/chromium/blob/dc7016d1ef67e3e128...
> If [ProcessPrng] fails it returns NO_MEMORY in a BOOL (documented behavior is to never fail, and always return TRUE).
From Windows 10 onward ProcessPrng will never fail. There's a whitepaper that gives the justification for this (https://aka.ms/win10rng):
> We also have the property that a request for random bytes never fails. In the past our
RNG functions could return an error code. We have observed that there are many callers
that never check for the error code, even if they are generating cryptographic key
material. This can lead to serious security vulnerabilities if an attacker manages to create
a situation in which the RNG infrastructure returns an error. For that reason, the Win10
RNG infrastructure will never return an error code and always produce high-quality
random bytes for every request...
> For each user-mode process, we have a (buffered) base PRNG maintained by
BCryptPrimitives.dll. When this DLL loads it requests a random seed from kernel mode
(where it is produced by the per-CPU states) and seeds the process base PRNG. If this
were to fail, BCryptPrimitive.dll fails to load, which in most cases causes the process to
terminate. This behavior ensures that we never have to return an error code from the
RNG system.
I think you're too stuck on the current implementation. Work is going into investigating how to evolve the standard library over editions. The "easiest" win would be to have a way to do edition-dependent re-exports of types.
> Aurich Lawson of Ars Technica deleted the original article
That's a very "shoot the messenger" statement. While Aurich is the community "face" of Ars, I very much doubt he has the power to do anything like that.
HTML diverged from SGML pretty early on. Various standards over the years have attempted to specify it as an application of SGML but in practice almost nobody properly conformed to those standards. HTML5 gave up the pretence entirely.
Eh. I don't think so. Sure, it was used more in business contexts but it wasn't until Windows 2000 that I saw more regular people using it and recommending it.
> It does mention Windows NT but honestly nobody really cared about that until NT 3.0/3.5 and it soon thereafter became Windows XP and laid the foundation for modern Windows.
Fun fact: NT 3.1 was the first version of NT, released in 1993. It was versioned like that to match Windows 3.1 which had been released the previous year.
And it really took off with Windows 2000. Not just business people but more ordinary people were using it as a more stable alternative to Windows 95/98 (albeit lacking some compatibility, especially with games).
For everyone that wants a simple, lightweight, alternative to notepad there's edit.exe on recent version of Windows. Assuming you don't mind TUIs.