HNHacker News
TopNewBestAskShowJobs

seritools

707 karma · joined May 25, 2020

submissionscomments
seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
Haven't looked into it too much, but yes, the files themselves should be compatible. I'd probably use no_std on targets like this or Win32s.
seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
NT has always been an SMT system, so full-on tokio should probably be runnable with a bit of patching.
seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
> that kind of configuration is a big headache to build on

Not really, I've done just that (though in the end I didn't need full /NODEFAULTLIB):

https://github.com/rust9x/rust9x-sample/blob/main/.cargo/con...

With older msvcrt libraries you only need to link `libcmt.lib`/`msvcrt.lib`, that's it. Visual C++ 4.0 is apparently the last version to support Win32s, so if you can make it link to its libraries you might have a chance!

seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
If you go `no_std` I'm confident both would work - I think the current windows stdlib implementation still might be too much for those.
seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
Oh right, that's also a thing :v
seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
Heck yeah! Thanks for writing it!
seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
To clarify, it works in 98/Me mode because I added a fallback implementation to Rust9x for these systems, as the flag in question is not supported.

AFAICT it is supported since NT 3.1, though, and it worked fine on all NT-based systems I've tested so far, so my guess would be a ReactOS API bug.

The commit adding the 9x/Me fallback implementation:

https://github.com/rust9x/rust/commit/3a3eddb0044c6d03357a75...

seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
Oh trust me I've thought about that :)

It depends on two things:

- is the supported API surface big enough?

- is there an msvc runtime that can be linked with a somewhat modern linker (so that rust/llvm don't get angry) but that still works under Win32s. I'm not sure that exists, though :c

seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
Just grabbed the latest ISO to test it out :) - rust9x_sample.exe sadly only works in 98/Me compatibility mode. https://i.imgur.com/nWCfTtV.png

In regular mode it seems there's a problem with the system not setting the file pointer to the end when OpenOptions::append is used: https://i.imgur.com/vvbEnWh.png https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#met...

seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
Vector graphics tool and manually changed the kerning on each letter to match the OG Visual Studio covers. The background effect is just the regular rust logo copied twice :)
seritools··on Rust9x: Compile Rust code for Windows 95, NT and above
Can confirm, toy project. But hey, if it helps someone who might actually need this, even better!
seritools··on Tinygrad
"dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC." https://dwm.suckless.org/
seritools··on Guetzli vs. MozJPEG
Also a custom scrolling implementation that scrolls a longer distance than normal, and forces a scrolling animation, absolutely horrible.
seritools··on Si78c: Memory-accurate reimplementation of Space Invaders in C
> Now imagine the code base of original Diablo.

No need to imagine! https://github.com/diasurgical/devilution

This is >99% binary exact when compiling with the original toolchain.

seritools··on Chess.com vs. Lichess
> Or in the case of lichess, I think its a Javascript program instead of a proper x86-assembly tuned high-speed analysis bot

Stockfish compiled to multithreaded WASM (on supporting browsers)

seritools··on Redesigned Notepad for Windows 11
I am aware of these, yeah - "Microsoft Edge scrolling personality" is only for touch scrolling gestures as far as I can tell, it doesn't affect scroll wheel scrolling for me.

I've disabled smooth scrolling in Edge because of this, yes.

seritools··on Redesigned Notepad for Windows 11
For the record, I also dislike smooth scrolling in the Start menu, settings app etc. With Edge, they lowered the animation speed from baseline Chromium to match that I think.

In Chrome it's nice at high refresh rates and looks buttery smooth, but at 60Hz it's too choppy so I turn it off there. It seems that the Edge devs have opted for a slower (=smoother) animation, optimized for 60Hz screens, whereas Chrome has opted for more responsiveness.

(giving the user the ability to tweak the scroll animation speed would be too much to ask I guess)

(disabling smooth scrolling with the "disable animations" setting in Windows is too much to ask as well I guess)

seritools··on Redesigned Notepad for Windows 11
Yep.

https://news.ycombinator.com/item?id=29478878

seritools··on Redesigned Notepad for Windows 11
10 minute QA because they don't seem to have done it:

- It consistently starts slower than Notepad3 while having substantially fewer features to load (and also slower than the old Notepad of course)

- THEY ANIMATED THE SCROLLING OMG PLEASE DONT DO THIS (especially when grabbing the scroll bar handle). Any amount of delay is too much in notepad

- the animation runs at 60Hz even on a high refresh rate screen, so it looks choppy

- the animation has to "catch up" when grabbing the scroll bar handle and moving it quickly

- 215k lines loaded, moving the window itself is choppy now? HOW

- another first party piece of software that ignores the "no animations" setting in windows

- I've grabbed a notepad.exe from Windows XP SP3 in comparison, no problems there, scrolling and editing is instant. Both have SIGNIFICANT lag in the new one.

- Don't even try to resize the window with a big file open (< 1 FPS)

EDIT: Note that I haven't even complained about new features or anything, just the previous, basic features still working correctly.

seritools··on Microsoft_craziness.h (2018)
1. first call to `RegQueryValueExW` returns a value length of 10

2. length is set to 12

3. external change causes the value to now be 12

4. second call to ``RegQueryValueExW` succeeds, as 12 <= 12, no ERROR_MORE_DATA here; length stays 12

5. length + 1 and length + 2 are now OOB

seritools··on Microsoft_craziness.h (2018)
`RegQueryValueExW`'s last parameter is in and out, so that `length` is set to the actual written length after the call.

It might cause an OOB write though, with a data race on the registry key (if the key's value happens to grow in length by a char or two between the calls, time of check time of use yada yada).

seritools··on Builder Pattern in Rust
Yeah, I've seen it called the Init Struct pattern: https://xaeroxe.github.io/init-struct-pattern/
seritools··on Builder Pattern in Rust
You can mix-and-match, e.g.

  new(required_arg_1, required_arg_2, Options { foo: "bar", ..Default::default() })
or

  Options { foo: "bar", ..Default::default() }).build(required_arg_1, required_arg_2)
seritools··on Safari 15 on Mac OS, a user interface mess
I know of at least Edge and Vivaldi that do it.

Granted, it seems that nobody at the Edge team thought of actually giving the vertical space used by the horizontal tab bar back once you flip to vertical tabs mode, but the feature itself is there.

seritools··on The Awful German Language (1880)
Weg != weg, so it's pretty clear.

You missed "Gehweg" (sidewalk) though. :^)

seritools··on BigInt is finally here in ES2020
Ah, now I see it the whole point - "reliably representable" not meaning the same as "safe", gotcha.
seritools··on BigInt is finally here in ES2020
The point is that not all integers over `Number.MAX_SAFE_INTEGER` can be represented. Some can, of course.

That 2^53 - 1 comes from the 64-Bit floating point representation JS uses for the normal number type.

    (Number.MAX_SAFE_INTEGER + 1) === (Number.MAX_SAFE_INTEGER + 2)
    > true
edit: yeah, just as you wrote in the reply to the other comment
seritools··on Last Resort Font
I would guess/hope the GIFs are only for display in the README.md and the actual glyphs are vector-based like a regular font (so the 200x200px problem shouldn't be one)
← PreviousPage 5 of 5