Handles on Windows are essentially indexes into an object table. Files, pipes, process handles, etc., are reference-counted objects in kernel mode. Duplicating (or inheriting) a handle increases the reference count, and closing it decreases it. The kernel object referenced by a handle is only closed if the reference counter reaches 0. As a result, if you inherit the write pipe handle to the child process, the pipe doesn't actually close as the child process continues to have a reference to the kernel mode object through its inherited handle.
and this is where the abstraction of createprocess breaks down a bit, you can feel that under the hood it does essentially a fork+exec but without the chance to close your pip's parent fids
@@ufufuawa401 not one that is available/documented, but I have seen an article (a while ago) where the writer discovered a way to effectively fork a process in windows
@@TsodingDaily just realized *mingw* is not a Linux shell on windows, its a windows Dev environment for Linux.... glad I found your video because I was curious if this was possible to begin with... now do mac OSX Xcode Dev on Linux🤣. [hint: wine *darling~* ] Hope you have a great day & Safe Travels!
i'm a "full-stack" game dev, and i write for windows for our client code and for linux for our server code, so i can 100% confirm they are both messes, just in different ways.
Real talk I’m only booting windows to start Steam to play a game now and then, but even that is happening less and less because running them on Linux with Proton has become so good.
I fully uninstalled Windows since Proton runs any of the games I play, and of course there's many that runs natively (Most of Valve games, if not all). The only game I can think now that doesn't run is Valorant, for obvious reasons, but I don't play it any, sorry frens that invite me to play it
there are still some caveats (eg. the most popular multiplayer games outside of valve), but we've got to the point where the subset of things you can do is reasonable enough that running a linux only PC is no sacrifice at all. With some technical chops you can even use some advanced stuff; just this week I installed clip studio paint and have been using it without problems after circumventing a nasty bug with the help of input remapper.
Same with windows NT and NTFS where NT sands for "new technology" and is 30 years old at this point. Naming convention in MS and Windows are just weird sometimes. Edit: Also WSL stands for Windows Subsystem for Linux but it should be the other way around: Linux Subsystem for Windows
@@maksymiliank5135 i think they call it wsl instead of lsw mainly cause it sounds better to market to developers, same reason for why the android subsystem is also just called windows subsystem for android
@@maksymiliank5135 i think they could technically spin WSL as meaning "Windows's Subsystem for Linux", in other words "The Linux Subsystem that exists on Windows", so in an abstract sort of way, "Windows Subsystem for Linux" is correct, because "Windows" here refers not to the subsystem, but the brand of the operating system to which the subsystem belongs
WINE is much more amazing than a "Windows subsystem on Linux", because Microsoft actually gave up on implementing a high performance compatibility layer and WSL2 just runs a virtual machine now.
Although WSL1 was bad, WSL2 being a whole virtual machine has its benefits in both performance and linux compatibility. Not to mention they somehow convinced Nvidia to work up a driver that can share GPU into that VM without having a Quadro
it's not really a virtual machine, though, is it? it's more like a wrapper around hyper-v. the linux kernel runs just as close to the metal as the windows kernel does.
@@harrytsang1501 Oh WSL2 is much more usable since it runs a full Linux kernel and offers full syscall compatibility as a consequence (WSL1 did not). But it does incur a significant performance penalty in things like filesystem operations.
Way back when, I did some development on Win98, and I was always annoyed with pipes and handles. With pipes, you have to close the end you write to, and it has to be every handle to it because they're reference counted internally to the kernel, so that the reading program will know you're done writing. As for handles, when I originally read through the headers that came with VS6.0 they didn't define any handles as pointers. They were always an integer type because the kernel used them as an index into a table to reference each object. I kind of like the old WIN32 method, because it obscures things, but I'd wager it's slower than POSIX. Plus, it would have the added difficulty of trying to pass data between threads and processes where you have to tell the kernel to share it instead of just passing a pointer. However, one could restrict the indices and have smaller data duplication obstacles when copying data around. Like instead of 8 bytes to point to an object, you could pass a byte or a word or a dword. Consider if each thread had a shared pool and could use a single byte to reference the data they needed to pass. Or if you had millions of objects all referenced by a dword instead of a full qword pointer.
What's even crazier, I can run windows as base, then WSL on windows, docker on WSL, wine inside docker, and have wine run windows applications By wrapping it in a layer of docker I ensure not only can it be tested, it can be done inside CI/CD
I use Windows at work as an OS (Activy Directory domain, office tools, MS Teams). But I only actually work in the browser and in WSL. In the winter I'll try to compile our own company-specific WSL distro in WIndows with Visual Studio using WSL Launcher. Wish me luck xD
@21:44 I cannot get over how hilarious it is that the most used desktop operating system in the year 2023 puts your installed programs into a directory called "Program Files (x86)". Like, this is an operating system for ordinary people, but they decided the single most important and most used folder on the entire system for normal everyday users should include a direct reference to Intel's instruction set architecture right in the clear for normals to read. It becomes especially hilarious when you consider Windows is attempting to compete in the tablet device market on Arm. I agree totally that the endgame here is for for Windows 12+ to just be a distro of Linux that comes pre-packaged with all the standard Windows applications running in Wine. I don't think that is particularly unlikely within the next couple decades.
I'll be honest, I'm here because I wanted to see which naming conventions you use to copy them, but I stay because of the passion and heart you put on your projects, and also cuz you're funny (charismatic).
-mwindows adds gdi32 and user32 and sets a flag in the binary that tells Windows to not create a terminal window. ProTip: Only enable -mwindows for release build so you can use printf to debug.
I just noticed neofetch reports you running 4.19 kernel, it was just earlier this year I managed to boot 6.x on a T31 (mips) SoC where previously it was only booting 4.4 with the manufacturer’s firmware 😬 This is probably one of my favorite channels on TH-cam, even though I just started watching the streams on Twitch. Love watching your coding and process, it’s truly educational and inspiring.
i'd definitely want to watch Zozin does his recreational programming session using that niche os called Windows (it will be really cool to see how do you use something completely different from linux)
I mean, these days I use only three programs: terminal, text editor and browser. Which creates pretty much the same experience on any mainstream OS. The only thing I usually miss on Windows is copy-pasting by clicking mouse wheel.
I did exactly that 5 minutes ago to test the executable on my Windows 8 instance. (Too lazy to install 10 or 11) I didn't capture my face but I didn't feel any out of ordinary muscle movements on it. And I felt slightly annoyed cause Windows started to update as it usually likes to do.
I've heard Windows 11 does not officially support 32-bit applications anymore . Being said, it's not a bad idea to distribute 32-bit binaries because worst case scenario you would just run them in compatibility mode. And for some reason visual studio allows you to build in 32 bit for some reason 2023 and nearly 20 years since the last 32-bit processor came out and (AMD) x86-64 is AMD 64 bit extension of the x86 architecture (which is called that because and intel had a naming convention of their CPUs being SKU XX86 where xx is the model number 8086), that is to say (AMD)x86 - x64 is an Intel thing
@@jonforhan9196so, it's POSIX that's emulating those calls. but wine in inseparable from the underlying operating system, so in reality wine (on linux) _is_ an emulator. regardless of how smug the authors are trying to sound.
@@jonforhan9196 I heard this, this doesn't make sense to me. I don't see a fundamental difference between translation and emulation. Even when "emulating", you still have to translate your calls to something eventually, don't you (i.e. to machine code). I read enough abstract stuff about computers that almost everything can be interpreted as emulation to me. So I don't really get this meme. Perhaps what is meant is that WINE integrates neatly with the POSIX environment? So, like, your POSIX programs can use "Windows" files and Windows programs can use POSIX files, for example. Is that is what is meant by WINE not being an emulator? The fact that translation to POSIX allows for easy interop between host and the "emulated" system?
I allowed a windows 8 machine in my network, updated everything, set the BIOS, ensure it restored… then I came back a month later and it wouldn’t talk to any Microsoft DNS names. I couldn’t figure it out. Restored multiple times: soft restore, full restore. The thing was not going to talk to microsoft. I’ve never had anything like that happen with Linux.
I remember having issues with mingw executables requiring a gcc-specific dll. Been a while, so can't say whether that's still an issue, but I remember there's a compiler flag for statically linking it, so I guess it's more like "it should work, but watch out".
haha, love that shit. I'm doing the windows side of our project like this as well! We have a few needs for msvc, but of course we can use that in wine as well :')
I laughed so fcking hard when you went in /usr/bin to grep and spell mingw's gcc name, like yeah those names are for sure ugly and really difficult to remember. Btw your videos (and streams too, I suppose) are really perfect (+ you're funny and I appreciate your desire for simple things / code / well you know what I mean, even though it's sometimes not possible). Thanks for this cool content man, we love U. A big "muah" from France
The main issue with developing for windows is that window , for some f****** reason, decided to become unicode compliant [and when I say unicode complaint I mean fully unicode compliant] So there's like two different versions of every function that takes in or returns string one where the string is an alias of char* and one where it is a alias of uint16_t * (because Unicode 16 is 16 bit) 49:26 I answered your question before you even asked it. And they say me rambling about how stupidly complex the win 32 is is bad and unhealthy... [Literally no one says that]
@@DatBoi_TheGudBIAS I mean I was technically incorrect there actually is three different version of every window function the a, w and base version where the base version is enjoying is an contents dependent alias of the respective wide or ASCII version of the function depending on whether you have Union code enabled.
Unfortunately for U, in windows, almost every (of not all) software depends in at least 1 system dll (but wel, it's part of Windows, so it's just like it isn't a dependency anyways) Mostly kernel32.dll or user32.dll
Early in the video you asked how common it was to have a program run in WINE but not in Windows and chat said it was pretty rare. And that's probably true, but I have found that a lot of old games often don't work on newer windows versions. So people either run something like a Windows 98 VM, or just use WINE/Proton and it actually works a lot better! (:
Did you ever try the cosmopolitan Libc? arguable its possible to compile single binaries which are able to not only run on Linux and Windows but also on Mac, Open- Free- and NetBSD 🤯
Well...With your joke about a niche operating system for playing games I thought about it and realised that just now I don't know anybody that uses Windows. It's all gone Mac in work and Linux for production systems. Non-nerd friends just use their Apple/Android phones and tablets.
YEAH THEY BEEEN OUT FOR EVER I T]:) Funny those two commands i missed those most whjen i stopped always have a terminal machine rack n sceen or putty sessions going. 254 IP's was a ;lot for a 19 yr old with 6 domains nbut I convinced themit was necccesaryk, reallly all to get my own class C soa to be abke to set the reverse dns -in--addr.arpa on my irc botnet. hah this wwas late 90s i wouldn't buch a hog today. but i might suddenly invent err come up with i mean come acrosss a desperate need, critical to production even for whatever ab upv6block eqyuuv is or even ujust like as longas they can deletegate me as the NS for thesubnet otherwise i doubt illl ever need want lke juisy neeed 2048 ipv6 ip's cine ti tubj if ut :)
Some applications target 32-bit to support older hardware because 64-bit Windows can still load 32-bit applications and reverse is not true. Many developers (corporations on Windows 😄) release only 32-bit versions of their apps so users don't assume their apps don't work when they download 64-bit binaries onto a 32-bit system. In some cases the app is simple enough that using 32-bit binaries has very few drawbacks. 32-bit performs worse than 64-bit though in some cases so you did the right thing in picking 64-bit target. AFAIK, 32-bit processors are being actively phased out and only embedded systems will continue using 32-bit arch.
I use msvc on linux to build for windows! And lld-link as a linker but msvc doesn't know where he is, and is trying to find link.exe so i maked link.exe symlink in my .local/bin And some how is working! The windows include files and libs i installed with xwin i hate "/" insted of "-"
windows is great for eworms and viruses, you get all sorts of cool ads, i remember fixing (or attemting to) an elderly lady's windows pc and she had a fake antivirus malware thing that she was arguing with me that she needed it. So she was firing up this software running scans everyday yet it was just perpetually infected, in hindsight i bet she was calling some of those helpful folks over at the india wing of microsoft support and paying them in steam gift cards daily
Linux file descriptors also do have the same thing as Windows handles do have HANDLE_ FLAG_INHERIT as I understand. The way to setting this sort of flag in Linux is calling fcntl with F_SETFD with FD_CLOEXEC flag. Once I was trying to redirect the output of my program to ffmpeg through the pipes using execve, but I had the same problem as was in the vod: ffmpeg hangs and doesn't finish, but the main program closes file descriptor. But when I set FD_CLOEXEC flag to the pipe, it worked out.
17:07 To be fair Edge is probably better optimized on windows than chrome. I did a little test. I had the same tabs opened in both of them and Edge somehow used less RAM and CPU. Don't know if it's the case all of the time though.
That's because Google collects telemetry from Chrome, while MS from Windows so they don't have to do it from the browser 🤣🤣🤣 Jokes aside, that's probably true, MS can optimize it better for their OS.
Whilst im sure there is software that can achieve this (ffmpeg, xzoom?)-its amongst the built-in commands for emacs. (Ctrl-x, Ctrl-+ and ctrl(-)- to zoom out respectively).
Dafuk lol, when I installed mingw64 in my pc (yes, Windows), it had a gcc.exe file lol. U got scammed or maybe in Linux gcc isn't added cuz it might be confused with the normal gcc?
Hello, Tsoding! I am going to watch new stream! Btw, what do you think about creating a spectrogram/spectrum analyzer? I saw one cool that visualizes sound in pseudo 3D, if you are interested, I can tell you the link :) Btw, wrote this on Windows :O
11:58 I wouldn't bet on it, there is detectable differences between wine and win32. Like people were getting auto banned from games 4 using wine That's how significant the difference is.. valves branch of wine, I think it's called atom, might work better, even still though a valve does not guarantee 100% compatibility . The only way to guarantee windows compatibility is to link with the real Windows.h and the only way[legally ; assuming they didn't change their redistribution policy] to do that is to program on Windows with the visual C++ compiler.
c and c++ is always a nightmare on cross plat, it's so difficult. Just the whole ecosystem isn't great, low level languages like Zig and Rust have great tooling by default.
12:51 I mean yeah sure it was a joke but you're not wrong, says the daily windows driver. (Ironically, I am a daily windows driver for the exact same reason you used the Linux in this video. That is I couldn't be bothered to install Linux on my computer; and also I also paid $100 for it. I want to get my $100 out of it and also as you said gaming but also valves doing stuff to change that)
Hey, I realize this is unrelated to this video, but have you ever tried the programming language "raku" (also known as perl 6)? I looked at it recently and it's super interesting, would be cool especially for like coding challenges a la advent of code, etc.
doesnt linux have the same problem? you start child processes with fork/exec, which inherits all fds. so you usually have to close all of the parents fds in te child...
Very kind of you to support the niche operating system called Windows
f*ck them windows users 😂
Finally the niche operating known as Windows is getting the recognition it deserves
Never heard of it. What is it used for?
@@pik910niche gaming os meant for launching games and generating telemetry data for Microsoft (small indie game development company)
I think it's just a really bloated bootloader for games
Handles on Windows are essentially indexes into an object table. Files, pipes, process handles, etc., are reference-counted objects in kernel mode. Duplicating (or inheriting) a handle increases the reference count, and closing it decreases it. The kernel object referenced by a handle is only closed if the reference counter reaches 0. As a result, if you inherit the write pipe handle to the child process, the pipe doesn't actually close as the child process continues to have a reference to the kernel mode object through its inherited handle.
Oooh! This makes so much sense! Thank you so much for the insights!
and this is where the abstraction of createprocess breaks down a bit, you can feel that under the hood it does essentially a fork+exec but without the chance to close your pip's parent fids
@@ratchet1freak Windows didn't have have fork similar system call afaik
@@ufufuawa401 not one that is available/documented, but I have seen an article (a while ago) where the writer discovered a way to effectively fork a process in windows
@@TsodingDaily just realized *mingw* is not a Linux shell on windows, its a windows Dev environment for Linux.... glad I found your video because I was curious if this was possible to begin with... now do mac OSX Xcode Dev on Linux🤣. [hint: wine *darling~* ]
Hope you have a great day & Safe Travels!
i'm a "full-stack" game dev, and i write for windows for our client code and for linux for our server code, so i can 100% confirm they are both messes, just in different ways.
Reverse WSL development
Here is what NSFW abbreviature means: NSFW is a subsystem for Windows
I was gonna say, Wine needs to rebrand as the Linux Subsystem for Windows lol
57:10
> searches on ddg
> stares at the screen
> searches on google
> clicks on the same link as the first ddg link
Real talk I’m only booting windows to start Steam to play a game now and then, but even that is happening less and less because running them on Linux with Proton has become so good.
I'm in the exact same boat, I have used windows like 3 times in the past month
I fully uninstalled Windows since Proton runs any of the games I play, and of course there's many that runs natively (Most of Valve games, if not all). The only game I can think now that doesn't run is Valorant, for obvious reasons, but I don't play it any, sorry frens that invite me to play it
there are still some caveats (eg. the most popular multiplayer games outside of valve), but we've got to the point where the subset of things you can do is reasonable enough that running a linux only PC is no sacrifice at all. With some technical chops you can even use some advanced stuff; just this week I installed clip studio paint and have been using it without problems after circumventing a nasty bug with the help of input remapper.
@@Radgerayden-ist yeah, most of the games I've seen that won't run properly on proton are games with some tricky anticheat
I would if I could get my graphics card to work properly with it (nvidia, I already use the proprietary drivers etc.).
The fact that the"Portable Executable" format is actually not portable is so damn funny for me
its portable actually
Some other OSs used PE before switching to ELF
Also EFI environment uses PEs
Same with windows NT and NTFS where NT sands for "new technology" and is 30 years old at this point. Naming convention in MS and Windows are just weird sometimes.
Edit: Also WSL stands for Windows Subsystem for Linux but it should be the other way around: Linux Subsystem for Windows
@@maksymiliank5135 i think they call it wsl instead of lsw mainly cause it sounds better to market to developers, same reason for why the android subsystem is also just called windows subsystem for android
@@maksymiliank5135 i think they could technically spin WSL as meaning "Windows's Subsystem for Linux", in other words "The Linux Subsystem that exists on Windows", so in an abstract sort of way, "Windows Subsystem for Linux" is correct, because "Windows" here refers not to the subsystem, but the brand of the operating system to which the subsystem belongs
WINE is much more amazing than a "Windows subsystem on Linux", because Microsoft actually gave up on implementing a high performance compatibility layer and WSL2 just runs a virtual machine now.
I thought Microsoft was capable of hiring enough competent programmers. Turns out young open source programmers were smarter.
Although WSL1 was bad, WSL2 being a whole virtual machine has its benefits in both performance and linux compatibility. Not to mention they somehow convinced Nvidia to work up a driver that can share GPU into that VM without having a Quadro
it's not really a virtual machine, though, is it? it's more like a wrapper around hyper-v. the linux kernel runs just as close to the metal as the windows kernel does.
@@harrytsang1501 Oh WSL2 is much more usable since it runs a full Linux kernel and offers full syscall compatibility as a consequence (WSL1 did not). But it does incur a significant performance penalty in things like filesystem operations.
@@Spongman It's a very lightweight and highly integrated VM, but still a VM.
PE support can be enabled in the linux kernel config. Still no WINAPI, but PE is actually supported. Also, EFI loader stubs are PE format.
Thanks for that effort, I'm downloading wine right now to run this cursed application when you release it.
Way back when, I did some development on Win98, and I was always annoyed with pipes and handles. With pipes, you have to close the end you write to, and it has to be every handle to it because they're reference counted internally to the kernel, so that the reading program will know you're done writing. As for handles, when I originally read through the headers that came with VS6.0 they didn't define any handles as pointers. They were always an integer type because the kernel used them as an index into a table to reference each object.
I kind of like the old WIN32 method, because it obscures things, but I'd wager it's slower than POSIX. Plus, it would have the added difficulty of trying to pass data between threads and processes where you have to tell the kernel to share it instead of just passing a pointer. However, one could restrict the indices and have smaller data duplication obstacles when copying data around. Like instead of 8 bytes to point to an object, you could pass a byte or a word or a dword. Consider if each thread had a shared pool and could use a single byte to reference the data they needed to pass. Or if you had millions of objects all referenced by a dword instead of a full qword pointer.
What's even crazier, I can run windows as base, then WSL on windows, docker on WSL, wine inside docker, and have wine run windows applications
By wrapping it in a layer of docker I ensure not only can it be tested, it can be done inside CI/CD
I use Windows at work as an OS (Activy Directory domain, office tools, MS Teams). But I only actually work in the browser and in WSL. In the winter I'll try to compile our own company-specific WSL distro in WIndows with Visual Studio using WSL Launcher. Wish me luck xD
@21:44 I cannot get over how hilarious it is that the most used desktop operating system in the year 2023 puts your installed programs into a directory called "Program Files (x86)".
Like, this is an operating system for ordinary people, but they decided the single most important and most used folder on the entire system for normal everyday users should include a direct reference to Intel's instruction set architecture right in the clear for normals to read.
It becomes especially hilarious when you consider Windows is attempting to compete in the tablet device market on Arm.
I agree totally that the endgame here is for for Windows 12+ to just be a distro of Linux that comes pre-packaged with all the standard Windows applications running in Wine. I don't think that is particularly unlikely within the next couple decades.
Program Files is most definitely used more and why would you touch program files manually if you're not familiar with computers
@@andrewdunbar828x64 go to just "Program Files" and these days 32 bit exes are rarer (unless you download them deliberately)
why wine? now windows programs are just electron apps, easily portable to linux
On POSIX, you have the option to dup within the child inside the forked process. In Windows, you need to setup all semantics up front.
I'll be honest, I'm here because I wanted to see which naming conventions you use to copy them, but I stay because of the passion and heart you put on your projects, and also cuz you're funny (charismatic).
I never allow notifications on youtube but i'm making an exception for your content. Great stuff!
-mwindows adds gdi32 and user32 and sets a flag in the binary that tells Windows to not create a terminal window. ProTip: Only enable -mwindows for release build so you can use printf to debug.
First glance: WSL (move to another video)
Wait, Windows on Linux? (move back)
I just noticed neofetch reports you running 4.19 kernel, it was just earlier this year I managed to boot 6.x on a T31 (mips) SoC where previously it was only booting 4.4 with the manufacturer’s firmware 😬
This is probably one of my favorite channels on TH-cam, even though I just started watching the streams on Twitch. Love watching your coding and process, it’s truly educational and inspiring.
What video games do you play now and what are your all time favorite games?
Finally, this is what I was looking for, thanks a lot.
made me laugh on a dark day. thank you.
Oh monsieur knows the sense of perversions.
i'd definitely want to watch Zozin does his recreational programming session using that niche os called Windows (it will be really cool to see how do you use something completely different from linux)
I mean, these days I use only three programs: terminal, text editor and browser. Which creates pretty much the same experience on any mainstream OS. The only thing I usually miss on Windows is copy-pasting by clicking mouse wheel.
@@TsodingDaily even though you use only three programs, i still want to see your face when you fire up your machine and see the windows logo instead!
I did exactly that 5 minutes ago to test the executable on my Windows 8 instance. (Too lazy to install 10 or 11) I didn't capture my face but I didn't feel any out of ordinary muscle movements on it. And I felt slightly annoyed cause Windows started to update as it usually likes to do.
@@TsodingDailythis is exactly what made me switch to linux, fuckin most irritating shit ever. Specially in critical times and places aghh
I've heard Windows 11 does not officially support 32-bit applications anymore . Being said, it's not a bad idea to distribute 32-bit binaries because worst case scenario you would just run them in compatibility mode. And for some reason visual studio allows you to build in 32 bit for some reason 2023 and nearly 20 years since the last 32-bit processor came out and (AMD) x86-64 is AMD 64 bit extension of the x86 architecture (which is called that because and intel had a naming convention of their CPUs being SKU XX86 where xx is the model number 8086), that is to say (AMD)x86 - x64 is an Intel thing
I launched Musializer in windows, everything is fine with the rendering speed, maybe there were no normal drivers for the video card with the wine
Btw wine is not emulator , even it's name says that wine(wine is not emulator) 😅😅
I don't get it
Can you explain what it is then?
@@alurmait does not emulate windows it just translates windows api calls to their respective POSIX equivalents on the fly
@@jonforhan9196so, it's POSIX that's emulating those calls. but wine in inseparable from the underlying operating system, so in reality wine (on linux) _is_ an emulator. regardless of how smug the authors are trying to sound.
@@jonforhan9196 I heard this, this doesn't make sense to me. I don't see a fundamental difference between translation and emulation. Even when "emulating", you still have to translate your calls to something eventually, don't you (i.e. to machine code).
I read enough abstract stuff about computers that almost everything can be interpreted as emulation to me.
So I don't really get this meme.
Perhaps what is meant is that WINE integrates neatly with the POSIX environment? So, like, your POSIX programs can use "Windows" files and Windows programs can use POSIX files, for example.
Is that is what is meant by WINE not being an emulator? The fact that translation to POSIX allows for easy interop between host and the "emulated" system?
Back in 2017 I made one File sharing app with Qt and tried to make a cross compilation for Windows on my Linux but it got bricked
I allowed a windows 8 machine in my network, updated everything, set the BIOS, ensure it restored… then I came back a month later and it wouldn’t talk to any Microsoft DNS names. I couldn’t figure it out. Restored multiple times: soft restore, full restore. The thing was not going to talk to microsoft.
I’ve never had anything like that happen with Linux.
`aunpack` from `atool` (archive tools) automatically unpacks zip bombs in a separate folder, IIRC
I remember having issues with mingw executables requiring a gcc-specific dll. Been a while, so can't say whether that's still an issue, but I remember there's a compiler flag for statically linking it, so I guess it's more like "it should work, but watch out".
That's correct, best is just to statically link it because who wants to ship extra separate files if you can avoid it.
Your computer haunted and sauced. I want one.
Will you do a advent of code this year in Plan9?
crossdev mingw is my fav windows compiler
haha, love that shit. I'm doing the windows side of our project like this as well! We have a few needs for msvc, but of course we can use that in wine as well :')
Why is your cpu constantly at 80+ degrees, while only in the terminal and streaming? You should investigate that.
I laughed so fcking hard when you went in /usr/bin to grep and spell mingw's gcc name, like yeah those names are for sure ugly and really difficult to remember. Btw your videos (and streams too, I suppose) are really perfect (+ you're funny and I appreciate your desire for simple things / code / well you know what I mean, even though it's sometimes not possible). Thanks for this cool content man, we love U. A big "muah" from France
The correct way of using the Pimpl is to use a pre-declaration:
struct FFMPEG;
struct FFMPEG* init();
...
good video, as always! thanks for sharing. what about adding rtaudio to visualize system sound/music? just a suggestion :)
The main issue with developing for windows is that window , for some f****** reason, decided to become unicode compliant [and when I say unicode complaint I mean fully unicode compliant] So there's like two different versions of every function that takes in or returns string one where the string is an alias of char* and one where it is a alias of uint16_t * (because Unicode 16 is 16 bit) 49:26 I answered your question before you even asked it. And they say me rambling about how stupidly complex the win 32 is is bad and unhealthy... [Literally no one says that]
POV: A(NSI) functions vs W(IDE) functions
@@DatBoi_TheGudBIAS I mean I was technically incorrect there actually is three different version of every window function the a, w and base version where the base version is enjoying is an contents dependent alias of the respective wide or ASCII version of the function depending on whether you have Union code enabled.
yeah, leaking handle references is a common footgun for beginners. you need to be careful about what you inherit.
Unfortunately for U, in windows, almost every (of not all) software depends in at least 1 system dll (but wel, it's part of Windows, so it's just like it isn't a dependency anyways)
Mostly kernel32.dll or user32.dll
Early in the video you asked how common it was to have a program run in WINE but not in Windows and chat said it was pretty rare. And that's probably true, but I have found that a lot of old games often don't work on newer windows versions. So people either run something like a Windows 98 VM, or just use WINE/Proton and it actually works a lot better! (:
Or run it in windows compatibility mode and choose windows 98
Did you ever try the cosmopolitan Libc? arguable its possible to compile single binaries which are able to not only run on Linux and Windows but also on Mac, Open- Free- and NetBSD 🤯
Things are going slow on windows land and they are a little slow with it. But most of them have switched I believe
As a casual Windows hater, who sometimes uses Windows to play games, I do enjoy your hot takes. Even though they are sadly not serious.
Well...With your joke about a niche operating system for playing games I thought about it and realised that just now I don't know anybody that uses Windows. It's all gone Mac in work and Linux for production systems. Non-nerd friends just use their Apple/Android phones and tablets.
thats awesome, i can finally compile tail and grep for windows now then =D
YEAH THEY BEEEN OUT FOR EVER I T]:) Funny those two commands i missed those most whjen i stopped always have a terminal machine rack n sceen or putty sessions going. 254 IP's was a ;lot for a 19 yr old with 6 domains nbut I convinced themit was necccesaryk, reallly all to get my own class C soa to be abke to set the reverse dns -in--addr.arpa on my irc botnet. hah this wwas late 90s i wouldn't buch a hog today. but i might suddenly invent err come up with i mean come acrosss a desperate need, critical to production even for whatever ab upv6block eqyuuv is or even ujust like as longas they can deletegate me as the NS for thesubnet otherwise i doubt illl ever need want lke juisy neeed 2048 ipv6 ip's cine ti tubj if ut :)
This is awesome. Next do MacOS development on Linux xd
IOS development on Linux would be much more difficult task))
Some applications target 32-bit to support older hardware because 64-bit Windows can still load 32-bit applications and reverse is not true. Many developers (corporations on Windows 😄) release only 32-bit versions of their apps so users don't assume their apps don't work when they download 64-bit binaries onto a 32-bit system. In some cases the app is simple enough that using 32-bit binaries has very few drawbacks.
32-bit performs worse than 64-bit though in some cases so you did the right thing in picking 64-bit target. AFAIK, 32-bit processors are being actively phased out and only embedded systems will continue using 32-bit arch.
I can’t stand doing system development in windows. The win 32 api feels so different than posix
Dats cuz it is lol
I use msvc on linux to build for windows!
And lld-link as a linker
but msvc doesn't know where he is, and is trying to find link.exe
so i maked link.exe symlink in my .local/bin
And some how is working!
The windows include files and libs i installed with xwin
i hate "/" insted of "-"
windows is great for eworms and viruses, you get all sorts of cool ads, i remember fixing (or attemting to) an elderly lady's windows pc and she had a fake antivirus malware thing that she was arguing with me that she needed it. So she was firing up this software running scans everyday yet it was just perpetually infected, in hindsight i bet she was calling some of those helpful folks over at the india wing of microsoft support and paying them in steam gift cards daily
Linux file descriptors also do have the same thing as Windows handles do have HANDLE_ FLAG_INHERIT as I understand. The way to setting this sort of flag in Linux is calling fcntl with F_SETFD with FD_CLOEXEC flag. Once I was trying to redirect the output of my program to ffmpeg through the pipes using execve, but I had the same problem as was in the vod: ffmpeg hangs and doesn't finish, but the main program closes file descriptor. But when I set FD_CLOEXEC flag to the pipe, it worked out.
17:07 To be fair Edge is probably better optimized on windows than chrome. I did a little test. I had the same tabs opened in both of them and Edge somehow used less RAM and CPU. Don't know if it's the case all of the time though.
That's because Google collects telemetry from Chrome, while MS from Windows so they don't have to do it from the browser 🤣🤣🤣
Jokes aside, that's probably true, MS can optimize it better for their OS.
Ah the Windows thing people use, yeah, bunch of gamers.
Tsoding not forgetting about the minority using Win**** God forbid
footnote: 2:01:48
What software does he use for zooming into words? Does it work for screenshots?
Whilst im sure there is software that can achieve this (ffmpeg, xzoom?)-its amongst the built-in commands for emacs. (Ctrl-x, Ctrl-+ and ctrl(-)- to zoom out respectively).
Dafuk lol, when I installed mingw64 in my pc (yes, Windows), it had a gcc.exe file lol. U got scammed or maybe in Linux gcc isn't added cuz it might be confused with the normal gcc?
спасибо, всю жизнь произносил MinGW как "минг В"
Я на русском вообще произношу как "мин гэ вэ". Но в англоязычной среде принято вот так. :)
Is it possible to have a single executable (one file) that will run on both Winblows & Linux? ./winlin.exe
Tsoding learned about cross compilers, wow
Heey Zozin, I'm sorry for using Windows 😣
It's okay, I don't judge!
TempleOS support when?
Hello, Tsoding! I am going to watch new stream! Btw, what do you think about creating a spectrogram/spectrum analyzer? I saw one cool that visualizes sound in pseudo 3D, if you are interested, I can tell you the link :)
Btw, wrote this on Windows :O
Link me up!
@@korigamik I am only gonna do it if Zozin permits me to do so because I don't wanna get banned
@@RenderDragon you can't get banned in TH-cam
@@korigamik but Zozin can ban me on his channel
@@RenderDragon it doesn't work like that dude
NOICE
16:04 he can *smell* his audience
gotta love those mingw executable names 😂
Why os the tux in the thumbnail looking to me like a creepy doki doki literature club character
Where is the kiss at the end??
No kiss for youtube?
so can you run WSL in WINE ?
no. but you can run wine on WSL, of course.
What is your emacs theme moreover can you share your config and teach use somethin
🎉🎉🎉🔥🔥
11:58 I wouldn't bet on it, there is detectable differences between wine and win32. Like people were getting auto banned from games 4 using wine That's how significant the difference is.. valves branch of wine, I think it's called atom, might work better, even still though a valve does not guarantee 100% compatibility . The only way to guarantee windows compatibility is to link with the real Windows.h and the only way[legally ; assuming they didn't change their redistribution policy] to do that is to program on Windows with the visual C++ compiler.
c and c++ is always a nightmare on cross plat, it's so difficult. Just the whole ecosystem isn't great, low level languages like Zig and Rust have great tooling by default.
@@andrewdunbar828apples fault for using a retarded language
Wine = Linux Subsystem for Windows
"Who still uses this niche operating system for video games?"
This is literally how I feel lmaoooo.
MPD Support when?
did you delete video about miniaudio?
I wonder does windows do newline fixing bs (
->
) in pipes
Very unlikely. We are sending binary data. And if it was messing with newlines we would've noticed it in the final rendered video.
Can't SDL/Raylib just do all this winapi Scheiße for you?
This man makes me feel dumb
Definition of CHAD
man discovers cross compilation
12:51 I mean yeah sure it was a joke but you're not wrong, says the daily windows driver. (Ironically, I am a daily windows driver for the exact same reason you used the Linux in this video. That is I couldn't be bothered to install Linux on my computer; and also I also paid $100 for it. I want to get my $100 out of it and also as you said gaming but also valves doing stuff to change that)
Can wine on Linux run WSL?
Hey, I realize this is unrelated to this video, but have you ever tried the programming language "raku" (also known as perl 6)? I looked at it recently and it's super interesting, would be cool especially for like coding challenges a la advent of code, etc.
$300
@@fr3fou lol yeah....
Who needs virtual machines to run code anywhere? Operating system barriers just blur with this level of sorcery!!
You can compile a rust into a WASM app [holy f*** girls speech to text actually got. Was them correct the first time?]
WSL on wine when?
doesnt linux have the same problem? you start child processes with fork/exec, which inherits all fds. so you usually have to close all of the parents fds in te child...
Wine Distro?
If you have Linux then you do not need Windows. I rid myself of my Microsoft abuser when support for Windows 7 ended.
More Ded plz
Wine = WINdowsEmulator. :)
We’re programmers, we don’t do Physical Education lmao
Posix API is a mess, but you can see how the mess works, Win API is a magical mess
45:15 why is this so funny hahahahahahah