150 karma · joined Jan 6, 2019 (7y ago) · 45 submissions
comment 5y ago · link · parent
It gives you all the building blocks to implement it yourself.
Remember that Win32 is not UI framework but OS API which allow you to build yourself one (wxWidgets, QT, SWT).
comment 5y ago · link · parent
I really hope that _replacement_ will be as feature complete and useful via keyboard as the current explorer. UWP UI components tend to be unnavigable via keyboard.
For example I really like old Win32 listview behaviour to just type in the item name to select it.
comment 5y ago · link · parent
Of course not. C++ and libraries don't go along nicely. STL is not really useful for cross boundary interop due the fact that C++ ABI is not stable.
Shipping libraries that leak STL types all over the place will only give you headache.
6.
98 points · by for_xyz · 5y ago · 20 comments
comment 5y ago · link · parent
Here you go:
https://dropbox.tech/infrastructure/rewriting-the-heart-of-o...
comment 5y ago · link · parent
[0] https://docs.microsoft.com/en-us/windows/msix/overview
[1] https://docs.microsoft.com/en-us/uwp/api/windows.management....
comment 5y ago · link · parent
_But as the company grew, new engineers who joined couldn’t understand the code. Clever code is usually short and cryptic, written by and for the individual who came up with it, but is hard for anyone else to understand—and nearly impossible to maintain. Guido called this “cowboy coding culture”. He recognized its value in our early stages of trying to implement things quickly, but knew it wouldn’t be sustainable over time, so he decided to speak up in his own quiet way._
And now they'll have to rewrite everything in programming languages where maintenance is not a burden.
[0] https://blog.dropbox.com/topics/company/thank-you--guido
comment 5y ago · link · parent
comment 5y ago · link · parent
pFileOpen->SetOptions(FOS_PICKFOLDERS | FOS_PATHMUSTEXIST | FOS_ALLOWMULTISELECT);
https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_...comment 6y ago · link · parent
Ok, probably both on default windows installation due legacy and backward compatibility with dos names [1].
https://docs.microsoft.com/en-us/windows-server/administrati...
I remember this issue when creating few million of files inside one folder and it was extremelly slow because of 8dot3 name creation. It has to go through each filename to generate short name O(n) when this legacy feature is enabled.
After disabling 8dot3 there were no performance issues anymore.
> I have no experience with BTRFS, but that doesn't prove anything without knowing more details (the overhead introduced to make it work)
I tried to point out following: Ext4, Btrfs, Zfs, any other UNIX filesystem will be slow under Windows. NTFS or any Windows first filesystem will be slow on Linux. There is just too much of the differences in OS architecture between the NT and Linux.
comment 6y ago · link · parent
Using either memory mapped files of overlapped io (IOCP).
It's tricky to use when you want to write the content since you must preallocate the file before you start with the writing. Appending to file just doesn't work under NT kernel since WriteFile blocks even if you use overlapped io.
Devs just need different mentality when it comes to Windows programming compared to Linux. Due the fact that everything under NT kernel is operated asynchronously you'll have to adapt your code to such concept. Meanwhile under Linux you had no other alternative for nearly 30 years (io_uring and friends) so if you wanted to be portable with minimum OS specific code then you had to implement things in synchronous way or write two separate code paths for each OS.
Guess which one is used in practice.
comment 6y ago · link · parent
You can already run windows on top of BTRFS if you want but it'll be painfully slow compared to linux [1].
https://twitter.com/NTDEV_/status/1327358814891470850 https://github.com/maharmstone/quibble
comment 6y ago · link · parent
Care to explain why do you think NTFS is crap?
From my experience it's usually bad assumptions about files under windows and every application or library tries to stick to posix interface when dealing with files (open, read/write, close) which tends to block for longer periods on windows than on linux counterparts which results in significant perfomance loss .
Linux first software will always outperform windows implementation and Windows first software will outperform Linux implementations unless you provide separate code paths to properly handle underlying OS architecture and assumptions.
On Windows closing the file handle is extremely costly operation due AV checks and file content indexing [1]
comment 6y ago · link · parent
I have new edge as default browser and I still got this screen.
This screen appears if you have other browsers installed even if they are not default.
It seems that code quality in Microsoft products keeps dropping rapidly every year.
It has already been 5 years and UWP is still unstable and buggy compared to Win32.
comment 6y ago · link · parent
It'd be much better if they upstreamed the changes instead of fragmenting the entire ecosystem with custom forks.
comment 6y ago · link · parent
Works really well for Google and Android where they offload handpicked versions of the Linux kernel to the phone vendors to maintain. In practice they don't bother with it so phones never get any updates after 1 year.
Maintaining custom Linux kernel fork is not possible if you want to keep it up with the upstream changes.
comment 6y ago · link · parent
It makes zero sense to consume D3D12 and DirectML under WSL directly from user applications since that prevents your app from being deployed on the real linux. There also won't be any SDK or headers released by Microsoft so you'll have to manually load functions from .so.
comment 6y ago · link · parent
Since 99% of the disk I/O is cached, write either success or fails completely. It's beyond scope of the userspace application to know what and when data arrives on the physical disk. Same applies to Windows as well.
Using direct I/O is different story where this is the correct behaviour.
comment 6y ago · link · parent