mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge branch 'master' of https://github.com/LCTT/TranslateProject into translating
This commit is contained in:
commit
1c0d607fbc
141
published/20220523 7 pieces of Linux advice for beginners.md
Normal file
141
published/20220523 7 pieces of Linux advice for beginners.md
Normal file
@ -0,0 +1,141 @@
|
||||
[#]: subject: "7 pieces of Linux advice for beginners"
|
||||
[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners"
|
||||
[#]: author: "Opensource.com https://opensource.com/users/admin"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lightchaserhy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14712-1.html"
|
||||
|
||||
给 Linux 初学者的 7 条建议
|
||||
======
|
||||
|
||||
> 我们咨询了我们社区作者们,分享了他们的初学经验。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202206/15/143733yhdrxhbnhojbxn2a.jpg)
|
||||
|
||||
对 Linux 的新用户有什么建议?我们请社区的作者们分享了他们初学时的最佳经验。
|
||||
|
||||
### 1、用好 Linux 资源
|
||||
|
||||
我哥们儿告诉我,Linux 就像一个“软件积木搭建套装”(这是一个过时的词汇,指的是上世纪五六十年代流行的建筑积木玩具),这个比喻比较恰当。在 2001、2002 年那时,我曾经利用 Windows 3.1 和 Windows NT,尝试搭建一个安全、有用的 K12 学区网站,当时网上可用的资料不多。其中被推荐的《ROOT 用户指南》是一本“大部头”专业教程,信息丰富,但是有一定上手难度。
|
||||
|
||||
于我而言,Mandrake Linux 的线上课程是最有用的资源。该课程对使用和管理 Linux 桌面或服务器进行了详细的解读。我学习了该课程,并同时利用红帽公司维护的一个邮件列表服务,有问题时就在社区提问寻求帮助。
|
||||
|
||||
—— [Don Watkins][2]
|
||||
|
||||
### 2、在 Linux 社区寻求帮助
|
||||
|
||||
我的建议是要多问,你可以从网上搜索信息开始,看看其他人类似的问题(甚至是更好的提问)。问什么和如何问,需要花一定时间熟悉。
|
||||
|
||||
一旦你对 Linux 更加熟悉了,查看你感兴趣的各种相关论坛,在提问前,先看看是否有人已经提过相同问题,并获得了答案。
|
||||
|
||||
加入邮件列表也很有用,最后你会发现自己也能专业地答复提问。正如他们说的,通过回答他人的问题也会学到更多知识。
|
||||
|
||||
同时,你会越来越熟悉这个操作系统内部运行机制,再也不是初学时的一无所知。
|
||||
|
||||
—— [Greg Pittman][3]
|
||||
|
||||
我的建议是利用 `man`、`info` 等帮助命令获取信息。另外,尽可能花时间熟悉命令行界面,且真正理解 UNIX 的设计理念。事实上,我最喜欢的书之一就是一本 80 年代的 UNIX 书籍,对理解文件、目录、设备、基础命令等非常有帮助。
|
||||
|
||||
—— [Alan Formy-Duval][4]
|
||||
|
||||
我最好的建议是充分相信社区的答复、手册页的详细信息、介绍不同选项的 HOW-TO 文档。不管怎么说,我是在 2009 年左右开始学习的,当时有很多可用的工具和资源。有一个叫 “Linux from Scratch(LFS)”的项目 —— 从源码开始创建 Linux 系统,在这个项目我学会了很多内部原理知识,以及如何创建一个 LFS 镜像。
|
||||
|
||||
—— [Sumantro Mukherjee][6]
|
||||
|
||||
我的建议是泛读。利用像 “Ask Fedora”、“Fedora Matrix chat” 等论坛,阅读他人的经验观点,并且尝试实践。我通过阅读他人的网上争论学习到很多东西,然后我会尝试找出问题的原因。
|
||||
|
||||
—— [Steve Morris][8]
|
||||
|
||||
### 3、安装双操作系统
|
||||
|
||||
我在 90 年代末就开始安装双操作系统(Windows 和 Linux),虽然我真正想使用的是 Linux 操作系统,但我最终还是启动了 Windows 系统,以便在熟悉的桌面环境中工作。最好的建议之一是改变计算机系统启动顺序,所以每次我都反应不够快,自动进入了 Linux 系统。: )
|
||||
|
||||
—— [Heike Jurzik][9]
|
||||
|
||||
我的团队里的一个人挑战我,要做一个知识交换。
|
||||
|
||||
他是我们的 Linux 系统管理员,利用 Joomla 搭建了一个网站(我们的 Web 团队擅长这个,他想学习更多知识),而我则安装了 Linux(以前一直是用 Windows)。我们一开始就用了双启动,因为我还有一堆依赖于操作系统的软件需要用于业务,但这让我对 Linux 的使用有了一个飞跃。
|
||||
|
||||
在我们各自学习新系统时,对方作为专家来互相帮助有助于共同成长,“一个都不能少!”,坚持不懈是一个很大的挑战。
|
||||
|
||||
我经历一个相当尴尬的低级错误后,在显示器上贴了一个大便签,上面写着“在使用任何 `rm` 操作前,首先要思考一下”。管理员给我写了一个命令行大全(网上有很多类似的),对于熟悉基础操作非常有用。我开始使用 Ubuntu 的 KDE 桌面环境时,发现对习惯于使用图形界面的初学者很有帮助。
|
||||
|
||||
从那以后我就开始长期使用 Linux(除了我的工作计算机),而那位管理员仍然在用 Joomla,看起来我俩都得到了成长。
|
||||
|
||||
—— [Ruth Cheesley][12]
|
||||
|
||||
### 4、为了安全请先备份
|
||||
|
||||
我的建议是使用一个带有简单且强大的备份软件的发行版。Linux 新用户会创建、编辑、破坏和恢复系统配置。当操作系统无法启动、丢失数据时,会让他们非常沮丧。
|
||||
|
||||
有了备份软件,他们的数据就有了保障。
|
||||
|
||||
我们都喜爱 Linux,因为它能让我们自由飞翔,但这是“双刃剑”,使用不当也有可能发生非常严重的错误。
|
||||
|
||||
—— [Giuseppe Cassibba][13]
|
||||
|
||||
### 5、分享你的 Linux 经验
|
||||
|
||||
我的建议是分享你的 Linux 使用经验。我曾经认为有一些发行版更适合新用户,所以当他们咨询使用 Linux 时,我总是推荐这些为“新用户准备的”发行版。但是当我坐在他们的计算机前,看起来却像是我从未用过 Linux 一样,因为一些新功能我也不熟悉。现在当有人咨询时,我会推荐自己使用的发行版,虽说这不一定是初学者的“最佳”版本,但毕竟我熟悉,他们遇到的问题我能够快速解决(当然我自己也会在分享中学到新东西)。
|
||||
|
||||
—— [Seth Kenlon][14]
|
||||
|
||||
以前有句俗话叫“不要随便使用杂志封面上宣传的发行版,使用你朋友都在用的,当你遇到问题时才能更好地需求帮助”。将关键词“杂志封面”替换为“互联网”,这句话依然有效 : -) 。我从未听从过这个建议,因为我是方圆五十公里内唯一使用 Linux 的人,周围的人都在用 FreeBSD、IRIX、Solaris 和 Windows 3.11 等操作系统,最后,我就是那个被人们寻求 Linux 帮助的人。
|
||||
|
||||
—— [Peter Czanik][15]
|
||||
|
||||
### 6、坚持学习 Linux
|
||||
|
||||
在到 Red Hat 工作前,我是一名分销商合作伙伴,我有几个提供旅行护士的家庭健康代理机构客户,他们使用了一个叫“Carefacts”的软件包,最初用于 DOS,在旅行笔记本电脑和中心数据库同步中总是出错。
|
||||
|
||||
早期我听到的最好建议是认真研究一下开源运动。开源在 2022 年是主流思想,但在一代人以前,从 Red Hat 的零售商购买 Linux 安装光盘是带有革命性的创新行为。开源打破了常规,我认为要客观看待开源,但确实惊叹到了相当一部分人。
|
||||
|
||||
我的公司在 20 世纪 90 年代中期搭建了第一个客户防火墙,那是基于 Windows NT 和 Altavista 的一个产品,但是经常发生错误崩溃。我们自己又搭建了一个基于 Linux 的防火墙,再也没有出问题了。因此,我们用 Linux 替换了客户的那套 Altavista 系统,稳定地运行了多年。我们在 1999 年底搭建了另一个客户防火墙,当时我花三周读完了一本关书,介绍了数据包过滤和 ipchains 的正确使用,当我完成时感觉超赞,它解决了所有问题。在接下来的 15 年,我搭建安装了数百个防火墙系统,主要采用 iptables 技术,有些利用桥接或 ARP 代理以及 QOS 保障视频会议传输,有些利用 IPSEC 和 OpenVPN 隧道。我靠管理个人防火墙和一些双机热备系统赚取生活费,非常不错,而以前都是用的 Windows 系统。我甚至还建了一些虚拟防火墙。
|
||||
|
||||
但是技术在高速发展,2022 年,iptables 已过时,我以前的防火墙技术也成了美好的回忆。
|
||||
|
||||
目前的经验之谈?永远不要停止探索。
|
||||
|
||||
—— [Greg Scott][19]
|
||||
|
||||
### 7、享受过程
|
||||
|
||||
耐心点,Linux 和之前你熟悉的操作系统不太相同,准备拥抱一个充满无限可能的新世界,尽情享受吧。
|
||||
|
||||
—— [Alex Callejas][20]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/linux-advice-beginners
|
||||
|
||||
作者:[Opensource.com][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lightchaserhy](https://github.com/lightchaserhy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/admin
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png
|
||||
[2]: https://opensource.com/users/don-watkins
|
||||
[3]: https://opensource.com/users/greg-p
|
||||
[4]: https://opensource.com/users/alanfdoss
|
||||
[5]: https://linuxfromscratch.org/
|
||||
[6]: https://opensource.com/users/sumantro
|
||||
[7]: https://ask.fedoraproject.org
|
||||
[8]: https://opensource.com/users/smorris12
|
||||
[9]: https://opensource.com/users/hej
|
||||
[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet
|
||||
[11]: https://opensource.com/article/22/2/why-i-love-linux-kde
|
||||
[12]: https://opensource.com/users/rcheesley
|
||||
[13]: https://opensource.com/users/peppe8o
|
||||
[14]: https://opensource.com/users/seth
|
||||
[15]: https://opensource.com/users/czanik
|
||||
[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan
|
||||
[17]: https://opensource.com/article/21/8/openvpn-server-linux
|
||||
[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
[19]: https://opensource.com/users/greg-scott
|
||||
[20]: https://opensource.com/users/darkaxl
|
@ -3,35 +3,36 @@
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14711-1.html"
|
||||
|
||||
Cloudflare 有了一个新东西,它可以替代互联网上烦人的验证码
|
||||
======
|
||||
|
||||
不想通过正确输入 <ruby>验证码<rt>CAPTCHA</rt></ruby> 来证明自己是个人类吗?Cloudflare 可能有了一个解决方案。
|
||||
|
||||
![Cloudflare][1]
|
||||
|
||||
互联网服务巨头 Cloudflare(在 6 月 9 日)[刚刚宣布了][2] <ruby>私有访问令牌<rt>Private Access Tokens</rt></ruby> 功能。这项功能旨在减少你在网络上看到的验证码数量,同时改善你的隐私。
|
||||
互联网服务巨头 Cloudflare 前两天 [宣布了][2] <ruby>私有访问令牌<rt>Private Access Tokens</rt></ruby> 功能。这项功能旨在减少你在网络上看到的验证码数量,同时改善你的隐私。
|
||||
|
||||
你可能已经发现,验证码在移动设备上是一种可怕的体验。通常,它们会最终会占据整个屏幕,有时甚至也无法完成。
|
||||
你可能已经发现,验证码在移动设备上是一种可怕的体验。通常,它们会最终会占据整个屏幕,有时甚至无法完成。
|
||||
|
||||
作为替代方案,网站可以选择收集唯一识别数据,以证明你是人类。当然,从隐私的角度来看,这种做法是很糟糕的。如果这么做,许多重视隐私的公司都几乎无法避免 <ruby>僵尸攻击<rt>bot attacks</rt></ruby>。
|
||||
作为替代方案,网站可以选择收集唯一识别数据,以证明你是人类。当然,从隐私的角度来看,这种做法是很糟糕的。如果这么做,许多重视隐私的公司都几乎无法避免他们受到 <ruby>僵尸攻击<rt>bot attacks</rt></ruby>。
|
||||
|
||||
幸运的是,私有访问令牌(PATs)的发布将改变这一点。
|
||||
幸运的是,私有访问令牌(PAT)的发布将改变这一点。
|
||||
|
||||
### 私有访问令牌会产生什么影响?
|
||||
|
||||
简而言之,私有访问令牌能够做到下面这些事:
|
||||
|
||||
* 在支持设备上减少验证码数量
|
||||
* 在支持的设备上减少验证码数量
|
||||
* 增强用户隐私
|
||||
* 允许网站所有者确保访问者来自真实设备
|
||||
|
||||
然而,深入观察,我们可以看到私有访问令牌的影响力远不止于此。若使用传统的验证码,就有多个实体可以访问你的数据。
|
||||
|
||||
首先,你正在访问的网站知道你的 IP 地址和你正在访问的 URL。当然,这些数据是建立连接所需的最低要求。此外,对于更高级的功能,网站还会发送一些用户代理数据,还好这些数据并不是唯一可识别的。
|
||||
首先,你正在访问的网站知道你的 IP 地址和你正在访问的 URL。当然,这些数据是建立连接所需的最低要求。此外,对于更高级的功能,网站还会发送一些用户代理(UA)数据,还好这些数据并不是唯一可识别的。
|
||||
|
||||
然而,另一方,也就是验证码提供者,却可以收集更多的数据。与你要访问的网站一样,它也知道你的 IP 地址、用户代理数据和你访问的 URL。不幸的是,除此之外,他们还会收集其他数据,例如你的设备信息和交互数据。如果把这些信息,与你之前完成验证码的时间联系起来,你就会惊讶的发现,他们可以建立一个非常详细的属于你的个人资料。
|
||||
|
||||
@ -61,7 +62,7 @@ Cloudflare 有了一个新东西,它可以替代互联网上烦人的验证码
|
||||
|
||||
如果是 Linux 手机呢?这些制造商,如 Pine64 和 Purism,可能没有支持这样一个系统的基础设施。是否可以在这些上使用私人访问令牌呢?
|
||||
|
||||
Cloudflare 在 [公告帖][4] 中提到:
|
||||
Cloudflare 在 [公告][4] 中提到:
|
||||
|
||||
> 我们正在积极努力让其他客户和设备制造商也使用私人访问令牌框架。每当新客户开始使用它时,从该客户进入你网站的流量将自动开始要求令牌,你的访问者将自动看到更少的验证码。
|
||||
|
||||
@ -74,7 +75,7 @@ via: https://news.itsfoss.com/cloudflare-pat/
|
||||
作者:[Jacob Crume][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,43 +0,0 @@
|
||||
[#]: subject: "Adobe Launches Open Source Toolkit To Contain Visual Misinformation"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Adobe Launches Open Source Toolkit To Contain Visual Misinformation
|
||||
======
|
||||
![adobe][1]
|
||||
|
||||
Adobe envisions a web littered with photos and videos labelled with information about where they came from. The company’s primary goal is to reduce the spread of visual misinformation, but the system could also benefit content creators who want to keep their names associated with their work.
|
||||
|
||||
Adobe’s Content Authenticity Initiative (CAI) project, first announced in 2019, has since released a whitepaper on a technology to do just that, integrated the system into its own software, and partnered with newsrooms and hardware makers to help universalize its vision.
|
||||
|
||||
The company is now announcing the release of a three-part open source toolkit to get the technology into the hands of developers and out into the wild. Adobe’s new open source tools include a JavaScript SDK for developing ways to display content credentials in browsers, a command line utility, and a Rust SDK for developing desktop apps, mobile apps, and other experiences for creating, viewing, and verifying embedded content credentials.
|
||||
|
||||
In the same way that EXIF data stores information about aperture and shutter speed, the new standard also records information about a file’s creation, such as how it was created and edited. And if the company’s shared vision comes true, that metadata, which Adobe refers to as “content credentials,” will be widely viewable across social media platforms, image search platforms, image editors, search engines.
|
||||
|
||||
C2PA is the result of a collaboration between Adobe’s CAI and partners such as Microsoft, Sony, Intel, Twitter, and the BBC. The Wall Street Journal, Nikon, and the Associated Press have recently joined Adobe’s pledge to make content authentication more widely available.
|
||||
|
||||
With the new tools, a social media platform could use Adobe’s JavaScript to quickly have all of its images and videos display the content credentials, which appear as a mouse-over icon in the upper-right corner. Instead of requiring a dedicated team and a larger software buildout, that implementation could be completed in a few weeks by a couple of developers.
|
||||
|
||||
The CAI’s primary goal is to combat visual misinformation on the internet, such as recirculated old images distorting the Ukrainian war or the infamous Nancy Pelosi “cheapfake.” However, a digital chain of custody could also benefit content creators who have had their work stolen or sold, a problem that has plagued visual artists for years and is now causing problems in NFT markets.
|
||||
|
||||
According to Parsons, the CAI is also attracting a surprising amount of interest from companies that create synthetic images and videos. Companies can ensure that generative images aren’t easily mistaken for the real thing by embedding origin metadata into the kind of AI creations we’re seeing from models like DALL-E.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/
|
||||
|
||||
作者:[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/adobe.jpeg
|
@ -0,0 +1,137 @@
|
||||
[#]: subject: "KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements"
|
||||
[#]: via: "https://news.itsfoss.com/kde-plasma-5-25-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements
|
||||
======
|
||||
KDE Plasma 5.25 has finally landed with lots of visual updates and useful improvements!
|
||||
|
||||
![plasma 5.25][1]
|
||||
|
||||
KDE Plasma 5.25 has been one of the most anticipated releases, considering its recent focus on visual refinements and workflow improvements.
|
||||
|
||||
For instance, you got an updated Breeze theme and a new overview effect to improve the workflow with [KDE Plasma 5.24][2] LTS.
|
||||
|
||||
Finally, KDE Plasma 5.25 has landed with more upgrades!
|
||||
|
||||
### KDE Plasma 5.25: What’s New?
|
||||
|
||||
While we already looked at some key [features of Plasma 5.25][3] before its final release. Now that it is here, it is time to give you an overview of what you can expect with KDE Plasma 5.25.
|
||||
|
||||
**Spoiler alert:** Most of the changes involve visual betterment and usability improvements.
|
||||
|
||||
#### New Wallpaper
|
||||
|
||||
![][4]
|
||||
|
||||
If you have played the video game ‘[No Man’s Sky][5]‘ or similar, you might get a similar reference.
|
||||
|
||||
Keeping that aside, the default wallpaper is a refresher to the ones being used previously, with an entirely different theme color.
|
||||
|
||||
#### Gestures for Touchpads and Touchscreens
|
||||
|
||||
Plasma 5.25 includes gestures to take full advantage of new features, such as a four-finger pinch or a swipe from the screen edge to trigger the overview effect or Desktop Grid.
|
||||
|
||||
You can easily manage virtual desktops and switch between workspaces using the 1:1 gestures supported with the release.
|
||||
|
||||
You can head to the Workspace Behavior settings to tweak the actions you need.
|
||||
|
||||
#### Ability to Selectively Apply the Global Theme
|
||||
|
||||
![kde plasma 5.25][6]
|
||||
|
||||
When you proceed to apply a Global Theme from the system settings, you will be prompted to confirm if you want the theme to be applied everywhere or to certain parts of it.
|
||||
|
||||
You can apply it to specific appearance options or replace the entire configuration.
|
||||
|
||||
Overall, this gives fine-grained control in terms of customization when applying the Global Theme to your KDE-powered system.
|
||||
|
||||
#### Auto-Generated Accent Based on Current Wallpaper
|
||||
|
||||
Having the ability to choose a custom or a preset accent is already good enough.
|
||||
|
||||
With KDE Plasma 5.25, accent colors can be generated based on your wallpaper. It should also work with a wallpaper slideshow.
|
||||
|
||||
![][7]
|
||||
|
||||
So, if you want something to match your background, and do not want to tinker around, this option should help you.
|
||||
|
||||
A small but mighty addition to the arsenal of new features.
|
||||
|
||||
#### Tint Color Scheme with Accent Color
|
||||
|
||||
For even greater customization to the look/feel, KDE Plasma 5.25 will let you add a tint to your selected accent color.
|
||||
|
||||
![kde plasma 5.25][8]
|
||||
|
||||
You can enable/disable it if you like the user experience with the tinted theme.
|
||||
|
||||
#### Touch Mode Improvements
|
||||
|
||||
![][9]
|
||||
|
||||
When you are using the touch mode in the desktop environment (through supported devices or manually), KDE Plasma 5.25 makes it more accessible by scaling up the size of the task manager, system tray, and the title bar of KDE applications.
|
||||
|
||||
#### Improvements to Discover
|
||||
|
||||
There are some subtle changes to the Discover software center where you can find all the application categories in the sidebar without needing to navigate through categories like “Applications”, “Add-ons”, and “Plasma Add-ons” separately.
|
||||
|
||||
![kde plasma 5.24][10]
|
||||
|
||||
![kde plasma 5.25][11]
|
||||
|
||||
Also, with Flatpak applications, you will be shown the permissions required for it. Furthermore, the application page has received some upgrades to show more information about the application you view.
|
||||
|
||||
#### Other Improvements
|
||||
|
||||
Other essential refinements include upgrades for customization capabilities and workflow modifications. Those include:
|
||||
|
||||
* A new Blend Effect to animate the change between colors to make the transition smooth whenever you change the theme/color or if it automatically changes.
|
||||
* Powerful containment management feature to allow moving your desktops along with folders/widgets between monitors even if you have disconnected them.
|
||||
* The Kwin scripts settings page has been rewritten.
|
||||
* Keyboard navigation has been revamped with custom shortcut support and an icon to the system tray.
|
||||
* A Floating panel to add a margin around the panel.
|
||||
* Improvements to the performance of KRunner.
|
||||
* The network widget adds details for the frequency and BSSID of the Wi-Fi network.
|
||||
|
||||
If you’re still curious, you can explore the [announcement page][12] to know more about it.
|
||||
|
||||
### Try KDE Plasma 5.25
|
||||
|
||||
You can download KDE Neon to get your hands on the latest KDE Plasma 5.25 as soon as it’s available with an update. If you can’t wait, the testing edition should be a good fit (if you’re willing to experiment).
|
||||
|
||||
[KDE Neon][13]
|
||||
|
||||
For other Linux distributions, you will have to wait for the developers to push an update (excluding LTS edition distros).
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/kde-plasma-5-25-release/
|
||||
|
||||
作者:[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/plasma-5-25-feat.jpg
|
||||
[2]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/
|
||||
[3]: https://news.itsfoss.com/plasma-5-25-features/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/plasma-5-25-wallpaper-1024x576.jpg
|
||||
[5]: https://www.nomanssky.com/
|
||||
[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/apply_global_theme_advanced.png
|
||||
[7]: https://news.itsfoss.com/wp-content/uploads/2022/06/blue_accent.jpg
|
||||
[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/tint-color-scheme-1024x751.png
|
||||
[9]: https://news.itsfoss.com/wp-content/uploads/2022/06/tablet_context_menu.png
|
||||
[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-discover-plasma-5-25.png?ssl=1
|
||||
[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25-discover.png?ssl=1
|
||||
[12]: https://kde.org/announcements/plasma/5/5.25.0/
|
||||
[13]: https://neon.kde.org/download
|
@ -1,37 +0,0 @@
|
||||
[#]: subject: "Thunderbird, The Open Source Email Client, Is Coming To Android"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Thunderbird, The Open Source Email Client, Is Coming To Android
|
||||
======
|
||||
![android-developer][1]
|
||||
|
||||
Thunderbird, the open source email client, is coming to Android via the K-9 Mail Android email app project, which is merging with Thunderbird to form the Thunderbird Android email app. Thunderbird was moved to the Mozilla Foundation’s subsidiary MZLA Technologies Corporation two years ago, in a similar ownership structure to Firefox under the foundation’s subsidiary, Mozilla Corporation. With new features such as OpenPGP end-to-end encryption and a long-awaited mobile app, the Thunderbird project was able to forge its own path.
|
||||
|
||||
According to the Thunderbird team, discussions began in 2018 between Thunderbird product manager Ryan Lee Sipes and K-9’s lead maintainer Christian Ketterer about a possible collaboration for a Thunderbird email app. In 2022, the two have decided that rather than Thunderbird developing its own app from scratch, K-9 should simply join Thunderbird.
|
||||
|
||||
“Many Thunderbird users have asked for a Thunderbird experience on mobile, which we intend to provide by helping make K-9 amazing (and turning it into Thunderbird on Android). K-9 will supplement the Thunderbird experience and enhance where and how users are able to have a great email experience. Our commitment to desktop Thunderbird is unchanged, most of our team is committed to making that a best-in-class email client and it will remain that way,” Thunderbird said.
|
||||
|
||||
K-9 isn’t a particularly popular email app on Google Play, but it has received 5 million downloads. K-9 Mail’s roadmap currently includes: account setup using Thunderbird account auto-configuration; improved folder management; message filter support; and syncing between desktop and mobile Thunderbird. While Thunderbird acknowledges that there has been interest in a Thunderbird app for iOS, the project only states in a FAQ that it is “evaluating” the possibility.
|
||||
|
||||
The Thunderbird team also intends to include Firefox Sync as a method for syncing accounts between Thunderbird and K-9 Mail. This should go into effect in the summer of 2023. The project is also investigating which Thunderbird features to bring to the Android app, such as calendar, task, feed, and chat support.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/
|
||||
|
||||
作者:[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/android-developer.jpg
|
@ -0,0 +1,39 @@
|
||||
[#]: subject: "According to studies, Twitter Drives Open Source Projects Popularity"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
According to studies, Twitter Drives Open Source Projects Popularity
|
||||
======
|
||||
![twiiter][1]
|
||||
|
||||
The research team, led by Ph.D. Hongbo Fang, discovered that Twitter is an effective way to attract more attention and contributors to open source projects on GitHub. The study, titled “‘This Is Damn Slick!’ Estimating the Impact of Tweets on Open Source Project Popularity and New Contributors,” was presented by Fang at the International Conference on Software Engineering, where it received a Distinguished Paper award. According to the study, tweeting about a project resulted in a 7% increase in popularity (at least one star on GitHub) and a 2% increase in the number of contributors. The more tweets a project received, the more stars and contributors it received.
|
||||
|
||||
“We have realized that social media has become more and more important in open source communities,” Fang said. “Attracting attention and new contributors will lead to higher quality and better software.”
|
||||
|
||||
The majority of open source software is created and maintained by volunteers. The more people who work on a project, the better the outcome. Developers and others use the software, report problems, and work to resolve them. Projects that are unpopular risk not receiving the attention they require. This mostly volunteer workforce is responsible for the upkeep of software that millions of people rely on every day. For example, nearly every HTTPS website secures its content with the open source OpenSSL. Heartbleed, a security flaw discovered in OpenSSL, cost businesses millions of dollars to fix after it was discovered in 2014. Another open source piece of software, cURL, allows connected devices to send data to one another and is installed on approximately 1 billion devices. The list could go on and on.
|
||||
|
||||
Fang’s study of Twitter’s impact on increasing the popularity of an open-source project and attracting new contributors is part of a larger body of work in Vasilescu’s Socio-Technical Research Using Data Excavation Lab (STRUDEL) that looks at how to make the open source community and its work more sustainable. The digital infrastructure, the roads and bridges that underpin modern technology, is open source software. That infrastructure may crumble if it is not properly maintained.
|
||||
|
||||
The researchers examined 44,544 tweets containing links to 2,370 open source GitHub repositories for evidence that the tweets drew new stars and contributors to the projects. The researchers used a scientific approach to the study, comparing the increase in stars and contributors of GitHub projects mentioned on Twitter to a control group of projects that were not mentioned on Twitter. The study also described the characteristics of high-impact tweets, the types of people who are likely to be drawn to a project by the posts, and how those people differ from contributors drawn through other means. Tweets from project supporters, rather than developers, work best for attracting attention. Posts requesting assistance with a specific task or project receive a higher response rate. Tweets tend to attract new contributors who are newer to GitHub but not less experienced programmers. And new interest may not result in new assistance.
|
||||
|
||||
One of the potential drawbacks of increasing a project’s popularity that the researchers discuss is the gap between attention and action. More attention frequently results in more feature requests or issue reports, but not necessarily more developers to address them. Increased social media popularity may result in more trolls or toxic behaviour surrounding the project.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/
|
||||
|
||||
作者:[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/twiiter.jpg
|
@ -0,0 +1,76 @@
|
||||
[#]: subject: "Mozilla Just Made Firefox the Most Secure Web Browser for All Users"
|
||||
[#]: via: "https://news.itsfoss.com/mozilla-firefox-secure/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Mozilla Just Made Firefox the Most Secure Web Browser for All Users
|
||||
======
|
||||
Mozilla finally enabled a privacy protection feature that potentially makes it the safest web browser at the time. Do you think so?
|
||||
|
||||
![mozilla firefox][1]
|
||||
|
||||
Mozilla Firefox is one of the most secure open-source web browsers available.
|
||||
|
||||
Undoubtedly, you get the freedom to customize it to harden security, which is why Tor Browser utilizes Firefox at its core.
|
||||
|
||||
And, also one of the [reasons why I keep coming back to Firefox][2].
|
||||
|
||||
Now, Mozilla has finally enabled a new feature for **all desktop users,** making it the most secure browser (or as they claim).
|
||||
|
||||
Here, I’m not talking about anything new, but an existing feature in Firefox, i.e., Total Cookie Protection. It was introduced with [Firefox 86][3] last year, but it was not enabled by default for all users.
|
||||
|
||||
### Total Cookie Protection for all users
|
||||
|
||||
Whether you are using Windows, Mac, or Linux, the Total Cookie Protection is being rolled out to everyone, making it one of its core features enabled by default.
|
||||
|
||||
Initially, to use the feature, you had to enable the strict mode (Enhanced Tracking Protection). But, now, you no longer need to do that.
|
||||
|
||||
**What is it?**
|
||||
|
||||
In case you are curious, Total Cookie Protection isolates every website with its cookies. Cookies are small bits of data sent to your browser by a website.
|
||||
|
||||
So, the cookies will not be shared among websites, thereby, preventing cross-site tracking.
|
||||
|
||||
Separate cookie jars will be created for each website you visit.
|
||||
|
||||
![][4]
|
||||
|
||||
Mozilla’s blog post explains more about it as:
|
||||
|
||||
> Any time a website, or [third-party content][5] embedded in a website, deposits a cookie in your browser, that cookie is confined to the cookie jar assigned to *only*that website. No other websites can reach into the cookie jars that don’t belong to them and find out what the other websites’ cookies know about you — giving you freedom from invasive ads and reducing the amount of information companies gather about you.
|
||||
|
||||
### So, Is it a big deal?
|
||||
|
||||
Even with all the privacy tracking protection and content blockers in place, cross-site tracking is a problem that not everyone is aware of.
|
||||
|
||||
Hence, with cross-site cookie interactions, a lot of your personal activities and habits can help a digital tracking company build an online profile of yours.
|
||||
|
||||
But, with Mozilla Firefox, enabling the feature by default on top of all other privacy measures by Firefox, ensures that you should get the most private experience.
|
||||
|
||||
And, all that without needing to tweak anything, which should make things convenient for any privacy-centric user.
|
||||
|
||||
If you are still curious, you can refer to the [official announcement post][6] by Mozilla.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/mozilla-firefox-secure/
|
||||
|
||||
作者:[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/mozilla-made-firefox-most-secure-web-browser.jpg
|
||||
[2]: https://news.itsfoss.com/why-mozilla-firefox/
|
||||
[3]: https://news.itsfoss.com/firefox-86-release/
|
||||
[4]: https://news.itsfoss.com/wp-content/uploads/2021/02/tcp-firefox.png
|
||||
[5]: https://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection#:~:text=Third%2Dparty%20cookies%20are%20cookies,considered%20a%20third%2Dparty%20cookie.
|
||||
[6]: https://blog.mozilla.org/en/products/firefox/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/
|
@ -1,290 +0,0 @@
|
||||
[#]: subject: "Learn the Lisp programming language in 2021"
|
||||
[#]: via: "https://opensource.com/article/21/5/learn-lisp"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Let's learn the Lisp programming language
|
||||
======
|
||||
A lot of Lisp code lurks inside big codebases, so it's smart to get familiar with the language.
|
||||
|
||||
![Women in tech and computing][1]
|
||||
|
||||
Image by: kris krüg
|
||||
|
||||
Lisp was invented in 1958, which makes it the second-oldest computer programming language. It has spawned several modern derivatives, including Common Lisp, Emacs Lisp (Elisp), Clojure, Racket, Scheme, Fennel, and GNU Guile.
|
||||
|
||||
People who love thinking about the design of programming languages often love Lisp because of how its syntax and data share the same structure: Lisp code is essentially a list of lists, and its name is an acronym for *LISt Processing*. People who love thinking about the aesthetics of programming languages often hate Lisp because of its frequent use of parentheses for scoping; in fact, it's a common joke that Lisp stands for *Lots of Irritating Superfluous Parentheses*.
|
||||
|
||||
Whether you love or hate its design philosophies, Lisp is an interesting glimpse at the past and, thanks to Clojure and Guile, into the future. You might be surprised how much Lisp code there is lurking within big codebases in any given industry, so it's a good idea to have at least a passing familiarity with the language.
|
||||
|
||||
### Install Lisp
|
||||
|
||||
There are many implementations of Lisp. Popular open source versions include [SBCL][2], [GNU Lisp][3], and [GNU Common Lisp][4] (GCL). You can install any of these with your distribution's package manager, but for this article I use `clisp`.
|
||||
|
||||
On Fedora Linux:
|
||||
|
||||
```
|
||||
$ sudo dnf install clisp
|
||||
```
|
||||
|
||||
On Debian:
|
||||
|
||||
```
|
||||
$ sudo apt install clisp
|
||||
```
|
||||
|
||||
For macOS, you can use [MacPorts][5] or [Homebrew][6]:
|
||||
|
||||
```
|
||||
$ sudo port install clisp
|
||||
```
|
||||
|
||||
For Windows, you can either use [clisp on Cygwin][7] or download a GCL binary from [gnu.org/software/gcl][8].
|
||||
|
||||
Even though I'm using the `clisp` command, most of the principles in this article apply to any Lisp. Should you choose to use a different Lisp implementation, the command to run Lisp code is different from what I use in this article (`gcl` or `sbcl` instead of `clisp`, for example) but everything else is the same.
|
||||
|
||||
### List processing
|
||||
|
||||
The basic unit of Lisp source code is an *expression*, which is written as a list. For instance, this is a list of an operator (`+` ) and two integers (`1` and `2` ):
|
||||
|
||||
```
|
||||
(+ 1 2)
|
||||
```
|
||||
|
||||
It's also a Lisp expression, using a symbol (`+` ) that evaluates to a function (addition) and two arguments (`1` and `2` ). You can run this expression and others in an interactive Common Lisp environment called REPL (read-eval-print loop). If you're familiar with Python's IDLE, Lisp's REPL should feel somewhat familiar to you.
|
||||
|
||||
To launch a REPL, launch Common Lisp:
|
||||
|
||||
```
|
||||
$ clisp
|
||||
[1]>
|
||||
```
|
||||
|
||||
At the REPL prompt, type a few expressions:
|
||||
|
||||
```
|
||||
[1]> (+ 1 2)
|
||||
3
|
||||
[2]> (- 1 2)
|
||||
-1
|
||||
[3]> (- 2 1)
|
||||
1
|
||||
[4]> (+ 2 3 4)
|
||||
9
|
||||
```
|
||||
|
||||
### Functions
|
||||
|
||||
Now that you know the basic structure of a Lisp expression, you can utilize Lisp functions in useful ways. The `print` function takes any argument you provide and displays it on your terminal, while the `pprint` function "pretty" prints it. There are other variations on the print function, but `pprint` is nice in REPL:
|
||||
|
||||
```
|
||||
[1]> (pprint "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[2]>
|
||||
```
|
||||
|
||||
You can create your own functions with `defun`. The `defun` function requires a name for your function and any parameters you want your function to accept:
|
||||
|
||||
```
|
||||
[1]> (defun myprinter (s) (pprint s))
|
||||
MYPRINTER
|
||||
[2]> (myprinter "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
### Variables
|
||||
|
||||
You can create variables in Lisp with `setf` :
|
||||
|
||||
```
|
||||
[1]> (setf foo "hello world")
|
||||
"hello world"
|
||||
[2]> (pprint foo)
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
You can nest expressions within expressions in a kind of pipeline. For instance, you can pretty print the contents of your variable after invoking the `string-upcase` function to convert its characters to uppercase:
|
||||
|
||||
```
|
||||
[3]> (pprint (string-upcase foo))
|
||||
|
||||
"HELLO WORLD"
|
||||
|
||||
[4]>
|
||||
```
|
||||
|
||||
Lisp is dynamically typed in the sense that you don't have to declare variable types when setting them. Lisp treats integers as integers by default:
|
||||
|
||||
```
|
||||
[1]> (setf foo 2)
|
||||
[2]> (setf bar 3)
|
||||
[3]> (+ foo bar)
|
||||
5
|
||||
```
|
||||
|
||||
If you intend for an integer to be interpreted as a string, you can quote it:
|
||||
|
||||
```
|
||||
[4]> (setf foo "2")
|
||||
"2"
|
||||
[5]> (setf bar "3")
|
||||
"3"
|
||||
[6]> (+ foo bar)
|
||||
|
||||
*** - +: "2" is not a number
|
||||
The following restarts are available:
|
||||
USE-VALUE :R1 Input a value to be used instead.
|
||||
ABORT :R2 Abort main loop
|
||||
Break 1 [7]>
|
||||
```
|
||||
|
||||
In this sample REPL session, both `foo` and `bar` are set to quoted numbers, so Lisp interprets them as strings. Math operators can't be used on strings, so REPL drops into a debugger mode. To get out of the debugger, press **Ctrl+D** on your keyboard.
|
||||
|
||||
You can do some introspection on objects using the `typep` function, which tests for a specific data type. The tokens `T` and `NIL` represent *True* and *False*, respectively.
|
||||
|
||||
```
|
||||
[4]> (typep foo 'string)
|
||||
NIL
|
||||
[5]> (typep foo 'integer)
|
||||
T
|
||||
```
|
||||
|
||||
The single quote (`'` ) before `string` and `integer` prevents Lisp from (incorrectly) evaluating those keywords as variables:
|
||||
|
||||
```
|
||||
[6]> (typep foo string)
|
||||
*** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value
|
||||
[...]
|
||||
```
|
||||
|
||||
It's a shorthand way to protect the terms, normally done with the `quote` function:
|
||||
|
||||
```
|
||||
[7]> (typep foo (quote string))
|
||||
NIL
|
||||
[5]> (typep foo (quote integer))
|
||||
T
|
||||
```
|
||||
|
||||
### Lists
|
||||
|
||||
Unsurprisingly, you can also create lists in Lisp:
|
||||
|
||||
```
|
||||
[1]> (setf foo (list "hello" "world"))
|
||||
("hello" "world")
|
||||
```
|
||||
|
||||
Lists can be indexed with the `nth` function:
|
||||
|
||||
```
|
||||
[2]> (nth 0 foo)
|
||||
"hello"
|
||||
[3]> (pprint (string-capitalize (nth 1 foo)))
|
||||
|
||||
"World"
|
||||
```
|
||||
|
||||
### Exiting REPL
|
||||
|
||||
To end a REPL session, press **Ctrl+D** on your keyboard, or use the `quit` keyword in Lisp:
|
||||
|
||||
```
|
||||
[99]> (quit)
|
||||
$
|
||||
```
|
||||
|
||||
### Scripting
|
||||
|
||||
Lisp can be compiled or used as an interpreted scripting language. The latter is probably the easiest option when you're starting, especially if you're already familiar with Python or [shell scripting][9].
|
||||
|
||||
Here's a simple dice roller script written in GNU Common Lisp:
|
||||
|
||||
```
|
||||
#!/usr/bin/clisp
|
||||
|
||||
(defun roller (num)
|
||||
(pprint (random (parse-integer (nth 0 num))))
|
||||
)
|
||||
|
||||
(setf userput *args*)
|
||||
(setf *random-state* (make-random-state t))
|
||||
(roller userput)
|
||||
```
|
||||
|
||||
The first line tells your [POSIX][10] terminal what executable to use to run the script.
|
||||
|
||||
The `roller` function, created with `defun`, uses the `random` function to print a pseudo-random number up to, and not including, the zeroth item of the `num` list. The `num` list hasn't been created yet in the script, but the function doesn't get executed until it's called.
|
||||
|
||||
The next line assigns any argument provided to the script at launch time to a variable called `userput`. The `userput` variable is a list, and it's what becomes `num` once it's passed to the `roller` function.
|
||||
|
||||
The penultimate line of the script starts a *random seed*. This provides Lisp with enough entropy to generate a mostly random number.
|
||||
|
||||
The final line invokes the custom `roller` function, providing the `userput` list as its sole argument.
|
||||
|
||||
Save the file as `dice.lisp` and mark it executable:
|
||||
|
||||
```
|
||||
$ chmod +x dice.lisp
|
||||
```
|
||||
|
||||
Finally, try running it, providing it with a maximum number from which to choose its random number:
|
||||
|
||||
```
|
||||
$ ./dice.lisp 21
|
||||
|
||||
13
|
||||
$ ./dice.lisp 21
|
||||
|
||||
7
|
||||
$ ./dice.lisp 21
|
||||
|
||||
20
|
||||
```
|
||||
|
||||
Not bad!
|
||||
|
||||
You may notice that your emulated die has a pontential value of 0, and never reaches the maximum number you provide to it as an argument. In other words, this script never rolls 20 on a 20-sided die (unless you count 0 as 20). There's a simple fix to this, and you only need the knowledge gained from this article to do it. Can you fix this bug?
|
||||
|
||||
### Learn Lisp
|
||||
|
||||
Whether you can imagine using Lisp as a utilitarian language for personal scripts, to advance your career, or just as a fun experiment, you can see some particularly inventive uses at the annual [Lisp Game Jam][11] (most submissions are open source, so you can view the code to learn from what you play).
|
||||
|
||||
Lisp is a fun and unique language with an ever-growing developer base and enough historic and emerging dialects to keep programmers from all disciplines happy.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/learn-lisp
|
||||
|
||||
作者:[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/OSDC_women_computing_4.png
|
||||
[2]: http://sbcl.org
|
||||
[3]: http://clisp.org
|
||||
[4]: https://www.gnu.org/software/gcl/
|
||||
[5]: https://opensource.com/article/20/11/macports
|
||||
[6]: https://opensource.com/article/20/6/homebrew-linux
|
||||
[7]: https://cygwin.fandom.com/wiki/Clisp
|
||||
[8]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable
|
||||
[9]: https://opensource.com/article/20/4/bash-programming-guide
|
||||
[10]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[11]: https://itch.io/jam/spring-lisp-game-jam-2021
|
@ -0,0 +1,139 @@
|
||||
[#]: subject: "A beginner's guide to cloud-native open source communities"
|
||||
[#]: via: "https://opensource.com/article/22/6/cloud-native-open-source-communities"
|
||||
[#]: author: "Anita Ihuman https://opensource.com/users/anita-ihuman"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
A beginner's guide to cloud-native open source communities
|
||||
======
|
||||
Start participating in the cloud-native ecosystem, even if you're a complete beginner.
|
||||
|
||||
![Remote people connected on clouds][1]
|
||||
|
||||
Image by: Opensource.com
|
||||
|
||||
Some people think the cloud-native ecosystem has a high barrier to entry. At first glance, that looks like a logical assumption. Some of the technologies used in cloud-native projects are complex and challenging, if you're not familiar with them, so you might think you need proven expertise to get involved.
|
||||
|
||||
However, looks can be deceiving. This article provides a detailed roadmap to breaking into the cloud-native ecosystem as an open source contributor. I'll cover the pillars of cloud-native architecture, the Cloud Native Computing Foundation (CNCF), and ways to earn more.
|
||||
|
||||
Most importantly, after grounding you in the basics of cloud-native practices and communities, the article provides a three-step guide for getting started.
|
||||
|
||||
### What is cloud native?
|
||||
|
||||
A program is cloud native when it's explicitly developed to be integrated, hosted, and run on a cloud computing platform. Such an application possesses the cloud's inherent characteristics, such as portability, modularity, and isolation, and it adapts to the cloud deployment models of cloud service providers (CSPs).
|
||||
|
||||
Cloud computing is a general term for anything that delivers hosted services over the internet. It usually implies clusters of computers, a distributed file system, and containers. A cloud can be private or public. Cloud computing comes in three major categories: Platform-as-a-Service (PaaS), Software-as-a-Service (SaaS), and Infrastructure-as-a-Service (IaaS).
|
||||
|
||||
From a business perspective, cloud computing means that rather than investing heavily in databases, software, and hardware, companies opt for IT services over the internet, or cloud, and pay for them as they use them.
|
||||
|
||||
### Cloud-native infrastructure
|
||||
|
||||
Cloud-native infrastructure includes datacenters, operating systems, deployment pipelines, configuration management, and any system or software needed to complete the lifecycle of applications. These solutions enable engineers to make rapid, high-impact modifications with little effort, implement new designs, and execute scalable applications on public, personal, and hybrid clouds.
|
||||
|
||||
### Cloud-native architecture
|
||||
|
||||
Cloud architecture is a system designed to utilize cloud services. It leverages the cloud development model's distributed, reliable, scalable, and flexible nature. Networking, servers, datacenters, operating systems, and firewalls are abstracted. It enables enterprises to design applications as loosely coupled components and execute them on dynamic platforms using microservices architecture.
|
||||
|
||||
There are a few technologies that can be considered pillars of cloud-native architecture.
|
||||
|
||||
[Microservices][2] is an architectural system in which software systems are made up of small, independent services that communicate through well-defined application programming interfaces (APIs). This development method makes applications faster to develop and more scalable, encouraging innovation and accelerating time-to-market for new features. Microservices enable communication among applications using RESTful APIs and support independent deployment, updates, scaling, and restarts.
|
||||
|
||||
[DevOps][3] refers to the philosophy, practices, and tools that promote better communication and collaboration between application development and IT operations teams. The benefits of DevOps processes include:
|
||||
|
||||
* Enabling automated release pipelines and integration
|
||||
* Ensuring quick deployment to production
|
||||
* Encouraging collaboration between development and other departments
|
||||
|
||||
Continuous integration and continuous delivery (CI/CD) refers to a set of practices that encompass the culture, operating principles, and procedures for software development. CI/CD practices focus on automation and continuous monitoring throughout the lifecycle of apps, from integration and testing phases to delivery and deployment. The benefits of CI/CD include:
|
||||
|
||||
* Enabling frequent releases
|
||||
* Shipping software more quickly
|
||||
* Receiving prompt feedback
|
||||
* Reducing the risk of release
|
||||
|
||||
A [container][4] is a software package that contains all of the components (binaries, libraries, programming language versions, and so on) needed to run in any environment, making it possible for them to run on a laptop, in the cloud, or in an on-premises datacenter. A container is the optimal carrier for microservices.
|
||||
|
||||
### What is CNCF?
|
||||
|
||||
[CNCF][5] is a Linux Foundation project founded in 2015 to help advance container technology and align the tech industry around its evolution. A sub-organization of the Linux Foundation, it consists of a[collection of open-source projects][6] supported by ongoing contributions courtesy of a vast, vibrant community of programmers.
|
||||
|
||||
Founding members of the CNCF community include companies like Google, IBM, Red Hat, Docker, Huawei, Intel, Cisco, and others. Today, CNCF is supported by over 450 members. Its mission is to foster and sustain open source, vendor-neutral projects around cloud native.
|
||||
|
||||
Perhaps the most well-known project to come from CNCF is Kubernetes. The project was contributed to the Linux Foundation by Google as a seed technology and has since proven its worth by automating container-technology-based applications' deployment, scaling, and management.
|
||||
|
||||
### Learn cloud native
|
||||
|
||||
There are numerous resources to help you understand the basics of cloud-native architecture and technologies. You could start with these:
|
||||
|
||||
* Cloud-native glossary: The [Cloud Native Glossary][7], a project led by the CNCF Business Value Subcommittee, is a reference for common terms when talking about cloud-native applications. It was put together to help explain cloud-native concepts in clear and straightforward language, especially for those without previous technical knowledge.
|
||||
|
||||
**[[ More resources: Kubernetes glossary ]][8]**
|
||||
|
||||
##### Cloud-native communities
|
||||
|
||||
Outside the CNCF projects, some other cloud-native communities and initiatives aim toward sustaining and maintaining these cloud-based projects. They include:
|
||||
|
||||
* Special interest groups (SIGs) and working groups (WGs): SIGs are formed around different cloud-native elements in training and development. These groups meet weekly and discuss the community activity. You could also start a [new SIG][9].
|
||||
* Cloud-native community groups: There are [numerous meetup groups][10] focused on expanding the cloud-native community on a global scale. Many have regular meetings that you can be a part of.
|
||||
* CNCF TAG Network: TAG (for Technical Advisory Group) Network's mission is to enable widespread and successful development, deployment, and operation of resilient and intelligent network systems in cloud-native environments
|
||||
|
||||
##### Free training courses
|
||||
|
||||
Some training courses are available from the Linux Foundation to give beginners preliminary knowledge of cloud technologies. Some of these courses include:
|
||||
|
||||
* [Introduction to Kubernetes (LFS158)][11]
|
||||
* [Introduction to Cloud Infrastructure Technologies (LFS151)][12]
|
||||
|
||||
##### Paid certifications
|
||||
|
||||
There are also paid certification programs from CNCF that test and boost your knowledge of cloud-native technologies from zero to expert. These certifications have proven to be a great addition to practitioners' careers.
|
||||
|
||||
* Kubernetes and Cloud-Native Associate (KCNA): The KCNA certification prepares candidates to work with cloud-native technologies and pursue further CNCF certifications like CKA, CKAD, and CKS (see below).
|
||||
* Certified Kubernetes Application Developer (CKAD): A Kubernetes-certified application developer can design, build, configure, and expose cloud-native applications for Kubernetes, define application resources, and use core primitives to create, monitor, and troubleshoot scalable applications and tools in Kubernetes.
|
||||
* Certified Kubernetes Administrator (CKA): A certified Kubernetes administrator has demonstrated the ability to do the basic installation, configuration, and management of production-grade Kubernetes clusters. They understand critical concepts such as Kubernetes networking, storage, security, maintenance, logging and monitoring, application lifecycle, troubleshooting, and API primitives. A CKA can also establish primary use cases for end users.
|
||||
* Certified Kubernetes Security Specialist (CKS): Obtaining a CKS demonstrates possession of the requisite abilities to secure container-based applications and Kubernetes platforms during build, deployment, and runtime. A CKS is qualified to perform these tasks in a professional setting.
|
||||
* Cloud Foundry Certified Developer (CFCD) : CFCD certification is ideal for candidates who want to validate their skill set using the Cloud Foundry platform to deploy and manage applications.
|
||||
* FinOps Certified Practitioner (FOCP) : An FOCP will bring a strong understanding of FinOps, an operational framework combining technology, finance, and business to realize business and financial goals through cloud transformation. The practitioner supports and manages the FinOps lifecycle and manages the cost and usage of cloud resources in an organization.
|
||||
|
||||
All of these can be found in the [Linux Foundation training and certification catalog][13].
|
||||
|
||||
### Start your cloud-native journey in three steps
|
||||
|
||||
Now that you're equipped with all this information, you can choose the direction you want to take. If you're overwhelmed by the options, just go step by step:
|
||||
|
||||
1. Understand the basics: Due to the complex nature of most cloud-native technologies, someone new to this ecosystem should have preliminary knowledge of the core concepts. Basic knowledge of containerization, orchestration, cloud/infrastructure, and both monolithic and microservices architecture is a good start.
|
||||
2. Identify a cloud-native community or project: There are over [300 cloud-native communities][14] that exist today. It is a lot easier to break into the cloud-native community through these established groups. While some of these communities are initiatives to sustain cloud-native projects, others have projects that offer cloud-native services. You can begin your journey by participating in any of these communities. Research the groups and projects that align with your interest, then follow the onboarding steps and get familiar with the projects behind them.
|
||||
3. Find a niche within the community: Since most cloud-native communities are open source, the diverse skill of the community comes in handy. Explore the various opportunities that align with your skills and interest, whether that's frontend, backend, developer relations (DevRel), operations, documentation, program management, or community relations. It is easier to contribute to cloud-native projects with a well-defined niche according to your skills and experiences.
|
||||
|
||||
You now have a basic understanding of the cloud-native ecosystem, both from a technological and community point of view. You can further extend your knowledge now and get involved. And once you do, remember to share your journey with others in the spirit of open source!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/cloud-native-open-source-communities
|
||||
|
||||
作者:[Anita Ihuman][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/anita-ihuman
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/people_remote_teams_world.png
|
||||
[2]: https://opensource.com/article/19/11/microservices-cheat-sheet
|
||||
[3]: https://opensource.com/tags/devops
|
||||
[4]: https://opensource.com/resources/what-are-linux-containers
|
||||
[5]: https://www.cncf.io/
|
||||
[6]: https://landscape.cncf.io/
|
||||
[7]: https://glossary.cncf.io/
|
||||
[8]: https://enterprisersproject.com/kubernetes-glossary
|
||||
[9]: https://www.cncf.io/blog/2020/07/13/announcing-the-new-special-interest-group-on-contributor-strategy/
|
||||
[10]: https://community.cncf.io/
|
||||
[11]: https://training.linuxfoundation.org/training/introduction-to-kubernetes/
|
||||
[12]: https://training.linuxfoundation.org/training/introduction-to-cloud-infrastructure-technologies/
|
||||
[13]: https://training.linuxfoundation.org/full-catalog/
|
||||
[14]: https://landscape.cncf.io/?zoom=40
|
@ -0,0 +1,60 @@
|
||||
[#]: subject: "How I use LibreOffice keyboard shortcuts"
|
||||
[#]: via: "https://opensource.com/article/22/6/libreoffice-keyboard-shortcuts"
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How I use LibreOffice keyboard shortcuts
|
||||
======
|
||||
Keyboard shortcuts keep me focused on the content that I'm meant to deliver, and not its appearance.
|
||||
|
||||
![Programming keyboard.][1]
|
||||
|
||||
Image by: Opensource.com
|
||||
|
||||
I have used word processing software for as long as I can remember. When word processors moved from direct formatting to leveraging styles to change how text appears on the page, that was a big boost to my writing.
|
||||
|
||||
LibreOffice provides a wide variety of styles that you can use to create all kinds of content. LibreOffice applies paragraph styles to blocks of text, such as body text, lists, and code samples. Character styles are similar, except that these styles apply to inline words or other short text inside a paragraph. Use the **View -> Styles** menu, or use the **F11** keyboard shortcut, to bring up the Styles selector.
|
||||
|
||||
![Image of LibreOffice styles][2]
|
||||
|
||||
Using styles makes writing longer documents much easier. Consider this example: I write a lot of workbooks and training material as part of my consulting practice. A single workbook might be 40 or 60 pages long, depending on the topic, and can include a variety of content such as body text, tables, and lists. Some of my technical training material may also include source code examples.
|
||||
|
||||
I have a standard training set that I offer clients, but I do custom training programs too. When working on a custom program, I might start by importing text from another workbook, and working from there. Depending on the client, I might also adjust the font and other style elements to match the client's style preferences. For other materials, I might need to add source code examples.
|
||||
|
||||
To enter sample source code using direct formatting, I need to set the font and adjust the margins for each code block in the workbook. If I later decide that my workbook should use a different font for body text or source code samples, I would need to go back and change everything. For a workbook that includes more than a few code samples, this could require several hours to hunt down every source code example and adjust the font and margins to match the new preferred format.
|
||||
|
||||
However, by using styles, I can update the definition once to use a different font for the Text Body style, and LibreOffice Writer updates my document everywhere that uses the Text Body style. Similarly, I can adjust the font and margins for the Preformatted Text style, and LibreOffice Writer applies that new style to every source code example with the Preformatted Text style. This is the same for other blocks of text, including titles, source code, lists, and page headers and footers.
|
||||
|
||||
I recently had the bright idea to update the LibreOffice keyboard shortcuts to streamline my writing process. I've redefined **Ctrl**+**B** to set character style Strong Emphasis, **Ctrl**+**I** to set character style Emphasis, and **Ctrl**+**Space** to set No Character Style. This makes my writing much easier, as I don't have to pause my writing so I can highlight some text and select a new style. Instead, I can use my new **Ctrl**+**I** keyboard shortcut to set the Emphasis character style, which is essentially italics text. Anything I type after that uses the Emphasis style, until I press **Ctrl**+**Space** to reset the character style back to the default No Character Style.
|
||||
|
||||
![Image of LibreOffice character styles][3]
|
||||
|
||||
If you want to set this yourself, use **Tools > Customize,** then click on the Keyboard tab to modify your keyboard shortcuts.
|
||||
|
||||
![Image of LibreOffice keyboard customizations][4]
|
||||
|
||||
LibreOffice makes technical writing much easier with styles. And by leveraging keyboard shortcuts, I've streamlined how I write, keeping me focused on the content that I'm meant to deliver, and not its appearance. I might change the formatting later, but the styles remain the same.
|
||||
|
||||
Image by: (Jim Hall, CC BY-SA 40)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/6/libreoffice-keyboard-shortcuts
|
||||
|
||||
作者:[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/programming_keyboard_coding.png
|
||||
[2]: https://opensource.com/sites/default/files/2022-06/libreofficestyles.png
|
||||
[3]: https://opensource.com/sites/default/files/2022-06/libreofficecharstyles.png
|
||||
[4]: https://opensource.com/sites/default/files/2022-06/libreofficekeyboardcustom.png
|
@ -0,0 +1,43 @@
|
||||
[#]: subject: "Adobe Launches Open Source Toolkit To Contain Visual Misinformation"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Adobe 推出了开源工具包以减少视觉错误信息
|
||||
======
|
||||
![Adobe][1]
|
||||
|
||||
Adobe 设想了一个充满照片和视频的网络,照片和视频上标注关于它们来自哪里的信息。该公司的主要目标是减少视觉错误信息的传播,不过,该系统也可以使那些“希望将自己的名字与工作关联起来”的内容创作者受益。
|
||||
|
||||
Adobe 的 <ruby>内容真实性计划<rt>Content Authenticity Initiative</rt></ruby> (CAI) 项目于 2019 年首次宣布,此后,它发布了一份关于实现该目标的技术白皮书,将该系统集成了到自己的软件中,并与新闻编辑室和硬件制造商展开了合作,以帮助普及其愿景。
|
||||
|
||||
现在,该公司发布了一个由三部分组成的开源工具包,从而把该技术交到开发人员手中并投入使用。Adobe 的新开源工具包括用于开发“在浏览器中显示内容凭据”的 JavaScript SDK、命令行实用程序和用于开发桌面应用程序、移动应用程序和其他用于创建、查看和验证嵌入式内容凭据的 Rust SDK。
|
||||
|
||||
众所周知,照片的 EXIF 数据中记录了有关光圈和快门速度的信息,这个新标准也采用了这种方式,它还记录有关文件创建的信息,例如文件的创建和编辑方式。如果该公司的共同愿景成真,这些 Adobe 称之为“内容凭证”的元数据,将在社交媒体平台、图像搜索平台、图像编辑器、搜索引擎中广泛可见。
|
||||
|
||||
C2PA 是 Adobe 的 CAI 与 微软、索尼、英特尔、推特以及 BBC 等合作伙伴的合作成果。华尔街日报、尼康和美联社最近也加入了 Adobe 的这个计划,即将 <ruby>内容认证技术<rt>content authentication</rt></ruby> 更加广泛地应用。
|
||||
|
||||
有了这些新工具,社交媒体平台就可以使用 Adobe 的 JavaScript SDK,快速让平台上的所有图像和视频显示内容凭据,这些凭据将会在鼠标悬停时,显示为右上角的一个图标。因此,无需专门的团队和更大的软件构建,该实施可以由几个开发人员在几周内完成。
|
||||
|
||||
CAI 的主要目标是打击互联网上的视觉错误信息,比如那些扭曲乌克兰战争的旧图片的重新传播,或是臭名昭著的南希·佩洛西的“廉价假货”。不过,数字监管链也可能使“作品被盗或出售”的内容创作者受益,这个问题多年来一直困扰着视觉艺术家,现在也正在 NFT 市场引发问题。
|
||||
|
||||
根据 Parsons 的说法,CAI 还引起了那些“制作合成图像和视频”的公司的巨大兴趣。公司可以将原始元数据嵌入到我们从 DALL-E 等模型中看到的那种 AI 创作中,从而确保它提供的合成图像不会轻易被误认为是真实的东西。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者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/adobe.jpeg
|
@ -0,0 +1,37 @@
|
||||
[#]: subject: "Thunderbird, The Open Source Email Client, Is Coming To Android"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/"
|
||||
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
开源电子邮件客户端 Thunderbird 即将登陆 Android
|
||||
======
|
||||
![安卓开发者][1]
|
||||
|
||||
开源电子邮件客户端 Thunderbird 将通过 K-9 Mail Android 电子邮件应用项目登陆 Android,该项目与 Thunderbird 合并后的产品就是 Thunderbird Android 电子邮件应用。两年前,Thunderbird 被转移到了 Mozilla 基金会的子公司 MZLA Technologies Corporation 下,该公司的所有权结构与基金会子公司 Mozilla Corporation 旗下的 Firefox 类似。有了 OpenPGP 端到端加密和期待已久的移动应用等新功能,Thunderbird 项目能够开辟出一条自己的道路。
|
||||
|
||||
根据 Thunderbird 团队的说法,Thunderbird 产品经理 Ryan Lee Sipes 和 K-9 的主要维护者 Christian Ketterer,两人早在 2018 年就开始讨论可能的 Thunderbird 电子邮件应用合作了。到了 2022 年,两人决定不再让 Thunderbird 从头开始开发自己的应用程序,而是直接让 K-9 加入 Thunderbird。
|
||||
|
||||
Thunderbird 团队表示:“许多 Thunderbird 用户都要求在移动设备上获得 Thunderbird 体验,我们打算通过把 K-9 打造成令人惊叹的产品(并将其变成 Android 上的 Thunderbird)来提供这种体验。K-9 将补充提供 Thunderbird 体验,并增强它的使用场景和方式,让用户获得出色的电子邮件体验。我们对桌面 Thunderbird 的承诺没有改变,我们团队中的大多数人都致力于将其打造为一流的电子邮件客户端,并将保持这种状态。”
|
||||
|
||||
K-9 在 Google Play 上并不是特别受欢迎的电子邮件应用,但它已经获得了 500 万次下载。K-9 Mail 的路线图目前包括:使用 Thunderbird 帐户自动配置的帐户设置、改进的文件夹管理、消息过滤器支持,以及桌面和移动 Thunderbird 之间的同步。虽然 Thunderbird 知道人们对 iOS 版 Thunderbird 应用程序也很感兴趣,但在常见问题解答(FAQ)中,该项目仅声明它正在“评估”这种可能性。
|
||||
|
||||
Thunderbird 团队还打算将 Firefox Sync 作为一种在 Thunderbird 和 K-9 Mail 之间同步帐户的方法。它应该会在 2023 年夏天正式投入使用。该项目还在研究将哪些 Thunderbird 功能引入 Android 应用程序,例如日历、任务、提要和聊天支持等。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/
|
||||
|
||||
作者:[Laveesh Kocher][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者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/android-developer.jpg
|
@ -1,138 +0,0 @@
|
||||
[#]: subject: "7 pieces of Linux advice for beginners"
|
||||
[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners"
|
||||
[#]: author: "Opensource.com https://opensource.com/users/admin"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lightchaserhy"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
给Linux初学者的7条建议
|
||||
======
|
||||
我们咨询了社区Linux专家分享他们的初学经验。
|
||||
|
||||
![Why the operating system matters even more in 2017][1]
|
||||
|
||||
对Linux的新用户有什么建议?我们咨询了社区专家分享他们初学时的最佳经验。
|
||||
|
||||
### 1.用好Linux资源
|
||||
|
||||
我哥们儿告诉我Linux就像一个“软件积木搭建套装”(相当于50到60年代流行的建筑积木玩具),这个比喻比较恰当。在2001年和2002年,我曾经利用Windows3.1 和Windows NT,尝试搭建安全易用的K12学校区域网站,当时网上可用的资料不多。其中被推荐的“ROOT用户指南”是一本“大部头”专业教程,信息丰富但是有一定上手难度。
|
||||
|
||||
于我而言,Mandrake Linux的线上课程是最有用的资源。课程对使用和管理Linux桌面或服务器进行了详细的解读。我通过课程学习同时利用 Red Hat网站的列表资源进行实验,有问题时就在社区提问寻求帮助。
|
||||
|
||||
—— [Don Watkins][2]
|
||||
|
||||
### 2.在Linux社区寻求帮助
|
||||
|
||||
我的建议是要多问,你可以从网上搜索信息开始,看看其他人类似的问题(甚至是更好的提问)。问什么和如何问需要花一定时间熟悉。
|
||||
|
||||
一旦你更加熟悉Linux,查看你感兴趣的各种相关论坛,在提问前,先看看是否有人已经提过相同问题,并获得了答案。
|
||||
|
||||
加入一个邮件小组也很有用,最后你会发现自己也能专业地答复提问。正如他们说,通过回答他人的问题也会学到更多知识。
|
||||
|
||||
同时,你会越来越熟悉这个操作系统内部运行机制,再也不是初学时的一无所知。
|
||||
|
||||
—— [Greg Pittman][3]
|
||||
|
||||
我的建议是利用man、info等帮助命令获取信息。当然,尽可能花时间熟悉命令行界面且真正理解UNIX的设计理念。事实上,我最喜欢的书之一就是一本80年代的UNIX书籍,对理解文件、目录、设备、基础命令等非常有帮助。
|
||||
|
||||
—— [Alan Formy-Duval][4]
|
||||
|
||||
我最好的建议是充分相信社区的答复以及关于详细介绍“如何”使用不同选项的操作手册。无论如何,我在2009年左右开始学习,当时有很多可用的工具和资源,包括一个叫“Linux from Scratch(LFS)”的项目,从源码开始创建Linux系统,在这个项目我学会了很多内部原理知识和创建一个LFS镜像。
|
||||
|
||||
—— [Sumantro Mukherjee][6]
|
||||
|
||||
我的建议是泛读。利用像“Ask Fedora”、“the Fedora Matrix chat”等论坛,阅读他人的经验观点,并且尝试实践。我通过阅读他人的网上争论学习到很多东西,特别是要清楚问题产生的原因。
|
||||
|
||||
—— [Steve Morris][8]
|
||||
|
||||
### 3.安装双操作系统
|
||||
|
||||
我在90年代末就开始安装双操作系统(Windows和Linux),当我想学习Linux操作系统时,便重启工作时使用的Windows系统。最好的建议之一是改变计算机系统启动顺序(默认进入Windows),避免启动时因为手速不快,自动进入Linux系统还得重启。:)
|
||||
|
||||
—— [Heike Jurzik][9]
|
||||
|
||||
我的挑战来自于团队工作,做一个知识交换平台。
|
||||
|
||||
我们的Linux系统管理员利用Joomla搭建网站,Joomla是我们web团队研发的内容管理系统,管理员也想了解这个系统,我打算采用Linux服务器(以前一直是用Windows)。
|
||||
|
||||
我们一开始就安装双操作系统,因为有大量依赖操作系统的业务软件,但这促使了我要采用Linux。在我们各自学习新系统时,成员都作为专家互相鼓励、交流非常有助于共同成长,“一个都不能少!”,坚持不懈是一个很大的挑战。
|
||||
|
||||
我经历一个相当尴尬的低级错误后,在显示器上贴了一个大便签,上面写着“在使用任何rm操作前,首先要思考一下”。管理员给我写了一个命令行大全(网上有很多类似资料),对于熟悉基础操作非常有用。我开始使用Ubuntu的桌面环境时,发现初学者在图像化的操作界面能快速上手。
|
||||
|
||||
从那以后我就开始长期使用Linux(除了我的工作计算机),管理员仍然忙于 Joomla,看起来我俩都得到了成长。
|
||||
|
||||
—— [Ruth Cheesley][12]
|
||||
|
||||
### 4.为了安全请先备份
|
||||
|
||||
我的建议是使用一个简单且专业的备份软件发行版。一般新的Linux用户将创建、编辑、破坏和恢复系统配置。当操作系统无法启动、丢失数据时,会让他们非常沮丧。
|
||||
|
||||
有了备份软件,他们的数据就有了保障。
|
||||
|
||||
我们都喜爱Linux,因为它能让我们自由飞翔,但这是“双刃剑”,使用不当也有可能发生非常严重的错误。
|
||||
|
||||
—— [Giuseppe Cassibba][13]
|
||||
|
||||
### 5.分享你的Linux经验
|
||||
|
||||
我的建议是分享你的Linux使用经验。我曾经认为新的发行版本更适合新用户,所以当他们咨询Linux时,我总是推荐新的发行版。但是当我坐在他们的计算机前,发现似乎眼前的Linux系统从未看见过,因为一些新功能我也不熟悉。现在当有人咨询时,我会推荐自己使用的版本,虽说这不一定是初学者的最佳版本,但毕竟我最熟悉,他们遇到的问题我就能够快速解决(当然我自己也会在分享中学到新东西)。
|
||||
|
||||
—— [Seth Kenlon][14]
|
||||
|
||||
以前有句俗话叫“不要随便使用杂志封面上宣传的发行版,使用你朋友都在用的,当你遇到问题时才能更好地需求帮助”。将关键词“杂志封面”替换为“互联网”,这句话依然有效:-) 。我从未听从过这个建议,所以我是50公里半径内唯一使用Linux的人,周围都在用 FreeBSD、 IRIX、 Solaris和 Windows 3.11等操作系统,最后我就是那个寻求Linux帮助的人。
|
||||
|
||||
—— [Peter Czanik][15]
|
||||
|
||||
### 6. 6.坚持学习Linux
|
||||
|
||||
在到Red Hat工作前我是一名分销商合作伙伴,我有几个带旅行护士的家庭健康代理机构客户,他们使用了一个叫“Carefacts”的软件包,最初用于DOS,在旅行笔记本电脑和中心数据库同步中总是出错。
|
||||
|
||||
早期我听到的最好建议是认真关注开源运动。开源在2022年是主流思想,但在一代人以前,从Red Hat的零售商购买Linux安装光盘是带有革命性的创新行为。开源打破了常规,我认为要客观看待开源,但确实惊叹到了相当一部分人。
|
||||
|
||||
我的公司在20世纪90年代中期搭建了第一个客户防火墙,基于Windows NT和Altavista的一个产品,但是经常发生错误崩溃。我们自己又搭建了一个基于Linux的防火墙,再也没有出问题了。因此,我们用Linux替换了那套客户Altavista系统,稳定地运行了多年。我们在1999年底搭建了另一个客户防火墙,当时我花三周读完了一本关书,关于数据包过滤和ipchains的正确使用,当我完成时感觉超赞,解决了所有问题。在接下来的15年,我搭建安装了数百个防火墙系统,主要采用iptables技术,有些利用桥接器或ARP代理以及QOS保障视频会议传输,有些利用IPSEC和 OpenVPN tunnels。我靠管理个人防火墙和一些双机热备系统赚取生活所需费用,非常不错,而以前都是用的Windows系统。我甚至还建了一些虚拟防火墙。
|
||||
|
||||
但是技术在高速发展,2022年,iptables已过时,我以前的防火墙技术也成了美好的回忆。目前的经验之谈?永远不要停止探索。
|
||||
|
||||
—— [Greg Scott][19]
|
||||
|
||||
### 7.享受过程
|
||||
|
||||
耐心点,Linux和之前你熟悉的操作系统不太相同,准备拥抱一个充满无限可能的新世界,尽情享受吧。
|
||||
|
||||
—— [Alex Callejas][20]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/5/linux-advice-beginners
|
||||
|
||||
作者:[Opensource.com][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lightchaserhy](https://github.com/lightchaserhy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/admin
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png
|
||||
[2]: https://opensource.com/users/don-watkins
|
||||
[3]: https://opensource.com/users/greg-p
|
||||
[4]: https://opensource.com/users/alanfdoss
|
||||
[5]: https://linuxfromscratch.org/
|
||||
[6]: https://opensource.com/users/sumantro
|
||||
[7]: https://ask.fedoraproject.org
|
||||
[8]: https://opensource.com/users/smorris12
|
||||
[9]: https://opensource.com/users/hej
|
||||
[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet
|
||||
[11]: https://opensource.com/article/22/2/why-i-love-linux-kde
|
||||
[12]: https://opensource.com/users/rcheesley
|
||||
[13]: https://opensource.com/users/peppe8o
|
||||
[14]: https://opensource.com/users/seth
|
||||
[15]: https://opensource.com/users/czanik
|
||||
[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan
|
||||
[17]: https://opensource.com/article/21/8/openvpn-server-linux
|
||||
[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
[19]: https://opensource.com/users/greg-scott
|
||||
[20]: https://opensource.com/users/darkaxl
|
@ -0,0 +1,297 @@
|
||||
[#]: subject: "Learn the Lisp programming language in 2021"
|
||||
[#]: via: "https://opensource.com/article/21/5/learn-lisp"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "lkxed"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
一起来学习 Lisp 编程语言吧!
|
||||
======
|
||||
许多大型代码库中都有 Lisp 代码的身影,因此,熟悉一下这门语言是一个明智之举。
|
||||
|
||||
![科技和计算领域的女性][1]
|
||||
|
||||
图源:kris krüg
|
||||
|
||||
Lisp 在 1958 年就被发明出来了,它是世界上第二老的计算机编程语言(LCTT 译注:最老的是 Fortran,诞生于 1957 年)。它有许多现代的衍生品,包括 Common Lisp、Emacs Lisp(Elisp)、Clojure、Racket、Scheme、Fennel 和 GNU Guile 等。
|
||||
|
||||
那些喜欢思考编程语言设计的人,往往都喜欢 Lisp,因为它的语法和数据有者相同的结构:Lisp 代码实际上是<ruby>一个列表的列表<rt>a list of lists</rt></ruby>,它的名字其实是 <ruby>“列表处理”<rt>LISt Processing</rt></ruby> 的首字母缩写。那些喜欢思考编程语言美学的人,往往都讨厌 Lisp,因为它经常使用括号来定义范围;事实上,编程界也有一个广为流传的笑话:Lisp 代表的其实是 <ruby>“大量烦人的多余括号”<rt>Lots of Irritating Superfluous Parentheses</rt></ruby>。
|
||||
|
||||
不管你是喜欢还是讨厌 Lisp 的设计哲学,你都不得不承认,它都是一门有趣的语言,过去如此,现在亦然(这得归功于现代方言 Clojure 和 Guile)。你可能会感到惊讶,但事实就是,Lisp 在任何行业的大型代码库中都占有一席之地。因此,现在开始学习 Lisp,至少熟悉一下它,不失为一个好主意。
|
||||
|
||||
### 安装 Lisp
|
||||
|
||||
Lisp 有很多不同的实现。比较流行的开源版本有 [SBCL][2]、[GNU Lisp][3] 和 [GNU Common Lisp][4](GCL)。你可以使用发行版的包管理器安装它们中的任意一个,在本文中,我是用的是 `clisp`(LCTT 译注:也就是 GNU Lisp,一种 ANSI Common Lisp 的实现)。
|
||||
|
||||
以下是在不同的 Linux 发行版中安装 `clisp` 的步骤。
|
||||
|
||||
在 Fedora Linux 上,使用 `dnf`:
|
||||
|
||||
```
|
||||
$ sudo dnf install clisp
|
||||
```
|
||||
|
||||
在 Debian 上,使用 `apt`:
|
||||
|
||||
```
|
||||
$ sudo apt install clisp
|
||||
```
|
||||
|
||||
在 macOS 上,使用 [MacPorts][5] 或者 [Homebrew][6]:
|
||||
|
||||
```
|
||||
# 使用 MacPorts
|
||||
$ sudo port install clisp
|
||||
|
||||
# 使用 Homebrew
|
||||
$ brew install clisp
|
||||
```
|
||||
|
||||
在 Windows 上,你可以使用 [clisp on Cygwin][7] 或者从 [gnu.org/software/gcl][8] 上下载 GCL 的二进制文件。
|
||||
|
||||
虽然我使用 `clisp` 命令来运行 Lisp 代码,但是本文中涉及到的大多数语法规则,对任何 Lisp 实现都是适用的。如果你选择使用一个不同的 Lisp 实现,除了用来运行 Lisp 代码的命令会和我不一样外(比如,你可能要用 `gcl` 或 `sbcl` 而不是 `clisp`),其它的所有东西都是相同的。
|
||||
|
||||
### 列表处理
|
||||
|
||||
Lisp 源代码的基本单元是 <ruby>“表达式”<rt>expression</rt></ruby>,它在形式上是一个列表。举个例子,下面就是一个列表,它由一个操作符(`+`)和两个整数(`1` 和 `2`)组成的:
|
||||
|
||||
```
|
||||
(+ 1 2)
|
||||
```
|
||||
|
||||
同时,它也是一个 Lisp 表达式,内容是一个符号(`+`,会被解析成一个加法函数)和它的两个参数(`1` 和 `2`)。你可以在 Common Lisp 的交互式环境(即 REPL)中运行该表达式和其它表达式。如果你熟悉 Python 的 IDLE,那么你应该会对 Lisp 的 REPL 感到亲切。(LCTT 译注:REPL 的全称是 “Read-Eval-Print Loop”,意思是 “‘读取-求值-输出’循环”,这个名字很好地描述了它的工作过程。)
|
||||
|
||||
要进入到 REPL 中,只需运行 Common Lisp 即可:
|
||||
|
||||
```
|
||||
$ clisp
|
||||
[1]>
|
||||
```
|
||||
|
||||
在 REPL 提示符中,尝试输入一些表达式:
|
||||
|
||||
```
|
||||
[1]> (+ 1 2)
|
||||
3
|
||||
[2]> (- 1 2)
|
||||
-1
|
||||
[3]> (- 2 1)
|
||||
1
|
||||
[4]> (+ 2 3 4)
|
||||
9
|
||||
```
|
||||
|
||||
### 函数
|
||||
|
||||
在了解了 Lisp 表达式的基本结构后,你可以使用函数来做更多有用的事。譬如,`print` 函数可以接受任意数量的参数,然后把它们都显示在你的终端上,`pprint` 函数还可以实现格式化打印。还有更多不同的打印函数,不过,`pprint` 在 REPL 中的效果还挺好的:
|
||||
|
||||
```
|
||||
[1]> (pprint "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[2]>
|
||||
```
|
||||
|
||||
你可以使用 `defun` 函数来创建一个自定义函数。`defun` 函数需要你提供自定义函数的名称,以及它接受的参数列表:
|
||||
|
||||
```
|
||||
[1]> (defun myprinter (s) (pprint s))
|
||||
MYPRINTER
|
||||
[2]> (myprinter "hello world")
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
### 变量
|
||||
|
||||
你可以使用 `setf` 函数来在 Lisp 中创建变量:
|
||||
|
||||
```
|
||||
[1]> (setf foo "hello world")
|
||||
"hello world"
|
||||
[2]> (pprint foo)
|
||||
|
||||
"hello world"
|
||||
|
||||
[3]>
|
||||
```
|
||||
|
||||
你可以往表达式里嵌套表达式(就像使用某种管道一样)。举个例子,你可以先使用 `string-upcase` 函数,把某个字符串的所有字符转换成大写,然后再使用 `pprint` 函数,将它的内容格式化打印到终端上:
|
||||
|
||||
```
|
||||
[3]> (pprint (string-upcase foo))
|
||||
|
||||
"HELLO WORLD"
|
||||
|
||||
[4]>
|
||||
```
|
||||
|
||||
Lisp 是动态类型语言,这意味着,你在给变量赋值时不需要声明它的类型。Lisp 默认会把整数当作整数来处理:
|
||||
|
||||
```
|
||||
[1]> (setf foo 2)
|
||||
[2]> (setf bar 3)
|
||||
[3]> (+ foo bar)
|
||||
5
|
||||
```
|
||||
|
||||
如果你想让整数被当作字符串来处理,你可以给它加上引号:
|
||||
|
||||
|
||||
```
|
||||
[4]> (setf foo "2")
|
||||
"2"
|
||||
[5]> (setf bar "3")
|
||||
"3"
|
||||
[6]> (+ foo bar)
|
||||
|
||||
*** - +: "2" is not a number
|
||||
The following restarts are available:
|
||||
USE-VALUE :R1 Input a value to be used instead.
|
||||
ABORT :R2 Abort main loop
|
||||
Break 1 [7]>
|
||||
```
|
||||
|
||||
在这个示例 REPL 会话中,变量 `foo` 和 `bar` 都被赋值为加了引号的数字,因此,Lisp 会把它们当作字符串来处理。数学运算符不能够用在字符串上,因此 REPL 进入了调试器模式。想要跳出这个调试器,你需要按下 `Ctrl+D` 才行(LCTT 译注:就 `clisp` 而言,使用 `quit` 关键字也可以退出)。
|
||||
|
||||
你可以使用 `typep` 函数对一些对象进行类型检查,它可以测试对象是否为某个特定数据类型。返回值 `T` 和 `NIL` 分别代表 `True` 和 `False`。
|
||||
|
||||
```
|
||||
[4]> (typep foo 'string)
|
||||
NIL
|
||||
[5]> (typep foo 'integer)
|
||||
T
|
||||
```
|
||||
|
||||
`string` 和 `integer` 前面加上了一个单引号(`'`),这是为了防止 Lisp(错误地)把这两个单词当作是变量来求值:
|
||||
|
||||
```
|
||||
[6]> (typep foo string)
|
||||
*** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value
|
||||
[...]
|
||||
```
|
||||
|
||||
这是一种保护某些术语(LCTT 译注:类似于字符串转义)的简便方法,正常情况下它是用 `quote` 函数来实现的:
|
||||
|
||||
```
|
||||
[7]> (typep foo (quote string))
|
||||
NIL
|
||||
[5]> (typep foo (quote integer))
|
||||
T
|
||||
```
|
||||
|
||||
### 列表
|
||||
|
||||
不出人意料,你当然也可以在 Lisp 中创建列表:
|
||||
|
||||
```
|
||||
[1]> (setf foo (list "hello" "world"))
|
||||
("hello" "world")
|
||||
```
|
||||
|
||||
你可以使用 `nth` 函数来索引列表:
|
||||
|
||||
```
|
||||
[2]> (nth 0 foo)
|
||||
"hello"
|
||||
[3]> (pprint (string-capitalize (nth 1 foo)))
|
||||
|
||||
"World"
|
||||
```
|
||||
|
||||
### 退出 REPL
|
||||
|
||||
要结束一个 REPL 会话,你需要按下键盘上的 `Ctrl+D`,或者是使用 Lisp 的 `quit` 关键字:
|
||||
|
||||
```
|
||||
[99]> (quit)
|
||||
$
|
||||
```
|
||||
|
||||
### 编写脚本
|
||||
|
||||
Lisp 可以被编译,也可以作为解释型的脚本语言来使用。在你刚开始学习的时候,后者很可能是最容易的选项,特别是当你已经熟悉 Python 或 [Shell 脚本][9] 时。
|
||||
|
||||
下面是一个用 Common Lisp 编写的简单的“掷骰子”脚本:
|
||||
|
||||
```
|
||||
#!/usr/bin/clisp
|
||||
|
||||
(defun roller (num)
|
||||
(pprint (random (parse-integer (nth 0 num))))
|
||||
)
|
||||
|
||||
(setf userput *args*)
|
||||
(setf *random-state* (make-random-state t))
|
||||
(roller userput)
|
||||
```
|
||||
|
||||
脚本的第一行注释告诉了你的 POSIX 终端,该使用什么可执行文件来运行这个脚本。
|
||||
|
||||
`roller` 函数使用 `defun` 函数创建,它在内部使用 `random` 函数来打印一个伪随机数,这个伪随机数严格小于 `num` 列表中下标为 0 的元素。在脚本中,这个 `num` 列表还没有被创建,不过没关系,因为只有当脚本被调用时,函数才会执行。
|
||||
|
||||
接下来的那一行,我们把运行脚本时提供的任意参数,都赋值给一个叫做 `userput` 的变量。这个 `userput` 变量是一个列表,当它被传递给 `roller` 函数后,它就会变成参数 `num`。
|
||||
|
||||
脚本的倒数第二行产生了一个“随机种子”。这为 Lisp 提供了足够的随机性来生成一个几乎随机的数字。
|
||||
|
||||
最后一行调用了自定义的 `roller` 函数,并将 `userput` 列表作为唯一的参数传递给它。
|
||||
|
||||
将这个文件保存为 `dice.lisp`,并赋予它可执行权限:
|
||||
|
||||
```
|
||||
$ chmod +x dice.lisp
|
||||
```
|
||||
|
||||
最后,运行它,并给它提供一个数字,以作为它选择随机数的最大值:
|
||||
|
||||
```
|
||||
$ ./dice.lisp 21
|
||||
|
||||
13
|
||||
$ ./dice.lisp 21
|
||||
|
||||
7
|
||||
$ ./dice.lisp 21
|
||||
|
||||
20
|
||||
```
|
||||
|
||||
看起来还不错!
|
||||
|
||||
你或许注意到,你的模拟骰子有可能会是 0,并且永远达不到你提供给它的最大值参数。换句话说,对于一个 20 面的骰子,这个脚本永远投不出 20(除非你把 0 当作 20)。有一个简单的解决办法,它只需要用到在本文中介绍的知识,你能够想到吗?
|
||||
|
||||
### 学习 Lisp
|
||||
|
||||
无论你是想将 Lisp 作为个人脚本的实用语言,还是为了助力你的职业生涯,抑或是仅仅作为一个有趣的实验,你都可以去看看一年一度(LCTT 译注:应该是两年一度)的 [Lisp <ruby>游戏果酱<rt>Game Jam</rt></ruby>][11],从而收获一些特别有创意的用途(其中的大多数提交都是开源的,因此你可以查看代码以从中学习)。
|
||||
|
||||
Lisp 是一门有趣而独特的语言,它有着不断增长的开发者用户群、足够悠久的历史和新兴的方言,因此,它有能力让从事各个行业的程序员都满意。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/learn-lisp
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[lkxed](https://github.com/lkxed)
|
||||
校对:[校对者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/OSDC_women_computing_4.png
|
||||
[2]: http://sbcl.org
|
||||
[3]: http://clisp.org
|
||||
[4]: https://www.gnu.org/software/gcl/
|
||||
[5]: https://opensource.com/article/20/11/macports
|
||||
[6]: https://opensource.com/article/20/6/homebrew-linux
|
||||
[7]: https://cygwin.fandom.com/wiki/Clisp
|
||||
[8]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable
|
||||
[9]: https://opensource.com/article/20/4/bash-programming-guide
|
||||
[10]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[11]: https://itch.io/jam/spring-lisp-game-jam-2021
|
Loading…
Reference in New Issue
Block a user