TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Tour of the Oil Language

159 点作者 dmart超过 3 年前

10 条评论

bscphil超过 3 年前
I&#x27;m interested in and excited about oil, but three things have stopped me every time I&#x27;ve tried to give it a go.<p>1. The complete and utter lack of useful documentation. There&#x27;s not even a link to any docs from the main page of the shell&#x27;s site. You have to get to the docs from the release page, [1] but I had to find this out by Googling. Given the number of blog-post-like entries in the docs, seems like it would have been less effort and more effective just to write standardized and complete documentation from the start.<p>Just as an example: can anyone tell me what built-ins Oil has, how to use them, and where they are documented? I&#x27;ll give you a hint. I found out from one of the blog posts that oil has &quot;min&quot; and &quot;max&quot; commands. The following is valid Oil code:<p><pre><code> const x = min(1, 2) </code></pre> But what other commands does Oil have, and how do I use them? I have no idea. Some of the doc pages 404 so maybe they&#x27;re supposed to be there. I have found <i>some</i> pages listing built-ins which are mostly undocumented, but none of them list min or max, so I know they&#x27;re not complete.<p>2. It&#x27;s still pretty buggy and lots of features are missing. Development has seemingly moved slowly over the last several years. If it ever did get to the point where I could make it a daily driver then I&#x27;d be willing to track down and report bugs, of course.<p>3. I&#x27;m a little concerned by how much emphasis is put on POSIX &#x2F; Bash compatibility. Unless there&#x27;s going to be a way to <i>fully</i> disable what Oil considers &quot;legacy&quot; language support in a script, then that is going to leave a ton of footguns for people who want to write &quot;modern&quot; Oil code. It&#x27;s not clear to me whether that&#x27;s the plan or not (I haven&#x27;t read every one of the blog posts), but it seems like a mistake to me to sacrifice possible syntax improvements on the altar of compatibility.<p>To be clear, I realize this is basically someone&#x27;s solo project, and I am impressed by how far it&#x27;s been taken, just clarifying why I don&#x27;t think it&#x27;s ready for general use yet.<p>[1] <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;release&#x2F;latest&#x2F;doc&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;release&#x2F;latest&#x2F;doc&#x2F;</a>
评论 #28548193 未加载
评论 #28546811 未加载
评论 #28547185 未加载
frazbin超过 3 年前
Super duper excited about this and have been for the past five years. Awesome to see things coming together.. good things take time! This guy is singlehandledly trying to elevate shell, revealing its secret beauty and immense power. My favorite thing is his obsession with bash backwards compatibility-- it has led him to get super deep into the bash parser. Unrelated but useful by the same person: Bernstein chaining of ssh and su: <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2017&#x2F;01&#x2F;31.html" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2017&#x2F;01&#x2F;31.html</a>
otoburb超过 3 年前
Note that the Oil shell is also bash-compatible [1]. This project (new shell intepreter and shell language) is not lacking in ambition, that&#x27;s for sure. Not a heavy shell user myself but will be trying oilshell on some sandbox instances in the near future.<p>[1] <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;cross-ref.html?tag=osh-language#osh-language" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;cross-ref.html?tag=osh-language#osh...</a>
评论 #28545728 未加载
teleforce超过 3 年前
The progress of Oil Shell is looking really good and hopefully it can reach the stable 1.0 version soon.<p>I&#x27;ve been following Oil Shell for several years now by reading the blog articles. The fact that it has managed to adopt and adapt some of the best features of other popular (mostly) dynamic programming languages into a cohesive scripting language and at the same time being backward compatible with Bash is amazing.<p>Recently there was an HN post and discussions on Linux Router unified command written entirely in Bash [1]. When reading the discussions, the first thing that come to my mind was that it will great if this can be somehow re-written in Oil Shell. But why stop there? What I&#x27;d like eventually is a seamless wrapper that maps the native related Linux tools in Oil Shell that can provide similar Cisco IOS like commands, configs and interfaces. It can then fashion the Linux kernel into a glorious network OS without writing extensive separate native networking system services as Quagga, LiSA or Cisco NX-OS. Heck the entire NX-OS can probably be cloned with Oil Shell on top of vanilla Linux kernel and eBPF. Before someone pointed out that what so special about Cisco IOS, it is by far the most popular network OS conventions to the networking professionals, and most of them are very familiar with the configs and commands. Due to the increasingly popularity of containers and Kubernetes, robust Linux networking configuration and automation tools will be at the center of this latest trend. Always remember that Linux once started life as a poor&#x27;s man clone to the very popular UNIX System V itself.<p>[1]<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28512768" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28512768</a>
评论 #28558927 未加载
kungfufrog超过 3 年前
I see Oil and oilshell posted here somewhat regularly.<p>Is anyone using it and can relay their experiences?<p>Is it ready to be used as a daily driver?
评论 #28548950 未加载
评论 #28547310 未加载
omgitsabird超过 3 年前
<p><pre><code> var person = &#x27;alice&#x27; echo &quot;hi $person, $(echo bye)&quot; # =&gt; hi bob, bye </code></pre> This is a strange language that turns alice strings into bob strings (quoted from article)
评论 #28547493 未加载
评论 #28547010 未加载
评论 #28546953 未加载
munk-a超过 3 年前
For google-ability did you really need to occupy Oil Shell when Shell Oil is very much already a thing?
评论 #28546965 未加载
评论 #28545624 未加载
评论 #28546899 未加载
fmakunbound超过 3 年前
Will oilshell have job control? I couldn’t quite tell. A lot of small shell projects seem to neglect it.
评论 #28551231 未加载
chartpath超过 3 年前
Oups, title wasn&#x27;t an English translation of langues d&#x27;oïl!
jimmyed超过 3 年前
The tech aside, this is horrendous naming! The oil language puts in my mind the image of &quot;oily greasy hair&quot;, commonly associated with someone sly and contriving.
评论 #28549243 未加载
评论 #28549208 未加载
评论 #28552112 未加载
评论 #28547297 未加载