Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
abainbridge
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
91.
▲
by
abainbridge
4y ago
How would Rust fix this? Here's a Rust program that overflows a u8, with no compile error or warning. https://godbolt.org/z/ME3e9KeMe You can turn on runtime overflow checking with the Rust compiler, but you can d
92.
▲
by
abainbridge
4y ago
No. It sounds like Detours works even when the function hasn't got MOV EDI, EDI at the start.
93.
▲
by
abainbridge
4y ago
Oh yeah, sophisticated: https://github.com/microsoft/Detours/wiki/OverviewIntercepti...
94.
▲
by
abainbridge
4y ago
From https://www.microsoft.com/en-us/research/project/detours/ "Detours is a library for instrumenting arbitrary Win32 functions Windows-compatible processors. Detours intercepts Win32 functions by
95.
▲
by
abainbridge
4y ago
> Cosmopolitan Libc allows you to log every function call over the program’s execution – just pass --ftrace at the end of your program, like this: > ./hex16.com ./missing.txt --ftrace That seems like magic. It seems you have
96.
▲
by
abainbridge
4y ago
Gah.
97.
▲
by
abainbridge
4y ago
Here's an Android Tablet with that chip for £99 ($88 at current exchange rate). https://www.laptopsdirect.co.uk/tcl-tab-10s-32gb-10.2-inch-w...
98.
▲
by
abainbridge
4y ago
Ahhh, that's why MT/s exists. All I need to know now is how many data bits are in a transfer and how many memory channels there are, and I'll be able to calculate how fast the memory interface is.
99.
▲
by
abainbridge
4y ago
Good question. I'm thinking of morning rush hour because that I did a traffic survey then. I noticed a lot of building trades vehicles. All the trades people seem to want to be at their site for the day by 8.30am. I guess that is so th
100.
▲
by
abainbridge
4y ago
Commercial traffic needs to drive - trucks and vans need cannot easily be replaced with public transport. I live on a busy road in Cambridge UK. At rush hour the traffic is about 50% commercial. I don't know what the proportion is in P
101.
▲
by
abainbridge
4y ago
I'm fascinated by how this works. Does it do any CFD type of simulation of the gas flow in the engine? Is the simulation entirely 2D? I've thought about doing a similar project myself but would like to be able to simulate the effe
102.
▲
by
abainbridge
4y ago
Gee thanks. I tried typing olive.c there. That didn't help. The string "tsoding" is the magic I needed.
103.
▲
by
abainbridge
4y ago
How can I find them?
104.
▲
by
abainbridge
4y ago
From the Zig language reference: Zig has many instances of undefined behavior. If undefined behavior is detected at compile-time, Zig emits a compile error and refuses to continue. Most undefined behavior that cannot be detected at compile-
105.
▲
by
abainbridge
4y ago
I agree with all of that. How theoretical are the optimization gains from the extra constraints guaranteed by Rust's borrow checker?
106.
▲
by
abainbridge
4y ago
> Assuming you're thinking of the same thing Yes. > are you suggesting that the compiler (or other static analysis) could catch all of the issues you listed? Yes, the compiler for the first two and the standard library's hea
107.
▲
by
abainbridge
4y ago
You can have safe manual memory management. The main cases of bugs are: 1. Null pointer deref. Can be fixed by having optional types and requiring that possibly null pointers have to be wrapped in them. 2. Out of bounds references. Can be f
108.
▲
by
abainbridge
4y ago
Agreed. The lesson I take from this is that people/the media love to say X is bad because of Y. If they don't present evidence then we should probably ignore the claim.
109.
▲
by
abainbridge
4y ago
That seems like an excellent point. Why hasn't this already been done everywhere that gets sunny?
110.
▲
by
abainbridge
4y ago
Except we don't get to invent where they are because you can see normal matter. We tried before to invent some normal matter to explain the orbit of Mercury. https://en.wikipedia.org/wiki/Vulcan_(hypothetical_plane
111.
▲
by
abainbridge
4y ago
I agree. I find it hard to argue against the claim that all physics is just curve fitting. We always end up with tuned parameters to make the maths work. For example the G in F = Gmm/r^2 (Newtonian mechanics). I'm not an expert, b
112.
▲
by
abainbridge
4y ago
There is no consistent native look/behaviour on Windows. Even a single program (Excel), written by MS themselves, has no consistent style. I think I see 7 different styles in these search results: https://www.google.com/
113.
▲
by
abainbridge
4y ago
> I don’t know of any good replacement… My Chambers dictionary suggests these alternatives: actually, really, absolutely. It also says, "literally is in common use to intensify an idiom, and this is not incorrect". My general r
114.
▲
by
abainbridge
4y ago
Sinister used to mean left handed. "A shambles" used to mean a slaughterhouse. Sanction used to mean allow, now it means not allow. It is fine for words to change meaning, even to their own opposite. Natural language has done that
115.
▲
by
abainbridge
4y ago
I also see that this is a bike-shed issue [1]. It probably isn't as important as some other language issues that are complicated enough that I don't even know about them. However, people's first impression of the language mat
116.
▲
by
abainbridge
4y ago
Maybe there is a good reason. I'd just like to know what it is. My guess is that fixing issue 358 with syntactic sugar would mean that the debug info would show scope blocks that don't correspond to {} in the source, and that is a
117.
▲
by
abainbridge
4y ago
I don't understand why fixing issue 358 in the Zig compiler isn't trivial. I don't understand the reluctance. I don't understand why: for (var i: usize = a; i < b; i += 1) { foo(); } for (var i: usize = a; i
118.
▲
by
abainbridge
4y ago
I guess it is because the UK stopped doing as much testing. Presumably Google is reporting the number of positive tests (or something) and many people with covid don't bother getting tested any more. The ONS is still doing random sampl
119.
▲
by
abainbridge
4y ago
> Drawing modern graphics is not done by blitting pixels onto a framebuffer That's a choice. The hardware still supports it. It is still possible (and fast-ish and simple) to do graphics by blitting pixels.
120.
▲
by
abainbridge
4y ago
Having a bitmap in normal system memory that we can write to the window or screen is easy though and should be more widely supported. Once you've got that you can write pixels, lines, rectangles, mandlebrots etc very easily and buildin
More ›