-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add task/usage table to "getting-started" doc #1142
Comments
OK thanks, I think all the shebangs should be
|
There we have it again. Path security. I don't think Unfortunately, it can't be relied upon I think the only thing that may work is, limiting $PATH configuration and mutations to su/sudo/doas operations, and making these non-overridable. |
wiki updated The wiki formatting issue isn't nice, but I think it's worse not to provide any links to basics like the design principles and usage table from the hompage/getting-started. |
OK thanks, well the table is technically inaccurate now since we haven't done #1137 But yeah I think we should start that in the next release |
I've pasted a copy of the table above, to see a working html version, and I think you should also have write access to this issue's description. Could you tell for what reason was the title changed from "Oilshell Usage" to "Oil Usage"? I think the table specifically tries to discern the most basic different parts of osh and oil languages and interpreters for new users, it's not just about the oil interpretter and language. (The usage table is, at the same time, an overview of oilshell as a whole.) That's the sort of "mixing-things" I meant in #1127 (comment), which can make the docs seemingly easy to read but actually leaves the user only frustrated and confused later. Talking of the same word all the time doesn't help, rather the contrary. I used oilshell there to mean the whole thing that is osh and oil and can deal with a whole lot of different shell language stuff. I really do see a merit in using the shorter "oil" only for the language and its interpreter/setup. It's also really nice and short --and correct-- for the later day-to-day usage. But it seems much better to use three different words in the beginning, to talk about the three different scopes involved and better coming to grips with the project parts and migrating scripts.
PS: On the other hand, for the package name though it might actually be worse to use the shorter name, the slightly longer "oilshell" name is still short enough but provides more context and better search hits (as in broader and specific searches). |
s/sort of things/sort of "mixing-things"/ (...which I meant) |
Wouldn't |
Hm I don't understand the question ... |
Wouldn't |
In general the individual options should be "hidden" from "getting started" docs. They are a little scary and unfriendly. Hence the purpose of having all the recommended options bundled under |
BTW I think the table is generally good now, except the words on the LHS are not "crisp" enough. The RHS of the table is good and accurate. However I think it needs to be complemented by something with examples, like https://github.com/oilshell/oil/wiki/Gradually-Upgrading-Shell-to-Oil This is more of a "reference table", which is good and we should have it. But I think it needs to link elsewhere. I'm surprised the wiki doesn't work? It can also go in
In CommonMark you can put markdown inside HTML, like
It shouldn't be too bad for this table. |
Only editing the table did I realize the --line option to write affects only the $_line varible and is not needed for the line wise default mode, is that correct? Maybe that could be made more obvious by something that looks odd at first, but quickly telling after a second: |
Hm as far as the words
I think the way you've written I think the table could just be called "Using OSH and Oil" -- rather than "Oilshell Usage" |
Hm, but do you have a better idea? Because large parts of the confusion (and thoughs in the direction of "why's this guy writing so confusing stuff") I had can be related to talking about "oil" but really meaning different things. Somewhere (and probably at different places) it seems necessary to spell out that Oilshell means osh and oil. I don't think the common name would need to be used everywhere, that wouldn't be correct either. Talking about oil (language/interpreter) is often more precise (and the focus of the development and docs anyway). So, I think using "Oilshell" would not be necessary in too many places, but only in some crucial places, especially for newcomers. Probably only (and always) together with explaining the osh/oil parts. Let's see an example: Also: "legacy-free" may convey dropping a lot of compatibility, maybe "pitfall-freed" or "freed from shell-pittfalls" could describe that part of oil more positively.
I think that title is kind of is a crucial line to provide orientation to new users and made an update to the pull request, but maybe it's still improvable. Oilshell Usage through bin/osh and /bin/oil, or something? |
Ah, ok, "colloquial" name no, but the "overarching" one, useful to clear things up in the intro? |
With the current suggestion I tried to remove the awkwardness from the intro, explaining the first thing to "get-started" like this: Oilshell provides a multi-purpose interpreter runtime.
As of 2021, the OSH language is mature, and the Oil language is under development. |
Note that for a user that has heard or read about oil or oilshell, and goes straight to the website looking for downloads (or even was directly referred to downloads), I think the "getting-started" document is the first (and likely only eligible) place that allows to provide the basic overview to the user just once before it's too late to avoid confusion with mainly oil focused texts. (And it's also good for pointing users back to "getting-started" later on.) |
Yes, looks like the outcome of #1130, i.e. the new /doc/index, could be the best place to link to in the future and for gathering all the links. For the moment I've added https://www.oilshell.org/release/latest#Documentation (though the html anchor does not seem to work, currently). FWIW, creating Oil/OSH/Oilshell confusion should be pretty much be a thing of the past with just
|
That is too detailed for the home page ... (which is in the private blog repo, though I could make it public). The usage table is a good idea, but I still want to see the preview. (Also my feeling is that there are too many words there as well) In general I think you're overestimating how much people read documentation. I think the real issue is that people need to use Oil and write about it on their OWN website!!! i.e. languages spread socially. But yes there is a chicken-and-egg problem ... there are people who come to the project fresh, and sometimes they do try it out and read the docs About naming, I suggest using the words "Oil Project" and "Oil Language". I have been using "Oil language" consistently, and I use "Oil" whenever I mean the project. But "Oil project" is also OK. Actually that is in the title of the issue #1127 |
FWIW this command will extract the table ... but only the source text, not the rendered HTML.
But in general I feel like this is not rocket science; if you want an HTML table, then make an HTML table :) |
Who wants an html table? You mentioned CommonMark above. However, I only found some important introductory usage info that is missing in the documents presented on oilshell.org. Which I had to gather from elsewhere, and thus submitted it as contribution. I don't see the problem that you seem to have about previewing, it looks ok to me. |
CommonMark is basically a superset of HTML. So if you write any HTML, it can be pasted into a CommonMark doc (which all our docs are) So HTML tables are the way to do tables in our doc system. It doesn't have to be a table, though I agree it can be nice in many situations |
There, the line-breaks If submitted online contributions can't be tested (yet) directly in your toolchain, maybe it's possible you get/sync/fetch/pull? the published branch and check/apply/preview/adjust it out locally? (I'm not a software dev, so those git things are only hearsay for me.) |
I've polished things and just removed those. And at the top simply states: "The project provides..." (so no mismatching of any following terms). |
The usage table was temporarily in the wiki, but didn't render well there:
https://github.com/oilshell/oil/wiki/Oilshell-Usage-(The-table-missing-in-getting-started.md)
Usage (as osh and oil)
* Usually not even minimal quoting/spacing adjustments needed.
(Adjustments may only be required due to implementing the "Common Subset" of consistent and sane shell execution compatibility. For example, if a script was using an inconsistent associative array pattern, or relied on dynamic parsing.)
NB: By default, basic Oil language features without a side-effect beyond occupying namespace do already work as well (e.g.
const
/var
/setvar
incl. Oil expressions,read --line/all/qsn/-0/...
,write
, etc). So, these only break in other shells if not shipping a fallback.osh my.sh
Or, adapt script, and let it begin with:
#!/usr/bin/env osh
* Improved scripts will run with less errors in other shells.
NB: The example on the right enables all strict options at once, but individual strict_* options allow fixing issue by issue.
"shopt --set strict:all 2>/dev/null || true"
After that execute the script in osh:
osh my.sh
* Only a minimized amount of legacy code will need adjustments.
* However, adding new syntax/semantics to a script will drop compatibility with other shells.
(The adjustments needed in legacy code should mostly be just quoting/spacing, for disambiguation. Except, the requirement for proper error handling, and to add explicit split/glob functions to variables due to Simple Word Evaluation default. Of course only where variables were originally left correctly(!) unquoted and split/globbed.)
#!/usr/bin/env osh
shopt --set oil:upgrade
(Intersection of osh & oil & strict.)
#!/usr/bin/env osh
shopt --set oil:upgrade strict:all
* Implements all positive features of classic shells, compatibly.
* All identified pitfalls removed.
* Gracefully adding the best from Python, JavaScript and others.
(Everything parsed as Oil syntax. Only unavoidable Oil language warts remain.)
#!/usr/bin/env osh
shopt --set oil:all
Or, simply use:
#!/usr/bin/env oil
Related
The text was updated successfully, but these errors were encountered: