Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ChrisSD
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
ChrisSD
2y ago
But when that leap minute does eventually occur, it's going to cause havoc in all the systems that don't handle it. Which, let's face it, there are going to be a lot of. Either because they were never designed for it or else
62.
▲
by
ChrisSD
2y ago
And it has mutable aliasing via `UnsafeCell`[0] which, as the name says, is unsafe. But safe wrappers can be built around it, such as `Cell`[1]. Or you can just use raw pointers and take safety into your own hands. [0]: https://d
63.
▲
by
ChrisSD
3y ago
Ok, I committed some mild linker crimes and got the same program down to 800 bytes. rustc hello.rs -C panic=abort -C opt-level=3 -C link-args="/ENTRY:main /DEBUG:NONE /EMITPOGOPHASEINFO /EMITTOOLVERSIONINFO:NO
64.
▲
by
ChrisSD
3y ago
A similar program on Windows is 3072 bytes. I compiled it using: rustc hello.rs -C panic=abort -C opt-level=3 -C link-arg=/entry:main Here's the program: #![no_std] #![no_main] #[panic_handler] fn panic
65.
▲
by
ChrisSD
3y ago
> Of what use is a filesystem with many empty files? You could use it to benchmark things that do things to all the files in a directory tree. For example, what is the fastest way to list all those files? Delete them? Back them up? Creat
66.
▲
by
ChrisSD
3y ago
Just to clarify, I doubt many people from the UK would know off hand what CBE stands for even though they know what a CBE is. The full name is pretty archaic in any case so it's basically just trivia at this point.
67.
▲
by
ChrisSD
3y ago
The opt-in is only required if they collect your information. If they take the default as opt-out then they don't have to show you any prompt and have no liability.
68.
▲
by
ChrisSD
3y ago
If you think nobody complains about Rust then you haven't visited HN much recently ;). Heck, Bjarne Stroustrup himself has recently taken to complaining about Rust in papers and talks (though most recently he's taken to referring
69.
▲
by
ChrisSD
3y ago
> Complicating this picture is shells. For a long time, many shells have kept track of a name for their current directory themselves, often materializing this in the '$PWD' environment variable. The shell has to keep track of t
70.
▲
by
ChrisSD
3y ago
I'm not sure I understand. Why would rebasing ever be more complicated? They're the same thing at the end of the day, no? Main branch and my branch both changed this line no matter what, you must resolve that conflict.
71.
▲
by
ChrisSD
3y ago
IIRC, Python managed to move to github issues.
72.
▲
by
ChrisSD
3y ago
1993
73.
▲
by
ChrisSD
3y ago
Code signing wouldn't necessarily fix that. There are a lot of "legitimate" applications that a user wouldn't want. For example, spyware is fine if there's some plausible deniability to it because many applications
74.
▲
by
ChrisSD
3y ago
> While the game is a bit on the short side, there's enough depth to its mechanics to feel satisfying to master, and the realization that a game that gave you so much trouble at first has turned into a total cakewalk can't be m
75.
▲
by
ChrisSD
3y ago
Much speed up was from using the right data structure for the task, e.g. Vec rather than HashMap and BitSet rather than HashSet.
76.
▲
by
ChrisSD
3y ago
No it's basically "how to analyse and improve the performance of Rust code" with a "btw, I prototype in python".
77.
▲
by
ChrisSD
3y ago
They did swap the hashing function > Note that everywhere we refer to HashMap is actually an alias for fxhash::FxHashMap, which is just std::collections::HashMap with a more efficient hashing algorithm
78.
▲
by
ChrisSD
3y ago
It does. But this issue arises because of file locks. Running an executable holds a lock that prevents deletions (but not renames). Many OSes have file locks, though they often don't use them as liberally as Windows.
79.
▲
by
ChrisSD
3y ago
Notably Rust's standard library does allow deleting files it opens by default. https://github.com/rust-lang/rust/blob/735bb7e5df185cc24e565... While full Unix-like behaviour is only available on Windows
80.
▲
by
ChrisSD
3y ago
The fact it injects into another process means they can't know if it'll crash or not. You're just one Explorer update away from things changing enough for the hack to crash it. I guess they could do this more robustly. I.e pa
81.
▲
by
ChrisSD
3y ago
It's not really a security measure in that sense. It's a "safety feature" that prevents accidentally running such a script. Anything can trivially disable the protection using a bat script (or anything else) to bootstrap
82.
▲
by
ChrisSD
3y ago
It has little to do with the filesystem. Windows has OS level locks. In the case of a running executable, the mapped memory holds a lock on the exe file to prevent deleting it. This is intentional. If it didn't hold the lock then it wo
83.
▲
by
ChrisSD
3y ago
No their stance is to create RFC#3463[0] setting out a policy for handling name squatting and other issues. What they won't do is act unilaterally without a policy and accountability. [0]: https://github.com/Turbo87
84.
▲
by
ChrisSD
3y ago
Except that means tools aren't doing "one thing" as in the Unix philosophy. Or least I know of very few unix tools that actually do that. At a minimum they need to bundle an argument parser (or more often reinvent their own).
85.
▲
by
ChrisSD
3y ago
So long as a tool can output a machine readable format, it can be consumed by nushell. If it can't then... that's actually a big problem when composing tools in bash too. Parsing arbitrary unstructured text is not good for composi
86.
▲
by
ChrisSD
3y ago
But saying things like "everything is somewhere in the middle" and "use common sense" is just as much marketing speak. It's meaningless to the point it's very successfully used in both marketing and politics (b
87.
▲
by
ChrisSD
3y ago
So for those that only skimmed, the problem here is bridging the gap between native Windows and Cygwin's POSIX emulation (which is a "terrible impedance mismatch"). This is made more difficult because Cygwin's Unix socke
88.
▲
by
ChrisSD
3y ago
I wonder if that legal theory has ever been tested? I admit I'm sceptical that it would hold up in court.
89.
▲
by
ChrisSD
3y ago
Right, but my point is that "Program Files" &co were so common that it forced IT people (and everybody else) to handle this correctly. Executing something one level up is not the kind of bug that's going to be unnoticed w
90.
▲
by
ChrisSD
3y ago
On Unix perhaps. Windows forced IT folks to deal with the issue by having folders like "Program Files". Even the user's folder used to be in "Documents and Settings" (but they backed down from that eventually and no
More ›