Re:Cross-platform Rust rewrite of the GNU coreutils
by pjc50 on Tuesday March 22, 2016 @12:21PM
(#11337646)
The rationale talks about easy portability to Windows, but I'm skeptical - the underlying API and filesystem is different enough that this is likely to cause problems. '\' vs '/' to start with.
[ Parent
| on HN ]
Re:Cross-platform Rust rewrite of the GNU coreutils
by Someone1234 on Tuesday March 22, 2016 @12:28PM
(#11337705)
Windows supports forward-slash fine. Has for at least 25 years. No need to change / to \ or visa versa.
Now obviously any Windows port would have to call Win32 APIs instead of POSIX APIs (unless you're writing for a Cygwin-like layer).
Re:Cross-platform Rust rewrite of the GNU coreutils
by 2Xheadpalm on Tuesday March 22, 2016 @12:56PM
(#11337922)
Supported, just but it's a second class citizen, for example, no tab completion of directories on the cmd prompt when using forward slash. Some commands will not except it;
e.g. type c:\home\foo.txt -> cats it out type c:/home/foo.txt -> 'The syntax of this command is incorrect.'
whereas cd will except either forward or backslash
cd c:\home/foo cd c:/home/foo
work as expected.
Re:Cross-platform Rust rewrite of the GNU coreutils
by Someone1234 on Tuesday March 22, 2016 @01:18PM
(#11338125)
Firstly I was talking about API support. Since that is the topic at hand.
Secondly, Cmd is deprecated. Powershell supports both slashes and "type c:/home/foo.txt" works perfectly.
Re:Cross-platform Rust rewrite of the GNU coreutils
by ktRolster on Tuesday March 22, 2016 @02:33PM
(#11338777)
But Powershell redirects < and > either don't work or can corrupt your files
Re:Cross-platform Rust rewrite of the GNU coreutils
by Someone1234 on Tuesday March 22, 2016 @03:14PM
(#11339177)
You might find this useful:
Re:Cross-platform Rust rewrite of the GNU coreutils
by ktRolster on Tuesday March 22, 2016 @09:27PM
(#11341420)
A) That's only one direction, the other way doesn't work
B) Even going that direction, at times it corrupts the data
Re:Cross-platform Rust rewrite of the GNU coreutils
by pjmlp on Tuesday March 22, 2016 @01:16PM
(#11338094)
Just use Powershell, it will work as expected.
Re:Cross-platform Rust rewrite of the GNU coreutils
by tacos on Tuesday March 22, 2016 @12:50PM
(#11337854)
You might want to review the Xamarin bug reports as the slash alone nearly put them out of business at least three times.
Re:Cross-platform Rust rewrite of the GNU coreutils
by BuckRogers on Tuesday March 22, 2016 @12:53PM
(#11337895)
I write a lot of single source Windows/OSX/Linux utilities and the nice thing about Windows is that back and forward slashes are interchangeable so you can just write for POSIX.
Re:Cross-platform Rust rewrite of the GNU coreutils
by keeperofdakeys on Tuesday March 22, 2016 @06:34PM
(#11340473)
Most languages (including Rust), already support path libraries that abstract this away from you. As long as you use these libraries properly, you should never have these issues.