michael_teter

michael_teter

Can some of you folks who use Windows for development suggest some guides on workflow?

For example, regarding WSL (Bash on Windows), I’ve read stern warnings against modifying any WSL files from Windows. So that means I’m not supposed to use Windows Atom editor to edit files that exist in my WSL folders. However, it seems that trying to have my Git project in my Windows folders screws up all the permissions (creating a Git war with my Mac, since each side sees the permissions changing on all files).

Do any of you do your development purely in Windows, without WSL? (Git, iex, PostgreSQL!?, etc.)? If so, do you also have to do the Putty stuff to try to get working ssh keys?

I’m finding this quite a challenge moving from Mac to Windows for development… recipes for success would be very helpful :slight_smile:

First 10 of 47 Posts Switch mode

NobbZ

NobbZ

Stay with Mac or move to Linux.

Even if it is possible to develop elixir projects on windows, I’d do this only if windows is the targeted platform to run the application.

I do totally refuse to use WSL, instead I use MINGW2 if I have to do something on windows.

Since I often have trouble when it comes to libraries that use NIFs, I try to avoid windows as much as possible. And if MINGW2 doesn’t help me out, I fire up a VM or a Docker-Container.

I had never problems with permissions in my git repository when doing the dance with linux and windows. The most common problem are the lineendings though, but after one has configured his git correctly (on both sides) it just works.

michael_teter

michael_teter OP

I’m already at the point where I just may give up. It’s just almost impossible for me to believe the state that Windows is in compared to Mac. I want to rant and enumerate (partly because I fear some Windows defenders will not believe me), but it’s not worth throwing mud.

I’ll just hope this old Mac doesn’t die before I can sell this new XPS 15 and buy another rMBP. Apple does a lot of stupid things and makes what I think are some pretty poor decisions at times, but I now really know what I was giving up by trying to switch.

OvermindDL1

OvermindDL1

I tried WSL for a bit on Windows 10 but it was so buggy and so many things did not work due to limitations in WSL that I could not use it.

I’ve always done my elixir dev in a mingw bash shell with a windows-running atom editor. I use git, iex, postgresql and all forth just fine. I chose mingw so I can compile things like bcrypt without issue, plus I know mingw. ^.^

I would never ever recommend running Windows as a dev environment, for any language really (unless you are screwed/forced into using .NET or something), if you have the choice.

I tried just running a linux gui on hypervisor but could never get the GUI to display anything but black, with no errors, so I think Windows 10 hypervisor is borked, but that is not surprising either…

Work won’t let me wipe it and install a better OS… >.>

I just set a global/system-wide git option to just use linux style line endings, so much easier.

Oh I’ve already ranted in one of the hidden boards, don’t worry, there are not many (any?) Windows fan’s here. ^.^

kokolegorille

kokolegorille

It is not about Windows vs Mac, but more about Windows vs *nix.

As You can see in this topic Which OS do you develop on? - #75 by AstonJ Ratio is about 8 windows to 82 *nix. (Edit: more recent poll here: Which operating system do you develop on (Poll))

So You don’t need to buy a Mac, You can go the Linux way :slight_smile:

michael_teter

michael_teter OP

Given my need to use Adobe Premiere and Illustrator, it’s Windows or Mac for me. But in terms of basic usability, I’m shocked at poor Windows is compared to my Mac.

For example, this old rMBP 15 will drive three large monitors in addition to its screen. But when I try to run just one 4k monitor on my new XPS 15 (with better Nvidia GPU), I get laggy external display, and limited to 30Hz refresh.

With Windows, I can’t have Docker and Virtualbox. I have to use a 3rd party program to manage my ssh keys!? (And it doesn’t integrate easily with everything.) Outlook 2016 on Mac has unified inbox, which is good since I have 8 different accounts I need to check. Outlook 2016 on Windows doesn’t have that feature, and the party line on the official windows forum is that the feature is only possible for POP3 accounts (which is obviously not true). I have a much longer list than this… these are just the ones I can think of off the top of my head.

Meanwhile, Apple won’t let me have their fastest laptop with an ESC key. Or > 16GB RAM. But now my complaints about my Mac seem insignificant.

NobbZ

NobbZ

Not necessarily… At my office I do have to work with some scripts that are required to have CRLF line-endings.

After I came in there and was the first one who tries to do as much on linux (in a VM though) as possible, we encountered a lot of trouble because of the line-endings. My boss wanted me to give up on linux for a subset of our repositories, but I dug into git-configuration then.

After a while I came up with a solution that suites us very well, and which I think should be more standard even in the OSS community:

1.) Configure git to preserve line-endings, on any system globally.
2.) Provide a .editorconfig which sets everything to LF, if necessary configure your editor manually.
3.) Add a per filetype config in the .editorconfig and your editors configuration to save certain files using CRLF.
4.) Provide a .gitattributes file with correct setting as described in Configuring Git to handle line endings - GitHub Docs (this is a good fallback for folks that do not adhere to 1-3)

I do think though, that a proper set up .gitattributes file would make steps 1 to 3 obselete.

NobbZ

NobbZ

I’m not sure what an rMBP is, but why selling the XPS? 8 years ago I had an XPS 17, it was about 4 years a constant shadow of mine, very reliable and one of the few laptops at that time that where capable of smoothly running a VM even on battery (well, only for 15 minutes or so, but you get it ;)).

Of course, linux is different to MacOS, but you will be able to use things you learned on mac, also you have a kind of freedom that neither windows nor mac will ever give you in how you wan’t your system to behave, to look, to feel, to speek… But maybe I am opinionated after more than 10 years of using primarily linux.

OvermindDL1

OvermindDL1

I don’t thank goodness! ^.^;

Whooo!

net

net

Caps lock makes a far better escape key than ESC. (Also, ESC is still there, it’s just not tactile.)

Azolo

Azolo

I develop almost exclusively on Windows these days, even though the WSL seems to be good enough to use if I wanted.

The things I do are basically,

  • Run the latest version of Windows not in the Insider track
  • Don’t use cmd use Powershell
  • Run iex with --werl
  • Set a Powershell alias and use the ssh client that comes with Git
    • It’s in git/usr or something
  • Use the posh-git PSModule
  • Use pgadmin or whatever gui that ships with Postgres
    • The CLI throws fits for me, though @OvermindDL1 probably has more experience with it than I do.
  • Don’t use anything Windows or *nix specific.
    • Easy for me, hard when working with others who don’t care as much
  • Set whatever editor you are using to always open up files in “Unix” mode.

There’s not a lot more special to my environment than that and a heavily edited Powershell profile. Maybe a couple other modules or programs that I don’t use that often.

As for things I don’t do but would recommend:

  • Get other Powershell Modules
  • I think there’s even an SSH module
  • Use Chocolatey
  • If you use WSL try to use it in your Windows directories
  • i.e. Don’t go into the WSL directories
  • It could really mess up your WSL installation
  • Don’t. Ever. Use. Putty… Trust me, it’s not worth it

I’ve never had this happen personally, mainly because I think that being in a situation where file permissions are a big deal is a smell itself, but I know there are situations where it is necessary.
I think the solution is something along the lines of running git config --global core.filemode false on just the Windows machine.

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement