Hacker Newsnew | past | comments | ask | show | jobs | submit | arogozhnikov's commentslogin

Robotic planning of liquid handling. There are many potential alternative ways to achieve the same result, each resulting in its own computation graph.

I imagine any kind of trajectory planning for many agents faces similar challenges (e.g. robots in a factory).


But these computation graphs are similar every time. You would/should write these as a small graph with conditionals on large tensors, not as a fast changing graph of scalars. The latter will always be slower when you have an accelerator like a GPU.


> But these computation graphs are similar every time.

For now I'm testing one-after-another because failure of previous (overflow, too-small-transfer, etc) gives a hint about which part can be changed in the graph.

I've been thinking about vectorizing over multiple guesses at once, but don't see a fast reliable way to merge several graphs (also that induces significant burden on other parts of the project - autograd is just one component).


same for me


sums it up pretty well


ok, I understand now my question got misinterpreted, I'll rewrite that.

CLI parsing (mapping to real calls) may have bugs. How do you test this?

Both options suggested eliminate this possibility completely.

> one of their core advantages is ease of automation and testing.

Any example when suggested options are any worse in this sense?


I guess our conceptions of CLIs are different. I wasn't thinking of developing complex textual formats that need to be parsed as input to a CLI program, I was thinking more like simple flags like `--do-operation=value` as opposed to a button in a GUI doing the same thing. If you have a function you want to call named foo() it should be pretty easy to just look for a `--foo` flag and run it. The problem becomes trickier if you have to parse some inputs from text. However, most CLIs I've seen for third party services use mostly simple flags, each of which corresponds to some simple operation. They may take an arg or two (e.g. `cli-client --foo 34 --title "Hello"`). If there is a more or less one-to-one mapping between functions and CLI flags, then it should be pretty easy to test. Testing a full-on parser for complex CLI commands is definitely harder, though.


> then it should be pretty easy to test.

If it is that simple, you can just devote this to package like typer. That's what I point to - don't write it.

I see people somehow read GUI along the lines, while I never even considered that as an option. Added a note and please read completely before commenting


+1 for reading post


> Agree the CLI "shell" around the system should not have separate logic

that was the main point.

> should report back logic faults from within the library

And I suggest validating parameters passed to functions.

So what's this you disagree with?


I share @ezekiel68 feeling. Your solution to replace CLI parameters with code is a terrible idea...

1) CLI support is an additional logic in your program that makes no real work

CLI is a user interface, it does real work as giving user way to interact with your program. It's an interface.

2) Error (exception) handling with CLI is very poor. Another layer of (bad faulty) code is required to make it possible.

Like with any other code. That's why you should to test it (like any other code).

3) Scaling/extending is not as easy compared to programming language APIs (see example in the end)

It's much easier. At least to my wife, who isn't programmer, but can use shell.

4) CLIs are detached from essential code, which in most cases is disadvantage.

What cases?

5) Forcing users to use CLI means: stay away from my code, you’d better not work with it.

Why having CLI would have to force the user to not use the library (if it is intended to be a library, not a stupid tool)

To sum up:

API != User Interface. API = Programming Interface.

Two different goals, two different sets of requirements. You can't just reduce one to another.


> API != User Interface. API = Programming Interface.

That's where we should start, but the other way around. Why do you keep trying to replace programming interfaces with bash calls?

Any example when calling cli compared to proposed alternative makes any difference to your spouse?


Mostly because user interface is meant to expose the common tasks to the user vs API which is supposed to give a low level control. curl is a good example, as a tool is fairly accessible, but as the library it gives control on all the aspects of connection, requiring much more knowledge/skill from the programmer. Not every user has this kind of knowledge, but still may want to use curl to do quick HTTP requests.

User != Programmer

Also, "bash calls" are cool - shell is a great tool to compose many diverse tools written in different programming languages. If all the tools were just configurable via writing code in their implementation language: 1) you would have to know all the programming languages 2) you would have to somehow input the code, parameters are just shorter than code


It looks new - but is it any more complicated if after all that's what your call maps to?


It is easy only if you write CLI utility (or somewhat very light-weight).

Imagine you write ASR system (from CLI input to output - week(s) of training, requires several servers). Mind telling me more about using diff/stdin/stdout in this case?

Well, forget ASR, take any ML system.


+1ed the issue. I was sure that's a problem on Safari side.


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

Search: