3 ms·
In some lispmachine demo by .. I forgot his name (~~amir gupta?~~ kalman reti) he talks about that aspect. Unix serializes everything to strings, while lisp mac
by agumonkey 6y ago
In some lispmachine demo by .. I forgot his name (~~amir gupta?~~ kalman reti) he talks about that aspect. Unix serializes everything to strings, while lisp machines just pass pointers around. Obviously simpler and faster but maybe less easy to move across machines (I'm speculating). I've always been saddened by the neverending amount of grep/perl fu needed in unix to do the same thing over and over.
Similar feeling when using powershell, a lot of benefits of having a uniform set of interfaces for any kind of object. That said it feels a little straighjacketing compared to crunching strings.
https://www.youtube.com/results?search_query=lisp+machine+kalman https://www.youtube.com/results?search_query=lisp+machine+ka...
- TeMPOraL 6y agoYeah. I love PowerShell conceptually, but at least in practice, it's cumbersome to exploit the object-based nature. Arguably this is only a UX problem. Say I want to kill all notepad.exe instances. I open PS, and do: Get-Process -Name notepad (Thank you autocomplete for reminding me about -Name parameter). Now how do I kill it? Lemme see what I'm getting: Get-Process -Name notepad | Get-Member Aha! It says the object has a `void Kill()` method. But how do I invoke it on each of those? If I do a lot of this, I'll probably remember[0]: Get-Process -Name notepad | ForEach-Object { $_.Kill(); } Awesome. With Tab-completion, not that cumbersome for common tasks, but it's annoying at discoverability. I have to do that Get-Member dance for each new command / type of object I'm working with, just to know what properties and methods are there for me to use. The UNIX equivalent would be something like[1]: kill $(ps aux | grep '[n]otepad' | awk '{print $2}') But the difference is, I can get arrive here by just knowing grep, awk, and seeing the output of ps. I don't have the extra step of having to inspect the particular type of objects being returned by a command. In UNIX, I have to write parsers for everything, but parser-writing tools like grep, sed and awk are generalizable across all problems, and with them, I can massage any output I see on screen into valid input for a command I want to use. Every complex command I do uses the same set of knowledge. PowerShell could use exposing the internal objects more, to bridge this gap. That would require something more complex than linear terminals we're used to - something that would give user an IntelliSense or point-and-click quality. At the very least, it should start exposing API documentation (i.e. descriptions, not just function signatures) in Get-Member[2], but preferably it should have IntelliSense popups telling you about the type you can expect from a command (or that you just got), and what you can do with it. PowerShell ISE is 20% there. My dream would be something McCLIM-like - that I could point at any piece of human-readable output and jump straight to the property that it represents. -- [0] - Yes, I know there's a simpler variant for this case, but I'm showing the general pattern for an arbitrary object collection. [1] - Again, I know there's `killall'. [2] - Hell, they should start shipping the documentation with default installation. As it turns out, Get-Help can't help you much until you let it download the documentation package on first use. Which was super-annoying when I had to do some PS work on a VM with no direct Internet access.
- agumonkey 6y agoyes I think it boils down to having to know MS mental model of objects before being able to leverage it while unix and strings have no model, you're free to extract structure and data as you see fit (shooting your foot or not). Text is always kinda unbounded in possibilities but requires you to do a bit more work on your own.