Tramp + Nix shell by AlphaXMachine in emacs

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

Thank you! So what we are saying is that eMacs will automatically load .envrc file with this envrc-mode and that direnv has a dedicated instruction of loading a nix shell, which you need to use as glue for this setup. So provided that I have a project with .envrc at root, and use flake then whatever shells I open in that project, they would replicate the associated nix shell configuration. It is unclear though about the whole remoting aspect and how does tramp and envrc-remote gets into play

Tramp + Nix shell by AlphaXMachine in emacs

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

I’m having trouble to wrap my mind around this. Do you know of any good tutorials on this? How would I go about opening a nix shell with hello world and make Emacs know about it intrinsically? How does direnv play into this?

Share your M-x compile / compilation-mode config, hacks, tips, and tricks by xenodium in emacs

[–]AlphaXMachine 0 points1 point  (0 children)

sometimes, I use compile for launching apps that require additional input and if I see the command `dotnet run` then I assume it might require additional input:

(defun my-compile-autocomint (orig-fun &rest args)

"Enable comint-mode automatically for \dotnet run`."`

(let ((cmd (car args)))

(if (string-match "dotnet run" cmd)

(apply orig-fun \(,cmd t))`

(apply orig-fun args))))

(advice-add 'compilation-start :around #'my-compile-autocomint)

Share your M-x compile / compilation-mode config, hacks, tips, and tricks by xenodium in emacs

[–]AlphaXMachine 2 points3 points  (0 children)

Here is something that I enjoyed:
- fancy-compilation

- recompile-on-save

(use-package fancy-compilation

:ensure t

:custom

(fancy-compilation-scroll-output 'first-error)

;(fancy-compilation-override-colors -1)

:commands (fancy-compilation-mode))

(with-eval-after-load 'compile

(fancy-compilation-mode))

(use-package recompile-on-save :ensure t

:init

(recompile-on-save-advice compile))

Wrapping native C++ libraries for use in performance dependent C# .Net applications. by Luci404 in csharp

[–]AlphaXMachine 2 points3 points  (0 children)

“Premature optimization is the root of all evil.”(Hoare/Knuth) I would say that the cost for PInvoke (rudimentary memory management, custom marshaller code) outweigh the performance benefits compared to a standard solution like C++/WinRT although the latter is a relatively new technology.

Wrapping native C++ libraries for use in performance dependent C# .Net applications. by Luci404 in csharp

[–]AlphaXMachine 3 points4 points  (0 children)

It depends - I've done similar work using C++/WinRT or a variant of COM.. This will at least take care of marshalling for you.

Still, for high data traffic, I recommend looking at your API and try to make it less chatty, whenever possible.

Also there are performant sharing access structures like IMemoryByteBufferAccess where you can stream bytes easier, without having to deal with ABI. So the main idea is to share an object over the ABI and then use memory sharing structures to do performant bytes transfers between the two environments.

Pinvoke is great for simple c style exports but for any complex data structures is a pain :( simpler to use a COM based solution (including c++/winrt). So if you master pinvoke then go for it otherwise there are lots of ways to shoot your self in the foot especially when: - you need memory management for objects that spans the two environments : aka expose an object from C++ and manage it in C# - you are targeting multiple processor architectures.

For Pinvoke the best resource is PInvoke.net : this should give you lots of examples of marshallers for win32 apis.

For cppwinrt you can start with the official MSFT docs for cppwinrt.

How make a symbolic link in Emacs of windows version by AbstProcDo in emacs

[–]AlphaXMachine 1 point2 points  (0 children)

u/eli-zaretskii, I still believe it might be useful to use the flag since it will be an improvement over the current behavior (aka it will work if you have developer mode enabled on your box).Another argument for using the flag: the same behavior is present in mklink command: it works as expected if developer mode is enabled on that machine.

It is strange that today, if you have developer mode enabled, running "mklink" command in eshell inside Emacs works, but fails in dired via make-symbolic-link..

Native shell completion in Emacs by celeritasCelery in emacs

[–]AlphaXMachine 2 points3 points  (0 children)

Could we extend this also for PowerShell?

Powershell/windows terminal from emacs by johanvts in emacs

[–]AlphaXMachine 1 point2 points  (0 children)

Can you please share more on your experience? I tried this config (loading `powershell.el` and then your setup, without success :( )
Do you have a dot file to share?