Merge pull request #3 from LCTT/master

update
This commit is contained in:
aREversez 2022-06-09 23:38:22 +08:00 committed by GitHub
commit ad8af5724a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 3505 additions and 1376 deletions

View File

@ -0,0 +1,183 @@
[#]: subject: "OOP Before OOP with Simula"
[#]: via: "https://twobithistory.org/2019/01/31/simula.html"
[#]: author: "Two-Bit History https://twobithistory.org"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14682-1.html"
Simula 诞生之前的面向对象程序设计
======
想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。
2009 年Clojure 的创始人 <ruby>里奇·希基<rt>Rich Hickey</rt></ruby> 发表了 [一场精彩的演讲][1],探讨了为什么上文那样的哲学窘境会给面向对象程序的编程范式带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:我们想象对象是固定不变的,即使对象的许多或者说全部的属性都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有明确的时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 <ruby>故障<rt>bug</rt></ruby>
希基总结道,这一难题的应对办法就是人们应该将世界建模成作用于不可变数据的 <ruby>进程<rt>process</rt></ruby> 的集合,而不是可变的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。
![][2]
_作者在远足途中思考面向对象程序设计的本体论问题。_
自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。
我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_会更有趣一些这我敢打包票。毕竟我们现在熟知的面向对象程序设计还未完全成型。Simula 有两个主要版本Simula I 和 Simula 67。Simula 67 为世界带来了 <ruby><rt>class</rt></ruby><ruby>类的继承<rt>class hierarchy</rt></ruby> 以及 <ruby>虚拟方法<rt>virtual method</rt></ruby>;但 Simula I 是一个初稿它实验了如何能够将数据和进程捆绑起来的其他设想。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _进程_,而非有着隐藏状态的对象之间的相互作用。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。
### 从 Simula 0 到 Simula 67
Simula 是由两位挪威人 <ruby>克里斯汀·尼加德<rt>Kristen Nygaard</rt></ruby><ruby>奥利-约翰·达尔<rt>Ole-Johan Dahl</rt></ruby> 创建的。
20 世纪 50 年代末,尼加德受雇于 <ruby>挪威防务科学研究中心<rt>Norwegian Defense Research Establishment</rt></ruby>NDRE该研究中心隶属于挪威军方。在那里他负责设计 <ruby>蒙特卡洛模拟方法<rt>Monte Carlo simulations</rt></ruby>,用于核反应堆设计与操作研究。最初,那些模拟实验是由人工完成的;后来,实验在 Ferranti Mercury 电脑 [^1] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。
尼加德设计的这种模拟实验就是人们所知的“<ruby>离散事件模型<rt>discrete event model</rt></ruby>”,这种模拟记录了一系列事件随着时间改变系统状态的进程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等” [^2] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“<ruby>模拟语言<rt>Simulation Language</rt></ruby>”或者“<ruby>蒙特卡洛编译器<rt>Monte Carlo Compiler</rt></ruby>”的项目 [^3]。
达尔当时也受雇于挪威防务科学研究中心专攻语言设计此时也加入了尼加德的项目扮演“沃兹尼亚克”的角色LCTT 译注:指苹果公司联合创始人斯蒂夫·盖瑞·沃兹尼亚克)。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[^4] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。当时的语言要比后来的编程语言抽象得多,其基本语言结构是“<ruby>车站<rt>stations</rt></ruby>”与“<ruby>乘客<rt>customers</rt></ruby>”,这些结构可以用于针对具体某些离散事件网络建立模型。尼加德和达尔给出了一个模拟飞机离港的例子。[^5] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“车站”和“乘客”,也可以为更广泛的模拟建立模型。这是两个主要的概括,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。
Simula I 没有“<ruby>车站<rt>stations</rt></ruby>”和“<ruby>乘客<rt>customers</rt></ruby>”的语言结构,但它可以通过使用“<ruby>进程<rt>process</rt></ruby>”再现这些结构。LCTT 译注:此处使用的“进程”,与当前计算机中用来指代一个已执行程序的实体的概念不同,大致上,你可以将本文中所说的“进程”理解为一种“对象”。)一个进程包含大量数据属性,这些属性与作为进程的 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()` 之类的。不过,这种类比并不全面,因为每个进程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于 <ruby>协程<rt>coroutine</rt></ruby> 的一种。Simula I 程序会将系统建立为一套进程的模型在概念上这些进程并行运行。实际上一个时间点上能称为“当前进程”的只有一个进程。但是一旦某个进程暂停运行那么下一个进程就会自动接替它的位置。随着模拟的运行Simula 会保持一个 “<ruby>事件通知<rt>event notices</rt></ruby>” 的时间线跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程Simula 需要记录多个 <ruby>调用栈<rt>call stacks</rt></ruby> 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 <ruby>调用栈<rt>call stacks</rt></ruby>。于是,尼加德和达尔下定决心,开始编写自己的编译器。
尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[^6] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。有一个订单进程的定义,用来实例化若干种不同的订单实例,不过这些实例并未调用任何方法。该程序的主体仅仅是创建进程,并使其运行。
历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了 <ruby>挪威计算机中心<rt>Norwegian Computer Center</rt></ruby> 工作Simula I 也是在这里日渐流行起来的。当时Simula I 在 UNIVAC 公司的计算机和 Burroughs 公司的 B5500 计算机上均可执行。[^7] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。
<ruby>奥斯陆大学<rt>University of Oslo</rt></ruby>教授 <ruby>斯坦因·克罗达尔<rt>Stein Krogdahl</rt></ruby> 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是 [一篇题为<ruby>《记录处理》<rt>Record Handling</rt></ruby>的论文][10],作者是英国计算机科学家 <ruby>查尔斯·安东尼·理查德·霍尔<rt>C.A.R. Hoare</rt></ruby>。[^8] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,一定会经常提起霍尔的大名。以下内容摘自霍尔的《记录处理》一文:
> 该方案设想,在程序执行期间,计算机内部存在任意数量的记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。
>
> 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。
霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃此时Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[^10] 不过,考虑到 “Simula”这个名字的知名度已经很高了另取名字恐怕会带来不小的麻烦。
1967 年,尼加德和达尔与 <ruby>控制数据公司<rt>Control Data</rt></ruby> 签署协议着手开发Simula 的新版本Simula 67。同年六月份的一场会议中来自控制数据公司、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面意在为这门新语言制定标准与规范。最终会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。
Simula 67 编译器的开发由若干家供应商负责。<ruby>Simula 用户协会<rt>The Association of Simula Users</rt></ruby>ASU也随后成立并于每年举办年会。不久Simula 67 的用户就遍及了 23 个国家。[^11]
### 21 世纪的 Simula 语言
人们至今还记得 Simula是因为后来那些取代它的编程语言都受到了它的巨大影响。到了今天你很难找到还在使用 Simula 写程序的人,但是这并不意味着 Simula 已经从这个世界上消失了。得益于 [GNU cim][16],人们在今天依然能够编写和运行 Simula 程序。
cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simula 67 版本。你可以用它编写类、子类以及虚拟方法,就像是在使用 Simula 67 一样。所以,用 Python 或 Ruby 轻松写出短短几行面向对象的程序,你照样也可以用 cim 写出来:
```
! dogs.sim ;
Begin
Class Dog;
! The cim compiler requires virtual procedures to be fully specified ;
Virtual: Procedure bark Is Procedure bark;;
Begin
Procedure bark;
Begin
OutText("Woof!");
OutImage; ! Outputs a newline ;
End;
End;
Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ;
Begin
Procedure bark;
Begin
OutText("Yap yap yap yap yap yap");
OutImage;
End;
End;
Ref (Dog) d;
d :- new Chihuahua; ! :- is the reference assignment operator ;
d.bark;
End;
```
你可以按照下面代码执行程序的编译与运行:
```
$ cim dogs.sim
Compiling dogs.sim:
gcc -g -O2 -c dogs.c
gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim
$ ./dogs
Yap yap yap yap yap yap
```
你可能会注意到cim 先将 Simula 语言编译为 C 语言,然后传递给 C 语言编译器。)
这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。
不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67 保留了进程模型,不过只有在使用 `Process` 类 和 `Simulation` 块的时候才能调用。
为了表现出进程是如何运行的,我决定模拟下述场景。想象一下,有这么一座住满了村民的村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里的村民却只有一条鱼竿。村民们胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。
这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在有着四个村民的村庄里,一天的模拟时间内会发生什么。
完整程序可以通过此处 [GitHub Gist][17] 的链接获取。
我把输出结果的最后几行放在了下面。我们来看看一天里最后几个小时发生了什么:
```
1299.45: 王五饿了,要了鱼竿。
1299.45: 王五正在钓鱼。
1311.39: 王五钓到了一条鱼。
1328.96: 赵六饿了,要了鱼竿。
1328.96: 赵六正在钓鱼。
1331.25: 李四饿了,要了鱼竿。
1340.44: 赵六钓到了一条鱼。
1340.44: 李四饿着肚子等着鱼竿。
1340.44: 李四在等鱼竿的时候饿死了。
1369.21: 王五饿了,要了鱼竿。
1369.21: 王五正在钓鱼。
1379.33: 王五钓到了一条鱼。
1409.59: 赵六饿了,要了鱼竿。
1409.59: 赵六正在钓鱼。
1419.98: 赵六钓到了一条鱼。
1427.53: 王五饿了,要了鱼竿。
1427.53: 王五正在钓鱼。
1437.52: 王五钓到了一条鱼。
```
可怜的李四最后饿死了,但是他比张三要长寿,因为张三还没到上午 7 点就饿死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。
这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。
在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “<ruby>时间管理器<rt>time manager</rt></ruby>”。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。
这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)我也承认,尽管我们有了“时间管理器”,但这可能并不完全是希基的意思,他说我们在程序中需要一个明确的时间概念。(我认为,希基想要的类似于 [<ruby>阿达·洛芙莱斯<rt>Ada Lovelace</rt></ruby> 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。尽管如此我们可以发现面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致我觉得这一点很有意思。我们可能会理所当然地认为面向对象程序设计的方式千篇一律即程序就是对事件的一长串记录某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。
_如果你喜欢这篇文章欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅获取最新文章每四周更新一篇。_
[^1]: Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, <http://campus.hesge.ch/daehne/2004-2005/langages/simula.htm>. 
[^2]: Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&amp;rep=rep1&amp;type=pdf][24]. 
[^3]: Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, <http://heim.ifi.uio.no/~steinkr/papers/HiNC1-webversion-simula.pdf>. 
[^4]: 出处同上。 
[^5]: Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, <https://hannemyr.com/cache/knojd_acm78.pdf>. 
[^6]: Dahl and Nygaard (1966), 676. 
[^7]: Dahl and Nygaard (1978), 257. 
[^8]: Krogdahl, 3. 
[^9]: Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, <http://www.olejohandahl.info/old/birth-of-oo.pdf>. 
[^10]: Dahl and Nygaard (1978), 265. 
[^11]: Holmevik. 
[^12]: Krogdahl, 4. 
--------------------------------------------------------------------------------
via: https://twobithistory.org/2019/01/31/simula.html
作者:[Two-Bit History][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[校对者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]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey
[2]: https://twobithistory.org/images/river.jpg
[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf
[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf
[16]: https://www.gnu.org/software/cim/
[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96
[19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html
[20]: https://twitter.com/TwoBitHistory
[21]: https://twobithistory.org/feed.xml
[22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw
[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf

View File

@ -0,0 +1,73 @@
[#]: collector: (lujun9972)
[#]: translator: (duoluoxiaosheng)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14686-1.html)
[#]: subject: (How to teach open source beyond business)
[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business)
[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman)
在商业之外,为学生们教授开源知识
======
> Beyond 计划连接起未来科技行业的人才和开源文化。
![](https://img.linux.net.cn/data/attachment/album/202206/08/095200eezhuq7ssd4x4d66.jpg)
那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,不知道如何参加一个开源项目,也不知道这对我未来的职业有什么好处。我的开发经验主要是家庭作业和学位需要的一个大型期末项目。
所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要了解如何加入一个既定的、可能很大并且分散在不同地方的团队,为一个正在进行中的项目工作。我还要学会正确的沟通以保证我付出的努力不白费。
在这方面,我并不特别。我只是众多毕业生中的一员。
### 开源让毕业生的起点更高
作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。
通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。
开源在科技行业的价值是公认的,它塑造了全球软件公司的文化。参与开源项目并采用 [开放组织文化][2] 正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖、才华横溢的员工。因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。
### 商业之上是开源文化
当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时我发现我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] 计划,将科技行业拥抱开源精神的人才与红帽的实践联系起来。
我们在 [Tel Aviv-Yafo 技术学院][6] 开始了 Beyond 计划,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps 入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,相反,我们想让学生接触到行业标准。
我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。
在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础” 中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。
![Beyond teaching online][7]
(Irit Goihman, [CC BY-SA 4.0][8])
### 成果展示
这两个课程取得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程期间的开源贡献而得到了他们第一份技术工作。
其他学术机构对这些课程表达出了极大的兴趣,因此我们将这个项目扩展到了另外一所大学。
很荣幸,在一群优秀工程师的参与下,与 Liora 一起领导这个成功的项目。我们一起助力开源社区的成长。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/open-source-beyond-business
作者:[Irit Goihman][a]
选题:[lujun9972][b]
译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/iritgoihman
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?)
[2]: https://opensource.com/open-organization/resources/open-org-definition
[3]: https://www.linkedin.com/in/lioramilbaum
[4]: https://www.devopsloft.io/
[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/
[6]: https://www.int.mta.ac.il/
[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online)
[8]: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -1,57 +1,52 @@
[#]: collector: (lujun9972)
[#]: translator: (hanszhao80)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-14679-1.html)
[#]: subject: (Manage your budget on Linux with this open source finance tool)
[#]: via: (https://opensource.com/article/21/2/linux-skrooge)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
使用这款 Linux 开源财务工具管理你的预算
使用 Linux 上的开源财务工具 Skrooge 管理你的预算
======
使用开源预算工具 Skrooge 让你的财务管理更加轻松。
![2 cents penny money currency][1]
> 使用开源预算工具 Skrooge 让你的财务管理更加轻松。
![](https://img.linux.net.cn/data/attachment/album/202206/06/115449f0uy9guxxokj0umo.jpg)
2021 年,人们喜欢 Linux 的理由比以往任何时候都多。在本系列中,我将分享使用 Linux 的 21 个不同理由。本篇介绍的是个人财务管理。
个人财务可能很难管理。当你没有足够的钱在没有经济援助的情况下度日时,这可能是令人沮丧甚至不安的,而当你确实有所需的钱却又不清楚每个月的去向时,这可能会令人惊讶地难以接受。更糟糕的是,我们经常被告知要“制定预算”,好像申报你每个月的花销就能在某种程度上证明你需要多少钱。底线是:制定预算是困难的,不满足你的财务目标是令人沮丧的。但这仍然很重要Linux 有几个工具可以帮助使任务变得可管理。
个人财务可能很难管理。当你没有足够的钱在没有经济援助的情况下度日时,这可能是令人沮丧甚至不安的,而当你确实有所需的钱却又不清楚每个月的去向时,这可能会令人惊讶地难以接受。更糟糕的是,我们经常被告知要“制定预算”,好像宣布你每个月的花销就能在某种程度上体现出你需要多少钱。底线是:制定预算是困难的,没有达到你的财务目标是令人沮丧的。但这仍然很重要Linux 有几个工具可以帮助使任务变得可管理。
### 理财
就像生活中的其他事情一样,我们都有自己的方法来跟踪我们的财务。我过去常常采取一种简单而直接的方法:我的薪水支票被存入一个账户,然后我会提取一定比例的现金。一旦我钱包里的钱没了,我就得等到下一个发薪日才能花钱。我只错过了一天的午餐,就明白了我必须认真对待我的目标,并相应地调整了我的消费行为。对于当时我的简单的生活方式来说,这是一种让我对自己的收入保持诚实的有效手段,但它并没有很好地转化为在线商业交易、长期公用事业合同、投资等等。
就像生活中的其他事情一样,我们都有自己的方法来跟踪我们的财务。我过去常常采取一种简单而直接的方法:我的薪水支票被存入一个账户,然后我会提取一定比例的现金。一旦我钱包里的钱没了,我就得等到下一个发薪日才能花钱。我用了一天没有午餐的时间,就明白了我必须认真对待我的目标,并相应地调整了我的消费行为。对于当时我的简单的生活方式来说,这是一种让我对自己的收入保持诚实的有效手段,但它并不能很好地转化为在线商业交易、长期公用事业合同、投资等等。
随着我不断完善我的财务跟踪方式,我了解到个人会计始终是一个不断发展的过程。我们每个人都有独特的财务状况,这告诉我们可以或应该使用什么样的解决方案来跟踪我们的收入和债务。如果你失业了,那么你的预算目标可能是尽可能少花钱。如果你在工作,但在还学生贷款,那么你的目标可能是向银行汇款。如果你在工作,但计划退休,那么你可能会尽可能多地存钱。
关于预算,要记住的一点是,它意味着将你的财务现实与你的财务 _目标_ 进行比较。你无法避免一些费用,但在这些之后,你可以设定自己的优先事项。如果你没有达到你的目标,你可以调整自己的行为或改写你的目标,使其更好地反映现实。调整你的财务计划并不意味着你失败了这只是意味着你最初的预测并不准确。在困难时期,你可能无法达到任何预算目标,但如果你坚持你的预算,你会学到很多关于维持你目前的生活方式(无论它可能是什么)所需要的财务手段。随着时间的推移,你可以学习调整你可能从未意识到的设置。例如,由于远程工作已成为一种被广泛接受的选择,人们正在搬到农村城镇以降低生活成本。看到这种生活方式的转变如何改变你的预算报告,真是令人震惊。
关于预算,要记住的一点是,它是为了将你的财务现实与你的财务 _目标_ 进行比较。你无法避免一些开支,但在这些之后,你可以设定自己的优先事项。如果你没有达到你的目标,你可以调整自己的行为或改写你的目标,使其更好地反映现实。调整你的财务计划并不意味着你失败了这只是意味着你最初的预测并不准确。在困难时期,你可能无法达到任何预算目标,但如果你坚持你的预算,你会学到很多关于维持你目前的生活方式(无论它是什么)所需要的财务手段。随着时间的推移,你可以学习调整你可能从未意识到的变化。例如,由于远程工作已成为一种被广泛接受的选择,人们正在搬到农村城镇以降低生活成本。看到这样一种生活方式的转变可以改变你的预算报告,真是令人震惊。
重点是,预算是一项经常被低估的活动,这在很大程度上是因为它令人生畏。重要的是要认识到,无论你的专业水平或对财务的兴趣如何,你都可以进行预算。无论你 [只使用 LibreOffice 电子表格][2],还是尝试专用的财务应用程序,你都可以设定目标,跟踪自己的行为,并学到许多宝贵的经验教训,这些经验教训最终可能会带来回报。
重点是,预算编制是一项经常被低估的活动,这在很大程度上是因为它令人生畏。重要的是要认识到,无论你的专业水平或对财务的兴趣如何,你都可以进行预算。无论你 [只使用 LibreOffice 电子表格][2],还是尝试专用的财务应用程序,你都可以设定目标,跟踪自己的行为,并学到许多宝贵的经验教训,这些经验教训最终可能会带来回报。
### 开源会计
有几个专用于 [Linux 的个人理财应用程序][3],包括 [HomeBank][4], [Money Manager EX][5], [GNUCash][6], [KMyMoney][7], 和 [Skrooge][8]。所有这些应用程序本质上都是分类帐,你可以在每个月底(或每当你查看帐户时)退回到一个地方,从你的银行导入数据,并审查你的支出如何与你为自己设定的预算保持一致。
有几个专用于 [Linux 的个人理财应用程序][3],包括 [HomeBank][4]、[Money Manager EX][5]、[GNUCash][6]、[KMyMoney][7] 和 [Skrooge][8]。所有这些应用程序本质上都是账本,你可以在每个月底(或每当你查看帐户时)退回到一个地方,从你的银行导入数据,并审查你的支出如何与你为自己设定的预算保持一致。
![显示财务数据的 Skrooge 界面][9]
Skrooge
我使用 Skrooge 作为我的个人预算跟踪器。即便面对多个银行账户它也能轻松自如的设置。与大多数开源金融应用程序一样Skrooge 可以导入多种文件格式,因此我的工作流程大致如下:
1. 登录我的银行。
2. 将当月的银行对账单导出为 QIF 文件。
3. 打开 Skrooge。
4. 导入 QIF 文件。每个文件都会自动分配到相应的帐户。
5. 对照我为自己设定的预算目标检查我的支出。如果我已经超过了,那么我会停靠在下个月的目标(这样我就会理性地少花钱来弥补差额)。如果我尚未超出我的目标预算,那么我会把多余的部分移到 12 月的预算中(这样我在年底就会有更多的支出份额)。
5. 对照我为自己设定的预算目标审查我的支出。如果我超支了,那么我就会扣减下个月的目标(这样我就会理性地少花钱来弥补差额)。如果我尚未超出我的目标预算,那么我会把多余的部分移到 12 月的预算中(这样我在年底就会有更多的支出份额)。
在 Skrooge 里我只跟踪了家庭预算的一部分。Skrooge 通过一个动态数据库简化了这一过程,该数据库允许我使用自定义标签一次对多个事务进行分类。这使我可以轻松地从一般家庭和公用事业支出中提取我的个人支出,并且我可以在查看 Skrooge 提供的自动生成的报告时利用这些类别。
我只跟踪了 Skrooge 中的家庭预算的一部分。Skrooge 通过一个动态数据库简化了这一过程,该数据库允许我使用自定义标签一次对多个交易进行分类。这使我可以轻松地从一般家庭和公用事业支出中提取我的个人支出,并且我可以在查看 Skrooge 提供的自动生成的报告时利用这些类别。
![Skrooge 预算饼图][10]
Skrooge 预算饼图
最重要的是,流行的 Linux 财务应用程序使我能够以最适合我的方式管理我的预算。例如,我的合作伙伴更喜欢使用 LibreOffice 电子表格,但我毫不费力地从家庭预算中提取 CSV 文件,将其导入到 Skrooge并使用一组更新的数据集。不存在锁定和不兼容。该系统灵活敏捷使我们能够在更多地了解有效预算和生活中的情况时调整我们的预算和跟踪支出的方法。
最重要的是,流行的 Linux 财务应用程序使我能够以最适合我的方式管理我的预算。例如,我的合作伙伴更喜欢使用 LibreOffice 电子表格,但我只需要付出很少的努力就可以从家庭预算中提取 CSV 文件,将其导入到 Skrooge并使用一组更新的数据集。不存在供应商锁定和不兼容。该系统灵活敏捷使我们能够在更多地了解有效预算和生活中的情况时调整我们的预算和跟踪支出的方法。
### 开放选择
@ -59,7 +54,7 @@ Skrooge 预算饼图
在设定自己的财务目标时我很欣赏我可以使用最适合我个人计算风格的任何应用程序。我可以控制我在生活中如何处理数据即使是我不一定喜欢处理的数据。Linux 及其令人惊叹的应用程序集使它不再是一件苦差事。
在 Linux 上尝试一些财务应用程序,看看你是否可以激励自己设定一些目标并省钱吧!
在 Linux 上尝试一些财务应用程序,看看你是否可以激励自己设定一些目标并节省开支吧!
--------------------------------------------------------------------------------
@ -68,7 +63,7 @@ via: https://opensource.com/article/21/2/linux-skrooge
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -3,37 +3,39 @@
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lujun9972"
[#]: translator: "VeryZZJ"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14687-1.html"
不同编程语言是如何完成同一件事
======
通过一个简单的小游戏比较13种编程语言
![Developing code.][1]
> 通过一个简单的小游戏比较 13 种编程语言。
![](https://img.linux.net.cn/data/attachment/album/202206/08/113845fs81srd5s8rjryt5.jpg)
当我开始学习一种新的编程语言时,会把重点放在定义变量、书写声明以及计算表达式,一旦对这些概念有一个大致的了解,通常就能够自己弄清剩下的部分。大多数编程语言都具有相似性,所以如果你掌握了一种编程语言,学习下一种语言的重点就是弄清楚独有的概念以及区分不同。
我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏计算机选出1到100里的任一数字然后我来猜。程序循环进行直到猜出正确数字。通过伪代码可以看出这是个非常简单的程序
我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出 1 100 里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序:
* 计算机在1到100之间选出一个随机数字
* 计算机在 1 100 之间选出一个随机数字
* 循环进行直到猜出该随机数字
+ 计算机读取我的猜测
+ 告诉我我的猜测过高还是过低
Opensource.com 最近发表了一篇文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。
我们发表了一些文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。
C 语言由 Dennis Ritchie 于1972年在贝尔实验室创建是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。
C 语言由 Dennis Ritchie 于 1972 年在贝尔实验室创建是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。
接下来我们看看这些不同的编程语言是如何实现 "猜数字 "游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。
接下来我们看看这些不同的编程语言是如何实现 “猜数字” 游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。
### 计算机在1到100之间选出一个随机数字
### 计算机在 1 100 之间选出一个随机数字
你可以看到这里有许多相似之处。大多数编程语言使用类似`rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。
你可以看到这里有许多相似之处。大多数编程语言使用类似 `rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。
C
C
```c
```
// Using the Linux `getrandom` system call
getrandom(&randval, sizeof(int), GRND_NONBLOCK);
number = randval % maxval + 1;
@ -42,97 +44,97 @@ number = randval % maxval + 1;
number = rand() % 100 + 1;
```
C++
C++
```cpp
```
int number = rand() % 100+1;
```
Rust
Rust
```rust
```
let random = rng.gen_range(1..101);
```
Java
Java
```java
```
private static final int NUMBER = r.nextInt(100) + 1;
```
Groovy
Groovy
```groovy
```
int randomNumber = (new Random()).nextInt(100) + 1
```
JavaScript
JavaScript
```javascript
```
const randomNumber = Math.floor(Math.random() * 100) + 1
```
awk
awk
```awk
```
randomNumber = int(rand() * 100) + 1
```
Lua
Lua
```lua
```
number = math.random(1,100)
```
### 循环进行直到我猜出该随机数字
循环通常是用控制流程来实现的,如`while` 或`do-while`。JavaScript 中的实现没有使用循环,而是 "实时 "更新 HTML 页面直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。
循环通常是用控制流程来实现的,如 `while` `do-while`。JavaScript 中的实现没有使用循环,而是 “实时 ”更新 HTML 页面直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 Awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。
C
C
```c
```
do {
} while (guess != number);
```
C++
C++
```cpp
```
do {
} while ( number != guess );
```
Rust
Rust
```rust
```
for line in std::io::stdin().lock().lines() {
break;
}
```
Java
Java
```java
```
while ( guess != NUMBER ) {
}
```
Groovy
Groovy
```groovy
```
while ( … ) {
break;
}
```
Lua
Lua
```lua
```
while ( player.guess ~= number ) do
end
@ -140,66 +142,68 @@ end
### 计算机读取我的猜测
不同编程语言对输入的处理方式不同。例如JavaScript 直接从 HTML 表单中读取数值,而 awk 则从数据管道中读取数据。
不同编程语言对输入的处理方式不同。例如JavaScript 直接从 HTML 表单中读取数值,而 Awk 则从数据管道中读取数据。
```c
C
```
scanf("%d", &guess);
```
C++
C++
```cpp
```
cin >> guess;
```
Rust
Rust
```rust
```
let parsed = line.ok().as_deref().map(str::parse::<i64>);
if let Some(Ok(guess)) = parsed {
}
```
Java
Java
```java
```
guess = player.nextInt();
```
Groovy
Groovy
```groovy
```
response = reader.readLine()
int guess = response as Integer
```
JavaScript
JavaScript
```javascript
```
let myGuess = guess.value
```
awk
Awk
```awk
```
guess = int($0)
```
Lua
Lua
```lua
```
player.answer = io.read()
player.guess = tonumber(player.answer)
```
### 告诉我我的猜测过高还是过低
### 告诉我猜测过高还是过低
在这些类 C 语言中,通常是通过`if`语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。
在这些类 C 语言中,通常是通过 `if` 语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。
C
C
```c
```
if (guess < number) {
puts("Too low");
}
@ -210,9 +214,9 @@ else if (guess > number) {
puts("That's right!");
```
C++
C++
```cpp
```
if ( guess > number) { cout << "Too high.\n" << endl; }
else if ( guess < number ) { cout << "Too low.\n" << endl; }
else {
@ -221,9 +225,9 @@ else {
}
```
Rust
Rust
```rust
```
_ if guess < random => println!("Too low"),
_ if guess > random => println!("Too high"),
_ => {
@ -232,9 +236,9 @@ _ => {
}
```
Java
Java
```java
```
if ( guess > NUMBER ) {
System.out.println("Too high");
} else if ( guess < NUMBER ) {
@ -245,9 +249,9 @@ if ( guess > NUMBER ) {
}
```
Groovy
Groovy
```groovy
```
if (guess < randomNumber)
print 'too low, try again: '
else if (guess > randomNumber)
@ -258,9 +262,9 @@ else {
}
```
JavaScript
JavaScript
```javascript
```
if (myGuess === randomNumber) {
feedback.textContent = "You got it right!"
} else if (myGuess > randomNumber) {
@ -270,9 +274,9 @@ if (myGuess === randomNumber) {
}
```
awk
Awk
```awk
```
if (guess < randomNumber) {
printf "too low, try again:"
} else if (guess > randomNumber) {
@ -283,9 +287,9 @@ if (guess < randomNumber) {
}
```
Lua
Lua
```lua
```
if ( player.guess > number ) then
print("Too high")
elseif ( player.guess < number) then
@ -298,21 +302,21 @@ end
### 非类 C 编程语言会怎么样呢?
非类 C 编程语言会有很大的不同需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell它本身借鉴了 Algol68并支持额外的速记符`&&`作为 "and " 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的80-列布局。
非类 C 编程语言会有很大的不同需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell它本身借鉴了 Algol68并支持额外的速记符 `&&` 作为 `and` 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的 80 列布局。
我将通过比较 "if "语句举例表现这些编程语言的不同。if 判断一个值是否小于或大于另一个值,并向用户打印适当信息。
我将通过比较 `if` 语句,举例表现这些编程语言的不同。`if` 判断一个值是否小于或大于另一个值,并向用户打印适当信息。
Racket
Racket
```racket
```
(cond [(> number guess) (displayln "Too low") (inquire-user number)]
[(< number guess) (displayln "Too high") (inquire-user number)]
[else (displayln "Correct!")]))
```
Python
Python
```python
```
if guess < random:
print("Too low")
elif guess > random:
@ -321,9 +325,9 @@ else:
print("That's right!")
```
Elixir
Elixir
```elixir
```
cond do
guess < num ->
IO.puts "Too low!"
@ -336,16 +340,16 @@ cond do
end
```
Bash
Bash
```bash
```
[ "0$guess" -lt $number ] && echo "Too low"
[ "0$guess" -gt $number ] && echo "Too high"
```
Fortran
Fortran
```fortran
```
IF (GUESS.LT.NUMBER) THEN
PRINT *, 'TOO LOW'
ELSE IF (GUESS.GT.NUMBER) THEN
@ -353,28 +357,28 @@ ELSE IF (GUESS.GT.NUMBER) THEN
ENDIF
```
### Read more 更多
### 更多
当你在学习一种新的编程语言时"猜数字 "游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。
当你在学习一种新的编程语言时 “猜数字” 游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。
学习如何用 C 和类 C 语言编写 "猜数字 "游戏:
学习如何用 C 和类 C 语言编写 “猜数字” 游戏:
* [C][2], by Jim Hall
* [C++][3], by Seth Kenlon
* [Rust][4], by Moshe Zadka
* [Java][5], by Seth Kenlon
* [Groovy][6], by Chris Hermansen
* [JavaScript][7], by Mandy Kendall
* [awk][8], by Chris Hermansen
* [Lua][9], by Seth Kenlon
* [C][2] Jim Hall
* [C++][3] Seth Kenlon
* [Rust][4] Moshe Zadka
* [Java][5] Seth Kenlon
* [Groovy][6] Chris Hermansen
* [JavaScript][7] Mandy Kendall
* [awk][8] Chris Hermansen
* [Lua][9] Seth Kenlon
其他语言:
* [Racket][10], by Cristiano L. Fontana
* [Python][11], by Moshe Zadka
* [Elixir][12], by Moshe Zadka
* [Bash][13], by Jim Hall
* [Fortran][14], by Jim Hall
* [Racket][10] Cristiano L. Fontana
* [Python][11] Moshe Zadka
* [Elixir][12] Moshe Zadka
* [Bash][13] Jim Hall
* [Fortran][14] Jim Hall
--------------------------------------------------------------------------------
@ -383,7 +387,7 @@ via: https://opensource.com/article/21/4/compare-programming-languages
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[VeryZZJ](https://github.com/VeryZZJ)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,68 @@
[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12"
[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14683-1.html"
如何修复 “yay: error while loading shared libraries: libalpm.so.12”
======
![](https://img.linux.net.cn/data/attachment/album/202206/07/144052x9tpvo93zhthdh6x.jpg)
> 这篇快速指南是为了帮助你修复 “yay error: while loading shared libraries: libalpm.so.12” 错误。
如果你在系统中运行 [Arch Linux][1] 的时间比较长,那么由于其滚动发布性质以及你的硬件支持,程序可能会损坏。 如果你使用 AUR 助手 Yay那么有时由于其他软件包的多次安装升级Yay 可能会损坏。
Yay 助手一般是非常稳定的,但有时它会被搞乱,在修复好之前,你不能使用它安装任何程序。而其中一个令人头疼的错误是这样的:
```
yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory
```
这个错误特别是在升级到 pacman 6.0 后出现的,因为共享库不兼容。
![error while loading shared libraries - yay][2]
### 如何解决 “yay: error while loading shared libraries: libalpm.so.12”
这个错误只能通过完全卸载 `yay` 来解决,包括它的依赖。然后重新安装 `yay`
没有其他方法来解决这个错误。
我们已经有一个 [如何安装 Yay][3] 的指南,然而,以下是修复的步骤。
从 AUR 克隆 yay 仓库并构建。在终端窗口中依次运行以下命令。
```
cd /tmp
git clone 'https://aur.archlinux.org/yay.git'
cd /tmp/yay
makepkg -si
cd ~
rm -rf /tmp/yay/
```
安装完成后,你可以尝试运行给你带来这个错误的命令。然后就好了。如果你仍然有这个错误,请在下面的评论区告诉我。
很多人都遇到了这个问题,网络上有 [几个讨论][4]。以上是解决这个错误的唯一办法。而且我在任何地方都找不到这个问题的确切根源,除了它是在 pacman 6.0 更新后开始的。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/
作者:[Arindam][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://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://archlinux.org/
[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg
[3]: https://www.debugpoint.com/2021/01/install-yay-arch/
[4]: https://github.com/Jguer/yay/issues/1519

View File

@ -0,0 +1,136 @@
[#]: subject: "Dynamically linking libraries while compiling code"
[#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14690-1.html"
编译代码时动态地链接库
======
![](https://linux.cn/article-14690-1.html)
> 编译软件在你如何运行你的系统方面给你很大的灵活性。`LD_LIBRARY_PATH` 变量,以及 GCC 的 `-L``-l` 选项,是这种灵活性的组成部分。
编译软件是开发者经常做的事情在开源世界中一些用户甚至选择自己动手。Linux 播客 Dann Washko 称源码为“通用包格式”,因为它包含了使一个应用在任何平台上运行所需的所有组件。当然,并不是所有的源码都是为所有的系统编写的,所以它只是在目标系统的子集内是“通用”的,但问题是,源码是非常灵活的。有了开源,你可以决定代码的编译和运行方式。
当你在编译代码时,你通常要处理多个源文件。开发人员倾向于将不同的类或模块放在不同的文件中,这样它们可以被单独维护,甚至可能被不同的项目使用。但当你编译这些文件时,许多文件会被编译成一个可执行文件。
这通常是通过创建共享库来完成的,然后从可执行文件中动态链接回它们。这样可以通过保持模块化功能的外部性来保持可执行文件的小型化,并确保库可以独立于使用它们的应用而被更新。
### 在编译过程中定位一个共享对象
当你 [用 GCC 编译][2] 时,你通常需要在你的工作站上安装一个库,以便 GCC 能够定位到它。默认情况下GCC 假定库在系统库路径中,例如 `/lib64``/usr/lib64`。然而,如果你要链接到一个你自己的尚未安装的库,或者你需要链接到一个没有安装在标准位置的库,那么你必须帮助 GCC 找到这些文件。
有两个选项对于在 GCC 中寻找库很重要:
* `-L`(大写字母 L在 GCC 的搜索位置上增加一个额外的库路径。
* `-l`(小写字母 L设置你要链接的库的名字。
例如,假设你写了一个叫做 `libexample.so` 的库,并且你想在编译你的应用 `demo.c` 时使用它。首先,从 `demo.c` 创建一个对象文件:
```
$ gcc -I ./include -c src/demo.c
```
`-I` 选项在 GCC 搜索头文件的路径中增加了一个目录。在这个例子中,我假设自定义头文件在一个名为 `include` 的本地目录中。`-c` 选项防止 GCC 运行链接器,因为这个任务只是为了创建一个对象文件。结果如下:
```
$ ls
demo.o include/ lib/ src/
```
现在你可以使用 `-L` 选项为你的库设置一个路径,然后进行编译:
```
$ gcc -L`pwd`/lib -o myDemo demo.o -lexample
```
注意,`-L` 选项在 `-l` 选项*之前*。这很重要,因为如果在你告诉 GCC 查找非默认库之前没有将 `-L` 添加到 GCC 的搜索路径中GCC 就不知道要在你的自定义位置上搜索。编译成功了,但当你试图运行它时,却出现了问题:
```
$ ./myDemo
./myDemo: error while loading shared libraries:
libexample.so: cannot open shared object file:
No such file or directory
```
### 用 ldd 排除故障
`ldd` 工具可以打印出共享对象的依赖关系,它在排除类似问题时很有用:
```
$ ldd ./myDemo
linux-vdso.so.1 (0x00007ffe151df000)
libexample.so => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f514b60a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f514b839000)
```
你已经知道定位不到 `libexample`,但 `ldd` 输出至少确认了它对*工作*库的期望位置。例如,`libc.so.6 `已经被定位,`ldd` 显示其完整路径。
### LD_LIBRARY_PATH
`LD_LIBRARY_PATH` [环境变量][3] 定义了库的路径。如果你正在运行一个依赖于没有安装到标准目录的库的应用程,你可以使用 `LD_LIBRARY_PATH` 添加到系统的库搜索路径。
有几种设置环境变量的方法,但最灵活的是在运行命令前放置环境变量。看看设置 `LD_LIBRARY_PATH``ldd` 命令在分析一个“损坏”的可执行文件时的作用:
```
$ LD_LIBRARY_PATH=`pwd`/lib ldd ./
linux-vdso.so.1 (0x00007ffe515bb000)
libexample.so => /tmp/Demo/lib/libexample.so (0x0000...
libc.so.6 => /lib64/libc.so.6 (0x00007eff037ee000)
/lib64/ld-linux-x86-64.so.2 (0x00007eff03a22000)
```
这也同样适用于你的自定义命令:
```
$ LD_LIBRARY_PATH=`pwd`/lib myDemo
hello world!
```
然而,如果你移动库文件或可执行文件,它又会失效:
```
$ mv lib/libexample.so ~/.local/lib64
$ LD_LIBRARY_PATH=`pwd`/lib myDemo
./myDemo: error while loading shared libraries...
```
要修复它,你必须调整 `LD_LIBRARY_PATH` 以匹配库的新位置:
```
$ LD_LIBRARY_PATH=~/.local/lib64 myDemo
hello world!
```
### 何时使用 LD_LIBRARY_PATH
在大多数情况下,`LD_LIBRARY_PATH` 不是你需要设置的变量。按照设计,库安装到 `/usr/lib64` 中,因此应用自然会在其中搜索所需的库。在两种情况下,你可能需要使用 `LD_LIBRARY_PATH`
* 你正在编译的软件需要链接到本身刚刚编译但尚未安装的库。良好设计的构建系统,例如 [Autotools][4] 和 [CMake][5],可以帮助处理这个问题。
* 你正在使用设计为在单个目录之外运行的软件,它没有安装脚本,或安装脚本将库放置在非标准目录中。一些应用具有 Linux 用户可以下载、复制到 `/opt` 并在“不安装”的情况下运行的版本。`LD_PATH_LIBRARY` 变量是通过封装脚本设置的,因此用户通常甚至不知道它已被设置。
编译软件为你在运行系统方面提供了很大的灵活性。`LD_LIBRARY_PATH` 变量以及 `-L``-l` GCC 选项是这种灵活性的组成部分。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/compile-code-ldlibrarypath
作者:[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/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png
[2]: https://opensource.com/article/22/5/what-happens-behind-scenes-during-gcc-compilation-c-programs
[3]: https://opensource.com/article/19/8/what-are-environment-variables
[4]: https://opensource.com/article/19/7/introduction-gnu-autotools
[5]: https://opensource.com/article/21/5/cmake

View File

@ -3,13 +3,16 @@
[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14689-1.html"
使用机器学习模型进行预测
机器学习:使用 Python 进行预测
======
机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。
> 机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。
当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。
![Machine-learning][1]
@ -28,14 +31,15 @@ import matplotlib.pyplot as plt
```
from google.colab import files
uploaded = files.upload()
for fn in uploaded.keys(): print(User uploaded file “{name}” with length {length} bytes.format(
name=fn, length=len(uploaded[fn])))
Choose files No file chosen
for fn in uploaded.keys():
print('User uploaded file "{name}" with length {length} bytes'.format(name=fn, length=len(uploaded[fn])))
```
只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 *“Hoppers Crossing-Hourly-River-Level.csv”*,大小 2207036 字节
如果没有选择文件的话,选择上传的文件
完成后,我们就可以使用 *sklearn 库*来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。
只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 `Hoppers Crossing-Hourly-River-Level.csv`,大小 2207036 字节。
完成后,我们就可以使用 `sklearn` 库来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。
![Figure 1: Training the model][2]
@ -51,7 +55,7 @@ regressor.fit(X_train, y_train)
### 在 Java 中使用 ML 模型
我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 sklearn2pmml 的库可以帮助我们做到这一点:
我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 `sklearn2pmml` 的库可以帮助我们做到这一点:
```
# Install the library
@ -75,7 +79,7 @@ via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-ma
作者:[Jishnu Saurav Mittapalli][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/) 荣誉推出

View File

@ -0,0 +1,73 @@
[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp"
[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "hadisi1993"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14681-1.html"
Linux Mint 接管 Timeshift 备份工具的开发,并作为一款 XApp 来维护
======
> Linux Mint 接管了 Timeshift 备份/恢复工具的开发。你可以在它新的 GitHub 仓库中找到它。
![linux mint][1]
Timeshift 可以说是 [备份和恢复 Linux 系统的最佳工具][2]。
Linux Mint 也利用它帮助用户在系统更新时更方便地创建快照,确保快捷无碍的操作。
当然,这不是 [Linux Mint 可能比 Ubuntu 更好的唯一原因][3]。
不幸的是Timeshift 背后的开发者([Tony George][4])计划把注意力集中在其他项目上,将不再继续维护这个项目。
Linux Mint 团队联系了这位开发者,并愿意为这个项目提供任何可能的帮助。最终,它们接管了 Timeshift 的开发。
所以,现在 Linux Mint 团队会对 Timeshift 的发布和修复,以及任何与之相关的开发工作负责。
### 将 Timeshift 调整成 XApp
![][5]
Linux Mint 倾向于将某些应用作为“XApp”来维护以确保它们能在各种不同的桌面环境下工作不会依赖于某个特殊的桌面。
考虑到他们计划将 Timeshift 调整成一个XApp你可以期待该工具在很长一段时间内维持当前的外观和功能而不用顾虑你的桌面环境是什么。
不像一些 GNOME 应用程序,为了获得最好的体验,它们通常会变成 GNOME 专用的应用程序。
Timeshift 是一个必不可少的备份/恢复工具。所以Linux Mint 接管 Timeshift 的开发并作为一个 XApp 来维护的计划听上去相当完美!
如果你想知道的话那不妨告诉你Timeshift 的迁移已经在 [Launchpad][6] 上完成了。
新的 [GitHub仓库][7](由 Linux Mint 复刻的)可以给你提供这个应用的更多细节以及它最近的开发活动。
你也可以在 [最近每月发布的博文][8] 中查阅官方对此的声明。
### 结语
作为 Timeshift 的维护者Linux Mint 希望在不久的将来带来更多的新特性和改进。
你如何看待 Linux Mint 将 Timeshift 接管为一款 XApp欢迎在下方的评论区内分享你的想法。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/linux-mint-timeshift/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[hadisi1993](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-mint-time-shift.jpg
[2]: https://itsfoss.com/backup-restore-linux-timeshift/
[3]: https://itsfoss.com/linux-mint-vs-ubuntu/
[4]: https://teejeetech.com/
[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png
[6]: https://github.com/linuxmint/timeshift
[7]: https://github.com/linuxmint/timeshift
[8]: https://blog.linuxmint.com/?p=4323

View File

@ -0,0 +1,45 @@
[#]: subject: "Contribute at the Fedora Linux 37 Test Week for Kernel 5.18"
[#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/"
[#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14685-1.html"
Fedora Linux 37 的内核 5.18 测试周到了,一起来做贡献吧!
======
![][1]
Fedora 内核团队正在为 Linux 内核 5.18 进行最终集成。这个版本刚刚发布,很快就会出现在 Fedora 中。因此Fedora 内核和 QA 团队组织了一个测试周,截止日期为 **2022 年 6 月 12 日,星期日。** 请参阅 [维基页面][2] 来获取你将要参与的测试镜像链接。继续阅读下文,可了解更多细节~
### 测试周是如何运作的?
测试周是一个人人都可以参与的活动。在测试周,任何人都可以为 Fedora 即将发布的版本查漏补缺确保它最终能够运行良好。Fedora 社区成员会经常参与这个活动,我们同时也欢迎公众参加这些活动。如果你以前从未做过贡献,那么这是一个绝佳的上手机会。
要想做出贡献,你只需要能够执行以下操作即可:
* 下载测试资料,包括一些大文件
* 阅读并按照说明一步一步地进行操作
内核测试日的 [维基页面][2] 提供了很多关于测试内容和测试方法的有用信息。完成一些测试后,你可以在测试日的 [Web 应用][3] 上记录下你的测试结果。如果你在活动的当天或前后有空,请进行一些测试并报告你的结果。不知道该怎么做?没关系,我们有一份文件,其中提供了 [所有步骤][4]。
希望能在测试日见到你,预祝测试愉快~
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/
作者:[Sumantro Mukherjee][a]
选题:[lkxed][b]
译者:[lkxed](https://github.com/lkxed)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/sumantrom/
[b]: https://github.com/lkxed
[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/test-days-816x345.jpg
[2]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week
[3]: https://testdays.fedoraproject.org/events/136
[4]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/

View File

@ -1,81 +0,0 @@
[#]: subject: "Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging"
[#]: via: "https://news.itsfoss.com/rocket-chat-matrix/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging
======
Rocket.Chat is embracing the Matrix protocol to enable decentralized communication for the platform. Thats a huge change, isnt it?
![rocket chat matrix][1]
Rocket.Chat is an excellent open-source messaging (collaboration) platform.
In fact, it is one of the [best open-source Slack alternatives][2] available. We use it as well for internal communication.
Rocket.Chat is also making good progress compared to some of its open-source competitors. For instance, they [teamed up with Nextcloud to provide an alternative to Office 365][3].
And recently announced a switch to Matrix protocol to introduce federation capabilities that allow its users to communicate with users on other platforms. In other words, [Rocket.Chat][4] will be utilizing a decentralized network for communication with the Matrix integration.
As a Rocket.Chat user; you can talk to users on any other app using the Matrix protocol.
### Rocket.Chat is Switching to a Decentralized Protocol to Enhance Collaboration
![][5]
Matrix protocol is a fantastic choice to enable an interoperable federation. Now, with Rocket.Chat onboard; the decentralized network should be stronger than ever.
Not to forget, we already have [Element][6], and [Gitter][7], as some of the platforms that already utilize Matrix. So, Rocket.Chat joining the network sounds exciting!
The [official announcement][8] further explains the collaboration:
> The Rocket.Chat adoption of Matrix makes it simple for organizations to easily connect with external parties, whether theyre using Rocket.Chat or any other Matrix compatible platform. This initiative is another step forward on Rocket.Chats journey to let every conversation flow without compromise and enable full interoperability with its ecosystem.
The new change with the Matrix network is already available in the latest [alpha release for Rocket.Chat 4.7.0][9]. Unless you want to experiment with it, you should wait for the stable release to introduce the Matrix network support.
**Aron Ogle** (*Core Developer at Rocket.Chat*) has put together a [guide][10] and a video to help you out if you want to explore the technical details of Rocket.Chat integration with the Matrix. Heres the video for it:
![Setting up Rocket Chat to talk with Matrix][11]
### Is This a Good Move?
While decentralized tech hasnt taken the internet by storm, it is promising and makes more sense with its reliability and decentralized capabilities. Matrix protocol has been getting all the praise for a couple of years now, and it seems to be heading in the right direction.
As of now, most of the big platforms rely on centralized infrastructure to make things work.
And, with the current implementations, cross-communication is not possible with most of the chat applications.
So, Rocket.Chat will be making a difference by offering cross-app interactions, like the ability to chat with an Element user on **matrix.org,** as shown in the image above.
Rocket.Chat entering the scene with Matrix protocol could open up the potential for its competitors or other services to give a second thought to solutions like Matrix protocol.
*What do you think about Rocket.Chat adopting the Matrix protocol? Share your thoughts in the comments section below.*
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/rocket-chat-matrix/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocketchat-matrix-protocol.jpg
[2]: https://itsfoss.com/open-source-slack-alternative/
[3]: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/
[4]: https://itsfoss.com/rocket-chat/
[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocket-chat-matrix.jpg
[6]: https://itsfoss.com/element/
[7]: https://itsfoss.com/gitter/
[8]: https://rocket.chat/press-releases/rocket-chat-leverages-matrix-protocol-for-decentralized-and-interoperable-communications
[9]: https://github.com/RocketChat/Rocket.Chat/releases/tag/4.7.0
[10]: https://geekgonecrazy.com/2022/05/30/rocketchat-and-the-matrix-protocol/
[11]: https://youtu.be/oQhIH8kql9I

View File

@ -1,37 +0,0 @@
[#]: subject: "Google Makes Data Centre Scale Encryption Open Source"
[#]: via: "https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Google Makes Data Centre Scale Encryption Open Source
======
![google-ranking-factors][1]
Google has made open source an encryption scheme it developed to protect traffic between its data centres. PSP, which stands for PSP Security Protocol, was created to relieve Googles processors of the growing burden of software-based encryption, according to the company. PSP has been hailed as a success in the companys own environment, and the company has stated that it is “making PSP open source to encourage broader adoption by the community and hardware implementation by additional NIC [network interface card] vendors.”  PSP offloads encryption to NICs, which was previously possible with existing encryption schemes, but not at the scale or with the traffic coverage required by Google.
“At Googles scale,” the company wrote when announcing its decision, “the cryptographic offload must support millions of live transmission control protocol (TCP) connections and sustain 100,000 new connections per second at peak.”
Existing security protocols, according to Google Clouds Amin Vahdat and Soheil Hassas Yeganeh, had flaws. “While TLS meets our security requirements, it is not an offload-friendly solution because of the tight coupling between the connection state in the kernel and the offload state in hardware. TLS also does not support non-TCP transport protocols, such as UDP”, they stated.
However, the IPSec protocol cannot be offloaded to hardware at the required scale. “IPSec … cannot economically support our scale partly because they store the full encryption state in an associative hardware table with modest update rates,” the post explains.
Google added a custom header and trailer to standard User Datagram Protocol (UDP) encapsulation to create PSP. PSP is currently implemented in three ways: one for Googles Andromeda Linux virtualisation kernel, one for its Snap networking system, and an application-layer version, SoftPSP, created so Google Cloud customers could use PSP on computers with traditional NICs.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/
作者:[Laveesh Kocher][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/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/google-ranking-factors-e1654074528236.jpg

View File

@ -1,72 +0,0 @@
[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp"
[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Mint to Maintain Timeshift Backup Tool as an XApp
======
Linux Mint takes over the development of Timeshift backup/restore tool. You can now find it in its new GitHub repository.
![linux mint][1]
Timeshift is arguably the [best tool to back up and restore the Linux system][2].
Linux Mint also utilizes the tool to let users easily take snapshots before updates, and ensure hassle-free operation.
Of course, thats not the only thing that makes [Linux Mint potentially better than Ubuntu][3].
Unfortunately, the developer ([Tony George][4]) behind Timeshift can no longer maintain the project. The developer plans to focus on other projects instead.
The Linux Mint team reached out to the developer to help the project in any capacity. And, they finalized to take over the development of Timeshift.
So, now, the Linux Mint team will be responsible for new releases/fixes, and any development activity associated with Timeshift.
### Adopting Timeshift as an XApp
![][5]
Linux Mint tends to maintain certain applications as an “XApp” to make sure that they work on various desktop environments and are not dependent on a particular desktop.
Considering that they plan to adopt Timeshift as an XApp, you can expect the tool to continue offering the current look/functionality for a long time, irrespective of your desktop environment.
Unlike some GNOME apps, which are usually turning into GNOME-only applications for the best experience.
Timeshift is an essential backup/restore tool. So, Linux Mint taking over the development and maintaining it as an XApp sounds perfect!
The translations for Timeshift are now done on [Launchpad][6], if you are curious.
The [new GitHub repository][7] (forked by Linux Mint) can give you more details about the application and its latest development activity.
You can also check out the official announcement for this in the [recent monthly blog post][8].
### Wrapping Up
With Linux Mint as the maintainer of Timeshift, we could hope for more feature additions and improvements in the near future.
What do you think about Linux Mint taking over the development of Timeshift as an XApp? You are welcome to share your thoughts on it in the comments below.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/linux-mint-timeshift/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-mint-time-shift.jpg
[2]: https://itsfoss.com/backup-restore-linux-timeshift/
[3]: https://itsfoss.com/linux-mint-vs-ubuntu/
[4]: https://teejeetech.com/
[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png
[6]: https://github.com/linuxmint/timeshift
[7]: https://github.com/linuxmint/timeshift
[8]: https://blog.linuxmint.com/?p=4323

View File

@ -1,85 +0,0 @@
[#]: subject: "Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians"
[#]: via: "https://news.itsfoss.com/spotify-basic-pitch/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians
======
Spotifys new open-source tool helps you convert audio to MIDI version. Explore why it is a big deal for modern musicians.
![spotify][1]
Spotify is a leading music streaming platform with several open-source projects.
While most of the projects/tools are built for niche users, they have finally introduced something that seems enticing to all the modern musicians involved with digital music production.
Basic Pitch is a new free and open-source tool by Spotify that lets you convert any audio file to its MIDI (Musical Instrument Digital Interface) version.
In case you did not know, with MIDI notes, you can easily tweak whats being played and analyze more to help you in digital music production.
### Basic Pitch: Making Things Easier
With Basic Pitch, one can easily have MIDI notes of an audio file they have always wanted, and with better accuracy.
![spotify basic pitch][2]
Spotify explains that it is better than existing note-detection systems by offering some advantages that include:
> **Polyphonic + instrument-agnostic:** Unlike most other note-detection algorithms, Basic Pitch can track multiple notes at a time and across various instruments, including piano, guitar, and ocarina. Many systems limit users to only monophonic output (one note at a time, like a single vocal melody), or are built for only one kind of instrument.
> **Pitch bend detection:** Instruments, like guitar or the human voice, allow for more expressiveness through pitch-bending: vibrato, glissando, bends, slides, etc. However, this valuable information is often lost when turning audio into MIDI. Basic Pitch supports this right out of the box.
> **Speed:** Basic Pitch is light on resources, and is able to run faster than real time on most modern computers ([Bittner et al. 2022][3]).
Basic Pitch uses a machine learning model that turns various instrumental performances into MIDI. The audio file may also contain your voice, but it should still be able to convert the instrument to its MIDI version.
![Basic Pitch demo: Convert audio into MIDI using ML][4]
I tried converting an MP3 karaoke file with a single instrument to get the MIDI notes, and it seemed to work pretty well.
The tool also lets you process more than one audio file at a time and offers a few parameter controls that include note segmentation, confidence threshold, minimum/maximum pitch, and note length.
### Made for Creators and Researchers
Spotify mentions that it targets the creators primarily, but they are also interested to learn how machine learning researchers build upon it and help develop better solutions using the [open-source project on GitHub][5].
As a creator/musician, you can access the open-source tool on its [official website][6] for a demo. The parameters can be adjusted using the website, and you can also download the MIDI file from there.
[Basic Pitch][7]
![spotify basic pitch][8]
It is also available via [PyPI][9] to install and use via the command-line interface on Linux, Windows, and macOS.
You can explore its [GitHub page][10] to know more about its usage/commands.
If you are curious, the [official announcement post][11] provides more technical comparisons and explanations regarding the development of the tool.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/spotify-basic-pitch/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-midi.jpg
[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-basic-pitch-1024x531.png
[3]: https://ieeexplore.ieee.org/document/9746549
[4]: https://youtu.be/DhlvfgS73ZQ?list=PLf1KFlSkDLIAYLdb-SD9s8TdGy0rWIwVr
[5]: https://github.com/spotify/basic-pitch
[6]: https://basicpitch.spotify.com/
[7]: https://basicpitch.spotify.com/
[8]: https://news.itsfoss.com/wp-content/uploads/2022/06/basic-pitch-parameters.jpg
[9]: https://pypi.org/
[10]: https://github.com/spotify/basic-pitch
[11]: https://engineering.atspotify.com/2022/06/meet-basic-pitch/

View File

@ -0,0 +1,47 @@
[#]: subject: "OpenInfra Foundation Launches directed funding To Support Open Source Projects"
[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
OpenInfra Foundation Launches directed funding To Support Open Source Projects
======
![open-infra-berlin-event][1]
The OpenInfra Foundation, formerly known as the OpenStack Foundation until it expanded its scope beyond its flagship project a few years ago, announced today an intriguing new way for companies to fund open source projects within the foundation. Corporate members of open source foundations have traditionally supported the organisation by paying a membership fee, which the foundations then distribute as they see fit. The OpenInfra foundation is now launching a new Directed Funding model that allows members to direct their funds directly to a project.
The foundation previously did not allow this because, as Bryce pointed out, it can create mixed incentives and a pay-for-play dynamic, which the organisation has always tried to avoid. However, there was a lot of interest in the community to support specific projects, which makes sense given that the foundation is now home to a wider variety of projects, but not every member is heavily invested in every project.
Bryce stated that the foundations leadership and board spent a significant amount of time considering how to reconcile the foundations core principles with this new model. As a result, the model tries to combine the best of the OpenStack/OpenInfra technical governance model, which has worked well over the last decade, with these new financial considerations.
Under this directed funding model, each new project will have its own legal entity that will hold the project funding. To ensure that the new projects are legitimate, an OpenInfra Platinum member (currently nine, including Ant Group, Huawei, Meta, Microsoft, and Red Hat) must serve as the projects sponsor, after which other organisations can join the project fund. If a sponsoring company is not already an OpenInfra member, it must become one. All of these funding members then form a project fund governing board, which decides on the fees for creating a budget. Meanwhile, the OpenInfra Foundation will provide these projects with community-building services.
This new model will, for the time being, only apply to new projects that join the foundation. Bryce and Collier noted that there may be some existing projects where the organisation could retroactively apply this new model, but that is not currently on the roadmap.
The OpenInfra foundation has added projects such as Kata Containers for increased container security, Airship for infrastructure lifecycle management, the Startling X edge compute stack, and the Zuul CI/CD platform since it expanded beyond OpenStack.
“The most important thing weve learned from each of these successful projects is that collaboration is key and the more breadth in the ecosystem of support the better,” said Thierry Carrez, general manager of the OpenInfra Foundation. “In fact, weve found that the most successful open source projects are funded by multiple companies, because they are able to combine their resources to achieve a much stronger rate of return.”
This new model is clearly a way for the OpenInfra Foundation to bring new projects — and new members — into the fold. Its models for managing open source projects in a multi-party ecosystem — both through the new directed funds and its more traditional approach — may not be suitable for every project, as the leadership team readily admits. Even if the OpenInfra Foundation only receives a small percentage of projects, the number of open-source projects is increasing as the demand for these sophisticated cloud infrastructure projects grows, all while they become more complex.
The Foundation also announced a couple of milestone releases for its various projects, including version 2.0 of Kata Containers, version 5.0 of Zuul, and the release of StarlingX 6.0.
“The Foundation celebrates its 10 anniversary this year, and as we look to our next decade of open infrastructure, were building momentum on what makes our model so successful: aligning companies and individuals who wish to work together, providing them with a framework and tools to effectively collaborate, and helping them invest their funds to best help the project they care about,” said Collier.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/
作者:[Laveesh Kocher][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/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png

View File

@ -0,0 +1,41 @@
[#]: subject: "Atom Text Editor Will Officially Be Terminated Later This Year"
[#]: via: "https://www.opensourceforu.com/2022/06/atom-text-editor-will-officially-be-terminated-later-this-year/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Atom Text Editor Will Officially Be Terminated Later This Year
======
![github-cover][1]
On December 15, Microsofts GitHub will shut down Atom, its open source text editor that inspired and influenced widely used commercial apps such as Microsoft Visual Studio Code, Slack, and GitHub Desktop. The social code company stated that it is doing so to focus on cloud-based software.
GitHub Codespaces is a cloud-hosted development environment with Visual Studio Code integration. When Microsoft acquired Github in June 2018, Nat Friedman, the CEO at the time, reassured the GitHub community that Atom was still alive and well.
Atom has come to a halt after four years of progress. Apart from maintenance and security updates, the project hasnt seen significant feature development in several years, according to GitHub. Community involvement has declined during this time, and the business of locally installed software now appears less appealing than the potential recurring revenue, vendor lock-in, and information gathering enabled by cloud-based apps.
The Atom shell a separate component for integrating with Chromium, Node.js, and native APIs was renamed Electron (a cross-platform app framework based on web tech) in 2015, and Microsoft began working with GitHub on Atom and Electron and what would become Visual Studio Code.
That relationship has now followed the famous Microsoft model of embrace, extend, and extinguish, though Atoms demise appears to be more like pushing dead weight out of a cloud-bound balloon than a strategically advantageous hit.
Atoms influence should be felt through the Electron framework. Electron.js is still the foundation for apps such as Discord, Skype, Slack, Trello, and Visual Studio Code, among others. However, technology evolves. Microsoft previously stated that it intends to abandon Electron in Teams. Other cross-platform frameworks, such as Flutter, Tauri, and Microsofts recently announced.NET Multi-platform App UI (.NET MAUI), may gain traction as well.
Nonetheless, Atom is expected to operate past its December 15, 2022 decommissioning date. GitHub intends to archive the Atom repository, but the code is open source and available to anyone who wants to champion the project.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/atom-text-editor-will-officially-be-terminated-later-this-year/
作者:[Laveesh Kocher][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/laveesh-kocher/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/github-cover-e1654769639273.jpg

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/5/first-open-source-contribution-libreoffice"
[#]: author: "Klaatu https://opensource.com/users/klaatu"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "lkskjjk"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -0,0 +1,120 @@
[#]: subject: "SSL Certificates: Make the Right Choice"
[#]: via: "https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/"
[#]: author: "Jitendra Bhojwani https://www.opensourceforu.com/author/jitendra-bhojwani/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
SSL Certificates: Make the Right Choice
======
Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation.
![SSL-certificate][1]
*Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation.*
SSL certificates are an apt solution for securing data in transit. They create an automated mechanism to encrypt the transfer of data between the server and browser (or site and visitor). This encryption can only be decrypted by the intended system. So it discourages hackers from stealing data, and offers complete security against transit attacks on it.
Along with securing communication, SSL certificates also build trust with customers and help you emerge as a credible business by displaying virtual trust icons like a padlock, HTTPS prefix, and a green address bar. So lets learn about the major types of SSL certificates and how to choose the one that works best for you.
### SSL certificate options: Similarities and differences
Lets first discuss the basic similarity all SSL certificates share. Regardless of their type, price and scope, every SSL certificate encrypts the to-and-fro communication between the sites server and the Internet browser of your visitor.
The difference lies in the terms and conditions of the validation process and the number of domains/subdomains it covers, etc. Proceeding to purchase an SSL certificate without first reviewing your present and future needs may result in costly mistakes, and you may end up paying a hefty amount for advanced features that are irrelevant to your business. Or you may get tempted to buy a cheap certificate that isnt a perfect fit for your business needs.
Due to the crucial role it plays, an SSL certificate is issued by an official certificate authority after a thorough verification procedure to confirm the legitimacy of ownership. So, this certificate not only encrypts the communication between websites and audiences, but also ensures the legal position of a site. It plays a vital role in building trust.
As you have now understood why we need a SSL certificate, we can discuss the different types of popular SSL certificates, along with their benefits and issuance procedures.
### Domain validation (DV) SSL certificate
The most basic of the three types of SSL certificates, the DV or domain validation certificate confirms the ownership of a domain through an automated online process. All you have to do is to complete a few basic steps to prove that you are the legitimate owner of the domain to get this certificate. Though easiest to get, this type of certificate helps in building only a basic level of trust.
After completing the DV certification procedure, you are allocated trust-building visual elements — a static seal, a padlock icon, and an HTTPS prefix in your URL.
Cheapest prices and quick, automated processes are the two major benefits of a DV certificate. On the flip side, you get only the basic trust signs that arent enough to satisfy the security concerns of more demanding customers or visitors.
*Important to know:* DV misses the most important trust sign — vetting the real, legal business that owns the domain name. For instance, suppose Mr X buys a domain abc.com to lure gullible people into investing money in a business that seems genuine. Being a legitimate domain owner, he can get a DV through an automated process. With HTTPS URLs and other trust signs, it is easy to gain peoples trust too. However, the company (or fraud mechanism) behind this domain isnt vetted/verified, which makes it easier for Mr X to continue duping investors of their hard-earned money.
Is DV SSL the right choice for you?: DV is best for a small and general website, which doesnt demand or require any sensitive information that can be misused like credit card numbers, social security information, or details of a financial portfolio. For websites that post childrens stories, general e-magazines, personal blogs, professional portfolios, and other static websites on general topics, a DV certificate is a perfect and cheap solution. Securing more mission-critical sites that collect sensitive data like credit card numbers and social security details is a different story though.
### Organisation validation (OV) SSL certificate
As the name suggests, the OV certificate not only validates the domain ownership but also vets the real identity of the organisation to which the domain officially belongs. It builds an extra layer of trust for visitors who have stronger concerns, by displaying the key information about the business. Interested visitors just need to check the details of the certificate to ascertain the credibility of the company.
As compared to a DV certificate, an OV certification requires a more detailed process carried out by an authorised certificate authority that demands and vets key documents representing the legal status of the company. Hence, along with domain ownership, this certificate also assures that it is owned by a legitimate organisation.
Though the issuance process is more expensive and demanding, this type of certificate does empower you to position your company as a legal, real company doing legitimate business. It makes you stand out and even more concerned visitors are able to trust your organisation.
Is OV the right choice for you?: Sites that ask for sensitive data that can be misused by threat actors should obtain this certificate. E-commerce sites with online payment gateways, digital health practitioners, government websites that demand citizens information, defence-related websites, online trading platforms, or professional networking sites are all the right candidates for obtaining an OV certificate.
### Extended validation (EV) SSL certificate
In the digital domain, visuals matter a lot. A company seal, security icons, or even assuring colours (like green) can go a long way in leaving a lasting impression, winning you a big deal or helping you forge business relations with dynamic brands.
The vetting procedure for issuing an EV SSL certificate is quite stringent and involves a manual process as well. It starts by verifying the ownership of the domain. After that, the certification authority asks for your identification number. Next, it gets your legal working contact number from relevant authentic sources. That contact number is manually verified by calling your office and talking with the real person. Only after satisfying all such verification parameters can you get the EV certificate.
Unlike an OV certificate, you dont just get a static site seal with a basic look, but get dynamic seals as well. Additionally, the full legal company name is displayed in the address bar along with a green-coloured padlock. Added to this, the entire address bar turns green as soon as your site loads. All these visible signs vouch for the legality of your firm, build a visual comfort zone and reaffirm the credibility of your organisation.
Such certificates satisfy the sophisticated digital security vetting parameters of global brands and corporate conglomerates. If highly expensive items like gold and diamond jewellery are being sold on a website, then such superior trust factors satisfy the higher trust demands of buyers. Though this certificate is the most expensive among all the SSL certificates, it is worth investing in the extra dollars as it has the potential to significantly boost your sales revenue.
### Scope of different SSL certificates
Apart from the type of certificate, the other crucial question is: how many digital properties you want your certificate to cover? If you own a single domain property and do not want to expand in the foreseeable future, then a single DV would do for you. But what if you own, say, 20 different domains — most of which deal with e-commerce or collect sensitive client information? It wouldnt be practical to buy the more expensive EV certificate for each of these domains. Here is some guidance on that.
### Wildcard SSL certificate
With a single wildcard SSL certificate you can protect the main domain and practically unlimited sub-domains related to it. For instance, yoursite.com (the main domain) may have three subdomains:
* mail.yoursite.com
* login.yoursite.com
* ftp.yoursite.com
This certificate relieves you from the stress and expenses of purchasing a separate certificate for every domain after going through the complete validation process, followed by an installation process for each. It also saves you a lot of time on repetitive processes and almost eliminates potential errors.
| - |
| :- |
| Note: Both DV and OV offer wildcard certificate options. |
### Multi-domain (or SAN SSL) certificate
One level above the wildcard SSL certificate is the multi-domain certificate, which helps to secure primary domains and their related subdomains. It does everything that a wildcard certificate can do, and more. If you own multiple domains and want a uniform and standard SSL security for all, then a multi-domain certificate is the right choice for you.
### Is SSL certification only about visual trust signs?
Obviously, when you spend significant money on an SSL certificate you would like to get more than security icons or trust signals. Well, your certification authority does offer a specific amount of warranty or a payback if your customers become victims of a fraud. The amount of this warranty depends upon the type of certificate and how much it costs.
### How to choose the ideal certificate authority (CA) for SSL
The next question is: who can judge the judge? It is you. Carefully consider some of the prime factors while finding the right SSL certificate provider/CA for your site. Before buying any certificate, thoroughly vet the reputation, credentials and experience of the certificate authority.
Also, ask questions. Do they have a credible history? What type of customers do they have in their repertoire? Do they have an impressive portfolio of regular customers? Most importantly, is the company passively following old industry standards, or is it actively investing in research and development on how to prevent the latest cyber frauds? All such questions will help you to make informed decisions and get the best value for your money.
Also make another very important check: Has any major browser banned the CA? The very objective of the SSL certificate is defeated if the CA has been banned by a major browser.
### How long does it take for an SSL certificate to be issued?
The time taken to issue a certificate varies and depends upon the validation procedure and its requirements. A DV certificate, for instance, is issued within minutes as it has the least verification requirements. An OV SSL, with more detailed vetting requirements, can take up to three days for issuance. Since it has the most demanding vetting process, the EV certificate can take up to four days for issuance.
The validation period of the certificate, along with its credibility and scope, plays an important role in influencing its price. It is always best to use your discretion, and find a fine balance between the price and value of the certificate.
A few reputed SSL certificates go the extra mile and also offer extra security measures to customers. You can never be secure enough on a digital platform. So it is always best to see if such additional security elements will be helpful. However, your prime focus should be the credibility and portfolio of the company. It isnt wise to compromise with that just to get some extra security elements.
SSL certificates encrypt the data and information that customers share with organisations. They help to save customers from data theft and misuse by threat actors. But its always advisable to check the credibility and reviews of a certificate authority carefully before buying a SSL certificate from it.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/
作者:[Jitendra Bhojwani][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/jitendra-bhojwani/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/SSL-certificate.jpg

View File

@ -1,72 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to teach open source beyond business)
[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business)
[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman)
How to teach open source beyond business
======
The Beyond program connects future talents in the tech industry with
open source culture.
![Teacher or learner?][1]
When I was a university student, I didn't understand the fuss about open source software. I used Linux and open source software but didn't really understand the open source model, how to contribute to projects, or how it could benefit my future career. My development experience consisted mainly of homework assignments and a large final project required for my degree.
So, when I took my first steps in the tech industry, there was a big learning curve before I felt comfortable. I needed to understand how to join established, sometimes large, and distributed teams working on an ongoing project. I also needed to know how to communicate properly so that my efforts could be recognized.
I am not special in this regard. This is a common situation among new graduates.
### Open source gives students a head start
Since then, as an engineer and later as a manager, I have helped onboard many junior engineers. One of the things I've noticed is that the new graduates who have already contributed to open source projects could onboard quickly and start contributing faster than those without this experience.
By incorporating open source methodology into academic studies, students can gain experience relevant to the industry, learn to reuse their existing knowledge, and establish a good platform for formulating ideas and sharing knowledge. Practicing open source can make a positive impact on students' technical knowledge and experience. This can help them become more successful in bootstrapping their careers.
The value of open source methodologies in the tech industry is well-established and shapes the culture of software companies worldwide. Involvement in open source projects and adoption of the [open organization culture][2] has become an industry standard. Companies seek fresh-minded, talented employees who know how to work in open source and cultivate its culture. Therefore, the tech industry must drive the academic world to embrace open source culture as one of the fundamental methodologies to learn in tech studies.
### Moving open source culture 'Beyond' business
When I met [Liora Milbaum][3], a senior principal software engineer at Red Hat, I learned we shared an interest in bringing open source culture and principles into academics. Liora had previously founded [DevOps Loft][4], in which she shared DevOps practices with people interested in stepping into this world, and wished to start a similar initiative to teach open source to university students. We decided to launch the [Beyond][5] program to connect future talents in the tech industry with open source culture as Red Hat practices it.
We started the Beyond program at the [Academic College of Tel Aviv-Yafo][6], where we were warmly welcomed by the information systems faculty. We started by teaching an "Introduction to DevOps'' course to introduce elements of the DevOps tech stack. Our biggest challenge at the start was deciding how to teach what open source is. The answer was simple: by practicing it, of course. We didn't want to deliver yet another old-school academic course; rather, we wanted to expose students to industry standards.
We created a syllabus that incorporated common open source projects and tools to teach the DevOps stack. The course consisted of lectures and hands-on participation taught by engineers. The students were divided into groups, each one mentored and supported by an engineer. They practiced working in teams, sharing knowledge (both inside and outside of their groups), and collaborating effectively.
During our second course, "Open source development pillars," for students in the computer science department, we encountered another big obstacle. Two weeks after the course started, we became fully remote as the COVID pandemic hit the globe. We solved this problem by using the same remote collaboration tools with our students that we were using for our daily work at Red Hat. We were amazed at how simple and smooth the transition was.
![Beyond teaching online][7]
(Irit Goihman, [CC BY-SA 4.0][8])
### Successful early outcomes
The two courses were a huge success, and we even hired one of the top students we taught. The feedback we received was amazing; the students said we positively impacted their knowledge, thinking, and soft skills. A few students were hired for their first tech job based on their open source contributions during the course.
Other academic institutions have expressed interest in adopting these courses, so we've expanded the program to another university.
I am fortunate to co-lead this successful initiative with Liora, accompanied by a team of talented engineers. Together, we are helping increase the open source community a bit more.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/open-source-beyond-business
作者:[Irit Goihman][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/iritgoihman
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?)
[2]: https://opensource.com/open-organization/resources/open-org-definition
[3]: https://www.linkedin.com/in/lioramilbaum
[4]: https://www.devopsloft.io/
[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/
[6]: https://www.int.mta.ac.il/
[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online)
[8]: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -2,7 +2,7 @@
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock)
[#]: author: (Chris Collins https://opensource.com/users/clcollins)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: ( Donkey-Hao )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -2,7 +2,7 @@
[#]: via: (https://opensource.com/article/21/6/qtcreator)
[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (hadisi1993)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,65 +0,0 @@
[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12"
[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Fix yay: error while loading shared libraries: libalpm.so.12
======
This quick guide is to help you to fix yay error while loading shared libraries: libalpm.so.12.
If you are running [Arch Linux][1] in a system for longer, things can break due to its rolling release nature combined with your hardware support. If you use the AUR Helper Yay, then sometimes, yay can be corrupted due to several installations upgrades of other packages.
The YAY helper is very stable, but sometimes it gets messed up, and you can not do any installation using it until you fix it. And one of the nagging errors is this:
```
yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory
```
This error particularly comes after upgrading to pacman 6.0 due to incompatibility of shared libraries.
![error while loading shared libraries - yay][2]
### How to fix yay error while loading shared libraries: libalpm.so.12
* This error can only be fixed by uninstalling yay completely, including its dependencies.
* Then re-installing yay.
* There is no other way to solve this error.
* We already have a guide [how to install Yay][3], however, here are the steps to fix.
* Clone the yay repo from AUR and build. Run the following command in sequence from a terminal window.
```
cd /tmp
git clone 'https://aur.archlinux.org/yay.git'
cd /tmp/yay
makepkg -si
cd ~
rm -rf /tmp/yay/
```
After installation, you can try running the command which gave you this error. And you should be all set. If you still have this error, let me know in the comment box below.
Many people have encountered this, and [several discussions][4] happened across the web. Above is the only solution to this error. And I could not find the exact root cause of the problem anywhere except it started after pacman 6.0 update.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/
作者:[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://archlinux.org/
[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg
[3]: https://www.debugpoint.com/2021/01/install-yay-arch/
[4]: https://github.com/Jguer/yay/issues/1519

View File

@ -2,7 +2,7 @@
[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,235 +0,0 @@
[#]: subject: "Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine"
[#]: via: "https://itsfoss.com/duckduckgo-easter-eggs/"
[#]: author: "sreenath https://itsfoss.com/author/sreenath/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine
======
DuckDuckGo is one of the alternative search engines that is less privacy intruding than the omnipresent Google.
DuckDuckGo is one of the [alternative search engines that is less privacy intruding][1] than the omnipresent Google.
It has improved a lot lately and works quite satisfactorily for general web search. It is nowhere close to Google when it comes to local search.
However, DuckDuckGo (fondly nicknamed DDG) has some cool features most users are not aware of. If you are an ardent DDG fan, you may enjoy enhancing your search experience with these tricks.
### 1. Jump on a specific website
Type ! before your favorite website name and directly enter the website. This is like the feeling lucky feature of Google but in DDG terms, its called bangs.
There are short forms for the websites, which will be suggested when we start typing.
![duckduckgo bang feature][2]
Entering the search term just after the website name will land you on the required result from that website.
### 2. Convert text to ASCII
Figlet is one of the [fun Linux commands][3]. It converts any text into a decorated ASCII format.
Type **figlet** before any search term; it will print its ASCII output. No need to open the terminal.
![Figlet in DDG][4]
### 3. Check social media status
Use @ in front of the proper twitter name of someone will show their status (followers etc.).
![Itsfoss Twitter][5]
### 4. Generate a strong password
Type password followed by the number of characters to be included and it will generate a strong, unique password for you.
![Generating password in DuckDuckGo][6]
### 5. Generate Random Passphrase
Type random passphrase to generate a passphrase, usually 4 words long.
![Random Passphrase][7]
### 6. Get a cheatsheet
Type cheatsheet after the term whose cheatsheet you want. If there is a cheat sheet for the searched term, it will show it immediately on the search page.
![Vim Cheatsheet][8]
### 7. Get color from the color code
Type color followed by the hex code of the color you want to check and it will show what that color looks like.
![Color][9]
### 8. Generate a random number
Searching random number will output a random number between 0 and 1
![Random Number][10]
You can also specify the range to look for.
![Random Number between 1 and 1000][11]
### 9. Convert to binary and other formats
Type a binary number and append it with binary will convert it from binary to decimal
![Binary to Decimal][12]
Similarly, it works for hexadecimal and oct, but I am confused about their logic.
### 10. Find rhyming words
Type what rhymes with followed by the word you want to get rhymes of. Helps with your poetry skills, no?
![What rhymes with rain][13]
### 11. Get Ramanujan number, Pi, and other constants
Type the name of the constant whose value you want and you get it right in the search result page.
![Ramanujan Number][14]
### 12. Check who is currently in space
Type people in space and get the list of those currently in space. It also shows how long they have been in space.
![People in Space][15]
### 13. Check if a website is down
If you want to know if a particular website is down for you or for everyone, just use the “is xyz.com is down” search query.
![Is down?][16]
### 14. Get quotes on certain topics
Type a word followed by quotes, and it will give quotes related to that word.
![Get quotes in DDG][17]
### 15. Get Placeholder texts
Search for lorem ipsum and get 5 paragraphs of placeholder texts. Useful for web developers perhaps.
![Lorem ipsum][18]
### 16. Get the calendar of any month
Type calendar followed by day, month, and year and it gives you an interactive calendar of that month.
![Calendar][19]
### 17. Generate QR code
Search qr followed by any text, be it a link or anything, will generate the respective QR Code.
![QRCode][20]
### 18. Get some CSS Animations
Search for css animations to get some CSS animation examples.
![CSS Animations][21]
### 19. Expand a shortened link
Got a bitly or some other shortened link but not sure where it takes you. Instead of landing on a spammy website, expand the shortened URL and see the actual website URL.
Use the keyword expand followed by the shortened URL and it will show the actual destination URL.
![Expand Link][22]
### 20. Get HTML codes for special characters
Search html chars and get a very long list of HTML entities and their description, if pressed show more in the result
![HTML Chars][23]
### 21. Why should I use this?
This one is pretty useless. If you enter the term “why should I use this?” it shows “cause its awesome” at the top of the search result page. Clearly, DuckDuckGo is referring to itself.
![Why should I use this?][24]
### 22. Convert case
This works in two cases. lowercase <searchterm in Upper-case> will show the lowered case result
![Lowercase][25]
uppercase <searchterm in lower case> will show an uppercase result.
![Uppercase][26]
### 23. Encode a URL
Search encode followed by a URL will give an encoded result
![URL Encode][27]
### 24. Motherboard
Search for Motherboard, and you can see that the logo of DuckDuckGo on the left side is changed. It shows a random logo from the selection of a few.
![Motherboard][28]
### 25. Get HTML Color Codes
Search for color codes and you get a chart of colors. Again, this one is more for web developers and designers.
![Color Codes][29]
### There are many more…
My teammate Sreenath came up with this post idea. He says there are more such easter eggs in DuckDuckGo and I believe him. But it wont be feasible to list them all here.
If you know more such interesting DDG search features, share them in the comments. If you found your next favorite search feature, do mention that too.
--------------------------------------------------------------------------------
via: https://itsfoss.com/duckduckgo-easter-eggs/
作者:[sreenath][a]
选题:[lkxed][b]
译者:[Peaksol](https://github.com/TravinDreek)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sreenath/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/privacy-search-engines/
[2]: https://itsfoss.com/wp-content/uploads/2022/05/duckduckgo-bang-feature-800x449.png
[3]: https://itsfoss.com/funny-linux-commands/
[4]: https://itsfoss.com/wp-content/uploads/2022/05/figlet-800x272.png
[5]: https://itsfoss.com/wp-content/uploads/2022/05/itsfoss-twitter-800x278.jpg
[6]: https://itsfoss.com/wp-content/uploads/2022/05/password-30-800x185.jpg
[7]: https://itsfoss.com/wp-content/uploads/2022/05/random-pqssphrase-800x179.png
[8]: https://itsfoss.com/wp-content/uploads/2022/05/vim-cheatsheet-800x367.png
[9]: https://itsfoss.com/wp-content/uploads/2022/05/color-800x289.jpg
[10]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-800x235.png
[11]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-between-1-and-1000-800x244.png
[12]: https://itsfoss.com/wp-content/uploads/2022/05/binary-800x184.png
[13]: https://itsfoss.com/wp-content/uploads/2022/05/What-rhymes-with-rain-800x257.png
[14]: https://itsfoss.com/wp-content/uploads/2022/05/ramanujan-number-800x238.png
[15]: https://itsfoss.com/wp-content/uploads/2022/05/people-in-space-800x313.jpg
[16]: https://itsfoss.com/wp-content/uploads/2022/05/is-down-800x204.png
[17]: https://itsfoss.com/wp-content/uploads/2022/05/life-quotes-800x303.png
[18]: https://itsfoss.com/wp-content/uploads/2022/05/lorem-ipsum-800x227.png
[19]: https://itsfoss.com/wp-content/uploads/2022/05/calendar-800x331.png
[20]: https://itsfoss.com/wp-content/uploads/2022/05/qrcode-800x255.png
[21]: https://itsfoss.com/wp-content/uploads/2022/05/css-animations-800x385.jpg
[22]: https://itsfoss.com/wp-content/uploads/2022/05/expand-shortened-link-ddg-800x209.png
[23]: https://itsfoss.com/wp-content/uploads/2022/05/html-chars-800x174.png
[24]: https://itsfoss.com/wp-content/uploads/2022/05/why-should-i-use-this-800x160.png
[25]: https://itsfoss.com/wp-content/uploads/2022/05/lowercase-800x179.png
[26]: https://itsfoss.com/wp-content/uploads/2022/05/uppercase-800x185.png
[27]: https://itsfoss.com/wp-content/uploads/2022/05/url-encode-800x177.png
[28]: https://itsfoss.com/wp-content/uploads/2022/05/motherboard.png
[29]: https://itsfoss.com/wp-content/uploads/2022/05/color-codes-800x554.png

View File

@ -1,194 +0,0 @@
[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11"
[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/"
[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/"
[#]: collector: "lkxed"
[#]: translator: "robsean"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Dual Boot Ubuntu 22.04 LTS and Windows 11
======
Hey guys, in this guide we will demonstrate how to configure a dual-boot setup of Ubuntu 22.04 LTS (Jammy Jellyfish) alongside Windows 11.
For this to work, you need to have Windows 11 already installed on your PC.  You will then need to create a separate partition on your hard drive on which Ubuntu 22.04 will be installed. We will go over all this, so dont worry.
##### Prerequisites 
Before setting sail with the dual-boot setup, here is what you need.
* A bootable USB drive of Ubuntu 22.04 You can download Ubuntu 22.04 ISO image by heading over to the [Ubuntu 22.04 download page][1]. With the ISO image in place, grab a 16GB USB drive and use  Rufus application to make it bootable.
* A fast and stable internet connection
### Step 1) Create a Free Partition on Your Hard Drive 
As mentioned in the introduction, we first and foremost need to create a separate partition on the hard drive on which we are going to install Ubuntu 22.04.
So, open the disk management utility by pressing Windows Key + R
In the dialogue box, type diskmgmt.msc and hit ENTER.
![][2]
The disk management console displays the current disk partitions as you can see below. We are going to create a partition for installing Ubuntu by Shrinking Volume E. This might be different in your setup, but just follow along and you will get the drift.
![][3]
So, right-click on the volume that you want to shrink and select Shrink.
![][4]
A pop-up dialogue box will appear as shown below. Specify the amount of space to shrink in MB and click Shrink.
This is the space that is designated for the Ubuntu 22.04 installation.
![][5]
After shrinking the space, it will appear as Unallocated or Free Space as shown.
![][6]
With the free space in place, now plug the bootable USB medium into your PC and reboot your system. Also, be sure to access the BIOS setup and modify the boot priority to have the USB drive as the first priority. Save the BIOS changes and proceed to boot.
### Step 2) Begin the installation
On the first screen, you will get the GRUB menu displayed as shown. Select the first option Try or Install Ubuntu and press ENTER.
![][7]
Ubuntu 22.04 will start loading as shown below. This takes a minute at most.
![][8]
Thereafter, the installation wizard will pop open providing you with two options: Try Ubuntu and Install Ubuntu.  Since our mission is to install Ubuntu, select the latter.
![][9]
Next, select your preferred Keyboard layout and click Continue.
![][10]
In the Updates and Other Software step, select Normal Installation in order to install the GUI version of Ubuntu and check the rest of the options to allow download of updates and installation of third-party software for graphics, WiFi hardware and other utilities.
Then click Continue.
![][11]
The next step provides two options for installation. The first option -Erase disk and install Ubuntu completely wipes out your drive and installs Ubuntu. But since this is a dual boot setup, this option will be disastrous to your existing Windows installation.
Therefore, select Something else and click Continue.
![][12]
The partition table will be displayed with all the existing disk partitions. So far, we only have the NTFS partitions and the free space we shrunk earlier.
For Ubuntu 22.04, we will create the following partitions:
* /boot                1 GB
* /home                10 GB
* /                   12 GB
* Swap                 2 GB
* EFI                300 MB
To get started with the partitions, click on the [ + ] sign below the Free Space partition.
![][13]
Fill in the /boot partition details as shown then click OK.
![][14]
Next up, specify the /home partition and click OK.
![][15]
Next, define the / ( root ) partition and click OK.
![][16]
To define swap space, set the size and select Swap area for the Use as: option.
![][17]
Finally, create an EFI system partition if you are using UEFI boot mode. We will assign 300 MB to the EFI partition.
![][18]
Below is a summary of the partitions in our partition table.
![][19]
To continue with the installation, click Install Now. On the pop-up shown below, click Continue to save the changes to the disk.
![][20]
Next, the installation wizard will auto-detect your location. Simply click Continue.
![][21]
Next, create a login user by specifying the name, computers name and password. Then click Continue.
![][22]
At this point, the installation wizard will copy all the Ubuntu files and packages to the manually created hard drive partitions and install the required software packages.
This process takes quite a while, so be patient. In our case, it took roughly 30 minutes.
![][23]
Once the installation is completed, click on Restart Now to reboot the system.
![][24]
At this point, remove your bootable USB drive and press ENTER
![][25]
When the system restarts, you will find all options for both Ubuntu and Windows 11.
Select Ubuntu to boot into your new Ubuntu 22.04 installation. To boot into Windows 11, select the entry labeled Windows Recovery Environment.
![][26]
And there you have it. We have demonstrated how to dual-boot Windows 11 with Ubuntu 22.04.
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/
作者:[James Kiarie][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/james/
[b]: https://github.com/lkxed
[1]: https://releases.ubuntu.com/22.04/
[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png
[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png
[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png
[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png
[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png
[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png
[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png
[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png
[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png
[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png
[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png
[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png
[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png
[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png
[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png
[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png
[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png
[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png
[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png
[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png
[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png
[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png
[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png

View File

@ -1,137 +0,0 @@
[#]: subject: "Dynamically linking libraries while compiling code"
[#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Dynamically linking libraries while compiling code
======
Compiling software gives you a lot of flexibility in how you run your system. The LD_LIBRARY_PATH variable, along with the -L and -l GCC options, are components of that flexibility.
![women programming][1]
Image by: WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0
Compiling software is something that developers do a lot, and in open source some users even choose to do it themselves. Linux podcaster Dann Washko calls source code the "universal package format" because it contains all the components necessary to make an application run on any platform. Of course, not all source code is written for all systems, so it's only "universal" within the subset of targeted systems, but the point is that source code is extremely flexible. With open source, you can decide how code is compiled and run.
When you're compiling code, you're usually dealing with multiple source files. Developers tend to keep different classes or modules in separate files so that they can be maintained separately, and possibly even used by different projects. But when you're compiling these files, many of them get compiled into a single executable.
This is usually done by creating shared libraries, and then dynamically linking back to them from the executable. This keeps the executable small by keeping modular functions external, and ensures that libraries can be updated independently of the applications that use them.
### Locating a shared object during compilation
When you're [compiling with GCC][2], you usually need a library to be installed on your workstation for GCC to be able to locate it. By default, GCC assumes that libraries are in a system library path, such as `/lib64` and `/usr/lib64`. However, if you're linking to a library of your own that's not yet installed, or if you need to link to a library that's not installed in a standard location, then you have to help GCC find the files.
There are two options significant for finding libraries in GCC:
* -L (capital L) adds an additional library path to GCC's search locations.
* -l (lowercase L) sets the name of the library you want to link against.
For example, suppose you've written a library called `libexample.so`, and you want to use it when compiling your application `demo.c`. First, create an object file from `demo.c` :
```
$ gcc -I ./include -c src/demo.c
```
The `-I` option adds a directory to GCC's search path for header files. In this example, I assume that custom header files are in a local directory called `include`. The `-c` option prevents GCC from running a linker, because this task is only to create an object file. And that's exactly what happens:
```
$ ls
demo.o   include/   lib/    src/
```
Now you can use the `-L` option to set a path for your library, and compile:
```
$ gcc -L`pwd`/lib -o myDemo demo.o -lexample
```
Notice that the `-L` option comes *before* the `-l` option. This is significant, because if `-L` hasn't been added to GCC's search path before you tell GCC to look for a non-default library, GCC won't know to search in your custom location. The compilation succeeds as expected, but there's a problem when you attempt to run it:
```
$ ./myDemo
./myDemo: error while loading shared libraries:
libexample.so: cannot open shared object file:
No such file or directory
```
### Troubleshooting with ldd
The `ldd` utility prints shared object dependencies, and it can be useful when troubleshooting issues like this:
```
$ ldd ./myDemo
        linux-vdso.so.1 (0x00007ffe151df000)
        libexample.so => not found
        libc.so.6 => /lib64/libc.so.6 (0x00007f514b60a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f514b839000)
```
You already knew that `libexample` couldn't be located, but the `ldd` output at least affirms what's expected from a *working* library. For instance, `libc.so.6` has been located, and `ldd` displays its full path.
### LD_LIBRARY_PATH
The `LD_LIBRARY_PATH` [environment variable][3] defines the path to libraries. If you're running an application that relies on a library that's not installed to a standard directory, you can add to the system's library search path using `LD_LIBRARY_PATH`.
There are several ways to set environment variables, but the most flexible is to place them before you run a command. Look at what setting `LD_LIBRARY_PATH` does for the `ldd` command when it's analyzing a "broken" executable:
```
$ LD_LIBRARY_PATH=`pwd`/lib ldd ./
   linux-vdso.so.1 (0x00007ffe515bb000)
   libexample.so => /tmp/Demo/lib/libexample.so (0x0000...
   libc.so.6 => /lib64/libc.so.6 (0x00007eff037ee000)
   /lib64/ld-linux-x86-64.so.2 (0x00007eff03a22000)
```
It applies just as well to your custom command:
```
$ LD_LIBRARY_PATH=`pwd`/lib myDemo
hello world!
```
If you move the library file or the executable, however, it breaks again:
```
$ mv lib/libexample.so ~/.local/lib64
$ LD_LIBRARY_PATH=`pwd`/lib myDemo
./myDemo: error while loading shared libraries...
```
To fix it, you must adjust the `LD_LIBRARY_PATH` to match the library's new location:
```
$ LD_LIBRARY_PATH=~/.local/lib64 myDemo
hello world!
```
### When to use LD_LIBRARY_PATH
In most cases, `LD_LIBRARY_PATH` isn't a variable you need to set. By design, libraries are installed to `/usr/lib64` and so applications naturally search it for their required libraries. You may need to use `LD_LIBRARY_PATH` in two cases:
* You're compiling software that needs to link against a library that itself has just been compiled and has not yet been installed. Good build systems, such as [Autotools][4] and [CMake][5], can help handle this.
* You're bundling software that's designed to run out of a single directory, with no install script or an install script that places libraries in non-standard directories. Several applications have releases that a Linux user can download, copy to `/opt`, and run with "no install." The `LD_PATH_LIBRARY` variable gets set through wrapper scripts so the user often isn't even aware it's been set.
Compiling software gives you a lot of flexibility in how you run your system. The `LD_LIBRARY_PATH` variable, along with the `-L` and `-l` GCC options, are components of that flexibility.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/compile-code-ldlibrarypath
作者:[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://opensource.com/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png
[2]: https://opensource.com/article/22/5/what-happens-behind-scenes-during-gcc-compilation-c-programs
[3]: https://opensource.com/article/19/8/what-are-environment-variables
[4]: https://opensource.com/article/19/7/introduction-gnu-autotools
[5]: https://opensource.com/article/21/5/cmake

View File

@ -0,0 +1,249 @@
[#]: subject: "10 Best Ubuntu Apps for Everyone in 2022 [Part 2]"
[#]: via: "https://www.debugpoint.com/2022/06/best-ubuntu-apps-2022-part2/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
10 Best Ubuntu Apps for Everyone in 2022 [Part 2]
======
This article lists the top 10 best Ubuntu apps for different use cases in 2022.
If you plan to migrate to Linux permanently, you should be happy knowing that there are thousands of applications that can compete with commercial or paid applications. Also, if you are a Windows user and using Linux first time, then you may not hear of those apps.
Hence, in this article series, we are highlighting a set of Ubuntu apps at a time to increase collaboration and awareness among the user base.
This is part 2 of the Ubuntu Apps series.
### Best Ubuntu Apps in 2022 Part 2
#### 1. OBS Studio
The first application is the famous [streaming application][1] OBS Studio. It is a free and open-source application primarily used for streaming over the internet. In addition, using this application, you can create a complex streaming project using multiple sources, overlay banners and more.
Furthermore, thanks to its support of “Real-Time Messaging Protocol” (RTMP), you can use this app to stream on Facebook, YouTube, Twitch and another supported platform.
This decade-old application is one of the best apps for Linux.
![OBS Studio][2]
You can learn more about OBS Studio here at the [official home page][3] and download or install it via the below methods.
Via PPA in Ubuntu and related distribution:
```
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install obs-studio
```
If you wish for Flatpak, then [setup your system for Flatpak][4] and [install via this page][5].
For Arch Linux and others, [visit this page for more information.][6]
#### 2. Inkscape
The second application in this is the popular Inkscape application. Inkscape is a free and cross-platform vector graphics editor. It is primarily used to create scalable vector graphics. In addition, it is a world-class application which uses basic vector shapes such as rectangles, polygons, spirals and more. You can create world-class drawings using these primitive shapes and their additional tools (see below).
Furthermore, you can also create [stunning animations][7] using Inkscape with sufficient skills. It is one of the must-have applications for artists.
![Sample Image credit-Inkscape][8]
![Inkscape][9]
You can learn more about Inkscape here at the [official home page][10] and download or install it via the below methods.
Via PPA in Ubuntu and other Linux distributions:
```
sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt update
sudo apt install inkscape
```
For other download methods, visit [this page][11].
#### 3. GIMP
The GIMP aka GNU Image Manipulation Program is a raster graphics editor which is sometimes considered a debatable-[Photoshop alternative][12] in the Linux world. In addition, this two-decade-old application is perfect for basic to advanced image editing. Moreover, it supports layers, filters, decorations, and other advanced image editing features essential for a photography workflow.
![GIMP Image Editor][13]
A great way to learn more about GIMP is at the [official home page][14]and download or install via the below methods.
The recommended way is Flatpak to get the latest GIMP version. You can set up[your system][15] for Flatpak and [click here to install][16].
For more download options, visit [this page][17].
#### 4. Spotify
Spotify is a proprietary audio streaming and media services provider. It is one of the most extensive music streaming services, with over 400+ million monthly users.
Firstly, to access the Spotify streaming service, you need a client. Secondly, If you are a mobile user, you can use the Spotify app from Google Play Store or Apple App Store.
You can listen to millions of songs on your Linux desktop by installing the desktop client. For Linux distributions, you can install the Spotify client from various sources.
![Spotify Client in Ubuntu][18]
The recommended method for Ubuntu and other Linux is using the Snap package. You can install it via the below command.
```
snap install spotify
```
If you prefer the native deb package, you can install it using the below commands.
```
curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add -echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
```
There is also an unofficial [Flatpak package available][19], which you can take advantage of.
#### 5. SimpleScreen recorder
The simplescreenrecorder is perhaps the best open-source screen recorder available. This application is straightforward to use and loaded with features. In addition, its unique 3-step approach to recording the screen which requires no learning at all. Moreover, you can select the entire screen, a window or a custom shape to record the screen.
Furthermore, you can also specify the auto/video bit rate, audio source options and different output options. Finally, it is available to install in all Linux distributions.
![SimpleScreenRecorder][20]
The [official home page][21] contains more details about SimpleScreenRecorder, and you can download it using the below methods.
Using the PPA commands below, you can install this application in Ubuntu and other related distributions.
```
sudo apt-get updatesudo apt-get install simplescreenrecorder
```
For additional download instructions, visit [this page][22].
#### 6. Calibre
Calibre is a free and open-source e-book library management application available in Ubuntu, Linux Mint and other Linux platforms. It brings library management, e-book conversion, sync to your e-book devices and more unique features. Moreover, you can download news and other articles from the web and convert them to e-book formats using Calibre. In addition, it supports a wide range of e-book formats for management. Calibre is one of the best e-book management applications with all these features.
![Calibre][23]
A lot of documentation and tutorials are available on the [home page of Calibre][24], and you can download them using the below means.
* [Download for Linux distributions][25]
* [Download for other operating systems][26]
#### 7. Scribus
Desktop publishing changed over the years. Today, there are several applications and web-based services available for desktop publishing. Scribus is one of the early free and open-source desktop publishing applications available for Linux distributions and other operating systems. In addition, it is based on Qt and brings an appealing user interface which you can learn in no time. Furthermore, it can be used by beginners to professionals to create stunning DTP pages.
And it is still in active development.
![Scribus][27]
You can learn more about Scribus here at the [official home page][28] and download or install it via the below methods.
Scribus is in the main repo for Ubuntu and other related distributions. You can run the below command to install.
```
sudo apt install scribus
```
For other download options, visit [this page][29].
#### 8. MyPaint
The eighth application in this is MyPaint. MyPaint is a free and open-source drawing program for digital artists. MyPaint supports and can be used in pressure-sensitive tablets and devices. In addition, its unique distraction-free design lets you focus on the drawing instead of the application. Furthermore, it brings a real pencil and brushes emulation with a wide range of brushes, colours and layers.
![MyPaint 2.0.1][30]
For more information, visit the [official homepage][31] of MyPaint and download using the below methods.
The recommended install method is Flatpak. You can set up your [system for Flatpak][32] and install it by [clicking here][33].
For other download options, visit [this page][34].
#### 9. LibreOffice
If any professional Office suite comes close to the market leader Microsoft Office is the Document Foundations LibreOffice. It is the default Office suite for all Linux Distributions. It comes with a spreadsheet program (Calc), word processor (Writer), presentation (Impress) and Draw (for drawing). Moreover, it also brings a database system LibreOffice Base and Math to prepare mathematical formulas.
In addition to that, LibreOffice features two editions. Firstly, the community edition is for the community and general uses and comes with the latest features and updates. The second edition is for business, and its called the enterprise edition. The enterprise edition is more stable and perfect for professional work.
LibreOffice office suite is installed by default in Ubuntu.
![LibreOffice 7.3.x Community Edition in Ubuntu 22.04 LTS Jammy Jellyfish][35]
[LibreOffices official documentation][36] is vast, and you can go through them through any means, including its [friendly forum][37]. You can download LibreOffice [from here][38].
Also, if you are planning to upgrade LibreOffice, you can [visit our guide here][39].
#### 10. Cawbird
If you are a heavy Twitter user, you may consider a desktop app. Cawbird is a desktop Twitter client for Linux distributions. Fork of the prior Corebird app (discontinued), Cawbird brings inline image, video preview, list support, etc. In addition, it can do a full-text search on Twitter and support multiple Twitter accounts.
However, due to Twitter API limitations, it refreshes every two minutes and several other restrictions such as no notification for follows, unfollows, block, mute and other features. Twitter imposed these limitations.
![Cawbird][40]
Finally, you can download the Cawbird for all Linux distributions using the [link present here][41].
### Closing Notes
This concludes part 2 of a 5-part series of best Ubuntu Apps in 2022. I expect you get to install and use some of these applications in Ubuntu and other distros for your daily work. Also, let me know which apps you prefer from this list in the comment box below.
Finally, stay tuned for part 3 of this Ubuntu apps series. If you missed part 1, you could read it here “[Essential Ubuntu Apps in 2022 Part 1][42]“.
Cheers.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/06/best-ubuntu-apps-2022-part2/
作者:[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/2022/02/live-streaming-applications-linux-2022/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/06/OBS-Studio.jpg
[3]: https://obsproject.com/
[4]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/
[5]: https://flathub.org/apps/details/com.obsproject.Studio
[6]: https://obsproject.com/wiki/unofficial-linux-builds
[7]: https://inkscape.org/gallery/
[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Sample-Image-credit-Inkscape.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2018/09/Inkscape-Running.png
[10]: https://inkscape.org/
[11]: https://inkscape.org/release/
[12]: https://www.debugpoint.com/2018/09/3-best-free-photoshop-alternatives-ubuntu-linux/
[13]: https://www.debugpoint.com/wp-content/uploads/2018/09/GIMP-Running.png
[14]: https://www.gimp.org/
[15]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/
[16]: https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref
[17]: https://www.gimp.org/downloads/
[18]: https://www.debugpoint.com/wp-content/uploads/2022/06/Spotify-Client-in-Ubuntu.jpg
[19]: https://flathub.org/apps/details/com.spotify.Client
[20]: https://www.debugpoint.com/wp-content/uploads/2022/06/SimpleScreenRecorder.jpg
[21]: https://www.maartenbaert.be/simplescreenrecorder/
[22]: https://www.maartenbaert.be/simplescreenrecorder/#download
[23]: https://www.debugpoint.com/wp-content/uploads/2019/11/Calibre.png
[24]: https://calibre-ebook.com/
[25]: https://calibre-ebook.com/download_linux
[26]: https://calibre-ebook.com/download
[27]: https://www.debugpoint.com/wp-content/uploads/2022/06/Scribus.jpg
[28]: https://www.scribus.net/
[29]: https://www.scribus.net/downloads/stable-branch/
[30]: https://www.debugpoint.com/wp-content/uploads/2020/05/MyPaint-2.0.1.png
[31]: http://mypaint.org/
[32]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/
[33]: https://flathub.org/repo/appstream/org.mypaint.MyPaint.flatpakref
[34]: http://mypaint.org/downloads/
[35]: https://www.debugpoint.com/wp-content/uploads/2019/09/LibreOffice-7.3.x-Community-Edition-in-Ubuntu-22.04-LTS-Jammy-Jellyfish.jpg
[36]: https://help.libreoffice.org/latest/index.html
[37]: https://ask.libreoffice.org/
[38]: https://www.libreoffice.org/download/download/
[39]: https://www.debugpoint.com/2022/06/libreoffice-upgrade-update-latest/
[40]: https://www.debugpoint.com/wp-content/uploads/2022/06/Cawbird.jpg
[41]: https://software.opensuse.org//download.html?project=home%3AIBBoard%3Acawbird&package=cawbird
[42]: https://www.debugpoint.com/2022/05/essential-ubuntu-apps-2022-part-1/

View File

@ -0,0 +1,382 @@
[#]: subject: "A Drupal developer's guide to Progressive Web Apps"
[#]: via: "https://opensource.com/article/22/6/drupal-pwa"
[#]: author: "Alex Borsody https://opensource.com/users/alexborsody"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
A Drupal developer's guide to Progressive Web Apps
======
Here is an outlined approach to PWA implementation for a Drupal site, but other options are certainly available with similar designs.
![Digital creative of a browser on the internet][1]
The following article is a companion to my presentation at Drupalcon and Drupalcamp covering Progressive Web Apps implementations.
Progressive Web Apps (PWA) have support from some of the top tech companies, including Google and Microsoft, with the common goal being "[Web apps should be able to do anything iOS, Android, or desktop apps can.][2]" PWAs can add value to businesses at a variety of different stages. All projects have limitations, whether they be development resources, timeline, budget, or technical debt. Even with "unlimited resources," developing an app from a single codebase, using commonly known web technologies, allows for a more frictionless, sane release cycle.
Disclaimers:
* PWA is a collection of different techniques combined in a web browser to create an "app-like" experience.
* This information is from an architect's perspective for choosing and implementing various technologies that come together to build a product.
* Below is a high-level end-to-end outline of a path to launch a Drupal website on the app stores. Each section could be its own in-depth blog post.
* The techniques are written with Drupal in mind, but you can apply many of them to all web apps.
### What is a PWA?
![What is PWA][3]
Benefits of a PWA implementation:
* Increased Lighthouse score and SEO.
* Single codebase.
* Frictionless testing.
* Instant feedback loop for development cycles.
* Use of existing PaaS deployment workflows, including Acquia, Pantheon, Platform.sh etc.
* Use of web technologies that are a familiar skillset for a wide array of developers.
* Provides the only cross-platform development solution that delivers a full-fledged desktop experience.
* Offers unlimited options to customize a design without relying on a cross-platform framework's limited UI components.
This article covers some basic points for PWA deployment. There are many details to consider both at the architect and developer levels. The following topics are discussed:
* PWA minimum requirements and Drupal PWA module as a starting point.
* Publishing on app stores.
* Everything you need to know about making your PWA feel [app-like][4].
### PWA module on Drupal.org
The [Drupal PWA module][5] is a solution that generates a service worker for caching strategies and offline capabilities. Its secondary functionality also generates a `manifest.json`, so once installed, it will fulfill the [basic requirements of a PWA][6] out-of-the-box.
There is functionality in the module's service worker that provides unique solutions to Drupal-specific behavior, although you can also apply these solutions to apps outside of Drupal.
![Drupal PWA module][7]
#### Offline caching
Offline caching with a service worker is one of the functionalities that defines a PWA.
The following images summarize how a service worker acts as a proxy (sitting between the client and the internet/webserver) to intercept HTTP requests from the browser.
During the first request to the `/about` page, the browser reaches the network, and upon returning a 200 response from the server, the Javascript service worker calls **cache.put()** to store the HTML and all assets in the [Cache API][8].
![Offline caching example in service worker][9]
On the second trip, the service worker bypasses the network completely and serves the page from the Cache API store in the user's browser, loading the page instantly. It can also load the page offline.
![Second visit to site][10]
The browser can precache pages to make them load instantly before the user visits them or even load offline before a visit. However, because in Drupal, the CSS/JS filenames change after compression, the solution must address the problem of identifying these assets before it can precache them via a service worker. It does this by internally requesting the URLs set in the admin panel and extracting assets from the DOM. This allows the service worker [install event][11] to fetch all CSS/JS and images from these documents to store in Cache API. The complete pages will then be viewable offline and load instantly, even if the user never visits them first.
![Service worker][12]
![Offline caching demo][13]
Below, I fetch all the assets from the URLs set in the admin panel to inject later into the service worker precache assets array. In D8, I changed the request to use **Drupal::httpClient()**, which is the updated version of **drupal_http_request()** in D7 and is a wrapper for the PHP Guzzle library.
```
foreach ($pages as $page) {
try {
  // URL is validated as internal in ConfigurationForm.php.
  $url = Url::fromUserInput($page, ['absolute' => TRUE])->toString(TRUE);
  $url_string = $url->getGeneratedUrl();
  $response = \Drupal::httpClient()->get($url_string, array('headers' => array('Accept' => 'text/plain')));
```
This code matches all assets needed:
```
// Get all DOM data.
$dom = new \DOMDocument();
@$dom->loadHTML($data);
$xpath = new \DOMXPath($dom);
foreach ($xpath->query('//script[@src]') as $script) {
  $resources[] = $script->getAttribute('src');
}
foreach ($xpath->query('//link[@rel="stylesheet"][@href]') as $stylesheet) {
  $resources[] = $stylesheet->getAttribute('href');
}
foreach ($xpath->query('//style[@media="all" or @media="screen"]') as $stylesheets) {
  preg_match_all(
    "#(/(\S*?\.\S*?))(\s|\;|\)|\]|\[|\{|\}|,|\"|'|:|\<|$|\.\s)#ie",
    ' ' . $stylesheets->textContent,
    $matches
  );
  $resources = array_merge($resources, $matches[0]);
}
foreach ($xpath->query('//img[@src]') as $image) {
  $resources[] = $image->getAttribute('src');
}
```
Below, you can see the final result in the processed `serviceworker.js` file that is output in the browser. The variables in the service worker are replaced with the path to the assets to cache.
![Final test of offline caching][14]
#### Phone home uninstall
The module provides another clever piece of functionality—responsible cleanup when uninstalled. The module sends a request back to a URL created by the module. If the URL does not exist, it means the module has been uninstalled. The service worker then unregisters itself and deletes all related caches left on the user's browser.
```
// Fetch phone-home URL and process response.
let phoneHomeUrl = fetch(PWA_PHONE_HOME_URL)
.then(function (response) {
// if no network, don't try to phone-home.
if (!navigator.onLine) {
console.debug('PWA: Phone-home - Network not detected.');
}
// if network + 200, do nothing
if (response.status === 200) {
console.debug('PWA: Phone-home - Network detected, module detected.');
}
// if network + 404, uninstall
if (response.status === 404) {
console.debug('PWA: Phone-home - Network detected, module NOT detected. UNINSTALLING.');
// Let SW attempt to unregister itself.
Promise.resolve(pwaUninstallServiceWorker());
}
return Promise.resolve();
})
.catch(function(error) {
console.error('PWA: Phone-home - ', error);
});
};
```
### Testing notes
Disable the module on dev as it provides an extra caching layer. Any changes pushed to production for CSS or other assets with cache first strategies should be followed by incrementing the service worker version to bust the cache.
You can find additional debugging steps for a service worker on this PWA module [documentation page][15].
Using the Chrome console to [remote debug][16] on a mobile device is possible on Android and can be helpful.
### 2.x version
The 2.x and 7.2x versions port the service worker to [Workbox][17], where you can set caching strategies. Here, setting caching strategies for different asset types and routes is simplified from about 30 lines of code using just the javascript Fetch API to about five lines. Some people may be resistant to libraries, but this is the direction Google is taking with PWAs.
Workbox [caching strategies][18] are similar to those in other caching layers such as Varnish. For example, by default, image assets and fonts are set to "cache first," so they are always served instantly. HTML would best be implemented as [stale-while-revalidate][19].
![Workbox and PWA module][20]
There is also functionality in Workbox, such as [background sync][21], where a failed post request will retry upon coming back online.
![Offline cache][22]
For more information on what a service worker can do and all the use cases where it may be helpful, check the [W3 Service Workers Demo repo][23] on GitHub.
### Get your web app in the app stores
PWA builder is a web application powered by Microsoft where you input your URL and it generates everything you need to submit to the app stores.
For Android, it uses TWA, and for iOS, it wraps your web app in native SWIFT code using [WebKit's][24] WKWebView. These are techniques I have been using since 2013, way back when Drupal was a buzzy technology and being used by startups. Businesses that had mobile-optimized Drupal websites wanted them on the app stores. Before Android TWA, developers used Webview, and before WKWebView, there was UIWebView.
Recently PWA builder added a [solution for iOS][25] using WKWebView, which confirms my belief that this is the best option to get your PWA into the App Store. Maximilian Firtman also reveals this as the solution in his course "Creating Progressive Web Apps with Vue," which I purchased to see his answer to the problem.
The PWA module provides everything you need to run through PWA Builder:
* For Android, it creates a lightweight .apk/.aap using TWA to submit to the Play Store 800kb.
* For iOS, it wraps your website in WKWebView to submit to the App Store.
A live demo I put together of PWA builder is here. **[[EDITORS - MISSING LINK]]**
### Android and TWA
The Google and Chromium teams are currently the strongest driving forces behind PWAs. Therefore, TWA is designed specifically to get your PWA into the Play Store. On the contrary, WKWebView is essentially a workaround not explicitly supported by Apple. However, WKWebView is extremely powerful, even though Apple doesn't advertise this or have much documentation on its capabilities.
Trusted Web Activity is essentially a Chrome process running in full screen with a status bar and loading screen. The thread is running in the same process as the Chrome app on your phone. For example, if you are logged in on your Chrome browser, you will be logged in on your TWA app. To clear up any possible confusion resulting from this, the TWA team has added a "toast," meaning the first time the user opens the app, a notification shows "Running in Chrome." This only happens the first time the app is installed. This annoyance is enough for some teams to ditch TWA and use the WebView class instead; however, Google [discouraged this][26] as you lose out on everything baked into the Chrome web browser.
The [main points][27] Google makes about using TWA are:
* Chrome is feature complete.
* Faster than Webview.
* Evergreen (always the up-to-date version of Chrome).
Additional useful functionality.
* Chrome handles frictionless OAuth requests.
* Share cookies, local storage, and saved settings with the preferred browser.
Below is a comparison chart of everything you get when using TWA instead of a Webview wrapper.
![Google TWA][28]
### Webkit: WKWebView
There are several considerations for publishing on the App Store. WKWebView is essentially a workaround and not a method implicitly endorsed by Apple to launch a native app. Some caveats come with this. The most important is to be mindful of Apple's [minimal functionality guidelines][29].
From my experience, you will be approved if you do everything you can to make your web app "app-like" with useful functionality. Using the Webkit API to enhance your web app is another way to provide additional functionality outside of your website.
One technique is to set a cookie depending on the **start_url**. For example, add a parameter like **myapp.com?ios_app** and set a cookie to determine a separate stylesheet or customize logic.
Consider the following sample implementation.
**Note**: This technique should not be confused with Apple's limited [add to homescreen][30] support, which you usually hear about with Apple + PWAs. I won't cover this as it's not the experience a user would expect.
PWA builder provides the minimum functionality required to wrap a website in WKWebView for App Store submission. For features such as biometric or push notifications, you need a custom implementation of WKWebView.
In the graphic below, you can see the source files provided. You can then easily compile your app in XCode and submit it to the app store.
![Source code][31]
[PWA Builder provides][32]:
* No Bounce when scrolling out of view with wKWebView.scrollView.bounces = false
* Service worker support
* Shortcuts URL capture
* Permitted navigation scopes
* Status bar customization
* Splash screen from manifest props
* iOS app awareness from JS code
* Mac Store support
A custom implementation of WKWebView can provide:
* Push notifications: Push notifications are possible by posting the device ID matched to the Drupal UID, which can be extracted from the URL /user/{uid}/edit, for example.
* [Biometric][33]: Biometric is implemented on all pages except for user/login and user/register, and the cookie max expiration is extended. Biometric is shown every time the app is closed and reopened.
* [WKUIDelegate][34]: Present native UI elements, such as alerts, inputs, or contextual menus.
* [evaluateJavaScript()][35]: Execute any Javascript. The possibilities here are endless.
* Password management using [associated domains][36]: Placing a public keypair in your `/.well-known` directory will allow your native app to trust your website and autofill passwords.
View the [README.md][37] of WKWebView+, a project I am working on that makes it easy to integrate this enhanced functionality into any iOS PWA.
#### Cons of WKWebView
Give the following considerations attention before implementing WKWebView:
* There is a paradigm shift in thinking required for frontend developers to debug a PWA correctly. Though it relies on web technologies, there is a learning curve.
* Without a native iOS developer, certain features are not possible to implement. However, [WKWebView+][38] was designed to solve this.
* Though the outlook for Apple and PWAs [looks positive][39], as usual, you are at the mercy of the next Safari release.
### Moving forward
Many of the features available with TWA are only available on Chromium-based browsers. Webkit mobile/WKWebView lags. This lag includes push notifications, "add to home screen," and overall web browser standards. Maximilian Firtman's blog is currently one of the best resources for a summary of the updates in the latest Safari, even if they [were not announced in the release notes][40].
The optimistic outlook is that WKWebView is based on the open-source project Webkit, and there is a collaboration among the developers that work on both Chromium and WebKit. Anyone can create an issue and pull request. Often, features already [implemented in Chrome][41] have patches submitted to Webkit that do the same.
#### Make it app-like
Websites that took all the right vitaminsA PWA is essentially a collection of web technologies that combine to make your web experience app-like, as if the website "took all the right vitamins." Below I have identified points that make up a good PWA:
* UX/UI: Visual problem solving is at the core of making your website feel like an app. A great CSS developer with an eye for design and detail, such as animations, input/font sizes, and scrolling issues, is essential.
* Stay current with app-like enhancements: Keeping frontend code updated and compatible across WebKit/Chrome requires research and periodic updates, particularly when a new version of the iPhone is released.
* Implement expanded web capabilities: The Chromium team constantly improves the browser experience. This can be tracked in [Project Fugu][42], the overarching web capabilities project. The closest thing there is to comprehensive documentation on PWAs is on [webdev][43].
* Page speed: I covered caching with a service worker, but there are countless other technologies and techniques.
Some examples of app-like enhancements include using HTML/CSS/JS technologies commonly available to web developers, and then making them frictionless to implement, test, and deploy. You can find a good example of a web application using many of these suggestions [here][44].
Suggestions include:
* [Javascript touch events][45]: Disable pinch zoom and add swipe/multitouch gestures.
* CSS:
+ Minify/optimize CSS and apply [Lighthouse][46] suggestions.
+ "App-like" input/font sizes and make sure everything fits in the viewport; make it visually look like an app.
+ Tactful use of preloaders.
* Utilize cookies: Set cookie based on app start URL.
* HTML attributes:
+ autocomplete="username"
+ [autocomplete="current-password"][48]
+ [autocomplete="one-time-code"][49] - WebOTP API
+ input type="tel"
* Ajax API (Drupal specific), Websockets, or SPA framework.
* iPhone specific suggestions:
+ [Status bar on iPhone X][52] and Viewport meta tag.
+ Apple-specific [meta tags][53].
![iPhone X status bar][61]
### Wrap up
PWA brings together different techniques to create an app-like experience in a web browser. I outlined an approach to PWA implementation for a Drupal site, but other options are certainly available with similar designs. What implementations of PWA might help your organization's user experience?
View the [README.md][62] of WKWebView+, a project I am working on that makes it easy to integrate this enhanced functionality into any iOS PWA.
Ionic the spiritual successor to Cordova is a popular framework that also utilizes [WKWebView][63] to build native iOS.
Image by: (Alex Borsody, CC BY-SA 4.0)
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/6/drupal-pwa
作者:[Alex Borsody][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/alexborsody
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/browser_web_internet_website.png
[2]: https://developer.chrome.com/blog/fugu-status/
[3]: https://opensource.com/sites/default/files/2022-06/what-is-pwa.jpeg
[4]: https://web.dev/app-like-pwas/
[5]: https://www.drupal.org/project/pwa
[6]: https://web.dev/lighthouse-pwa/
[7]: https://opensource.com/sites/default/files/2022-05/2DrupalModule.jpg
[8]: https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage
[9]: https://opensource.com/sites/default/files/2022-05/3OfflineCache.png
[10]: https://opensource.com/sites/default/files/2022-05/4SecondVisit.jpg
[11]: https://developer.mozilla.org/en-US/docs/Web/API/InstallEvent
[12]: https://opensource.com/sites/default/files/2022-05/5SvcWorker.jpg
[13]: https://opensource.com/sites/default/files/2022-05/6Test.jpg
[14]: https://opensource.com/sites/default/files/2022-05/7Test-code.jpg
[15]: https://www.drupal.org/docs/7/modules/progressive-web-app-pwa/troubleshooting
[16]: https://developer.chrome.com/docs/devtools/remote-debugging/
[17]: https://developers.google.com/web/tools/workbox
[18]: https://developers.google.com/web/ilt/pwa/caching-files-with-service-worker
[19]: https://developer.chrome.com/docs/workbox/modules/workbox-strategies/
[20]: https://opensource.com/sites/default/files/2022-05/8Workbox.jpg
[21]: https://developer.chrome.com/docs/workbox/modules/workbox-background-sync/
[22]: https://opensource.com/sites/default/files/2022-05/9OfflineCache.jpg
[23]: https://github.com/w3c-webmob/ServiceWorkersDemos
[24]: https://developer.apple.com/documentation/webkit
[25]: https://blog.pwabuilder.com/docs/ios-platform/
[26]: https://twitter.com/andreban/status/1232204535835303936
[27]: https://youtu.be/6lHBw3F4cWs?t=179
[28]: https://opensource.com/sites/default/files/2022-05/10GoogleTWA.png
[29]: https://developer.apple.com/app-store/review/guidelines/#minimum-functionality
[30]: https://support.apple.com/guide/shortcuts/add-a-shortcut-to-the-home-screen-apd735880972/ios
[31]: https://opensource.com/sites/default/files/2022-05/11sourcefiles.jpg
[32]: https://blog.pwabuilder.com/docs/ios-platform/
[33]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md#biometrics
[34]: https://developer.apple.com/documentation/webkit/wkuidelegate
[35]: https://developer.apple.com/documentation/webkit/wkwebview/1415017-evaluatejavascript
[36]: https://developer.apple.com/documentation/xcode/supporting-associated-domains
[37]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md
[38]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md
[39]: https://firt.dev/pwa-2021/#tim-cook-promoting-pwas
[40]: https://www.macworld.com/article/610673/ios-15-4-safari-push-notifications.html
[41]: https://www.google.com/search?q=site:https://webkit.org/+chromium&source=lnt&tbs=qdr:y&sa=X&ved=2ahUKEwjGwrDj2Nj2AhXHrHIEHfBQD5wQpwV6BAgBEBk&biw=1638&bih=897&dpr=2
[42]: https://www.chromium.org/teams/web-capabilities-fugu/
[43]: https://web.dev/progressive-web-apps/
[44]: https://carbonpay.io/
[45]: https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Multi-touch_interaction
[46]: https://developers.google.com/web/tools/lighthouse
[47]: https://developers.google.com/web/tools/lighthouse
[48]: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element
[49]: https://web.dev/web-otp/
[50]: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element
[51]: https://web.dev/web-otp/
[52]: https://webkit.org/blog/7929/designing-websites-for-iphone-x/
[53]: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
[54]: https://webkit.org/blog/7929/designing-websites-for-iphone-x/
[55]: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
[56]: https://developers.google.com/web/tools/lighthouse
[57]: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element
[58]: https://web.dev/web-otp/
[59]: https://webkit.org/blog/7929/designing-websites-for-iphone-x/
[60]: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
[61]: https://opensource.com/sites/default/files/2022-05/12iPhoneStatusBar.png
[62]: https://github.com/AlexBorsody/drupalcon2022/blob/main/README.md
[63]: https://ionicframework.com/docs/v3/wkwebview/

View File

@ -0,0 +1,155 @@
[#]: subject: "How Garbage Collection works inside a Java Virtual Machine"
[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine"
[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar"
[#]: collector: "lkxed"
[#]: translator: "lkxed"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How Garbage Collection works inside a Java Virtual Machine
======
Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances.
![Coffee beans][1]
Image by: Pixabay. CC0.
Automatic Garbage Collection (GC) is one of the most important features that makes Java so popular. This article explains why GC is essential. It includes automatic and generational GC, how the Java Virtual Machine (JVM) divides heap memory, and finally, how GC works inside the JVM.
### Java memory allocation
Java memory is divided into four sections:
1. Heap: The memory for object instances is allocated in the heap. When the object declaration is made, there won't be any memory allocated in the heap. Instead, a reference is created for that object in the stack.
2. Stack: This section allocates the memory for methods, local variables, and class instance variables.
3. Code: Bytecode resides in this section.
4. Static: Static data and methods are placed in this section.
### What is automatic Garbage Collection (GC)?
Automatic GC is a process in which the referenced and unreferenced objects in heap memory are identified, and then unreferenced objects are considered for deletion. The term *referenced objects* means some part of your program is using those objects. *Unreferenced objects* are not currently being used by the program.
Programming languages like C and C++ require manual allocation and deallocation of memory. This is automatically handled by GC in Java, although you can trigger GC manually with the `system.gc();` call in your code.
The fundamental steps of GC are:
#### 1. Mark used and unused objects
In this step, the used and unused objects are marked separately. This is a time-consuming process, as all objects in memory must be scanned to determine whether they're in use or not.
![Marking used and unused objects][2]
#### 2. Sweep/Delete objects
There are two variations of sweep and delete.
**Simple deletion**: Only unreferenced objects are removed. However, the memory allocation for new objects becomes difficult as the free space is scattered across available memory.
![Normal deleting process][3]
**Deletion with compaction**: Apart from deleting unreferenced objects, referenced objects are compacted. Memory allocation for new objects is relatively easy, and memory allocation performance is improved.
![Deletion with compacting][4]
### What is generational Garbage Collection (GC), and why is it needed?
As seen in the sweep and delete model, scanning all objects for memory reclamation from unused objects becomes difficult once the objects keep growing. An experimental study shows that most objects created during the program execution are short-lived.
The existence of short-lived objects can be used to improve the performance of GC. For that, the JVM divides the memory into different generations. Next, it categorizes the objects based on these memory generations and performs the GC accordingly. This approach is known as *generational GC*.
### Heap memory generations and the generational Garbage Collection (GC) process
To improve the performance of the GC mark and sweep steps, the JVM divides the heap memory into three generations:
* Young Generation
* Old Generation
* Permanent Generation
![Hotspot heap structure][5]
Here is a description of each generation and its key features.
#### Young Generation
All created objects are present here. The young generation is further divided into:
1. Eden: All newly created objects are allocated with the memory here.
2. Survivor space (S0 and S1): After surviving one GC, the live objects are moved to one of these survivor spaces.
![Object allocation][6]
The generational GC that happens in the Young Generation is known as *Minor GC*. All Minor GC cycles are "Stop the World" events that cause the other applications to pause until it completes the GC cycle. This is why Minor GC cycles are faster.
To summarize: Eden space has all newly created objects. Once Eden is full, the first Minor GC cycle is triggered.
![Filling Eden space][7]
Minor GC: The live and dead objects are marked during this cycle. The live objects are moved to survivor space S0. Once all live objects are moved to S0, the unreferenced objects are deleted.
![Copying referenced objects][8]
The age of objects in S0 is 1 because they have survived one Minor GC. Now Eden and S1 are empty.
Once cleared, the Eden space is again filled with new live objects. As time elapses, some objects in Eden and S0 become dead (unreferenced), and Eden's space is full again, triggering the Minor GC.
![Object aging][9]
This time the dead and live objects in Eden and S0 are marked. The live objects from Eden are moved to S1 with an age increment of 1. The live objects from S0 are also moved to S1 with an age increment of 2 (because they've now survived two Minor GCs). At this point, S0 and Eden are empty. After every Minor GC, Eden and one of the survivor spaces are empty.
The same cycle of creating new objects in Eden continues. When the next Minor GC occurs, Eden and S1 are cleared by moving the aged objects to S0. The survivor spaces switch after every Minor GC.
![Additional aging][10]
This process continues until the age of one of the surviving objects reaches a certain threshold, at which point it is moved to the so-called the Old Generation with a process called *promotion*.
Further, the `-Xmn` flag sets the Young Generation size.
### Old Generation (Tenured Generation)
This generation contains the objects that have survived several Minor GCs and aged to reach an expected threshold.
![Promotion][11]
In the example diagram above, the threshold is 8. The GC in the Old Generation is known as a *Major GC*. Use the flags `-Xms` and `-Xmx` to set the initial and maximum size of the heap memory.
### Permanent Generation
The Permanent Generation space stores metadata related to library classes and methods of an application, J2SE, and what's in use by the JVM itself. The JVM populates this data at runtime based on which classes and methods are in use. Once the JVM finds the unused classes, they are unloaded or collected, making space for used classes.
Use the flags `-XX:PermGen` and `-XX:MaxPermGen` to set the initial and maximum size of the Permanent Generation.
#### Metaspace
Metaspace was introduced in Java 8u and replaced PermGen. The advantage of this is automatic resizing, which avoids OutOfMemory errors.
### Wrap up
This article discusses the various memory generations of JVM and how they are helpful for automatic generational Garbage Collection (GC). Understanding how Java handles memory isn't always necessary, but it can help you envision how the JVM deals with your variables and class instances. This understanding allows you to plan and troubleshoot your code and comprehend potential limitations inherent in a specific platform.
Image by: (Jayashree Huttanagoudar, CC BY-SA 4.0)
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine
作者:[Jayashree Huttanagoudar][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/jayashree-huttanagoudar
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg
[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png
[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png
[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png
[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png
[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png
[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png
[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png
[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png
[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png
[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png

View File

@ -0,0 +1,85 @@
[#]: subject: "How to Boot Ubuntu 22.04 into Rescue / Emergency Mode"
[#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/"
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Boot Ubuntu 22.04 into Rescue / Emergency Mode
======
Hello geeks, booting Ubuntu 22.04 (Jammy Jellyfish) into rescue and emergency mode helps to reset the forgotten user password, fix the file system errors and disabling or enabling systemd service during boot.
In this post, we will learn how to boot Ubuntu 22.04 LTS system into rescue and emergency mode. Rescue mode is similar to single user mode where are all troubleshooting steps are executed. Rescue mode loads the minimal environment and mount root file system.
Whereas in emergency mode, we get the single user shell without starting any system services. So emergency mode is required when we cant boot the system into rescue mode.
### Boot Ubuntu 22.04 into Rescue or Single User Mode
Head to target system which you want to boot into rescue or single user mode. At the boot press SHIFT & ESC key to enter into grub bootloader screen.
![Default-Grub-Screen-Ubuntu-22-04][1]
Choose the first option Ubuntu and press e to enter edit mode.
Go the end of line which starts with linux and delete the string $vt_handoff and add the string systemd.unit=rescue.target
![rescue-target-ubuntu-22-04][2]
After making the changes, either press Ctrl+x or F10 to boot in rescue mode,
![Troubleshooting-Commands-in-Rescue-Mode][3]
Once you enter into rescue mode, run all troubleshooting commands and to reboot the system run systemctl reboot command
### Alternate Way to Boot System into Rescue Mode
Reboot the system and press ESC & Shift Key to go to grub boot screen.
Choose the 2nd option Advanced Options for Ubuntu > Choose recovery mode option and hit enter > Choose Root (Drop to root shell prompt).
Example is show below
![Boot-Ubuntu-22-04-Rescue-Mode][4]
Once you have root shell, run commands to recover and fix the system issues and finally use systemctl reboot to reboot the system.
### Boot Ubuntu 22.04 into Emergency Mode
To boot the system into emergency mode, first go to grub screen.
![Default-Grub-Screen-Ubuntu-22-04][5]
Select the first option as Ubuntu and press e to edit. Look for the line which starts with linux word, go to the end of that line, remove the string $vt_handoff and add the string systemd.unit=emergency.target
![Emergency-Mode-Ubuntu-22-04][6]
Press Ctrl+x or F10 to boot the system into emergency mode,
![Command-in-Emergency-Mode-Ubuntu-22-04][7]
Similarly in rescue mode, you can perform all the troubleshooting in this mode and once done reboot the system with command systemctl reboot.
Thats all from this post. I found it informative and dont hesitate to share this among your technical friends. Kindly post your queries and feedback in below comments section.
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/
作者:[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
[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png
[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/rescue-target-ubuntu-22-04.png
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Troubleshooting-Commands-in-Rescue-Mode.png
[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Boot-Ubuntu-22-04-Rescue-Mode.gif
[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png
[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Emergency-Mode-Ubuntu-22-04.png
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Command-in-Emergency-Mode-Ubuntu-22-04.png

View File

@ -0,0 +1,141 @@
[#]: subject: "Integrating Zeek with ELK Stack"
[#]: via: "https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/"
[#]: author: "Tridev Reddy https://www.opensourceforu.com/author/tridev-reddy/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Integrating Zeek with ELK Stack
======
Zeek is an open source network security monitoring tool. This article discusses how to integrate Zeek with ELK.
![Integrating-Zeek-with-ELK-Stack-Featured-image][1]
In the article titled Network Security Monitoring Made Easy with Zeek published in the March 2022 edition of this magazine, we looked into the capabilities of Zeek and learned how to get started with it. We will now take our learning experience a bit further and see how to integrate it with ELK (also know as Elasticsearch, Kibana, Beats, and Logstash).
For this, we will use a tool called Filebeat, which monitors, collects and forwards the logs to Elasticsearch. We will configure Filebeat with Zeek, so that the data collected by the latter will be forwarded and centralised in our Kibana dashboard.
### Installing Filebeat
Lets first set up Filebeat with Zeek. To install Filebeat using *apt*, give the following command:
```
sudo apt install filebeat
```
Next, we need to configure the *.yml* file, which is present in the etc*/filebeat/* folder:
```
sudo nano /etc/filebeat/filebeat.yml
```
We need to configure only two things here. In the *Filebeat* Input section, change the type to log and uncomment the *enabled*: false and change it to true. We also need to specify the path of where the logs are stored, i.e., we need to specify */opt/zeek/logs/current/*.log*
Once this is done, the first part of the settings should look similar to whats shown in Figure 1.
![Figure 1: Filebeat config (a)][2]
The second thing to be changed in the Elasticsearch output section is under *Outputs.* Uncomment the output.elasticsearch and hosts. Make sure the URL of the host and port number are similar to what you configured while installing ELK. We kept it as localhost with port number 9200.
In the same section, uncomment the user name and password at the bottom, and enter the user name and password of the elastic user that you generated while configuring ELK after installation. Once this is done, refer to Figure 2 and check the settings.
![Figure 2: Filebeat config (b)][3]
Now that we have completed installing and configuring , we need to configure Zeek so that it stores the logs in JSON format. For that, ensure your Zeek instance is stopped. If its not, execute the command given below to stop it:
```
cd /opt/zeek/bin
./zeekctl stop
```
Now we need to add a small line in the local.zeek, which is present in the *opt/zeek/share/zeek/site/* directory.
Open the file as root and add the following line:
```
@load policy/tuning/json-logs.zeek
```
Refer to Figure 3 and make sure the settings are done correctly.
![Figure 3: local.zeek file][4]
As we have changed a few configurations of Zeek, we need to re-deploy it, which can be done by executing the following command:
```
cd /opt/zeek/bin
./zeekctl deploy
```
Now we need to enable the Zeek module in Filebeat so that it forwards the logs from Zeek. Execute the following command:
```
sudo filebeat modules enable zeek
```
We are almost ready; in the last step, configure the *zeek.yml* file to mention what type of data is to be logged. This can be done by modifying the */etc/filebeat/modules.d/zeek.yml* file.
In this *.yml file*, we must mention the directory where these specified logs are stored. We know that the logs are stored in the current folder, which has several files like *dns.log*, *conn.log, dhcp.log,* and many more. We need to mention each path in each section. You can leave unwanted files by changing the enabled value to false, if and only if you dont want logs from that file/program.
For example, for *dns*, make sure the enabled value is true and the path is mentioned as:
```
var.paths: [ “/opt/zeek/logs/current/dns.log”, “/opt/zeek/logs/*.dns.json” ]
```
Repeat this for the rest of the files. We did this for a few that we needed. We added everything that was mainly required. You can do the same. Refer to Figure 4.
![Figure 4: zeek.yml configuration][5]
Now its time to start the Filebeat. Execute the following commands:
```
sudo filebeat setup
sudo service filebeat start
```
Now that everything is done, lets move to our Kibana dashboard and check whether we are receiving the data from Zeek via Filebeat or not.
![Figure 5: Dashboard of Kibana (Destination Geo)][6]
Navigate to the dashboard; you can see a clear statistical analysis of the data it has captured (Figure 5 and Figure 6).
![Figure 6: Dashboard of Kibana (Network)][7]
Now lets move to the Discover tab and check the results by filtering using the query:
```
event.module: “zeek”
```
This query will filter all the data it received in a certain time and show us only the data from the module named Zeek (Figure 7).
![Figure 7: Filtered data by event.module query][8]
### Acknowledgements
*The authors are grateful to Sibi Chakkaravarthy Sethuraman, Sudhakar Ilango, Nandha Kumar R. and Anupama Namburu at the School of Computer Science and Engineering, VIT-AP for their continuous guidance and support. A special thanks to the Center for Excellence in Artificial Intelligence and Robotics (AIR).*
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/
作者:[Tridev Reddy][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/tridev-reddy/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Integrating-Zeek-with-ELK-Stack-Featured-image.jpg
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Filebeat-config-a.jpg
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Filebeat-config-b.jpg
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-local.zeek-file-1.jpg
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-zeek.yml-configuration.jpg
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Dashboard-of-Kibana-Destination-Geo.jpg
[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Dashboard-of-Kibana-Network-1.jpg
[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Filtered-data-by-event.jpg

View File

@ -0,0 +1,96 @@
[#]: subject: "How I gave my old laptop new life with the Linux Xfce desktop"
[#]: via: "https://opensource.com/article/22/6/linux-xfce-old-laptop"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How I gave my old laptop new life with the Linux Xfce desktop
======
While I installed Linux to use my laptop for a few demos at a conference, I found Linux and the Xfce desktop made this old laptop feel quite snappy.
![Person drinking a hat drink at the computer][1]
Image by: [Jonas Leupe][2] on [Unsplash][3]
A few weeks ago, I needed to give a conference presentation that included a brief demonstration of a small app I'd written for Linux. I needed a Linux laptop to bring to the conference, so I dug out an old laptop and installed Linux on it. I used the [Fedora 36 Xfce spin][4], which worked great.
The laptop I used was purchased in 2012. The 1.70 GHz CPU, 4 GB memory, and 128 GB drive may seem small compared to my current desktop machine, but Linux and the Xfce desktop gave this old machine new life.
### Xfce desktop for Linux
The [Xfce desktop][5] is a lightweight desktop that provides a sleek, modern look. The interface is familiar, with a taskbar or “panel” across the top to launch applications, change between virtual desktops, or access notifications in the system tray. The quick access dock at the bottom of the screen lets you launch frequently used applications like the terminal, file manager, and web browser.
![Image of Xfce desktop][6]
To start a new application, click the Applications button in the upper-left corner. This opens a menu of application launchers, with the most frequently used applications like the terminal and file manager at the top. Other applications are organized into groups, so you can navigate to the one you want.
![Image of desktop applications][7]
### Managing files
Xfce's file manager is called Thunar, and it does a great job of organizing my files. I like that Thunar can also make connections to remote systems. At home, I use a Raspberry Pi using SSH as a [personal file server][8]. Thunar lets me open an SSH file transfer window so I can copy files between my laptop and the Raspberry Pi.
![Image of Thunar remote][9]
Another way to access files and folders is via the quick access dock at the bottom of the screen. Click the folder icon to bring up a menu of common actions such as opening a folder in a terminal window, creating a new folder, or navigating into a specific folder.
![Image of desktop with open folders][10]
### Other applications
I loved exploring the other applications provided in Xfce. The Mousepad text editor looks like a simple text editor, but it contains useful features for editing more than just plain text. Mousepad recognizes many file types that programmers and other power users may appreciate. Check out this partial list of programming languages available in the Document menu.
![Image of Mousepad file types][11]
If you prefer a different look and feel, you can adjust the interface options such as font, color scheme, and line numbers using the View menu.
![Image of Mousepad in color scheme solarized][12]
The disk utility lets you manage storage devices. While I didn't need to modify my system disk, the disk tool is a great way to initialize or reformat a USB flash drive. I found the interface very easy to use.
![Image of disk utility][13]
I was also impressed with the Geany integrated development environment. I was a bit surprised that a full IDE ran so well on an older system. Geany advertises itself as a “powerful, stable and lightweight programmer's text editor that provides tons of useful features without bogging down your workflow.” And that's exactly what Geany provided.
I started a simple “hello world” program to test out Geany, and was pleased to see that the IDE popped up syntax help as I typed each function name. The pop-up message is unobtrusive and provides just enough syntax information where I need it. While the `printf` function is easy for me to remember, I always forget the order of options to other functions like `fputs` and `realloc`. This is where I need the pop-up syntax help.
![Image of Geany workspace][14]
Explore the menus in Xfce to find other applications to make your work easier. You'll find apps to play music, access the terminal, or browse the web.
While I installed Linux to use my laptop for a few demos at a conference, I found Linux and the Xfce desktop made this old laptop feel quite snappy. The system performed so well that when the conference was over, I decided to keep the laptop around as a second machine.
I just love working in Xfce and using the apps. Despite the low overhead and minimal approach, I don't feel underpowered. I can do everything I need to do using Xfce and the included apps. If you have an older machine that needs new life, try installing Linux to bring new life to old hardware.
Image by: (Jim Hall, CC BY-SA 40)
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/6/linux-xfce-old-laptop
作者:[Jim Hall][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/jim-hall
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png
[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://spins.fedoraproject.org/xfce/download/index.html
[5]: https://opensource.com/article/19/12/xfce-linux-desktop
[6]: https://opensource.com/sites/default/files/2022-06/Linuxlaptop1.png
[7]: https://opensource.com/sites/default/files/2022-06/linuxlaptopDesktopApps.png
[8]: https://opensource.com/article/20/3/personal-file-server-ssh
[9]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopThunarremote.png
[10]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopDesk.png
[11]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopMousepadfiletype.png
[12]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopmousepadsolarized.png
[13]: https://opensource.com/sites/default/files/2022-06/linuxlaptopdisks.png
[14]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopgeany.png

View File

@ -0,0 +1,137 @@
[#]: subject: "Rufus for Linux? Here Are the Best Live USB Creating Tools"
[#]: via: "https://itsfoss.com/live-usb-creator-linux/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Rufus for Linux? Here Are the Best Live USB Creating Tools
======
Rufus is an open-source utility to create bootable USB drives. It is straightforward to use, with available options to tweak as per your requirements. Not just the ease of use, it is also incredibly fast to make bootable USB drives.
Unfortunately, Rufus is not available for Linux, it is only exclusive to Windows. So, most of us who have used it on Windows, look for Rufus alternatives on Linux.
If you are in the same boat, fret not, we have some excellent alternatives for various use-cases.
Let us explore some Rufus alternatives for Linux:
### 6 Best Live USB Creation Tools for Linux
All the options listed are entirely open-source and work perfectly fine with Linux distributions.
**Note:** *The list is in no particular order of ranking.*
#### 1. BalenaEtcher
![balena etcher 2022][1]
BalenaEtcher or Etcher is a good option for multiple platforms (Windows, macOS), including Linux users.
You do not get any advanced options here. Hence, it is pleasantly easy to use. Simply select the ISO (image file) and proceed to flash it on the target USB drive.
It is completely open-source and validates your drive after the process. Furthermore, it auto-selects connected USB drives to avoid choosing any hard disk if you accidentally wipe it.
You can refer to our [handy guide][2] to install it on Linux.
[BalenaEtcher][3]
#### 2. Fedora Media Writer
![fedora media writer][4]
Fedora Media Writer is particularly known to help you create live USB for Fedora Linux distribution. It can download the ISO file for you if you do not have it already.
It is also an excellent utility to fix your USB drive if you cannot format it for an issue caused by other bootable USB creation tools.
Fret not, you can also select a custom image (apart from Fedora Linux) to create a bootable USB.
You can find the [Flatpak][5] package on Flathub for the latest version on any Linux distribution. Refer to our [Flatpak guide][6] if youre new to this.
[Fedora Media Writer][7]
#### 3. Startup Disk Creator
![startup disk creator][8]
If you are using Ubuntu on your system, you already have a bootable USB creator pre-installed, i.e., Startup Disk Creator.
You can use it to select the desired ISO file (preferably any Ubuntu version) and choose the target USB device to proceed.
Once you confirm the action, it will proceed with writing the data to complete the bootable drive.
#### 4. SUSE Studio Imagewriter
![imagewriter suse][9]
SUSE Studio Imagewriter is a simple live USB creator.
I did not find it in the software center for Ubuntu, but it was available in the community repositories (Manjaro) and AUR. So, you can take a look at it if it is available for your Linux distribution.
[SUSE Studio Imagewriter][10]
#### 5. UNetbootin
![unetbootin][11]
UNetbootin is a live USB creator that supports Linux, Windows, and macOS. You get a few options to tweak, in case you want to explore all the available drives, and can also select a distribution to download the ISO file automatically.
It is not specific for any Linux distribution, unlike some options above. So, it supports a wide variety of distributions and system utilities.
[UNetbootin][12]
#### 6. Ventoy
![ventoy screenshot 2022][13]
Ventoy is an interesting bootable USB solution that lets you simply copy-paste the image to create a live USB drive.
You only have to install Ventoy to the USB drive, which makes two separate partitions. One of the partitions is used to store ISO images that you can simply paste into the USB drive to make it bootable.
Interestingly, you can also use it to [create multiboot USB][14].
It is available for Windows and Linux.
[Ventoy][15]
### Wrapping Up
Ventoy seems like an exciting choice among the options above if you need multiple Linux distributions on your USB drive without needing to repeatedly flash it.
For simplicity, distro-specific tools can be a good pick, like Startup Disk Creator for Ubuntu, and Fedora Image Writer for Fedora Linux.
SUSE Image Studio is an interesting option, but may not be the most convenient one.
If you do not have any specific preferences, BalenaEtcher should be a straightforward option, with UNetbootin as a suitable alternative to it.
What do you prefer to create a bootable USB drive? Let me know your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/live-usb-creator-linux/
作者:[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://itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/wp-content/uploads/2022/06/balena-etcher-2022-800x537.png
[2]: https://itsfoss.com/install-etcher-linux/
[3]: https://www.balena.io/etcher/
[4]: https://itsfoss.com/wp-content/uploads/2022/06/fedora-media-writer.png
[5]: https://itsfoss.com/what-is-flatpak/
[6]: https://itsfoss.com/flatpak-guide/
[7]: https://flathub.org/apps/details/org.fedoraproject.MediaWriter
[8]: https://itsfoss.com/wp-content/uploads/2022/06/startup-disk-creator.png
[9]: https://itsfoss.com/wp-content/uploads/2022/06/imagewriter-suse.png
[10]: https://software.opensuse.org/package/imagewriter
[11]: https://itsfoss.com/wp-content/uploads/2022/06/unetbootin.png
[12]: https://unetbootin.github.io/
[13]: https://itsfoss.com/wp-content/uploads/2022/06/ventoy-screenshot-2022.png
[14]: https://itsfoss.com/multiple-linux-one-usb/
[15]: https://www.ventoy.net/

View File

@ -0,0 +1,154 @@
[#]: subject: "Using Ansible to automate software installation on my Mac"
[#]: via: "https://opensource.com/article/22/6/install-software-macos-ansible-homebrew"
[#]: author: "Servesha Dudhgaonkar https://opensource.com/users/serveshadudhgaonkar"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Using Ansible to automate software installation on my Mac
======
In this demo, I install one of my must-have writing tools, Asciidoctor, on macOS using Ansible.
![Getting started with Perlbrew][1]
Image by: freephotocc via Pixabay CC0
On most systems, there are several ways to install software. Which one you use depends on the source of the application you're installing. Some software comes as a downloadable wizard to walk you through an install process, while others are files you just download and run immediately.
On macOS, a whole library of open source applications is available from Unix commands like [Homebrew][2] and [MacPorts][3]. The advantage of using commands for software installation is that you can automate them, and my favorite tool for automation is Ansible. Combining Ansible with Homebrew is an efficient and reproducible way to install your favorite open source applications.
This article demonstrates how to install one of my must-have writing tools, Asciidoctor, on macOS using Ansible. Asciidoctor is an open source text processor, meaning that it takes text written in a specific format (in this case, Asciidoc) and transforms it into other popular formats (such as HTML, PDF, and so on) for publishing. Ansible is an open source, agentless, and easy-to-understand automation tool. By using Ansible, you can simplify and automate your day-to-day tasks.
Note: While this example uses macOS, the information applies to all kinds of open source software on all platforms compatible with Ansible (including Linux, Windows, Mac, and BSD).
### Installing Ansible
You can install Ansible using `pip`, the Python package manager. First, install `pip` :
```
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python ./get-pip.py
```
Next, install Ansible using `pip` :
```
$ sudo python -m pip install --user ansible
```
#### Installing Ansible using Homebrew
Alternately, you can install Ansible using the [Homebrew package manager][4]. If you've already installed Ansible with `pip`, skip this step because you've already achieved the same result!
```
$ brew install ansible
```
### Configuring Ansible
To set up Ansible, you first must create an inventory file specifying which computer or computers you want your Ansible script (called a playbook) to operate on.
Create an inventory file in a terminal or using your favorite text editor. In a terminal, type the following, replacing `your-host-name` with the name of your computer:
```
$ cat << EOF >> inventory
[localhost\]
your-host-name
EOF
```
If you don't know your computer's hostname, you can get it using the `hostname` command. Alternately, go to the Apple menu, open System Preferences, then click Sharing. Your computer's hostname is beneath the computer name at the top of Sharing preference pane.
### Installing Asciidoctor using Ansible
In this example, I'm only installing applications on the computer I'm working on, which is also known by the term localhost. To start, create a `playbook.yml` file and copy the following content:
```
- name: Install software
hosts: localhost
become: false
vars:
Brew_packages:
- asciidoctor
install_homebrew_if_missing: false
```
In the first [YAML sequence][5], you name the playbook (`Install software` ), provide the target (`localhost` ), and confirm that administrative privileges are not required. You also create two variables that you can use later in the playbook: `Brew_packages` and`install_homebrew_if_missing`.
Next, create a YAML mapping called `pre_tasks`, containing the logic to ensure that Homebrew itself is installed on the computer where you're running the playbook. Normally, Ansible can verify whether an application is installed or not, but when that application is the package manager that helps Ansible make that determination in the first place, you have to do it manually:
```
pre_tasks:
- name: Ensuring Homebrew Is Installed
stat:
path: /usr/local/bin/brew
register: homebrew_check
- name: Fail If Homebrew Is Not Installed and install_homebrew_if_missing Is False
fail:
msg: Homebrew is missing, install from http://brew.sh
when:
- not homebrew_check.stat.exists
- not install_homebrew_if_missing
- name: Installing Homebrew
shell: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
when:
  - not homebrew_check.stat.exists
- install_homebrew_if_missing
```
Finally, create a YAML mapping called `tasks` containing a call to the Homebrew module (it's a built-in module from Ansible) to install Asciidoctor in the event that it's not already present:
```
tasks:
- name: Install Asciidoctor
homebrew:
name: asciidoctor
state: present
```
### Running an Ansible playbook
You run an Ansible playbook using the `ansible-playbook` command:
```
$ ansible-playbook -i inventory playbook.yml
```
The `-i` option specifies the `inventory` file you created when setting up Ansible. You can optionally add `-vvvv` to direct Ansible to be extra verbose when running the playbook, which can be useful when troubleshooting.
After the playbook has run, verify that Ansible has successfully installed Asciidoctor on your host:
```
$ asciidoctor -v
Asciidoctor X.Y.Z https://asciidoctor.org
Runtime Environment (ruby 2.6.8p205 (2021-07-07 revision 67951)...
```
### Adapt for automation
You can add more software to the `Brew_packages` variable in this article's example playbook. As long as there's a Homebrew package available, Ansible installs it. Ansible only takes action when required, so you can leave all the packages you install in the playbook, effectively building a manifest of all the packages you have come to expect on your computer.
Should you find yourself on a different computer, perhaps because you're at work or you've purchased a new one, you can quickly install all the same applications in one go. Better still, should you switch to Linux, the Ansible playbook is still valid either by using Homebrew for Linux or by making a few simple updates to switch to a different package manager.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/6/install-software-macos-ansible-homebrew
作者:[Servesha Dudhgaonkar][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/serveshadudhgaonkar
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/coffee_cafe_brew_laptop_desktop.jpg
[2]: https://opensource.com/article/20/6/homebrew-mac
[3]: https://opensource.com/article/20/11/macports
[4]: https://opensource.com/article/20/6/homebrew-mac
[5]: https://www.redhat.com/sysadmin/yaml-beginners

View File

@ -0,0 +1,95 @@
[#]: subject: "WiFi 6 Promises Much More than Faster Speeds"
[#]: via: "https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/"
[#]: author: "Sharon Katta https://www.opensourceforu.com/author/sharon-katta/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
WiFi 6 Promises Much More than Faster Speeds
======
WiFi 6 increases the network connectivity, and has been developed to ensure the trillions of devices connected in the near future continue to work seamlessly and efficiently. Though it was certified in 2019, it faced a few challenges in testing due to the pandemic. This article gives an overview of this technology.
![WiFi-6][1]
The next-generation standard in WiFi technology, termed WiFi 6, is also known as AX WiFi or 802.11ax. Developed to meet the exponential increase in demand for devices in the world, it can be used for virtual reality (VR) and smart home devices as well. It is an improvement on the current 802.11ac WiFi standard and meets current challenges in terms of capacity, efficiency, coverage and performance.
![Figure 1: WiFi 6][2]
Researched in 2014, this standard was invented in 2018 and launched by the IEEE High Efficiency WLAN Study Group (HEW SG). It began certifications in late 2019, with Samsungs Galaxy Note 10 and Ruckus R750 employing this technology. Specified to operate between the 1GHz and 6GHz bands, WiFi 6 focuses mainly between the 2.4GHz and 5GHz frequencies.
In an average household today, nine devices are connected to WiFi. WiFi 6 aims at improving the network rather than boosting the speed for individual devices.
### Features of WiFi 6
**Multi-user, multi-input, multi-output (MU-MIMO):** This communication between routers and multiple devices concurrently. It supports four simultaneous data streams, added to which one user can have a considerable bandwidth of incoming data from a smart router, both on the 2.4GHz and 5GHz frequencies.
**1024-QAM:** This helps WiFi 6 encode more bits per packet. There is a 25 per cent increase in throughput. Not only does it improve efficiency in high-traffic situations, it also maximises data rates. This is a huge advantage for modern enterprise applications.
**Orthogonal frequency-division multiplexing (OFDM):** This allows four times as many subcarriers and increases speed by 11 per cent. The expanded signal allows for greater simultaneous packet delivery across users. Hence, the wait time between packets and latency is reduced.
*Increased channel width:* The 160MHz channel communication is added to the 80MHz band, thus doubling the channel width. This allows routers to handle more users and provide larger streams per user.
*Target wake time (TWT):* This feature is unique to WiFi 6. It allows each device to independently negotiate wake time for transmission and reception. This helps to increase total sleep time and maximise battery life. TWT enables many additional networking options, especially for IoT devices.
*Improved security:* All WiFi 6 devices will need to include Wi-Fi Protected Access 3 (WPA3). This will lead to encryption of unauthenticated traffic, robust password protection against brute-force dictionary attacks, and superior data reliability for sensitive information with 192-bit encryption.
*Beamforming:* With eight support antennas, beamforming helps to improve data rates, and the range is extended by directing signals towards specific clients at once. It offers a backup for rapidly moving devices that may face issues with MU-MIMO. Beamforming also helps to control transmissions from antennas that cause signals to interfere on purpose. The signal can then be redirected to a new direction.
### Devices that support WiFi 6
Until recently, WiFi 5 was the standard used for routers, repeaters, mesh networks and many WiFi clients. WiFi 6 was launched in 2019. There will be some compatibility issues for the earlier devices that supported WiFi 5 — they will be able to utilise the WiFi 6 network but not be able to receive support for the same.
WiFi 6 routers are backward-compatible, and it is better to make sure that the network is ready for that.
WiFi 6 enables lower battery consumption, making it a great choice for any environment, including the Internet of Things (IoT). It reduces unnecessary data activity, and tells devices when to put their data to sleep and when to be active. As a result, unnecessary data activity is reduced, and performance and battery life are maximised.
The Samsung Galaxy Note 10 and Ruckus R750 were the worlds first smartphone and access point certified to support Wi-Fi 6, with the latest generation of the Apple iPhone following suit. The Wi-Fi Alliance has set up its certification programme, and new wireless products hitting the market are expected to start applying for compliance certification. The devices listed below are already WiFi 6 enabled:
* iPhone 11 and after
* Samsung Galaxy S10, S20, Note 10, and Note 20
* Apple computers with M1 processors
* Smart TVs
> To take advantage of the improvements in the 802.11ax standard fully, both hardware and software functionalities have to be built on this WiFi technology.
### Hardware testing
To unlock the full potential of the latest devices, a WiFi 6 router is needed to run the network. This was an expensive affair a few years ago, but now we have a number of options even for mesh systems, gaming routers, range extenders, and more. The best purchase can be made only when hands-on testing is done. Beating all its competitors, the current king in terms of speed for WiFi 6 routers is TP-Link Archer AX6000. This router was able to transmit data wirelessly at a rate of 1523 Mbps up to a distance of 1.5 metres (5 feet).
One important thing to remember here is that these routers do not magically increase speeds. The theoretical maximum of achieving 9.6 Gbps is unlikely. This high theoretical speed can be split up across a whole network of devices.
WiFi 6 emphasises quality connectivity in areas where connected devices are densely populated. It does not increase the speed of each device exponentially but ensures these operate at an optimum level.
Only the combination of a faster plan from the Internet service providers (ISPs) along with the WiFi 6 router, can fulfil its true potential. The real challenge is for the ISPs, as they need new fibre rollouts to capitalise on this next-gen technology. An important question is: when faster ISP speeds come, will the existing hardware become redundant?
### Applications of WiFi 6
**Large public venues (LPVs):** Stadiums and convention centres are a few of the common areas where thousands of devices connect to WiFi at the same time. WiFi 6 can help to improve attendee experiences, increase customer interactions, and create value-added services like viewing instant replays or ordering food from ones seat at an event. WiFi 6 allows LPV owners to create new business opportunities.
**Transport hubs:** Public transport stations are also an area where people attempt to connect to the network simultaneously. OFDMA and BSS colouring in WiFi 6 provide the necessary tools needed to overcome this challenge.
**IoT and smart city deployments:** Power efficiencies in WiFi 6 enable IoT devices to go into sleep mode and turn on their transmitters at predefined intervals to prolong field time without much maintenance.
**Education:** Libraries, auditoriums, and lecture halls at college and university campuses have the highest density of WiFi users during the day, and almost no one at night. WiFi 6 is a perfect choice in this situation.
### The challenges
WiFi 6 does not promise an increase in speed, but is an upgrade designed to make sure the speeds of our devices within a given range/area doesnt slow down a few years down the road. There are three major challenges it faces though, which are often overlooked.
Improving the functionality of unsupported devices: Even though WiFi 6 is backward- compatible, justice to it can only be done when this technology is used to the maximum. This means devices need to be upgraded each time.
Speed and performance outside the internal network: WiFi 6 can provide excellent connectivity for services like cloud file shares. However, the assets and resources of ISPs can affect speed and performance.
*Coverage issues:* Transmission and bandwidths are capped according to the regulations prevalent in each country. Hence, the coverage of WiFi 6 may be restricted to ensure this cap is met.
In spite of these challenges, companies like Aruba, Asus, AT&T, Boingo, Broadcom, Cisco, Comcast, CommScope, Cypress, Extreme Networks, Intel, Netgear, Orange, Qualcomm, TP-Link and Xiaomi are all focusing on the potential WiFi 6 has.
LCTT 译注:选题删除了原文中的相关产品推荐部分。)
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/
作者:[Sharon Katta][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/sharon-katta/
[b]: https://github.com/lkxed
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6.jpg
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6-1.jpg

View File

@ -0,0 +1,137 @@
[#]: subject: "A guide to container orchestration with Kubernetes"
[#]: via: "https://opensource.com/article/22/6/container-orchestration-kubernetes"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
A guide to container orchestration with Kubernetes
======
To learn all about container orchestration with Kubernetes, download our new eBook.
![CC-BY-SA William Kenlon http://www.williamkenlon.com][1]
Image by: William Kenlon. CC BY-SA 4.0
The term orchestration is relatively new to the IT industry, and it still has nuance that eludes or confuses people who don't spend all day orchestrating. When I describe orchestration to someone, it usually sounds like I'm just describing automation. That's not quite right. In fact, I wrote a whole article differentiating [automation and orchestration][2].
An easy way to think about it is that orchestration is just a form of automation. To understand how you can benefit from orchestration, it helps to understand what specifically it automates.
### Understanding containers
A container is an image of a file system containing only what's required to run a specific task. Most people don't build containers from scratch, although reading about [how it's done][3] can be elucidating. Instead, it's more common to pull an existing image from a public container hub.
A container engine is an application that runs a container. When a container is run, it's launched with a kernel mechanism called a `cgroup`, which keeps processes within the container separate from processes running outside the container.
### Run a container
You can run a container on your own Linux computer easily with [Podman][4], [Docker][5], or [LXC][6]. They all use similar commands. I recommend Podman, as it's daemonless, meaning a process doesn't have to be running all the time for a container to launch. With Podman, your container engine runs only when necessary. Assuming you have a container engine installed, you can run a container just by referring to a container image you know to exist on a public container hub.
For instance, to run an Nginx web server:
```
$ podman run -p 8080:80 nginx
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
[...]
```
Open a separate terminal to test it using [curl][7]:
```
$ curl --no-progress-meter localhost:8080 | html2text
# Welcome to nginx!
If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.
For online documentation and support please refer to
[nginx.org](http://nginx.org/).  
Commercial support is available at [nginx.com](http://nginx.com/).
_Thank you for using nginx._
```
As web server installs go, that's pretty easy.
Now imagine that the website you've just deployed gets an unexpected spike in traffic. You hadn't planned for that, and even though Nginx is a very resilient web server, everything has its limits. With enough simultaneous traffic, even Nginx can crash. Now what?
### Sustaining containers
Containers are cheap. In other words, as you've just experienced, they're trivial to launch.
You can use systemd to make a container resilient, too, so that a container automatically relaunches even in the event of a crash. This is where using Podman comes in handy. Podman has a command to generate a systemd service file based on an existing container:
```
$ podman create --name mynginx -p 8080:80 nginx
$ podman generate systemd mynginx \
--restart-policy=always -t 5 -f -n
```
You can launch your container service as a regular user:
```
$ mkdir -p ~/.config/systemd/user
$ mv ./container-mynginx.service ~/.config/systemd/user/
$ systemctl enable --now --user container-mynginx.service
$ curl --head localhost:8080 | head -n1
HTTP/1.1 200 OK
```
### Run pods of containers
Because containers are cheap, you can readily launch more than one container to meet the demand for your service. With two (or more) containers offering the same service, you increase the likelihood that better distribution of labor will successfully manage incoming requests.
You can group containers together in pods, which Podman (as its name suggests) can create:
```
$ systemctl stop --user container-myngnix
$ podman run -dt --pod new:mypod -p 8080:80 nginx
$ podman pod ps
POD ID     NAME   STATUS  CREATED  INFRA ID  # OF CONTAINERS
26424cc... mypod  Running 22m ago  e25b3...   2
```
This can also be automated using systemd:
```
$ podman generate systemd mypod \
--restart-policy=always -t 5 -f -n
```
### Clusters of pods and containers
It's probably clear that containers offer diverse options for how you deploy networked applications and services, especially when you use the right tools to manage them. Both Podman and systemd integrate with containers very effectively, and they can help ensure that your containers are available when they're needed.
But you don't really want to sit in front of your servers all day and all night just so you can manually add containers to pods any time the whole internet decides to pay you a visit. Even if you could do that, containers are only as robust as the computer they run on. Eventually, containers running on a single server do exhaust that server's bandwidth and memory.
The solution is a Kubernetes cluster: lots of servers, with one acting as a "control plane" where all configuration is entered and many, many others acting as compute nodes to ensure your containers have all the resources they need. Kubernetes is a big project, and there are many other projects, like [Terraform][8], [Helm][9], and [Ansible][10], that interface with Kubernetes to make common tasks scriptable and easy. It's an important topic for all levels of systems administrators, architects, and developers.
To learn all about container orchestration with Kubernetes, download our free eBook: **[A guide to orchestration with Kubernetes][11]**. The guide teaches you how to set up a local virtual cluster, deploy an application, set up a graphical interface, understand the YAML files used to configure Kubernetes, and more.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/6/container-orchestration-kubernetes
作者:[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://opensource.com/sites/default/files/lead-images/kenlon-music-conducting-orchestra.png
[2]: https://opensource.com/article/20/11/orchestration-vs-automation
[3]: https://opensource.com/article/22/2/build-your-own-container-linux-buildah
[4]: https://opensource.com/article/18/12/podman-and-user-namespaces
[5]: https://opensource.com/business/14/8/docker-beginner-guide
[6]: https://opensource.com/article/18/11/behind-scenes-linux-containers
[7]: https://opensource.com/article/20/5/curl-cheat-sheet
[8]: https://opensource.com/article/20/7/terraform-kubernetes
[9]: https://opensource.com/article/20/3/helm-kubernetes-charts
[10]: https://opensource.com/article/22/1/learn-ansible
[11]: https://opensource.com/downloads/guide-orchestration-kubernetes

View File

@ -0,0 +1,90 @@
[#]: subject: "Edit PDFs on Linux with these open source tools"
[#]: via: "https://opensource.com/article/22/6/open-source-pdf-editors-linux"
[#]: author: "Michael Korotaev https://opensource.com/users/michaelk"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Edit PDFs on Linux with these open source tools
======
Open source alternatives to Adobe Acrobat have all the necessary features for creating, editing, and annotating PDFs.
![a checklist for a team][1]
Image by: Opensource.com
Open source reading and editing tools for PDFs are often more secure and reliable alternatives to the applications residing in the first pages of "PDF editor" search results. There, you're likely to see proprietary applications with hidden limitations and tariffs, lacking sufficient information about data protection policies and hosting. You can have better.
Here are five applications that can be installed on your Linux system (and others) or hosted on a server. Each is free and open source, with all the necessary features for creating, editing, and annotating PDF files.
### LibreOffice
With the [LibreOffice][2] suite, your choice of application depends on the initial task. While LibreOffice Writer, a word processor, lets you create PDF files with export from text formats like ODF and others, Draw is better for working with existing PDF files.
Draw is meant for creating and editing graphic documents, such as brochures, magazines, and posters. The toolset is therefore mainly focused on visual objects and layouts. For PDF editing, however, LibreOffice Draw offers tools for modifying and adding content in PDFs when the file has editing attributes. You can still add new text fields on the existing content layers and annotate or finish the documents if it doesn't.
Draw and Writer are both bundled in a LibreOffice desktop suite available for installation on Linux systems, macOS, and Windows.
### ONLYOFFICE Docs
ONLYOFFICE has been improving work with PDFs for a while and introduced a brand new reader for PDFs and eBooks in version 7.1 of [ONLYOFFICE Docs][3].
The document editor allows creating PDF files from scratch using DOCX as a base for files that can then be converted to PDF or PDF/A. With built-in form-creation functionality, ONLYOFFICE Docs also makes it possible to build fillable document templates and export them as editable PDFs with fillable fields for different types of content: text, images, dates, and more.
In addition to recognizing text within PDFs to copy and extract it, ONLYOFFICE Docs can convert PDFs to DOCX, which allows you to continue using the documents in fully editable text formats. ONLYOFFICE also lets you secure the files with passwords, add watermarks, and use digital signatures available in the desktop version.
ONLYOFFICE Docs can be used as a web suite (on-premises or in the cloud) integrated into a document management system (DMS) or as a standalone desktop application. You can install the latter as a DEB or RPM file, AppImage, Flatpack, and several other formats for Linux.
### PDF Arranger
[PDF Arranger][4] is a front-end application for the PikePDF library. It doesn't edit the content of a PDF the way LibreOffice and ONLYOFFICE do, but it's great for re-ordering pages, splitting a PDF into smaller documents, merging several PDFs into one, rotating or cropping pages, and so on. Its interface is intuitive and easy to use.
PDF Arranger is available for Linux and Windows.
### Okular
[Okular][5] is a free open source viewer for documents developed by the KDE community. The app features very mature functionality and allows viewing PDFs, eBooks, images, and comics.
Okular has full or partial support for most popular PDF features and use cases, such as adding annotations and inline notes or inserting text boxes, shapes, and stamps. You can also add a digitally encrypted signature to your document so your readers can be sure of the document's source.
In addition to adding texts and images in PDFs, it's also possible to retrieve them from the document to copy and paste somewhere else. The Area Selection tool in Okular can identify the components within a selected area so you can extract them from the PDF independently of one another.
You can install Okular using your distribution's package manager or as a Flatpak.
### Xournal++
[Xournal++][6] is a handwriting journal software with annotation tools for PDF files.
Created to be notetaking software with enhanced handwriting features, it may not be the best option for working with text-based content and professional layouts. However, its ability to render graphics and support for stylus input in writing and drawing make it stand out as a niche productivity tool.
PDF annotation and sketching are made comfortable with layer management tools, customizable pen point settings, and support for stylus mappings. Xournal++ also has a text tool for adding text boxes and the ability to insert images.
Xournal++ has installation options for Linux systems (Ubuntu, Debian, Arch, SUSE), macOS, and Windows (10 and above).
### Summary
If you're looking for a free and safe alternative to proprietary PDF viewing and editing software, it is not hard to find an open source option, whether for desktop or online use. Just keep in mind that the currently available solutions have their own advantages for different use cases, and there's no single tool that is equally great at all possible tasks.
These five solutions stand out for their functionality or usefulness for niche PDF tasks. For enterprise use and collaboration, I suggest ONLYOFFICE or LibreOffice Draw. PDF Arranger is a simple, lightweight tool for working with pages when you don't need to alter text. Okular offers great viewer features for multiple file types, and Xournal++ is the best choice if you want to sketch and take notes in your PDFs.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/6/open-source-pdf-editors-linux
作者:[Michael Korotaev][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/michaelk
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/checklist_hands_team_collaboration.png
[2]: https://opensource.com/article/21/9/libreoffice-tips
[3]: https://opensource.com/article/20/12/onlyoffice-docs
[4]: https://flathub.org/apps/details/com.github.jeromerobert.pdfarranger
[5]: https://opensource.com/article/22/4/linux-kde-eco-certification-okular
[6]: http://xournal.sourceforge.net/

View File

@ -0,0 +1,103 @@
[#]: subject: "Linux Kernel 5.19 系列第一个候选版本RC1发布包含 ARM 通用工作"
[#]: via: "https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " Donkey-Hao "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Kernel 5.19 系列第一个候选版本RC1发布包含 ARM 通用工作
======
Linus Torvalds 发布了 Linux Kernel 5.19 RC1 进行测试,带来了重大变化。
继上个月 [Linux Kernel 5.18][1] 发布之后Linus Torvalds 宣布 Linux Kernel 5.19 系列第一个候选版本可用。同时Linux Kernel 5.19 官方合并窗口关闭,这意味着只有很关键的特性才会被接受。
简要介绍一下 Linux Kernel 5.19 的项目,会发现 CPU、GPU、网络、存储和核心模块会定期更新。 此外,代码清理、淘汰过时硬件和对以后芯片组的持续支持是此版本的亮点。
让我们简单来看一下这些新特性。
### Linux Kernel 5.19(RC1) 的新特性
#### 处理器
最重要的是Linux Kernel 5.19 开始对龙芯架构 CPU 的 [初步支持][2]。龙芯由中国龙芯中科公司设计开发。龙芯架构下的 CPU 是通用 MIPS 架构兼容微处理器。尽管现在提供了支持,但是你仍不能在龙芯 CPU 上启动 Linux 因为一些代码还在审核中。希望在 5.20 版本中能够使用。
[Intel IFS 驱动 ][4] 在该版本中落地,这有助于在部署前后发现硬件问题。它能够在早期发现 CPU 关键部分的错误。
电源管理和散热工作在英特尔 CPU 的最后几个内核版本中继续进行。 在 [这个版本][5] 也不例外。首先,为 Raptor 和 Alder Lake 家族添加了英特尔运行时平均功率限制RAPL的支持。其次为了处理频率变化升级了 P-state 驱动,并且基于 CPU 的缩放支持被添加到被动的 devfreq 中。
虽然散热和供电主导着英特尔 CPU ,但 AMD 看到了自己 CPU 系列更多的性能更新。首先,计划在今年年底完成 ZMD Zen 4 CPUs 的 Instruction-Based Sampling (IBS) 模块的很多更新。此外,此版本引入了 PerfMonV2 ,提供了更多性能监视能力。
此外,该版本中移除了 a.out 支持。同样,过时的 Renesas H8/300 CPU 也被移除了。
#### 主要 ARM 更新
最后,主线 Linux Kernel 能够 [支持多个 ARM 平台][7]。在 Linus 的 RC1 开场白中可以看到,这是此版本中的巨大改变!从 Linux 3.7 开始跨越了十多年的工作,这是多么漫长的过程。
![Linux Kernel 5.19 Rc1 发布公告提到了 ARM 更改][8]
#### 图像和存储升级
存储子系统实现了跨越流行文件系统的性能提升。最主要的变化包括苹果 M1 NVMe 控制器支持和对 XFS 文件系统的更好支持。此外,提升了 Btrfs F2FS 以及 exFAT 文件系统。
关于 LOC 有一个令人兴奋的指标是仅图像驱动程序, Linux Kernel 5.19 增加了大约[50 万行代码][9] 。包括 AMD RDNA, CDNA, 英特尔的 Raptor Lake, DG2/Alchemist 等图形架构更新。
#### 重要的网络变化
鉴于数据传输大幅增长,对 Big TCP 的支持有助于数据中心流量达到 400 GBit 的范围。它还可以在高性能网络环境中降低延迟。
继续改进了 Multi-Path TCP (MPTCP) 。此外,高通 ath11k WiFi 驱动程序在此版本中添加了网络唤醒功能。同样增加了对瑞昱的 8852ce 芯片,联发科的 T700 调制解调器以及瑞萨科技的 RZ/V2M 的支持。
#### 其他值得注意的功能
首先,内核中著名的随机函数生成器在此版本中 [继续][10] 改进。
其次,著名的初创公司 Framework 模块化笔记本电脑获得了此版本 Chrome OS EC 驱动支持。 Framework 笔记本现在可以利用 ChromeOS 的嵌入式控制器作为 non-Chromebook 设备。
此外, Wacom 绘画板以及其他相关设备也有众多更新。 [包括][11] 对联想 Thinkpad TrackPoint II, 谷歌 Whiskers Touchpad, 联想 X12 TrackPoint 等设备支持的提升。
### Linux Kernel 5.19 下载
如果你想要测试并尝试该候选版本,可以在 [这里][12] 下载。或者参考下面的链接。
| - | - | - | - | - | - | - | - | - |
| :- | :- | :- | :- | :- | :- | :- | :- | :- |
| mainline: | 5.19-rc1 | 2022-06-06 | [tarball][13] | | [patch][14] | | [view diff][15] | [browse][16] |
预计在2022年7月左右最终版本发布前将会有多个版本更迭。
*[Kernel 邮件列表.][17]*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[Donkey-Hao](https://github.com/Donkey-Hao)
校对:[校对者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/2022/05/linux-kernel-5-18/
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6f2f3e2c80e975804360665d973211e4d9390cb
[3]: http://www.loongson.cn/
[4]: https://lore.kernel.org/lkml/13e61c61-0d4b-5f48-6373-f056bf8b603f@redhat.com/
[5]: https://lore.kernel.org/linux-acpi/CAJZ5v0hKBt3js65w18iKxzWoN5QuEc84_2xcM6paSv-ZHwe3Rw@mail.gmail.com/
[6]: https://lore.kernel.org/lkml/You6yGPUttvBcg8s@gmail.com/
[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ecf0aa5317b0ad6bb015128a5b763c954fd58708
[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Linux-Kernel-5.19-Rc1-release-announcement-mentions-ARM-changes.jpg
[9]: https://lore.kernel.org/lkml/CAPM=9tw62EZfAm0PbiOPmMrpfR98QMFTWGEQcA34G4ap4xxNkA@mail.gmail.com/
[10]: https://lore.kernel.org/lkml/20220522214457.37108-1-Jason@zx2c4.com/T/#u
[11]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2205241107530.28985@cbobk.fhfr.pm/
[12]: https://www.kernel.org/
[13]: https://git.kernel.org/torvalds/t/linux-5.19-rc1.tar.gz
[14]: https://git.kernel.org/torvalds/p/v5.19-rc1/v5.18
[15]: https://git.kernel.org/torvalds/ds/v5.19-rc1/v5.18
[16]: https://git.kernel.org/torvalds/h/v5.19-rc1
[17]: https://lore.kernel.org/lkml/CAHk-=wgZt-YDSKfdyES2p6A_KJoG8DwQ0mb9CeS8jZYp+0Y2Rw@mail.gmail.com/T/#u

View File

@ -0,0 +1,99 @@
[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More"
[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "robsean"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
openSUSE Leap 15.4 发布版本添加了 Leap Micro 5.2、更新桌面环境等等
======
为奋起直追 SUSE Linux Enterprise 的 Service Pack 4 openSUSE Leap 15.4 到来了,带来了新的升级和极其重要的改善。
![opensuse 15.4][1]
即将到来的 openSUSE 小发布版本终于要来了。如果你使用 OpenSUSE 作为你日常驱动的桌面或服务器版本,你现在可能已经测试候选版本好几周了。
openSUSE Leap 15.4 专注于软件包的更新,用以奋起直追 SUSE Linux Enterprise 的 Service Pack 4 。因此,你将注意到一些弃用的软件包,以及可用于替换它们的新的升级。
当然,你应该有一些可用的软件包来确保兼容性。但是,大多数较旧的版本已经被移除。
### openSUSE Leap 15.4: 有什么新的变化?
为与最新的 SUSE Linux Enterprise (SLE) 相适应,像 Python 2 和 KDE 4 一样的软件包已经被移除。你可以在这次的发布版本中找到较新的桌面环境。
此外,在容器和 AI/ML 用例方面,更新 podman、containerd、Tensorflow 和 Grafana。
#### Leap Micro 5.2
Leap Micro 是针对容器和虚拟化工作负载定制的轻量级操作系统的最新版本。它也是一个针对 leap 的 [MicroOS][2] 的新作品,它是 Tumbleweed 的一种变体, 提供自动地管理和修补。
#### 桌面环境
Xfce 4.16 继续保留,但是你可以找到下一个主要版本中的一些的特色功能,包括新图标和调色板。
在 Xfce 4.16 中的设置管理器也获得了视觉上的刷新。类似地,文件管理器 (Thunar) 也有一些改善,暗黑模式支持一个新的状态托盘插件等等。
KDE 4 软件包已经被弃用Plasma 5.24 LTS 已经包含在一个 LTS 发布版本中。
为探索这些更改,你可以查看我们针对 [KDE Plasma 5.24 LTS][3] 的原始的新闻报道。总得来说,新的 KDE Plasma 体验应该会令桌面用户赞叹。
当它来到 GNOME 时,你可以发现包含在 openSUSE Leap 15.4 中的 GNOME 41 带来了一系列的改善和新的特色功能。了解更多关于 [GNOME 41][4] 的信息来知道你可以期待哪些新的特色功能。
对于其它的可用的桌面环境来说Leap 15.4 包括:
* MATE 桌面环境 1.26
* Enlightenment 桌面环境0.25.3
* <ruby>深度<rt>Deepin</rt></ruby> 桌面环境 20.3
#### 弃用的软件包
一些极其重要的软件包已经被移除,包括 python 2 (生命终结)、digika、tensorflow 1.x 和 Qt 4 等软件包。
在更新系统后,你将找到可用的 Qt 5 和 Plasma 5 。
#### 更新的软件包
针对 Leap 15.4 更新了很多重要的软件包, 包含一些流行的软件包:
* TensorFlow 2.6.2
* podman 3.4.4
* GNU Health 4.0
* sudo 1.9.9
* systemd 249.10
* AppArmor 3.04
* DNF 4.10.0
* LibreOffice 7.2.5
因此,你应该会注意到一些有用的针对服务器用户和桌面用户的各种各样的应用程序的更新的升级。很多多媒体应用程序,像 VLC、GNOME MPV 等,都接受到了升级。
#### 其它改善
随着极其重要的软件的更新和清理,你也可以找到一个较新的由 SUSE 维护的 Linux 内核 5.14.21 版本。
随着内核的更新,硬件的支持也会带来改善。
更多信息,你可以参考针对 [openSUSE Leap 15.4][5] 的发布版本说明。
[下载 openSUSE Leap 15.4][6]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/opensuse-leap-15-4-release/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[robsean](https://github.com/robsean)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/opensuse-leap-15-4.jpg
[2]: https://microos.opensuse.org/
[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
[4]: https://news.itsfoss.com/gnome-41-release/
[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes
[6]: https://get.opensuse.org/leap/15.4/

View File

@ -1,230 +0,0 @@
[#]: subject: "OOP Before OOP with Simula"
[#]: via: "https://twobithistory.org/2019/01/31/simula.html"
[#]: author: "Two-Bit History https://twobithistory.org"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Simula 诞生之前的面向对象程序设计
======
想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。
2009 年Clojure 的创始人 <ruby>里奇·希基<rt>Rich Hickey</rt></ruby> 发表了[一场精彩的演讲][1],探讨了为什么上文那样的哲学发问会给面向对象程序设计带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:对象是固定不变的。可实际上,许多对象或者说全部对象都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 <ruby>故障<rt>bugs</rt></ruby>
希基总结道,这一难题的应对办法就是人们应该将世界模拟成对固定数据的 _过程_ 的集合,而不是变化着的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。
![][2] _作者在远足途中思考面向对象程序设计的本体论问题。_
自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。
我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_会更有趣一些这我敢打包票。毕竟我们现在熟知的面向对象程序设计在当时还未完全成型。Simula 有两个主要版本Simula I 和 Simula 67。Simula 67 为世界带来了 <ruby><rt>class</rt></ruby><ruby>类的继承<rt>class hierarchy</rt></ruby> 以及 <ruby>虚拟方法<rt>virtual method</rt></ruby>围绕其他的设想Simula I 首次测试了如何能够将数据和过程捆绑起来。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _过程_,而非相互交互的有着隐藏状态的对象。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。
### 从 Simula 0 到 Simula 67
Simula 是由 <ruby>克里斯汀·尼加德<rt>Kristen Nygaard</rt></ruby><ruby>奥利-王五·达尔<rt>Ole-Johan Dahl</rt></ruby> 两位挪威人开发出来的。
20世纪50年代末尼加德受雇于挪威防务科学研究中心该研究中心附属于挪威军方。在那里他负责设计蒙特卡洛模拟方法用于核反应堆设计与操作研究。最初那些模拟实验完全通过人工开展后来实验在 Ferranti Mercury 电脑[1][3] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。
尼加德设计的这种模拟实验就是人们所知的“离散事件模型”,模拟记录了一系列事件随着时间改变系统状态的过程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等”[2][4] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言”或者“蒙特卡洛编译器”的项目[3][5]。
达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[4][6] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展当时也只是打算将其用作预处理程序而已。Simula 0 远不及后来的编程语言复杂,其基本语言结构是“<ruby><rt>stations</rt></ruby>”与“<ruby>乘客<rt>customers</rt></ruby>”,这些结构可以用于针对具体某些离散事件网络建立模型。通过模拟飞机起飞的过程,尼加德和达尔给出了一个例子。[5][7] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“站”和“乘客”,也可以为更广泛的模拟建立模型。这就是后来 Simula 的第一个主要版本,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。
Simula I 没有“<ruby><rt>stations</rt></ruby>”和“<ruby>乘客<rt>customers</rt></ruby>”的语言结构,但它可以通过使用“进程”再现这些结构。一个进程包含大量数据属性,这些属性与作为进程 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()`。不过这种类比并不全面因为每个进程的操作规程都可以随时暂停、随时恢复因为这种操作规程属于协同程序的一种。Simula I 程序会将系统建立为一套进程的模型在概念上这些进程并行运行。实际上一个时间点上能称为“当前进程”的只有一个进程。但是一旦某个进程暂停运行那么下一个进程就会自动接替它的位置。开展模拟实验时Simula 会预留出一份 “<ruby>事件通知<rt>event notices</rt></ruby>” 的时间线跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程Simula 需要记录多个 <ruby>调用栈<rt>call stacks</rt></ruby> 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 <ruby>调用栈<rt>call stacks</rt></ruby>。于是,尼加德和达尔下定决心,开始编写自己的编译器。
尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[6][8] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。这种订单流程的概念被用以例证若干种不同的订单实例,不过这些实例并未调用任何方法。这类程序的主体仅仅是创建进程,并使其运行。
历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后就进入了挪威计算机中心工作Simula I 也是在这里日渐流行起来的。当时Simula I 在 UNIVAC 公司的计算机和Burroughs 公司的 B5500 计算机上均可执行。[7][9] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。
奥斯陆大学教授 <ruby>斯坦因·克罗达尔<rt>Stein Krogdahl</rt></ruby> 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是[一篇题为<ruby>《记录处理》<rt>Record Handling</rt></ruby>的论文][10],作者是英国计算机科学家 <ruby>查尔斯·安东尼·理查德·霍尔<rt>C.A.R. Hoare</rt></ruby>。[8][11] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,如果没有提起霍尔的大名,那绝对是不可能的。以下内容摘自霍尔的《记录处理》一文:
> 该方案设想,在程序执行期间,计算机内部存在任意若干条记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。
> 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。
霍尔在这片论文中并未提到子类的概念,但是达尔非常感谢霍尔,是他引导了两人发现了这一概念。[9][12] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃此时Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[10][13] 不过,考虑到 “Simula”这个名字的知名度已经很高了另取名字恐怕会带来不小的麻烦。
1967年尼加德和达尔与 <ruby>控制数据公司<rt>Control Data</rt></ruby> 签署协议着手开发Simula 的新版本Simula 67。同年六月份的一场会议中来自 <ruby>控制数据公司<rt>Control Data</rt></ruby>、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。
Simula 67 编译器的开发由若干家供应商负责。<ruby>Simula 用户协会<rt>The Association of Simula Users</rt></ruby>ASU也随后成立并于每年举办年会。不久Simula 67 的用户就遍及了23个国家。[11][15]
### 21 世纪的 Simula 语言
人们至今还记得 Simula是因为后来那些取代它的编程语言都受到了它的巨大影响。到了今天你很难找到还在使用 Simula 写程序的人,但是这并不意味着 Simula 已经从这个世界上消失了。得益于 [GNU cim][16],人们在今天依然能够编写和运行 Simula 程序。
cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simula 67 版本。你可以用它编写类、子类以及虚拟方法,就像是在使用 Simula 67 一样。所以,用 Python 或 Ruby 轻松写出短短几行面向对象的程序,你照样也可以用 cim 写出来:
```
! dogs.sim ;
Begin
Class Dog;
! The cim compiler requires virtual procedures to be fully specified ;
Virtual: Procedure bark Is Procedure bark;;
Begin
Procedure bark;
Begin
OutText("Woof!");
OutImage; ! Outputs a newline ;
End;
End;
Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ;
Begin
Procedure bark;
Begin
OutText("Yap yap yap yap yap yap");
OutImage;
End;
End;
Ref (Dog) d;
d :- new Chihuahua; ! :- is the reference assignment operator ;
d.bark;
End;
```
你可以按照下面代码执行程序的编译与运行:
```
$ cim dogs.sim
Compiling dogs.sim:
gcc -g -O2 -c dogs.c
gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim
$ ./dogs
Yap yap yap yap yap yap
```
你可能会注意到cim 先将 Simula 语言编译为 C 语言,然后传递给 C 语言编译器。)
这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。
不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67保留了进程模型不过只有在使用 <ruby>`进程`类<rt>Process class</rt></ruby><ruby>`模拟`块<rt>Simulation block</rt></ruby> 的时候才能调用。
为了表现出进程是如何运行的,我决定对下述场景进行模拟。想象一下,有这么一座村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里多的村民却只有一条鱼竿。有些村民胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。
这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在一天的模拟时间内有着四个村民的村庄里会发生什么。
完整程序可以通过此处 [GitHub Gist][17] 的链接获取。
我把输出结果的最后几行放在了下面。我们来看看一天里最后几个小时发生了什么:
```
1299.45: 王五饿了,要了鱼竿。
1299.45: 王五正在钓鱼。
1311.39: 王五钓到了一条鱼。
1328.96: 赵六饿了,要了鱼竿。
1328.96: 赵六正在钓鱼。
1331.25: 李四饿了,要了鱼竿。
1340.44: 赵六钓到了一条鱼。
1340.44: 李四饿着肚子等着鱼竿。
1340.44: 李四在等鱼竿的时候饿死了。
1369.21: 王五饿了,要了鱼竿。
1369.21: 王五正在钓鱼。
1379.33: 王五钓到了一条鱼。
1409.59: 赵六饿了,要了鱼竿。
1409.59: 赵六正在钓鱼。
1419.98: 赵六钓到了一条鱼。
1427.53: 王五饿了,要了鱼竿。
1427.53: 王五正在钓鱼。
1437.52: 王五钓到了一条鱼。
```
李四最后饿死了但是他比张三要长寿因为张三还没到上午7点就死了。赵六和王五现在一定过得很好因为需要鱼竿的就只剩下他们两个了。
这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。
在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[12][18] 先把影响其他对象的nouns 对象和 actors 对象放在一边,我们先来想一想运行中的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 <ruby>“时间管理器”<rt>time manager</rt><ruby>。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。
这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)不得不承认,尽管我们有了“时间管理器”,我们还是无法实现希基在解释有必要搞清楚程序中的时间概念时所提出的设想。(我认为,希基想要的类似于 [<ruby>阿达·洛芙莱斯<rt>Ada Lovelace</rt></ruby> 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。尽管如此我们可以发现面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致我觉得这一点很有意思。我们可能会理所当然地认为面向对象程序设计的方式千篇一律即程序就是对事件的一长串记录某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。
_如果你喜欢这篇文章欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅获取最新文章每四周更新一篇。_
_TwoBitHistory 文章回顾……_
> 嗨,大家好!很遗憾,我最近没有时间写新文章,但是我刚刚更新了我的 RSS 记录,整合了目前为止我私下对一些关键人物的采访,比如 Ramanathan Guha 和 Dan Libby。<https://t.co/WYPhvpTGqB>
>
> — TwoBitHistory (@TwoBitHistory) [December 18, 2018][22]
1. Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, <http://campus.hesge.ch/daehne/2004-2005/langages/simula.htm>. [↩︎][23]
2. Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&amp;rep=rep1&amp;type=pdf][24]. [↩︎][25]
3. Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, <http://heim.ifi.uio.no/~steinkr/papers/HiNC1-webversion-simula.pdf>. [↩︎][26]
4. ibid. [↩︎][27]
5. Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, <https://hannemyr.com/cache/knojd_acm78.pdf>. [↩︎][28]
6. Dahl and Nygaard (1966), 676. [↩︎][29]
7. Dahl and Nygaard (1978), 257. [↩︎][30]
8. Krogdahl, 3. [↩︎][31]
9. Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, <http://www.olejohandahl.info/old/birth-of-oo.pdf>. [↩︎][32]
10. Dahl and Nygaard (1978), 265. [↩︎][33]
11. Holmevik. [↩︎][34]
12. Krogdahl, 4. [↩︎][35]
--------------------------------------------------------------------------------
via: https://twobithistory.org/2019/01/31/simula.html
作者:[Two-Bit History][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[校对者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]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey
[2]: https://twobithistory.org/images/river.jpg
[3]: tmp.2ZIthXB4S6#fn:1
[4]: tmp.2ZIthXB4S6#fn:2
[5]: tmp.2ZIthXB4S6#fn:3
[6]: tmp.2ZIthXB4S6#fn:4
[7]: tmp.2ZIthXB4S6#fn:5
[8]: tmp.2ZIthXB4S6#fn:6
[9]: tmp.2ZIthXB4S6#fn:7
[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf
[11]: tmp.2ZIthXB4S6#fn:8
[12]: tmp.2ZIthXB4S6#fn:9
[13]: tmp.2ZIthXB4S6#fn:10
[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf
[15]: tmp.2ZIthXB4S6#fn:11
[16]: https://www.gnu.org/software/cim/
[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96
[18]: tmp.2ZIthXB4S6#fn:12
[19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html
[20]: https://twitter.com/TwoBitHistory
[21]: https://twobithistory.org/feed.xml
[22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw
[23]: tmp.2ZIthXB4S6#fnref:1
[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf
[25]: tmp.2ZIthXB4S6#fnref:2
[26]: tmp.2ZIthXB4S6#fnref:3
[27]: tmp.2ZIthXB4S6#fnref:4
[28]: tmp.2ZIthXB4S6#fnref:5
[29]: tmp.2ZIthXB4S6#fnref:6
[30]: tmp.2ZIthXB4S6#fnref:7
[31]: tmp.2ZIthXB4S6#fnref:8
[32]: tmp.2ZIthXB4S6#fnref:9
[33]: tmp.2ZIthXB4S6#fnref:10
[34]: tmp.2ZIthXB4S6#fnref:11
[35]: tmp.2ZIthXB4S6#fnref:12

View File

@ -0,0 +1,233 @@
[#]: subject: "Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine"
[#]: via: "https://itsfoss.com/duckduckgo-easter-eggs/"
[#]: author: "sreenath https://itsfoss.com/author/sreenath/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
隐藏功能!在 DuckDuckGo 搜索引擎中,你可以做这 25 件有趣的事情
======
比起无处不在的 Google[有些搜索引擎替代品更加尊重隐私][1],而 DuckDuckGo 就是其中之一。
最近,这个搜索引擎有了很大的改进,搜索一般网页十分顺畅。在搜索本地地点方面,则还远不及 Google。
不过DuckDuckGo其爱称为 DDG有一些很酷的功能大部分用户还没注意到。如果你是一位 DDG 狂热粉,你可能会喜欢用这些小技巧来提升你的搜索体验。
### 1. 跳转特定网页
在你最喜欢的网站名称前输入 ! 即可直接进入这个网站。则类似于 Google 的 “运气不错” 功能,但用 DDG 的话来说,这就叫 “叹号搜索”。
网站有缩写,开始输入时便会提示。
![duckduckgo bang feature][2]
在网站名后面输入搜索词,就可以直接抵达那个网站的搜索结果处。
### 2. 文本转 ASCII
Figlet 是一个[有趣的 Linux 命令][3],可以将任意文本转换为漂亮的 ASCII 画格式。
在任意搜索词前输入 **figlet**,就会显示 ASCII 输出。无需打开终端。
![Figlet in DDG][4]
### 3. 检查社交媒体的状态
在某个人的 Twitter 名前加上 @’,就会显示 TA 的状态(关注者等)。
![Itsfoss Twitter][5]
### 4. 生成强密码
输入 password 并加上需要的字符数,就可以生成一个独特的强密码。
![Generating password in DuckDuckGo][6]
### 5. 生成随机密码短语
输入 random passphrase 可生成一段密码短语,通常长度为 4 个词。
![Random Passphrase][7]
### 6. 获取一份速查表
在需要看速查表的搜索词后面,可输入 cheatsheet。如果要搜索的东西有速查表就会立即显示在搜索页面。
![Vim Cheatsheet][8]
### 7. 通过色码获取颜色
输入 color 并加上你想查的颜色的十六进制码,便可显示这个颜色。
![Color][9]
### 8. 生成随机数
搜索 random number 会输出一个 0 到 1 之间的随机数。
![Random Number][10]
你也可以指定需要的范围。
![Random Number between 1 and 1000][11]
### 9. 转换为二进制等形式
输入一个二进制数并加上 binary可将其从二进制转换为十进制。
![Binary to Decimal][12]
类似地,它也能用于十六禁止和八进制,但我不清楚它们的处理逻辑。
### 10. 寻找韵词
输入 what rhymes with 并带上要找同韵词的词语。作诗能力变强了,对吧?
![What rhymes with rain][13]
### 11. 获取拉马努金数、圆周率等常数
输入想获取数值的常数名,便可在搜索结果中看到它。
![Ramanujan Number][14]
### 12. 查询现在谁在太空中
输入 people in space 获取当前在太空中的人员名单。同时还会显示他们在太空中居住的时间。
![People in Space][15]
### 13. 查询网页是否无法访问
如果你想知道某个网站是你无法访问了,还是大家都无法访问了,只需在搜索词中输入 “is xyz.com down”。
![Is down?][16]
### 14. 获取特定话题的名言
输入一个词并带上 quotes就会显示与这个词相关的名言。
![Get quotes in DDG][17]
### 15. 获取占位文本
搜索 lorem ipsum 就可以获取 5 段占位文本。对 Web 开发者应该会有用。
![Lorem ipsum][18]
### 16. 获取任意月份的日历
在年、月、日后面输入 calendar就会为你显示该月份的交互式日历。
![Calendar][19]
### 17. 生成二维码
在文字、链接等后面输入 qr就会生成对应的二维码。
![QRCode][20]
### 18. 获取一些 CSS 动画
搜索 css animations 以获取一些 CSS 动画例子。
![CSS Animations][21]
### 19. 展开短链接
如果有一个 Bitly 链接或其他短链接,但不确定它指向哪里,不必再跳转到充满垃圾信息的网页了,只需展开短链接,看看真正的网址。
在短链接后面输入关键词 expand就会显示真正的目标 URL。
![Expand Link][22]
### 20. 获取特殊字符的 HTML 代码
搜索 html chars可以获取一份很长的列表上面有 HTML 实体及其描述,按下后会在结果中显示更多信息。
![HTML Chars][23]
### 21. 我用这东西干啥?
这功能没什么用。如果你输入 “why should I use this?” ,它就会在搜索结果顶部显示 “cause it's awesome”。显然DuckDuckGo 在说他自己。
![Why should I use this?][24]
### 22. 转换大小写
大小写都可转换。lowercase <大写搜索词> 就会显示小写的结果
![Lowercase][25]
uppercase <小写搜索词> 就会显示大写的结果。
![Uppercase][26]
### 23. 编码 URL
搜索 encode 并加上 URL就会给出编码后的结果
![URL Encode][27]
### 24. Motherboard
搜索 Motherboard就会看见左侧的 DuckDuckGo 的 logo 变了。它会显示选好的几个随机 logo。
![Motherboard][28]
### 25. 获取 HTML 色码
搜索 color codes 便可获得一份颜色表。一样,这个功能多为 Web 开发者和设计师所用。
![Color Codes][29]
### 还有很多别的···
我的伙伴 Sreenath 想到本贴的主意。他说 DuckDuckGo 中还有许多 “彩蛋”,我觉得没错。但全部列出来有诸多不便。
如果你知道更多这样有趣的 DDG 搜索功能,请在评论中分享。如果你又发现了你喜欢的搜索功能,也提出来吧。
--------------------------------------------------------------------------------
via: https://itsfoss.com/duckduckgo-easter-eggs/
作者:[sreenath][a]
选题:[lkxed][b]
译者:[Peaksol](https://github.com/TravinDreek)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sreenath/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/privacy-search-engines/
[2]: https://itsfoss.com/wp-content/uploads/2022/05/duckduckgo-bang-feature-800x449.png
[3]: https://itsfoss.com/funny-linux-commands/
[4]: https://itsfoss.com/wp-content/uploads/2022/05/figlet-800x272.png
[5]: https://itsfoss.com/wp-content/uploads/2022/05/itsfoss-twitter-800x278.jpg
[6]: https://itsfoss.com/wp-content/uploads/2022/05/password-30-800x185.jpg
[7]: https://itsfoss.com/wp-content/uploads/2022/05/random-pqssphrase-800x179.png
[8]: https://itsfoss.com/wp-content/uploads/2022/05/vim-cheatsheet-800x367.png
[9]: https://itsfoss.com/wp-content/uploads/2022/05/color-800x289.jpg
[10]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-800x235.png
[11]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-between-1-and-1000-800x244.png
[12]: https://itsfoss.com/wp-content/uploads/2022/05/binary-800x184.png
[13]: https://itsfoss.com/wp-content/uploads/2022/05/What-rhymes-with-rain-800x257.png
[14]: https://itsfoss.com/wp-content/uploads/2022/05/ramanujan-number-800x238.png
[15]: https://itsfoss.com/wp-content/uploads/2022/05/people-in-space-800x313.jpg
[16]: https://itsfoss.com/wp-content/uploads/2022/05/is-down-800x204.png
[17]: https://itsfoss.com/wp-content/uploads/2022/05/life-quotes-800x303.png
[18]: https://itsfoss.com/wp-content/uploads/2022/05/lorem-ipsum-800x227.png
[19]: https://itsfoss.com/wp-content/uploads/2022/05/calendar-800x331.png
[20]: https://itsfoss.com/wp-content/uploads/2022/05/qrcode-800x255.png
[21]: https://itsfoss.com/wp-content/uploads/2022/05/css-animations-800x385.jpg
[22]: https://itsfoss.com/wp-content/uploads/2022/05/expand-shortened-link-ddg-800x209.png
[23]: https://itsfoss.com/wp-content/uploads/2022/05/html-chars-800x174.png
[24]: https://itsfoss.com/wp-content/uploads/2022/05/why-should-i-use-this-800x160.png
[25]: https://itsfoss.com/wp-content/uploads/2022/05/lowercase-800x179.png
[26]: https://itsfoss.com/wp-content/uploads/2022/05/uppercase-800x185.png
[27]: https://itsfoss.com/wp-content/uploads/2022/05/url-encode-800x177.png
[28]: https://itsfoss.com/wp-content/uploads/2022/05/motherboard.png
[29]: https://itsfoss.com/wp-content/uploads/2022/05/color-codes-800x554.png

View File

@ -0,0 +1,194 @@
[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11"
[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/"
[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/"
[#]: collector: "lkxed"
[#]: translator: "robsean"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
如何双启动 Ubuntu 22.04 LTS 和 Windows 11
======
嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的旁侧配置 Ubuntu 22.04 LTS (Jammy Jellyfish) 的双启动设置
为使其能工作,你需要在你的计算机上安装 windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。
##### 必要条件 
在设置双启动前,这些是你所需要的。
* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,抓取一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。
* 快速稳定的因特网连接
### 步骤 1、在你的硬盘驱动器上创建一个可用的分区 
正如介绍中所提到的,我们首先需要在硬盘驱动器上创建一个单独的分区,我们将在其中安装 Ubuntu 22.04 。
因此,通过按下 **Windows + R** 组合键来打开磁盘管理器实用程序
在对话框中,输入 diskmgmt.msc ,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
![][2]
<ruby>磁盘管理<rt>disk management</rt></ruby>控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 ‘卷 E 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。
![][3]
因此,在你想要压缩的磁盘驱动器卷上右键,并在弹出的菜单中选择 <ruby>压缩卷<rt>Shrink</rt></ruby> 选项。
![][4]
一个弹出对话框将会出现,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单 <ruby>压缩卷<rt>Shrink</rt></ruby>
这是指定给 Ubuntu 22.04 安装所用的空间.
![][5]
在缩小磁盘空间后,它将显示为 <ruby>未分配<rt>Unallocated</rt></ruby><ruby>可用空间<rt>Free Space</rt></ruby>,如图所示。
![][6]
随着可用空间的到来,现在将可启动 USB 媒介盘插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。
### 步骤 2、开始安装
在第一屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 <ruby>尝试或安装 Ubuntu<rt>Try or Install Ubuntu</rt></ruby> ,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
![][7]
Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。
![][8]
此后,安装程序向导将弹出,向你提供两个选项: <ruby>尝试 Ubuntu<rt>Try Ubuntu</rt></ruby><ruby>安装 Ubuntu<rt>Install Ubuntu</rt></ruby>。因为我们的使命是安装 Ubuntu ,所以选择后者。
![][9]
接下来,选择你的首选键盘布局,并单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
![][10]
<ruby>更新和其它软件<rt>Updates and Other Software</rt></ruby> 步骤中,选择 <ruby>正常安装<rt>Normal Installation</rt></ruby>以便安装 Ubuntu的 GUI 版本通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包
接下来,单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
![][11]
下一步提供两个安装选项。第一个选项 - <ruby>清除整个磁盘并安装 Ubuntu<rt>Erase disk and install Ubuntu</rt></ruby> 完全地擦除你的驱动器并安装。但是由于这是一个双启动设置,这个选项对于你现有安装的 Windows 系统来说会是灾难性的。
因此,选择 <ruby>其它选项<rt>Something else</rt></ruby>,单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
![][12]
分区表将显示所有现有的磁盘分区。到目前为止,我们仅有 NTFS 分区和我们之前压缩出来的可用分区。
针对 Ubuntu 22.04 ,我们将创建下面的分区:
* /boot                1 GB
* /home                10 GB
* /                   12 GB
* Swap                 2 GB
* EFI                300 MB
为开始使用这些分区,单击 <ruby>可用空间<rt>Free Space</rt></ruby>分区下面的 [ + ] 符号。
![][13]
如图显示填写 /boot 分区的详细信息,然后单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
![][14]
接下来,具体指定 /home 分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
![][15]
接下来,定义 / ( root ) 分区,并单击 <ruby>确定<rt>OK</rt></ruby> 按钮。
![][16]
为定义 swap 空间,设置大小,并在 <ruby>使用为<rt>Use as</rt></ruby>:选项中选择 <ruby>交换区域<rt>Swap area</rt></ruby>
![][17]
最后,如果你正在使用 UEFI 启动模式,那么创建一个 EFI 系统分区。我们将分配 300MB 到 EFI 分区。
![][18]
下图是一份我们的分区表的分区摘要。
![][19]
为继续安装,单击 <ruby>现在安装<rt>Install Now</rt></ruby>。在下图显示的弹出窗口中,单击 <ruby>继续<rt>Continue</rt></ruby>来保存更改到磁盘。
![][20]
接下来,安装程序向导将自动侦测出你的位置,只需要单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
![][21]
接下来,通过具体指定姓名、计算机的名称和密码来创建一个登录用户。接下来单击 <ruby>继续<rt>Continue</rt></ruby> 按钮。
![][22]
此时,安装程序向导将复制所有的 Ubuntu 文件和软件包到手动创建的硬盘驱动器分区,并安装必要的软件包。
这个过程将需要很长一段时间,因此,要有耐心。在我们的实例中,它需要大约 30 分钟。
![][23]
在安装过程完成后,单击 <ruby>立刻重新启动<rt>Restart Now</rt></ruby> 按钮来重新启动系统。
![][24]
在这时,移除你的可启动 USB 驱动器,并按下 <ruby>回车键<rt>ENTER</rt></ruby> 按键。
![][25]
在系统重新启动时,你将找到 Ubuntu 和 Windows 11 的所有选项。
选择 Ubuntu 来启动到你的新 Ubuntu 22.04 安装。为启动到 Windows 11选择标有 <ruby>Windows 恢复环境<rt>Windows Recovery Environment</rt></ruby> 的条目。
![][26]
就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04.
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/
作者:[James Kiarie][a]
选题:[lkxed][b]
译者:[robsean](https://github.com/robsean)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linuxtechi.com/author/james/
[b]: https://github.com/lkxed
[1]: https://releases.ubuntu.com/22.04/
[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png
[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png
[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png
[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png
[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png
[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png
[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png
[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png
[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png
[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png
[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png
[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png
[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png
[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png
[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png
[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png
[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png
[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png
[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png
[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png
[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png
[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png
[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png

View File

@ -7,23 +7,23 @@
[#]: publisher: " "
[#]: url: " "
How to Create Local Yum/DNF Repository on RHEL 9
如何在 RHEL 9 上创建本地 Yum/DNF 仓库
======
Hello techies, recently Red Hat has released its latest operating system RHEL 9. RHEL 9 fulfill all the requirements of hybrid cloud. It can be installed on physical server, virtual machine and inside the container image.
你好,技术人员,最近红帽发布了最新的操作系统 RHEL 9RHEL 9 满足了混合云的所有要求。它可以安装在物理服务器、虚拟机和容器镜像中。
When we dont have subscription and want to install packages for doing the POCs then setting up local yum or dnf repository will be handy.
当我们没有订阅的时候,想安装软件包来做 POC那么设置本地的 yum 或 dnf 仓库将是很方便的。
In this guide, we will cover how to create local yum/dnf repository on RHEL 9 using DVD or ISO file step by step.
在本指南中,我们将介绍如何在 RHEL 9 上使用 DVD 或 ISO 文件一步一步地创建本地 yum/dnf 资源库。
Prerequisites for creating local Yum/DNF repository
创建本地 yum/dnf 资源库的先决条件:
* Minimal Install RHEL 9 system
* Sudo User with admin privileges
* RHEL 9 DVD or ISO file
* 最小化安装 RHEL 9 系统
* 具有管理权限的 sudo 用户
* RHEL 9 DVD 或 ISO 文件
### 1 ) Mount RHEL 9 ISO File or DVD
### 1)挂载 RHEL 9 ISO 文件或 DVD
We are assuming RHEL 9 iso file is already copied into the system. Run following mount command to mount ISO file on /opt/repo folder.
我们假设 RHEL 9 iso 文件已经被复制到系统中。运行下面的挂载命令,将 ISO 文件挂载到 /opt/repo 文件夹。
```
$ sudo mkdir /var/repo
@ -32,15 +32,15 @@ $ sudo mount -o loop rhel-baseos-9.0-x86_64-dvd.iso /var/repo/
![Mount-RHEL9-ISO-File-Command][1]
In case of  dvd, run
如果是 dvd运行
```
$ sudo mount /dev/sr0 /var/repo/
```
### 2) Create Repo File in /etc/yum.repos.d/ Directory
### 2)在 “/etc/yum.repos.d/” 目录中创建仓库文件
Create a repo file with name rhel9-local.repo under the folder /etc/yum.repos.d/ with following content
在 /etc/yum.repos.d/ 目录下创建一个名为 “rhel9-local.repo” 的仓库文件,内容如下:
```
$ sudo vi /etc/yum.repos.d/rhel9-local.repo
@ -61,13 +61,13 @@ baseurl=file:///var/repo//AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
```
Save and close the file.
保存并关闭该文件。
![RHEL8-Local-Repo-File][2]
### 3) Flush Yum/DNF & Subscription Manager Cache
### 3)刷新 yum/dnf 和订阅管理器的缓存
Execute following commands to clean yum or dnf and subscription manager cache.
执行以下命令来清理 yum 或 dnf 和订阅管理器的缓存。
```
$ sudo dnf clean all
@ -76,7 +76,7 @@ $ sudo subscription-manager clean
![DNF-Subscription-Manager-Clean][3]
In the above output, we are getting a warning message This system is not registered with an entitlement. So, to suppress this warning message, edit the file  /etc/yum/pluginconf.d/subscription-manager.conf , change the parameter enabled=1 to enabled=0.
在上面的输出中,我们得到一个警告信息 “This system is not registered with an entitlement”系统没有注册权限。所以为了抑制这个警告信息编辑文件 “/etc/yum/pluginconf.d/subscription-manager.conf”将参数 “enabled=1” 改为 “enabled=0”。
```
$ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf
@ -84,35 +84,35 @@ $ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf
![Disable-Subscription-Parameter-RHEL-9][4]
Save and exit the file.
保存并退出该文件。
### 4) Install Packages using Local Repository
### 4)使用本地仓库安装软件包
Now we are all set to test our local repository. Run beneath command to view configure repository.
现在我们都准备好测试我们的本地仓库了。运行下面的命令来查看配置仓库。
```
$ sudo dnf repolist
```
Output,
输出:
![DNF-Repolist-RHEL-9][5]
Now, try Install packages using dnf command via above configure local repository.
现在,试试用 dnf 命令通过上面配置的本地仓库安装软件包。
```
$ sudo dnf install nfs-utils
```
Output,
输出:
![Install-RPM-Package-via-local-repo-rhel9][6]
![Package-Installation-Completion-RHEL9-DNF-Command][7]
Perfect, above output confirms that nfs-utils package along with its dependencies are installed successfully via locally configured yum or dnf repository.
完美,上述输出证实了 nfs-utils 包及其依赖项已经通过本地配置的 yum 或 dnf 仓库成功安装。
Thats all from this guide. I hope you have found it informative. Kindly do post your queries and feedback in below comments section.
这就是本指南的全部内容。我希望你觉得它有参考价值。请在下面的评论区发表你的疑问和反馈。
--------------------------------------------------------------------------------
@ -120,7 +120,7 @@ via: https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/
作者:[Pradeep Kumar][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,88 @@
[#]: subject: "6 Linux word processors you need to try"
[#]: via: "https://opensource.com/article/22/6/word-processors-linux"
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
[#]: collector: "lkxed"
[#]: translator: "duoluoxiaosheng"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
6 Linux word processors you need to try
======
值得尝试的六款Linux文字处理程序
======
选择一款最中意的文字处理程序把你的想法打印到纸上。
![Typewriter with hands][1]
Image by: rawpixel.com. CC0.
作家们总是在寻找更好的方法将他们的文字和想法以更好的方式呈现给他们的读者。我对文字处理程序最早的印象是在 Apple II 上使用 AppleWorks 和 FrEDWriter一个1985年的免费的文字处理程序。这是我的学生的标配他们中的许多人来自没有钱购买专用软件的家庭。
### Abiword
在20世纪90年代时我开始使用 Linux 我开始寻找高质量的写作程序,以推荐给在开源软件世界跟随我的学生。我首先接触的文字处理程序是 [AbiWord][2]。 AbiWord 来自西班牙语 Abierto是打开的意思。最早发布于1998年并且之后一直在升级。使用 GPLv2 开源协议。支持列表,缩进,字符格式等基本功能。支持比如 ".doc", ".html", ".docx", ".odt" 等多种格式文件的导入和导出。
![Image of Abiword][3]
### Etherpad
[Etherpad][4] 是一个开源项目。它可以让您像 Google Drive 那样实时编辑文档。它完全开源。据它的网站上介绍您可以用它来写文章新闻稿和待办清单还可以和您的朋友同学或者同事一起同时编辑同一个文档。源代码可查看。Etherpad 采用 Apache 2.0 开源协议。您可以直接在线使用它,或者把它下载并[安装][5]到您的 Linux 电脑上。
### Cryptpad
[CryptPad][6] 是一个端到端加密的写作套件。使用 GPLv3 开源协议,并且源代码在 [GitHub][7] 上公开。 由 [Xwiki][8] 实验室开发。可替代 Google Drive 并且自主托管。根据网站描述 “CryptPad 旨在实现协作办公。实时同步文档的更改。由于所有数据都已加密,因此服务及其管理员无法查看正在编辑和存储的内容。” Cryptpad 为用户提供了[丰富的文档][9]。
### Focuswriter
[FocusWriter][10] 是一个简单的免干扰的编辑器。它使用隐藏的界面,鼠标移动到屏幕边界时可以显示。使用 GPLv3 开源协议并提供 Linux 通用软件安装包Flatpak比如 [Ubuntu][11] 的 DEB 和 [Fedora][12] 的 RPM。这是一个 FocusWriter 桌面的例子。 一个非常简单直观的界面,菜单自动隐藏,鼠标指向屏幕顶部或边缘时才显示。文件默认保存为 ".odt" 格式,也支持纯文本, ".docx",和富文本。
![Image of FocusWriter][13]
### LibreOffice Writer
[LibreOffice Writer][14]是我最喜欢的。我已经使用了十多年了。他拥有我需要的富文本的所有特性。他还拥有我见过的最大的导入导出列表。类似 [APA][15]这样的问卷和出版模板它拥有十多种。最喜欢它的是他可以将文件导出为 PDF 和 “epub”。 LibreOffice Writer 是一个免费软件,使用 Mozilla Public Liceense 2.0 开源协议。 [源代码][16]由 Document Foundation 提供。LibreOffice 支持大多数 Linux 发行版。 同时它也提供 FlatpakSnap 和 AppImage。另外您也可以把它下载并安装到 MacOs 和 Windows 上。
![Image of LibreOffice work space][17]
### OpenOffice Writer
Apache [OpenOffice Writer][18] 是一个全功能点文字处理程序。作为一个备忘录来说它足够简单但对于编写你的第一本书来说它又足够复杂。依据官网的描述OpenOffice Writer 将文档自动保存为 “open document format”. 它还支持将文档保存为 ".doc", ".docx", 富文本和其他格式。OpenOffice Writer 使用 Apache License 2.0 开源协议。源代码在 [GitHub][19] 上公开。
这里还有许多免费的开源软件等着大家去发现。它们非常适合完成您的日常任务,您也可以为它们的发展做出贡献。您最喜欢的 Linux 文字处理器程序是什么呢?
Image by: (Don Watkins, CC BY-SA 4.0)
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/6/word-processors-linux
作者:[Don Watkins][a]
选题:[lkxed][b]
译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/don-watkins
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg
[2]: https://www.abisource.com/
[3]: https://opensource.com/sites/default/files/2022-05/abiword.png
[4]: https://etherpad.org/#
[5]: https://github.com/ether/etherpad-lite#installation
[6]: https://cryptpad.fr/what-is-cryptpad.html
[7]: https://github.com/xwiki-labs/cryptpad
[8]: https://github.com/xwiki-labs
[9]: https://docs.cryptpad.fr/en/user_guide/index.html
[10]: https://gottcode.org/focuswriter/
[11]: https://packages.ubuntu.com/jammy/focuswriter
[12]: https://src.fedoraproject.org/rpms/focuswriter
[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png
[14]: https://www.libreoffice.org/discover/writer/
[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template
[16]: https://www.libreoffice.org/about-us/source-code/
[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png
[18]: https://www.openoffice.org/product/writer.html
[19]: https://github.com/apache/openoffice

View File

@ -0,0 +1,110 @@
[#]: subject: "Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else"
[#]: via: "https://itsfoss.com/amberol-music-player/"
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不做其他事情
======
虽然音乐世界被流媒体服务所主导,但这并没有阻止开发者为桌面电脑创建音乐播放器。
最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol我被它的美丽所震撼了。
![amberol music player interface][1]
看起来不错,不是吗?让我们仔细看看它。
### AmberolLinux 上的可爱的音乐播放器
看起来不错是它所做的两件(或几件)事情中的一件。另一件事是播放音乐。
这就是它。[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。
这些功能也不像会在未来的版本中加入。Amberol 只想播放音乐。就是这样。
#### 令人惊叹的用户界面
Amberol 和大多数新的 GNOME 应用一样,是用 Rust 和 GTK 编写的。
它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux rice 截图的一部分。
![amberol music player][3]
由于 UI 没有传统的手柄和菜单,它给应用一个统一的外观。
#### 播放列表
它从你添加的文件夹中存在的文件自动生成一个播放列表。它显示在左手边的侧边栏。
![amberol playlist][4]
你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选符号”,你可以选择歌曲,并从播放列表中删除它们。
如果你愿意,你可以隐藏播放列表的侧边栏。
![amberol without playlist][5]
#### 音乐播放选项
你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键播放/暂停和改变曲目(如果你的系统上有)。
Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以把一首歌放在重复的位置,一直播放,直到你厌倦它。
![amberol music playing options][6]
底部的手柄菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。
![amberol keyboard shortcuts][7]
你也可以从这里禁用 UI 颜色变化以配合专辑封面。
### 在 Linux 上安装 Amberol
Amberol 是[以 Flatpak 形式提供][8]。请确保[你的系统已启用 Flatpak 支持][9]。
要安装 Amberol请打开终端并使用以下命令
```
flatpak install flathub io.bassi.Amberol
```
安装完毕后,在菜单中搜索该应用,并点击启动。
第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件。
![amberol first run][10]
### 总结
就个人而言,我更喜欢流媒体服务,因为我没有一个很好的本地音乐收藏。但我知道有的人有/有大量的 CD 收藏,现在都保存在硬盘上。
Amberol 是一个外观漂亮的应用,对于播放本地音乐来说,它足够好。最吸引人的是基于专辑封面的自适应用户界面。
我请你试试它,并在评论区分享你的经验。
--------------------------------------------------------------------------------
via: https://itsfoss.com/amberol-music-player/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-interface-800x693.png
[2]: https://apps.gnome.org/app/io.bassi.Amberol/
[3]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-800x580.png
[4]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-playlist-800x548.png
[5]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-without-playlist-800x693.png
[6]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-music-playing-options-800x548.png
[7]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-keyboard-shortcuts-800x528.png
[8]: https://flathub.org/apps/details/io.bassi.Amberol
[9]: https://itsfoss.com/flatpak-guide/
[10]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-first-run-800x693.png