Earlier quoted context omitted.
Oh yeah, I agree. I’m really interested to see if this approach would work better than build.rs for some other projects too.
Bah... This seems like exactly the kind of thing that makes dependency tracking, and sandboxing compilation harder.
Rust/WinRT Public Preview
201–210 of 219 posts
Re: Rust/WinRT Public Preview
#202Earlier quoted context omitted.
> WSL is only for those that use Windows to target GNU/Linux, the demography that used to buy macOS to do the same. Do you know many people that used to do this with macOS and are now using Windows ? Like, oh boy, I tried, but after 4 months I ended up back with macOS.
Few years ago I did this transition - I had a MBP that I used for all Unix based things - after realizing how great Ubuntu runs under Hyper-V I just began to use that. It wasn't as seamless but no big deal opening up SecureCrt to connect. Then WSL came along and I used that but found the file system access to be too slow so back to Hyper-V VM. Now that WSL2 is actually a more seamless Hyper-V VM I am planning to just…
Re: Rust/WinRT Public Preview
#203Earlier quoted context omitted.
> WSL is only for those that use Windows to target GNU/Linux, the demography that used to buy macOS to do the same. Do you know many people that used to do this with macOS and are now using Windows ? Like, oh boy, I tried, but after 4 months I ended up back with macOS.
In my experience, one of the the problems is that Macs are hilariously underpowered for many modern dev and analytics use cases. So the workaround is to work off remote machines/clusters over web interfaces/SSH but for many development use cases that's just slow and clunky - the have merit more in productionising. The series of hardware clusterfucks on Mac haven't helped ether. So I've seen Mac users who work in thes…
This is what I do and works perfectly. My dev machines are 82 cores xeon platinums with Terabytes of RAM or nodes with 8 V100 GPUs attached, etc.
I don't know of any workstation, much less laptop, that could be a replacement for any of that.
For the stuff I do on the laptop itself (Word/Powerpoint/Outlook, web browsing, using an editor to edit files remotely, etc.), more power wouldn't hurt, but my macbook is a macbook air 2013... so I can't imagine that a 2020 macbook would be underpowered.
Re: Rust/WinRT Public Preview
#204Earlier quoted context omitted.
Seems sensible though, the build.rs solution would require every project using rust/winrt to have a build.rs and code to load & codegen the modules (probably copy/pasted), so it'd be a lot more work for users of rust/winrt, though I guess it'd be less magic.
Oh yeah, I agree. I’m really interested to see if this approach would work better than build.rs for some other projects too.
So, neither cargo nor the compiler really know of the paths, and cannot accordingly rebuild the sources when they change.
Perhaps they can only change when a corresponding version cargo does know about changes, anyhow, bypassing the build/module system with a proc macro is probably not something to be done lightly.
Re: Rust/WinRT Public Preview
#205Earlier quoted context omitted.
In my experience, one of the the problems is that Macs are hilariously underpowered for many modern dev and analytics use cases. So the workaround is to work off remote machines/clusters over web interfaces/SSH but for many development use cases that's just slow and clunky - the have merit more in productionising. The series of hardware clusterfucks on Mac haven't helped ether. So I've seen Mac users who work in thes…
> In my experience, one of the the problems is that Macs are hilariously underpowered for many modern dev and analytics use cases. This is what I do and works perfectly. My dev machines are 82 cores xeon platinums with Terabytes of RAM or nodes with 8 V100 GPUs attached, etc. I don't know of any workstation, much less laptop, that could be a replacement for any of that. For the stuff I do on the laptop itself (Word/P…
Re: Rust/WinRT Public Preview
#206Earlier quoted context omitted.
Oh yeah, I agree. I’m really interested to see if this approach would work better than build.rs for some other projects too.
Hit the max nesting depth, but to reply about why, because winrt::import! is reading (arbitrary?) filesystem paths and there isn't an equivalent for build.rs emitting 'rerun-if-changed'. So, neither cargo nor the compiler really know of the paths, and cannot accordingly rebuild the sources when they change. Perhaps they can only change when a corresponding version cargo does know about changes, anyhow, bypassing the…
I was totally forgetting rerun-if-changed! This is indeed a barrier in the general case. I think that it doesn't affect this crate, but I am not 100% sure. Regardless, thank you!
Re: Rust/WinRT Public Preview
#207Earlier quoted context omitted.
It is already available, it is called GObject, KParts, D-Bus. If the community has embraced a proper desktop eco-system around them, like the component vendors on other platforms, they aren't going to start now. I surely don't see job offers for Linux/BSD GUI toolkits as I see for Apple, Microsoft and Google ones. WSL is only for those that use Windows to target GNU/Linux, the demography that used to buy macOS to do…
No, the point of peatmoss's comment is that Linux doesn't lack components or even tools, they lack a cohesive ecosystem. The parts like GOjbect, or KParts, or D-Bus are present but lack cohesion and coordination. The paid teams at Cannonical, IBM/Red Hat, etc all seem to be more concerned with rewriting the core desktop shell's every other release than making a cohesive ecosystem on their chosen tools. For example, t…
One thing I’ve also thought is that if Linux had managed a first-class GNUStep environment with a compelling alternative to macOS in terms of dev tooling, it could have been great leverage in terms of keeping Apple focused on the core developer experience in macOS.
Re: Rust/WinRT Public Preview
#208Earlier quoted context omitted.
Let me introduce you to Steve Ballmer, the CEO before the current one, Satya Nadella: https://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_... He was CEO of Microsoft until 2014, that is, 6 years ago. Microsoft changed strategies because they tried everything they possible could to counter open source and Linux and lost. Now they are forced to play nice. Being forced to be nice is not the same as being nice ou…
They _lost_? They have a 1.36 trillion USD Market cap (today). That's more than Apple's 1.29 trillion USD Market cap. It's hilarious how people on hacker news live in this bubble where Microsoft has faded away into irrelevance. And they're also very good. I'm running Windows 10 right now on a dual-monitor, dual NVidia GPU, dual Xeon system and everything "just works."
Re: Rust/WinRT Public Preview
#209Earlier quoted context omitted.
Is the projection literally "wrapped raw pointers?" How are the raw pointers wrapped - for example is there interop between COM reference counting and Rust Arc? Or something else? Here's a classic trap: you get a reference to something interior, and then the parent is deallocated. My event handler gets a ref to this button's label and then replaces the button. Is this possible with Rust/WinRT? (No judgement either wa…
Rust's borrow checker solves the problem of "get a reference to something interior, and the parent is deallocated". It knows (by static analysis) when an inner reference may be in use, and won't let the program compile if the parent could deallocate during that time. This works well even with externally refcounted objects. You can give reference to an inner object without increasing its refcount, and rely on the borr…
Re: Rust/WinRT Public Preview
#210Earlier quoted context omitted.
Is the projection literally "wrapped raw pointers?" How are the raw pointers wrapped - for example is there interop between COM reference counting and Rust Arc? Or something else? Here's a classic trap: you get a reference to something interior, and then the parent is deallocated. My event handler gets a ref to this button's label and then replaces the button. Is this possible with Rust/WinRT? (No judgement either wa…
The raw pointers are wrapped in `ComPtr` defined here: https://github.com/microsoft/winrt-rs/blob/master/src/com_pt... Those `ComPtr`s are then wrapped in convenience types that handle method dispatch, via code generated here: https://github.com/microsoft/winrt-rs/blob/master/crates/win... There is no integration with Rust Arc, but that's just because in COM/WinRT each object is in charge of its own allocation and re…
Application::Current.OnActivated = move |args| stuff();
and stuff() removes it: fn stuff() { Application::Current.OnActivated = None; }
Rust lambdas are not COM objects and are not refcounted. In practice, what prevents the event handler from being deallocated while it is executing?