7 ms·
Rust hello world app for Windows 95, cross-compiled from Linux, no MSVC
- garganzol 3y agoI just can't help but point out how cool the Windows 95 user interface was. Partially inspired by the NeXT OS, its clarity endlessly resonates with me.
- rafabulsing 3y agoThis is something that I've wondered about before. I've seen many people with that opinion: UIs in the past, although dated looking now, were very intuitive, in that every interactive thing looked interactive. Contrast that with amorphous, flat, "clean" designs we have today. So what could we do to have something that looks nice and modern, but is also intuitive, with clear affordances?
- zac23or 3y agoI've been in development for 24 years and now I have issues with some very strange UIs. Where do I click to post? Old UIs are consistent. Buttons are buttons, labels are labels, and so on. New UIs are inconsistent. In the facebook interface, the post button is not a button, it's a label. It may have changed since I last used it. It also occurs in native programs. In older UIs, button size makes sense. Today every app recreates the buttons, with absurd sizes. Contrast. Designers love low contrast in the new UIs. Here in HN it is sometimes very difficult to read the text. As a developer, I participated in several meetings about new UIs. "Beauty" is the keyword. The beauty seems to be in the rounded corners and the use of labels instead of buttons. Yes, I created a bunch of shitty UIs. But most importantly, dark patterns don't exist in old UIs. Dark patterns are the worst thing about the new UIs.
- bentcorner 3y agoEven with old UIs there were definitely mis-use of UI elements. Clickable labels that opened things, buttons made of images. Apps that were basically an imagemap that you clicked on. Think early media apps like Realplayer. Although I don't know if you'd really classify these as "old UIs" - they were definitely old, and had a UI. You probably mean "use native platform widgets were possible and any new widgets look as native as possible". But then some apps bridged this gap nicely. Winamp was very "non native" but the default skin was consistent, clean, and fast.
- zac23or 3y ago> Even with old UIs there were definitely mis-use of UI elements Yes, but they were exceptions. Interface Hall of Shame has some examples http://hallofshame.gp.co.at/ http://hallofshame.gp.co.at/ > Winamp was very "non native" but the default skin was consistent, clean, and fast. Visual aside, Winamp follows certain standards. Buttons are buttons, for example.
- echelon 3y agoIn the 90's, the concern was teaching new users how to compute. Personal computers for the home were still relatively new, and many people were using them for the very first time. Everyone was concerned with usability. In the 20's, the concern is onboarding users that already have devices and pay money to use software. We don't think as much about familiarity, teaching, etc.
- zac23or 3y agoThat's it, perfect. Perhaps the most important thing is to keep the user on the platform, avoiding his departure as much as possible. Thus, a "unique" interface helps with this.
- int_19h 3y agoThat would make sense if those unique UIs didn't themselves change fairly drastically every few years. I loved the older iOS devices because of the physical home button - I could give it to my grandma and say, "if you ever get lost, press this and you'll be back to home screen" - and it worked wonderfully... until they removed the physical button. On the latest iPad, you have to swipe from below the edge of the screen instead, and do it fast enough (if you do it slow you get the task switcher instead of home). Needless to say, this requires relearning.
- zac23or 3y agoAt one of my jobs I worked on change for the sake of change... there was no real meaning to the change, just the boss wanted change. I don't have a good theory about it, but it's now very common. Apple, facebook, to it all the time. Is it to create a "fresh product" feeling? I don't know.
- deleted 3y ago[deleted]
- badsectoracula 3y ago> in that every interactive thing looked interactive I agree in general though i'm not sure Win95 was that consistent. Buttons did look 3D but menus - also interactive - did not. Similarly with the context menu icon at the top left, it was interactive but didn't look like it. Meanwhile Win98 had toolbar buttons become flat. There was an attempt with Win3.0 (i think) to define a form-follows-function approach where "if something can be interacted with it should be 3D" but even that didn't went far (checkboxes were not 3D nor were edit boxes). By late Win3.1 the ctl3d (i think) DLL was introduced to make everything look 3D regardless of function. In comparison to today, sure things were better, but it isn't like there was any point in time where things were consistent in terms of control/widget look following its function.
- layer8 3y agoNot every control was 3D, but for example in the menus you had mouseover highlighting that would suggest that you can click the item. And if for some control it wasn’t mouseover highlighting, then it was a tooltip or a changing mouse pointer.
- badsectoracula 3y agoThat was in Windows 98, Windows 95 did not have any mouse hover highlighting. And from a form-follows-function perspective it is still inferior to having a distinct visual style for interactive elements without needing any interaction from the user like mouse hovering.
- forgotmypw17 3y agoWindows 95 was developed over several years with a lot of research and user studies. The primary objective of all this work was so that a person without prior exposure to computers could figure out how to use it. The software was designed to help the user accomplish the tasks they have set out to do before sitting down at the computer. With most modern mainstream interfaces, both the audience and the objectives have changed. The overwhelming majority of the audience is now computer-literate and can be counted on to figure out how to use the basic features regardless of their quality. And the design objectives for many interfaces have changed to manipulating the users to do what the developer wants them to do, with the user's tasks relegated to a side quest. Another factor is that Windows 95 was developed for "install it and leave it" operation, with the next upgrade coming in a year or two. A lot of attention to detail was unavoidable because you could not push an update a week after release to patch a bug. At the same time, Microsoft was offering real live person phone support for its products, so every UI flaw cost them a lot in support costs. Also, one of the design requirements was to fully support only-keyboard operation, and a lot of QA effort went into ensuring this was true. This meant that every UI element had to have a keyboard cue. This duplication of accessibility resulted in a UI which was much more thoroughly evaluated for its efficiency. Finally, I think there was a different culture around design. I think a higher portion of people in the UI field were there for personal and passion reasons, and would have been embarrassed to have anything to do with the type of blundering buffoon of an interface that is common in today's computing.
- garganzol 3y agoExcellent observations and analysis. Thank you. Indeed, there is so much going on under the tip of the iceberg.
- layer8 3y agoI’m sure there are many ways to do a restyling, similar to the Apple Aqua UI [0] for example, that could create a fresh look, while maintaining the clear affordances. [0] https://en.wikipedia.org/wiki/Aqua_(user_interface) https://en.wikipedia.org/wiki/Aqua_(user_interface) The issue, I suspect, is that the young UI graphic designers working at Microsoft today mostly didn’t grow up using PCs and therefore don’t really know what their missing.
- FeistySkink 3y agoA full-blown OS with an office suite fit on something like 100MB drive with everything opening and responding to user input in a snappy manner. And it didn't show random ads or try to track your every action. You could chose when and if to install any updates. All the while running on a 486 with a few megs of RAM. How did we get to the current state of software? Edit: I remember a few places still running 3.11 well into the 00s because it just worked for the given tasks, got out of the way and didn't require a super-computer to run. The performance difference was especially jarring when Vista came out and barely worked on contemporary hardware.
- photonbeam 3y agoSnappy is not what my memory of the IO on those machines was
- FeistySkink 3y agoI'm talking about general UI responsiveness. Perhaps this is just nostalgia.
- pengaru 3y agoThere's some truth to it just for vendor-supported graphics driver reasons alone.
- bluedino 3y agoWatching 90's GUI programs is always fun because you can see the graphics as they are drawn, which I don't seem to remember from back then.
- robinsonb5 3y agoIf you're nostalgic for that, there's plenty of modern software with a watch-it-paint-itself UI. <coughSagecough>
- 3y ago
- statquontrarian 3y agoCurrently running Chicago95 on Linux! https://github.com/grassmunk/Chicago95 https://github.com/grassmunk/Chicago95
- airstrike 3y agoNot to mention those beautiful tiling wallpapers. I'm partial to the simplicity of the blue rivets, though it may just be nostalgia... https://windowswallpaper.miraheze.org/wiki/Windows_95 https://windowswallpaper.miraheze.org/wiki/Windows_95
- codegeek 3y agoWindows 95 and 98 are one of the best things that I have ever come across when it comes to Software.
- tmountain 3y agoWhat about the regular crashes that always happened at the absolute worst time possible? For me, Windows 2000 was a godsend from a stability perspective. I ran it until it was truly no longer viable.
- allochthon 3y agoAs someone who used Windows 95 when it came out, it struck me at the time as an off-brand Macintosh, making it feel kind of cheap (a feeling that never went away). I had also been using X Windows by way of SGI's workstations around that time, and IRIX felt clean, if a little old-school, by contrast.
- asveikau 3y ago95 felt amazing if you were used to 3.1. I had some exposure to Mac then and I liked it a lot, but somehow I always saw it as a different thing, rather than Windows being a knockoff. (Obviously there was a lot knocked off. It was really funny to me that they introduced a "recycle bin" to copy the Mac "trash".)
- qalmakka 3y agoWindows 2000 was the pinnacle of Windows UX, change my mind.
- tmtvl 3y agoWhy would I change your mind when you speak the truth? I do wonder what the Apple equivalent to Windows 2000 would be, maybe Mac OS 8?
- spatulon 3y agoThe Platinum theme used by MacOS 8-9 was probably the closest-looking to that Windows 95 look and feel. And since Windows 2000 was a combination of that old look and feel on top of a modern kernel (NT), one might argue that the Mac OS X Developer Preview was the nearest Apple equivalent. The first two Developer Preview versions of Mac OS X used the Platinum theme, not the Aqua theme that ultimately shipped with 10.0. You can see screenshots here: https://guidebookgallery.org/screenshots/macosxdp1 https://guidebookgallery.org/screenshots/macosxdp1
- ilrwbwrkhv 3y agoI swear. The first thing which came to my mind too. So clear. So precise. Why did we take a worse turn here seriously? Is there any research on this?
- tssva 3y agoThe Windows interfaces peaked with Windows 2000 which is similar to Windows 95. It has been downhill since.
- drewcoo 3y ago> No MSVC involvement whatsoever > all I had to do was extract a bunch of headers and link libraries from the Visual C++ 6 SDK Hmm . . .
- deleted 3y ago[deleted]
- rektide 3y agoI wonder whether it's actually legal to extract & independently redistribute these libraries. https://github.com/haileys/vc6-sys/tree/main/sdk/lib https://github.com/haileys/vc6-sys/tree/main/sdk/lib
- garganzol 3y agoThose files just reflect the publicly available Windows SDK, so it is pretty much ok to extract them - they reflect just a public domain knowledge. Actually, you can even create your own libraries with special tools like IMPLIB.
- criddell 3y agoThe license says you cannot redistribute the debug version of the libraries. That’s okay though because the build tools are freely available from Microsoft. Don’t bundle them - just tell your users where to get them or auto-download them with wget or something like that.
- ComputerGuru 3y agoThat you can’t distribute the specific compilation of publicly available knowledge is different from recompiling (even all) that same knowledge into your own work. It’s why you can publish and have copyright over a book of quotes from dead people, but no copyright over the individual quotes themselves (which are in the public domain).
- 3y ago
- Animats 3y agoIt's quite possible to develop in Rust for Windows without using Windows. Try my open source "ui-mock".[1] This is a test of the cross-platform stack. Just get the repository with "git clone", and make sure you have Rust installed for target "x86_64-pc-windows-gnu". See the Cargo.toml file for build instructions. This is a game-type user interface. It's just some menus and a 3D cube. It doesn't do much, but it exercises all the lower levels. This allows debugging cross-platform problems in a simple environment. The main crates used are winit (cross-plaform window event handling), wgpu (cross-plaform GPU handling), rfd (cross-platform file dialogs), keychain (cross-platform password storage), egui (Rust-native menus and dialogs), and rend3 (safe interface to wgpu). For graphics, it uses Vulkan, so it will run on Windows back to the last release of Windows 7. Not Windows 95, though; it's 64-bit. It will also run under Wine, so you don't even need a Windows system to test. My metaverse client uses the same stack. It's compiled on Linux, and runs on both Linux and Windows. So I'm building a high-performance 3D graphics program for Windows without even owning a Windows system or using any Microsoft software. [1] https://github.com/John-Nagle/ui-mock https://github.com/John-Nagle/ui-mock
- junon 3y agoI compile BGFX + SDL2 for use alongside Rust on WSL without using MSVC and can run the generated .exe directly from the command line. Works fine - the package management is a bit of a pain but not terrible (two commands to install dependencies instead of just `cargo build`), but overall it has worked absolutely perfectly.
- Animats 3y agoThose are more mainstream solutions than what I'm doing. I'm working to beat C++ OpenGL game performance. Most applications don't need to do that. And they don't need to idle at 100% of one CPU, redrawing every frame, as games do. Good old gtk is available cross-platform for Rust. If you're not doing a graphics intense program, that can be a good choice.
- qalmakka 3y agoWith xwin you can download a copy of the MSVC sysroot and use it to build Windows applications on Linux. LLVM reimplemented the entire MSVC toolchain and can thus link with MSVC libraries.
- kragen 3y agoif you're interested in cross-compiling win32 programs from linux without msvc you might be interested in http://canonical.org/~kragen/sw/w32dry/ http://canonical.org/~kragen/sw/w32dry/ i wrote this 15 years ago but it still works on this recent ubuntu system if you supply a couple of variables to make make run CC=i686-w64-mingw32-gcc WINE=wine no rust tho in debian/ubuntu the package to install to get i686-w64-mingw32-gcc and the attendant header files and libraries is gcc-mingw-w64-i686 amusingly the executables i built 15 years ago still run on current gnu/linux; not sure if that would be true for things linked with libx11 and libxext, certainly not libgtk
- csdvrx 3y agoWow, fantastic! > amusingly the executables i built 15 years ago still run on current gnu/linux; not sure if that would be true for things linked with libx11 and libxext, certainly not libgtk win32 is how you write software you want to run forever thanks to the large user base. I'm hoping for a wine cosmopolitan binary that would render to sixels: that would run on about everything, with qemu ensuring it keeps working if/when arm64 or mips64 take over amd64
- kragen 3y agoglad you enjoy it! sixel is not very widely supported, and the baud rate of a vt340+ is not really adequate for a gui
- csdvrx 3y agoI can play videos with mpv and a sixel output, so I think the framerate could be enough with some minor tweaks (like how RDP does)
- kragen 3y agowhat are you displaying the sixel graphics on? because the maximum baud rate of a vt340 is i think 38400 baud, which is 3840 six-bit characters including the start and stop bits, so with four bitplanes (16 colors per pixel) you only get 5760 pixels per second; a full 800×480 frame thus takes a bit over a minute to paint, minus whatever areas the rle compression can remove i think sending a byte stream of raw pixels with some framing information is a reasonable thing to do for many applications, even at 32bpp, but you can do a lot better than sixel x11 for example
- mhd 3y agoI'm assuming cross-compiled from a way more modern computer. Or could a Pentium I complete a Rust run?
- estebank 3y agoI would guess that the first problem you'd encounter is getting LLVM to work on that Pentium I.
- 3836293648 3y agoIIRC you can run rustc on ancient hardware if you compile it yourself. You can't however, compile the compiler on 32 bit hardware due to the 4GB RAM limit
- Dwedit 3y agoThe problem with Windows 9x is the 'ANSI' APIs everywhere, and no support for Unicode. Oddly enough, we are actually going backwards from using the UTF-16 APIs back to using 'ANSI' APIs, and simultaneously setting the process code page to UTF-8. Any time you use ANSI APIs, there is a hidden conversion step (allocation, conversion, copying) where your text is converted into UTF-16.
- josephcsible 3y ago> The problem with Windows 9x is the 'ANSI' APIs everywhere, and no support for Unicode. Didn't you just need to install https://en.wikipedia.org/wiki/Microsoft_Layer_for_Unicode https://en.wikipedia.org/wiki/Microsoft_Layer_for_Unicode aka UNICOWS.DLL to fix that?
- weinzierl 3y agoRust officially supports kernel >= 3.2, which is admittedly old enough to cover any real world usage scenario. That being said I wonder if someone tried to get a Rust program (or even better the compiler and toolchain) to run on an old 90s Slackware or something? That'd be an article I'd love to read.
- ryao 3y agoThe title begs the question, how do you compile Rust with MSVC?
- jamesmunns 3y agoMSVC is the default compiler backend for Rust on windows. You can also switch to use GCC tho: https://rust-lang.github.io/rustup/installation/windows.html https://rust-lang.github.io/rustup/installation/windows.html
- ben-schaaf 3y agoUnless you're using one of the gcc rust compiler reimplementations it only ever uses LLVM. MSVC can't compile rust, and the rust compiler can't use MSVC to compile things. What rust & LLVM support is various ABIs on windows, meaning your rust code can link windows libraries (and the other way around).
- seritools 3y agoDepending on how far you want to go: https://news.ycombinator.com/item?id=31112273 https://news.ycombinator.com/item?id=31112273
- juliangoldsmith 3y agoI wrote part of a Markdown editor in Rust, with the intention of bringing it to Windows 95. I have a lot of newer work I need to bring in, but the old version can be found here: https://github.com/julian-goldsmith/rustpad https://github.com/julian-goldsmith/rustpad It should build fine as-is for plain i586-mingw, but W95 requires a custom toolchain with a modified core crate.