News for hackers. Stuff that matters.
Re:macOS deprecating scripting language runtimes, including ... by JohnBooty on Wednesday June 05, 2019 @11:28PM (#20111319)

    They've got enough market clout now that people will 
    port Ruby/Python/Perl to a non-Unix macOS, just as 
    they port them to Microsoft Windows.
Ruby on Windows is a nightmare.

To be specific, Ruby itself (the core language and core libraries) are pretty good on Windows. Great choice for a scripting language, or whatever else you want to do.

But libraries like ActiveRecord, Rails and their myriad dependencies are very very hit or miss on Windows and there's not a lot of support when things go badly.

A lot of the issues are simple - like dead simple. Lot of gem authors don't bother to make things like file paths (forward slash vs. backslash) system agnostic. Or the gems depend on compiled binary stuff like Nokogiri or ImageMagick and those are always a bit of an adventure on Windows.

If MacOS drifts farther away from Unix they will cease to be the platform of choice for many developers currently using it today.

Re:macOS deprecating scripting language runtimes, including ... by Stratoscope on Thursday June 06, 2019 @05:58AM (#20113022)
> file paths (forward slash vs. backslash)

Windows file APIs have always supported forward slashes in file paths, even before there was Windows. This goes all the way back to MS-DOS 2.0.

Re:macOS deprecating scripting language runtimes, including ... by jmkni on Thursday June 06, 2019 @05:20AM (#20112862)
The Windows Subsystem for Linux fixes a lot of these problems, you can even point VS Code at Ubuntu now on Windows and avoid CMD entirely.
Re:macOS deprecating scripting language runtimes, including ... by TheRealDunkirk on Thursday June 06, 2019 @06:24AM (#20113128)
I was someone who installed the first beta of Windows that included this, just to try it out for Rails. It had LOTS of problems. I filed bugs. I kept trying over the next couple of versions, and finally gave up. I tried it again a few months ago, and, again, ran into a show-stopping problem of some sort, and gave up again. Are you saying that you use it "in anger" for serious development, and have no issues?

People complain about doing Rails on Windows, and, while there's definitely extra friction, and I hate Windows in general, I have really good luck with RubyInstaller. I used to have a hard time with ExecJS, but now I just install Node (on either Mac or Windows), and I'm usually off and running.

Re:macOS deprecating scripting language runtimes, including ... by maxsilver on Thursday June 06, 2019 @09:45AM (#20114449)
I use WSL (without anger) for serious development, for about two years now and have had almost no issues.

Running 'Pengwin' (Debian) Linux via WSL, RVM using Ruby 2.4.1 + Rails 5.1.7 and Ruby 2.6.2 + Rails 6.0.0.beta3

Today, everything works just as expected, right out of the box with no effort. This includes ActiveRecord (to SQLite, MariaDB, and PostgreSQL), including Node.js / Asset Pipeline, Prawn PDF and ImageMagick integrations, uploads to AWS, email integrations, capistrano-based deployments, Heroku Gem + integration, and so on.

It's gotten to the point where we spend more time helping OSX folks figure out occasional Homebrew weirdness, than we do helping Windows folks with WSL. Especially since WSL people can almost always just re-use any Ubuntu instructions verbatim.

Re:macOS deprecating scripting language runtimes, including ... by tekknik on Friday June 07, 2019 @11:11AM (#20125332)
except when you install a native module in WSL and then try to run it from CMD. WSL is no different than having a headless VM and comes with all of the problems of one
Re:macOS deprecating scripting language runtimes, including ... by JeremyBanks on Thursday June 06, 2019 @09:29AM (#20114311)
I've done most of my Linux development on WSL for the last year. It stuggles sometimes under certain types of heavy IO load, and there are ocsssional compatibility issues, but overall it's been impressively reliable and convenient.
Re:macOS deprecating scripting language runtimes, including ... by xenorplxx on Thursday June 06, 2019 @07:19AM (#20113401)
I am using WSL more and more often nowadays and it's really good now, it works just like you'd expect Ubuntu (or other distro you choose) to work. The only thing I've had to do is turning off anti-virus real-time protection for linux subsystem.

Hell, not only VSC supports WSL. RubyMine can manage rbenv/rvm on WSL and more https://confluence.jetbrains.com/display/RUBYDEV/How+to+add+...

Re:macOS deprecating scripting language runtimes, including ... by tty2300 on Wednesday June 05, 2019 @11:51PM (#20111426)
The funny thing is I have been a rails dev for years and didn't even know it didn't work on windows because I have never tried and don't know any dev ever using windows.
Re:macOS deprecating scripting language runtimes, including ... by kowdermeister on Thursday June 06, 2019 @03:00AM (#20112211)
That just proves you live in a bubble :) I never got into RoR because it sucked so much on windows and every single tutorial was OSX focused. I just sticked to alternatives that worked.
Re:macOS deprecating scripting language runtimes, including ... by ffdjjjffjj on Thursday June 06, 2019 @07:10AM (#20113343)
So which companies are actually doing RoR development on Windows? Do they also deploy to Windows Server (?) in production? I guess I live in multiple bubbles because I’ve worked for tech companies in several different major metros and I’ve never heard of this as a mainstream thing.
Re:macOS deprecating scripting language runtimes, including ... by kowdermeister on Thursday June 06, 2019 @10:11AM (#20114718)
It is not like that. My point is that there's a barrier to entry to RoR that you should own a Mac. I gave up because my home setup is Windows based and I won't change it for the sake of a hyped framework or tool.

But none of this is surprising considering where RoR is coming from, I'm not sad or upset about it either :)

Re:macOS deprecating scripting language runtimes, including ... by tty2300 on Thursday June 06, 2019 @05:45PM (#20119556)
You don't need a Mac. RoR works perfect on Linux as well.
Re:macOS deprecating scripting language runtimes, including ... by tekknik on Friday June 07, 2019 @11:15AM (#20125377)
it seems like you’re blaming RoR for a problem that is actually due to windows being “different”. almost every OS besides windows is a nix or nix clone and POSIX compliant or certified. so who’s really the problem here?
Re:macOS deprecating scripting language runtimes, including ... by taf2 on Thursday June 06, 2019 @12:13AM (#20111525)
In the early days of rails say 2006, it was definitely more common place... but I guess there were fewer of us back then ... I know as a maintainer of curb I have a few windows users
Re:macOS deprecating scripting language runtimes, including ... by malyk on Thursday June 06, 2019 @02:53PM (#20117779)
I started with a ruby/rails project in 2007 and after 3 days of fighting my work issued windows machine I just went out and bought a white macbook and things were up in running in an hour or two. I've never looked back.
Re:macOS deprecating scripting language runtimes, including ... by dragonwriter on Thursday June 06, 2019 @03:44AM (#20112393)
> But libraries like ActiveRecord, Rails and their myriad dependencies are very very hit or miss on Windows and there's not a lot of support when things go badly.

I haven't done Rails for a while, but when I did Rails (including ActiveRecord and all its other components) Just Worked o bWibdows (lots of the peripheral ecosystem of Rails and Ruby more generally was a nightmare, but Rails itself was great), and overall the Ruby (outside of Rails) experience on Windows has gotten better with Ruby installer + DevKit, which hasn't closed all the gaps but does mean that even libraries with C extensions frequently just gem install and work on Windows; I'd be surprised if Rails itself had gotten worse in this area.

Re:macOS deprecating scripting language runtimes, including ... by ken on Thursday June 06, 2019 @01:19AM (#20111810)
But macOS uses '/' as a directory separator already. They're not going to arbitrarily change trivia like that -- at least, not short of killing the concept of a filesystem altogether. (True, if anyone was going to do that, Apple would, but APFS is brand new. That's not going anywhere.)

Apple isn't changing things just for the sake of change. They're removing 1970's-isms where they hold back the platform. Languages like Ruby/Python/Perl also clean house, from time to time, to remove old cruft. I can't imagine any legacy feature of macOS that Apple would want to deprecate which would make it more difficult to maintain a good port of Ruby/Python/Perl. These are regular general-purpose programming languages now, not just Unix scripting languages.

Yes, Unix has been one of the developer systems of choice for the past couple decades, but it wasn't always so, and it hasn't been the only one. I hear more developers than ever using and enjoying other systems like Windows (Powershell) today. Even Linux today is pretty far from traditional Unix. I just don't see perfect Unix compatibility as a necessary component like it was in 2001.

Re:macOS deprecating scripting language runtimes, including ... by saagarjha on Thursday June 06, 2019 @01:22AM (#20111825)
> macOS uses '/' as a directory separator already

Depends on what level of the UI you're dealing with.

Re:macOS deprecating scripting language runtimes, including ... by ardy42 on Thursday June 06, 2019 @01:28AM (#20111848)
> But macOS uses '/' as a directory separator already.

IIRC, HFS actually uses a ':'.

Re:macOS deprecating scripting language runtimes, including ... by cynwoody on Thursday June 06, 2019 @02:41AM (#20112148)
Mac OS versions prior to OS X used ':'.

Mac OS X, initially released on 24 March 2001, uses '/', like other Unix-derived systems.

Also, like other unices, OS X uses '\n' as the line ending. Prior Mac OSs used '\r' as the line ending. Windows uses '\r\n'.

Re:macOS deprecating scripting language runtimes, including ... by pjmlp on Thursday June 06, 2019 @07:16AM (#20113377)
In A/UX you could use both.
Re:macOS deprecating scripting language runtimes, including ... by hestefisk on Thursday June 06, 2019 @05:07AM (#20112805)
Similar, HFS+ used to provide the option for case insensitivity. Both things were built in for legacy support reasons during the transition from OS 9 to X, as with Carbon.
Re:macOS deprecating scripting language runtimes, including ... by zwily on Thursday June 06, 2019 @08:13AM (#20113741)
Macs still come with case insensitivity on by default.
Re:macOS deprecating scripting language runtimes, including ... by codesnik on Thursday June 06, 2019 @05:06AM (#20112802)
but in Finder you can use "/" in filenames, and can't use ":". They got swapped if you look on the file from Terminal.
Re:macOS deprecating scripting language runtimes, including ... by gsnedders on Friday June 07, 2019 @09:30AM (#20124260)
Pretty sure HFS doesn't actually store any directory separator. A directory, after all, is just another file, each one containing its own children. Classic Mac OS used ":" when it needed to use something as a path separator.
Re:macOS deprecating scripting language runtimes, including ... by paulcarroty on Thursday June 06, 2019 @12:48AM (#20111665)
> Ruby on Windows is a nightmare.

The same stuff with Node.

Re:macOS deprecating scripting language runtimes, including ... by AlfeG on Thursday June 06, 2019 @12:50AM (#20111680)
Not sure why? Yeah there were times with damn node-gym not compiling for whatever reason. But nowadays things run pretty smooth.
Re:macOS deprecating scripting language runtimes, including ... by marktangotango on Thursday June 06, 2019 @02:59AM (#20112208)
Besides paths, Http_proxy settings on enterprise networks is a major pita.
Re:macOS deprecating scripting language runtimes, including ... by pieter_mj on Thursday June 06, 2019 @04:54AM (#20112752)
i'm still using cntlm for that (as a proxy in front of the enterprise proxy) : http://cntlm.sourceforge.net/

(sourceforge is the main link, probably best to visit with ublock origin enabled)

Re:macOS deprecating scripting language runtimes, including ... by paulcarroty on Thursday June 06, 2019 @01:46AM (#20111923)
paths, compilation etc. Windows isn't main server platform, so people seems like just don't care.
Re:macOS deprecating scripting language runtimes, including ... by nailer on Thursday June 06, 2019 @02:15AM (#20112038)
You can use / on Windows in node perfectly, and Windows node now installs required devtools for native modules at the end of the process.

It's pretty easy these days.

Re:macOS deprecating scripting language runtimes, including ... by paulcarroty on Thursday June 06, 2019 @02:24AM (#20112071)
You can use it, yep, but devtools aren't enough. You'll meet a lot of issues sooner or later. Windows is second-class citizen for Node, Linux or macOS are much better - just share my experience.
Re:macOS deprecating scripting language runtimes, including ... by underwater on Thursday June 06, 2019 @04:11AM (#20112517)
Being a second class citizens is very different from being a nightmare. I've been able to build some fairly complex apps (TypeScript, Next.js, Relay, SQLite, Express) without running into any issues at all, and if I do hit a roadblock I know I can bail out to WSL or a VM.

The experience isn't as nice as macOS, but it's not terrible by any stretch.

Re:macOS deprecating scripting language runtimes, including ... by nailer on Thursday June 06, 2019 @06:48AM (#20113243)
Personally I moved to Windows about 2 years ago, have been developing node all day during that time and deploying on Linux. It's been great since about node 8. What have your issues been?
Re:macOS deprecating scripting language runtimes, including ... by smashedtoatoms on Thursday June 06, 2019 @08:28AM (#20113856)
Same. Wsl is great. Running ides in wsl even works great, but with vscode, I don’t even do that much anymore. It’s like being on Linux for dev, but having Windows for power management, high dpi settings, drivers, etc. It’s working great, hardware selection is nice, games work. I’m really digging it lately.
Re:macOS deprecating scripting language runtimes, including ... by paulcarroty on Thursday June 06, 2019 @03:06PM (#20117935)
> power management, high dpi settings, drivers, etc.

Have the same stuff working on Linux and deploy anything without VM/WSL/telemetry/etc. Guess similar situation with macOS.

Re:macOS deprecating scripting language runtimes, including ... by e12e on Thursday June 06, 2019 @11:22AM (#20115393)
> Ruby on Windows is a nightmare.

Nightmare? No. Suboptimal? Yes.

We're running some legacy rails 3.2 against oracle db on windows, and it works well enough. It sure is a lot more pleasant on linux, though.

Biggest challenge on windows is to get a c compiler working/get binary dependencies working. Other than that, you need a version manager (same for other platforms really, unless you're aiming to shoot yourself in the foot).

Ruby on windows is definitely not great, but "nightmare" is a bit much.

Re:macOS deprecating scripting language runtimes, including ... by JohnBooty on Thursday June 06, 2019 @12:46PM (#20116293)
We probably agree on an objective level. I would agree with you that nearly all of it works nearly all of the time.

But that's my idea of a nightmare - when things are suboptimal and you're often scrambling for solutions on a second-class platform. When I say "often" I don't mean "every day", but in my experience it happened enough to make me swear off Rails on Windows forever.

Of course maybe 5.x is different. My experience was in the late 3.x and early 4.x days

Re:macOS deprecating scripting language runtimes, including ... by jjgreen on Thursday June 06, 2019 @06:37AM (#20113186)
> Ruby on Windows is a nightmare.

It hurts when I do this ... [punches self in face] ...

[dead]
Re:macOS deprecating scripting language runtimes, including ... by pjmlp on Thursday June 06, 2019 @07:16AM (#20113382)
Hint, not every OS is an UNIX clone. Thankfully.
Re:macOS deprecating scripting language runtimes, including ... by C1sc0cat on Thursday June 06, 2019 @07:16AM (#20113378)
Perl and CPAN works well enough on windows :-)