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/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/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/translated/tech/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md b/published/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md similarity index 62% rename from translated/tech/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md rename to published/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md index a37dcc275e..c262036263 100644 --- a/translated/tech/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md +++ b/published/20221105.3 ⭐️⭐️ How to Install GNOME Desktop in Arch Linux [Complete Guide].md @@ -3,22 +3,24 @@ [#]: 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-15537-1.html" -如何在 Arch Linux 中安装 GNOME 桌面 [完整指南] +如何在 Arch Linux 中安装 GNOME 桌面 ====== -**本指南解释了在 Arch Linux 中安装 GNOME 桌面所需的步骤。** +![][0] -本指南有两部分。第一部分是关于安装基本的 Arch 系统。第二部分是在 Arch Linux 基础上安装完整的 GNOME 桌面环境。 +> 本指南解释了在 Arch Linux 中安装 GNOME 桌面所需的步骤。 + +本指南有两部分:第一部分是关于安装基本的 Arch 系统;第二部分是在 Arch Linux 基础上安装完整的 GNOME 桌面环境。 ### 什么是 GNOME 桌面? -GNOME 是一个流行的桌面环境,是许多基于桌面的顶级 Linux 发行版的默认桌面选择,如 Ubuntu 和 Fedora。几乎所有的口味都提供了一个 GNOME 桌面选项。 +GNOME 是一个流行的桌面环境,是如 Ubuntu 和 Fedora 等许多基于桌面的顶级 Linux 发行版的默认桌面。几乎所有的定制版都提供了一个 GNOME 桌面版本。 -GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通、高级用户所青睐。如果你想要一个在你进行工作时保持隐形的桌面,GNOME 就是这样的。它在工作时不会妨碍到你。因此,尽管有许多关于 GNOME3(目前的迭代)速度慢、资源重等的争议,它仍然是许多人的流行和默认选项。 +GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通和高级用户所青睐。如果你想要一个在你进行工作时保持隐形的桌面,GNOME 就是这样的一个。它不会在你工作时妨碍你。因此,尽管有许多关于 GNOME 3(目前的版本)速度慢、资源重等争议,它仍然是许多人的流行和默认选择。 说了这么多,让我们来看看如何在裸机 Arch 中安装 GNOME 桌面。 @@ -28,23 +30,23 @@ GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通 如果你已经安装了 Arch Linux,你可以跳过这一步,直接进入下面安装 GNOME 桌面部分。 -要快速安装 Arch Linux 基础版,请遵循以下步骤。你也可以访问[该指南][1],了解如何将 Arch Linux 安装为双启动或在虚拟机中的完整教程。 +要快速安装 Arch Linux 基础版,请遵循以下步骤。你也可以访问 [该指南][1],了解如何将 Arch Linux 安装为双启动或在虚拟机中的完整教程。 -本文下面介绍的步骤是安装 Arch 的传统方式。新手请按照下面的指南链接,以更现代的方式使用 archinstall 脚本。完成后,回来通过[步骤 2](#第二部分在-arch-linux-中安装-gnome) 继续 GNOME 安装。 +本文下面介绍的步骤是安装 Arch 的传统方式。新手请按照下面的指南链接,以更现代的方式使用 `archinstall` 脚本。完成后,回来通过第二部分的步骤继续 GNOME 安装。 -[现代方法。使用 archinstall 脚本安装(推荐)][2]。 +> **[现代方式:使用 archinstall 脚本安装(推荐)][2]** -##### 传统的方法。下载 Arch Linux +##### 传统方式:下载 Arch Linux -从下面的链接下载 Arch Linux .iso。这里也提供磁力和种子链接。下载后,将 ISO 写入 USB 驱动器。然后从该驱动器启动。 +从下面的链接下载 Arch Linux 的 .iso 文件。它也提供了磁力链接和种子链接。下载后,将 ISO 写入 USB 驱动器。然后从该驱动器启动。 -[下载 Arch Linux][3] +> **[下载 Arch Linux][3]** -如果你打算通过 GNOME Boxes、virt-manager 把它安装成一个虚拟机镜像--那么你就不需要把它写入 U 盘。 +如果你打算通过 GNOME Boxes、virt-manager 把它安装成一个虚拟机镜像,那么你就不需要把它写入 U 盘。 ##### 启动和配置分区 -从 Arch Linux iso 启动后,你必须运行一系列的命令来安装基本系统。 +从 Arch Linux ISO 启动后,你必须运行一系列的命令来安装基本系统。 首先,运行下面的命令,找出设备标识符。 @@ -52,7 +54,7 @@ GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通 fdisk -l ``` -![先 fdisk -l][4] +![之前的 fdisk -l][4] 然后用设备标识符,运行下面的命令,开始对你的磁盘进行分区。请确保根据你的系统改变 `/dev/sda`。 @@ -62,7 +64,7 @@ cfdisk /dev/sda 在下一个提示中选择 `label type = dos`。 -选择自由空间,并从底部选择新的选项。在这个例子中,我将创建三个分区,如下图所示。 +选择自由空间,并从底部选择 “新建New” 选项。在这个例子中,我将创建三个分区,如下图所示: ``` /dev/sda1 - 1G - for /boot @@ -76,13 +78,13 @@ cfdisk /dev/sda 对大小为 5GB 的主根分区重复同样的步骤。 -![交换分区类型改变][6] +![改变为交换分区类型][6] -用同样的步骤创建一个大小为 1G 的交换分区(你可以根据你的需要改变它)。创建交换分区后,确保在底部选择类型,并将其标记为 "Linux Swap/Solaris "选项的交换分区。 +用同样的步骤创建一个大小为 1G 的交换分区(你可以根据你的需要改变它)。创建交换分区后,确保在底部选择 “类型Type”,并用 “Linux Swap/Solaris” 选项将其标记为交换分区。 ![cfdisk 中的最终分区列表][7] -一旦完成,使用底部的写入选项将变化写入磁盘。确保你在写入前做了备份,因为这是你系统中的一个永久性变化。 +一旦完成,使用底部的 “写入Write” 选项将变化写入磁盘。**确保你在写入前做了备份,因为这是你系统中的一个永久性变化。** 在你继续之前,运行下面的命令来检查。你可以看到在这个例子中,有三个分区被列出。 @@ -90,9 +92,9 @@ cfdisk /dev/sda fdisk -l ``` -![fdisk 中的最终分区列表][8] 。 +![fdisk 中的最终分区列表][8] -依次运行下面的命令,在上面新创建的分区中格式化并创建一个 ext4 文件系统。请确保你根据你的需要改变 `/dev/sda1` 和 `/dev/sda2`。 +依次运行下面的命令,在上面新创建的分区中格式化并创建一个 ext4 文件系统。请确保你根据你的需要改变 `/dev/sda1` 和 `/dev/sda2`: ``` mkfs.ext4 /dev/sda1 @@ -101,7 +103,7 @@ mkswap /dev/sda3 swapon /dev/sda3 ``` -完成后,装载系统并创建必要的目录。 +完成后,装载系统并创建必要的目录: ``` mount /dev/sda2 /mnt @@ -115,7 +117,7 @@ mount /dev/sda1 /mnt/boot ##### 安装基础系统 -我希望你已经连接到互联网了。如果没有,请尝试使用 USB 加密狗或 Arch 安装程序自动配置和检测的有线网络连接。如果你没有可用的有线连接,请按照[该指南][10] 使用 Arch Linux 安装程序配置一个无线或 wifi 网络。 +我希望你已经连接到互联网了。如果没有,请尝试使用 USB 网卡或 Arch 安装程序自动配置和检测的有线网络连接。如果你没有可用的有线连接,请按照 [该指南][10] 使用 Arch Linux 安装程序配置一个无线或 Wi-Fi 网络。 依次运行下面的命令,将基本系统安装到已安装的分区中。下载的大小约为 400MB。 @@ -134,44 +136,44 @@ genfstab -U /mnt >> /mnt/etc/fstab ##### 配置基础系统 -依次按照下面的命令来配置基本系统。这涉及到设置你的地域、语言、添加一个登录用户,以及设置互联网。 +依次按照下面的命令来配置基本系统。这涉及到设置你的地域、语言、添加一个登录用户,以及设置互联网: ``` arch-chroot /mnt nano /etc/locale.gen ``` -去掉开头的 #,取消对你所选择的 locale 的注释。在本指南中,我选择了 en_US.UTF-8 UTF-8. 按 CTRL+O、Enter 和 CTRL+X 退出 nano。 +通过去掉开头的 `#` 来取消对你所选择的 语言环境locale 的注释。在本指南中,我选择了 `en_US.UTF-8 UTF-8`,按 `CTRL+O`、回车和 `CTRL+X` 退出 nano。 ![本地化][12] -使用以下方法生成 locale。 +使用以下方法生成语言环境: ``` locale-gen ``` -如果你不想手动去 `/etc/locale.gen` 设置语言,也可以使用以下命令设置语言。 +如果你不想手动去 `/etc/locale.gen` 设置语言,也可以使用以下命令设置语言: ``` echo LANG=en_US.UTF-8 > /etc/locale.conf export LANG=en_US.UTF-8 ``` -设置当地的时区。 +设置当地的时区: ``` ln -s /usr/share/zoneinfo/America/New_York /etc/localtime ``` -同样,你可以根据你的需要来选择它们。你可以通过以下命令列出当地的时区。 +同样,你可以根据你的需要来选择它们。你可以通过以下命令列出当地的时区: ``` ls /usr/share/zoneinfo ls /usr/share/zoneinfo/America ``` -设置硬件时钟,创建一个主机名,并使用以下命令依次启用互联网的 DHCP。你可以根据你的愿望,将 `"arindam-pc"` 改为任何主机名。 +设置硬件时钟,创建一个主机名,并使用以下命令依次启用互联网的 DHCP。你可以根据你的想法,将 `arindam-pc` 改为任何主机名: ``` hwclock --systohc --utc @@ -179,9 +181,9 @@ echo arindam-pc > /etc/hostname systemctl enable dhcpcd ``` -下一步是设置根用户的密码,创建一个管理员用户,并在 sudoers 文件中添加该用户。 +下一步是设置根用户的密码,创建一个管理员用户,并在 `sudoers` 文件中添加该用户。 -依次按照下面的命令进行操作。请确保根据你的需要将用户名从 `debugpoint` 改为其他名称。 +依次按照下面的命令进行操作。请确保根据你的需要将用户名从 `debugpoint` 改为其他名称: ``` passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint @@ -189,13 +191,13 @@ passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint ![创建用户][13] -打开 sudoers 文件,添加以下几行。 +打开 `sudoers` 文件,添加以下几行: ``` nano /etc/sudoers ``` -添加以下几行。由于你已经创建了根用户,该条目应该在那里。 +添加以下几行。由于你已经创建了 `root` 用户,该条目应该已经有了: ``` root ALL=(ALL) ALL @@ -204,7 +206,7 @@ debugpoint ALL=(ALL) ALL ![更改 sudoer 文件][14] -安装 grub,设置初始 ramdisk 环境,依次使用下面的命令安装引导。 +依次使用如下命令安装 Grub,设置初始化 Ramdisk 环境,卸载系统: ``` grub-install /dev/sda @@ -213,7 +215,7 @@ mkinitcpio -p linux exit ``` -![配置 grub][15] 。 +![配置 Grub][15] 然后重新启动你的系统。如果你是在一个物理系统中安装的,在这一步要拔掉 USB 介质。 @@ -229,27 +231,25 @@ reboot #### 第二部分:在 Arch Linux 中安装 GNOME -重启后,从 grub 中选择 Arch Linux。在 Arch Linux 的提示符下,开始依次运行以下命令。这些命令安装 Xorg 服务器、显示管理器、GNOME 桌面组件、控制器包和其他应用程序。 +重启后,从 Grub 中选择 Arch Linux。在 Arch Linux 的提示符下,开始依次运行以下命令。这些命令安装 Xorg 服务器、显示管理器、GNOME 桌面组件、控制器包和其他应用程序。 所有的命令都使用默认值,即在要求时按回车。 -- **安装 Xorg 服务器。安装大小约为 80MB。** +安装 Xorg 服务器。安装大小约为 80MB: ``` sudo pacman -S --needed xorg ``` -- **安装显示管理器,GNOME 桌面。安装大小约为 300MB。** +安装显示管理器、GNOME 桌面。安装大小约为 300MB: ``` sudo pacman -S --needed gnome gnome-tweaks nautilus-sendto gnome-nettool gnome-usage gnome gnome-multi-writer adwaita-icon-theme xdg-user-dirs-gtk fwupd arc-gtk-theme seahosrse gdm ``` -上面的安装会要求提供几个软件包的选项。选择你想要的任何一个。如果你不确定,在询问时选择 jack、noto-sans 和 xdg-portal-desktop-gnome。 +上面的安装会要求提供几个软件包的选项。选择你想要的任何一个。如果你不确定,在询问时选择 “jack”、“noto-sans” 和 “xdg-portal-desktop-gnome”。 -- **安装应用程序** - -这只是一个参考。你也可以安装你所需要的。 +安装应用程序。这只是一个参考。你也可以安装你所需要的: ``` sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper @@ -262,25 +262,28 @@ systemctl enable gdm systemctl enable NetworkManager ``` -使用 reboot 命令重新启动系统。 +使用 `reboot` 命令重新启动系统: ``` reboot ``` -![Arch Linux 运行 GNOME 43 桌面][17] 。 +![Arch Linux 运行 GNOME 43 桌面][17] -如果一切顺利,你应该在 GNOME 桌面上看到一个漂亮的登录提示。使用你刚刚创建的凭证登录。迎接你的应该是 Arch Linux 中漂亮而干净的 GNOME 43 桌面。 +如果一切顺利,你应该在 GNOME 桌面上看到一个漂亮的登录提示。使用你刚刚创建的凭证登录。迎接你的应该是 Arch Linux 漂亮而干净的 GNOME 43 桌面。 我希望这个指南能帮助你在裸机 Arch 安装 GNOME 桌面。 -------------------------------------------------------------------------------- -通过。https://www.debugpoint.com/gnome-arch-linux-install/ +via: https://www.debugpoint.com/gnome-arch-linux-install/ -作者:[Arindam][a] 选题:[lkxed][b] 翻译者:[Chao-zhi](https://github.com/Chao-zhi)校对:[校对者ID](https://github.com/校对者ID) +作者:[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/)荣誉推出 +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.debugpoint.com/author/admin1/ [b]: https://github.com/lkxed @@ -301,3 +304,4 @@ reboot [15]: https://www.debugpoint.com/wp-content/uploads/2020/12/configure-grub-1024x639.jpg [16]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-is-installed.jpg [17]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-Linux-Running-GNOME-43-Desktop-1024x636.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202302/13/220203a5yb5xy24yer4atv.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/translated/tech/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md b/published/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md similarity index 67% rename from translated/tech/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md rename to published/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md index 20ac21e44f..6d04f8d7d8 100644 --- a/translated/tech/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md +++ b/published/20230117.0 ⭐️⭐️ Learn zip Command in Linux Using Examples.md @@ -3,50 +3,52 @@ [#]: 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-15539-1.html" -通过实例学习Linux中的zip命令 +zip 命令的解释与示例 ====== -**这里是关于理解 Linux 中的 zip 命令的初学者指南,并附有一些例子。** +> 这是一份关于理解 Linux 中的 zip 命令的初学者指南,并附有一些例子。 ![][1] +这篇文章是 [Linux 命令][4]学习系列的一部分。 + zip 文件是一个包含一个或多个文件的压缩档案。它作为一种无损数据压缩技术被广泛使用。由于压缩,它占用的磁盘空间更少,在计算机网络上传输时需要的数据也更少。 -这些压缩文件可以在 Linux、Windows 和 macOS 中轻松提取。有各种支持压缩文件的软件,也提供提取它们的功能。 +这些压缩文件可以在 Linux、Windows 和 macOS 中轻松提取。有各种支持压缩 zip 文件的软件,也提供提取它们的功能。 由于它很流行,几乎所有的操作系统都内置了这个功能。 在本教程中,我们将谈论几种基于终端的方法来压缩 Linux 中的文件。 -### Linux 中的 Zip 命令,例子: +### Linux 中的 Zip 命令示例 #### 语法 -在 Linux 中,你需要使用的压缩文件的程序名称是`zip`。下面是基本的语法。 +在 Linux 中,你需要使用的压缩文件的程序名称是 `zip`。下面是基本的语法: -``` sh +``` zip [压缩文件名] file1 file2 file3 ``` -这里是官方的语法。 +以下是正式的语法: -``` sh +``` zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list] ``` -理想情况下,zip 命令应该被安装在所有主要的 Linux 发行版中。如果没有,使用下面的命令来安装它。 +理想情况下,`zip` 命令应该被安装在所有主流的 Linux 发行版中。如果没有,使用下面的命令来安装它。 -#### 在 Debian, Ubuntu and 相关发行版上安装 +#### 在 Debian、Ubuntu 和相关发行版上安装 ``` sudo apt install zip ``` -#### 在 Fedora, 基于 RHEL 的系统上安装 +#### 在 Fedora、基于 RHEL 的系统上安装 ``` sudo dnf install zip @@ -58,17 +60,17 @@ sudo dnf install zip pacman -S zip ``` -让我们继续看一些例子 +让我们继续看一些例子。 #### 如何压缩文件和文件夹 -我的测试目录中有以下三个文件。它们是 file1.txt、file2.txt 和 file3.txt。如果我想用 zip 压缩三个文件,并创建一个 myfiles.zip 的压缩包,用下面的命令就可以了。 +我的测试目录中有以下三个文件。它们是 `file1.txt`、`file2.txt` 和 `file3.txt`。如果我想用 zip 压缩三个文件,并创建一个 `myfiles.zip` 的压缩包,用下面的命令就可以了。 ``` zip myfiles.zip file1.txt file2.txt file3.mp3 ``` -输出。 +输出: ``` adding: file1.txt (stored 0%) @@ -81,12 +83,12 @@ adding: file3.mp3 (deflated 13%) 这里你应该记住几个要点。 - 当创建一个 zip 文件时,你应该有对当前目录的修改权限。 -- zip 文件格式不包含权限,即读(4),写(2),和执行(1)。所以,创建该文件的用户成为该文件的所有者。 -- 如果你想使用有权限的 zip,可以尝试使用 `tar` 命令(将在后面的教程中解释)。 +- zip 文件格式不包含权限,即读(4)、写(2),和执行(1)。所以,创建该文件的用户成为该文件的所有者。 +- 如果你想使用带有权限的 zip,可以尝试使用 `tar` 命令(将在后面的教程中解释)。 - 在上面的输出中,`zip` 命令显示了被添加到存档中的文件名和压缩方法。 - 在目标文件名中指定 .zip 文件名的扩展名并不是必须的。如果你省略了 .zip,`zip` 会在最后加上 .zip。 -当你有成百上千的文件在运行时,可以在终端中减少输出。你可以使用 `-q` 参数来抑制 `zip` 命令中的输出。 +当你操作成百上千的文件时,为了减少终端中的输出,你可以使用 `-q` 参数来抑制 `zip` 命令中的输出: ``` zip -q myfiles.zip file1.txt file2.txt file3.txt @@ -96,13 +98,13 @@ zip -q myfiles.zip file1.txt file2.txt file3.txt `zip` 命令的 `-r` 选项使你能够囊括所有子目录。这个选项会递归地遍历到一个目录结构的最后一个子目录,并将它们全部加入到压缩文件中。 -下面的命令创建了一个包含 my_folder 内所有内容和子目录的压缩文件。 +下面的命令创建了一个包含 `my_folder` 内所有内容和子目录的压缩文件: ``` zip -r myfolder.zip my_folder ``` -你也可以使用通配符(*)在你的压缩文件中包含特定类型的文件。 +你也可以使用通配符(`*`)在你的压缩文件中包含特定类型的文件: ``` zip -0 my_movies.zip *.mp4 @@ -118,9 +120,9 @@ zip -r myfiles.zip file1.txt file2.txt file3.txt my_folder1 my_folder2 ### 压缩算法 -zip 压缩的默认输出包含两个不同的词,即 deflate 和 store。zip 默认使用的压缩方法是 deflate。如果它成功地压缩了文件,那么输出显示 deflate。而当它不能压缩一个文件时,它只是将它们原封不动地存储在 .zip 文件中。这些文件的输出显示为 store。 +zip 压缩的默认输出包含两个不同的词,即 `deflate` 和 `store`。zip 默认使用的压缩方法是 `deflate`。如果它成功地压缩了文件,那么输出显示 `deflate`。而当它不能压缩一个文件时,它只是将它们原封不动地存储在 .zip 文件中。这些文件的输出显示为 `store`。 -目前有许多压缩算法。其中一种是 bzip2 压缩法,它在 Linux 中被 `zip` 命令所支持。你可以指定压缩算法作为一个命令选项来使用。使用选项 `-Z`,后面跟上算法名称,如下所示。 +目前有许多压缩算法。其中一种是 bzip2 压缩法,在 Linux 中的 `zip` 命令支持它。你可以指定压缩算法作为一个命令选项来使用。使用选项 `-Z`,后面跟上算法名称,如下所示: ``` zip -r -Z bzip2 myfolder.zip my_folder @@ -138,7 +140,7 @@ zip -9 -r myfolder.zip my_folder #### 用密码保护一个压缩文件 -你也可以用下面的 `-e` 选项对压缩文件进行密码保护。 +你也可以用下面的 `-e` 选项对压缩文件进行密码保护: ``` zip -e -r myfolder.zip my_folder @@ -146,7 +148,7 @@ zip -e -r myfolder.zip my_folder 运行该命令后,它将要求输入密码。 -> 注意。尽量不要使用 zip 命令来对压缩文件进行密码保护。zip 的加密算法是使用流密码的 PKZIP。而它很容易被破解。如果你想保护你的文件,请使用 7-Zip 或其他高级工具。 +> 注意。尽量不要使用 zip 命令来对压缩文件进行密码保护。zip 的加密算法是使用流式加密的 PKZIP。而它很容易被破解。如果你想保护你的文件,请使用 7-Zip 或其他高级工具。 #### 分割较大的压缩文件 @@ -160,9 +162,8 @@ zip -s 1g -r myfolder.zip my_folder 你学到了一些 `zip` 命令的基本知识。它对大多数本地情况很有用,在这些情况下,你需要通过即时压缩来进行快速备份。然而,对于更高级的选项,你应该使用 7-Zip 或其他命令,我将在接下来的几篇文章中分享。 -同时,你可以在 [zip 手册][3]中了解更多。 +同时,你可以在 [zip 手册][3] 中了解更多。 -_这篇文章是 [Linux 命令][4]学习系列的一部分。_ -------------------------------------------------------------------------------- @@ -171,7 +172,7 @@ via: https://www.debugpoint.com/zip-command-linux-examples/ 作者:[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/) 荣誉推出 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/published/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md b/published/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md new file mode 100644 index 0000000000..a5edf9b39f --- /dev/null +++ b/published/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md @@ -0,0 +1,110 @@ +[#]: subject: "Start developing for WebAssembly with our new guide" +[#]: via: "https://opensource.com/article/23/2/webassembly-guide" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15541-1.html" + +跟着我们的新指南学习开发 WebAssembly +====== + +![][0] + +> 使用 WebAssembly 开发有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。 + +在过去的几十年里,Web 浏览器作为最流行的跨平台应用经久不衰。从另一个角度看浏览器,它是最受欢迎的应用交付平台之一。想想你使用的所有网站,它们取代了你过去用桌面上运行的软件进行的活动。你仍然在使用软件,但你是通过浏览器来访问它,而且是在别人的 Linux 服务器上运行。在优化我们所有人使用的软件的永恒努力中,软件开发世界早在 2019 年就引入了 WebAssembly,作为通过 Web 浏览器运行编译代码的一种方式。应用的性能比以往任何时候都要好,而且可以生成 WebAssembly 编码的语言远不只是通常的 PHP、Python 和 JavaScript。 + +### 一个目标和一种语言 + +关于 WebAssembly 的一个强大但也最令人困惑的地方是,“WebAssembly” 这个词既指一种语言,也指一个目标。WebAssembly 是一种汇编语言,但没有多少人选择直接用汇编写代码。即使是汇编语言,最终也会被转换为二进制格式,这也是计算机运行代码的要求。这种二进制格式也被称为 WebAssembly。不过这很好,因为这意味着你可以用你选择的语言来写一些最终以 WebAssembly 交付的东西,包括 C、C++、Rust、Javascript 和其他许多语言。 + +进入 WebAssembly 的途径是 Emscripten,这是一个 LLVM 编译器工具链,可以从你的代码中产生 WebAssembly。 + +### 安装 Emscripten + +要在你的 Linux 或 macOS 电脑上安装 Emscripten,请使用 Git: + +``` +$ git clone https://github.com/emscripten-core/emsdk.git +``` + +改变目录进入 `emsdk` 目录并运行安装命令: + +``` +$ ./emsdk install latest +$ ./emsdk activate latest +``` + +Emscripten 工具链中的所有内容都安装在 `emsdk` 目录下,对系统的其他部分没有影响。由于这个原因,在使用 `emsdk` 之前,你必须 源引source 它的环境: + +``` +$ source ./emsdk_env.sh +``` + +如果你打算经常使用 `emsdk`,你也可以在 `.bashrc` 中加入环境设置脚本。 + +要在 Windows 上安装 Emscripten,你可以在 WSL 环境下运行 Linux。 + +请访问 [Emscripten 网站][1] 了解更多安装信息。 + +### Hello World + +下面是一个用 C++ 编写的简单的 “Hello World” 应用。 + +``` +#include + +using namespace std; + +int main() { + cout << "Hello world"; + return 0; +} +``` + +先把它作为你的系统的标准二进制文件来测试: + +``` +$ g++ hello.cpp -o world +$ ./world +Hello world +``` + +看到它像预期的那样工作,用 `emcc` 把它构建为 WebAssembly: + +``` +$ emcc hello.cpp -o world.html +``` + +最后,用 `emrun` 运行它: + +``` +$ emrun ./world.html +``` + +`emrun` 工具是一个用于本地测试的方便命令。当你在服务器上托管你的应用时,`emrun` 就没有必要了。 + +### 学习更多关于 WebAssembly 的知识 + +使用 WebAssembly 开发可以有很多不同的方向,这取决于你已经知道的东西和你想建立的东西。如果你了解 C 或 C++,那么你可以用这些来写你的项目。如果你正在学习 Rust,那么你可以使用 Rust。甚至 Python 代码也可以使用 Pyodide 模块来作为 WebAssembly 运行。你有很多选择,而且没有错误的开始方式(甚至有 COBOL 到 WebAssembly 的编译器)。如果你渴望开始使用 WebAssembly, + +> **[请下载我们免费的电子书][2]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/2/webassembly-guide + +作者:[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://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/published/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md b/published/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md new file mode 100644 index 0000000000..d0defcde55 --- /dev/null +++ b/published/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md @@ -0,0 +1,172 @@ +[#]: subject: "How to Install DOSBox in Ubuntu to Play Old Games" +[#]: via: "https://www.debugpoint.com/install-dosbox-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "gpchn" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15538-1.html" + +如何在 Ubuntu 中安装 DOSBox 玩老游戏 +====== + +![][0] + +> 了解如何在 Ubuntu 中安装 DOSBox,并配置它来玩旧式 DOS 游戏。 + +DOSBox 是一个自由开源的操作系统模拟器,可以在现代 Linux 系统中运行。它有几个组件可以模仿旧的硬件,以运行旧的程序和游戏。 + +这一切使得在现代 Linux 发行版中享受旧游戏和应用程序成为可能。 + +在本指南中,我将向你展示如何安装 DOSBox,配置它,并玩一个示例游戏。 + +### 在 Ubuntu 中安装 DOSBox + +DOSBox 的主软件包在所有主要的 Linux 发行版中都可用。 + +在 Ubuntu、Debian、LinuxMint 和相关发行版中,使用以下命令安装它: + +``` +sudo apt install dosbox +``` + +在 Fedora、CentOS、RHEL 和相关发行版中,使用以下命令安装它: + +``` +sudo dnf install dosbox +``` + +在 Arch Linux 中,使用以下命令安装它: + +``` +pacman -S --needed dosbox +``` + +安装就结束了。现在是配置和运行的时候了。 + +### 运行 DOSBox + +安装后,从终端键入以下内容: + +``` +dosbox +``` + +它将显示以下界面,这是 DOSBox 提示符。第一次运行非常重要,因为它会创建 DOSBox 配置文件。 + +键入 `exit` 暂时关闭 DOSBox。 + +![DOSBox first time run][1] + +配置文件为你提供了几个调整设置的选项。在 Ubuntu 中,该文件创建在 `~/.dosbox/dosbox-[version].conf`。 + +在 Fedora 中,它从以下路径加载临时配置文件 `~/.config/dosbox/dosbox-staging.conf`. + +默认情况下,你可以使用默认配置。但是如果你愿意,你可以修改它。 + +例如,如果你想全屏启动 DOSBox,你可以启用或禁用相关设置。像这样: + +``` +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +``` + +你可以在 [官方文档][2] 中找到所有的设置选项。 + +### 下载以及游玩老游戏 + +有许多网站提供旧的 DOS 游戏。我使用过下面的网站,它提供了一套可以在现代系统中玩的老游戏。 + +所以,访问下面的网站,下载你想要的任何游戏。 + +> **[下载 DOS 游戏][3]** + +在你的 `/home` 目录下创建一个文件夹,并将其命名为 `dosbox`: + +``` +cd ~ +mkdir dosbox +``` + +现在,解压你下载的游戏(应该是一个 .exe 文件),在 `~/dosbox` 目录下创建一个单独的文件夹。 + +例如,我下载了游戏 “马里奥和路易吉(1994)”。我在 `dosbox` 文件夹中创建了一个名为 `mario` 的文件夹,并将游戏文件放进去。 + +![Keep the game in a separate folder][4] + +现在从终端启动 dosbox: + +``` +dosbox +``` + +并键入以下内容,将游戏挂载到虚拟的 C: 盘中: + +``` +mount c ~/dosbox/mario +``` + +以上命令完成后,将驱动器更改为 C:: + +``` +c: +``` + +现在,你可以输入游戏的文件名来运行游戏: + +``` +mario +``` + +![Running the game][5] + +![Mario running in DOSBox in Ubuntu][6] + +### 键盘或控制器映射 + +默认情况下,DOSBox 会自动检测键盘或你插入的控制器。但是,如果你想更改游戏按键绑定,可以从终端运行以下命令: + +``` +dosbox -startmapper +``` + +它将显示以下界面,每个键上都标记有事件。你可以点开任何一个键,根据自己的习惯进行更改。 + +![DOSBox keyboard and controller mapping][7] + +### 结论 + +我希望你在 Ubuntu 和其他发行版中安装了 DOSBox 之后,能够运行你最喜欢的 DOS 游戏。DOSBox 是最酷的软件之一,你可以使用它来运行任何程序,例如 [Turbo C][8] 等。 + +如果你有任何麻烦或问题,请在评论区告诉我。 + +享受游戏吧! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-dosbox-ubuntu/ + +作者:[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://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBox-first-time-run.jpg +[2]: https://www.dosbox.com/wiki/Dosbox.conf#Sections +[3]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection +[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/Keep-the-game-in-a-separate-folder.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-the-game.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/Mario-playing-in-DOSBox-in-Ubuntu.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBOox-keyboard-and-controller-mapping.jpg +[8]: https://www.debugpoint.com/setting-up-dosbox-in-ubuntu-to-run-turbo-c/ +[0]: https://img.linux.net.cn/data/attachment/album/202302/14/142608nsoov2vory2nipiv.jpg \ No newline at end of file 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 index eb1efd0073..4ac2f833ed 100644 --- 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 @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin" [#]: author: "David Both https://opensource.com/users/dboth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "toknow-gh" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/talk/20220204 How we hired an open source developer.md b/sources/talk/20220204 How we hired an open source developer.md deleted file mode 100644 index bfdefe20a0..0000000000 --- a/sources/talk/20220204 How we hired an open source developer.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: 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: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How we hired an open source developer -====== -My team opted out of the standard algorithm coding exercise for a -process that yielded more relevant results. -![people in different locations who are part of the same team][1] - -As the CEO and co-founder of [Profian][2], a start-up security company, I've been part of our effort to hire developers to work on [Enarx][3], a security project that deals with confidential computing, written almost exclusively in [Rust][4] (with a bit of Assembly). Profian has now found all the people it was looking for in this search, with a couple of developers due to start in the next few weeks. However, new contributors are absolutely welcome to Enarx, and if things continue to go well, the company will definitely want to hire more folks in the future. - -Hiring people is not easy, and Profian had a set of specialized requirements that made the task even more difficult. I thought it would be useful and interesting for the community to share how we approached the problem. - -### What were we looking for? - -These are the specialized requirements I'm talking about: - - * **Systems programming:** Profian mainly needs people who are happy programming at the systems layer. This is pretty far down the stack, with lots of interactions directly with hardware or the OS. To create client-server pieces, for instance, we have to write quite a lot of the protocols, manage the crypto, and so forth, and the tools for this aren't all very mature (see "Rust" below). - - * **Rust:** Almost all of the project is written in Rust, and what isn't is written in Assembly language (currently exclusively x86, though that may change as we add more platforms). Rust is new, cool, and exciting, but it's still quite young, and some areas don't have all the support you might like or aren't as mature as you'd hope—everything from cryptography through multithreading libraries and compiler/build infrastructure. - - * **Distributed team:** Profian is building a team of folks where we can find them. Profian has developers in Germany, Finland, the Netherlands, North Carolina (US), Massachusetts (US), Virginia (US), and Georgia (US). I'm in the United Kingdom, our community manager is in Brazil, and we have interns in India and Nigeria. We knew from the beginning that we wouldn't have everyone in one place, and this required people who would be able to communicate and collaborate with people via video, chat, and (at worst) email. - - * **Security:** Enarx is a security project. Although we weren't specifically looking for security experts, we need people who can think and work with security top of mind and design and write code that is applicable and appropriate for the environment. - - * **Git:** All of our code is stored in git (mainly [GitHub][5], with a bit of GitLab thrown in). so much of our interaction around code revolves around git that anybody joining us would need to be very comfortable using it as a standard tool in their day-to-day work. - - * **Open source:** Open source isn't just a licence; it's a mindset and, equally important, a way of collaborating. A great deal of open source software is created by people who aren't geographically co-located and who might not even see themselves as a team. We needed to know that the people we hired, while gelling as a close team within the company, would be able to collaborate with people outside the organisation and embrace Profian's "open by default" culture, not just for code, but for discussions, communications, and documentation. - - - - -### How did we find them? - -As I've mentioned elsewhere, [recruiting is hard][6]. Profian used a variety of means to find candidates, with varying levels of success: - - * LinkedIn job adverts - * LinkedIn searches - * Language-specific discussion boards and hiring boards (e.g., Reddit) - * An external recruiter (shout out to Gerald at [Interstem][7]) - * Word-of-mouth/personal recommendations - - - -It's difficult to judge between these sources in terms of quality, but without an external recruiter, we'd certainly have struggled with quantity (and we had some great candidates from that pathway, too). - -### How did we select them? - -We needed to measure all of the candidates against all of the requirements noted above, but not all of them were equal. For instance, although we were keen to hire Rust programmers, someone with strong C/C++ skills at the systems level would be able to pick up Rust quickly enough to be useful. On the other hand, a good knowledge of using git was absolutely vital, as we couldn't spend time working with new team members to bring them up to speed on our way of working. - -A strong open source background was, possibly surprisingly, not a requirement, but the mindset to work in that sort of model was, and anyone with a history of open source involvement is likely to have a good knowledge of git. The same goes for the ability to work in a distributed team: So much of open source is distributed that involvement in almost any open source community was a positive indicator. Security, we decided, was a "nice-to-have" qualification. - -We wanted to keep the process simple and quick. Profian doesn't have a dedicated HR or People function, and we're busy trying to get code written. This is what we ended up with (with slight variations), and we tried to complete it within 1-2 weeks: - - 1. Initial CV/resume/GitHub/GitLab/LinkedIn review to decide whether to interview - 2. 30-40 minute discussion with me as CEO, to find out if they might be a good cultural fit, to give them a chance to find out about us, and to get an idea if they were as technically adept as they appeared in Step 1 - 3. Deep dive technical discussion led by Nathaniel, usually with me there - 4. Chat with other members of the team - 5. Coding exercise - 6. Quick decision (usually within 24 hours) - - - -The coding exercise was key, but we decided against the usual approach. Our view was that a pure "algorithm coding" exercise beloved by many tech companies was pretty much useless for what we wanted: to find out whether a candidate could quickly understand a piece of code, fix some problems, and work with the team to do so. We created a GitHub repository with some almost-working Rust code in it (in fact, we ended up using two, with one for people a little higher up the stack), then instructed candidates to fix it, perform some git-related processes on it, and improve it slightly, adding tests along the way. - -An essential part of the test was to get candidates to interact with the team via our chat room(s). We scheduled 15 minutes on a video call for setup and initial questions, two hours for the exercise ("open book" – as well as talking to the team, candidates were encouraged to use all resources available to them on the Internet), followed by a 30-minute wrap-up session where the team could ask questions, and the candidate could reflect on the task. This conversation, combined with the chat interactions during the exercise, allowed us to get an idea of how well the candidate was able to communicate with the team. Afterwards, the candidate would drop off the call, and we'd most often decide within 5-10 minutes whether we wanted to hire them. - -This method generally worked very well. Some candidates struggled with the task, some didn't communicate well, some failed to do well with the git interactions – these were the people we didn't hire. It doesn't mean they're not good coders or might not be a good fit for the project or the company later on, but they didn't meet the criteria we need now. Of the developers we hired, the level of Rust experience and need for interaction with the team varied, but the level of git expertise and their reactions to our discussions afterwards were always sufficient for us to decide to take them. - -### Reflections - -On the whole, I don't think we'd change a huge amount about the selection process—though I'm pretty sure we could do better with the search process. The route through to the coding exercise allowed us to filter out quite a few candidates, and the coding exercise did a great job of helping us pick the right people. Hopefully, everyone who's come through the process will be a great fit and produce great code (and tests and documentation and …) for the project. Time will tell! - -* * * - -This article originally appeared on [Alice, Eve and Bob – a security blog][8] and is republished with permission. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/2/how-we-hired-open-source-developer - -作者:[Mike Bursell][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/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/ 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 9d4e58d4d6..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: " " -[#]: 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/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/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 index d1344560db..bc61120810 100644 --- 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 @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/kde-connect-ios/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "XiaotingHuang22" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " 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 45b626bd9d..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: " " -[#]: 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 index 3c5449b6da..17ef450dfe 100644 --- 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 @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/11/react-timeline-planby" [#]: author: "Karol Kozer https://opensource.com/users/karolkozer" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md b/sources/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md deleted file mode 100644 index 6757bebe6f..0000000000 --- a/sources/tech/20230206.0 ⭐️ Elementary OS 7 Installation Guide with Screenshots.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: subject: "Elementary OS 7 Installation Guide with Screenshots" -[#]: via: "https://www.linuxtechi.com/elementary-os-7-installation-guide/" -[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Elementary OS 7 Installation Guide with Screenshots -====== - -Hello techies, in this post, we will cover how to Install Elementary OS 7 step by step with screenshots on laptop or desktop. It is based on latest and stable Ubuntu 22.04 LTS. - -Elementary OS 7 with code name “Horus” released with lot of improvements like : - -- Improved AppCenter and install all application that one need. -- Improved sideloading and alt store (Flathub) experience -- Latest GNOME Web 43 support for creating web apps. -- Getting OS and Applicate Updates quickly -- Power Profile Management -- Improvement in App Description - -##### System Requirements for Elementary OS 7 - -- Dual Core 64-bit processor -- 4 GB RAM or more -- 32 GB hard disk -- Internet Access -- Bootable USB Flash Drive ( 4 GB Storage) - -Without any further delay, let’s jump into the installation steps - -### 1) Download Elementary OS 7 - -Use below official URL to download ISO file, - -- Download Elementary OS 7 ISO - -Once ISO file is downloaded then burn it into USB flash drive and make it bootable. - -On Windows operating use “Rufus” software to make bootable USB drive using ISO file. In Linux, refer the following URL: - -- How to Create Bootable USB Drive on Ubuntu / Linux Mint - -### 2) Boot the system with bootable media - -Now boot the target system with bootable USB drive. From bios settings change the boot medium from hard disk to USB. When the system boots up with USB drive then we will get the following screen, - -### 3) Select Language for Installation - -Choose your preferred language and then click select, - -### 4) Choose Keyboard Layout - -In this step, you will be requested to choose keyboard layout and then click on ‘Select’ - -### 5) Try or Install elementary OS - -We will be presented the beneath screen, where we must our choose installation type. It gives us following options, - -- Try Demo Mode – Try Elementary OS 7 without installing -- Erase disk and Install – Installer will erase the whole disk and will create required partitions automatically. -- Custom Install (Advanced) – It will give us the option to create custom partitions. - -In this post, I will go with the 2nd option (Erase disk and install). - -Click on “Erase Disk and Install” - -In the following screen, select the drive on which OS will be installed and then click on “Erase and Install” - -If you want to encrypt the device’s drive, then click on “Choose Password” else click on “Don’t Encrypt”. - -### 6) Installation Progress - -As we can see below, installation got started and is in progress. - -Once the installation is completed, installer will prompt to reboot the system. - -Click on “Restart Device” and don’t forget to change boot medium from bios settings so that it boots up with the disk. - -### 7) Create Local User and Set Hostname - -When the system boots up after the installation, you will be prompted to enter local user details and hostname of your system. - -Specify the details as per your requirement, - -Click on “Finish Setup”. - -In the following screen, you will be prompted to enter your local user credentials that you have created above, - -After entering the credentials, hit enter - -### 8) Elementary OS 7 Welcome Screen - -We will get the beneath welcome screen, - -Choose “Skip All” - -Click “Get Started” and then we will get following desktop screen, - -Great, it confirms that you have successfully installed Elementary OS 7 on your system. That’s all from this guide, explore this exciting Linux distribution and have fun 😊. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/elementary-os-7-installation-guide/ - -作者:[Pradeep Kumar][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.linuxtechi.com/author/pradeep/ -[b]: https://github.com/lkxed - 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 9b7f4552e7..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: " " -[#]: 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/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md b/sources/tech/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md deleted file mode 100644 index 6f55f5f78d..0000000000 --- a/sources/tech/20230209.4 ⭐️ Start developing for WebAssembly with our new guide.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: "Start developing for WebAssembly with our new guide" -[#]: via: "https://opensource.com/article/23/2/webassembly-guide" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Start developing for WebAssembly with our new guide -====== - -Over the past few decades, the web browser has endured as the most popular cross-platform application. Looking at the browser from a different angle, it is one of the most popular platforms for application delivery. Think of all the websites you use that take the place of activities you used to do with software running on your desktop. You're still using software, but you're accessing it through a browser, and it's running on somebody else's Linux server. In the eternal effort to optimize the software we all use, the world of software development introduced WebAssembly back in 2019 as a way to run compiled code through a web browser. Application performance is better than ever, and the options for coding go far beyond the usual list of PHP, Python, and JavaScript. - -### A target and a language - -One of the powerful but also most confusing things about WebAssembly is that the term "webassembly" refers to both a language and a target. WebAssembly is an assembly language, but not many people choose to write code directly in assembly. Even the assembly language is ultimately converted to a binary format, which is what a computer requires to run code. This binary format is also called WebAssembly. This is good, though, because it means that you can use your choice of languages to write something that's ultimately delivered in WebAssembly, including C, C++, Rust, Javascript, and many others. - -The gateway into WebAssembly is Emscripten, an LLVM compiler toolchain that produces WebAssembly from your code. - -### Install Emscripten - -To install Emscripten on your Linux or macOS computer, use Git: - -``` -$ git clone \ -https://github.com/emscripten-core/emsdk.git -``` - -Change directory into the `emsdk` directory and run the install command: - -``` -$ ./emsdk install latest -$ ./emsdk activate latest -``` - -Everything in the Emscripten toolchain is installed within the `emsdk` directory and has no effect on the rest of your system. For this reason, before you use `emsdk`, you must source its environment: - -``` -$ source ./emsdk_env.sh -``` - -If you plan on using `emsdk` often, you can also source its environment setup script in `.bashrc`. - -To install Emscripten on Windows, you can run Linux in the WSL environment. - -Visit the [Emscripten website][1] for more information on installation. - -### Hello world - -Here's a simple "hello world" application in written in C++. - -``` -#include - -using namespace std; - -int main() { - cout << "Hello world"; - return 0; -} -``` - -Test it as a standard binary for your system first: - -``` -$ g++ hello.cpp -o world -$ ./world -Hello world -``` - -Seeing that it works as expected, use `emcc` to build it as WebAssembly: - -``` -$ emcc hello.cpp -o world.html -``` - -Finally, run it with `emrun`: - -``` -$ emrun ./world.html -``` - -The `emrun` utility is a convenience command for local testing. When you host your application on a server, `emrun` isn't necessary. - -### Learning more about WebAssembly - -Developing for WebAssembly can go in many different directions, depending on what you already know and what you're trying to build. If you know C or C++, then you can write your project using those. If you're learning Rust, then you can use Rust. Even Python code can use the Pyodide module to run as WebAssembly. You have lots of options, and there's no wrong way to start (there's even a COBOL-to-WebAssembly compiler). If you're keen to get started with WebAssembly, [download our complimentary eBook][2]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/2/webassembly-guide - -作者:[Seth Kenlon][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/seth -[b]: https://github.com/lkxed/ -[1]: https://emscripten.org/ -[2]: https://opensource.com/downloads/webassembly-ebook diff --git a/sources/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md b/sources/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md deleted file mode 100644 index a62fa5d750..0000000000 --- a/sources/tech/20230210.4 ⭐️ How to Install DOSBox in Ubuntu to Play Old Games.md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: subject: "How to Install DOSBox in Ubuntu to Play Old Games" -[#]: via: "https://www.debugpoint.com/install-dosbox-ubuntu/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "gpchn" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install DOSBox in Ubuntu to Play Old Games -====== - -**Learn how to install DOSBox in Ubuntu and configure it to play old DOS games.** - -DOSBox is a free and open-source operating system emulator that can run inside modern Linux systems. It has several components which emulate older hardware so that ancient programs and games can run. - -All these make it possible to enjoy the older games and applications in modern Linux distributions. - -In this guide, I will show you how to install DOSBox, configure it and play a sample game. - -### Install DOSBox in Ubuntu - -The main package of DOSBox is available in all the major repo of Linux distributions. - -For Ubuntu, Debian, Linux Mint and related distributions use the following command to install it: - -``` -sudo apt install dosbox -``` - -For Fedora, CentOS, RHEL and related distributions use the following: - -``` -sudo dnf install dosbox -``` - -Arch Linux users, use the following command to install it. - -``` -pacman -S --needed dosbox -``` - -That will conclude the installation. Now it’s time to configure and run. - -### Running DOSBox - -After installation, type the following from the terminal. - -``` -dosbox -``` - -It will show you the following screen showing the DOSBox prompt. This first-time run is essential because it creates the DOSBox configuration file. - -Type `exit` to close DOSBox for now. - -![DOSBox first time run][1] - -The configuration file gives you several options to tweak settings. The file is created at your home directory path `~/.dosbox/dosbox-[version].conf` for Ubuntu. - -For fedora, it loads the staging config file from this path`~/.config/dosbox/dosbox-staging.conf`. - -By default, you can keep the configuration unchanged. However, if you want, you can change it. - -For example, if you want to start DOSBox fullscreen, you can enable and disable the switch. Here’s a sample: - -``` -fullscreen=false -fulldouble=false -fullresolution=original -windowresolution=original -output=surface -autolock=true -sensitivity=100 -waitonerror=true -``` - -You can find all the settings in the official [documentation][2]. - -### Download old games and run - -There are many websites which provide old DOS games. I have used the following website, which provides a fair set of old games which can be played in the modern system. - -So, visit the following page and download any game you want. - -[Download DOS games][3] - -Create a directory in your /home folder and name it dosbox. - -``` -cd ~mkdir dosbox -``` - -Now, extract the game which you downloaded (it should be a .exe file) and create a separate folder inside `~/dosbox`. - -For example, I downloaded the game “Mario & Luigi (1994)”. And I created a folder called “mario” inside the “dosbox” folder. And placed the game file inside it. - -![Keep the game in a separate folder][4] - -Now launch dosbox from the terminal. - -``` -dosbox -``` - -And type the following to mount the game in a virtual C: drive. - -``` -mount c ~/dosbox/mario -``` - -After the above command is complete, change the drive to C:. - -``` -c: -``` - -And now, you can type the game’s file name to run the game. - -``` -mario -``` - -![Running the game][5] - -![Mario running in DOSBox in Ubuntu][6] - -### Keyboard or controller mapping - -By default, DOSBox should detect the keyboard or any controller you may have plugged in. However, if you want to change game keybindings, you can run the below command from the terminal. - -``` -dosbox -startmapper -``` - -It will give you the following screen with the events tagged to each key. You can click on any key and change it according to your taste. - -![DOSBox keyboard and controller mapping][7] - -### Conclusion - -I hope you managed to run your favourite dos game after installing dosbox in Ubuntu and other distros. DOSBox is one of the coolest pieces of software you can use to run any program, such as [Turbo C][8] and others. - -If you have any trouble or questions, let me know in the comment box. - -Enjoy! - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/install-dosbox-ubuntu/ - -作者:[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://www.debugpoint.com/wp-content/uploads/2023/02/DOSBox-first-time-run.jpg -[2]: https://www.dosbox.com/wiki/Dosbox.conf#Sections -[3]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection -[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/Keep-the-game-in-a-separate-folder.jpg -[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-the-game.jpg -[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/Mario-playing-in-DOSBox-in-Ubuntu.jpg -[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBOox-keyboard-and-controller-mapping.jpg -[8]: https://www.debugpoint.com/setting-up-dosbox-in-ubuntu-to-run-turbo-c/ 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 = """ + + +