• 1 Post
  • 245 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle
  • Rewriting huge parts of the IDL compiler for Nucom, my implementation of Microsoft’s COM binary interface standard and (in the future) network protocol. The original version was hacked together with a lot of assumptions made in the parser and isn’t very extensible, and I do need to extend it now.

    (Nucom is another way to have a stable ABI for Rust, e.g. for a plugin interface, and for Rust/C++ (and more OOP-style C) interop, based on objects with vtable pointers. And hopefully sometime in the future, transparent IPC and networking so you don’t have to load plugins into your process’s memory space if they don’t need to be there, with it working the same as if it were direct calls. All of this I assume you can already do on Windows with the windows-rs crate but it’s obviously Windows-only.)

    I do have to say though, I need a better way of transforming my syntax tree. Right now I’m just copying the struct definitions over and over for each compile stage and manually writing code to copy everything instead of just the parts I’m actually transforming, and it just seems like there has to be a better way. I might want another proc macro for this.


  • It offers no practical benefit to small networks at the moment.

    The internet is not a “small network”, and I assume your small network is connected to it. You need local IPv6 routing to have access to IPv6-only hosts which are becoming more and more because it’s reasonable in terms of price to get an IPv6 block unlike IPv4 blocks which are being auctioned for tens of thousands of dollars at this point (!!!).

    Also restoring global addressing is a huge benefit. P2P communications in IPv4 has become an insane mess of workarounds due to lack of addresses and this becomes worse the more layers of NAT you stick behind each other to try to save your ass from the rising tide.

    I’m really sick of hearing these idiotic excuses over and over, “it’s hard” this, “it’s unsafe” that, “it’s expensive”, “understanding the eldritch secrets of IPv6 has driven 5 of my colleagues into madness” skill issue. THERE ARE NO MORE IPV4 ADDRESSES. So unless your network is so fucked that you haven’t managed to fix it in 26 years, since IPv6 has been standardized, or it really is just an internal network with no outward facing services where it doesn’t matter when someone who just has IPv6 can’t access it because they wouldn’t be able to access it anyway, and you’re not some kind of ISP, you have no reason not to have support for it at this point and you absolutely never have a reason to tell people it’s not “useful” because that is straight up wrong in the general case even if it might be true for your situation.




  • Very true haha. NixOS is great and the best I’ve got right now but I would lie if I said it has never been painful.

    Especially for desktop use I want to build my own distro which takes a lot from NixOS, mostly in terms of the central configuration but not much else (I definitely want a more sane package installation situation where you don’t need stuff like wrapper scripts which are incredibly awful imo), but also other distros, and also with some unconventional things (such as building it around GNUstep). But who knows if that ever gets off the ground, I have way too many projects with enormous scale…



  • Traits like std::io::Write are essentially Strategy pattern. Take a look at how that’s used. You’re doing it mostly how I would, except for the Box<dyn T>. Generally it’s preferred to use generic functions/types in Rust instead of dynamic dispatch, i.e. have a fn do_something<T: MyTrait>(imp: T) instead of a fn do_something(imp: &dyn MyTrait).



  • Do be careful, the like 20–50€ USB webcams that you can usually find are absolute dogshit IME and probably blown away by any webcam on a good recent laptop (the one I have certainly is by the one on my MacBook and IIRC the laptop I had before also had a better camera). Personally I wouldn’t trust any of the ones I can see listed on amazon right now. A lot of times they have horrible autofocus, brightness adjustment, noise and so on even if the theoretical image resolution is advertised as 1080p for example. (Of course, you can always send it back but still.)

    If you want actually good quality, get a real video camera that you can connect to a computer, or if possible use your phone back camera if it’s good enough (I know Macs can use the iPhone camera as a built in thing, not sure about other combinations of phone/computer).





  • Seems fine to me except for all the firewall and special routing stuff, I’m not familiar with that. Does the wg command show received or only sent data? For the record, this is my config:

    spoiler
    # /etc/systemd/network/mullvad.netdev
    [NetDev]
    Description=Mullvad
    Kind=wireguard
    Name=mullvad
    
    [WireGuard]
    PrivateKeyFile=/var/keys/mullvad/pk
    
    [WireGuardPeer]
    AllowedIPs=::/0
    AllowedIPs=0.0.0.0/0
    Endpoint=146.70.126.194:51820
    PublicKey=ApOUMLFcpTpj/sDAMub0SvASFdsSWtsy+vvw/nWvEmY=
    
    # /etc/systemd/network/mullvad.network
    [Match]
    Name=mullvad
    
    [Network]
    Address=10.64.130.96/32
    Address=fc00:bbbb:bbbb:bb01::1:825f/128
    
    [Route]
    Destination=::/0
    Metric=16384
    
    [Route]
    Destination=0.0.0.0/0
    Metric=16384
    






  • Right after Windows 8 got released, I upgraded to it on my 2011 budget laptop. I don’t know what exactly the problem was, I think there was both a problem with there being a high chance of not getting any output on the display after waking up from hibernation, and it also frequently bluescreened when booting. I was playing around with various distros before then but that was when I nuked Windows and switched to it as primary OS.

    (That bluescreen bug on the laptop still wasn’t fixed with Windows 10 when that came out. Lmao)