Hacker News new | past | comments | ask | show | jobs | submit login

> JSON, YAML, XML, protobuf, msgpack, etc. not objects.

JavaScript Object Notation doesn't map well to objects?




An object should have identify, state and behaviour. JSON only encodes state.


On the other hand, for interoperability, passing around behavior is horrible. It's either a security risk or a compatibility (forward/backward) risk or both.

We should try to pass around just state and keep objects strictly for code.


Right, I'm not really familiar with PowerShell, but my understanding is that the objects in object pipelines are literally .NET objects with methods on them.

So the entire shell script is confined to the .NET VM?

In that case, I would hesitate to even call it a shell in the traditional sense.

Shell has a kind of code <-> data <-> code <-> data architecture, i.e. programs in different languages processing standard language-independent data formats (lines of text, JSON, HTML, QSN, etc.)

It's more like functional programming, where functions stand alone. (And note Oil is in a very OO style, because it deals with significant program state, so I'm not against objects. Right tool for the right job.)

-----

Other questions:

What if I want to pass some data to R and plot it? Or throw away some outliers with a little formula? I now have to figure out how to serialize those objects. Or do I have to write an R interpreter for the .NET VM? :)

What about splitting the pipeline over two different machines? I can do "ssh user@host find / -type f" trivially in shell. And I do this in practice, e.g. in Oil's continuous build: http://travis-ci.oilshell.org/jobs/

"Distributed objects" have proven to be a bad idea. "Real" (large scale, deployed) distributed systems are architected more like Unix than Windows.

The point of shell is to integrate disparate tools, so if there are some privileged tools in the .NET VM, and then some other tools that require a lot of work to get at, then that misses the point IMO.


I think you need to go actually spend some time with powershell before you make more assumptions about it and it's behavior.

> Shell has a kind of code <-> data <-> code <-> data architecture, i.e. programs in different languages processing standard language-independent data formats (lines of text, JSON, HTML, QSN, etc.)

Powershell natively understands these with builtins. You can convert from and to json, xml, html, csv, and excel.

> What if I want to pass some data to R and plot it?

Just pipe it to your R program like you would any other shell.


No, have you seem what kind of mish mash of a scheme most systems output? They'd be back to text processing anyway just making sure it returns the expected values.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: