diff --git a/.github/workflows/lctt-article-checker.yml b/.github/workflows/lctt-article-checker.yml index 32d4354454..63b456aa9e 100644 --- a/.github/workflows/lctt-article-checker.yml +++ b/.github/workflows/lctt-article-checker.yml @@ -12,6 +12,8 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 + - name: ensure source branch is not "master" + run: '[ "${{ github.head_ref }}" != master ]' - name: "checkout master branch & return to pull request branch" run: CURRENT=$(echo ${{github.ref}} | sed "s|refs/|refs/remotes/|") && git checkout master && git checkout $CURRENT - name: run check diff --git a/published/20210619 Try quantum computing with this open source software development kit.md b/published/20210619 Try quantum computing with this open source software development kit.md new file mode 100644 index 0000000000..f4040abe93 --- /dev/null +++ b/published/20210619 Try quantum computing with this open source software development kit.md @@ -0,0 +1,117 @@ +[#]: subject: (Try quantum computing with this open source software development kit) +[#]: via: (https://opensource.com/article/21/6/qiskit) +[#]: author: (Gordon Haff https://opensource.com/users/ghaff) +[#]: collector: (lujun9972) +[#]: translator: (cool-summer-021) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15552-1.html) + +借助开源软件开发包尝试量子计算编程 +====== + +> Qiskit 是一个开源 SDK,借助它可以免费访问量子模拟器和硬件资源。 + +![][0] + +经典计算机是基于二进制数的,二进制数有 0 和 1 两种形式。这并不是由于二进制逻辑系统比有更多基本状态的逻辑系统(甚至包括模拟计算机)有内在优势。而是,对电路元件的开关操作很容易实现,而且借助先进的半导体技术,可以制造出体积小且价格低廉的计算机。 + +但它们并非没有局限性。经典计算机求解某些问题的效率并不高,主要是那些时间或内存成本随着问题的规模($n$)呈指数级增长的问题。我们把这种问题称为 $O(2^n)$([大 O 表示法][2])。 + +大部分现代加密方法甚至依赖这一特性。把两个大素数相乘,耗费的成本低($O(n^2)$),但进行反向操作就非常耗时。所以只要使用的数字足够大,对它分解质因数就非常困难。 + +### 进入量子世界 + +量子计算的基础数学和力学知识不在本文的探讨范围内。然而,还是有一些基础知识需要预先说明。 + +量子计算机以 [量子比特][3] 代替了二进制比特 —— 量子比特是体现量子属性的可控计算单元。构成量子比特的通常是超导元件,或自然界中存在的量子实物(例如电子)。量子比特可以以“叠加superposition”状态存在,叠加态是 0 和 1 以某种方式组合起来的复杂状态。你可能听说过,量子比特既为 1 又为 0,这种说法并不准确。真实情况是,如果进行测量,量子比特的状态会坍缩为 0 或 1。在数学上,量子比特未测量的状态可以看作 [布洛赫球面][4]Bloch sphere 的几何表示上的一个点。 + +尽管对习惯使用经典计算机的任何人来说,叠加态是一个全新的概念,但一个量子比特本身并没有什么趣味性。量子计算的第二个概念是“干涉interference”。真正的量子计算机本质上是统计性质的。量子算法对干涉图案进行编码,增加了可以测量编码方案的状态的概率。 + +叠加和干涉的概念虽然新颖,但在物理世界中也有对应的现象。而量子力学中的“纠缠entanglement”却没有,但它是实现指数级量子加速的真正关键。借助量子纠缠,对一个微观粒子的测量可以影响后续对其他被纠缠的粒子的测量结果 —— 即使是那些物理上没有关联的粒子。 + +### 量子计算能做什么? + +今天的量子计算机就其包含的量子比特的数量而言是相当小的,只有几十到几百个。因此,虽然人们不断开发新的算法,但比同级别经典计算机运行得快的硬件还未问世。 + +但是在很多领域,量子计算机能带来很大好处。例如,它能提供较好的方法来模拟自然界的量子系统,例如分子,其复杂程度超过了经典计算机的建模能力。量子计算也跟线性代数有关,它是机器学习和很多其他现代优化问题的基础。因此,我们有理由认为量子计算也可以很好地适用于此。 + +在量子算法相对于普通算法的优势方面,[Shor 算法][5] 是经常被提及的例子,它在较早时候就用于分解质因数。它由 MIT 的数学家 Peter Shor 于 1994 年发明,量子计算机目前还不能在较大的问题上运行该算法。但它已经被证明可以在 $O(n^3)$ 时间内完成工作,而不像经典算法那样需要指数级的时间。 + +### 从使用 Qiskit 开始 + +你可能在想:“我身边没有量子计算机,但我很想尝试一下。能做到吗?” + +我们来了解一下名称为 [Qiskit][6] 的开源项目(采用 Apache 2.0 许可证)。它是一个软件开发包(SDK),用于访问 IBM 量子实验室的量子计算模拟器和物理硬件(免费)。你只需要注册获得一个 API 密钥。 + +当然,如果要深入研究 Qiskit,需要很多其他方面的知识,线性代数只是其中一部分,这些都远远超出了本文的范围。如果你需要深入学习,网上有很多免费资源,其中也不乏完整的教科书。然而,体验一下也很简单,只需要一些 Python 和 Jupyter notebook 的基础知识即可。 + +为了增加趣味性,我们全程使用 [Qiskit 教程][8] 的 “Hello, World!” 程序: + +首先,安装教程的相关工具和部件: + +``` +pip install git+https://github.com/qiskit-community/qiskit-textbook.git#subdirectory=qiskit-textbook-src +``` + +下一步,进行软件包的导入: + +``` +from qiskit import QuantumCircuit, assemble, Aer +from math import pi, sqrt +from qiskit.visualization import plot_bloch_multivector, plot_histogram +``` + +`Aer` 是本地模拟器。Qiskit 包括四个组件:`Aer`、基础组件 `Terra`、用于实际的量子系统上的噪音和错误处理的 `Ignis`,以及用于算法开发的 `Aqua`。 + +``` +# Let's do an X-gate on a |0> qubit +qc = QuantumCircuit(1) +qc.x(0) +qc.draw() +``` + +虽然底层数学原理还涉及到矩阵乘法,量子计算机中 X 门也可以认为类似于经典计算机中的非门。(事实上,它经常被称为 "非门")。 + +现在,运行并测量它。结果跟你预期的一样,因为量子比特的初始状态是 `|0>`,接着反转,然后被测量。(使用 `|0>` 和 `|1>` 与经典计算机中的比特区分开来。) + +``` +# Let's see the result +svsim = Aer.get_backend('statevector_simulator') +qobj = assemble(qc) +state = svsim.run(qobj).result().get_statevector() +plot_bloch_multivector(state) +``` + +![Bloch sphere showing the expected result][9] + +*布洛赫球体显示了预期的运行结果* + +### 结论 + +在某些方面,你可以把量子计算看作用于经典计算机的一种独特的协处理器,跟 GPU 和 FPGA 一样。不同的是,在可预见的未来,量子计算机可以被用户像网络资源一样访问到。另一个差异是,它们的工作有本质的不同,所以不像很多其他你熟悉的加速器那样。因此,人们对算法开发如此感兴趣,并投入大量资源来研究量子在何时何地的性能最好。了解一下这些东西也无妨。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/qiskit + +作者:[Gordon Haff][a] +选题:[lujun9972][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ghaff +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) +[2]: https://en.wikipedia.org/wiki/Big_O_notation +[3]: https://en.wikipedia.org/wiki/Qubit +[4]: https://en.wikipedia.org/wiki/Bloch_sphere +[5]: https://en.wikipedia.org/wiki/Shor%27s_algorithm +[6]: https://qiskit.org/ +[7]: https://qiskit.org/learn +[8]: https://qiskit.org/textbook/preface.html +[9]: https://opensource.com/sites/default/files/uploads/bloch-sphere.png (Bloch sphere showing the expected result) +[10]: https://creativecommons.org/licenses/by-sa/4.0/ +[0]: https://img.linux.net.cn/data/attachment/album/202302/18/173656shxb63jjx9z5jwxl.jpg \ No newline at end of file diff --git a/published/20220204 How we hired an open source developer.md b/published/20220204 How we hired an open source developer.md new file mode 100644 index 0000000000..54b38e9e8f --- /dev/null +++ b/published/20220204 How we hired an open source developer.md @@ -0,0 +1,94 @@ +[#]: subject: "How we hired an open source developer" +[#]: via: "https://opensource.com/article/22/2/how-we-hired-open-source-developer" +[#]: author: "Mike Bursell https://opensource.com/users/mikecamel" +[#]: collector: "lujun9972" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15543-1.html" + +我们是如何聘请开源开发人员的 +====== + +> 我的团队不再采用标准的算法编程笔试,而是采用一套能够产出更多相关成果的流程。 + +![][0] + +作为初创安全公司 [Profian][2] 的首席执行官和联合创始人,我参与了我们聘请开发人员从事 [Enarx][3] 的工作。Enarx 是一个处理机密信息计算的安全项目,几乎完全用 [Rust 语言][4] 编写(少部分用汇编语言)。Profian 现在已经在这次招聘找到了所有要找的人,一些开发人员将在接下来的几周内开始工作。然而,Enarx 绝对欢迎新的贡献者,如果事情继续顺利,公司将来肯定会雇用更多的人。 + +招聘人员并不容易,加上 Profian 还有一系列特别的要求,这让招人变得更加困难。因此我认为分享我们如何解决这个问题应该还蛮有意思的,而且也会对社区有帮助。 + +### 我们寻找什么样的人才? + +以下就是我前文提到的特别要求: + +* **系统编程**:Profian 主要需要那些喜欢系统层编程的人。这一层面的编程已经处于栈的底层,有很多直接与硬件或操作系统的交互。例如,要创建客户端-服务器部分,我们必须编写相当多的协议、管理加密等等,而这方面的工具还不是很成熟(请参阅下面的 “Rust” 一节)。 +* **Rust**:项目几乎都是用 Rust 语言编写的,那些不是的则是用汇编语言写的(目前只有 x86 平台,尽管随着我们添加更多平台情况可能会有所改变)。Rust 是一门很新、很酷同时也令人兴奋的编程语言,但它同时也很年轻,并且一些领域没有你想要的所有支持或者没有你希望的那么成熟 —— 这包括从密码学到多线程库到编译器/构建基本架构。 +* **分散各地的团队**:Profian 正在建立一个能够及时通讯联系的团队。Profian 在德国、芬兰、荷兰、北卡罗来纳州(美国)、马萨诸塞州(美国)、弗吉尼亚州(美国)和乔治亚州(美国)都有开发人员。我在英国,我们的社区经理在巴西,我们有来自印度和尼日利亚的实习生。从一开始我们就知道团队很难聚集在一个地方工作,因此我们需要能够通过视频、聊天和(最不济的情况下)电子邮件与人交流和协作的成员。 +* **安全**:Enarx 是一个安全项目。虽然我们并不是专门在寻找安全专家,但我们需要能够将安全放在首位去思考和工作,并设计和编写适用于安全环境的代码的人。 +* **Git**:我们所有的代码都存储在 Git 中(主要是 [GitHub][5],还有一些存在 GitLab)。我们围绕代码的大部分交互都是围绕 Git 进行的,因此任何加入我们团队的人都需要能自如使用它作为日常工作中的标准工具。 +* **开源**:开源不仅仅是许可;更是一种心态,同时,这也是一种合作方式。大量开源软件是由不同地域的人创建的,他们甚至可能不认为彼此身处于一个团队。我们需要知道我们招的人不仅能在公司内部凝聚成一个紧密的团队,同时也能够与组织外部的人员协作,并接受 Profian 的“默认开放”文化,这里的开放不仅仅限于代码,还要有开放的讨论、沟通和文档。 + +### 我们是如何找到人才的? + +正如我在其他地方提到的,[招聘很困难][6]。Profian 使用多种方式寻找候选人,它们取得了不同程度的成功: + + * 领英招聘广告 + * 领英搜索 + * 特定语言的讨论板和招聘板(例如,Reddit) + * 外部招募人员(特别致敬来自 [Interstem][7] 公司的 Gerald) + * 口耳相传/个人推荐 + +虽然很难从质量方面判断这些来源如何,但如果没有外部招聘人员,我们肯定会在数量上苦苦挣扎(我们也有一些来自该途径的优秀候选人)。 + +### 我们如何筛选出想要的人才? + +我们需要按照上述的所有要求衡量所有候选人,但并非所有要求都是同等重要的。例如,虽然我们热衷于雇用 Rust 程序员,但那些在系统级别具有强大 C/C++ 技能的人也能成为团队里有用的一份子,因为他们能够很快掌握 Rust 语言。另一方面,熟悉使用 Git 是至关重要的,因为我们无法花时间去培养新团队成员,让他们跟上我们的工作方式。 + +你可能会觉得很惊讶,但强大的开源背景并不是必需的要求,在类似模式中工作的心态是必需的,而任何有开源参与历史的人都可能对 Git 有很好的了解。同理,在一个分散各地的团队中工作的能力这一条件上,我们认为有过任意开源社区的参与经历都会是个积极的指标,因为有如此多的开源项目都是由分散各地的人们完成的。至于安全这一条件,我们则一致决定这只是一个“锦上添花”的条件。 + +我们想让这个过程简单快捷。 Profian 没有设置专门的人力资源部门或人力职能,因为我们正忙于编写代码。以下是我们最终使用的招聘流程(实际流程中可能略有不同),我们试图在 1-2 周内完成招聘: + + 1. 初审:个人履历/简历/GitHub/GitLab/领英主页,决定是否面试 + 2. 我作为 CEO 和候选人进行一场 30-40 分钟的讨论,了解他们是否适合我们团队的文化,同时让他们有机会了解我们,并了解他们是否真的像在初审提交的材料中所说的那样精通技术 + 3. 由 Nathaniel 领导的有关技术方面的深入讨论,通常我也在场 + 4. 与团队其他成员谈话 + 5. 编码笔试 + 6. 快速决策(通常在 24 小时内) + +编码笔试很关键,但我们决定不采用通常的方法。我们的观点是,许多科技公司钟爱的纯“算法编码”笔试对我们想要的几乎毫无用处:考察候选人是否可以快速理解一段代码,解决一些问题,并与团队合作完成以上的工作。我们创建了一个 GitHub 存储库,其中包含一些几乎可以正常运行的 Rust 代码(事实上,我们最终使用了两个,其中一个用于技术栈上层的人),然后让候选人修复它,在上面执行一些与 Git 相关的过程,并稍作改进,在此过程中添加测试。 + +测试中一个必不可少的部分是让候选人通过我们的聊天室与团队互动。我们安排了 15 分钟的视频通话时间用于设置和初始问题,两个小时用于做笔试(“开卷”——以及与团队交谈,鼓励候选人使用互联网上所有可用的资源),然后是 30 分钟的总结会议,在这个会议上团队可以提出问题,候选人可以思考任务。这个谈话,结合笔试期间的聊天互动,让我们了解了候选人与团队沟通的能力。候选人挂断电话之后我们通常会在 5-10 分钟内决定是否要雇用他们。 + +这种方法通常效果很好。一些候选人在任务上遇到困难,一些人沟通不畅,一些人在 Git 交互方面做得不好 —— 这些是我们没有雇佣的人。这并不意味着他们不是优秀的程序员或者以后不适合该项目或公司,但他们不符合我们现在需要的标准。在我们聘用的开发人员中,他们的 Rust 经验水平和与团队互动的需求各不相同,但 Git 专业知识水平以及他们在和我们讨论之后的反应始终足以让我们决定接受他们。 + +### 感想 + +总的来说,我不认为我们会对筛选过程进行大的改动 —— 尽管我很确定我们可以在搜寻过程环节做得更好。通过编码笔试,我们可以筛选掉相当多的候选人,而且很好地帮了我们挑选合适的人。希望通过了这次选拔的每个人都很适合这个项目并且产出出色的代码(以及测试和文档等等)。时间会证明一切! + +* * * + +本文最初发布于 [Alice、Eve 和 Bob – 安全博客][8] 上,经许可后重新发布。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/how-we-hired-open-source-developer + +作者:[Mike Bursell][a] +选题:[lujun9972][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mikecamel +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) +[2]: https://profian.com/ +[3]: https://enarx.dev/ +[4]: https://opensource.com/article/21/3/rust-programmer +[5]: https://github.com/enarx/ +[6]: https://aliceevebob.com/2021/11/09/recruiting-is-hard/ +[7]: https://www.interstem.co.uk/ +[8]: https://aliceevebob.com/ +[0]: https://img.linux.net.cn/data/attachment/album/202302/16/074428qxbm44dxh00x42z7.jpg \ No newline at end of file diff --git a/published/20220510 Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store.md b/published/20220510 Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store.md new file mode 100644 index 0000000000..effbb408e2 --- /dev/null +++ b/published/20220510 Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store.md @@ -0,0 +1,70 @@ +[#]: subject: "Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store" +[#]: via: "https://news.itsfoss.com/kde-connect-ios/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15559-1.html" + +KDE Connect 登陆苹果应用商店,轻松将你的 iPhone 与 Linux 连接起来 +====== + +> 这是一个令人印象深刻的开源客户端,能帮你将手机与电脑连接起来,现在可用于 iPhone 和 iPad。快来试试看! + +![kde connect][1] + +KDE Connect 是一种开源工具,可让你将手机与电脑连接起来。 + +最初,KDE Connect 支持安卓设备与 Linux 连接。渐渐地,他们增加了对 Windows 的支持。 + +现在,看起来你可以使用 KDE Connect 让你的 iOS 设备(iPhone 或 iPad)连接到你的 Windows/Linux 计算机。 + +需要注意的是 macOS 也在支持的平台列表中。但是,它仍然是早期发布版本。因此它可能不如在其他平台上那么好用。 + +### 苹果应用商店上的 KDE Connect + +![][2] + +我们没有注意到任何官方公告。然而,一些用户发现 KDE Connect 在 [版本 0.2.1][4] 发布后,就出现在了 [苹果应用商店][3] 上供 iOS 用户使用。 + +苹果应用商店上列出了所有基本功能,包括: + +* 共享剪贴板:在设备之间复制/粘贴。 +* 能够从任何应用程序将文件和 URL 共享到你的计算机。 +* 将手机屏幕用作计算机的触摸板(可视触摸板)。 +* 远程演示模式。 +* 通过手机在计算机上运行命令 +* 端到端 TLS 加密以确保安全。 + +虽然 KDE Connect 依然是一个开源应用程序,但为符合苹果应用商店的要求,该应用程序的许可与 [OMGUbuntu][5] 所发现的有所不同。 + +同时值得注意的是,这里列出的功能可能与安卓版本不同,但至少我们终于为 iOS 用户提供了 KDE Connect,使其成为连接手机和计算机的真正开源跨平台解决方案。 + +我可以放心将 KDE Connect 推荐给任何想通过手机来对电脑进行操作的人。 + +点击下方的按钮即可前往应用程序商店开始安装。你还可以在其 [官方下载页面][6] 上找到针对不同支持平台的各种其他安装选项。 + +> **[KDE Connect(iOS)][3]** + +你试过 iOS 上的 KDE Connect 了吗?在评论区中让我知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-connect-ios/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1304/wordpress/2022/05/kde-connect-on-iphone-ipad.jpg +[2]: https://news.itsfoss.com/content/images/size/w1304/wordpress/2022/05/kde-connect-ios.jpg +[3]: https://apps.apple.com/id/app/kde-connect/id1580245991 +[4]: https://invent.kde.org/network/kdeconnect-ios/-/commit/43d2ecbbb7e4e70274849f5ec987721318eb9f57 +[5]: https://www.omgubuntu.co.uk/2022/05/kde-connect-iphone-app-available +[6]: https://kdeconnect.kde.org/download.html diff --git a/published/20220616 -It-s time to contribute to open source-.md b/published/20220616 -It-s time to contribute to open source-.md new file mode 100644 index 0000000000..ba0e84fd36 --- /dev/null +++ b/published/20220616 -It-s time to contribute to open source-.md @@ -0,0 +1,137 @@ +[#]: subject: "“It’s time to contribute to open source”" +[#]: via: "https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/" +[#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/" +[#]: collector: "lkxed" +[#]: translator: "XiaotingHuang22" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15555-1.html" + +“是时候为开源做贡献了” +====== + +![][0] + +Nilesh Vaghela 是 AWS 的社区英雄community hero,也是一家云计算开源公司 ElectroMech Corporation 的创始人。据 Nilesh 说,为开源做出贡献本身就是一种有意义的事。但是它需要人们的投入和奉献,而这个过程涉及许多步骤,从选择项目到确保你的贡献成果获得关注。在与 OSFY的 Abbinaya Kuzhanthaivel 的对话中,他分享了一些关于开发人员如何帮助提高印度对开源的贡献的技巧。 + +![Nilesh Vaghela, AWS 的社区英雄以及 ElectroMech 公司的创始人][1] + +### 问:你能告诉我们一下你目前的角色和对开源的贡献吗? + +**答:** 我目前是一名从事自动化工作的架构师。我领导着多个团队,并且同时主要在开源安全服务平台 Invinsense 上作出贡献。我在 1998 年初创建了开源小组,当时已经有大约 1500 名成员。我现在管理的一个小组 (https://groups.google.com/g/vglug) 自 2014-15 年以来一直非常活跃。 + +### 问:你是如何开始在开源项目中工作的? + +**答:** 我是一名有着从业资格的机械工程师,当时我在我的公司 ElectroMech Corporation 负责调制解调器和 UPS 系统。我慢慢地被拖入负责 PC、网络和 Linux 等等。1996 年,我在核科学中心看到超过 150 台计算机服务器在 Linux 上运行时广受启发,之后便开始尝试。自此我将我的公司完全转变为专注于培训和支持的开源公司。 + +我可以自豪地说,我是最早一批使用开源的人 —— 帮助客户了解什么是开源、它有什么好处、什么是免费的、安全或代码问题等等。我们在 Vadodara 得到了至少四五个客户,并且最终通过黄页上的广告宣传自己。我们与 Red Hat 合作并且关系一直持续到现在。 + +### 问:自那以来你认为开源发展如何? + +**答:** 我可以说,早些时候,开源是一种令人着迷的强烈爱好,吸引人们参与其中。当一些来自西伯利亚的贡献者致力于改善水资源短缺问题时,世界各地的用户都说他们的产品有多么简单易用,这给我留下了特别深刻的印象。它更像是一项企业社会责任(CSR)活动。人们和专家创建一个委员会来管理和推进项目。人们会因为对技术的热爱而加入进来,没有任何期望。 + +那时我并不相信开源可以商业化,但它是当今大多数创新和技术的驱动力,而且越来越多的企业正在采用它。我们期待在贡献和使用开源方面取得很好的平衡,因为我们有个人、社区和大公司参与进来。这才是开源真正的未来和力量。 + +### 问:你可以分享一些自己遇到的困难吗? + +**答:** 最初我是单枪匹马干,但一旦人们知道我的意图是好的,他们就会加入我。我在没有任何期望的情况下创建了很多社区,但确实在声誉或名望方面间接地获得了回报;有人理解我是技术达人,并长期给我项目。在早期,人们刚开始加入社区并且不需要付出很多精力就可以做出贡献。因为我的目标不是做生意,因此可以说我没有真正面临什么障碍。 + +### 问:作为社区领袖,你的领导格言和经验教训是什么? + +**答:** 首先,如果你想建立一个社区,那就保持中立,不要抱有偏见。虽然看起来好像是你作为领导者正在管理一个社区,但请记住,加入社区的人都是平等地做出贡献的。永远不要让成员失去动力。在发表评论和回答问题时要有礼貌。不管是什么问题,如果你不想回答,那就选择沉默。但别让人们停止提问,而是帮助他们建立专业知识。 + +第二,不要让社区掺杂商业。不要让社区的目标和你个人企业的目标产生混淆和互相匹配。将它们严格区分开来。 + +始终尝试鼓励人们参与,而不是作为专家提供指导。如果你发现人们有兴趣领导项目并采取主动,请给出舞台让他们发挥。邀请他们参与社区活动。这将帮助你培养更多的社区领袖。此外,让你的社区保持简单,不要在初始阶段让赞助商参与进来。 + +### 问:你从谁那里得到了灵感? + +**答:** 开源运动之父 Richard Stallman 是我的灵感来源,我一直很钦佩他的项目。 + +除了他之外,我还有一个有趣的事要分享,它激励着我从事开源工作。在我开始从事开源工作的时候,核科学中心的大部分软件都是基于 Windows 操作系统的。然而,许多科学家希望使用基于 Linux 的软件。在两三个月内,他们实际上创建了 Linux 驱动程序。这就是让我着迷的地方——用户可以创建这些驱动程序,这在专有软件中是不太可能发生的。我真的很喜欢开源赋权用户这一点。 + +### 问:你对印度开源格局以及改进空间有什么看法? + +**答:** 印度是使用开源的人最多的国家(LCTT 校注:或应加上“之一”),我们正致力于成为贡献者。有这么多开发者,印度却仍然没有软件巨头。我们拥有的主要是服务提供者,而不是创新者。更多的人应该成为开源的贡献者,去开发具有国际标签的东西。 + +为开源做贡献的想法应该从学校和大学抓起。幸运的是,古吉拉特邦政府已经在 8 年级到 10 年级里推出基于 Linux 的课程。教育年轻一代并让他们了解开源模型很重要。 + +其次,我们要培养好的导师。当人们开始贡献时,找到一位在这个项目中工作的开源导师很重要。导师给出了一个小任务,尝试代码然后提交。如果一切顺利,成员的贡献会逐渐增加。不幸的是,在印度导师很少。我们需要有很多导师,或者可以与世界各地的导师建立联系。 + +第三是要鼓励那些踊跃贡献的人。让人们发现,一旦你成为了一位广受认可的开发人员或为开源开发做出贡献的人,你在职业发展和业务上也会有所突破。 + +通过遵循这些简单的方法,印度可以成为开源的主要贡献者。 + +### 问:你如何看待为开源做出贡献时编程方面的要求? + +**答:** 根据我的经验,如果你知道计算机内部的知识,如何开发应用程序,你应该维护什么样的代码标准,以及如何管理团队和其他最佳做法,你可能不必担心编程专业知识。 + +在设计、安全维护和整合方面还有其他角色可以担任。看看你合适什么。通过做你喜欢的事情来不断提升加强自己的技能。如果你仍然对编码感兴趣,那么你就在其他开发人员的支持下去学习。 + +### 问:你如何确定一个你想参与的项目? + +**答:** 你需要了解你最感兴趣的几个领域,然后对围绕这些领域发生的项目进行研究。你需要弄清楚哪些领域有招募更多志愿者的需求或职位空缺。 你可以从小处着手练习,然后积累专业知识。 + +避免随大流;重要的是你的个人兴趣。例如,因为现在 DevOps(开发运维一体化)的需求量很大,你便可能更倾向于选择 DevOps 项目。不要犯这个错误。 + +你可以在云原生基金会([CNCF][2])、Apache、Fedora、Red Hat 等平台上找到开源项目。通过这种方式,你还可以找到已经在从事项目并可以给出适当指导的导师。 + +### 问:每个项目有自己的目的和目标受众,有时它们甚至与开源目标不一致。那么,在开始做出贡献之前要核实什么? + +**答:** 我同意,当有人开始一个开源项目但随后又将其商业化时,你会感到为开源作出贡献也变得颇有难度。但这样的风险总是会有的,不应让你对此感到挫败。 + +首先试着去了解该小组 —— 小组中的贡献者有多受欢迎,他们贡献了多长时间,以及他们的声誉如何。一旦你加入,观察每一个人和每一件事是关键。尝试至少学习三到六个月,并了解一切是如何运作的。如果你发现他们的意图不对,你可以随时离开这个项目。但如果你觉得没问题,那就继续做贡献吧。 + +![ElectroMech 公司的团队][3] + +你可以看看他们是否有某些许可证,例如 GPLv3。你还可以查看未修改的许可证版本,例如 Apache 开源许可证。 + +### 问:你觉得大公司会接受应届生投稿吗? + +**答:** 是的,当然。公司也喜欢指导新人。他们通常不允许你直接贡献,但可能先会给你一个小任务。导师会首先尝试了解你拥有什么技能以及你的能力如何。一旦他们认可你具备所需的技能,他们将继续指导你或根据你的技能将你分配给其他导师。初始阶段非常关键。很多公司都会做一些筛选,只有在你证明了自己的能力之后,你才会被允许做出贡献。 + +### 问:贡献者在接手项目时必须克服的最初挑战是什么? + +**答:** 首先,你应该非常认真地对待你的贡献。没有书面承诺,贡献者可能倾向于对工作掉以轻心。这种想法是完全错误的。尝试每天投入 8-10 小时或任何可行的时间。如果你因为觉得没有立竿见影的回报而不愿投入其中,那么你就不是一个好的贡献者。 + +在最初阶段始终严格遵守导师的指导。这对于健康的贡献非常重要。有时你可能会认为自己擅长某事,而你的导师可能不会根据该技能给你分配项目。在这种情况下只需找你的导师,问他你应该做什么,你的角色是什么,以及你可以如何贡献。 + +### 问:许多开发人员在提交项目贡献后没有得到回复。如何让自己提交的东西被人注意到呢? + +**答:** 写一篇关于你计划作出贡献的项目的小博客,包括你喜欢的方面,你不喜欢的地方,以及可以改进的地方。这种积极的推广方式可以帮到你很多。 + +成为小组的一员并参与与该项目相关的活动。作为贡献的替代,首先尝试参与到团队中去,这将增加你被采纳为贡献者的机会。 + +一旦你对项目有了更好的了解,你的工作不仅会被接受,而且你将能够更好地适应该项目。 + +### 问:你如何克服你的贡献不被接受的情况? + +**答:** 就是理解发生这种情况的原因有很多 —— 也许你没有在合适的项目中,或者你没有做出正确的贡献。如果项目是国家驱动的,你的请求可能不会被接受。因此,如前所述,请记得列个清单。如果你的贡献没有被接受,请不要担心,因为要么你不适合该项目,要么该项目不适合你。 + +我会建议尝试找四到五个项目,并且至少有一个项目会接受你所做的工作。 + +### 问:你对我们的读者有何想说的? + +**答:** 开源是当今大多数创新背后的驱动力。让我们根据自己的能力和技能试着做出贡献,而不是仅仅使用开源。贡献可以是代码、文档、测试、博客、金钱等。是时候做出贡献了。 + +### 问:ElectroMech 公司有招人的计划吗? + +**答:** 我们在云计算 DevOps(开发运维一体化)方面有需求,正在招聘云架构师、Python 开发人员、Linux 架构师和安全专业人员。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/ + +作者:[Abbinaya Kuzhanthaivel][a] +选题:[lkxed][b] +译者:[XiaotingHuang22](https://github.com/XiaotingHuang22) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/abbinaya-swath/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nilesh-Vaghela-AWS-community-hero-and-founder-ElectroMech-Corporation.jpg +[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwib2vvv3dv3AhVa7XMBHfZSCsIQFnoECAgQAQ&url=https%3A%2F%2Fwww.cncf.io%2F&usg=AOvVaw2LnRyH4SZPDHntRLJU_b3q +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/The-team-at-ElectroMech-Corporation.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202302/19/141128wxkesmzesuboso6w.jpg \ No newline at end of file diff --git a/translated/talk/20220914 Why Enterprises Should Opt for Platform as a Service.md b/published/20220914 Why Enterprises Should Opt for Platform as a Service.md similarity index 55% rename from translated/talk/20220914 Why Enterprises Should Opt for Platform as a Service.md rename to published/20220914 Why Enterprises Should Opt for Platform as a Service.md index 367eda4312..296b2c2399 100644 --- a/translated/talk/20220914 Why Enterprises Should Opt for Platform as a Service.md +++ b/published/20220914 Why Enterprises Should Opt for Platform as a Service.md @@ -3,23 +3,26 @@ [#]: author: "Gopala Krishna Behara https://www.opensourceforu.com/author/gopalakrishna-behara/" [#]: collector: "lkxed" [#]: translator: "onionstalgia" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15548-1.html" 为什么企业应该选择平台即服务(PaaS) ====== -*平台即服务PaaS "能够快速、轻松地创建网络应用,而无需购买和维护其下的软件和基础设施。本文解释了它为什么有用。* -平台即服务(以下简称 PaaS)是一种“免去了建立和维护基础设施的复杂工作,为客户提供开发、运行和管理应用程序的平台”的云计算服务。这是云原生应用和支持系统所依托的核心平台。 +![][0] + +> 平台即服务能够快速、轻松地创建网络应用,而无需购买和维护其下的软件和基础设施。本文解释了它为什么有用。 + +平台即服务PaaS(以下简称 PaaS)指的是云计算服务,它为客户提供了开发、运行和管理应用程序的平台,而免去了建立和维护与开发和启动应用程序相关的基础设施的复杂工作。这是云原生应用和支持系统所依托的核心平台。 PaaS 通常包括不同的应用基础功能,包括应用平台、集成平台、业务分析平台、事件流服务和移动后端服务。此外,它还包括一套与监控、管理、部署相关的功能。 -开发人员希望他们的开发环境不需要等待,而运营团队则更关心性能和稳定性。这经常引起两方间的冲突。PaaS 为这两方创造了和平的环境。作为服务交付的应用平台,即 PaaS,被用于部署用户代码。Cloud Foundry、Cloudify 和 OpenShift 这些开源环境都可用作 PaaS。 +开发人员希望他们的开发环境不需要等待,而运营团队则更关心性能和稳定性。这经常引起两方间的冲突。PaaS 为这两方创造了和平的环境。一个作为服务交付的应用平台被称作 PaaS,它被用于部署用户代码。Cloud Foundry、Cloudify 和 OpenShift 这些开源环境都可用作 PaaS。 ### PaaS 的采用模式 -云计算必须满足五个基本特征——按需服务、接入网络、资源池化、弹性和可度量的服务。为此,云计算提供了三种服务模式:软件即服务(SaaS)、平台即服务(PaaS)、基础设施即服务(IaaS)。 +云计算必须满足五个基本特征:按需服务、接入网络、资源池化、弹性和可度量的服务。为此,云计算提供了三种服务模式:软件即服务Software as a Service(SaaS)、平台即服务Platform as a Service(PaaS)、基础设施即服务Infrastructure as a Service(IaaS)。 业务选用 PaaS 的关键驱动力: @@ -27,25 +30,25 @@ PaaS 通常包括不同的应用基础功能,包括应用平台、集成平台 * 通过减少应用程序的交付时间和提高开发和交付质量,最大限度地降低 IT 成本 * 增加中间件之间的灵活性和集成度 -**简单 PaaS** 是踏入 PaaS 领域的入门。它可以提供应用程序服务,并将它们暴露在自助服务的目录中,自动部署和计量服务使用的资源。 +*简单 PaaS*:踏入 PaaS 领域的入口。它可以提供应用程序服务,并将它们暴露在自助服务的目录中;自动部署和计量服务使用的资源。 -*管理 PaaS* 管理已配置应用程序的服务级别协议SLA服务质量QoS,例如弹性、应用程序性能、安全性等。 +*管理 PaaS*:管理已配置应用程序的服务级别协议SLA服务质量QoS,例如弹性、应用程序性能、安全性等。 -*编程 PaaS* 允许应用程序与外部应用程序或公共云集成,并实现自动扩展和云爆发场景。 +*编程 PaaS*:允许应用程序与外部应用程序或公共云集成,并实现自动扩展和云爆发场景。 -*面向流程Process-oriented PaaS* 允许通过创建持续交付流程来实现开发运维DevOps流程,该流程可以自动构建、测试应用程序并将其交付到云环境中。 +*面向流程 PaaS*:允许通过创建持续交付流程来实现开发运维DevOps流程,该流程可以自动构建、测试应用程序并将其交付到云环境中。 -除了这些采用模式之外,还有其他的 PaaS 变体如下,这些变化可能与上文的模式有一定重合。 +除了这些采用模式之外,还有其他的 PaaS 变体如下,这些变化可能与上文的模式有一定重合: -**集成平台即服务iPaaS**是一套能够开发、执行和管理集成流的云服务。集成流可以是个人内部或跨多个组织连接的,可以包含任何企业内部或基于云的流程、服务、应用和数据。这些组合变化可能也符合上述的模式之一,例如 MuleSoft CloudHub 和 BizTalk。 +*集成平台即服务(iPaaS)*:一套能够开发、执行和管理集成流的云服务。集成流可以是个人内部或跨多个组织连接的,可以包含任何企业内部或基于云的流程、服务、应用和数据。这些组合变化可能也符合上述的模式之一,例如 MuleSoft CloudHub 和 BizTalk。 -**移动平台即服务mPaaS**是为开发移动应用提供的集成开发环境IDE,并且支持多种移动平台。 +*移动平台即服务(mPaaS)*:为开发移动应用提供的集成开发环境(IDE),并且支持多种移动平台。 -**数据库平台即服务dbPaas**是一种按需的、安全且可扩展的自助式数据库平台,可自动配置和管理数据库。dbPaaS 使扩展数据库变得更加容易,并使它们更加可靠。 +*数据库平台即服务(dbPaas)*:一种按需的、安全且可扩展的自助式数据库平台,可自动配置和管理数据库。dbPaaS 使扩展数据库变得更加容易,并使它们更加可靠。 -**物联网平台即服务IoTPaaS**提供了实现异构物联网拓扑所需的通信、安全、分析和管理的通用基础架构。它为构建物联网解决方案提供了更简单、更敏捷的模型。 +*物联网平台即服务(IoTPaaS)*:提供了实现异构物联网拓扑所需的通信、安全、分析和管理的通用基础架构。它为构建物联网解决方案提供了更简单、更敏捷的模型。 -**业务流程管理平台即服务bpmPaaS**是一个完整的预集成业务流程管理平台,托管在云端并作为服务交付。它被用于开发和执行整个企业的业务流程和以工作流程为中心的应用程序。例如 Pega cloud 和 OpenText Cordys cloud。 +*业务流程管理平台即服务(bpmPaaS)*:一个完整的预集成业务流程管理平台,托管在云端并作为服务交付。它被用于开发和执行整个企业的业务流程和以工作流程为中心的应用程序。例如 Pega cloud 和 OpenText Cordys cloud。 PaaS 的一些基本特征: @@ -65,19 +68,19 @@ PaaS 的一些基本特征: * 应用堆栈的选择 * 语言、数据库和框架支持 * 规模的可扩展性 -* 服务质量QoS +* 服务质量(QoS) * 开发和运营的工具 * 它有多适合你的业务 现在让我们快速浏览下流行的开源 PaaS。 -**Cloud Foundry:**提供了多种云的选择、开发者框架和应用服务。Cloud Foundry 使构建、测试、部署和扩展应用程序变得更快、更容易。 +*Cloud Foundry*:提供了多种云的选择、开发者框架和应用服务。Cloud Foundry 使构建、测试、部署和扩展应用程序变得更快、更容易。 它有不同的发行版本,其中比较流行的是 Pivotal 和 IBM。它包含应用运行时runtime和容器运行时。在 Pivotal 上包含有应用服务和容器服务。 -**OpenShift:**红帽的云计算 PaaS 产品。这是一个云端的应用平台,应用开发者和团队可以在这里构建、测试、部署和运行他们的应用程序。 +*OpenShift*:红帽的云计算 PaaS 产品。这是一个云端的应用平台,应用开发者和团队可以在这里构建、测试、部署和运行他们的应用程序。 -**Cloudify:** 在开放的原则下开发和设计,用以推动 IT 转型革命。它使组织能够在其上设计、建立和提供各种商业应用和网络服务。Cloudify 的最新版本为 4.3,它包含了先进的安全、控制和真自服务true self-service等增强功能。Cloudify 4.3 还为 Kubernetes 容器编排引入了全新的概念。 +*Cloudify*:在开放的原则下开发和设计,用以推动 IT 转型革命。它使组织能够在其上设计、建立和提供各种商业应用和网络服务。Cloudify 的最新版本为 4.3,它包含了先进的安全、控制和真自服务true self-service等增强功能。Cloudify 4.3 还为 Kubernetes 容器编排引入了全新的概念。 | 功能 | Cloud Foundry | Cloudify | OpenShift | | :- | :- | :- | :- | @@ -117,9 +120,11 @@ via: https://www.opensourceforu.com/2022/09/why-enterprises-should-opt-for-platf 作者:[Gopala Krishna Behara][a] 选题:[lkxed][b] 译者:[onionstalgia](https://github.com/onionstalgia) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.opensourceforu.com/author/gopalakrishna-behara/ [b]: https://github.com/lkxed + +[0]: https://img.linux.net.cn/data/attachment/album/202302/17/094352atasztuxqg4t1ctt.jpg \ No newline at end of file diff --git a/published/20221106.1 ⭐️ How to Install MATE Desktop in Arch Linux [Complete Guide].md b/published/20221106.1 ⭐️ How to Install MATE Desktop in Arch Linux [Complete Guide].md new file mode 100644 index 0000000000..4d50982d8e --- /dev/null +++ b/published/20221106.1 ⭐️ How to Install MATE Desktop in Arch Linux [Complete Guide].md @@ -0,0 +1,104 @@ +[#]: subject: "How to Install MATE Desktop in Arch Linux [Complete Guide]" +[#]: via: "https://www.debugpoint.com/mate-desktop-arch-linux-install/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Chao-zhi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15561-1.html" + +如何在 Arch Linux 中安装 MATE 桌面 +====== + +![][0] + +> 本指南将详细解释你在 Arch Linux 中安装 MATE 桌面所需的步骤。 + +本指南分为两部分。第一部分讨论安装基础 Arch 系统。第二部分是在 Arch Linux 上安装完整的 MATE 桌面环境。 + +本文在以下版本中进行了测试:MATE 1.24 和 MATE 1.26。 + +### 什么是 MATE 桌面? + +当 GNOME 桌面从 GNOME 2 改变方向到 GNOME 3 时,改变了用户交互和界面,MATE 桌面仍然延续了“较旧的”或者说“传统的” GNOME 2 的开发方向。因此,MATE 桌面环境保留了 Linux 中的传统桌面体验。它速度快,内存消耗低。在我看来,MATE 桌面环境是一个被低估的桌面环境,需要更多的关注! + +MATE 团队一直在继续开发,它是一个基于 GNOME 2 的流行桌面之一,但同时支持更新的技术。你可以在其 [官方网站][1] 上了解更多信息。 + +### 在 Arch Linux 中安装 MATE 桌面 + +#### 第一部分: 安装 Arch Linux + +如果你已经安装了 Arch Linux,则可以跳过此步骤,直接转到下面的 MATE 桌面安装部分。 + +要快速安装 Arch Linux,请按照这个自动化的 [archinstall 指南][2] 进行操作,该指南非常容易上手。安装完成后,继续至第二部分。 + +#### 第二部分:在 Arch Linux 中安装 MATE 桌面 + +重新启动后,从 GRUB 中选择 Arch Linux。在 Arch Linux 提示符下,按顺序运行以下命令。这些命令将安装 Xorg 服务器、显示管理器、MATE 桌面组件、控制器包以及其他应用程序。 + +对于所有命令,请使用默认值,即在询问时按 Enter 键。 + +安装 Xorg。安装大小大约为 80 MB。 + +``` +sudo pacman -S --needed xorg +``` + +安装显示管理器和 MATE 桌面组件。安装大小大约为 380 MB。 + +``` +sudo pacman -S --needed mate mate-extra ttf-freefont lightdm lightdm-gtk-greeter +``` + +> LCTT 译注:在 Arch Linux 中,很多时候 lightdm 显示管理器需要额外的配置才能正常启用。可以参考:[LightDM - ArchWiki][5]。除此之外,可以安装 lightdm-gtk-greeter-settings 来对 lightdm-gtk-greeter 进行配置。 + +![安装 MATE 包][3] + +安装应用软件: + +这只是一个参考。你也可以安装你所需要的内容。 + +``` +sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper +``` + +现在是时候以服务的方式启用显示管理器和网络管理器了。这样,下次登录时,它们就可以通过 systemd 自动运行了。 + +``` +systemctl enable lightdm +systemctl enable NetworkManager +``` + +使用重启命令重启系统: + +``` +reboot +``` + +如果一切顺利,你应该在 MATE 桌面上看到登录提示。 + +现在你可以使用刚刚创建的用户 ID 和密码登录。一个超快速和传统的 MATE 桌面将欢迎你的到来。 + +![Arch Linux 中的 MATE 桌面][4] + +我希望本指南能帮助你从头开始创建自己的 Arch Linux 环境,并使用传统的 MATE 桌面。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/mate-desktop-arch-linux-install/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://mate-desktop.org/ +[2]: https://www.debugpoint.com/archinstall-guide/ +[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/Installing-MATE-Packages.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2021/08/MATE-Desktop-in-Arch-Linux-1.jpg +[5]: https://wiki.archlinux.org/title/LightDM +[0]: https://img.linux.net.cn/data/attachment/album/202302/21/104424o8p78qj8gp5hqghj.jpg \ No newline at end of file diff --git a/translated/tech/20221109.4 ⭐️⭐️ How to use journalctl to View and Analyze Systemd Logs [With Examples].md b/published/20221109.4 ⭐️⭐️ How to use journalctl to View and Analyze Systemd Logs [With Examples].md similarity index 61% rename from translated/tech/20221109.4 ⭐️⭐️ How to use journalctl to View and Analyze Systemd Logs [With Examples].md rename to published/20221109.4 ⭐️⭐️ How to use journalctl to View and Analyze Systemd Logs [With Examples].md index 8b12035d3e..57f35863f9 100644 --- a/translated/tech/20221109.4 ⭐️⭐️ How to use journalctl to View and Analyze Systemd Logs [With Examples].md +++ b/published/20221109.4 ⭐️⭐️ How to use journalctl to View and Analyze Systemd Logs [With Examples].md @@ -3,34 +3,36 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "Chao-zhi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15544-1.html" -如何使用 journalctl 查看和分析 Systemd 日志 [附实例] 。 +如何使用 journalctl 查看和分析 systemd 日志(附实例) ====== -**本指南介绍了 [Systemd][1] 的 journalctl 工具及其各种命令的基础知识。你可以使用这些命令对 Linux 中的桌面和服务器日志进行故障诊断。以下是如何使用 journalctl 查看和分析 Systemd 日志的不同例子。** +![][0] + +> 本指南介绍了 [systemd][1] 的 journalctl 工具及其各种命令的基础知识。你可以使用这些命令对 Linux 中的桌面和服务器日志进行故障诊断。以下是如何使用 journalctl 查看和分析 systemd 日志的不同例子。 ### 简介 -很多人说 Systemd 不好,它对系统的影响很大,这也是一个有争议的话题。但你不能否认的是,它提供了一套完善的工具来管理和排除系统故障。想象一下,当你遇到一个没有 GUI 的坏系统时,你可能会把启动和 GRUB 弄得一团糟。在这种情况下,你可以从一个 live 系统启动,挂上你的 Linux 分区,然后浏览 Systemd 的日志,找出问题所在。 +很多人说 systemd 不好,它对系统的影响很大,这也是一个有争议的话题。但你不能否认的是,它提供了一套完善的工具来管理和排除系统故障。想象一下,当你遇到一个没有 GUI 的损坏系统时,你可能会把启动和 GRUB 弄得一团糟。在这种情况下,你可以从一个立付Live系统启动,挂上你的 Linux 分区,然后浏览 systemd 的日志,找出问题所在。 -Systemd有三个基本组件,如下所示: +systemd 有三个基本组件,如下所示: -- **systemd**。Linux 操作系统的系统和服务管理器。 -- **systemctl**。命令,用于反观和控制 systemd 系统和服务管理器的状态。 -- **systemd-analyze**。提供系统启动时的性能统计,并从系统和服务管理器中检索其他状态和跟踪信息。 +- `systemd`:Linux 操作系统的系统和服务管理器。 +- `systemctl` :该命令用于反观和控制 systemd 系统和服务管理器的状态。 +- `systemd-analyze`:该命令提供系统启动时的性能统计,并从系统和服务管理器中检索其他状态和跟踪信息。 除了这三个服务外,systemd 还提供其他服务,如 journald、logind、networkd 等。在本指南中,我们将讨论 systemd 的 journald 服务。 -### journald - systemd日志服务 +### journald - systemd 日志服务 根据设计,systemd 提供了一个集中的方式来处理所有来自进程、应用程序等的操作系统日志。所有这些日志事件都由 systemd 的 journald 守护进程来处理。journald 守护进程收集所有来自 Linux 操作系统各处的日志,并将其作为二进制数据存储在文件中。 -集中记录事件、系统问题作为二进制数据的好处有很多。例如,由于系统日志是以二进制而不是文本形式存储的--你可以以多种方式进行翻译,如文本、JSON对象,以满足各种需求。另外,由于日志是按顺序存储的,通过对日志的日期/时间操作,超级容易追踪到单个事件。 +以二进制数据集中记录事件、系统问题的好处有很多。例如,由于系统日志是以二进制而不是文本形式存储的,你可以以文本、JSON 对象等多种方式进行转译,以满足各种需求。另外,由于日志是按顺序存储的,通过对日志的日期/时间操作,超级容易追踪到单个事件。 -请记住,journald 收集的日志文件有几千行,而且每次开机都会对每个事件进行更新。因此,如果你有一个长期运行的 Linux 操作系统--日志的大小应该以 GB 为单位。由于有着数以千计的日志,最好用基本命令进行过滤,以了解更多系统问题。 +请记住,journald 收集的日志文件数以千行计,而且不断更新每次开机、每个事件。因此,如果你有一个长期运行的 Linux 操作系统,日志的大小应该以 GB 为单位。由于有着数以千计的日志,最好用基本命令进行过滤,以了解更多系统问题。 #### journald 配置文件 @@ -42,7 +44,7 @@ journald 的配置文件存在于以下路径中。它包含了关于如何进 #### journald 存储二进制日志文件的地方 -journald 以二进制格式存储日志。它们被保存在这个路径下的一个目录中。 +journald 以二进制格式存储日志。它们被保存在这个路径下的一个目录中: ``` /var/log/journal @@ -52,13 +54,13 @@ journald 以二进制格式存储日志。它们被保存在这个路径下的 ![journalctl log file path][2] -不要使用 cat 命令,也不要使用 nano 或 vi 来打开这些文件。它们将无法正常显示。 +不要使用 `cat` 命令,也不要使用 `nano` 或 `vi` 来打开这些文件。它们(是二进制的),无法正常显示。 ### 使用 journalctl 来查看和分析 systemd 日志 #### journald 基本命令 -使用 journal daemon 查看日志的基本命令是: +查看 journald 日志的基本命令是: ``` journalctl @@ -66,11 +68,11 @@ journalctl ![journalctl][3] -该命令提供了所有应用程序和进程的日志条目,包括错误、警告等。它显示的列表中,最古老的日志在顶部,当前的日志在底部。你需要不断按回车键来逐行滚动浏览。你也可以使用 PAGE UP 和 PAGE DOWN 键来滚动。按 q 键可以退出这个视图。 +该命令提供了所有应用程序和进程的日志条目,包括错误、警告等。它显示的列表中,最旧的日志在顶部,当前的日志在底部。你需要不断按回车键来逐行滚动浏览。你也可以使用 `PAGE UP` 和 `PAGE DOWN` 键来滚动。按 `q` 键可以退出这个视图。 #### 如何以不同时区的时间查看日志条目 -默认情况下,journalctl 显示的是当前系统时区的日志时间。然而,你可以很容易地在命令中提供时区,将同一日志转换为不同的时区。例如,要查看 UTC 的日志,请使用以下命令: +默认情况下,`journalctl` 以当前系统时区显示日志的时间。然而,你可以很容易地在命令中提供时区,将同一日志转换为不同的时区。例如,要以 UTC 查看日志,请使用以下命令: ``` journalctl --utc @@ -100,10 +102,10 @@ journalctl -p 0 4: 警告 5: 通知 6: 信息 -7:调试 +7: 调试 ``` -当你指定错误代码时,它显示该等级及比他等级更高的所有信息。例如,如果你指定下面的命令,它会显示所有优先级为 2、1 和 0 的信息: +当你指定错误代码时,它显示该等级及更高的所有信息。例如,如果你指定下面的命令,它会显示所有优先级为 2、1 和 0 的信息: ``` journalctl -p 2 @@ -111,7 +113,7 @@ journalctl -p 2 #### 如何查看特定启动的日志 -当你运行 journalctl 命令时,它会显示当前启动的信息,即你正在运行的会话中的信息。但也可以查看过去启动的信息。 +当你运行 `journalctl` 命令时,它会显示当前启动的信息,即你正在运行的会话中的信息。但也可以查看过去的启动信息。 在每次重启时,日志都会持续更新。journald 会记录不同启动时的日志。要查看不同启动时的日志,请使用以下命令。 @@ -122,12 +124,10 @@ journalctl --list-boots ![journalctl list-boots][6] - 第一个数字显示的是 journald 的唯一的启动跟踪号码,你可以在下一个命令中使用它来分析该特定的启动。 - -- 第二个数字是 boot ID,你也可以在命令中指定。 - +- 第二个数字是启动 ID,你也可以在命令中指定。 - 接下来的两个日期、时间组合是存储在相应文件中的日志的时间。如果你想找出某个特定日期、时间的日志或错误,这就非常方便了。 -要查看一个特定的启动号码,你可以选择第一个号码或启动 ID,如下所示。 +要查看一个特定的启动号码,你可以选择第一个启动跟踪号码或启动 ID,如下所示。 ``` journalctl -b -45 @@ -149,9 +149,9 @@ journalctl -xb -p 3 #### 如何查看某一特定时间、日期的日志记录 -journalctl 功能强大,可以在命令中提供类似 "english" 的参数,用于时间和日期操作。 +`journalctl` 功能强大,可以在命令中提供类似英语的参数,用于时间和日期操作。 -你可以使用 `--since` 选项与 `“yesterday”, “today”, “tomorrow”, 或 “now”` 组合。 +你可以使用 `--since` 选项与 `yesterday`、`today`、`tomorrow` 或 `now` 组合。 下面是一些不同命令的例子。你可以根据你的需要修改它们。它们是不言自明的。以下命令中的日期、时间格式为 `"YYYY-MM-DD HH:MM:SS"` @@ -178,7 +178,7 @@ journalctl --since 09:00 --until "1 hour ago" #### 如何查看内核特定的日志记录 -Linux 内核信息也可以从日志中提取出来。要查看当前启动时的内核信息,请使用以下命令。 +Linux 内核信息也可以从日志中提取出来。要查看当前启动时的内核信息,请使用以下命令: ``` journalctl -k @@ -194,7 +194,7 @@ journalctl -u NetworkManager.service ![journalctl NetworkManager service][10] -如果你不知道服务名称,可以使用下面的命令来列出系统中的systemd服务。 +如果你不知道服务名称,可以使用下面的命令来列出系统中的 systemd 服务。 ``` systemctl list-units --type=service @@ -202,13 +202,13 @@ systemctl list-units --type=service #### 如何查看用户、组的日志 -如果你正在分析服务器日志,在多个用户登录的情况下,这个命令很有帮助。你可以先用下面的命令从用户名中找出用户的 ID。例如,要找出用户 "`debugpoint`" 的ID: +如果你正在分析服务器日志,在多个用户登录的情况下,这个命令很有帮助。你可以先用下面的命令从用户名中找出用户的 ID。例如,要找出用户 `debugpoint` 的 ID: ``` id -u debugpoint ``` -然后使用 `_UID` 选项指定该ID与来查看该用户产生的日志。 +然后使用 `_UID` 选项指定该 ID 与来查看该用户产生的日志。 ``` journalctl _UID=1000 --since today @@ -220,7 +220,7 @@ journalctl _UID=1000 --since today #### 如何查看一个可执行文件的日志 -你也可以查看某个特定程序或可执行文件的日志。例如,如果你想找出 gnome-shell 的信息,你可以运行以下命令。 +你也可以查看某个特定程序或可执行文件的日志。例如,如果你想找出 `gnome-shell` 的信息,你可以运行以下命令。 ``` journalctl /usr/bin/gnome-shell --since today @@ -230,7 +230,7 @@ journalctl /usr/bin/gnome-shell --since today ### 结束语 -希望本指南能帮助你使用 journalctl 查看分析 Linux 桌面或服务器上的 systemd 日志,排除故障。如果你知道如何使用这些命令,systemd 日志管理的功能非常强大,它能让你在调试时的生活变得轻松一些。现在所有主流的 Linux 发行版都使用 systemd。Ubuntu、Debian、Fedora、Arch--它们都使用systemd 作为其默认的操作系统产品。如果你想了解无 systemd 的Linux发行版,你可能想看看[MX-Linux][13]、Gentoo、Slackware、Void Linux。 +希望本指南能帮助你使用 `journalctl` 查看分析 Linux 桌面或服务器上的 systemd 日志,排除故障。如果你知道如何使用这些命令,systemd 日志管理的功能非常强大,它能让你在调试时的生活变得轻松一些。现在所有主流的 Linux 发行版都使用 systemd。Ubuntu、Debian、Fedora、Arch 它们都使用 systemd 作为其默认的操作系统组件。如果你想了解不使用 systemd 的 Linux发行版,你可能想看看 [MX-Linux][13]、Gentoo、Slackware、Void Linux。 -------------------------------------------------------------------------------- @@ -239,7 +239,7 @@ via: https://www.debugpoint.com/systemd-journalctl/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[Chao-zhi](https://github.com/Chao-zhi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -258,3 +258,4 @@ via: https://www.debugpoint.com/systemd-journalctl/ [11]: https://www.debugpoint.com/wp-content/uploads/2020/12/journalctl-_UID.jpg [12]: https://www.debugpoint.com/wp-content/uploads/2020/12/journalctl-gnome-shell.jpg [13]: https://www.debugpoint.com/tag/mx-linux +[0]: https://img.linux.net.cn/data/attachment/album/202302/16/085250d5ngtogo2fjjn8o2.jpg \ No newline at end of file diff --git a/translated/tech/20221125.2 ⭐️ Rnote An Open-Source Drawing App for Notes and Annotation.md b/published/20221125.2 ⭐️ Rnote An Open-Source Drawing App for Notes and Annotation.md similarity index 76% rename from translated/tech/20221125.2 ⭐️ Rnote An Open-Source Drawing App for Notes and Annotation.md rename to published/20221125.2 ⭐️ Rnote An Open-Source Drawing App for Notes and Annotation.md index 45e1e9f8c0..6b5256f6d5 100644 --- a/translated/tech/20221125.2 ⭐️ Rnote An Open-Source Drawing App for Notes and Annotation.md +++ b/published/20221125.2 ⭐️ Rnote An Open-Source Drawing App for Notes and Annotation.md @@ -3,20 +3,18 @@ [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15545-1.html" Rnote:一个用于笔记和注释的开源绘图应用 ====== -**_简介:_**_Rnote 允许你做笔记、绘图和注释文件。听起来你需要它?让我们来探讨一下。_ +> Rnote 可以让你做笔记、绘图和注释文件。听起来你需要它?让我们来了解一下。 我们已经介绍了许多记笔记的应用,但支持手写笔记的选项却屈指可数。 -Rnote 就是这样一个有用的应用,它可以让你做手写笔记并对文件/图片进行注释。 - -当然,你需要一个绘图板或一个带有手写笔的设置来使用 Rnote。 +Rnote 就是这样一个有用的应用,它可以让你做手写笔记并对文件/图片进行注释。当然,你需要一个绘图板或一个带有手写笔的设置来使用 Rnote。 ### Rnote: 基于矢量的绘图应用,用于绘制草图和手写笔记 @@ -28,11 +26,11 @@ Rnote 是一个用 Rust 和 GTK 4 编写的令人印象深刻的开源应用。 让我强调一下它能做的一些事情。 -### Rnote的特点 +### Rnote 的特点 ![rnote settings][3] -[Rnote][4] 是一个简单但有很多功能的绘图/记事应用程。一些功能包括: +[Rnote][4] 是一个简洁而有很多功能的绘图/记事应用程序。一些功能包括: - 支持具有各种笔画风格的压敏笔输入 - 用形状工具添加不同的形状 @@ -45,9 +43,9 @@ Rnote 是一个用 Rust 和 GTK 4 编写的令人印象深刻的开源应用。 - 集成的工作区浏览器可快速访问媒体文件 - 支持拖放 - 支持剪贴板 -- 支持常见的页面格式(A6、A5、US letter 等)。 -- 从 PDF、位图和 SVG 文件导入。 -- 原生的 .rnote 文件来保存/加载文件。 +- 支持常见的页面格式(A6、A5、US letter 等) +- 从 PDF、位图和 SVG 文件导入 +- 使用原生的 .rnote 文件来保存/加载文件 - 支持导出到 SVG 和 PDF - 自动保存功能 - 深色/浅色模式 @@ -80,7 +78,7 @@ flatpak install flathub com.github.flxzt.rnote Rnote 正在积极开发,并在其功能设置方面取得了良好的进展。如果你喜欢 Rnote,你可能想看看 [Xournal++][9],它是另一个能让你做手写笔记的应用。 -_你还知道其他像 Rnote 这样令人兴奋的应用吗?你觉得 Rnote 怎么样?请在下面的评论中分享你的想法。_ +你还知道其他像 Rnote 这样令人兴奋的应用吗?你觉得 Rnote 怎么样?请在下面的评论中分享你的想法。 -------------------------------------------------------------------------------- @@ -89,16 +87,16 @@ via: https://itsfoss.com/rnote/ 作者:[Ankush Das][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://itsfoss.com/author/ankush/ [b]: https://github.com/lkxed -[1]: https://itsfoss.com/wp-content/uploads/2022/11/rnote-screenshot.png -[3]: https://itsfoss.com/wp-content/uploads/2022/11/rnote-settings.png +[1]: https://itsfoss.com/content/images/wordpress/2022/11/rnote-screenshot.png +[3]: https://itsfoss.com/content/images/wordpress/2022/11/rnote-settings.png [4]: https://rnote.flxzt.net -[5]: https://itsfoss.com/wp-content/uploads/2022/11/rnote-screenshot-1.png +[5]: https://itsfoss.com/content/images/wordpress/2022/11/rnote-screenshot-1.png [6]: https://flathub.org/apps/details/com.github.flxzt.rnote [7]: https://itsfoss.com/flatpak-guide/ [8]: https://github.com/flxzt/rnote diff --git a/published/20230131.2 ⭐️⭐️ Merge design and code with Penpot.md b/published/20230131.2 ⭐️⭐️ Merge design and code with Penpot.md new file mode 100644 index 0000000000..f9ccbe673a --- /dev/null +++ b/published/20230131.2 ⭐️⭐️ Merge design and code with Penpot.md @@ -0,0 +1,62 @@ +[#]: subject: "Merge design and code with Penpot" +[#]: via: "https://opensource.com/article/23/1/merge-design-code-penpot" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15549-1.html" + +用 Penpot 弥合设计和代码之间的鸿沟 +====== + +![][0] + +> 用 Penpot 这个开源的设计工作空间来弥合编程和设计之间的鸿沟。 + +在计算机编程的大部分历史中,在创建应用的代码的程序员和创建应用的用户体验(UX)的设计师之间一直存在着鸿沟。这两个学科接受的培训大不相同,他们使用的工具也不同。程序员使用文本编辑器或集成开发环境来编写代码,而设计师则经常绘制小部件布局和潜在交互的示意图。虽然一些 IDE,像 [Eclipse][1] 和 [Netbeans][2],有界面设计组件,但它们通常专注于小部件的位置而不是小部件的设计。开源设计应用 [Penpot][3] 是一个协作式设计和原型设计平台。它有一套新的功能,使设计师和开发者可以很容易地用熟悉的工作流程协同工作。Penpot 的设计界面可以让开发者在设计过程中和谐地编写代码,这是其他工具所无法做到的。自从我们 [上次介绍它][4] 以来,它已经有了长足的进步。它的最新功能不仅改善了你使用 Penpot 的体验,还推动了开源的 Penpot 应用超越类似的专有工具。 + +### 用 Penpot 做原型 + +在设计应用的最佳工作方式时,常见问题之一是在设计的时候这个应用还不存在。设计师可以通可视化和故事板来帮助设计团队和程序员了解目标是什么。但这是一个需要迭代和反馈的过程,当开发人员开始实施 UX 设计,设计会发生变化以应对对代码的实际变化。 + +使用 Penpot,你可以为你的网络或移动应用创建一个“可用”原型。你可以将按钮与特定的行动联系起来,根据用户的输入触发布局的变化。而这一切都可以在项目的代码存在之前完成。 + +但是,这方面最重要的不是模拟的能力。在 Penpot 中为应用的设计所做的一切都有可用的布局数据,开发人员可以在最终的项目中使用它们。Penpot 不仅仅是一个出色的绘图和布局工具。它为编码过程提供了信息。 + +Penpot 现在不仅仅是提供了一个设计师特定元素的视觉列表,如属性、颜色和排版,而是将代码输出直接整合到设计工作区(就像 Web 浏览器中的开发者工具)。设计师和开发人员共享设计和前端开发的相同空间,以他们需要的任何格式获得规格。 + +![Image of the current Penpot interface][5] + +### 内存解锁 + +许多在线设计工具使用专有技术来提供一些花哨的功能,但代价是基本上成为一个应用,你只能运行它,而不能通过浏览器访问。不过 Penpot 使用开放的网络标准,并由你的网络浏览器渲染。这意味着 Penpot 可以访问浏览器可用的最大内存,使得 Penpot 成为第一个具有设计扩展性的在线原型和布局应用。你可以提供更多的选项、更多的模型,和更多的场地。此外,你可以向更多的并发协作者开放你的设计空间,而不必担心应用的内存耗尽。 + +### 自我托管和 SaaS + +Penpot 是开源的,所以你不用必须在云上使用它,如果这不适合你的工作流程。你可以在一个容器中轻松地自我托管 Penpot,在你自己的工作站上作为一个本地应用使用,或者在你自己的服务器上为你的组织托管它。 + +### 开源设计 + +我以前写过一篇 [Penpot 的介绍性文章][6],自那以后,这个应用变得更好了。如果你想把程序员和相关人员带入你的设计过程中,那么请试试 Penpot。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/1/merge-design-code-penpot + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/20/12/eclipse +[2]: https://opensource.com/article/20/12/netbeans +[3]: http://penpot.app +[4]: https://opensource.com/article/21/9/open-source-design +[5]: https://opensource.com/sites/default/files/2022-07/Current%20Penpot%20interface.png +[6]: https://opensource.com/article/21/12/open-source-design-penpot +[0]: https://img.linux.net.cn/data/attachment/album/202302/17/143544u59tzeqplyhpt08h.jpg \ No newline at end of file diff --git a/translated/tech/20230204.0 ⭐️ Open source video captioning on Linux.md b/published/20230204.0 ⭐️ Open source video captioning on Linux.md similarity index 75% rename from translated/tech/20230204.0 ⭐️ Open source video captioning on Linux.md rename to published/20230204.0 ⭐️ Open source video captioning on Linux.md index 67ae18811e..cb0a29bad5 100644 --- a/translated/tech/20230204.0 ⭐️ Open source video captioning on Linux.md +++ b/published/20230204.0 ⭐️ Open source video captioning on Linux.md @@ -3,13 +3,17 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15554-1.html" -Linux 上的开源视频字幕 +Live Captions:Linux 上的开源视频字幕应用 ====== +![Image showing Live Captions presenting text from a Jitsi call. ][6] + +> Live Captions 是一个用于 Linux 桌面的应用程序,为视频提供即时、本地和开源的字幕。 + 在一个完美的世界里,所有的视频都会有文字说明,直播视频也会有字幕。这不仅是没有听力的人能够参与流行文化和视频聊天的要求,对于有听力的人来说,这也是一种奢侈,他们只是喜欢阅读所说的内容。但并不是所有的软件都有内置的字幕,有些软件是依靠第三方的云服务来实现的。[Live Captions][1] 是 Linux 桌面上的一个应用,为视频提供即时、本地和开源的字幕。 ### 安装 Live Captions @@ -19,8 +23,7 @@ Linux 上的开源视频字幕 如果你的 Linux 发行版没有附带软件中心,请从终端手动安装它。首先,添加 [Flathub][3] 仓库: ``` -$ flatpak remote-add --if-not-exists flathub \ -https://flathub.org/repo/flathub.flatpakrepo +$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ``` 接下来,安装应用: @@ -49,7 +52,7 @@ $ fuzzpak LiveCaptions ![Image showing preferences in Live Captions.][5] -你可以设置字体、字体大小、颜色等。默认情况下,Live Captions 没有 100% 把握的文本会以比你选择的字体颜色更深的颜色呈现。如果你使用实时字幕是为了方便,这可能没有必要,但如果你听不到视频,那么了解一下可能不正确的文字是不错的。 +你可以设置字体、字体大小、颜色等。默认情况下,Live Captions 不是完全确定的文本会以更深的颜色呈现(LCTT 校注:因为有些语音识别结果不能确保完全正确)。如果你使用实时字幕是为了方便,这可能没有必要,但如果你听不到视频的声音,那么知道哪些文本可能不正确是有用的。 你可以随时返回偏好页面,所以你的选择不一定是最终的。 @@ -57,15 +60,13 @@ $ fuzzpak LiveCaptions 当 Live Captions 开始运行,任何通过系统声音传来的英语单词都会被打印到 Live Captions 窗口中。 -![Image showing Live Captions presenting text from a Jitsi call. ][6] +这不是一项云服务。不需要 API 密钥。没有遥测或间谍活动,也没有数据收集。事实上,它甚至不需要网络权限。Live Captions 是开源的,所以没有使用专有的服务或库。 -这不是一项云服务。不需要 API 密钥。没有遥测或间谍活动,也没有数据收集。事实上,它甚至不需要网络权限。Live Captions 是开源的,所以没有使用专有服务或库。 - -要改变声音输入,请点击 **Live Captions** 窗口左上方的**麦克风**图标。要打开**偏好**窗口,请点击 **Live Captions** 窗口左下方的**齿轮**图标。 +要改变声音输入,请点击 Live Captions 窗口左上方的麦克风图标。要打开 “偏好Preferences” 窗口,请点击 Live Captions 窗口左下方的齿轮图标。 ### 开放访问 -根据我的经验,Live Captions 的结果是好的。它们并不完美,但在小型的 [Jitsi 视频通话][7]中,它很出色。即使是小众的视频(例如战锤 40,000 的激烈比赛),它也做得出奇地好,只在最虚构的科幻术语上磕磕碰碰。 +根据我的经验,Live Captions 的结果是好的。它们并不完美,但在小型的 [Jitsi 视频通话][7]中,它很出色。即使是小众的视频(例如 Warhammer 40K 的激烈比赛),它也做得出奇地好,只在最虚构的科幻术语上磕磕碰碰。 让开源代码易于访问是至关重要的,最终它有可能使每个人受益。我个人不需要 Live Captions,但当我不想听视频的时候,我喜欢使用它。当我希望得到帮助以专注于我可能会分心的事情时,我也会使用它。Live Captions 不仅仅是一个有趣的开源项目,它也是一个重要的项目。 @@ -76,7 +77,7 @@ via: https://opensource.com/article/23/2/live-captions-linux 作者:[Seth Kenlon][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md b/published/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md similarity index 63% rename from translated/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md rename to published/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md index e8f7d012c5..e4f7becec0 100644 --- a/translated/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md +++ b/published/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md @@ -3,25 +3,27 @@ [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15556-1.html" -Elementary OS 7 安装指南及截图 +elementary OS 7 安装指南(附截图) ====== -你好,技术人员,在这篇文章中,我们将介绍如何在笔记本电脑或台式机上一步一步地安装 Elementary OS 7,并附有截图。它是基于最新和稳定的 Ubuntu 22.04 LTS。 +![][0] -Elementary OS 7 的代号为 “Horus”,并带来了很多改进,例如: +在这篇文章中,我们将介绍如何在笔记本电脑或台式机上一步一步地安装 elementary OS 7,并附有截图。它基于最新和稳定的 Ubuntu 22.04 LTS。 + +elementary OS 7 的代号为 “Horus”,并带来了很多改进,例如: - 改进了 AppCenter 和安装所有需要的应用。 -- 改进了 Sideload 和可选商店 (Flathub) 的体验。 +- 改进了侧载和可选商店(Flathub)的体验。 - 最新的 GNOME Web 43,支持创建网络应用。 - 快速获得操作系统和应用的更新 - 电源配置文件管理 - 应用描述的改进 -##### Elementary OS 7 的系统要求 +### elementary OS 7 的系统要求 - 双核 64 位处理器 - 4GB 内存或更多 @@ -29,57 +31,57 @@ Elementary OS 7 的代号为 “Horus”,并带来了很多改进,例如: - 互联网接入 - 可启动的 USB 驱动器(4GB 存储空间) -闲话少说,让我们进入安装步骤 +闲话少说,让我们进入安装步骤: -### 1)下载 Elementary OS 7 +### 1)下载 elementary OS 7 使用下面的官方网址来下载 ISO 文件。 -- [下载 Elementary OS 7 ISO][1] +> **[下载 elementary OS 7 ISO][1]** ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动。 -在 Windows 操作系统中,用 “Rufus” 制作可启动的 USB 驱动器。在 Linux 中,请参考以下网址: +在 Windows 操作系统中,用 Rufus 制作可启动的 USB 驱动器。在 Linux 中,请参考以下网址: -- [如何在 Ubuntu/Linux Mint 上创建可启动的 USB 驱动器][2] +> **[如何在 Ubuntu/Linux Mint 上创建可启动的 USB 驱动器][2]** -### 2)用可启动媒体启动系统 +### 2)用可启动介质启动系统 -现在用可启动的 USB 驱动器启动目标系统。从 bios 设置中把启动介质从硬盘改为 USB。当系统用 USB 驱动器启动时,我们将看到以下页面。 +现在用可启动的 USB 驱动器启动目标系统。从 BIOS 设置中把启动介质从硬盘改为 USB。当系统用 USB 驱动器启动时,我们将看到以下页面。 ![][3] ### 3)选择安装语言 -选择你喜欢的语言,然后点击“选择”。 +选择你喜欢的语言,然后点击“选择Select”。 ![][4] ### 4)选择键盘布局 -在这一步,你将被要求选择键盘布局,然后点击“选择”。 +在这一步,你将被要求选择键盘布局,然后点击“选择Select”。 ![][5] -### 5) 尝试或安装 elementary OS +### 5)尝试或安装 elementary OS 我们将看到下面的页面,在这里我们必须选择安装类型。它给了我们以下选项: -- 试用演示模式 – 试用 Elementary OS 7 而不安装 -- 擦除磁盘并安装 – 安装程序将擦除整个磁盘并自动创建所需分区。 -- 自定义安装(高级)– 它将给我们一个选项来创建自定义分区。 +- 试用演示模式Try Demo Mode – 试用 elementary OS 7 而不安装 +- 擦除磁盘并安装Erase disk and Install – 安装程序将擦除整个磁盘并自动创建所需分区。 +- 自定义安装(高级)Custom Install (Advanced) – 它将给我们一个选项来创建自定义分区。 在这篇文章中,我将使用第二个选项(擦除磁盘并安装)。 ![][6] -点击“擦除磁盘并安装”。 +点击“擦除磁盘并安装Erase disk and Install”。 -在下面的屏幕上,选择要安装操作系统的驱动器,然后点击“擦除并安装”。 +在下面的屏幕上,选择要安装操作系统的驱动器,然后点击“擦除并安装Erase and Install”。 ![][7] -如果你想对设备的驱动器进行加密,那么点击“选择密码”,否则点击“不加密”。 +如果你想对设备的驱动器进行加密,那么点击“选择密码Choose Password”,否则点击“不加密Don’t Encrypt”。 ![][8] @@ -93,7 +95,7 @@ ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动 ![][10] -点击“重启设备”,不要忘记从 bios 设置中改变启动介质,以便用磁盘启动。 +点击“重启设备Restart Device”,不要忘记从 BIOS 设置中改变启动介质,以便用磁盘启动。 ### 7)创建本地用户并设置主机名 @@ -103,7 +105,7 @@ ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动 ![][11] -点击“完成设置”。 +点击“完成设置Finish Setup”。 在下面的页面中,你将被提示输入你在上面创建的本地用户凭证。 @@ -111,21 +113,21 @@ ISO 文件下载完成后,将其刻录到 USB 驱动器,并使其可启动 输入凭证后,点击回车。 -### 8)Elementary OS 7 欢迎页 +### 8)elementary OS 7 欢迎页 我们将看到下面的欢迎页。 ![][13] -选择“跳过所有”。 +选择“跳过所有Skip All”。 ![][14] -点击“开始使用”,然后我们会看到下面的桌面。 +点击“开始使用Get Started”,然后我们会看到下面的桌面。 ![][15] -很好,这表明你已经成功地在系统上安装了 Elementary OS 7。这就是本指南的全部内容,请探索这个令人兴奋的 Linux 发行版并享受其中的乐趣吧😊。 +很好,这表明你已经成功地在系统上安装了 elementary OS 7。这就是本指南的全部内容,请探索这个令人兴奋的 Linux 发行版并享受其中的乐趣吧😊。 -------------------------------------------------------------------------------- @@ -134,7 +136,7 @@ via: https://www.linuxtechi.com/elementary-os-7-installation-guide/ 作者:[Pradeep Kumar][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -154,4 +156,5 @@ via: https://www.linuxtechi.com/elementary-os-7-installation-guide/ [12]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Login-screen-elementaryos7.png?ezimgfmt=ng:webp/ngcb22 [13]: https://www.linuxtechi.com/wp-content/uploads/2023/02/ElementaryOS7-Welcome-Screen.png?ezimgfmt=ng:webp/ngcb22 [14]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Get-Started-ElementaryOS7.png?ezimgfmt=ng:webp/ngcb22 -[15]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Desktop-Screen-ElementaryOS7-After-Installation.png \ No newline at end of file +[15]: https://www.linuxtechi.com/wp-content/uploads/2023/02/Desktop-Screen-ElementaryOS7-After-Installation.png +[0]: https://img.linux.net.cn/data/attachment/album/202302/19/143743asfmbfrt7mc1tczb.jpg \ No newline at end of file diff --git a/published/20230207.1 ⭐️⭐️ A brief history of LibreOffice.md b/published/20230207.1 ⭐️⭐️ A brief history of LibreOffice.md new file mode 100644 index 0000000000..7c66ebe1a0 --- /dev/null +++ b/published/20230207.1 ⭐️⭐️ A brief history of LibreOffice.md @@ -0,0 +1,104 @@ +[#]: subject: "A brief history of LibreOffice" +[#]: via: "https://opensource.com/article/23/2/libreoffice-history" +[#]: author: "Italo Vignoli https://opensource.com/users/italovignoli" +[#]: collector: "lkxed" +[#]: translator: "onionstalgia" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15558-1.html" + +LibreOffice 简史 +====== + +![][0] + +> LibreOffice 的起源故事,它是一个开源的办公解决方案,确保你总是能够访问你的数据并控制你的创造力。 + +在 2009 年初,OpenOffice.org(OOo)还是微软 Office 在个人办公生产力套件市场的主要竞争对手。这个流行的开源办公套件的社区,期待着 11 月在意大利奥尔维耶托举行的研讨会。事情进展顺利,未来看起来很光明。 + +可这之后,同年 4 月,甲骨文公司Oracle 宣布了对 太阳计算机系统公司Sun Microsystems 的收购计划。 + +就个人而言,我觉得这对 OpenOffice.org 来说是个坏消息。甲骨文对开源套件没有兴趣,我料想它会放弃这个项目。当然,我更希望在研讨会上被证明是我想错了。但到最后,甲骨文只派了一名代表来到奥尔维耶托,乏善可陈,含糊其辞地谈论了货币化和品牌重塑。我和其他社区成员们都觉得,最担心的事情成真了。 + +那一年,社区成员从奥尔维耶托返程之后决定采取行动。是时候兑现 OpenOffice.org 项目的承诺了。我们决心创建一个独立的基金会来管理项目的资产,在社区的保护下促进套件的开发。OpenOffice.org 将不再隶属于哪一家公司,而是属于它的用户和个人贡献者们。 + +### 建立基金会 + +当时,OpenOffice.org 项目分布在世界各地,在语言社区帮助下进行本地化和推广,其中最主要的四个是: + +- 德国:该软件诞生于德国,而且 Star Division(负责 OpenOffice.org 的部门)的总部也在汉堡,因此开发者群体和德语支持者之间沟通顺畅。 +- 法国:政府支持这个开源软件。 +- 意大利:我所在的小组。 +- 巴西。 + +2010 年初,在法国和德国语言社区的倡议下,最活跃的志愿者 —— 连同一些独立开发者和 SUSE 的开发者们 —— 着手建立了一个复刻项目,旨在作为一个额外的选择,让全球社区和投资 OpenOffice.org 的企业能够同时参与进来。 + +我在国际商业咨询机构已有超过 30 年的工作经验了。在这个项目中负责市场营销和战略沟通。 + +随后的几个月里,活动越发忙碌。由于从 Star Division 传来的消息越来越负面,每周都得召开一次电话会议。 + +即使 OpenOffice.org 的解散似乎迫在眉睫,我们还是通过发布文章征稿(CFP)的方式,确认了位于布达佩斯的研讨会仍将举办。当然,复刻项目的成员在做的也和往年别无二致。他们提交了演讲提案并制定了旅行计划。 + +### 一个安全的文件存放处 + +夏初,复刻项目几乎要完成了。我们的小组在布达佩斯开会评估 OpenOffice.org 方面的境况,并召开了第一次面对面的组织会议。 + +布达佩斯的研讨会进行得很顺利,为期三天日程中举行了会议、主题演讲和技术研讨。一切似乎还算平常。 + +可其实并不平常。 + +当几位领头人没去参加会议的主要社交活动 —— 多瑙河上过夜巡游的时候,一些与会者开始有些疑虑了。其实我们没参加这次活动,是因为我们在餐厅开会敲定新基金会的最终细节,有太多事情要确保万无一失。我们必须定下公告日期,并且,为了协调基金会落地的各项任务,需要确定指导委员会的人员组成。 + +### LibreOffice + +从这次会议到 LibreOffice 发布间隔了三周,我们紧锣密鼓地准备。我拟好了发布策略和新闻稿,开发者们为软件做准备。应用的名字甚至是在发布的前几天的一次电话会议上敲定的,那时我在格罗塞托,正在参加意大利开源软件社区会议。 + +2010 年 9 月 28 日,我把宣布“文档基金会The Document Foundation”和 LibreOffice 的新闻稿分发到一个包含约 250 名记者的全球邮件列表中,这列表可是我根据供职过的公共关系机构的来信,花了很大力气整理的。 + +新闻稿是这样的: + +> 开发和推广 OpenOffice.org 的志愿者社区宣布将成立一个独立的基金会,推动项目的进一步发展。基金会将成为一个新的生态系统的基石,在这里,个人和组织都可以为一个真正免费的办公套件做出贡献,并从中受益。从用户的利益出发,这将带来更多的竞争和选择,并推动办公套件市场的创新。从现在开始,OpenOffice.org 社区将被称为“文档基金会The Document Foundation”。 + +我们邀请过 Oracle 成为基金会的成员,并捐赠社区在过去十年中发展起来的品牌。而在他们做出决定之前,我们选择了 LibreOffice 作为即将到来的软件的品牌。 + +媒体界对这一公告的反应非常积极。但另一方面,企业和分析师则倾向于对由社区管理的办公套件表示质疑,这是他们从未完全理解的实体,因为这个组织很扁平、任人唯贤。 + +公告发布后的两周内,就有 80 位新开发者加入这个项目,推翻了那些认为“仅凭 SUSE 和 Red Hat 的开发者来启动复刻项目并不现实”的预测。不出所料,大多数语言社区都转向了 LibreOffice。 + +LibreOffice 是基于 OpenOffice.org 的源代码构建的。但新的功能被集成在 Go-OOGo-Open Office 的源代码中,而不是在 OpenOffice.org(OOo)上。 + +出于这个原因,LibreOffice 的第一个版本(于 2011 年 1 月 25 日发布)为 3.3,以保持与 OpenOffice.org 的一致性。我们认为这对于从第一个版本迁移到新套件的用户很有帮助。由于还有必须解决的明显技术债务,该软件仍有点不成熟,这导致了一些问题和不稳定。这些问题预计将基本上通过 3.x 和 4.x 版本的代码清理和重构得到纠正。到了 5.x 和 6.x 版本,源代码应该已经稳定,并有条件改进用户界面,以及开发移动和云版本。 + +2011 年春天,甲骨文将 OpenOffice.org 源代码转让给了 Apache 软件基金会。但该项目仅持续了三年,它的上一个新版本已经是将近十年前的事了。 + +### 未来是开放的 + +文档基金会的组建过程于 2012 年初结束,并于 2012 年 2 月 17 日在柏林有关部门完成注册。因为创始人希望该项目的志愿者成员们也可以根据贡献成为基金会成员,这让注册过程十分漫长。德国的法规并未考虑到基金会的这一细节,因此需要对章程进行多次修订才能满足现有状况。 + +基金会成立之初的前两项活动都是委员会成员的选举。这是从单纯的志愿者过渡到基于贡献的文档基金会成员所必经的规程。有委员五人,副委员三人。最后,负责在行政和战略方面领导基金会的董事会,由七名成员和三名副手组成。 + +2012 年底,基金会聘请了第一位雇员 Florian Effenberger,在后来他被提升为执行董事。今天,这个团队有十几个成员,他们负责日常活动,例如协调项目、行政管理、网络基础设施管理、软件发布、指导新的开发人员、协调质量保证、用户界面的演进、以及营销和沟通。 + +目前,基金会正在寻找开发人员满足企业客户需求,例如 RTL 语言管理和辅助功能。这些功能并不是由 LibreOffice 生态系统中的公司开发的,这些公司为他们提供功能开发服务、三级支持以及为企业需求优化的软件的长期支持版本。 + +在 LibreOffice 和文档基金会宣布成立已经过去 12 年之后,我们可以说,我们已经实现了开发一个独立的“自由和开源软件free and open source(FOSS)”的项目目标。我们的项目是基于一个由个人志愿者和公司量力而行做出贡献的扩展社区。参与者们帮助创建了无与伦比的免费办公套件,并通过采用和发展现有市场上唯一真正的标准办公文档格式Open Document Format(ODF)来支持开放标准。同时,该套件也确保了与专有的 OOXML 格式的出色兼容性。 + +这种模式的可持续性是一个日常问题。身处于与大型科技公司的激烈竞争下,我们一直在尝试,试图在“希望一切都免费”,和“希望每个用户都能力所能及做出贡献”之间达成一种平衡。不过无论如何,LibreOffice 都会是开源的办公套件,这提供了竞争之上的额外价值。 + +试试 LibreOffice 吧;捐赠;不论是工作还是业余,支持它;向你的朋友介绍它!LibreOffice 是一个开源的办公解决方案,它确保你总是能够访问你的数据,并掌控你的创造力。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/2/libreoffice-history + +作者:[Italo Vignoli][a] +选题:[lkxed][b] +译者:[onionstalgia](https://github.com/onionstalgia) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/italovignoli +[b]: https://github.com/lkxed/ + +[0]: https://img.linux.net.cn/data/attachment/album/202302/20/191328egg1odg1gegdgd91.jpg \ No newline at end of file diff --git a/published/20230209.1 ⭐️ GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago.md b/published/20230209.1 ⭐️ GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago.md new file mode 100644 index 0000000000..2415eb273e --- /dev/null +++ b/published/20230209.1 ⭐️ GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago.md @@ -0,0 +1,83 @@ +[#]: subject: "GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago" +[#]: via: "https://news.itsfoss.com/gnome-design-quick-access/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "SJFCS" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15551-1.html" + +GNOME 正在(某种程度上)恢复在几年前删除的功能 +====== + +> GNOME 的设计做了一些有意义的变化,它(某种程度上)带回了一个它早先删除的类似功能。 + +![GNOME 正在(某种程度上)恢复它几年前删除的功能][1] + +几年前,GNOME 移除了应用程序的菜单和指示器。 + +如果你不太清楚,应用程序指示器是一种从顶部面板与后台运行的应用程序进行交互的方式。 + +是的,你可以 [添加一个应用程序指示器的扩展][2] 来获得同样的功能。但是,在使用 GNOME 桌面环境的发行版上,如 Fedora,你不再能找到默认的能力。 + +然而,Ubuntu,它的一些 [官方版本][3],以及其他发行版如 Pop!_OS,支持系统托盘图标,尽管 GNOME 放弃了它们。 + +现在,经过多年的设计变化,看起来我们可能会看到类似的东西。 + +### GNOME 将添加一个检查后台活动程序的简便方法 + +目前,在没有活动窗口的情况下,找出在后台运行的应用程序并没有简便的方法。 + +你必须使用 [任务管理器][4] 或 [系统监控工具][5] 以获得更好的观测能力。 + +在未来的 GNOME 版本中(可能是 GNOME 44),你或许可以期待有一个功能可以直接从顶部面板的菜单面板上监控后台运行的应用程序。 + +![GNOME 设计模拟图,用于从通知菜单中检查后台应用程序][6] + +[Allan Day][7] 的想法仍在讨论中,他分享了一个 [设计模拟图][8]。不过,它很有可能会被接受。 + +这个想法也促使开发者 [Georges Basile Stavracas Neto][9] 披露了 Flatpak 的 xdg-desktop-portal 组件,它可以使得检测运行中的 Flatpak 应用程序变得容易。 + +> 📋 检查后台应用程序这个功能的位置或设计仍在进行中;你在上面看到的内容可能会随着最终的实施而改变。 + +### 这是否也会使应用指示器回归? + +并非如此。 + +通过这个功能,GNOME 旨在让你快速看到后台运行的应用程序,并对它们进行管理(关闭它们或访问特定的设置)。 + +然而,你仍需要少量点击来达到这一点 🖱️。 + +小程序指示器或系统托盘图标是访问在后台运行的应用程序更快捷的方式,尽管不是每个后台应用程序都被列出。 + +毕竟,这总比没有好。 + +而最终,这些设计上的变化可能会产生一种直观的方式,以某种形式让应用指示器回归。 + +💬 你对这个决定与即将发布的 GNOME 设计变化有何看法?请在下面的评论中分享你的想法。 + +参考:[Phoronix][10] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-design-quick-access/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[SJFCS](https://github.com/SJFCS) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w2000/2023/02/gnome-brings-mysterious-features.png +[2]: https://itsfoss.com/enable-applet-indicator-gnome/ +[3]: https://itsfoss.com/which-ubuntu-install/ +[4]: https://itsfoss.com/task-manager-linux/ +[5]: https://itsfoss.com/linux-system-monitoring-tools/ +[6]: https://news.itsfoss.com/content/images/2023/02/background-app-running.png +[7]: https://gitlab.gnome.org/aday +[8]: https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191 +[9]: https://github.com/GeorgesStavracas +[10]: https://www.phoronix.com/news/GNOME-Monitor-Background-Apps diff --git a/translated/tech/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md b/published/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md similarity index 69% rename from translated/tech/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md rename to published/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md index 23ebb50450..a5edf9b39f 100644 --- a/translated/tech/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md +++ b/published/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md @@ -3,18 +3,22 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15541-1.html" -用我们的新指南开始开发 WebAssembly +跟着我们的新指南学习开发 WebAssembly ====== -在过去的几十年里,Web 浏览器作为最流行的跨平台应用经久不衰。从另一个角度看浏览器,它是最受欢迎的应用交付平台之一。想想你使用的所有网站,它们取代了你过去用桌面上运行的软件进行的活动。你仍然在使用软件,但你是通过浏览器来访问它,而且是在别人的 Linux 服务器上运行。在优化我们所有人使用的软件的永恒努力中,软件开发世界早在 2019 年就引入了 WebAssembly,作为通过 Web 浏览器运行编译代码的一种方式。应用的性能比以往任何时候都要好,而且编码的选择远远超出了PHP、Python 和 JavaScript 的通常列表。 +![][0] + +> 使用 WebAssembly 开发有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。 + +在过去的几十年里,Web 浏览器作为最流行的跨平台应用经久不衰。从另一个角度看浏览器,它是最受欢迎的应用交付平台之一。想想你使用的所有网站,它们取代了你过去用桌面上运行的软件进行的活动。你仍然在使用软件,但你是通过浏览器来访问它,而且是在别人的 Linux 服务器上运行。在优化我们所有人使用的软件的永恒努力中,软件开发世界早在 2019 年就引入了 WebAssembly,作为通过 Web 浏览器运行编译代码的一种方式。应用的性能比以往任何时候都要好,而且可以生成 WebAssembly 编码的语言远不只是通常的 PHP、Python 和 JavaScript。 ### 一个目标和一种语言 -关于 WebAssembly 的一个强大但也最令人困惑的地方是,“webassembly ”这个词既指一种语言,也指一个目标。WebAssembly 是一种汇编语言,但没有多少人选择直接用汇编写代码。即使是汇编语言,最终也会被转换为二进制格式,这也是计算机运行代码的要求。这种二进制格式也被称为 WebAssembly。不过这很好,因为这意味着你可以用你选择的语言来写一些最终以 WebAssembly 交付的东西,包括 C、C++、Rust、Javascript 和其他许多语言。 +关于 WebAssembly 的一个强大但也最令人困惑的地方是,“WebAssembly” 这个词既指一种语言,也指一个目标。WebAssembly 是一种汇编语言,但没有多少人选择直接用汇编写代码。即使是汇编语言,最终也会被转换为二进制格式,这也是计算机运行代码的要求。这种二进制格式也被称为 WebAssembly。不过这很好,因为这意味着你可以用你选择的语言来写一些最终以 WebAssembly 交付的东西,包括 C、C++、Rust、Javascript 和其他许多语言。 进入 WebAssembly 的途径是 Emscripten,这是一个 LLVM 编译器工具链,可以从你的代码中产生 WebAssembly。 @@ -23,8 +27,7 @@ 要在你的 Linux 或 macOS 电脑上安装 Emscripten,请使用 Git: ``` -$ git clone \ -https://github.com/emscripten-core/emsdk.git +$ git clone https://github.com/emscripten-core/emsdk.git ``` 改变目录进入 `emsdk` 目录并运行安装命令: @@ -34,7 +37,7 @@ $ ./emsdk install latest $ ./emsdk activate latest ``` -Emscripten 工具链中的所有内容都安装在 `emsdk` 目录下,对系统的其他部分没有影响。由于这个原因,在使用 `emsdk` 之前,你必须 source 它的环境: +Emscripten 工具链中的所有内容都安装在 `emsdk` 目录下,对系统的其他部分没有影响。由于这个原因,在使用 `emsdk` 之前,你必须 源引source 它的环境: ``` $ source ./emsdk_env.sh @@ -44,11 +47,11 @@ $ source ./emsdk_env.sh 要在 Windows 上安装 Emscripten,你可以在 WSL 环境下运行 Linux。 -请访问 [Emscripten 网站][1]了解更多安装信息。 +请访问 [Emscripten 网站][1] 了解更多安装信息。 -### Hello world +### Hello World -下面是一个用 C++ 编写的简单的 “hello world” 应用。 +下面是一个用 C++ 编写的简单的 “Hello World” 应用。 ``` #include @@ -85,7 +88,9 @@ $ emrun ./world.html ### 学习更多关于 WebAssembly 的知识 -为 WebAssembly 开发可以有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。如果你了解 C 或 C++,那么你可以用这些来写你的项目。如果你正在学习 Rust,那么你可以使用 Rust。甚至 Python 代码也可以使用 Pyodide 模块来作为 WebAssembly 运行。你有很多选择,而且没有错误的开始方式(甚至有 COBOL 到 WebAssembly 的编译器)。如果你渴望开始使用 WebAssembly,[请下载我们免费的电子书][2]。 +使用 WebAssembly 开发可以有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。如果你了解 C 或 C++,那么你可以用这些来写你的项目。如果你正在学习 Rust,那么你可以使用 Rust。甚至 Python 代码也可以使用 Pyodide 模块来作为 WebAssembly 运行。你有很多选择,而且没有错误的开始方式(甚至有 COBOL 到 WebAssembly 的编译器)。如果你渴望开始使用 WebAssembly, + +> **[请下载我们免费的电子书][2]** -------------------------------------------------------------------------------- @@ -94,7 +99,7 @@ via: https://opensource.com/article/23/2/webassembly-guide 作者:[Seth Kenlon][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -102,3 +107,4 @@ via: https://opensource.com/article/23/2/webassembly-guide [b]: https://github.com/lkxed/ [1]: https://emscripten.org/ [2]: https://opensource.com/downloads/webassembly-ebook +[0]: https://img.linux.net.cn/data/attachment/album/202302/15/204034uy4t9h6z6o06hj6j.jpg \ No newline at end of file diff --git a/published/20230210.0 ⭐️ Opera Browser Plans to Integrate ChatGPT.md b/published/20230210.0 ⭐️ Opera Browser Plans to Integrate ChatGPT.md new file mode 100644 index 0000000000..780563f5bd --- /dev/null +++ b/published/20230210.0 ⭐️ Opera Browser Plans to Integrate ChatGPT.md @@ -0,0 +1,61 @@ +[#]: subject: "Opera Browser Plans to Integrate ChatGPT" +[#]: via: "https://debugpointnews.com/opera-chatgpt-integration/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "gpchn" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15547-1.html" + +Opera 浏览器计划集成 ChatGPT +====== + +![][1] + +> 据报道,Opera 浏览器正在寻求将语言模型 ChatGPT 集成到其桌面和移动产品中。 + +### 摘要 + +- 据报道,流行的桌面和移动网络浏览器 Opera 浏览器正在探索将语言模型 ChatGPT 集成到其产品中。 +- 微软最近宣布将 ChatGPT 的制造商 OpenAI 技术集成到其 Edge 网络浏览器中,为用户添加人工智能功能。 + +### Opera 与 ChatGPT + +[Opera][2],一个被广泛使用的桌面和移动网络浏览器,将把语言模型 ChatGPT 集成到它的软件产品中。Opera 的母公司昆仑科技是这一新闻的幕后推手,尽管这次集成的细节仍然有限。Opera 提供了一系列软件产品,包括桌面网络浏览器、移动网络浏览器以及其为 Chromebook 设计的浏览器版本。 + +最有可能整合 ChatGPT 的是 Opera 的主要桌面浏览器,包括 Opera 浏览器和 Opera GX(这是一款为游戏玩家设计的浏览器)。然而,也有可能集成到 Opera 的移动浏览器中,包括常规的 Opera 移动浏览器、Opera Mini 和 Opera Crypto 浏览器。 + +### 来自微软和谷歌的最新更新 + +微软上周宣布将 OpenAI 集成到其 Edge 网络浏览器中,成为头条新闻。这种集成将在未来为 Edge 用户带来两种人工智能功能,即 “Chat聊天” 和 “撰写Compose”。“聊天”功能可以让用户在浏览器中直接与人工智能交流。同时,“撰写”功能帮助用户进行文本撰写,包括使用不同的语气和长度撰写电子邮件和社交媒体帖子。 + +在最近的一次演示中,谷歌没有宣布将人工智能聊天机器人直接集成到其 Chrome 浏览器中,这一举措得到的回应并不热烈。 + +### 下一步是什么 + +据 Statcounter 统计,Opera 浏览器被数亿用户使用,在全球浏览器市场占有 2.4% 的份额。虽然它可能落后于谷歌 Chrome 的 65% 和 Safari 的 18%,但与 Mozilla Firefox 的 3% 相比,它仍然保持着自己的优势。 + +昆仑科技是一家在深圳证券交易所上市的北京公司。本周,中国搜索巨头百度宣布计划在其搜索产品中集成 ChatGPT 风格的机器人。 + +总之,ChatGPT 与 Opera 浏览器的集成代表着人工智能网络浏览向前迈出的重要一步。随着微软和百度等公司将人工智能技术融入其产品,Opera 将自己定位为该领域的领导者。 + +随着数亿用户和浏览器市场的日益增长,ChatGPT 与 Opera 的集成是一项备受期待的发展。 + +参考:[CNBC][3] + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/opera-chatgpt-integration/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[gpchn](https://github.com/gpchn) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2023/02/opera.jpg +[2]: https://www.opera.com/ +[3]: https://www.cnbc.com/2023/02/09/web-browser-opera-is-planning-to-incorporate-chatgpt.html diff --git a/sources/news/20230207.2 ⭐️ Lightweight Distro LegacyOS 2023 Released After Nine Years.md b/sources/news/20230207.2 ⭐️ Lightweight Distro LegacyOS 2023 Released After Nine Years.md index fd2729927c..ec1aef9a0e 100644 --- a/sources/news/20230207.2 ⭐️ Lightweight Distro LegacyOS 2023 Released After Nine Years.md +++ b/sources/news/20230207.2 ⭐️ Lightweight Distro LegacyOS 2023 Released After Nine Years.md @@ -2,7 +2,7 @@ [#]: via: "https://debugpointnews.com/legacy-os-2023-release/" [#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "Cubik65536" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -56,7 +56,7 @@ via: https://debugpointnews.com/legacy-os-2023-release/ 作者:[arindam][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Cubik65536](https://github.com/Cubik65536) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/news/20230209.1 ⭐️ GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago.md b/sources/news/20230209.1 ⭐️ GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago.md deleted file mode 100644 index 6ae64d5e3a..0000000000 --- a/sources/news/20230209.1 ⭐️ GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago.md +++ /dev/null @@ -1,83 +0,0 @@ -[#]: subject: "GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago" -[#]: via: "https://news.itsfoss.com/gnome-design-quick-access/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago -====== - -GNOME design changes makes sense, as it brings back (sort of) a similar functionality that it removed earlier. - -![GNOME is (kind of) Bringing Back a Feature It Had Removed a Few Years Ago][1] - -GNOME removed the application menus and indicators a few years back. - -If you are curious, app indicators were a way of interacting with the apps running in the background from the top panel. - -Yes, you can [add an extension for app indicators][2] to get the same functionality. But, you will no longer find the ability by default on distributions using stock GNOME desktop environment, like Fedora. - -However, Ubuntu, some of its [official flavors][3], and other distributions like Pop!_OS support the system tray icons even though GNOME dropped them. - -Now, after years of design changes, it looks like we might be seeing something similar. - -### GNOME to Add a Quick Way to Check Active Apps in the Background - -Currently, there's no quick way to find out the apps running in the background without an active window. - -You must use the [task manager][4] or [system monitoring tools][5] for better insights. - -With future GNOME releases (probably GNOME 44), you may expect **a feature to monitor background running apps** right from the **menu panel** of the top panel. - -![gnome design mockup for backround app check from the notification menu][6] - -The idea by [Allan Day][7] is still in discussion, and a [design mockup][8] has been shared. However, there is a good chance that it will be accepted. - -This idea has also prompted developer [Georges Basile Stavracas Neto][9] to expose Flatpak's xdg-desktop-portal component, making it easy to detect running Flatpak applications. - -> 📋 The placement or design of checking background apps is still a work in progress; what you see above may change with the final implementation. - -### Would This Bring Back App Indicators Too? - -Not exactly. - -With this feature, GNOME aims to allow you to quickly see the background running apps and manage them (close them or access specific settings). - -However, you still have a few clicks to reach this point 🖱️ - -The applet indicators or the system tray icons were a faster way to access applications running in the background, even though not every background app was listed. - -After all, it is better than nothing. - -And eventually, these design changes could result in an intuitive way to get app indicators back in some form. - -_💬 What do you think about this decision with GNOME design changes for upcoming releases? Share your thoughts in the comments below._ - -**Via**: [Phoronix][10] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/gnome-design-quick-access/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed/ -[1]: https://news.itsfoss.com/content/images/size/w2000/2023/02/gnome-brings-mysterious-features.png -[2]: https://itsfoss.com/enable-applet-indicator-gnome/ -[3]: https://itsfoss.com/which-ubuntu-install/ -[4]: https://itsfoss.com/task-manager-linux/ -[5]: https://itsfoss.com/linux-system-monitoring-tools/ -[6]: https://news.itsfoss.com/content/images/2023/02/background-app-running.png -[7]: https://gitlab.gnome.org/aday -[8]: https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191 -[9]: https://github.com/GeorgesStavracas -[10]: https://www.phoronix.com/news/GNOME-Monitor-Background-Apps diff --git a/sources/news/20230210.0 ⭐️ Opera Browser Plans to Integrate ChatGPT.md b/sources/news/20230210.0 ⭐️ Opera Browser Plans to Integrate ChatGPT.md deleted file mode 100644 index 460a855346..0000000000 --- a/sources/news/20230210.0 ⭐️ Opera Browser Plans to Integrate ChatGPT.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: subject: "Opera Browser Plans to Integrate ChatGPT" -[#]: via: "https://debugpointnews.com/opera-chatgpt-integration/" -[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Opera Browser Plans to Integrate ChatGPT -====== - -![][1] - -**Opera browser is reportedly looking to integrate the language model ChatGPT into its desktop and mobile products.** - -### In brief - -- Opera browser, a popular desktop and mobile web browser is reportedly exploring integrating the language model ChatGPT into its products. -- Microsoft recently announced the integration of OpenAI technology, the maker of ChatGPT, into its Microsoft Edge web browser, adding AI-powered features for users. - -### Opera and ChatGPT - -[Opera][2], a widely-used desktop and mobile web browser is set to integrate the language model ChatGPT into its software products. Opera’s parent company Kunlun Tech is behind the news, although the details of the integration remain limited. Opera offers a range of software products, including desktop web browsers, mobile web browsers, and a version of its browser designed for Chromebooks. - -The most likely candidates for the ChatGPT integration are Opera’s main desktop browsers, including Opera browser and Opera GX, a browser designed for gamers. However, there is also potential for integration into Opera’s mobile browsers, including the regular Opera mobile browser, Opera Mini, and Opera Crypto Browser. - -### Recent updates from Microsoft and Google - -Microsoft made headlines this week by announcing OpenAI integration into its Microsoft Edge web browser. The integration will bring two AI-powered features, Chat and Compose, to Edge users in the future. Chat allows users to communicate directly with the AI in the browser. At the same time, Compose helps users with text composition, including writing emails and social media posts with different tones and lengths. - -During a recent presentation, Google did not announce direct AI chatbot integration into its Chrome browser, which received a less-than-enthusiastic response. - -### What’s next - -Opera browser is used by hundreds of millions of users, with a 2.4% share of the global browser market, according to Statcounter. While it may trail behind Google Chrome’s 65% and Safari’s 18%, it still holds its own compared to Mozilla Firefox’s 3%. - -Kunlun Tech is a Beijing-based company listed on the Shenzhen stock exchange. This week, Chinese search giant Baidu announced plans to integrate a ChatGPT-style bot into its search product. - -In conclusion, the integration of ChatGPT into the Opera browser represents a significant step forward in AI-powered web browsing. As companies like Microsoft and Baidu integrate AI technology into their products, Opera is positioning itself as a leader in the field. - -With hundreds of millions of users and a growing presence in the browser market, the integration of ChatGPT into Opera is a highly-anticipated development. - -Via [CNBC][3] - --------------------------------------------------------------------------------- - -via: https://debugpointnews.com/opera-chatgpt-integration/ - -作者:[arindam][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://debugpointnews.com/author/dpicubegmail-com/ -[b]: https://github.com/lkxed -[1]: https://debugpointnews.com/wp-content/uploads/2023/02/opera.jpg -[2]: https://www.opera.com/ -[3]: https://www.cnbc.com/2023/02/09/web-browser-opera-is-planning-to-incorporate-chatgpt.html diff --git a/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md b/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md deleted file mode 100644 index 33c7b47d73..0000000000 --- a/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md +++ /dev/null @@ -1,147 +0,0 @@ -[#]: subject: "How to Use a Differential Analyzer (to Murder People)" -[#]: via: "https://twobithistory.org/2020/04/06/differential-analyzer.html" -[#]: author: "Two-Bit History https://twobithistory.org" -[#]: collector: "lujun9972" -[#]: translator: "toknow-gh" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Use a Differential Analyzer (to Murder People) -====== - -A differential analyzer is a mechanical, analog computer that can solve differential equations. Differential analyzers aren’t used anymore because even a cheap laptop can solve the same equations much faster—and can do it in the background while you stream the new season of Westworld on HBO. Before the invention of digital computers though, differential analyzers allowed mathematicians to make calculations that would not have been practical otherwise. - -It is hard to see today how a computer made out of anything other than digital circuitry printed in silicon could work. A mechanical computer sounds like something out of a steampunk novel. But differential analyzers did work and even proved to be an essential tool in many lines of research. Most famously, differential analyzers were used by the US Army to calculate range tables for their artillery pieces. Even the largest gun is not going to be effective unless you have a range table to help you aim it, so differential analyzers arguably played an important role in helping the Allies win the Second World War. - -To understand how differential analyzers could do all this, you will need to know what differential equations are. Forgotten what those are? That’s okay, because I had too. - -### Differential Equations - -Differential equations are something you might first encounter in the final few weeks of a college-level Calculus I course. By that point in the semester, your underpaid adjunct professor will have taught you about limits, derivatives, and integrals; if you take those concepts and add an equals sign, you get a differential equation. - -Differential equations describe rates of change in terms of some other variable (or perhaps multiple other variables). Whereas a familiar algebraic expression like \\(y = 4x + 3\\) specifies the relationship between some variable quantity \\(y\\) and some other variable quantity \\(x\\), a differential equation, which might look like \\(\frac{dy}{dx} = x\\), or even \\(\frac{dy}{dx} = 2\\), specifies the relationship between a _rate of change_ and some other variable quantity. Basically, a differential equation is just a description of a rate of change in exact mathematical terms. The first of those last two differential equations is saying, “The variable \\(y\\) changes with respect to \\(x\\) at a rate defined exactly by \\(x\\),” and the second is saying, “No matter what \\(x\\) is, the variable \\(y\\) changes with respect to \\(x\\) at a rate of exactly 2.” - -Differential equations are useful because in the real world it is often easier to describe how complex systems change from one instant to the next than it is to come up with an equation describing the system at all possible instants. Differential equations are widely used in physics and engineering for that reason. One famous differential equation is the heat equation, which describes how heat diffuses through an object over time. It would be hard to come up with a function that fully describes the distribution of heat throughout an object given only a time \\(t\\), but reasoning about how heat diffuses from one time to the next is less likely to turn your brain into soup—the hot bits near lots of cold bits will probably get colder, the cold bits near lots of hot bits will probably get hotter, etc. So the heat equation, though it is much more complicated than the examples in the last paragraph, is likewise just a description of rates of change. It describes how the temperature of any one point on the object will change over time given how its temperature differs from the points around it. - -Let’s consider another example that I think will make all of this more concrete. If I am standing in a vacuum and throw a tennis ball straight up, will it come back down before I asphyxiate? This kind of question, posed less dramatically, is the kind of thing I was asked in high school physics class, and all I needed to solve it back then were some basic Newtonian equations of motion. But let’s pretend for a minute that I have forgotten those equations and all I can remember is that objects accelerate toward earth at a constant rate of \\(g\\), or about \\(10 \;m/s^2\\). How can differential equations help me solve this problem? - -Well, we can express the one thing I remember about high school physics as a differential equation. The tennis ball, once it leaves my hand, will accelerate toward the earth at a rate of \\(g\\). This is the same as saying that the velocity of the ball will change (in the negative direction) over time at a rate of \\(g\\). We could even go one step further and say that _the rate of change in the height of my ball above the ground_ (this is just its velocity) will change over time at a rate of negative \\(g\\). We can write this down as the following, where \\(h\\) represents height and \\(t\\) represents time: - -\\[\frac{d^2h}{dt^2} = -g\\] - -This looks slightly different from the differential equations we have seen so far because this is what is known as a second-order differential equation. We are talking about the rate of change of a rate of change, which, as you might remember from your own calculus education, involves second derivatives. That’s why parts of the expression on the left look like they are being squared. But this equation is still just expressing the fact that the ball accelerates downward at a constant acceleration of \\(g\\). - -From here, one option I have is to use the tools of calculus to solve the differential equation. With differential equations, this does not mean finding a single value or set of values that satisfy the relationship but instead finding a function or set of functions that do. Another way to think about this is that the differential equation is telling us that there is some function out there whose second derivative is the constant \\(-g\\); we want to find that function because it will give us the height of the ball at any given time. This differential equation happens to be an easy one to solve. By doing so, we can re-derive the basic equations of motion that I had forgotten and easily calculate how long it will take the ball to come back down. - -But most of the time differential equations are hard to solve. Sometimes they are even impossible to solve. So another option I have, given that I paid more attention in my computer science classes that my calculus classes in college, is to take my differential equation and use it as the basis for a simulation. If I know the starting velocity and the acceleration of my tennis ball, then I can easily write a little for-loop, perhaps in Python, that iterates through my problem second by second and tells me what the velocity will be at any given second \\(t\\) after the initial time. Once I’ve done that, I could tweak my for-loop so that it also uses the calculated velocity to update the height of the ball on each iteration. Now I can run my Python simulation and figure out when the ball will come back down. My simulation won’t be perfectly accurate, but I can decrease the size of the time step if I need more accuracy. All I am trying to accomplish anyway is to figure out if the ball will come back down while I am still alive. - -This is the numerical approach to solving a differential equation. It is how differential equations are solved in practice in most fields where they arise. Computers are indispensable here, because the accuracy of the simulation depends on us being able to take millions of small little steps through our problem. Doing this by hand would obviously be error-prone and take a long time. - -So what if I were not just standing in a vacuum with a tennis ball but were standing in a vacuum with a tennis ball in, say, 1936? I still want to automate my computation, but Claude Shannon won’t even complete his master’s thesis for another year yet (the one in which he casually implements Boolean algebra using electronic circuits). Without digital computers, I’m afraid, we have to go analog. - -### The Differential Analyzer - -The first differential analyzer was built between 1928 and 1931 at MIT by Vannevar Bush and Harold Hazen. Both men were engineers. The machine was created to tackle practical problems in applied mathematics and physics. It was supposed to address what Bush described, in [a 1931 paper][1] about the machine, as the contemporary problem of mathematicians who are “continually being hampered by the complexity rather than the profundity of the equations they employ.” - -A differential analyzer is a complicated arrangement of rods, gears, and spinning discs that can solve differential equations of up to the sixth order. It is like a digital computer in this way, which is also a complicated arrangement of simple parts that somehow adds up to a machine that can do amazing things. But whereas the circuitry of a digital computer implements Boolean logic that is then used to simulate arbitrary problems, the rods, gears, and spinning discs _directly_ simulate the differential equation problem. This is what makes a differential analyzer an analog computer—it is a direct mechanical analogy for the real problem. - -How on earth do gears and spinning discs do calculus? This is actually the easiest part of the machine to explain. The most important components in a differential analyzer are the six mechanical integrators, one for each order in a sixth-order differential equation. A mechanical integrator is a relatively simple device that can integrate a single input function; mechanical integrators go back to the 19th century. We will want to understand how they work, but, as an aside here, Bush’s big accomplishment was not inventing the mechanical integrator but rather figuring out a practical way to chain integrators together to solve higher-order differential equations. - -A mechanical integrator consists of one large spinning disc and one much smaller spinning wheel. The disc is laid flat parallel to the ground like the turntable of a record player. It is driven by a motor and rotates at a constant speed. The small wheel is suspended above the disc so that it rests on the surface of the disc ever so slightly—with enough pressure that the disc drives the wheel but not enough that the wheel cannot freely slide sideways over the surface of the disc. So as the disc turns, the wheel turns too. - -The speed at which the wheel turns will depend on how far from the center of the disc the wheel is positioned. The inner parts of the disc, of course, are rotating more slowly than the outer parts. The wheel stays fixed where it is, but the disc is mounted on a carriage that can be moved back and forth in one direction, which repositions the wheel relative to the center of the disc. Now this is the key to how the integrator works: The position of the disc carriage is driven by the input function to the integrator. The output from the integrator is determined by the rotation of the small wheel. So your input function drives the rate of change of your output function and you have just transformed the derivative of some function into the function itself—which is what we call integration! - -If that explanation does nothing for you, seeing a mechanical integrator in action really helps. The principle is surprisingly simple and there is no way to watch the device operate without grasping how it works. So I have created [a visualization of a running mechanical integrator][2] that I encourage you to take a look at. The visualization shows the integration of some function \\(f(x)\\) into its antiderivative \\(F(x)\\) while various things spin and move. It’s pretty exciting. - -![][3] _A nice screenshot of my visualization, but you should check out the real thing!_ - -So we have a component that can do integration for us, but that alone is not enough to solve a differential equation. To explain the full process to you, I’m going to use an example that Bush offers himself in his 1931 paper, which also happens to be essentially the same example we contemplated in our earlier discussion of differential equations. (This was a happy accident!) Bush introduces the following differential equation to represent the motion of a falling body: - -\\[\frac{d^2x}{dt^2} = -k\,\frac{dx}{dt} - g\\] - -This is the same equation we used to model the motion of our tennis ball, only Bush has used \\(x\\) in place of \\(h\\) and has added another term that accounts for how air resistance will decelerate the ball. This new term describes the effect of air resistance on the ball in the simplest possible way: The air will slow the ball’s velocity at a rate that is proportional to its velocity (the \\(k\\) here is some proportionality constant whose value we don’t really care about). So as the ball moves faster, the force of air resistance will be stronger, further decelerating the ball. - -To configure a differential analyzer to solve this differential equation, we have to start with what Bush calls the “input table.” The input table is just a piece of graphing paper mounted on a carriage. If we were trying to solve a more complicated equation, the operator of the machine would first plot our input function on the graphing paper and then, once the machine starts running, trace out the function using a pointer connected to the rest of the machine. In this case, though, our input is just the constant \\(g\\), so we only have to move the pointer to the right value and then leave it there. - -What about the other variables \\(x\\) and \\(t\\)? The \\(x\\) variable is our output as it represents the height of the ball. It will be plotted on graphing paper placed on the output table, which is similar to the input table only the pointer is a pen and is driven by the machine. The \\(t\\) variable should do nothing more than advance at a steady rate. (In our Python simulation of the tennis ball problem as posed earlier, we just incremented \\(t\\) in a loop.) So the \\(t\\) variable comes from the differential analyzer’s motor, which kicks off the whole process by rotating the rod connected to it at a constant speed. - -Bush has a helpful diagram documenting all of this that I will show you in a second, but first we need to make one more tweak to our differential equation that will make the diagram easier to understand. We can integrate both sides of our equation once, yielding the following: - -\\[\frac{dx}{dt} = - \int \left(k\,\frac{dx}{dt} + g\right)\,dt\\] - -The terms in this equation map better to values represented by the rotation of various parts of the machine while it runs. Okay, here’s that diagram: - -![][4] _The differential analyzer configured to solve the problem of a falling body in one dimension._ - -The input table is at the top of the diagram. The output table is at the bottom-right. The output table here is set up to graph both \\(x\\) and \\(\frac{dx}{dt}\\), i.e. height and velocity. The integrators appear at the bottom-left; since this is a second-order differential equation, we need two. The motor drives the very top rod labeled \\(t\\). (Interestingly, Bush referred to these horizontal rods as “buses.”) - -That leaves two components unexplained. The box with the little \\(k\\) in it is a multiplier respresnting our proportionality constant \\(k\\). It takes the rotation of the rod labeled \\(\frac{dx}{dt}\\) and scales it up or down using a gear ratio. The box with the \\(\sum\\) symbol is an adder. It uses a clever arrangement of gears to add the rotations of two rods together to drive a third rod. We need it since our equation involves the sum of two terms. These extra components available in the differential analyzer ensure that the machine can flexibly simulate equations with all kinds of terms and coefficients. - -I find it helpful to reason in ultra-slow motion about the cascade of cause and effect that plays out as soon as the motor starts running. The motor immediately begins to rotate the rod labeled \\(t\\) at a constant speed. Thus, we have our notion of time. This rod does three things, illustrated by the three vertical rods connected to it: it drives the rotation of the discs in both integrators and also advances the carriage of the output table so that the output pen begins to draw. - -Now if the integrators were set up so that their wheels are centered, then the rotation of rod \\(t\\) would cause no other rods to rotate. The integrator discs would spin but the wheels, centered as they are, would not be driven. The output chart would just show a flat line. This happens because we have not accounted for the initial conditions of the problem. In our earlier Python simulation, we needed to know the initial velocity of the ball, which we would have represented there as a constant variable or as a parameter of our Python function. Here, we account for the initial velocity and acceleration by displacing the integrator discs by the appropriate amount before the machine begins to run. - -Once we’ve done that, the rotation of rod \\(t\\) propagates through the whole system. Physically, a lot of things start rotating at the same time, but we can think of the rotation going first to integrator II, which combines it with the acceleration expression calculated based on \\(g\\) and then integrates it to get the result \\(\frac{dx}{dt}\\). This represents the velocity of the ball. The velocity is in turn used as input to integrator I, whose disc is displaced so that the output wheel rotates at the rate \\(\frac{dx}{dt}\\). The output from integrator I is our final output \\(x\\), which gets routed directly to the output table. - -One confusing thing I’ve glossed over is that there is a cycle in the machine: Integrator II takes as an input the rotation of the rod labeled \\((k\,\frac{dx}{dt} + g)\\), but that rod’s rotation is determined in part by the output from integrator II itself. This might make you feel queasy, but there is no physical issue here—everything is rotating at once. If anything, we should not be surprised to see cycles like this, since differential equations often describe rates of change in a function as a function of the function itself. (In this example, the acceleration, which is the rate of change of velocity, depends on the velocity.) - -With everything correctly configured, the output we get is a nice graph, charting both the position and velocity of our ball over time. This graph is on paper. To our modern digital sensibilities, that might seem absurd. What can you do with a paper graph? While it’s true that the differential analyzer is not so magical that it can write out a neat mathematical expression for the solution to our problem, it’s worth remembering that neat solutions to many differential equations are not possible anyway. The paper graph that the machine does write out contains exactly the same information that could be output by our earlier Python simulation of a falling ball: where the ball is at any given time. It can be used to answer any practical question you might have about the problem. - -The differential analyzer is a preposterously cool machine. It is complicated, but it fundamentally involves nothing more than rotating rods and gears. You don’t have to be an electrical engineer or know how to fabricate a microchip to understand all the physical processes involved. And yet the machine does calculus! It solves differential equations that you never could on your own. The differential analyzer demonstrates that the key material required for the construction of a useful computing machine is not silicon but human ingenuity. - -### Murdering People - -Human ingenuity can serve purposes both good and bad. As I have mentioned, the highest-profile use of differential analyzers historically was to calculate artillery range tables for the US Army. To the extent that the Second World War was the “Good Fight,” this was probably for the best. But there is also no getting past the fact that differential analyzers helped to make very large guns better at killing lots of people. And kill lots of people they did—if Wikipedia is to be believed, more soldiers were killed by artillery than small arms fire during the Second World War. - -I will get back to the moralizing in a minute, but just a quick detour here to explain why calculating range tables was hard and how differential analyzers helped, because it’s nice to see how differential analyzers were applied to a real problem. A range table tells the artilleryman operating a gun how high to elevate the barrel to reach a certain range. One way to produce a range table might be just to fire that particular kind of gun at different angles of elevation many times and record the results. This was done at proving grounds like the Aberdeen Proving Ground in Maryland. But producing range tables solely through empirical observation like this is expensive and time-consuming. There is also no way to account for other factors like the weather or for different weights of shell without combinatorially increasing the necessary number of firings to something unmanageable. So using a mathematical theory that can fill in a complete range table based on a smaller number of observed firings is a better approach. - -I don’t want to get too deep into how these mathematical theories work, because the math is complicated and I don’t really understand it. But as you might imagine, the physics that governs the motion of an artillery shell in flight is not that different from the physics that governs the motion of a tennis ball thrown upward. The need for accuracy means that the differential equations employed have to depart from the idealized forms we’ve been using and quickly get gnarly. Even the earliest attempts to formulate a rigorous ballistic theory involve equations that account for, among other factors, the weight, diameter, and shape of the projectile, the prevailing wind, the altitude, the atmospheric density, and the rotation of the earth[1][5]. - -So the equations are complicated, but they are still differential equations that a differential analyzer can solve numerically in the way that we have already seen. Differential analyzers were put to work solving ballistics equations at the Aberdeen Proving Ground in 1935, where they dramatically sped up the process of calculating range tables.[2][6] Nevertheless, during the Second World War, the demand for range tables grew so quickly that the US Army could not calculate them fast enough to accompany all the weaponry being shipped to Europe. This eventually led the Army to fund the ENIAC project at the University of Pennsylvania, which, depending on your definitions, produced the world’s first digital computer. ENIAC could, through rewiring, run any program, but it was constructed primarily to perform range table calculations many times faster than could be done with a differential analyzer. - -Given that the range table problem drove much of the early history of computing even apart from the differential analyzer, perhaps it’s unfair to single out the differential analyzer for moral hand-wringing. The differential analyzer isn’t uniquely compromised by its military applications—the entire field of computing, during the Second World War and well afterward, advanced because of the endless funding being thrown at it by the United States military. - -Anyway, I think the more interesting legacy of the differential analyzer is what it teaches us about the nature of computing. I am surprised that the differential analyzer can accomplish as much as it can; my guess is that you are too. It is easy to fall into the trap of thinking of computing as the realm of what can be realized with very fast digital circuits. In truth, computing is a more abstract process than that, and electronic, digital circuits are just what we typically use to get it done. In his paper about the differential analyzer, Vannevar Bush suggests that his invention is just a small contribution to “the far-reaching project of utilizing complex mechanical interrelationships as substitutes for intricate processes of reasoning.” That puts it nicely. - -_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][7] on Twitter or subscribe to the [RSS feed][8] to make sure you know when a new post is out._ - -_Previously on TwoBitHistory…_ - -> Do you worry that your children are "BBS-ing"? Do you have a neighbor who talks too much about his "door games"? -> -> In this VICE News special report, we take you into the seedy underworld of bulletin board systems: -> -> — TwoBitHistory (@TwoBitHistory) [February 2, 2020][9] - - 1. Alan Gluchoff. “Artillerymen and Mathematicians: Forest Ray Moulton and Changes in American Exterior Ballistics, 1885-1934.” Historia Mathematica, vol. 38, no. 4, 2011, pp. 506–547., . [↩︎][10] - - 2. Karl Kempf. “Electronic Computers within the Ordnance Corps,” 1961, accessed April 6, 2020, . [↩︎][11] - - - - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2020/04/06/differential-analyzer.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: http://worrydream.com/refs/Bush%20-%20The%20Differential%20Analyzer.pdf -[2]: https://sinclairtarget.com/differential-analyzer/ -[3]: https://twobithistory.org/images/diff-analyzer-viz.png -[4]: https://twobithistory.org/images/analyzer-diagram.png -[5]: tmp.MoynZsbJ7w#fn:1 -[6]: tmp.MoynZsbJ7w#fn:2 -[7]: https://twitter.com/TwoBitHistory -[8]: https://twobithistory.org/feed.xml -[9]: https://twitter.com/TwoBitHistory/status/1224014531778826240?ref_src=twsrc%5Etfw -[10]: tmp.MoynZsbJ7w#fnref:1 -[11]: tmp.MoynZsbJ7w#fnref:2 diff --git a/sources/talk/20220118 How curiosity helped me solve a hardware problem.md b/sources/talk/20220118 How curiosity helped me solve a hardware problem.md deleted file mode 100644 index eb1efd0073..0000000000 --- a/sources/talk/20220118 How curiosity helped me solve a hardware problem.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: subject: "How curiosity helped me solve a hardware problem" -[#]: via: "https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin" -[#]: author: "David Both https://opensource.com/users/dboth" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How curiosity helped me solve a hardware problem -====== -Curiosity fuels the quest for knowledge and truth, whether it's about -hardware, open source software, programming, building a PC, optimizing -settings, or just learning a new application. -![Puzzle pieces coming together to form a computer screen][1] - -I typically have a dozen computers up and running on my home network—yes, 12. And I am responsible for several more in other locations. With so many computers, there are always failures of various types, and I ultimately diagnose many of them as hardware problems. But it can be difficult to diagnose which hardware component is causing the issue. - -Just this week, I had a perplexing problem that I misdiagnosed the cause of on my primary workstation—twice. This article takes you through the process I followed. I show you where and why I went down the wrong path and how easy it can be to do so. - -### The first symptoms - -I have been working on several projects. Recently, I had many applications open on multiple desktops and was just starting to work when the display went blank. Most (not all) of the fans in my primary workstation came to a stop, and I sucked in a deep breath. I'd never seen anything quite like this before, but I did know that my system was in trouble. - -There were two primary clues I had to work with. The display went dark, and several fans had stopped. However, the front-panel power and disk activity LEDs were still on, although at a lower brightness level than usual. Most of the decorative RGB LED lights on my motherboard, memory DIMMs, and fans also went out. - -I tried the power and reset buttons with no results. I turned off the power supply directly using the PSU rocker switch. Powering it back on resulted in the same set of symptoms. - -### Initial thoughts - -These symptoms and decades of experience with all kinds of failures pointed me to the power supply. - -I removed the power supply and used my PSU tester to check it. The tester indicated that the PSU was good, and all voltages were within specs. However, I knew the tester could be wrong. PSU testers do not test under full load conditions such as those that exist when the computer is running and drawing a few hundred watts of power. I went with my gut and installed my spare 1000W power supply. - -With an average of 12 computers in my home network, I have learned to keep plenty of spare parts on hand. It saves a lot of frustration that I don't have to run to the local computer store or order online and wait for delivery when things break—and things are always breaking with that many computers around. - -That replacement power supply solved the problem despite the result I got from the PSU tester. Even though the tester has been correct many times in the past, my experience, my knowledge, and my gut told me differently. - -Unfortunately, my gut instinct was wrong. - -### Second thoughts - -My workstation was exhibiting the same symptoms again. It is very unlikely that two different PSUs would fail exactly the same way. - -Next idea: It had to be the motherboard. I don't keep spare motherboards around, so I ordered a new one online and figured that I could use extra memory I already had and move the CPU to the new motherboard along with its all-in-one liquid cooling unit. - -### Disciplined troubleshooting - -The new motherboard would take a couple of days to arrive, so I decided to prepare by removing the old one from the workstation. But before I unplugged the power feeds to the motherboard, my curiosity took over and forced me to power on the system with only the motherboard, CPU, and memory installed. I had disconnected everything else. - -Good troubleshooting demands that you isolate all potential variables, and all I'd done so far was test the PSU. I had to test every component. - -This process required me to disconnect the front panel cables for sound and the dashboard media panel that includes various USB, SATA, and memory card slots. - -With just the motherboard connected, I got a surprise: Everything worked as normal! - -The computer itself wouldn't boot because there were no connected storage drives, and nothing was displayed because I had removed the display adapter. But there were no symptoms of either power or motherboard failure. That piqued my curiosity even more. If the motherboard were truly bad, the symptoms would still exist. - -So I started a sequence of powering off, reinstalling one of the removed components, and powering back on. - -It turns out that the front panel media dashboard caused the symptoms. - -I removed the media dashboard and plugged everything else back in. My workstation booted up properly and performed as expected. I had identified the culprit. - -### How it started - -Having figured out the actual problem, I immediately understood the root cause. It had started a couple of days previously. I was working with and testing several external USB devices, including various cameras, storage devices that I use for backups, and an external USB hub. - -I picked up one USB cable and plugged it into a USB 2.0 slot on the media dashboard. Everything ground to a halt, and most of the lights and fans went out. I unplugged the USB cable, which was now very hot, and burned my fingers. I had inadvertently plugged the type C end into the USB 3.0 type A socket, which had shorted the power. - -After unplugging the USB cable, everything went back to "normal"—except it didn't. The media dashboard lasted a few more days and then shorted out completely, having been weakened by my careless mistake. - -### Jumping to conclusions - -Knowledge and experience can sometimes count for more than tools like PSU testers. Except when they don't. I eventually found the actual cause of the problem, but I should have seen it sooner. - -Although I was correct about this being a power problem, I was sidetracked by not correctly reading the symptoms and following that line of inquiry to its logical conclusion. I could have isolated the true cause of the problem sooner than I did and saved the time I spent configuring my laptop to be a temporary primary device until I could fix my primary workstation. - -Sysadmins work with complex devices, and it can be easy to jump to conclusions. I have over 50 years of experience in the computer industry, and I still do it. I just need to remember to take a few deep [yoga breaths][2] and keep digging until I isolate the root cause of the problem. - -### Curiosity - -At least I followed my curiosity while waiting for the replacement motherboard to arrive. That allowed me to return things to normal much sooner than had I waited until the new motherboard arrived. And I might have discarded a perfectly good motherboard by not testing it further. - -There is a saying about curiosity killing the cat. I hate that saying because it is all too frequently used by parents, colleagues, pointy-haired bosses, teachers, and others who just want us curious folk to leave them alone. In reality, curiosity fuels the quest for knowledge and truth, whether it's about hardware, open source software, programming, building a PC, optimizing settings, or just learning a new application. Feed your curiosity! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) -[2]: https://opensource.com/article/21/11/linux-yoga diff --git a/sources/talk/20220616 -It-s time to contribute to open source-.md b/sources/talk/20220616 -It-s time to contribute to open source-.md deleted file mode 100644 index be8175978d..0000000000 --- a/sources/talk/20220616 -It-s time to contribute to open source-.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: subject: "“It’s time to contribute to open source”" -[#]: via: "https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/" -[#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/" -[#]: collector: "lkxed" -[#]: translator: "XiaotingHuang22" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -“It’s time to contribute to open source” -====== -Nilesh Vaghela is an AWS community hero and founder, ElectroMech Corporation, a cloud and open source company. According to him, contributing to open source is a rewarding act in itself. However, it needs commitment and there are many steps involved in the process, right from selecting a project to ensuring your contribution is noticed. In a conversation with Abbinaya Kuzhanthaivel of OSFY, he shares a few tips on how developers can help to improve India’s contributions to open source. - -![Nilesh Vaghela, -AWS community hero and -founder, ElectroMech Corporation][1] - -##### Q. Can you tell us a bit about your current role and contributions to open source. - -**A.** I am currently an architect working on automation. I lead multiple teams and also contribute majorly to Invinsense, an open source security service platform. I started open source groups in early 1998 and had around 1500 members even then. A group (https://groups.google.com/g/vglug) I am handling now has been very active since 2014-15. - -##### Q. How did you start working with open source projects? - -**A.** I am a mechanical engineer by qualification, and was dealing with modems and UPS systems at my firm ElectroMech Corporation. I slowly got dragged into handling PCs, networking and Linux. I started experimenting in 1996 after getting inspired by seeing over 150 computer servers running on Linux at a Nuclear Science Centre. That’s when I converted my company entirely, focusing on open source for training and support. - -I can proudly say that I was one of the first and early adopters of open source — helping customers to understand what is open source, what are its benefits, what’s available for free, security or code issues, and so on. We got at least four or five customers in Vadodara supporting us, and we eventually promoted ourselves through advertisements in the Yellow Pages. We partnered with Red Hat and the journey continues till now. - -##### Q. How do you think open source has evolved since then? - -A. I can say that, earlier, open source was a passion that fascinated and attracted people to participate. I was particularly impressed hearing user-friendly stories across the world when some Siberian contributors were working to improve water scarcity. It was more like a corporate social responsibility (CSR) activity. A board would be created by people and experts to govern and take projects forward. People would come in for the love of technology without expectations. - -I did not believe then that open source could get commercial, but it is the driving force for most of the innovation and technology today, and many more enterprises are adopting it. We are looking forward to a great balance in contribution to and use of open source, as we have people, communities and big companies coming into play. This is the real future and power of open source. - -##### Q. Could you share some of your challenges? - -A. Initially, I walked alone but people joined once they knew my intentions were good. I created a lot of communities without any expectation, but did get paid indirectly in terms of reputation or fame; some people understood that I was a technical expert and gave projects in the long term. As it was very early days, people started joining the community and contributing without much effort. The goal wasn’t to get business and hence I can say I didn’t really face any hurdles. - -##### Q. What are your leadership mantras and lessons from being a community leader? - -**A.** First, if you want to start a community, then be neutral and don’t harbour a biased opinion. It may look like you are running a community as a leader, but remember those joining you are contributing equally. And never demotivate anyone. Be polite while making comments and addressing queries. Whatever the question, if you don’t want to give an answer, then choose to be quiet. But don’t stop anyone from asking. Help them build expertise. - -Second, don’t involve the community in business. Do not mix and match the goals of your business and community. Have a clear differentiation. - -Always try to encourage people to participate instead of delivering instructions as an expert. If you find people are interested to lead and take initiatives, then give them the stage. Invite and engage them in the community. That will help you to make more community leaders. Also, keep your community simple and don’t involve sponsors in the initial stages. - -##### Q. Who do you look up to for inspiration? - -**A.** Richard Stallman, the father of the open source movement, is my inspiration and I have always admired his projects. - -Apart from him, I have an interesting incident to share that inspired me to work on open source. At the time when I started working on open source, most of the software for the Nuclear Science Centre was based on the Windows OS. However, many scientists wanted to work with Linux based software. And within two or three months, they actually created Linux drivers. This is what fascinated me – that the user can create these drivers which may not be possible in the case of proprietary software. I really liked the fact that open source empowered the user. - -##### Q. Your thoughts on the open source landscape in India and the scope for improvement. - -**A.** India is the largest consumer of open source and we are focusing on becoming a contributor. With so many developers around, we still do not have software giants in India. What we have mostly are service providers and not innovators. More people should become contributors to open source and develop something with international labels. - -The very thought of contributing to open source should begin from the level of schools and colleges. Fortunately, the Gujarat government has already introduced lessons based on Linux from Class 8 to Class 10. It is important to educate and make youngsters aware of open source models. - -Second, we have to develop good mentors. When people start contributing, it is important to find an open source mentor working in that particular project. The mentor gives a small assignment, tries the code and then commits it. If everything goes fine, the contribution is increased gradually. Unfortunately, we have very few mentors available in India. We need to prepare a lot of mentors or maybe connect to those across the world. - -Third, we need to encourage those who come forward to contribute. Once you are a recognised developer or a person contributing to open source development, you also progress in your career and business. - -India can be a major contributor to open source by following such simple methods. - -##### Q. What do you think about the coding requirements to contribute to open source? - -**A.** From my experience, if you know the internal parts, how to develop the application, what code standard you should maintain, and how to manage the team and other best practices, you may not have to actually worry about coding expertise. - -There are other roles too with respect to designing, security maintenance and integration. See what works for you. Develop and strengthen your skill in what you like to do. If you feel coding still interests you, then take the support of fellow developers to learn it. - -##### Q. How do you shortlist a project you would like to contribute to? - -A. You need to understand your top few interest areas and then do your research on the projects happening around them. You need to figure out the area of requirements or openings for contributors and more volunteers. You can start small to practice and then build expertise. - -Avoid going by the trendy topics; what’s important is your individual interest. For instance, DevOps is in high demand now and you may tend to go for a DevOps project. Do not make this mistake. - -You can find open source projects on Cloud Native Computing Foundation ([CNCF][2]), Apache, Fedora, Red Hat, and so on. This way you can also find mentors who are already working on projects and can get proper guidance. - -##### Q. Projects have their own purpose and target audience. Sometimes they even misalign with open source goals. So, what does one check before contributing? - -A. I agree it becomes challenging when somebody starts an open source project and then commercialises it. But this is always a risk, and should not discourage you. - -First try to check out the group — how popular are the contributors working in the group, how long have they been contributing, and how reputed are they. And once you join, observing everyone and everything is the key. Try to learn at least for three to six months, and understand how everything works. You can always leave the project if you find the intention is wrong. But if you feel it’s all right, then go ahead and contribute. - -![The team at ElectroMech Corporation][3] - -There are certain licence checks that you can do, say, like GPL version 3. You can also look at unmodified licence versions like the Apache open source licence. - -##### Q. Do you think big companies will accept contributions from freshers? - -A. Yes, of course. Companies also like mentoring. They usually don’t allow you to contribute directly, but may give you a small assignment initially. A mentor will first try to understand what skill you have and how good you are at it. Once they recognise you have the kind of skill that is needed, they will continue to guide you or assign you to some other mentor based on your skill. The initial stages are very crucial. Many companies do some sort of screening, and you may be allowed to contribute only after you have proved your ability. - -##### Q. What are the initial challenges that contributors have to overcome when picking up projects? - -A. First, you should be very serious about your contribution. There are no written commitments and contributors may tend to take the work lightly. That’s totally wrong. Try to dedicate 8-10 hours or whatever is feasible each day. If you are skipping this commitment because you feel there are no immediate returns, then you will not be a good contributor. -Always adhere to a mentor’s guidance strictly at the initial stages. This is very crucial for a healthy contribution. Sometimes it may happen that you believe you are good at something, while your mentor may not assign a project based on that skill. Simply approach your mentor in such scenarios and ask him what you should do, what is your role, and how you can contribute. - -##### Q. Many developers do not get replies after submitting the contribution to a project. How does one make a submission noticeable? - -A. Write a small blog on the project you are planning to contribute to, covering aspects like what you like in it, what you don’t like, and what can be improved. Such a positive and promotional approach can greatly help you. - -Be a part of the group and be involved in activities related to that particular project. Instead of contributing, first try to engage with the group, and this will increase the chances for you to get adopted as a contributor. - -Once you have a better understanding of the project, not only will your work be accepted but you will be able to better align yourself with that project. - -##### Q. How do you overcome a situation where your contribution is not accepted? - -A. Just understand that this can happen for many reasons — maybe you are not in the right project or you have not contributed correctly. If the project is country driven, your request may not be accepted. Hence, remember to have a checklist as stated earlier. Don’t worry if your contribution is not accepted because either you are not fit for the project or the project is not fit for you. - -All I would recommend is try to identify four or five projects, and at least one among those projects you work on will probably be accepted. - -##### Q. What is your message for our readers? - -A. Open source is the driving force behind most of the innovation happening today. Instead of just using open source, let us try to contribute according to our capacity and skills. Contributions can be in terms of code, documentation, testing, blogs, money, etc. It’s time to contribute. - -##### Q. Any hiring plans for ElectroMech Corporation — what are the roles and skill expectations? - -We have requirements in cloud DevOps, and are hiring cloud architects, Python developers, Linux architects and security professionals. - --------------------------------------------------------------------------------- - -via: https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/ - -作者:[Abbinaya Kuzhanthaivel][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.opensourceforu.com/author/abbinaya-swath/ -[b]: https://github.com/lkxed -[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nilesh-Vaghela-AWS-community-hero-and-founder-ElectroMech-Corporation.jpg -[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwib2vvv3dv3AhVa7XMBHfZSCsIQFnoECAgQAQ&url=https%3A%2F%2Fwww.cncf.io%2F&usg=AOvVaw2LnRyH4SZPDHntRLJU_b3q -[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/The-team-at-ElectroMech-Corporation.jpg diff --git a/sources/talk/20221001 What-s new with Awk-.md b/sources/talk/20221001 What-s new with Awk-.md index 3f6a791230..dc8e496c05 100644 --- a/sources/talk/20221001 What-s new with Awk-.md +++ b/sources/talk/20221001 What-s new with Awk-.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/10/whats-new-awk" [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "connermemory" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/talk/20230207.1 ⭐️⭐️ A brief history of LibreOffice.md b/sources/talk/20230207.1 ⭐️⭐️ A brief history of LibreOffice.md deleted file mode 100644 index a1d8d0bf01..0000000000 --- a/sources/talk/20230207.1 ⭐️⭐️ A brief history of LibreOffice.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "A brief history of LibreOffice" -[#]: via: "https://opensource.com/article/23/2/libreoffice-history" -[#]: author: "Italo Vignoli https://opensource.com/users/italovignoli" -[#]: collector: "lkxed" -[#]: translator: "onionstalgia" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -A brief history of LibreOffice -====== - -In early 2009, OpenOffice.org was the main competitor to Microsoft Office in the individual office productivity suites market. The popular open source office suite's community looked forward to a November conference in Orvieto, Italy. Things were going well, and the future looked bright. - -And then, in April of that year, Oracle announced its plans to acquire Sun Microsystems. - -Personally, I knew it was bad news for OpenOffice.Org. Oracle had no interest in the open source suite, and I felt confident it would abandon the project. Of course, I hoped to be proved wrong at the upcoming conference. Instead, a single representative from Oracle, with no budget to speak of, arrived in Orvieto and talked vaguely about monetization and re-branding. I felt that my worst fears were confirmed, and my fellow community members agreed. - -The community returned home from Orvieto that year and resolved to take action. The time had finally come to turn into reality what the OpenOffice.Org project had promised. We were determined to create an independent foundation to manage the project's assets and promote the development of the suite under the umbrella of the community. OpenOffice.org would no longer belong to a company but to its users and individual contributors. - -### Building the foundation - -At the time, the OpenOffice.org project had a presence on every continent, with language communities helping to localize and promote it. The four most important: - -- German: The software was born in Germany, and StarDivision was based in Hamburg, so there was a natural link between the group of developers and German-speaking supporters. -- French: The government supported the open source software. -- Italian: The group to which I belonged. -- Brazilian - -At the beginning of 2010, at the initiative of the French and German language communities, the most active volunteers—together with some independent and SUSE developers—started working on a fork project. The aim was to launch an alternative project involving both the global community and the companies invested in OpenOffice.org. - -I have over 30 years of experience working in international business and consultancy agencies. The project brought me in to manage the marketing and communication strategy. - -In the months that followed, activity became increasingly hectic. There was a weekly teleconference meeting, as the news coming in from Star Division (the department responsible for OpenOffice.org) was increasingly negative. - -Even with the dissolution of OpenOffice.org seemingly imminent, a conference in Budapest was confirmed by the publication of a CFP (Call for Papers). Of course, the fork project members also did nothing different from previous years. They presented their talk proposals and made travel plans. - -### A safe place for documents - -At the beginning of the summer, the fork was almost ready. Our group met in Budapest to gauge the situation from the OpenOffice.org side and for a first face-to-face organizational meeting. - -The Budapest conference ran smoothly, with meetings, keynotes, and technical sessions taking place over the three-day event. Everything seemed more or less normal. - -Everything was not normal. - -Some attendees were a little suspicious when several leading figures failed to attend the conference's main social event, an overnight cruise on the Danube. We didn't participate in this event because we were meeting in a restaurant to discuss the final details of a new foundation. There was a lot to get right. We had to determine an announcement date and the composition of the Steering Committee that would coordinate the tasks required to bring the foundation to life. - -### LibreOffice - -The three weeks between the conference and the announcement of LibreOffice were hectic. I prepared the launch strategy and the text of the press release. The developers prepared the software. The application's name had just been decided a few days earlier during a teleconference (which I'd joined from Grosseto, where I was attending the Italian open source software community meeting). - -On September 28, 2010, I distributed the press release announcing The Document Foundation and LibreOffice to a global mailing list of about 250 journalists, which I painstakingly put together using input from the public relations agencies where I worked. - -Here is the release: - -> The community of volunteers developing and promoting OpenOffice.Org announces an independent foundation to drive the further growth of the project. The foundation will be the cornerstone of a new ecosystem where individuals and organisations can contribute to and benefit from the availability of a truly free office suite. It will generate increased competition and choice for the benefit of customers and drive innovation in the office suite market. From now on the OpenOffice.Org community will be known as The Document Foundation. - -We invited Oracle to become a member of the foundation and donate the brand the community had grown during the previous ten years. Pending the decision, we chose the brand LibreOffice for the software going forward. - -Reactions to the announcement from the press were very positive. On the other hand, companies and analysts tended to be suspicious of an office suite governed by a community, an entity they never fully understood because of its flat, meritocratic organization. - -In the two weeks following the announcement, 80 new developers joined the project, disproving the predictions of those who considered it unrealistic to launch a fork relying only on SUSE and Red Hat developers. Unsurprisingly, most of the language communities switched to LibreOffice. - -LibreOffice is built from the source code of OpenOffice.org. The new functionalities are integrated in the source code of Go-OO and not on OOo. - -For this reason, the first version of LibreOffice—announced on January 25, 2011—was 3.3 to maintain consistency with OpenOffice.org. This was useful for users who had migrated to the new suite since the first version. The software was still a little immature due to significant technical debt that had to be accounted for. This caused problems and instability that would largely be corrected through code cleaning and refactoring throughout the 3.x and 4.x versions. By versions 5.x and 6.x, the source code was considered stable, which allowed the user interface to be improved and the development of mobile and cloud versions. - -In the spring of 2011, Oracle transferred the OpenOffice.org source code to the Apache Software Foundation. The project lasted for three years. The last new version was nearly a decade ago. - -### The future is open - -The formation process of The Document Foundation ended in early 2012, with registration by the Berlin authorities on February 17, 2012. This was a lengthy process because the founders wanted volunteer members of the project also to be members of the foundation based on contributions. This detail hadn't been foreseen for foundations under German law, so it required several revisions of statutes to comply with this condition. - -The foundation's first two activities were the membership committee's election. This is the structure that decides on the transition from mere volunteer to member of The Document Foundation on the basis of contributions. There are five members and three deputies. Finally, there's a Board of Directors, which steers the foundation administratively and strategically, consisting of seven members and three deputies. - -At the end of 2012, the foundation hired its first employee. This employee was Florian Effenberger, who was later promoted to executive director. Today, the team has a dozen members who take care of day-to-day activities such as coordinating projects, administration, network infrastructure management, software releases, mentoring of new developers, coordination of quality assurance, user interface evolution, and marketing and communications. - -Right now, the foundation is looking for developers to handle tasks that do not fit the objectives of enterprise customers, such as RTL language management and accessibility. These features aren't developed by the companies in the LibreOffice ecosystem, which offer them feature development services, Level 3 support, and Long Term Support versions of the software optimized for enterprise needs. - -More than 12 years after the announcement of LibreOffice and The Document Foundation, we can say that we have achieved our goal of developing an independent free and open source (FOSS) project. Our project is based on an extended community of individual volunteers and companies contributing according to their abilities. These participants help create the unmatched free office suite and support open standards by adopting and evolving the only true standard office document format on the market (Open Document Format, or ODF) while also ensuring excellent compatibility with the proprietary OOXML format. - -The sustainability of this model is a day-to-day problem. There's severe competition from big tech firms. We're always searching for a balance between those who would like everything to be cost-free and those who would like each user to contribute according to their ability. No matter what, though, LibreOffice is an open source office suite, providing added value above and beyond its competition. - -Try LibreOffice. Donate. Support it at home and work. Tell your friends about it. LibreOffice is the open source office solution that ensures you always have access to your data and control over your creativity. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/2/libreoffice-history - -作者:[Italo Vignoli][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/italovignoli -[b]: https://github.com/lkxed/ - diff --git a/sources/talk/20230213.1 ⭐️⭐️⭐️ A 10-step guide for a successful hackathon.md b/sources/talk/20230213.1 ⭐️⭐️⭐️ A 10-step guide for a successful hackathon.md new file mode 100644 index 0000000000..5514488bd7 --- /dev/null +++ b/sources/talk/20230213.1 ⭐️⭐️⭐️ A 10-step guide for a successful hackathon.md @@ -0,0 +1,305 @@ +[#]: subject: "A 10-step guide for a successful hackathon" +[#]: via: "https://opensource.com/article/23/2/hackathon-guide" +[#]: author: "Tiffany Long https://opensource.com/users/tiffany-long" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A 10-step guide for a successful hackathon +====== + +Hackathons are easy. How much thought do you need to put into them anyway? Just set a date, and people will show up. Well, that is not quite true! + +While you may get lucky with that approach, the reality is that hackathons are a keystone experience in the tech industry, and attendees have specific expectations. Not only that, but your organization also has certain needs and should set goals for a hackathon. So, how do you ensure that a hackathon works for your organization and attendees? + +A successful hackathon depends on several decisions that tend to be recursive. Decisions about what you want to achieve will impact what resources you allot and how you want to communicate. Those decisions affect whether you go virtual or in person, and that decision will once again impact the resources you need and how you communicate. Alignment when planning hackathons is not just about getting people to agree. You will have a whole suite of decisions that must internally align. For example, a technically difficult hackathon might not be able to attract a large audience (ask me how I know!) and will require a specialized recruitment strategy that requires different resources. + +I've done many hackathons over the years, including just a few months back, when my organization hosted a hackathon that led to new features that we will incorporate into the next version of our open source product, Traefik Proxy 3.0. So, trust me when I say planning a hackathon that will enrich attendees and create valuable outcomes for your project is about more than hope, pizza, and chaos. + +This article uses the most recent Traefik Labs Hackathon as a blueprint. I share a checklist, tips, and tricks to help you identify your objectives, plan, manage the contest and compensation, share your results, and manage the long tail of the hackathon (the work isn't over when the hackathon ends!) + +This guide serves as a model for you to outline best practices so that you, too, can hold a successful hackathon with a sizable target audience that delivers results! + +- [Three questions to determine your goals][1] +- [Why are you doing this?][2] +- [Who is your audience?][3] +- [How are you measuring goals?][4] +- [Decide on in-person vs. virtual][5] +- [Build your communication strategy][6] +- [Decide on the prizes][7] +- [Swag it up][8] +- [Get the word out][9] +- [Managing the long tail][10] + +**[ Get a PDF and EPUB version of this article. [Download it here.][11] ]** + +### 1. Three questions to determine your goals + +The first and most crucial step is to set your goals. But this is no simple affair. Before you set goals, you need to coordinate internally on multiple fronts and ask questions such as: + +- Why do you want to do a hackathon? +- Who do you want to attend? +- How are you going to measure your success? + +#### Identify your internal stakeholders and set expectations + +**Hackathons are cross-functional**. No hackathon is run by a community person alone. It is important to ensure everyone is aligned on the goals, what is required to achieve them, and that the necessary resources are committed. This probably sounds super corporate, but these functions exist even within the smallest projects. A project needs adoption and code. It also needs value decisions based on who will be using it. And, of course, projects need passionate contributors. + +**Hackathons require cross-functional resources**. One team with a single set of resources cannot successfully run a hackathon. The organization must make various resources available, including: + +- Marketing for planning and outreach. +- Product Management for product and industry-specific insight. +- Engineering for deep technical knowledge and community engagement. + +For these reasons, hackathons usually support cross-functional goals. Your Community Team, for example, might want to build ownership and convert users to active community members. The Marketing Team might want to enhance awareness and court new users. The Engineering Team might need new perspectives on specific needs or challenges. The Product Team might have goals or no-go areas the community should be aware of. + +And last but not least, the hackathon budget is cross-functional. I am sorry to inform you, but hackathons ain't free! Your largest expense is always the dedicated time of your team. + +### 2. Why are you doing this? + +Setting your goals is the most important part of a successful hackathon. If you don't know what you want to do or why a hackathon is important, at best, it will have a ton of wasted potential and be a disconnected mess at worst. + +Communities feed off of ownership. Decide what you need from your community and what ownership stake you want community members to have. Without a clear understanding of this, your hackathon might not reach its full potential in empowering your community. + +Be very careful with your hackathon design and goals. Different types of hackathons appeal to different skill levels. If the code you're looking for is very advanced, take the extra time to court the right audience and accept that it will include less overall attendance. Cast a wide net if the contributions can vary in skill and experience. + +#### Are you hosting a hackathon to get code and build your project? + +- Sometimes, projects hit a critical juncture or acquire a lot of excitement around them, and you want to harness the energy to build something together. A hackathon is a great way to achieve this! +- If you have an active community of users, a hackathon can bring everyone together at the same time to harness that excitement to feed the creative energy of your group. + +**Note:** This is more easily achievable with smaller groups who know each other and have a shared experience with the project. You also need to carefully evaluate the skills required to build your project. + +#### Are you hosting a hackathon to build your community or re-engage them? + +- Maybe you are just building your community or noticed that your community needs a little juice. Hackathons are exciting, and they can help bring that back. +- Above, I said, "Communities feed off of ownership." If your community members do not feel they have a stake or that their needs and voices matter, they will drift away. This is common when projects grow and become more formalized. As the barrier to entry rises, the ability for community members to feel ownership falls, and the project becomes like a product to the user. One way to enhance community membership is by creating events that engage users and lower the bar for entry: Bug round-ups, light requests, and longer timelines. +- Perhaps your user community is growing, but the contributor community is becoming more specialized as your tech becomes more complex. In this case, you need to court sophisticated technologists who understand your tech and the use cases. Look for community members who use your tech in their jobs—especially at companies with large or complex deployments. These people are more likely to understand the needs of users and of the tech itself. They will also have suggestions for significant and valuable enhancements. +- You are free to choose goals that build your community and match your team and community members' energy and time. For example, at Traefik Labs, a hackathon aimed at enthusiastic folks with a small time commitment might target our Plugin Catalog. However, when looking for larger contributions or contributions that take significant expertise, we might target advanced technologists–especially those we know. + +#### Are you hosting a hackathon to celebrate something? + +- Hackathons are a great way to celebrate a new launch and hype your community. For example, that is exactly why we hosted the [Traefik Proxy 3.0 Hackaethon][12]. +- Hackathons are also great for getting the word out about a new product capability. The [Traefik Plugin Hackaethon][13] is an excellent example here. +- Maybe you want to organize an event to celebrate your top contributors. Do it with a hackathon! Take a look at [this hackathon organized by HackerOne][14]. And if you're thinking, "but this is not about open source software (OSS), how can it be a hackathon?" I've got news for you—hackathons are not just for OSS! Hackathons are for creating with a large community. + +#### Are you hosting a hackathon to build awareness? + +Hackathons are a great place to begin if you are just starting and want to build awareness around your product/brand. However, there are a few conditions. + +- Laser-focused goals and big contributions are unlikely to happen at this stage. Go for a softer, broader focus, and minimize the work required by attendees. +- Reach out to new community members, less experienced users, and users with less exposure to your specific project. + +#### Are you hosting a hackathon to connect to users? + +I can think of no better way to connect new users to your project than a hackathon. Not only will your users become intimately familiar with your project, but hackathons also have a unique way of engendering a sense of ownership, rarely achievable through other types of events. + +### 3. Who is your audience? + +Assuming you have pinpointed why you want to host a hackathon and what you want to achieve, it's time to assess the characteristics that a participant needs to be successful. Use your decisions about your goals to identify your audience to ask what type of community member can help you achieve your objectives. Use the list of comparisons below: + +- Highly-skilled vs. mixed-skilled vs. low-skilled +- Specialized vs. generalized skill +- Intensive time vs. less intensive time +- Individual contributions vs. group contributions + +Your most active community members must look a bit like your target audience. + +You might rethink your goals if your target audience doesn't align with at least 80% of the people you know you can attract. Accurately identifying your target audience will go a long way to making your communication strategy around the hackathon and the hackathon itself more successful. + +### 4. How are you measuring goals? + +Perfect, now that you answered the first two big questions and have your goals laid down, it's time for the third big question—how will you measure those goals? Inspiring your internal teams and your community to work together in building the future of your project, engendering ownership, and increasing engagement are awesome, but you can't determine success if you can't measure your goals. + +#### What does success look like immediately after the event? + +- A major sign of success is whether attendees connect and engage with each other, co-educate, and build teams during their hackathon. +- Were mentorships built? Through partnership, did several newer users grow into skilled mid-level users, or did mid-level users evolve into expert-tier users? This is the gold ring of success indicators. +- Did your partner organizations (maybe universities) request future hackathons or other events? + +- Clearly, the first sign of success is that your attendees had an overall good experience and are motivated to engage more with your project. +- If you are looking for outreach, set a quantity of participants to shoot for and a number of participants who return to contribute more after the event or in three months. +- If building awareness, you might also look for successful follow-up chatter. Who wrote blog posts? Were attendees talking about it on social media? +- If you are looking for contributions, did they work for you? Are these the contributions you want? Did they impact how your team thinks about the problems they face? Will you have ongoing collaborations with these contributors? + +#### What will denote success three months after the event? + +Defining benchmarks for long-term success is just as important. Here are a few examples of what could indicate long-term success: + +- Your hackathon should increase the number of returning contributors to your project. The goal is to get people hooked. If people new to your project came from the hackathon and stayed as users, or if your existing users became more active, you know you won. +- Hackathons are great as self-contained events, but they are supremely valuable as marketing content. They build trust in the community, showing you are responsive and value community input. They are fun loci of activity that let community members bond and look forward to the future, and they are aspirational. People love to see others celebrated and plan to achieve that celebration in the future. +- When you build marketing content around your hackathon (or better yet, others build content around your hackathon), you can expand your reach among second-degree connections. +- Tall poppy syndrome is a shame. Hackathons are a great opportunity to gather those participants who stood out and galvanize them to do other cool things and spread the word about your project. + +### 5. Decide on in-person vs. virtual + +I know what you're thinking—is in-person even a consideration? We've all gotten so used to doing everything virtually in the post-covid world. So, are the days of in-person gone? I would argue no, they are not. With care and safety measures in place, in-person events are the heart and soul of hackathons. + +- In-person means no distractions, lots of pizza, and energy drink-fueled friendship. +- In-person fuels group participation rather than individual contributor participation. +- In-person works well at scale and in miniature: Organizing in-person hackathons for large groups brings high energy and rewards. But they can get quite costly. If you want to organize a large-scale hackathon, you'll be more successful if you target less experienced developers (students, clubs, new careerists) because these folks have the most time and the most to gain when demonstrating their skill and passion. +- In-person also works well for small groups and is great for intense planning and iteration—long nights with new and old friends, usually over food and beer! + +And while many pros come with in-person hackathons, it doesn't mean that the virtual experience only comes with cons. Granted, nothing replaces that feeling of late nights with pizza, off-the-cuff remarks that end up changing your entire project, and a friendly set of eyes over your shoulder as you test or debug. But... + +- Virtual means you can get a wider group of participants at a significantly lower cost. +- Virtual respects disability. +- Virtual is geolocation friendly. +- Virtual allows for higher individual contributor participation. +- Virtual offers more flexibility in the style and length of the event – you cannot have a month-long in-person event! + +#### Timelines of virtual hackathons + +Did you decide to do a virtual hackathon? Great! Now, you need to determine the type of virtual hackathon you want. Do you envision a prolonged or intensive timeline? Keep in mind that the type of [virtual hackathon][15] you choose will determine, to some extent, your target audience and communication strategy. + +**Extended timeline:** + +- Allows after-hours tinkering and enables developers to attend without taking time off from work. +- Provides more time to solicit contributions. +- Requires fewer resources for both the organizer and the participants. +- Extended timelines require fewer real-time resources. + +**Intense timeline:** + +- Recreates that feeling of intensity usually experienced in in-person hackathons. +- Requires a high amount of resources for a short period of time. +- Requires tight management and a communication platform. +- Requires clear one-on-one communication, but also fosters group-to-group or intra-community communication. + +### 6. Build your communication strategy + +Speaking of communication, once you have your goals, you must decide **who** communicates with participants and **how**. It's common to choose between the popular apps of the day. Your choice impacts the event's feel. Different [chat applications][16] and [collaboration platforms][17] have their own cultures and strengths. The decision you made early on about how to host your hackathon (in-person or virtual, prolonged or intense timeline) is likely to have the most significant impact on your communication strategy. + +#### In-person communication plan + +If you are running an in-person hackathon, consider it a genuine event—it feels almost like a conference. In-person hackathons often include the following: + +- **Workshops/round tables:** Meant to educate and develop new industry standards/best practices for the concerns of the day. These sessions can function as proctored time-bound conversations amongst 6-10 individuals, where they agree upon findings and take notes that are made public to all participants. +- **Planning sessions:** Often used for projects with non-code outcomes, like developing updated standards. +- **Coding sessions:** Used for code-based projects which require work to maintain and enhance. + +Each of the above has different communication needs: + +- People prepared to facilitate, but not lead, conversations in workshops. +- Note takers and people to make sure that the notes are turned into a publishable product. +- Project managers to ensure the above tasks are done. + +- General communication for running the event (food, cleaning, management of resources). +- Masters of ceremonies to move through the agendas. +- For workshops: + +Making this all happen requires the resources and specialized knowledge from your Community, Product Managers, and teach-savvy teams. From past experience, it took a team of community members and staff to manage an event of this scope. To be successful, your team will need specialized people as well. + +You also need to decide what types of communication you want to foster and who is responsible for it: + +- Multiple teams will need to take shifts to perform general support. +- A DevRel, engineering, or support team will need to manage technical communication between triage and participants. +- Community Teams usually spend extensive time connecting participants to help build strong groups by reinforcing skills or points of view. This is one way to ensure that hackathon magic. +- Community Teams also need to support marketing efforts to engage participants and manage follow-up. + +#### Virtual communication plan + +For virtual hackathons, the choice of a communication platform depends heavily on the outcome you want to achieve, the timeline you've chosen for your hackathon (prolonged or intensive), and the type of communication you wish to facilitate (synchronous or asynchronous). + +**Using Pull Requests and Issues on Git hosts (asynchronous):** + +- Choosing to communicate through Git pull requests and Issues on your project directly frees up technical staff resources because it keeps the conversations about projects in your current process and allows your team to be responsive rather than instigating communication. +- This approach is great if the team for your hackathon is small or if the expected contributions are relatively small and you do not plan to help participants form teams. +- Using your existing processes is especially great for prolonged hackathons as they do not require additional moderation or require your team to monitor an additional app. +- The downside is that you will only facilitate communication with the individual contributor or group of contributors already working together. It's difficult to connect participants who are working separately. Participants can't find each other as easily on their own, so you lose some of the magic that happens when hackathon participants organically talk to each other in open threads. + +**Using a chat application (synchronous):** + +- Choosing dedicated chat servers is required for intense hackathons. +- Chat facilitates the team formation and communication necessary for complex projects with fast timelines and sparks the brainstorming that preludes an awesome contribution. +- Additionally, your goal is to build community. People want to join communities where they have ownership, have friends, and feel comfortable. You need a place for participants to feel connected to each other if you want them to return. +- Chat servers can outlast an event, allowing for continued community engagement. + +Regardless of which platform you choose, you need a communication plan that identifies when every person on your team is available. Managing a virtual hackathon can get quite tricky, primarily due to the different timezones—people can participate whenever they want, from wherever they want. You must plan to accommodate participants across all time zones and for every occasion. Draw up a plan with who is responsible (and when) for the following: + +- Determining response SLAs. +- Animating your virtual space (a dead space guarantees poor communication). +- Encouraging team building. +- Responding to technical questions. +- Checking in on participants. +- Moderating the space to ensure the safety of your participants. + +### 7. Decide on the prizes + +Is your hackathon a contest? Hackathon participants are often content with grand prizes and "swagpaloozas" for top contributions. But before you decide on the fun stuff (the actual awards), you must determine what your contest values. + +- What differentiates a good contribution from a great contribution? If your attendees know how you feel about this, they are more likely to hit it out of the park. +- What do you value? This is your chance to tell participants what you want to see submitted by attaching a prize to it. For example, during the last Traefik Hackaethon, we offered bounties for the most-wanted features. These were, indeed, the ones most people worked on. +- Are there categories of contributions? You need to decide on prizes for each category. +- Create a rubric (a chart or grid defining and ranking achievements, [like this example][18]). This way, participants know what you value and how they are judged. This was one way we improved submissions at HackerOne. + +On the other hand, some may argue that competition is overrated. If your goal is participation, feel free to reward every single one of your participants for simply giving back! [Hacktoberfest][19] is a great example of this approach. + +### 8. Swag it up + +Everyone loves swag! And your participants would certainly appreciate a token to remember this event, whether virtual or in person. Swag has two purposes: + +- Swag shows your appreciation: The contributors took their time to engage with you in an intense way; thank them with a gift that shows you value their contributions. +- Swag builds awareness: Gifting swag to your participants helps them spread the love and build awareness of your community by sharing their loot and experience. + +The community loves swag, but they don't love boring swag! You probably distributed your existing t-shirts and stickers during another event. Make your hackathon memorable and go for new, exciting, and exclusive designs. Shirts are great, and hoodies reign supreme. But think about cool swag participants may not have already. Think of something that could become their new staple item, like backup batteries or hats (both popular at HackerOne). Personally, my own home features some towels and slippers from hackathons! + +### 9. Get the word out + +Setting your goals and deciding on amazing grand prizes and swag are all important steps. But how will anyone know your hackathon is happening if you don't get the word out? You need to investigate the available channels carefully, and you need to be bold with your promotion. I'm talking blogs, vlogs, emails, social media—anything you can get your hands on. + +However, depending on your defined goals, you need to invest in the appropriate channel. Where you advertise depends on who you want to invite to your hackathon. + +- IIf you want to attract more experienced users, target big organizations where your project is used. LinkedIn and email promotion would be most effective here. +- If you want to bring in new and less experienced users, you're better off targeting universities and boot camps. Promoting the event on community-based media, like Mastodon, Matrix, Mattermost, Reddit, Discourse, Discord, and any place your target audience hangs out is a better choice. + +### 10. Managing the long tail + +Yay, the hackathon is over! Now all hackathon-related activities can stop, and we no longer need to pull resources, right? Wrong! Think of hackathons as only one step of the road in a series of events in your software development and community building. To deem your hackathon a success, you must be prepared to engage in post-event activities. + +- Communicating your results: Don't forget to communicate hackathon outcomes internally and externally. Demonstrate the ownership the community members gained during the hackathon to grow trust in your community and project. +- Building community: Lean on your hackathon participants for future community activity. +- Putting together the retrospective: What went well, what went terrible, what was meh, what surprised you? This analysis is how you grow, change, and iterate. Don't forget to do a blameless retro as soon as possible so it is all fresh in your mind. + +### Wrap up + +If you started reading this article thinking that hackathons aren't that hard to pull off, I'm sorry to have burst your bubble! And although I sincerely believe hackathons are a great way to engage and communicate with your community on so many levels, having just the intention does not guarantee the results. + +For a hackathon to be successful, you need to be meticulous and prepared to invest significant resources and effort to plan and execute it properly. + +Thank you for reading, and I hope this checklist helps you successfully organize your next hackathon! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/2/hackathon-guide + +作者:[Tiffany Long][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/tiffany-long +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/2/hackathon-guide#set-your-goals +[2]: https://opensource.com/article/23/2/hackathon-guide#why-are-you-doing-this +[3]: https://opensource.com/article/23/2/hackathon-guide#who-is-your-audience +[4]: https://opensource.com/article/23/2/hackathon-guide#how-are-you-measuring-goals +[5]: https://opensource.com/article/23/2/hackathon-guide#decide-on-in-person-vs-virtual +[6]: https://opensource.com/article/23/2/hackathon-guide#build-your-communication-strategy +[7]: https://opensource.com/article/23/2/hackathon-guide#decide-on-the-prizes +[8]: https://opensource.com/article/23/2/hackathon-guide#swag-it-up +[9]: https://opensource.com/article/23/2/hackathon-guide#get-the-word-out +[10]: https://opensource.com/article/23/2/hackathon-guide#managing-the-long-tail +[11]: https://opensource.com/downloads/hackathon-guide +[12]: https://traefik.io/blog/announcing-traefik-proxy-3-0-hackaethon/ +[13]: https://traefik.io/blog/announcing-the-inaugural-traefik-hackaethon-2020-in-october/ +[14]: https://www.youtube.com/watch?v=9VZCD9TirCg&list=PLxhvVyxYRvibM_KJBPtPsfEcjnP5oGS8H +[15]: https://opensource.com/article/20/8/virtual-hackathon +[16]: https://opensource.com/alternatives/slack +[17]: https://opensource.com/article/21/9/alternatives-zoom +[18]: https://www.isothermal.edu/about/assessment/assets/rubric-present.pdf +[19]: https://hacktoberfest.com/ diff --git a/sources/tech/20210619 Try quantum computing with this open source software development kit.md b/sources/tech/20210619 Try quantum computing with this open source software development kit.md deleted file mode 100644 index fa697ee98d..0000000000 --- a/sources/tech/20210619 Try quantum computing with this open source software development kit.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: subject: (Try quantum computing with this open source software development kit) -[#]: via: (https://opensource.com/article/21/6/qiskit) -[#]: author: (Gordon Haff https://opensource.com/users/ghaff) -[#]: collector: (lujun9972) -[#]: translator: (cool-summer-021) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Try quantum computing with this open source software development kit -====== -Qiskit is an open source software development kit for accessing quantum -simulators and hardware for free. -![Tips and gears turning][1] - -Classical computing is based on bits. Zeros and ones. This isn't because there's some inherent advantage to a binary logic system over logic systems with more states—or even over analog computers. But on-off switches are easy to make and, with modern semiconductor technology, we can make them very small and very cheap. - -But they're not without limits. Some problems just can't be efficiently solved by a classical computer. These tend to be problems where the cost, in time or memory, increases exponentially with the scale (`n`) of the problem. We say such problems are `O(2n)` in [Big O notation][2]. - -Much of modern cryptography even depends on this characteristic. Multiplying two, even large, prime numbers together is fairly cheap computationally (`O(n2)`). But reversing the operation takes exponential time. Use large enough numbers, and decryption that depends on such a factoring attack is infeasible. - -### Enter quantum - -A detailed primer on the mathematical and quantum mechanical underpinnings of quantum computing is beyond the scope of this article. However, here are some basics. - -A quantum computer replaces bits with [qubits][3]—controllable units of computing that display quantum properties. Qubits are typically made out of either an engineered superconducting component or a naturally occurring quantum object such as an electron. Qubits can be placed into a "superposition" state that is a complex combination of the 0 and 1 states. You sometimes hear that qubits are _both_ 0 and 1, but that's not really accurate. What is true is that, when a measurement is made, the qubit state will collapse into a 0 or 1. Mathematically, the (unmeasured) quantum state of the qubit is a point on a geometric representation called the [Bloch sphere][4]. - -While superposition is a novel property for anyone used to classical computing, one qubit by itself isn't very interesting. The next unique quantum computational property is "interference." Real quantum computers are essentially statistical in nature. Quantum algorithms encode an interference pattern that increases the probability of measuring a state encoding the solution. - -While novel, superposition and interference do have some analogs in the physical world. The quantum mechanical property "entanglement" doesn't, and it's the real key to exponential quantum speedups. With entanglement, measurements on one particle can affect the outcome of subsequent measurements on any entangled particles—even ones not physically connected. - -### What can quantum do? - -Today's quantum computers are quite small in terms of the number of qubits they contain—tens to hundreds. Thus, while algorithms are actively being developed, the hardware needed to run them faster than their classical equivalents doesn't exist. - -But there's considerable interest in quantum computing in many fields. For example, quantum computers may offer a good way to simulate natural quantum systems, like molecules, whose complexity rapidly exceeds the ability of classical computers to model them accurately. Quantum computing is also tied mathematically to linear algebra, which underpins machine learning and many other modern optimization problems. Therefore, it's reasonable to think quantum computing could be a good fit there as well. - -One commonly cited example of an existing quantum algorithm likely to outperform classical algorithms is [Shor's algorithm][5], which can do the factoring mentioned earlier. Invented by MIT mathematician Peter Shor in 1994, quantum computers can't yet run the algorithm on larger than trivially sized problems. But it's been demonstrated to work in polynomial `O(n3)` time rather than the exponential time required by classical algorithms. - -### Getting started with Qiskit - -At this point, you may be thinking: "But I don't have a quantum computer, and I really like to get hands-on. Is there any hope?" - -Enter an open source (Apache 2.0 licensed) project called [Qiskit][6]. It's a software development kit (SDK) for accessing both the quantum computing simulators and the actual quantum hardware (for free) in the IBM Quantum Experience. You just need to sign up for an API key. - -Certainly, a deep dive into Qiskit, to say nothing of the related linear algebra, is far beyond what I can get into here. If you seek such a dive, there are [many free resources online][7], including a complete textbook. However, dipping a toe in the water is straightforward, requiring only some surface-level knowledge of Python and Jupyter Notebooks. - -To give you a taste, let's do a "Hello, World!" program entirely within the [Qiskit textbook][8]. - -Begin by installing some tools and widgets specific to the textbook: - - -``` -`pip install git+https://github.com/qiskit-community/qiskit-textbook.git#subdirectory=qiskit-textbook-src` -``` - -Next, do the imports: - - -``` -from qiskit import QuantumCircuit, assemble, Aer -from math import pi, sqrt -from qiskit.visualization import plot_bloch_multivector, plot_histogram -``` - -Aer is the local simulator. Qiskit consists of four components: **Aer**, the **Terra** foundation, **Ignis** for dealing with noise and errors on real quantum systems, and **Aqua** for algorithm development. - - -``` -# Let's do an X-gate on a |0> qubit -qc = QuantumCircuit(1) -qc.x(0) -qc.draw() -``` - -An **X-gate** in quantum computing is similar to a **Not gate** in classical computing, although the underlying math actually involves matrix multiplication. (It is, in fact, often called a **NOT-gate**.) - -Now, run it and do a measurement. The result is as you would expect because the qubit was initialized in a `|0>` state, then inverted, and measured. (Use `|0>` and `|1>` to distinguish from classic bits.) - - -``` -# Let's see the result -svsim = Aer.get_backend('statevector_simulator') -qobj = assemble(qc) -state = svsim.run(qobj).result().get_statevector() -plot_bloch_multivector(state) -``` - -![Bloch sphere showing the expected result][9] - -Bloch sphere showing the expected result. (Gordon Haff, [CC-BY-SA 4.0][10]) - -### Conclusion - -In some respects, you can think of quantum computing as a sort of exotic co-processor for classical computers in the same manner as graphics processing units (GPUs) and field-programmable gate arrays (FPGAs). One difference is that quantum computers will be accessed almost entirely as network resources for the foreseeable future. Another is that they work fundamentally differently, which makes them unlike most other accelerators you might be familiar with. That's why there's so much interest in algorithm development and significant resources going in to determine where and when quantum fits best. It wouldn't hurt to see what all the fuss is about. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/qiskit - -作者:[Gordon Haff][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ghaff -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) -[2]: https://en.wikipedia.org/wiki/Big_O_notation -[3]: https://en.wikipedia.org/wiki/Qubit -[4]: https://en.wikipedia.org/wiki/Bloch_sphere -[5]: https://en.wikipedia.org/wiki/Shor%27s_algorithm -[6]: https://qiskit.org/ -[7]: https://qiskit.org/learn -[8]: https://qiskit.org/textbook/preface.html -[9]: https://opensource.com/sites/default/files/uploads/bloch-sphere.png (Bloch sphere showing the expected result) -[10]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/sources/tech/20210819 Short option parsing using getopt in C.md b/sources/tech/20210819 Short option parsing using getopt in C.md index de08ce0f53..c377914a64 100644 --- a/sources/tech/20210819 Short option parsing using getopt in C.md +++ b/sources/tech/20210819 Short option parsing using getopt in C.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/8/short-option-parsing-c" [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "toknow-gh" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20220510 Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store.md b/sources/tech/20220510 Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store.md deleted file mode 100644 index d1344560db..0000000000 --- a/sources/tech/20220510 Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: subject: "Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store" -[#]: via: "https://news.itsfoss.com/kde-connect-ios/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Easily Connect your iPhone with Linux as KDE Connect Arrives on the App Store -====== -The impressive open-source client to help connect mobiles with computers is now available for iPhones and iPad. Try it out! - -![kde connect][1] - -KDE Connect is an open-source tool that lets you connect your mobile phone with your PC. - -Originally, KDE Connect supported Android devices to connect with Linux. Gradually, they added support for Windows. - -Now, it looks like you can use KDE Connect with your iOS device (iPhone or iPad) to connect to your Windows/Linux computer. - -Note that macOS is also in the list of supported platforms. However, it is still an early release version for macOS. So, it may not work as good as it does with other platforms. - -### KDE Connect on the App Store - -![][2] - -We did not notice any official announcement for this. However, some users spotted KDE Connect being available on the [App Store for iOS users][3] right after the release of [version 0.2.1][4]. - -The App Store lists all the essential features including: - -* Shared clipboard: to copy/paste between devices. -* Ability to share files and URLs to your computer from any app. -* Use your phone screen as your computer’s touchpad (visual touchpad). -* Remote presentation remote mode. -* Run commands on your computer from your phone -* End-to-end TLS encryption for security. - -While this remains as an open-source app, the app licensing is a bit different as spotted by [OMGUbuntu][5] to comply with App Store guidelines. - -It is also worth noting that the feature set may not be the same as its Android counterpart, but at least we finally have KDE Connect for iOS users, making it a truly open-source cross-plaform solution to connect mobiles with computers. - -I’d be comfortable recommending KDE Connect to anyone who wants to keep things in check with their mobile through computers. - -Head to the app store from the button below to get started installing it. You can also find various other installation options for different supported platforms on its [official download page][6]. - -Have you tried KDE Connect on iOS yet? Let me know your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/kde-connect-ios/ - -作者:[Ankush Das][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kde-connect-on-iphone-ipad.jpg -[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/kde-connect-ios.jpg -[3]: https://apps.apple.com/id/app/kde-connect/id1580245991 -[4]: https://invent.kde.org/network/kdeconnect-ios/-/commit/43d2ecbbb7e4e70274849f5ec987721318eb9f57 -[5]: https://www.omgubuntu.co.uk/2022/05/kde-connect-iphone-app-available -[6]: https://kdeconnect.kde.org/download.html diff --git a/sources/tech/20221106.1 ⭐️ How to Install MATE Desktop in Arch Linux [Complete Guide].md b/sources/tech/20221106.1 ⭐️ How to Install MATE Desktop in Arch Linux [Complete Guide].md deleted file mode 100644 index cfcdccd046..0000000000 --- a/sources/tech/20221106.1 ⭐️ How to Install MATE Desktop in Arch Linux [Complete Guide].md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: subject: "How to Install MATE Desktop in Arch Linux [Complete Guide]" -[#]: via: "https://www.debugpoint.com/mate-desktop-arch-linux-install/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install MATE Desktop in Arch Linux [Complete Guide] -====== - -**This guide explains the steps you need to install MATE Desktop in Arch Linux.** - -This guide has two parts. The first part deals with installing the base Arch system. The second part is installing the complete MATE desktop environment on top of Arch Linux. - -This article tested in the following versions: MATE 1.24, and MATE 1.26. - -### What is the MATE Desktop? - -When the GNOME desktop changed its direction from GNOME 2 to GNOME 3 – by changing the user interaction and interface, the MATE desktop continued the older/Legacy GNOME 2 development. So, the MATE desktop environment continues the GNOME 2 desktop, which preserved the traditional desktop experience in Linux. It is fast and low on memory consumption. In my opinion, one of the underrated desktop environments which need more love! - -The MATE team continued development as it is one of the popular GNOME 2 based desktop while supporting newer technologies. You can learn more on its [official website][1]. - -### Install MATE Desktop in Arch Linux - -#### Part 1: Install Arch Linux - -If you already have Arch Linux installed, you can skip this step and directly go to the [installation of MATE Desktop section below][2]. - -For a quick Arch Linux installation, follow this automated archinstall guide which is super easy to follow. And once installed, continue to Part 2. - -#### Part 2: Install MATE Desktop in Arch Linux - -After reboot, choose Arch Linux from grub. In the Arch Linux prompt, start running the following commands in sequence. These commands install the Xorg server, display manager, MATE desktop components, controller packages, and additional applications. - -For all the commands, use default, i.e. press enter when asked. - -- **Install Xorg. Approx install size is 80 MB.** - -``` -sudo pacman -S --needed xorg -``` - -- **Install display manager, and MATE desktop components. Approx install size is 380 MB.** - -``` -sudo pacman -S --needed mate mate-extra ttf-freefont lightdm lightdm-gtk-greeter -``` - -![Installing MATE Packages][3] - -- **Install applications** - -This is just a reference. You can also install the ones you require. - -``` -sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper -``` - -Now it’s time to enable the display manager and network manager as a service. So that the next time you log on, they can run automatically by systemd. - -``` -systemctl enable lightdm -systemctl enable NetworkManager -``` - -Reboot the system using the reboot command. - -``` -reboot -``` - -You should see a login prompt on the MATE desktop if all goes well. - -And you can now log in using the user ID and password which you just created. A superfast and legacy MATE Desktop would welcome you. - -![MATE Desktop in Arch Linux][4] - -I hope this guide helps you create your own Arch Linux environment with a legacy MATE desktop from scratch. Please let me know if you run into trouble using the comment box below. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/mate-desktop-arch-linux-install/ - -作者:[Arindam][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lkxed -[1]: https://mate-desktop.org/ -[2]: https://www.debugpoint.com/archinstall-guide/ -[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/Installing-MATE-Packages.jpg -[4]: https://www.debugpoint.com/wp-content/uploads/2021/08/MATE-Desktop-in-Arch-Linux-1.jpg diff --git a/sources/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md b/sources/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md index b4c89ddb3c..e6c7b75fd5 100644 --- a/sources/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md +++ b/sources/tech/20221117.0 ⭐️⭐️ How to Install and Use htop in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/use-htop/" [#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "perfiffer" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20221118.0 ⭐️⭐️ Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md b/sources/tech/20221118.0 ⭐️⭐️ Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md deleted file mode 100644 index 9e5294515c..0000000000 --- a/sources/tech/20221118.0 ⭐️⭐️ Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: subject: "Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu" -[#]: via: "https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/" -[#]: author: "Abhishek Prakash https://itsfoss.com/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Fixing “Key is stored in legacy trusted.gpg keyring” Issue in Ubuntu -====== - -If you use a PPA or add an external repository in Ubuntu 22.04 and later versions, chances are that you will see a message like this: - -``` -W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. -``` - -![ubuntu key is stored legacy][1] - -First thing first. It is not an error, it is a warning message. A warning does not stop the procedure. You can continue upgrading your system even if you see this warning message during an update. - -If you don’t like seeing the warning message, you can take some manual steps to get rid of it. - -There are two ways; the proper way and the quick and dirty way. Read both methods and see which one you feel comfortable with. - -### Method 1: Import the key [Proper but complicated way] - -First, list all the GPG keys added to your system. - -``` -sudo apt-key list -``` - -This will show a huge list of keys stored in your system. What you have to do here is to look for the keys associated with the warning message. - -``` -[email protected]:~$ sudo apt-key list -[sudo] password for abhishek: -Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). -/etc/apt/trusted.gpg --------------------- -pub rsa4096 2014-01-13 [SCEA] [expired: 2019-01-12] - 418A 7F2F B0E1 E6E7 EABF 6FE8 C2E7 3424 D590 97AB -uid [ expired] packagecloud ops (production key) <[email protected]> - -pub rsa4096 2016-02-18 [SCEA] - DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD -uid [ unknown] https://packagecloud.io/slacktechnologies/slack (https://packagecloud.io/docs#gpg_signing) <[email protected]> -sub rsa4096 2016-02-18 [SEA] - -/etc/apt/trusted.gpg.d/audio-recorder-ubuntu-ppa.gpg ----------------------------------------------------- -pub rsa4096 2015-08-30 [SC] - 42EF 41ED 9813 B713 D4F1 F06D 5CF1 2638 ACF9 669F -uid [ unknown] Launchpad PPA for Team audio-recorder - -/etc/apt/trusted.gpg.d/danielrichter2007-ubuntu-grub-customizer.gpg -------------------------------------------------------------------- -pub rsa1024 2010-10-08 [SC] - 59DA D276 B942 642B 1BBD 0EAC A8AA 1FAA 3F05 5C03 -``` - -How do you do that? Read the message carefully. - -``` -W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy -``` - -In my case, the repository has keywords like packagecloud, slacktechnologies. It is shown at the top of the apt-key list output. You may have to scroll a bit in your case. - -In this rare case, the external repository added by Slack, has two GPG keys. One of them is expired and I’ll ignore it. You may not have such a situation. - -You should the last 8 characters (excluding the space) under the line after pub. - -``` -/etc/apt/trusted.gpg --------------------- -pub rsa4096 2014-01-13 [SCEA] [expired: 2019-01-12] - 418A 7F2F B0E1 E6E7 EABF 6FE8 C2E7 3424 D590 97AB -uid [ expired] packagecloud ops (production key) <[email protected]> - -pub rsa4096 2016-02-18 [SCEA] - DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD -uid [ unknown] https://packagecloud.io/slacktechnologies/slack (https://packagecloud.io/docs#gpg_signing) <[email protected]> -``` - -So from the line “DB08 5A08 CA13 B8AC B917 E0F6 D938 EC0D 0386 51BD”, I’ll take the last 8 characters “0386 51BD”, remove the space and then use it to import the GPG key in its dedicated file under the /etc/apt/trusted.gpg.d directory: - -``` -sudo apt-key export 038651BD | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/slack.gpg -``` - -I created a new file slack.gpg here, in case you didn’t notice it. I named it slack.gpg because it is associated with Slack application I installed earlier. The filename does not matter but it’s good for identification. - -If the command runs successfully, you won’t see any message. You can verify that by checking if the newly created gpg file exists or not. - -![import gpg key to trusted ubuntu][2] - -Run the update again and now you should not see the warning message anymore. - -### Method 2: Copy to the trusted.gpd.d directory [Quick and dirty way] - -If you don’t feel comfortable doing all the above stuff manually, well, you can ignore the warning message. I mean, ignoring it is always an option. - -Another option is to copy the /etc/apt/trusted.gpg file to /etc/apt/trusted.gpg.d directory. After all, Ubuntu only complains that it needs the GPG keys in /etc/apt/trusted.gpg.d directory. - -You’ll still have to use the terminal. Open it and use the following command: - -``` -sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d -``` - -Now, if you run the update, you won’t see the “Key is stored in legacy trusted.gpg keyring” warning message anymore. - -![quick dirty way to fix apt key stored legacy][3] - -### Conclusion - -I have written a detailed article on [apt-key deprecation][4]. Apparently, that article had some readers confused and hence I wrote this one to give them direct steps for getting rid of the message. - -As I said before, it is a warning message and can be ignored for now. The onus to ‘fix’ this issue lies on the external software developers and Ubuntu developers. The external software developers should make sure that their GPG keys are no longer added in the /etc/apt/trusted.gpg file. - -The end users should not take the pain for their laziness. - -So, which method did you use to get rid of the ‘key is stored in legacy’ warning message? The first one or the second one? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/key-is-stored-in-legacy-trusted-gpg/ - -作者:[Abhishek Prakash][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/ -[b]: https://github.com/lkxed -[1]: https://itsfoss.com/wp-content/uploads/2022/11/ubuntu-key-is-stored-legacy.png -[2]: https://itsfoss.com/wp-content/uploads/2022/11/import-gpg-key-to-trusted-ubuntu.png -[3]: https://itsfoss.com/wp-content/uploads/2022/11/quick-dirty-way-to-fix-apt-key-stored-legacy.png -[4]: https://itsfoss.com/apt-key-deprecated/ diff --git a/sources/tech/20221123.1 ⭐️⭐️ Build an interactive timeline in React with this open source tool.md b/sources/tech/20221123.1 ⭐️⭐️ Build an interactive timeline in React with this open source tool.md deleted file mode 100644 index 3c5449b6da..0000000000 --- a/sources/tech/20221123.1 ⭐️⭐️ Build an interactive timeline in React with this open source tool.md +++ /dev/null @@ -1,54 +0,0 @@ -[#]: subject: "Build an interactive timeline in React with this open source tool" -[#]: via: "https://opensource.com/article/22/11/react-timeline-planby" -[#]: author: "Karol Kozer https://opensource.com/users/karolkozer" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Build an interactive timeline in React with this open source tool -====== - -For several years, I worked in the TV online and video-on-demand (VOD) industry. While working on a scheduler web application, I realized that there were no good solutions for electronic program guides (EPG) and scheduling. Admittedly, this is a niche feature for most web developers, but it's a common requirement for TV applications. I've seen and analyzed a number of websites that have implemented their own EPG or timeline, and I often wondered why everyone seemed to be inventing their own solutions instead of working on a shared solution everyone could use. And that's when I started developing Planby. - -[Planby][1] is a React (JavaScript) component to help you create schedules, timelines, and electronic program guides (EPG) for online TV and video-on-demand (VOD) services, music and sporting events, and more. Planby uses a custom virtual view, allowing you to operate on a lot of data, and present it to your viewers in a friendly and useful way. - -Planby has a simple API that you can integrate with third party UI libraries. The component theme is customised to the needs of the application design. - -### Timeline performance - -The most significant thing when implementing a timeline feature is performance. You're potentially handling basically an endless stream of data across many many different channels. Applications can struggle with refreshing, moving, and scrolling. You want the user's interactions with the content to be fluid. - -There's also the potential for poor design. Sometimes, an app implements an EPG timeline in the form of a list that you must scroll vertically, meaning you must click on buttons to move left and right through time, which quickly becomes tiring. What's more, sometimes customization for interacting with an EPG (such as rating, choosing your favorite channels, reading right-to-left (RTL), and so on) aren't available at all, or when they are, they cause performance issues. - -Another problem I often face is that an app is too verbose in its data transfer. When an app requests data _while_ you scroll through the EPG, the timeline feels slow and can even crash. - -### What is Planby? - -This is where Planby comes in. Planby is built from scratch, using React and Typescript and a minimal amount of resources. It uses a custom virtual view, allowing you to operate on vast amounts of data. It displays programs and channels to the user, and automatically positions all elements according to hours and assigned channels. When a resource contains no content, Planby calculates the positioning so the time slots are properly aligned. - -Planby has a simple interface and includes all necessary features, such as a sidebar, the timeline itself, a pleasant layout, and live program refreshing. In addition, there's an optional feature allowing you to hide any element you don't want to include in the layout. - -Planby has a simple API that allows you as the developer to implement your own items along with your user preferences. You can use Planby's theme to develop new features, or you can make custom styles to fit in with your chosen design. You can easily integrate with other features, like a calendar, rating options, a list of user favorites, scroll, "now" buttons, a recording schedule, catch-up content, and much more. What's more, you can add custom global styles, including register-transfer level (RTL) functionality. - -And best of all, it uses the open source MIT licensed. - -### Try Planby - -If you would like to try Planby, or just to learn more about it, visit the [Git repository][1]. There, I've got some examples of what's possible and you can read the documentation for the details. The package is also available with `npm`. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/11/react-timeline-planby - -作者:[Karol Kozer][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/karolkozer -[b]: https://github.com/lkxed -[1]: https://github.com/karolkozer/planby diff --git a/sources/tech/20230209.3 ⭐️⭐️ Learn Tcl by writing a simple game.md b/sources/tech/20230209.3 ⭐️⭐️ Learn Tcl by writing a simple game.md deleted file mode 100644 index cd9b94084e..0000000000 --- a/sources/tech/20230209.3 ⭐️⭐️ Learn Tcl by writing a simple game.md +++ /dev/null @@ -1,153 +0,0 @@ -[#]: subject: "Learn Tcl by writing a simple game" -[#]: via: "https://opensource.com/article/23/2/learn-tcl-writing-simple-game" -[#]: author: "James Farrell https://opensource.com/users/jamesf" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Learn Tcl by writing a simple game -====== - -My path to Tcl started with a recent need to automate a difficult Java-based command-line configuration utility. I do a bit of automation programming using Ansible, and I occasionally use the expect module. Frankly, I find this module has limited utility for a number of reasons including: difficulty with sequencing identical prompts, capturing values for use in additional steps, limited flexibility with control logic, and so on. Sometimes you can get away with using the shell module instead. But sometimes you hit that ill-behaving and overly complicated command-line interface that seems impossible to automate. - -In my case, I was automating the installation of one of my company's programs. The last configuration step could only be done through the command-line, through several ill-formed, repeating prompts and data output that needed capturing. The good old traditional Expect was the only answer. A deep understanding of Tcl is not necessary to use the basics of Expect, but the more you know, the more power you can get from it. This is a topic for a follow-up article. For now, I explore the basic language constructs of Tcl, which include user input, output, variables, conditional evaluation, looping, and simple functions. - -### Install Tcl - -On a Linux system, I use this: - -``` -# dnf install tcl -# which tclsh -/bin/tclsh -``` - -On macOS, you can use [Homebrew][1]to install the latest Tcl: - -``` -$ brew install tcl-tk -$ which tclsh -/usr/local/bin/tclsh -``` - -### Guess the number in Tcl - -Start by creating the basic executable script `numgame.tcl`: - -``` -$ touch numgame.tcl -$ chmod 755 numgame.tcl -``` - -And then start coding in your file headed up by the usual shebang script header: - -``` -#!/usr/bin/tclsh -``` - -Here are a few quick words about artifacts of Tcl to track along with this article. - -The first point is that all of Tcl is considered a series of strings. Variables are generally treated as strings but can switch types and internal representations automatically (something you generally have no visibility into). Functions may interpret their string arguments as numbers ( `expr`) and are only passed in by value. Strings are usually delineated using double quotes or curly braces. Double quotes allow for variable expansion and escape sequences, and curly braces impose no expansion at all. - -The next point is that Tcl statements can be separated by semicolons but usually are not. Statement lines can be split using the backslash character. However, it's typical to enclose multiline statements within curly braces to avoid needing this. Curly braces are just simpler, and the code formatting below reflects this. Curly braces allow for deferred evaluation of strings. A value is passed to a function before Tcl does variable substitution. - -Finally, Tcl uses square brackets for command substitution. Anything between the square brackets is sent to a new recursive invocation of the Tcl interpreter for evaluation. This is handy for calling functions in the middle of expressions or for generating parameters for functions. - -### Procedures - -Although not necessary for this game, I start with an example of defining a function in Tcl that you can use later: - -``` -proc used_time {start} { - return [expr [clock seconds] - $start] -} -``` - -Using `proc` sets this up to be a function (or procedure) definition. Next comes the name of the function. This is then followed by a list containing the parameters; in this case 1 parameter `{start}` and then followed by the function body. Note that the body curly brace starts on this line, it cannot be on the following line. The function returns a value. The returned value is a compound evaluation (square braces) that starts by reading the system clock `[clock seconds]` and does the math to subtract out the `$start` parameter. - -### Setup, logic, and finish - -You can add more details to the rest of this game with some initial setup, iterating over the player's guesses, and then printing results when completed: - -``` -set num [expr round(rand()*100)] -set starttime [clock seconds] -set guess -1 -set count 0 - -puts "Guess a number between 1 and 100" - -while { $guess != $num } { - incr count - puts -nonewline "==> " - flush stdout - gets stdin guess - - if { $guess < $num } { - puts "Too small, try again" - } elseif { $guess > $num } { - puts "Too large, try again" - } else { - puts "That's right!" - } -} - -set used [used_time $starttime] - -puts "You guessed value $num after $count tries and $used elapsed seconds" -``` - -The first `set` statements establish variables. The first two evaluate expressions to discern a random number between 1 and 100, and the next one saves the system clock start time. - -The `puts` and `gets` command are used for output to and input from the player. The `puts` I've used imply standard out for output. The `gets` needs the input channel to be defined, so this code specifies `stdin` as the source for terminal input from the user. - -The `flush stdout` command is needed when `puts` omits the end-of-line termination because Tcl buffers output and it might not get displayed before the next I/O is needed. - -From there the `while` statement illustrates the looping control structure and conditional logic needed to give the player feedback and eventually end the loop. - -The final `set` command calls our function to calculate elapsed seconds for gameplay, followed by the collected stats to end the game. - -### Play it! - -``` -$ ./numgame.tcl -Guess a number between 1 and 100 -==> 100 -Too large, try again -==> 50 -Too large, try again -==> 25 -Too large, try again -==> 12 -Too large, try again -==> 6 -Too large, try again -==> 3 -That's right! -You guessed value 3 after 6 tries and 20 elapsed seconds -``` - -### Continue learning - -When I started this exercise, I doubted just how useful going back to a late 1990s fad language would be to me. Along the way, I found a few things about Tcl that I really enjoyed — my favorite being the square bracket command evaluation. It just seems so much easier to read and use than many other languages that overuse complicated closure structures. What I thought was a [dead language][2] was actually still thriving and supported on several platforms. I learned a few new skills and grew an appreciation for this venerable language. - -Check out the official site over at [https://www.tcl-lang.org][3]. You can find references to the latest source, binary distributions, forums, docs, and information on conferences that are still ongoing. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/2/learn-tcl-writing-simple-game - -作者:[James Farrell][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jamesf -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/article/20/6/homebrew-mac -[2]: https://opensource.com/article/19/6/favorite-dead-language -[3]: https://www.tcl-lang.org diff --git a/sources/tech/20230213.0 ⭐️⭐️ Learn Expect by writing and automating a simple game.md b/sources/tech/20230213.0 ⭐️⭐️ Learn Expect by writing and automating a simple game.md new file mode 100644 index 0000000000..362c2ac6c8 --- /dev/null +++ b/sources/tech/20230213.0 ⭐️⭐️ Learn Expect by writing and automating a simple game.md @@ -0,0 +1,251 @@ +[#]: subject: "Learn Expect by writing and automating a simple game" +[#]: via: "https://opensource.com/article/23/2/learn-expect-automate-simple-game" +[#]: author: "James Farrell https://opensource.com/users/jamesf" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Learn Expect by writing and automating a simple game +====== + +While trying to automate my workflow, I hit upon a configuration utility that defied meaningful automation. It was a Java process that didn't support a silent installer, or support `stdin`, and had an inconsistent set of prompts. Ansible's `expect` module was inadequate for this task. But I found that the `expect` command was just the tool for the job. + +My journey to learn Expect meant [learning a bit of Tcl][1]. Now that I have the background to create simple programs, I can better learn to program in Expect. I thought it would be fun to write an article that demonstrates the cool functionality of this venerable utility. + +This article goes beyond the typical simple game format. I plan to use parts of Expect to create the game itself. Then I demonstrate the real power of Expect with a separate script to automate playing the game. + +This programming exercise shows several classic programming examples of variables, input, output, conditional evaluation, and loops. + +### Install Expect + +For Linux based systems use: + +``` +$ sudo dnf install expect +$ which expect +/bin/expect +``` + +I found that my version of Expect was included in the base operating system of macOS: + +``` +$ which expect +/usr/bin/expect +``` + +On macOS, you can also load a slightly newer version using brew: + +``` +$ brew install expect +$ which expect +/usr/local/bin/expect +``` + +### Guess the number in Expect + +The number guessing game using Expect is not that different from the base Tcl I used in my [previous article][1]. + +All things in Tcl are strings, including variable values. Code lines are best contained by curly braces (Instead of trying to use line continuation). Square brackets are used for command substitution. Command substitution is useful for deriving values from other functions. It can be used directly as input where needed. You can see all of this in the subsequent script. + +Create a new game file `numgame.exp`, set it to be executable, and then enter the script below: + +``` +#!/usr/bin/expect + +proc used_time {start} { + return [expr [clock seconds] - $start] +} + +set num [expr round(rand()*100)] +set starttime [clock seconds] +set guess -1 +set count 0 + +send "Guess a number between 1 and 100\n" + +while { $guess != $num } { + incr count + send "==> " + + expect { + -re "^(\[0-9]+)\n" { + send "Read in: $expect_out(1,string)\n" + set guess $expect_out(1,string) + } + + -re "^(.*)\n" { + send "Invalid entry: $expect_out(1,string) " + } + } + + if { $guess < $num } { + send "Too small, try again\n" + } elseif { $guess > $num } { + send "Too large, try again\n" + } else { + send "That's right!\n" + } +} + +set used [used_time $starttime] + +send "You guessed value $num after $count tries and $used elapsed seconds\n" +``` + +Using `proc` sets up a function (or procedure) definition. This consists of the name of the function, followed by a list containing the parameters (1 parameter `{start}`) and then followed by the function body. The return statement shows a good example of nested Tcl command substitution. The `set` statements define variables. The first two use command substitution to store a random number and the current system time in seconds. + +The `while` loop and if-elseif-else logic should be familiar. Note again the particular placement of the curly braces to help group multiple command strings together without needing line continuation. + +The big difference you see here (from the previous Tcl program) is the use of the functions `expect` and `send` rather than using `puts` and `gets`. Using `expect` and `send` form the core of Expect program automation. In this case, you use these functions to automate a human at a terminal. Later you can automate a real program. Using the `send` command in this context isn't much more than printing information to screen. The `expect` command is a bit more complex. + +The `expect` command can take a few different forms depending on the complexity of your processing needs. The typical use consists of one of more pattern-action pairs such as: + +``` +expect "pattern1" {action1} "pattern2" {action2} +``` + +More complex needs can place multiple pattern action pairs within curly braces optionally prefixed with options that alter the processing logic. The form I used above encapsulates multiple pattern-action pairs. It uses the option `-re` to apply regex processing (instead of glob processing) to the pattern. It follows this with curly braces encapsulating one or more statements to execute. I've defined two patterns above. The first is Is intended to match a string of 1 or more numbers: + +``` +"^(\[0-9]+)\n" +``` + +The second pattern is designed to match anything else that is not a string of numbers: + +``` +"^(.*)\n" +``` + +Take note that this use of `expect` is executed repeatedly from within a `while` statement. This is a perfectly valid approach to reading multiple entries. In the automation, I show a slight variation of Expect that does the iteration for you. + +Finally, the `$expect_out` variable is an array used by `expect` to hold the results of its processing. In this case, the variable `$expect_out(1,string)` holds the first captured pattern of the regex. + +### Run the game + +There should be no surprises here: + +``` +$ ./numgame.exp +Guess a number between 1 and 100 +==> Too small, try again +==> 100 +Read in: 100 +Too large, try again +==> 50 +Read in: 50 +Too small, try again +==> 75 +Read in: 75 +Too small, try again +==> 85 +Read in: 85 +Too large, try again +==> 80 +Read in: 80 +Too small, try again +==> 82 +Read in: 82 +That's right! +You guessed value 82 after 8 tries and 43 elapsed seconds +``` + +One difference you may notice is the impatiencethis version exhibits. If you hesitate long enough, expect timeouts with an invalid entry. It then prompts you again. This is different from `gets` which waits indefinitely. The `expect` timeout is a configurable feature. It helps deal with hung programs or during an unexpected output. + +### Automate the game in Expect + +For this example, the Expect automation script needs to be in the same folder as your `numgame.exp` script. Create the `automate.exp` file, make it executable, open your editor, and enter the following: + +``` +#!/usr/bin/expect + +spawn ./numgame.exp + +set guess [expr round(rand()*100)] +set min 0 +set max 100 + +puts "I'm starting to guess using the number $guess" + +expect { + -re "==> " { + send "$guess\n" + expect { + "Too small" { + set min $guess + set guess [expr ($max+$min)/2] + } + "Too large" { + set max $guess + set guess [expr ($max+$min)/2] + } + -re "value (\[0-9]+) after (\[0-9]+) tries and (\[0-9]+)" { + set tries $expect_out(2,string) + set secs $expect_out(3,string) + } + } + exp_continue + } + + "elapsed seconds" +} + +puts "I finished your game in about $secs seconds using $tries tries" +``` + +The `spawn` function executes the program you want to automate. It takes the command as separate strings followed by the arguments to pass to it. I set the initial number to guess, and the real fun begins. The `expect` statement is considerably more complicated and illustrates the power of this utility. Note that there is no looping statement here to iterate over the prompts. Because my game has predictable prompts, I can ask `expect`to do a little more processing for me. The outer `expect` attempts to match the game input prompt of `==>` . Seeing that, it uses `send` to guess and then uses an additional `expect` to figure out the results of the guess. Depending on the output, variables are adjusted and calculated to set up the next guess. When the prompt `==>` is matched, the `exp_continue` statement is invoked. That causes the outer `expect` to be re-evaluated. So a loop here is no longer needed. + +This input processing relies on another behavior of Expect's processing. Expect buffers the terminal output until it matches a pattern. This buffering includes any embedded end of line and other unprintable characters. This is different than the typical regex line matching you are used to with Awk and Perl. When a pattern is matched, anything coming after the match remains in the buffer. It's made available for the next match attempt. I've exploited this to cleanly end the outer `expect` statement: + +``` +-re "value (\[0-9]+) after (\[0-9]+) tries and (\[0-9]+)" +``` + +You can see that the inner pattern matches the correct guess and does not consume all of the characters printed by the game. The very last part of the string (elapsed seconds) is still buffered after the successful guess. On the next evaluation of the outer `expect` , this string is matched from the buffer to cleanly end (no action is supplied). Now for the fun part, let's run the full automation: + +``` +$ ./automate.exp +spawn ./numgame.exp +I'm starting to guess with the number 99 +Guess a number between 1 and 100 +==> 99 +Read in: 99 +Too large, try again +==> 49 +Read in: 49 +Too small, try again +==> 74 +Read in: 74 +Too large, try again +==> 61 +Read in: 61 +Too small, try again +==> 67 +Read in: 67 +That's right! +You guessed value 67 after 5 tries and 0 elapsed seconds +I finished your game in about 0 seconds using 5 tries +``` + +Wow! My number guessing efficiency dramatically increased thanks to automation! A few trial runs resulted in anywhere from 5-8 guesses on average. It also always completed in under 1 second. Now that this pesky, time-consuming fun can be dispatched so quickly, I have no excuse to delay other more important tasks like working on my home-improvement projects :P + +### Never stop learning + +This article was a bit lengthy but well worth the effort. The number guessing game offered a good base for demonstrating a more interesting example of Expect processing. I learned quite a bit from the exercise and was able to complete my work automation successfully. I hope you found this programming example interesting and that it helps you to further your automation goals. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/2/learn-expect-automate-simple-game + +作者:[James Farrell][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jamesf +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/article/23/2/learn-tcl-writing-simple-game + diff --git a/sources/tech/20230214.0 ⭐️⭐️ Create a modern user interface with the Tkinter Python library.md b/sources/tech/20230214.0 ⭐️⭐️ Create a modern user interface with the Tkinter Python library.md new file mode 100644 index 0000000000..1e62dd5d37 --- /dev/null +++ b/sources/tech/20230214.0 ⭐️⭐️ Create a modern user interface with the Tkinter Python library.md @@ -0,0 +1,337 @@ +[#]: subject: "Create a modern user interface with the Tkinter Python library" +[#]: via: "https://opensource.com/article/23/2/user-interface-tkinter-python" +[#]: author: "Patrik Dufresne https://opensource.com/users/patrik-dufresne" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Create a modern user interface with the Tkinter Python library +====== + +Python's Tkinter library isn't exactly known for its good looks. I've developed a library to help create a modern graphical user interface for Python. + +I spent a lot of time searching for a simple but modern GUI toolkit before developing a new library called TKVue that creates graphical interfaces for desktop applications. Through my research, I realized that there were [several different libraries][1] to create graphical interfaces. However, most involve adding new dependencies to bind with graphical libraries. For example, there's a library for Qt, another for wxWidgets, and a third for GTK. None are native to Python or entirely coded in Python. That's a problem. If you want to code a GUI with Qt, it's necessary to compile the Qt source code on each platform you want to support. I wanted to target the three leading platforms: Linux, Windows, and Mac. + +The big advantage of Tkinter is that it's embedded in Python. There's no need for new dependencies or to compile new libraries. Everything's already done for you. + +In short, it is best to use Tkinter to create something portable. + +### Tkinter with a modern theme + +Creating a GUI with Tkinter is easy, but there's no denying that by default, it looks like a GUI from the 1980s. In addition to creating graphical interfaces that aren't very pleasing to the eye, the programming methodology is also from the 1980s: Programming the Tkinter graphical interface is not declarative. + +Motivated by Tkinter's portability, I was determined to use it to create a professional and modern graphical interface. My research led me to discover a whole system for modifying Tkinter's appearance using [themes][2]. Tkinter themes are similar to the CSS file of a web page. They allow you to configure the appearance of the components that make up the graphical interface by declaring new styles. The creation of these styles requires some work, but the system is flexible enough to allow the creation of a modern-looking graphical interface. This work is similar to customizing a CSS theme in web development. If you create a web page without CSS, the appearance is not modern, and a lot of work is needed to improve it. This is why CSS libraries such as bootstrap are used to speed up the creation of the graphic interface. + +In the Tkinter universe, there is no CSS library. Some pre-existing themes exist, but it's preferable for any project to customize the color palette to match your product branding and give it a web look-and-feel. + +To achieve that, the most important element in creating a modern interface with Tkinter is changing the background color and the buttons' appearance. + +Once properly personalized to your liking, the result is a clean and visually attractive graphical interface. + +Here is the "default" theme: + +![Default theme][3] + +The "clam" theme looks like this: + +![Clam theme][4] + +Then with my personalization: + +![Personalized theme][5] + +**TKVue:** + +``` +import tkvue +import tkinter.ttk as ttk + +tkvue.configure_tk(theme="clam") + + +class RootDialog(tkvue.Component): + template = """ + + +