Hacker News new | ask | show | jobs
by cxr 671 days ago
It looks like you did the sensible thing and used U+002F for path separator. Snover got this right when he did PowerShell and it stayed that way up through the open source releases. More recently someone fucked it up and started prescribing backslash for no good reason when you're using it on Windows, so now it goes so far as aggressively rewriting any paths you've typed in when you use Tab to autocomplete, replacing U+002F with U+005C.

I had a look at the project, and it doesn't look like anything like `if (os.platform.name().includes("Windows")) separator = '\'` is going on here, but I haven't done an exhaustive audit.

How do you the relationship between VirtualStorageLibrary and the relevant/analogous PowerShell subsystem(s)?

1 comments

Hello, Akira here.

Thank you so much for taking an interest in this project and for your thoughtful comments.

First, regarding the use of \, VirtualStorageLibrary is designed to be platform-agnostic, and there are no plans to tie it to any specific OS in the future. Therefore, you won't find any code like os. in this library. It’s a purely logical hierarchical object model inspired by file systems.

While the default separator is /, it's fully customizable. You can set it to any character you like, such as : or -, and of course, you can also use \.

Regarding the relationship with PowerShell subsystems, as of now, there is no functional integration between VirtualStorageLibrary and PowerShell. That means there’s no capability to import or export data handled by cmdlets—yet. However, there are indeed ideas for future versions that could involve collaboration with PowerShell. Although this is not yet detailed in the roadmap, I believe that being able to manipulate VirtualStorageLibrary via cmdlets would be a highly useful and interesting feature.

When designing VirtualStorageLibrary, I carefully examined the culture surrounding file systems both in Linux and in PowerShell. Although I’ve primarily been a Windows user, I’m also familiar with Linux, and I’ve always found its file system to be simple and elegant. That’s why I chose / as the default separator for this library.

For more information on customizing separators, please refer to the documentation here: https://shimodateakira.github.io/VirtualStorageLibrary/intro...

Please feel free to reach out if you have any more questions or feedback!