> I was a bit concerned to hear someone call the export to wsk format as "old > school" That implies that there's a plan to deprecate the current CLI and > that this OWShell is the new way to write all OpenWhisk applications. Is > this correct and if so, is OWShell completely scriptable via bash and > Windows PowerShell so that it can be automated? It's neat that you can > paste into OWShell, but that's hard to do in CI environment. >
let me try to clarify that, eliminating any room for misinterpretation: I think 'old school' was a poor choice of words. There is *NO* intent to deprecate the current cli -- it's absolutely strategic. The OW shell tool is at the moment an exploratory effort by the IBM research team to explore complementary user experiences, but this doesn't impact in any way the role of the 'standard' cli. From: Nick Mitchell <[email protected]> To: [email protected] Date: 08/04/2017 04:25 PM Subject: Re: OpenWhisk shell tool Thanks rob for the great questions! > This new shell thing seems to be its own app. How accessible is it for > people who can't use a mouse and need to drive it via keyboard only? > > it can be used entirely without a mouse. for example, to open and close the sidecar, use the Escape key. history can be navigated either with arrow keys, or emacs cursor navigation (Ctrl+P, ...). > It looks like an interactive thing like Swift Playgrounds with a timeline > history. I'm not clear if that that history list on the left is interactive > or if you can edit any of them arbitrarily and re-run them? > > there is a `history` command that lets you explore and re-execute elements of history, as you would with e.g. bash. > I can't work out how version control works with this tool. Do we save > documents of the timeline that we can reload? If we do, is it a text based > format for the saved file? > > the Shell does support multi-line pasting. it also has a `run` command that allows you to execute a sequence of Shell commands stored in a file. it does not as of yet have an `export` command, though there have been several thoughts in this direction! for example, to generate the docs page ibm.biz/wskshell, we have a `demo.wsk` file that contains the handful of commands necessary to generate the entire site. the demo.wsk file sits in a repo, under SCM. this is just one example of how we're doing things. i'm sure we'll find more and better ways as we go! > How would this work for production development with a team? > > truthfully, the Shell is so new that we don't have data points to give you a good answer on this one. can you help me, by clarifying what you think the production requirements are? i have answers, but would like to make sure i'm answering the right questions :) thanks! > It looks like it the shell has its own language, Is it documented? I'm > concerned that we're inventing a whole new language off the cuff... > > the Shell is exactly like the `wsk` tool, in that there are commands. yes, it is a langauge, of sorts, but they really are just commands. the Shell supports all of the `wsk` commands. it augments them either to add functions `wsk` does not have, or to offer an alternative syntax that is (perhaps) more appealing. e.g. a -> b -> c can be used to construct sequences, and the `let` command can be used to name the sequence... but you can also use `wsk action create --sequence a,b,c` if that form is more comfortable to you! > Related, how stable is this shell language? If someone writes a script in > OWShell, it's likely to continue to work in the future? Are we going to get > BC breaks in scripts that people publish (if they can publish them)? > > it is early, admittedly, so there are no guarantees. in the earlier days of OpenWhisk, i recall my scripts breaking every other day as `wsk` and the API stabilized... however, we have 689 tests at this point, so i would consider things to be fairly stable at this point. once (soon!) we open source it, then alternative command structures can win by vote/merit, etc.! It is JS only? i.e. does it exclude people like me who don't understand JS > and write their actions in the other languages? > > there is nothing javascript-specific about the Shell. the `let` syntax harkens to javascript, but it is purely sugar. we could quite easily add a `def` syntax for action creation, etc. the command structure is populated entirely via a hierarchical plugin architecture. more details on that soon. I was a bit concerned to hear someone call the export to wsk format as "old > school" That implies that there's a plan to deprecate the current CLI and > that this OWShell is the new way to write all OpenWhisk applications. Is > this correct and if so, is OWShell completely scriptable via bash and > Windows PowerShell so that it can be automated? It's neat that you can > paste into OWShell, but that's hard to do in CI environment. > the Shell is indeed scriptable, either via `run` from within the shell, or directly from bash. as to the future, ...., above my pay grade, but... my goal in making the Shell was to foster this very kind of discussion: what is the best way to program the serverless cloud? in my experience, this requires a REPL, and one with concise syntax, so that i can quickly and iteratively refine my understanding of the world. i don't want to write bash scripts for tasks that are common! bake those into a richer command structure, so that we, ALL of us, can benefit from the group's knowledge. the `let` command is an example of this, as is the `every` command. creating actions is more than just `wsk action create`. there are needs for inline/anonymous functions for simple schema aligners... periodic rules are quite syntactically complex with `wsk`. let's capture these common cases! this is a main point of the Shell. beyond richer commands, i feel that cloud programming also requires some visuals, because so much of the data these days is complex JSON that is a real pain to parse in one's head. and monitoring logs and activations are tasks that are quite well suited to visualizations. having to task switch into a different tool, with its own login/session systems... breaks my flow for what should be a 10 second side task. let's optimize these flows! > I'm a bit confused as to the status of this tool. There was mention of a > vague hope to OpenSource it, but it didn't sound very concrete or important > to the speaker. Is it proprietary to IBM? Will it work with other > installations of OpenWhisk? > > we will open source the core of this quite soon.
