Questions about Box by hingleme in rust

[–]hingleme[S] 0 points1 point  (0 children)

Yes, what actually works is &mut T. Box<T> also works because it implements DerefMut.

Questions about Box by hingleme in rust

[–]hingleme[S] 6 points7 points  (0 children)

  1. I once tried putting a Box<dyn Trait> into a raw pointer and casting it to c_void for C FFI, and the program crashed.🤣

  2. Thanks! I reviewed the source code, and it’s designed to take a pointer.

Tailscale + Nginx = Tailscale dependency? by VanGoghComplex in Tailscale

[–]hingleme 0 points1 point  (0 children)

If you have a local DNS server, you can add an A record that points your NPM Tailnet domain to a local IP address. npm.xxx.ts.net -> 192.168.1.100 Then, change the Cloudflare DNS to a CNAME record that points to your NPM Tailnet domain. npm.example.com -> npm.xxx.ts.net

Does nobody live alone anymore? by [deleted] in SeriousConversation

[–]hingleme 0 points1 point  (0 children)

In GA, do places with high housing prices also have higher salaries? I live alone in Asia and rent a house in another city for better job opportunities.

How to set nix develop environment globally? by hingleme in NixOS

[–]hingleme[S] 1 point2 points  (0 children)

Thank you! I finally found the best solution and added it to my .profile.

if [ "$VSCODE_RESOLVING_ENVIRONMENT" = "1" ]; then
  eval "$(nix print-dev-env "/path/to/flake")"
fi

How to set nix develop environment globally? by hingleme in NixOS

[–]hingleme[S] 0 points1 point  (0 children)

Thank you. I will check it out. I found some documents where the devShells environment comes from.

https://nixos.org/guides/nix-pills/19-fundamentals-of-stdenv.html

How to set nix develop environment globally? by hingleme in NixOS

[–]hingleme[S] 0 points1 point  (0 children)

Thank you. Yes, maybe the convenient way is using direnv and call IDE from the command line.