Live data from Hacker News

Unix is both a technology and an idea

utcc.utoronto.ca

71–80 of 97 posts

Re: Unix is both a technology and an idea

#71

Earlier quoted context omitted.

Point taken, but there's nothing prohibiting commands from outputting their data in a different text format that's better suited for tree-like data (like JSON), and another set of minimal commands which processes JSON-formatted data - easy extensibility by the user is also part of the "UNIX philosophy". That's also the point where I'd reach for Python or Deno/TS to write such command line tools, because both Bash and…

JSON would be better, true, but PowerShell actually has objects, so dates are actually dates and not just a string containing a date. So you can actually do timezone conversions and calculations on what you get directly, rather than having to feed the date string into a parser. But yeah, JSON would be a good start. But for some reason there seems to be little interest even in that. Wouldn't it be nice to have `df --j…

Honest question: How do you do discovery on PowerShell objects?

That is, with the Unix approach, when I'm trying to do something ad hoc I can do one step of a pipe, read the results on the terminal, see what the format is, and figure out how I have to set up the next step of the pipe. How do I do that with PowerShell?

Re: Unix is both a technology and an idea

#72

Earlier quoted context omitted.

JSON would be better, true, but PowerShell actually has objects, so dates are actually dates and not just a string containing a date. So you can actually do timezone conversions and calculations on what you get directly, rather than having to feed the date string into a parser. But yeah, JSON would be a good start. But for some reason there seems to be little interest even in that. Wouldn't it be nice to have `df --j…

Honest question: How do you do discovery on PowerShell objects? That is, with the Unix approach, when I'm trying to do something ad hoc I can do one step of a pipe, read the results on the terminal, see what the format is, and figure out how I have to set up the next step of the pipe. How do I do that with PowerShell?

Pipe it through Format-List:

    C:\Windows> Get-Item .\explorer.exe | Format-List
This gives you the generally useful view of what Get-Item returned. You can ask to see everything with:

    C:\Windows> Get-Item .\explorer.exe | Format-List -Property *

Tab completion also completes these. Some of what you get can be subdivided further if you look, eg:

    C:\Windows> (Get-Item .\explorer.exe).VersionInfo.FileVersionRaw | Format-List -Property *

Re: Unix is both a technology and an idea

#73
post #23

This article just keeps repeating the two concepts of Unix technology and Unix ideas but doesn't clarify what they mean by either. The links, seemingly complaining about iOS or Android, don't really seem to clarify. It seems many want Unix technology or ideas to be about what Unix meant in the 70s and 80s and don't have much interest in moving things forward from that plateau. (To be clear, I think all the major oper…

It gave me the "What did I just read?" feel.

Re: Unix is both a technology and an idea

#74

Earlier quoted context omitted.

JSON would be better, true, but PowerShell actually has objects, so dates are actually dates and not just a string containing a date. So you can actually do timezone conversions and calculations on what you get directly, rather than having to feed the date string into a parser. But yeah, JSON would be a good start. But for some reason there seems to be little interest even in that. Wouldn't it be nice to have `df --j…

Honest question: How do you do discovery on PowerShell objects? That is, with the Unix approach, when I'm trying to do something ad hoc I can do one step of a pipe, read the results on the terminal, see what the format is, and figure out how I have to set up the next step of the pipe. How do I do that with PowerShell?

Use Get-Member. For example, to find all available properties of the service object:

     Get-Service | Get-Member
Also, Format-List and ConvertTo-Json can show you a lot of details

Re: Unix is both a technology and an idea

#75
post #49

Earlier quoted context omitted.

It's a system inside a system shipped as an app, isolated from other apps and with no integrations with the wider operating system. It's not far from WSL or a VM.

It forks and execs new programs using the actual Linux system calls. It's a real Linux terminal emulator that opens and drives /dev/ptmx. Not sure what else it needs to be a real Linux. Termux is very well integrated. Termux:API allows access to phone sensors, location and cameras, sharing data with android apps, issuing notifications... All from the command line. Things like xdg-open work fine.

There is a reason why you cannot install Termux any longer via the Play Store, those APIs aren't allowed as public APIs.

Re: Unix is both a technology and an idea

#76
post #24
post #12

Those that keep trying to make a point of Android being UNIX, never really shipped anything on the Play Store. Yes, it uses the Linux kernel, and several components born on the Linux world and that is about it. Only Google and OEM partners get to see that layer, and those that root their devices. Nothing on the Android userspace, the Java and Kotlin frameworks, or the NDK official APIs have anything to do with Linux…

I wonder how much of the hate Windows gets is simply because Windows has nothing to do with Unix's bloodlines and heritage. Aside from cursory accomodations like the Microsoft POSIX Subsystem (what we would in theory call Windows Subsystem for POSIX if it existed today), that is.

My disdain for Windows has nothing to do with that. It comes from trying multiple operating systems. From a development and usability I do not find Windows to be good. From personal usage, IT management and consulting, Internet hosting, and development in full stack, desktop, service, and embedded applications.

Open file locking built in to the OS is not a good feature. Sysadmin days of having to wait and delete an empty folder because Windows Explorer keeps the thumbs.db locked with no other files in the directories. Where UNIX environments let me delete an open file, replace it, or rename it. Nothing like downloading a PDF, having to rename, because it's file name is a GUID. Renaming it based on the PDFs title, in Windows, requires using notepad to type the new file name, close the PDF, and then rename. UNIX removes the need for notepad or a text editor to do this, just rename it while viewing it.

Means to run a service and also have that service run a GUI application as the currently sign in user is simple in Unix where Windows requires a bunch of API hoops to perform. Recommend reviewing Ultra VNC source code it this needs to be done.

Winforms and WPF touch event design is broken. Had to circumvent the API for standard message pump parsing to work around faulty drivers and WPF latching on to UI elements while the fingers have left the screen.

Having hit edge cases where Windows backwards capability breaks with new features. Had to hack a virtual keyboard means to work around. SetForegroudnWindow() brakes with UWP and while operating Windows in tablet mode, needed since main applications run a touch screen without any other physical inputs. This would be BringToFront() in Winforms too. This edge case is not listed in Windows documentation too.

Irony is that Windows 10 in tablet mode has the best All Applications display by utilizing the whole screen versus standard desktop mode with single column infinite scrolling.

The registry just a bad design. No way to recover a corrupt hive unless there is a backup. Where UNIX configuration files are easy to re-construct if they get corrupt. Never had a UNIX system that could not be revived where Windows must be re-installed.

All of this grew out of continual use with using DOS to Win 3.1 to Win 10 and recently trial of the terrible Win 11 regressions. Cannot event place the taskbar at the top of the screen like Windows 95 to Windows 10.

You have to pay me to use Microsoft Windows.

Re: Unix is both a technology and an idea

#77
post #8
post #6

Earlier quoted context omitted.

Yup, I cited that Unix vs Google video in my post The Internet Was Designed With a Narrow Waist https://www.oilshell.org/blog/2022/02/diagrams.html A narrow waist is an idea or interface that gives you O(M x N) functionality for O(M + N) code. It's a way to reuse code and data by interoperating. If you can't interoperate, you end up writing bad versions of the same application code, over and over again. More concrete…

Is there a linux OS (or two?) in google3? google3 vs windows might not be a reasonable comparison, than say google3 vs windows + office + azure + dozens of other Microsoft products.

Yeah it's not really a good comparison, but I guess my point is that when you have that much code, it's not a surprise that it's hard to get work done, and the products work poorly

Re: Unix is both a technology and an idea

#78
post #3

Android is a great NEGATIVE example of the Unix philosophy! The code is based on the Linux kernel, which might make you think it's Unix, but isn't Unix [1] An OS is where 3 things meet: code, data, and people. AKA apps, files, and users. AKA CPU, storage, and networking when viewed from hardware (in the old days, you'd have terminals and serial ports, not Internet) I'd argue that (if you take away the historical "hai…

I'm having trouble understanding what he's criticising in that Mastodon post If he's saying he doesn't have sufficient OS access rights to his files, surely the existence of a "Files App" (aka a file explorer, hardly new) disproves his claim. Android also has multiple-choice file associations just like a desktop OS If he's complaining that the formats are opaque, or that we keep reinventing very similar CRUD apps, th…

I haven't used the Files app in awhile, but I think it might have special permissions? I know I had a real hard time deleting music to free up space

(As mentioned, I don't think the Unix security model would have been enough -- not even close, it's a hard problem)

I think the problem is that APPS own data, not USERS

This is a bit incoherent. Like the Amazon Music app has its own private data area to store files. And then I can put my own mp3s on my phone, but that experience sucks.

And those files are in no way related to the Amazon mp3s.

A related thing is that Android doesn't seem to expose USB drives as files -- it's a custom protocol now, and you need a custom app on Ubuntu/Windows/OS X.

I don't even remember -- the experience was so bad, that I stopped trying to use Android that way

---

I mean Windows is a bit like this too. It's full of bespoke/proprietary files that you're not supposed to touch. It's commercial, so it's code-centric, not data-centric.

Unix is data-centric. Your files come first, and then you can use different programs to open them and manipulate them.

As a real concrete example, see this restoration of a Flash video game -- it has different programs for code, visual assets, audio assets, etc.

I Still Use Flash from 8 months ago -- https://news.ycombinator.com/item?id=34079543

My comment - https://news.ycombinator.com/item?id=34082894

This is beautiful!

You could argue that the Unix data-centric model got pushed into the developer niche, and end users have chosen the app-centric model. But I would say there are tons of computer-literate people out there (making Minecraft mods, professors doing experiments, etc.) who are limited by the app-centric model.

Computers could just do a lot more, but you have to wait for the person who owns your data to implement the features you want (e.g. the whole Adobe ecosystem, Autodesk ecosystem, Google sheets, docs, and more)

Re: Unix is both a technology and an idea

#79

Earlier quoted context omitted.

iOS is also a UNIX btw ;)

I don't believe that's correct. MacOS has been a certified UNIX for ages, but to my knowledge Apple have never claimed nor sought to have their "smaller" operating systems certified as UNIX. https://www.opengroup.org/openbrand/register/

By that definition most Linux distros aren't UNIX either though - which is a bit silly.

Re: Unix is both a technology and an idea

#80
post #75

Earlier quoted context omitted.

It forks and execs new programs using the actual Linux system calls. It's a real Linux terminal emulator that opens and drives /dev/ptmx. Not sure what else it needs to be a real Linux. Termux is very well integrated. Termux:API allows access to phone sensors, location and cameras, sharing data with android apps, issuing notifications... All from the command line. Things like xdg-open work fine.

There is a reason why you cannot install Termux any longer via the Play Store, those APIs aren't allowed as public APIs.

yet the existance of these api's serves as an example as to why android can be classified as a unix
Post reply on HN