California’s Endless Fog Is Finally Clearing

© Tayfun Coskun/Anadolu, via Getty Images

© Tayfun Coskun/Anadolu, via Getty Images

© Eitan Abramovich/Agence France-Presse — Getty Images


© Jamie Kelter Davis for The New York Times

© Kiana Hayeri for The New York Times
The craft of the blacksmith goes back long before the Iron Age, but once our ancestors had learned to work cast iron (by turning it first into wrought iron), in about 1200 BCE, it became one of the key crafts in many societies. It’s also the only craft represented by a deity in the classical Greek pantheon, in the god Hephaistos, translated by the Romans to Vulcan.
He had the misfortune to have been born lame, as a result of which Hera tried to be rid of him, and threw him into the sea. He was there cared for by Thetis and others. He later assumes his role as the god of fire, volcanoes, and crafts allied to blacksmithing, including sculpture.

In paintings, Vulcan is characteristically seen in his forge, as in Tintoretto’s painterly Vulcan’s Forge (1578), one of four mythological paintings he made for the Atrio Quadrato in the Palazzo Ducale in Venice. Tintoretto was clearly familiar with the division of labour in a blacksmith’s workshop. The two well-muscled men wielding large hammers are strikers, whose brute force is more important. Vulcan is the older man at the left, who strikes the casting with his small hammer to tell them where theirs should strike.

Homer’s story of the adulterous affair of the wife of Hephaistos, Aphrodite (Venus), with Ares (Mars) is retold by Ovid in his Metamorphoses, the likely source for Diego Velázquez’s The Forge of Vulcan from 1630. This shows Apollo, at the left, visiting Hephaistos (to the right of Apollo) in his forge, to tell him about this infidelity.

Homeric Laughter (1909) is one of Lovis Corinth’s most complex, even abstruse, paintings of classical myth. He provides a good clue as to its interpretation in his inscription (originally in German translation):
unquenchable laughter arose among the blessed gods as they saw the craft of wise Hephaistos
together with the reference to Homer’s Odyssey book 8 line 326.
In this first version, Corinth shows Aphrodite recumbent on the bed, shielding her eyes from the crowd around her. Ares struggles with the net securing the couple, looking frustrated. Hephaistos, clad in black with his tools slung around his waist, is talking to Poseidon (who wears a crown) with Dionysos/Bacchus behind him (clutching a champagne glass). At the right edge is Hermes/Mercury, with his winged helmet. Sundry putti are playing with Ares’ armour, and an arc of putti adorns the sky.
The blacksmith also features in some accounts of the origin of Pandora.

John Dixon Batten’s The Creation of Pandora was painted anachronistically in egg tempera on a fresco ground by 1913. Batten was one of the late adherents of the Pre-Raphaelite movement, and is now almost forgotten. This work had been put into storage in 1949 and wasn’t rediscovered until 1990.
Pandora is at the centre, having just been fashioned out of earth by Hephaestus, who stands at the left, his foot on his anvil. Behind them, other blacksmiths work metal in his forge. At the right, Athena is about to place her gift of a robe about Pandora’s figure, and other gods queue behind to offer their contributions.
There are several fine paintings of regular blacksmiths at work over the centuries. The earliest I have been able to locate is a disturbing detail in the central panel of Hieronymus Bosch’s triptych The Last Judgment from about 1495-1505.

Among the torments featured in the centre panel are painful punishments in the blacksmith’s at the top.

Francisco Goya’s Forge from 1817 is a superb depiction of the physically demanding work of the blacksmith. Its extensive use of black is also a herald of the Black Period to come in Goya’s paintings at the end of that decade.

Sisley’s Forge at Marly-le-Roi from 1875 shows the village blacksmiths still at work long after the Industrial Revolution brought steam-powered hammers.

Ernst Josephson’s Spanish Blacksmiths from 1882 shows a smith in the shredded remains of his white shirt, and his striker to the right in his black waistcoat, with a horseshoe hanging below the roof of their forge in Seville.

Döme Skuteczky’s painting In the Smithy from 1897 shows another smithy, this time in Slovakia.
These days, across much of Europe the traditional blacksmith earns their keep from forging horseshoes for the many horses ridden for pleasure.
Until the Industrial Revolution brought the wide availability of iron, and even well into the twentieth century, the carpenter who worked wonders in wood was one of the key trades. It’s thus odd that remarkably few paintings show carpenters at work, at least until the middle of the nineteenth century.
They also play no role in the best-known classical myths, with the exception of one painting by Piero di Cosimo.

Piero sometimes assembled his own mythical narratives, such as that in Vulcan and Aeolus from about 1490. From the left the figures are a river god, Vulcan forging a horseshoe, a figure (possibly Aeolus, keeper of the winds) riding a horse, a man curled asleep in a foetal position, a couple and their infant son, and four carpenters erecting the frame of a building. Among the animals are a giraffe and a camel. It’s thought this shows early humans developing crafts at the dawn of civilisation.
Christian religious painting has a better opportunity, with Joseph, husband of the Virgin Mary, the most famous carpenter in European history.

Tintoretto’s Annunciation is thought to have been painted in about 1582. Its composition is unusual by any contemporary standards, with natural rendering of brickwork, a wicker chair, and a splendidly realistic carpenter’s yard at the left. This is coupled with an aerial swarm of infants, at the head of which is the dove of the Holy Ghost in a small mandorla. Christ’s origins are here very real, tangible, and contemporary, in stark contrast to most traditional depictions of this scene.

John Everett Millais’ painting of Christ in the House of His Parents, also known as The Carpenter’s Shop, is one of the foundational paintings of the Pre-Raphaelite Brotherhood, from 1849-50. It was exhibited at the Royal Academy in 1850 with a quotation from the Old Testament book of Zechariah 13:6: “And one shall say unto him, What are those wounds in thine hands? Then he shall answer, Those with which I was wounded in the house of my friends.” It shows an entirely imagined scene, one not even alluded to in the Gospels, in which the young Jesus Christ is being comforted by his kneeling mother, after he has cut the palm of his left hand on a nail.
It’s rich with symbols of Christ’s life and future crucifixion: the cut on his palm is one of the stigmata, and blood dripped from that onto his left foot is another. The young Saint John the Baptist has fetched a bowl of water, indicating his future baptismal role. A triangle above Christ’s head symbolises the Trinity, and a white dove perched on the ladder is the Holy Spirit. A flock of sheep outside represents the Christian flock.

In William Holman Hunt’s later painting of The Shadow of Death from 1870-73, the young Jesus Christ is seen in his father’s carpentry workshop, holding his arms up to savour the bright sunlight. His cast shadow on the rack of tools and wall behind shows him crucified on the cross, with his mother Mary already on her knees, as shown in so many paintings of the crucifixion.
Christian allusions to carpentry became more popular from the start of the nineteenth century.

William Blake’s The Christ Child Asleep on the Cross, or Our Lady Adoring the Infant Jesus Asleep on the Cross from 1799-1800 is among the few of his glue tempera paintings that has retained its colours. This shows at best an apocryphal if not invented scene, in which the young Jesus anticipates his eventual fate by sleeping on a wooden cross, surrounded by the carpenter’s tools, including compasses or dividers.

Fritz von Uhde’s A Difficult Journey from 1890 imagines Joseph and the pregnant Mary walking on a rough muddy track to Bethlehem, in a wintry European village. Joseph has his carpenter’s saw on his back as the tired couple move on through dank mist.

There’s a more complex story behind Hans Andersen Brendekilde’s People by a Road from 1893. The group at the left are old road-workers, breaking larger rocks into coarse gravel. They lived out under the wooden shelter behind them, as they made their way slowly around the country roads. The woman holds what is either a small shovel or spade used in their work. Standing and apparently preaching to them is a cleanly dressed carpenter, his saw held in his left hand. The building behind them, on the opposite side of the road, is a church, from which a large congregation has just emerged.

This association with the Holy Family may extend to Erik Henningsen’s Evicted from 1892 with its family of four being evicted into the street in the winter snow. With them are their meagre possessions, including a saw suggesting the father may be a carpenter. In the background he is still arguing with a policeman.
It was only then, at the end of the nineteenth century, that artists started to paint portraits of carpenters at work.

In 1891 Laurits Andersen Ring painted these Workers at a Water Pipe at Søndersø, in the north of the central Danish island of Fyn (Funen). Two are skilled carpenters, who are sawing a plank of wood to be used in the construction work in progress behind them. The third worker, in his light blue jacket, wears rubber overboots on his wooden clogs, implying he has been working down in the trench. This is one of a series painted by Ring showing trades and crafts.

微信最近有了点新「动静」。
点开朋友发来的最新旅游打卡照,照片中的人能自己动起来,快门前后的几秒动态就这样跃然屏上。

在实况照片发得最多的小红书上,还能看到一种更新的玩法:三张动态照片被拼在一起,就像电影的分镜头那样。

实况照片(Live Photo)不是个新东西,满打满算也已经出现 10 年了,但直到最近两年,实况照片才火遍社交媒体,成为一种影像的新范式。
而这背后,是一个枯萎技术被重新发明灌溉开花的故事。
2015 年,苹果发布 iPhone 6s,将实况照片带到了这个世界上。
不过,以现在的眼光来看,实况照片这个功能更像是为 3D Touch 屏幕压感技术这碟醋包的饺子——用力按下屏幕,照片就会动起来。

但随后几年里,实况照片并没有引起用户太多注意。其中最大的问题有三个:
很多摄影爱好者都是「到手关」这个功能,避免影响拍照体验,还占用宝贵的存储空间。在这七八年的时间里,实况照片都是这样一个食之无味、弃之可惜的功能,没什么再创作的空间,也一直缺乏分享的方式。随着 3D Touch 被砍掉,实况照片被遗忘在历史的角落。
转折点出现在了 2022 年,小红书正式支持了实况照片的发布,两年后成为「影像」内容搜索绝对量最高的关键词,和「长焦」「滤镜」等影像功能并列成为新的创作趋势。

▲ 左图来自《小红书「影像赛道」趋势详解,挖掘1.8亿数码人群中的生意机会》
右图来自《Trends 趋势|小红书《五大影像功能洞察图鉴》首发》
对于小红书而言,支持实况照片更多是图文平台适应短视频潮流的求变,是为了留住核心 iPhone 用户的手段,是无数更新中极小的一环。
但对实况照片而言,这却是一场文艺复兴——因为人们表达自我的方式,已经悄无声息地发生了改变。
2012 年到 2022 年之间,是智能手机和移动社交媒体快速崛起的年代,手机逐渐取替相机,成为最广泛的拍照设备,而如何用手机拍出一张好照片并且晒出来,成为上一个时代社交媒体内容的主流,一言以蔽之就是:精致,构图、修图、文案都要经过精心处理和选择。
但随着「精致」的内容泛滥,真实的内容可见度越来越低,当大家对精美的东西习以为常的时候,朴实无华的分享,就成了稀缺品。在当下,「活人感」成为了最受热捧的氛围。

又有什么能比 Live 图更「Live」呢?
画面可以不美,构图可以不巧,「此时此刻」的状态和情绪最重要,自然流露才是实况照片的感染力所在。
照片单调,视频漫长,实况照片则居二者之间,捕捉转瞬即逝的个个瞬间。
但当大家重新捡起来实况照片这个玩法,才发现手机上七八年前的功能,其实已经相当落后——实况照片分辨率低、Android 手机不能分享、封面帧还会掉算法,当用户想好好发点 Live 图的时候,工具已经跟不上创作欲了。
需要有人重新发明实况照片。
手机厂商们很快就嗅到了机会,纷纷在新机中落地实况照片功能,并持续打磨、创造新的范式,让这个原本有些掉队的老功能焕发新生机。
而 OPPO 则是其中最具代表性的存在。
第一场改变发生在 Reno 系列上。OPPO Reno12 手机首次引入了实况照片功能,并且与小红书达成合作,成为了首台能够将实况照片分享到第三方平台的 Android 手机。

这个「首台」的意义不仅限于 OPPO Reno12 本身,更重要的是在这个曾经专属于苹果的分享生态,撕开了一个口子,整个行业立马跟上,不能拍实况照片的手机,一下子就过气了。
除了能拍,更重要的是能拍好。
为此,OPPO 将在静态影像上累积的能力都塞入实况照片之中,并且还能让每一帧都能成为自然的封面帧,和 iPhone 形成了差异化的竞争。
而在后来的产品中,OPPO 也从「画质」和「玩法」两个维度上,持续迭代实况照片的「价值」。
针对实况照片容易糊的痛点,OPPO 连续三代持续提升实况照片分辨率:OPPO Reno13 首发 2K 实况图,今年年初的 Reno14 则做到 4K 视频转实况照片,上个月发布的 Find X9 实现拍摄 4K 实况,还能直发小红书分享。
创作玩法方面,OPPO Find X8 和 Reno13将当时出圈的胶片风格滤镜融入实况照片之中,实现「会动的复古胶片」效果。

而从去年年底开始,小红书上兴起了一种全新的潮流——实况拼图。
简单来说,就是将多张实况照片以横版的形式纵向拼接在一起,有一种镜头蒙太奇的感觉,让本身就是动态的实况图更具「电影感」。

要实现这种再创作,用户一般离不开第三方的视频或者图片后期工具,不仅过程有点麻烦,还时常会遇到压画质的问题。
OPPO 很敏锐地捕捉到这种趋势,最新的 Reno15 系列,相册就能够实现系统级的「三拼实况图」。但他们不满足去追逐潮流,他们打算自己做出一种风格,答案就是进阶版的「出圈实况拼图」。
在原本三拼实况图的基础上,OPPO Reno15 允许用户选中带有人物或宠物的实况图进行「出圈」,将被拍摄对象的动态单独抠出放大,形成一种突破背景的效果。

整个过程并不复杂,简单概括就是「一拍二拼三出圈」,零基础也能快速上手。
这个功能不需要用户进行前期大量构思,只要挑选三张实况成片进行处理,画面就能如漫画分镜般生动有力,无论怎么玩都很出片。

如果你有很好的奇思妙想,预先构思了成片的效果去进行拍摄和创作,最终的出片就会更妙趣横生。

一言蔽之:「出圈实况」是一种通过创意构图保证能出好片,又因为可玩性够高而很有上限的拍摄方式。
而在看似简单的界面背后,其实藏着一整套颇为复杂的技术逻辑。
实况照片就是一个很短的视频,「出圈」本质上就是要一键实现视频抠图,容易糊或者跳闪,背后离不开 AI 大模型的助力——OPPO 选用了 10 亿参数量的自研大模型底座,实现了较高的抠图精度,并利用云端算力保证了出图效率。
最后这个功能呈现的效果,是用户只需轻点几下,屏幕上的动态人像就会被精准抠出「出圈」,无需繁琐的交互和长时间等待。

不仅限于玩法本身,OPPO Reno15 也继续优化实况照片最基础的成片效果。搭载专属最新算法「Nature Tone」,专门优化实况照片中人脸的质感,非常适合人像实况图。
OPPO Reno15 的出圈实况,出的不仅是相框,更是传统智能手机影像「参数至上」的怪圈,是用户需求洞察的结果,也是灵光一闪的创新。
从前,我们对一台手机的标准,往往都只聚焦在像素、光圈、传感器尺寸这些硬参数上,希望他们能够拍出够清、够远、够好看的照片。

很快,短视频时代到来,Vlog 大火,大疆 Pocket 这种口袋录影机成为了新宠。
而现在,不管是手机还是大疆 Pocket,甚至单反相机,实况照片都成为了我们期待的功能。
与此同时,实况照片的浪潮也在各个平台蔓延开来:从小红书、微博,到如今的微信——这款最重要的社交应用,也让实况照片走进了朋友圈与聊天之中。

有意思的是,这种传播媒介的变迁,不是技术在背后推动,相关技术甚至在十年前就已经就位,更多只是人们的表达欲发生了变化。
绘画捕捉「感觉」,摄影凝固「当下」,录像记录「过程」,而实况照片留住的,是「瞬间」。
这种转向,也为厂商带来了一个思考:继续在硬件上做突破,拍到更清更远的照片固然重要,如何更好地回应用户日益增长的创作需求,同样不可忽视。
和绘画、摄影、录像不同,实况照片是一种全新的创作方式,它诞生于智能手机,繁荣于移动互联网,是技术演进赋予这个时代特有的表达方式。
而真正的技术不是让表达更复杂,而是让情感更自由地流动。

OPPO 工程师在访谈中表示,原本他们只是想在静态照片上做「出圈」,但有同事提出了做成动态的想法之后,整个团队的兴趣被点燃,不断实现技术攻关才有了现在的「出圈实况」。
为 Android 发实况破开了口子,又不断提升实况照片的标准,现在,「出圈实况」这种新玩法正在引领新的风格潮流,这场实况照片的「文艺复兴」,OPPO 从来不是一个被动的追随者,而是走在前面的引路人。
这本就是一种用户与技术的彼此塑造,从技术的附庸,再到情绪的载体, 十年 Live 图的枯木逢春,正是一个关于 Life 的故事。
显然,OPPO 还会把这个故事续写下去。
#欢迎关注爱范儿官方微信公众号:爱范儿(微信号:ifanr),更多精彩内容第一时间为您奉上。

不知不觉,吉利帝豪已经来到第五代了。
距离第一代车型上市,已经过去了整整 16 年。在那个国产车还要跟合资车抢饭碗的年代,恐怕没人能想到,今天的中国车市会被电池和电机统治。
这种反差在今天的舆论场里显得尤为强烈。当大家都在聊 800V、激光雷达、百公里加速 3 秒的时候,把一台搭载 1.5L 发动机的入门家轿推到台前,听起来甚至有种不合时宜的复古感。
但吉利偏偏就这么干了。就在刚刚,第五代帝豪正式上市。官方指导价 7.49 万 – 8.29 万元,配合限时权益,起售价直接杀到了 6.59 万元。

当所有车企都在忙着向上突围,忙着讲科技故事的时候,吉利反而在思考,那些预算只有几万块、没有充电条件、或者单纯就是不想伺候电池的沉默的大多数,他们到底需要一台什么样的车?
如果不看这台车的尾标,光看侧面的线条和体量感,你很难把它和「帝豪」这两个字联系起来。4815mm 的车长,2755mm 的轴距,这组数据放在几年前,妥妥就是一台 B 级车的标准。

这种尺寸上的变化带来的感官刺激是很直接的,尤其是当你把第五代帝豪和朗逸、轩逸这些传统合资对手停在一起时,这种体量上的优势会转化成一种很微妙的心理优势——花同样的钱,我买到了一台更大的车。
这台墨绿色的实车,前脸采用了吉利家族标志性的直瀑式格栅,官方给它赋予了很多关于时间的文化寓意,但从工业设计的角度看,这其实就是一种成熟设计语言的复用。这套已经在星瑞、星越 L 上验证过的设计,最大的作用就是提升整车的视觉重心,让车头看起来更宽、更厚重。

对于这个价位的潜客来说,他们不需要多么激进的运动套件或者复杂的空气动力学设计,这种类似「小沃尔沃」或者「小星瑞」的既视感,恰恰能提供他们最需要的稳重和体面。

这种越级的思路也延续到了车内。2755mm 的轴距带来的直接红利就是后排空间。吉利这次把后排坐垫做得更长,膝部空间和头部空间都不再是那种「够用就好」的水平,而是有了富余。

车内的软包覆盖率很高,特别是在门板和中控台这些身体经常接触的地方,触感确实比同价位的合资车要细腻不少。
储物空间的设计也很讨巧,那个容积接近 7 升的扶手箱,显然是调研过家庭用户的实际使用场景,毕竟对于很多帝豪车主来说,这台车可能承载了一家三口甚至五口的全部出行需求,能装确实是刚需。
但这台车最让我觉得有意思的变化,其实不是这些看得见摸得着的物理参数,而是车机。

在很长一段时间里,几万块的燃油车在智能化上几乎是空白的。车机卡顿、功能单一、语音识别率低,是这个价位车型的通病。车主们上车的第一件事往往是掏出手机支架,把那块并不好用的屏幕晾在一边。
但第五代帝豪打破了这个惯例,直接把当家花旦 Flyme Auto 系统搬进了这块 14.6 英寸的中控屏里。

这套系统的流畅度和 UI 逻辑,大家应该不会陌生。它的意义在于,吉利把燃油车的座舱体验,拉到了和 20 万级新能源车同一条水平线上。毫无疑问,这种科技平权的感知是非常强烈的。
至于动力部分,这台车提供了 1.5T 和 1.5L 两种选择。1.5T 发动机匹配 7DCT 变速箱,零百加速做到了 7.9 秒。
这个成绩放在电机面前确实不够看,但在燃油家轿里已经算是充沛了。更重要的是,基于 BMA 架构,这台车的底盘调校和行驶质感相比前几代有了明显的提升。

在大家都恨不得把油箱拆了的今天,吉利还在死磕燃油车,这事本身就挺反直觉的。
看看现在的市场,绝大多数车企的燃油车业务基本都进入了「姑息治疗」阶段:不给新平台,不给新架构,换个保险杠就是新款。但吉利很清楚,只要充电桩还没插满每一个车位,燃油车就永远有它的拥趸。对于这群最务实的用户来说,零百加速 3 秒还是 7 秒根本不重要。
吉利也没打算在油耗上跟同价位的插混竞品硬碰硬,而是把重点放在了设计、空间和智能化。拿着 B 级车的设计和尺寸降级打 A 级市场,用行业一线的车机系统去欺负竞品,这招其实很聪明。
回顾这 16 年,帝豪这块招牌能立住,太不容易了。
回想 2009 年第一代帝豪诞生的时候,和它同台竞技的是奇瑞 A3、比亚迪 F3、长城 C30 还有荣威 350。那个时候的国产车,还在合资品牌的夹缝中求生存,主打的是「让老百姓有车开」。
十六年过去了,当年的那些对手,有的已经销声匿迹,有的早就不再是品牌的主力,只有帝豪,硬是扛过了合资车价格下探的绞杀,也扛过了新能源浪潮的冲击,一直活到了今天,并且拥有了超过 400 万用户。
一辆帝豪车,半部中国家轿发展史。
发布会上的这句话没有一丁点夸大的成分。

▲ 董车会很久很久以前还拍过插混帝豪
这期间,帝豪的角色也在发生变化。它从吉利用来冲锋陷阵的尖刀,变成了如今稳住大盘的压舱石。吉利后来能有底气去搞博越、领克甚至极氪这些高端品牌,很大程度上是因为背后有帝豪这样一个能够源源不断提供现金流和用户基盘的「粮仓」。
更有意思的是,我们在第五代帝豪身上,看到了中国车企心态的成熟。

前几代帝豪,我们要么能看到明显的模仿痕迹,要么能感觉到设计上急于证明自己的用力过猛。但到了这一代,整台车呈现出一种非常舒展、自信的状态。它不需要再用夸张的线条来博眼球,也不需要堆砌过度的配置来掩盖机械素质的不足。
现在的帝豪很清楚自己是谁,也很清楚自己的用户需要什么。吉利所谓的「8515 原则」——继承 85% 的经典基因,只做 15% 的创新,听起来保守,实则是对用户习惯的最大尊重。
在今天这个时代,我们太容易被那些眼花缭乱的技术吸引,去关注卫星、去关注 AI、去关注无人驾驶。这些当然代表了未来,也代表了中国汽车的高度。但第五代帝豪的存在,是在提醒我们,依然需要有车企愿意俯下身子,去做好那个「趴在地上」的基础工作。

毕竟,对于大多数普通家庭来说,他们需要的可能并不是一台能在这个赛道那个榜单上刷记录的机器,而是一台每天早上能准时送孩子上学、下班能顺路买菜、周末能载着全家去公园,风雨无阻、皮实耐用的伙伴。
帝豪不性感,甚至有点乏味,但它足够诚实,也足够重要。这或许就是「国民车」这三个字,在 2025 年最准确的定义。
#欢迎关注爱范儿官方微信公众号:爱范儿(微信号:ifanr),更多精彩内容第一时间为您奉上。
Many of the greatest paintings succeed in part because they use optical effects in their paint layer. This takes advantage of the fact that thinner layers of paint aren’t completely opaque, so allow some light to pass through them. In watercolours, transparent paints are often referred to as transparent watercolour, while those that are opaque are known as gouache or body colour. In oils, different pigments result in degrees of opacity, expressed as their covering power.

This cross-section of the paint layer from Honoré Daumier’s The Strongman (c 1865) demonstrates how many oil paintings consist of a series of layers, with several pigments present through their depth. Generally, the most opaque are applied first, and on top of those come a series of thinner transparent layers or glazes. Together these allow complex combinations of reflection and refraction of light, generating optical effects.
Layered oil painting technique is best seen in paintings that have been abandoned before completion.
The British portrait painter Sir Joshua Reynolds received a conventional training in traditional and conservative methods with roots dating back to the late 1600s. He painted in layers, starting with dead colouring, the laying in of shadows and lights, then blending in transitions of shading and colour wet-on-wet. Highlights were then brought out, and shadows glazed, to produce a series of thin layers of oil paint, and a smooth, finished paint surface.

Those early stages are shown well in this abandoned portrait of Mrs Robinson from about 1784, where most of the paint layer is sufficiently thin as to allow the texture of the canvas to show through. When used with ‘lean’ paint, this dried quickly and complies with the longstanding edict of applying ‘fat’ over ‘lean’, so that the lowest layers dry first.

Richard Parkes Bonington’s unfinished Venice: The Piazza San Marco (1827-28) shows signs that it might have been among his best. Its buildings have a golden glow from the setting sun, but those colours would undoubtedly have been enhanced by rich glazes had he lived long enough to complete it.
Occasionally the paint layer develops problems that demonstrate the effects of glazes.

In Abraham Bloemaert’s The Adoration of the Magi from 1624, the cloak of the Virgin Mary appears to use two different blues, with its lower passages painted in the duller hue of indigo, which has faded. The dullest areas are those that had the thinnest ultramarine glazes applied, much of which have now abraded away during subsequent cleaning of the painting. The unprotected indigo has therefore suffered sufficient exposure to fade, as well as losing those rich glazes.

JMW Turner’s Approach to Venice (1844) was painted with very thin transparent glazes over thick white impasto, creating a distinctive flickering effect in its highlights.

Despite the artist’s efforts to get the white impasto to dry more quickly, the glazes dried first, and cracked as they became stressed over the white that was still wet. This hasn’t been helped by the later conservation process of lining, which places an additional layer on the back of the canvas to help the support do its job.
Although a wide range of pigments have been used successfully in glazes, some were developed specifically for the purpose. From the fifteenth century onwards, verdigris pigment was mixed with natural resins for use in glazes. This produces a different pigment from regular verdigris, as the copper combines with the resin acids to form what is known as copper resinate.
A popular technique among many masters to produce an intense green was to paint an underlayer using verdigris, over which several glazing layers of copper resinate were then applied. Although generally reliable and stable, verdigris and copper resinates have a tendency to turn brown on the surface. Thankfully this affects relatively few paintings.

Tintoretto used copper resinate glazes in several of his paintings, most notably the rich, varied, and often lush vegetation in his Saint George and the Dragon from about 1555.

Studies at the National Gallery, London, have found copper resinate in three of the four paintings in Paolo Veronese’s series The Allegory of Love. In the third of these, Respect (c 1575), the pigment was found in the man’s intense green cloak, and the duller gold-brown brocade patterning on the wall behind his hand (detail below). The surface of that wall has superficial brown discoloration of the paint layer.


One of the last major uses of copper resinate is in Arnold Böcklin’s Triton and Nereid from 1874. This is reported as being painted in tempera, but copper resinate glaze appears to have been used to develop the intense green patterns on the sea monster in the foreground. This is consistent with Böcklin adhering to traditional techniques despite working in the late nineteenth century.
During that century, painting slowly in multiple layers with glazes progressively fell from favour. By the end, many oil painters had adopted techniques in which much or all of a painting was made at once, known as direct, alla prima or au premier coup.
In the first of these two articles showing paintings of Spartans from the city-state in ancient Greece, I illustrated some of the laws laid down by the founder of its warrior tradition, Lycurgus.
When those laws were all in place and in practice, Lycurgus told an assembly of all Spartans that he needed to return to the oracle at Delphi to consult on one final measure. He made the Spartans take an oath to abide by these unwritten laws until his return, then departed for Delphi. There he obtained the approval of the oracle, which he recorded in writing and sent back to Sparta.

This undated painting of Lycurgus Gives the Laws to the Spartans has been attributed to either Jacopo Palma il Vecchio (c 1480-1528) or Bonifazio Veronese (1487-1553). It shows an elderly Lycurgus apparently giving a volume of written law to the Spartans in the marketplace, but could equally be of Lycurgus addressing his last assembly of all Spartans before he left for his second visit to Delphi.

Merry-Joseph Blondel’s portrait of Lycurgus of Sparta from 1828 also shows him as an older man, here with written scrolls on his right thigh. Given the oral nature of Lycurgus’ laws, this can only be interpreted as the moment that Lycurgus has written his message reporting the oracle’s approval of his laws, ready to send it back to the city.
Lycurgus then did something extraordinary in its selfless ingenuity: having put the whole of Sparta under oath to keep his laws until his return, he then starved himself to death, ensuring that oath could never expire. The laws of Lycurgus lasted through fourteen kings, and five hundred years, without change, until gold and other spoils of war entered Sparta during the reign of King Agis.
The single most celebrated event in Spartan history is the Battle of Thermopylae in 480 BCE, in which three hundred Spartan soldiers, with 700 Thespians and 400 Thebans, were claimed to have kept over one hundred thousand Persians at bay for three days. This is the more remarkable for the fact that the Spartans and their supporters fought to the death, following which the Persians overran Boeotia and captured Athens. It is thus an example of self-sacrifice in the face of overwhelming odds, resulting in most noble defeat.

The only major painting that I have been able to discover of this is Jacques-Louis David’s Leonidas at Thermopylae (1814). Leonidas, the Spartan King and commander of the force, is at the exact centre of the painting, the viewer fixed in his emotionless gaze. Around him are his three hundred Spartan warriors, with supporting trumpeters, a lyre hanging on the tree, and laurel crowns being handed round.
David leaves some clues to his narrative in inscriptions, which have unfortunately become barely legible. A soldier has climbed up to carve an inscription in Greek at the upper left, the word HERAKLEOS appears on a plinth to the left of Leonidas, and by his right foot is an anachronistic piece of paper bearing more Greek words.
More subtle, perhaps, are the small groups driving pack animals along a narrow path at the upper right: the Persians were shown a mountain path around the narrow pass at Thermopylae, enabling them to gain an advantage over the Spartans.
Recent artistic interest in Thermopylae seems to have started around 1960, and first reached popular culture in Rudolph Maté’s 1962 movie, The 300 Spartans, which has been interpreted as comment on the Cold War at the time. This in turn inspired Frank Miller’s graphic novel 300, which was first published in 1998, and made into a highly successful movie of the same name by Zack Snyder, released in 2006.
In contrast, Sparta’s three wars against the state of Messenia are little-known. Gustave Moreau’s fascination for esoteric ancient history led him to start painting a scene from the Second Messenian War in about 660-650 BCE.

Moreau seems to have worked on Tyrtaeus Singing During the Combat in the early 1860s, abandoned it, then returned to have it enlarged in about 1883, and work it further for a period, before finally giving it up altogether.

This detail shows much of his original painting, which is full to bursting with androgynous and near-naked young men. The priestess-like figure to the left of the centre appears to be Tyrtaeus, an elegiac Greek poet whose verse exhorted the Spartans to fight bravely against the Messenians. He is shown here in action, inspiring the young Spartan warriors to victory. The strange collage-like effect is a combination of Moreau’s emphasis on establishing the form of his figures, and I suspect edge-enhancement in the image’s processing.
Spartans also played a central role in the war with Troy, the result of Paris’s abduction of Helen, a Spartan woman whose origins are the subject of dispute. Later Roman accounts, the basis of most more recent paintings, claim she was the outcome of the union of Leda, wife of Tyndareus, King of Sparta, with Zeus, in the form of a swan. Those dating back to the time of the Cypria and the Epic Cycle are more complex, and make Helen’s mother Nemesis, the personification of public disapproval.
In the Greek version, Zeus appeared to Leda as a swan. Both he and Tyndareus impregnated Leda at about the same time, but as Zeus was then in the form of a swan, her twin pregnancies resulted in two eggs: one hatched into Castor, who was human because his father was Tyndareus; the other hatched into Polydeuces (Latin Pollux), who was divine as his father was Zeus. Despite their different fathers, the twins were known as the Dioskuroi, who were later to rescue Helen.

This interpreted copy of Leonardo da Vinci’s Leda and the Swan, probably painted in the early 1500s and now in the Philadelphia Museum of Art, summarises the later account of Helen’s unique birth, with two eggs and a fourth baby, Clytemnestra. Later paintings, perhaps wisely, concentrated on Leda and Zeus, and skipped the incredible egg phase altogether.
According to most accounts, when Helen was still under age, she was abducted by Theseus, the ‘hero’ who abandoned Ariadne on the island of Naxos. Helen’s adopted brothers the Dioskuroi were unimpressed by this, so they paid Theseus a visit, and persuaded him to return their step-sister. In return for her son’s offence, Aethra, mother of Theseus, was made Helen’s slave, and wasn’t freed until after the fall of Troy many years later.

Jean-Bruno Gassies’ painting of Castor and Pollux Rescuing Helen was runner-up in the Prix de Rome in 1817. The woman being escorted away at the left may have been intended to be Theseus’ mother Aethra, although she appears remarkably young.
Helen’s beauty only grew over time, and her hand was sought by many suitors in a contest organised by her brothers Castor and Polydeuces. Among those suitors were many prominent figures, including Odysseus. Helen’s father, King Tyndareus, feared that in choosing between her suitors he would offend and cause trouble. The suitors therefore agreed to swear an oath, under which they would all defend the successful suitor in the event that anyone should quarrel with them, the crucial Oath of Tyndareus. Under that, Menelaos, King of Sparta, was chosen as Helen’s husband.
Helen was the bribe offered by Aphrodite to Paris for judging her the winner of the golden apple of discord. For nine days, Helen’s husband Menelaos entertained Paris as a guest, while Paris plied her with gifts. On the tenth day, Menelaos was called away to Crete for his grandfather’s funeral. He left his house in Helen’s charge, reminding her to ensure their guests were well cared-for, although clearly not in the way that Paris was intending.

For Tintoretto, The Rape of Helen (1580) was nothing short of war. As an archer is about to shoot his arrow, and another Trojan fends off attackers with a pike, Helen, dressed in her finery, is manhandled onto Paris’s ship like a stolen statue.
Thus the Spartans were at the centre of the Trojan War.
The appearance of new objects or unexpected phenomena in the sky was an event of great significance in the past, and often considered to be a portent of the future, good or bad. This article considers the few that were recorded in paintings, and starts with the most famous of all, the star of Bethlehem that appears in many depictions of the birth of Christ.
The linked stories of the birth of Christ in a shed at Bethlehem, and the subsequent adoration of the infant by three wise men, kings or Magi “from the east”, are among the most popular and enduring among paintings in the Christian canon. The outlines given in the Gospels of Luke, chapter 2, and Matthew, chapter 2, have conventionally become elaborated.
Three wise men had seen a new star, possibly a comet or an unusually bright planet, which they believed would lead them to the birth of a great prophet. They travelled by the guidance of that star, to arrive at Bethlehem. There they found the newborn Christ with Mary his mother, paid homage to him in the shed in which the holy family was lodging, and presented their gifts of gold, frankincense, and myrrh.

Giotto’s Adoration of the Magi from about 1305 shows the star as a celestial ball of fire streaking across the sky, and the three wise men pay their respects to the newborn Christ and his mother.

Above Bosch’s view of the local Brabant countryside in his Adoration of the Magi of 1490-1500 he places a more modest and stationary star shining bright over its distant city, as shown in the detail below.


Blake’s version of the Adoration of the Kings is conventional in showing the three wise men presenting their gifts to Jesus and his parents. At the left, outside, shepherds are tending to their flocks of sheep beneath a stylised star, and at the right are the ox and ass.
There remains controversy over what celestial event might have occurred at the time.
Very few paintings show known events in the sky, and I know of only one depicting a full solar eclipse.

Although many painters, particularly the Impressionists, have shown fleeting effects of light and the occasional rainbow, Enrique Simonet took the opportunity of a solar eclipse on 30 August 1905 to paint his Eclipse (1905). This was visible across eastern and northern Spain between about 1300 and 1320 UTC, and this painting is one of its few remaining records.
Realistic paintings of comets are also rare, and unimpressive.

Generally acclaimed as William Dyce’s finest painting, Pegwell Bay, Kent – a Recollection of October 5th 1858 (c 1858) shows this bay on the Kent coast, during a family holiday visit: a coastal scene worked up into a large finished oil painting. Although not easily seen in this image, there’s a small point of light high in the middle of the sky which is Donati’s comet, not due to return until 3811. Couple that with the inclination of the sun and the state of the tide, and you should be able to place this view precisely in both time and space, and confirm that it does indeed show this bay on 5 October 1858.
A few paintings show impossible celestial events.

John Martin’s painting of The Deluge from 1834 has two points of reference: the Biblical account of the flood, and Martin’s personal belief in prior catastrophe. As the sciences became ascendant during the nineteenth century, some educated people believed that in the past there had been an alignment of the sun, earth, and moon, and the collision of a comet resulting in global flooding. This was promoted by the French natural scientist Baron Georges Cuvier, and subscribed to by Martin.
True to form, his painting is dark and apocalyptic: near the centre, tiny survivors are just about to be overwhelmed by an immense wave bearing down at them from the left and above. The misaligned sun and moon barely penetrate the dense cloud, and to the top right is a melée of rock avalanche and lightning bolt. This was awarded a gold medal at the Paris Salon of 1835.

Several of Paul Nash’s surrealist landscapes show the moon in its phases, among them Landscape of the Vernal Equinox (III) from 1944, which presents the impossible view of a full moon and the sun visible close together and just above the horizon.
In their descent into the depths of Hell, Virgil and Dante have just entered circle eight for those who committed fraud in its broadest sense. This consists of what Dante refers to as malebolge, best translated as rottenpockets, a series of ten deep trenches each of which caters for a different type of fraud. Dante compares these to the defensive earthworks surrounding the outer walls of castles of the day.
Virgil leads Dante into the first of these rottenpockets, where souls are being lashed by demons to keep them moving constantly. These are pimps and seducers, among whom is a Bolognese man, a Guelph, who pimped his sister, the beautiful Ghisolabella, for political gain.
The pair move on past other sinners being scourged, where they see Jason, who seduced then abandoned the young Hypsipyle, queen of Lemnos, and later did the same with Medea. They then enter the second rottenpocket, for flatterers, who are wallowing in excrement.


They find a contemporary figure from Lucca, and see Thaïs, a Greek courtesan who notoriously flattered her partners. She is now covered in filth and thoroughly crabby.

In the third rottenpocket, Dante and Virgil come across corrupt religious leaders or Simonists, who sold church privileges, and are trapped headfirst in rock holes, their protruding feet being roasted with flames. The key figure here is Pope Nicholas III, who at first confuses Dante with Pope Boniface VIII, who is also in the same rottenpocket. Pope Nicholas was known for his nepotism, which included appointing three of his own family as cardinals.


Virgil carries Dante on to the fourth rottenpocket, reserved for soothsayers. Their heads are turned to face backwards, so that the tears streaming from their eyes wet their buttocks.

Virgil identifies several of them from classical times, including the Theban Tiresias; Dante recounts how he became a soothsayer after he had twice changed gender, as told by Ovid in his Metamorphoses. The list concludes with three near-contemporaries: Michael Scot, a scholar and astrologer to Emperor Frederick II, and two well-known Italians.
The fifth rottenpocket they find to be filled with corrupt public officials, or barrators, who sold public appointments and are immersed in a sea of boiling pitch, while being further tormented by a pack of vicious devils known as malebranche, ‘evil-claws’.

The latter are armed with long hooks, which they use to push the souls down into the pitch, much as you might push down lumps of meat that rise to the surface of a stew. Those devils are so evil as to threaten Dante, so Virgil whisks him on to the next rottenpocket for hypocrites.

Any resemblance to real persons, living or dead, is not only intentional, but of their own making.
The artists
William Blake (1757–1827) was a British visionary painter and illustrator whose last and incomplete work was an illustrated edition of the Divine Comedy for the painter John Linnell. Most of his works shown in this series were created for that, although he did draw and paint scenes during his earlier career. I have a major series on his work here.
Gustave Doré (1832–1883) was the leading French illustrator of the nineteenth century, whose paintings are still relatively unknown. Early in his career, he produced a complete set of seventy illustrations for translations of the Inferno, first published in 1857 and still being used. These were followed in 1867 by more illustrations for Purgatorio and Paradiso. This article looks at his paintings.
Giotto di Bondone (c 1267–1337) was one of the great masters who bridged between the late Middle Ages and the early Renaissance. He was born near Florence, and is reputed from about 1296 to have painted a cycle of frescoes in the Basilica di San Francesco d’Assisi, in Assisi. This is hotly disputed though, and those may have been painted by Cimabue instead. The scene of The Devotion of the Devils from Arezzo shows what may, directly or indirectly, have been an inspiration to Dante, although I don’t know whether there is any evidence that the poet ever visited Assisi.
Jan van der Straet, also commonly known by his Italianised name of Giovanni Stradano (1523-1605), was a painter who started his career in Bruges and Antwerp in Belgium, but moved to Florence in 1550, where he worked for the remainder of his life. Mannerist in style, he worked with printmakers in Antwerp to produce collections of prints, including an extensive set for The Divine Comedy.
References
Robin Kirkpatrick (trans) (2012) Dante, The Divine Comedy, Inferno, Purgatorio, Paradiso, Penguin Classics. ISBN 978 0 141 19749 4.
Richard Lansing (ed) (2000) The Dante Encyclopedia, Routledge. ISBN 978 0 415 87611 7.
Guy P Raffa (2009) The Complete Danteworlds, A Reader’s Guide to the Divine Comedy, Chicago UP. ISBN 978 0 2267 0270 4.
Prue Shaw (2014) Reading Dante, From Here to Eternity, Liveright. ISBN 978 1 63149 006 4.
介绍VLAN的基本概念和几种场景下的应用,而OpenWrt下VLAN处理机制和一般交换机有些不同,这里做了一个对比并给出了一种两台路由器之间的单线复用的方案
计算机网络的教材对VLAN一笔带过,作业的却要用到交换机互联,之前看的VLAN的文章貌似都对应不到OpenWrt上去,也就很难有实践的机会;下面根据个人在宿舍组网上遇到的问题,一步步来探究VLAN的用法
后面又看到了N1盒子基于VLAN的单臂路由,又做了一些补充
宿舍是上床下桌,每一张桌子下面有一个百兆的网口,通过负载均衡,很早就可以把网速跑到100Mbps了,这显然不够啊,因为宿舍WiFi是共用的,自然而然想到连接相邻的两个床位的网口,这样就有300Mbps了,这也是多线拨号的第一步

上图就是将LAN3与LAN4作双线接入,通过VLAN分别对应到eth0.3和eth0.4
此时LAN4与WAN是“直通”的,效果上来说,就是LAN4也可以插网线用电脑拨号了,如果是要给路由器做双线接入的话,则需要添加VLAN,再把一个LAN口添加到新VLAN中,最后建立接口拨号即可
然而舍友还是需要网口拨号的,所以如果需要长期占用的话偶尔肯定是不太方便的,所以需要交换机来扩展一下网口,这一步已经可以通过简单的修改下OpenWrt路由器的Switch来实现,將LAN4和WAN划到同一个VLAN,两个接口就相当于在同一交换机下:

然而,仅仅通过untagged只能实现多条线路的“汇聚”,能够达到100Mbps+的只有一台路由器而已,并没有实现“互通”,即每一台路由器都可以上到100Mbps+;不仅如此,还要实现相邻床位的路由器之间只用一根线连接就可以达到同样的网速,更具体的就是在一根网线传输不同的来源(网口)的数据
而VLAN的一个重要的功能恰好就是实现交换机之间的互通
这个需求源于有一台N1,之前看过VLAN的接入网络的方法,觉得网络结构更清晰,以此可以解决主路由算力不足的问题,但之前一直没有刷上OpenWrt,刷完之后发现居然没有交换机的Switch选项,赶紧翻出了之前看到的帖子:N1做主路由,新3做AP的最正统vlan连法教程,想起之前文档刚好有部分没看懂,刚好可以补充上
首先还是OpenWrt的文档:VLAN,很早就读过,但是因为缺少具体的有解释的例子,当时没弄清楚VLAN tagged的机制
所以这里先结合华为的文档了解下基础的概念
首先需要理解VLAN标签是被添加到以太帧内部的一个4个字节的片段,其中VID也就是常说的VLAN ID

在一个VLAN交换网络中,以太网帧主要有以下两种形式:
常用设备中:
VID也就是数据帧中的12bit的VLAN ID,表示该数据帧所属VLAN的编号,而PVID(Port Default VLAN ID)又称为缺省VLAN,可以用于和VID做比较来判断Tag的情况
最主要的应用是划分广播域,这部分可以参考图文并茂VLAN详解,然而和本文的关系不是很大
为了提高处理效率,设备内部处理的数据帧一律都是Tagged帧,例如在交换机内部的,在数据帧进入交换机的时候可能会按照一定的规则被打上VLAN Tag以方便下一步的处理,OpenWrt的Old Wiki的一张图很好地体现了这一点:

以太帧进入端口后被打上VLAN Tag,之后在传输的CPU的线路内(Port5-CPU),就同时传输带两种VLAN Tag的包
另外在交换机之间,可以在一条链路上使用两个VLAN也叫做Ethernet trunking,也有人称作单线复用,常见的应用:
这里参考的是上面的华为的交换机的文档,不同交换机可能有些不一样
以收发的设备作为主体,指的是数据帧到达接口而没有完全进出交换机内部,举个例子:
配置VLAN:为了适应不同的连接和组网,设备定义了Access接口、Trunk接口和Hybrid接口3种接口类型,以及接入链路(Access Link)和干道链路(Trunk Link)两种链路类型,如下图所示

根据接口连接对象以及对收发数据帧处理的不同,以太网接口分为:
Access接口一般用于和不能识别Tag的用户终端相连,只能收发Untagged帧,且只能为Untagged帧添加唯一VLAN的Tag
Trunk接口一般用于连接交换机、路由器、AP以及可同时收发Tagged帧和Untagged帧的语音终端。它可以允许多个VLAN的帧带Tag通过,但只允许一个VLAN的帧从该类接口上发出时不带Tag(即剥除Tag)
Hybrid接口可以允许多个VLAN的帧带Tag通过,且允许从该类接口发出的帧根据需要配置某些VLAN的帧带Tag(即不剥除Tag)、某些VLAN的帧不带Tag(即剥除Tag)
Hybrid接口和Trunk接口在很多应用场景下可以通用,但在某些应用场景下,必须使用Hybrid接口。比如一个接口连接不同VLAN网段的场景(如图所示的Router连接Hub的接口)中,因为一个接口需要给多个Untagged报文添加Tag,所以必须使用Hybrid接口。
OpenWrt对VLAN Tag的处理机制见后文引用文档的加粗部分,此处暂作为理解的参考



OpenWrt的文档没怎么提及接口类型的概念,OpenWrt对VLAN设置的组织形式和普通的交换机有所不同,从机制介绍来看是比较接近Trunk端口的:发出的数据帧只有一个VLAN的数据帧不带Tag
OpenWrt文档所提到的:An untagged port can have only 1 VLAN ID 反映在:OpenWrt中的Switch设置VLAN时单个untagged Port无法再再其他VLAN上为Untagged,否则回提示:LAN 1 is untagged in multiple VLANs!
故抛开之前的端口类型,遵守VLAN的规则,兼容且实用就行
另外,不是所有OpenWrt设备都有Switch这个LuCI的配置选项,比如N1就没有,但是照样可以配置VLAN,位置在Interface的接口物理配置部分,由于无法像Switch那样有Tag之类的选项,
官方文档对Tag机制的介绍如下(散落在两处):
- Tagged on “CPU (eth0)” means that the two VLAN ID tags used in this example (1, 2) are sent to the router CPU “as tagged data”. Remember: you can only send Tagged data to VLAN-aware devices configured to deal with it properly.
- Untagged means that on these ports the switch will accept only the incoming traffic without any VLAN IDs (i.e. normal ethernet traffic). The switch will remove VLAN IDs on outgoing data in such ports. Each port can only be assigned as “untagged” to exactly one VLAN ID.
- Off: no traffic to or from the tagged ports of this VLAN ID will reach these ports.
Ports can be tagged or untagged:
- The tagged port (t is appended to the port number) is the one that forces usage of VLAN tags, i.e. when the packet is outgoing, the VLAN ID tag with vlan value is added to the packet, and when the packet is incoming, the VLAN ID tag has to be present and match the configured vlan value(s).
- The untagged port is removing the VLAN ID tag when leaving the port – this is used for communication with ordinary devices that does not have any clue about VLANs. When the untagged packet arrives to the port, the default port VLAN ID (called pvid) is assigned to the packet automatically. The pvid value can be selected by the switch_port section.
特别指出,但是一般也用不上,在LuCI界面上看不到的PVID设置,设置具体在uci network switch_port部分:
Port PVID; the VLAN tag to assign to untagged ingress packets
官方文档的位置在 Creating driver-level VLANs 一节,配置方式是通过在接口设置,选择自定义接口,在名称在做文章:如在物理网卡eth1上,通过自定义eth1.2接口的方式建立一个VLAN ID为2的接口,在使用Switch设置VLAN,如添加VLAN ID为3的VLAN之后,接口处也会出现eth0.3,逻辑上还是统一的;下面来看下文档对处理机制的描述:
If the incoming packet arrives to the interface with software VLANs (incoming packet to eth1) and has a VLAN ID tag set, it appears on the respective software-VLAN-interface instead (VLAN ID 2 tag arrives on eth1.2) – if it exists in the configuration! Otherwise the packet is dropped. Non-tagged packets are deliveded to non-VLAN interface (eth1) as usual.
即处理流入的包:接口只接收有相应Tag的包,相当于Switch中的VLAN在该接口设置为Tag
这样一来,一个物理网口可以同时收发带Untagged帧和Tagged帧,故使用VLAN来实现单臂路由也就很好理解了,配置的方式也不唯一
回到本文开头提到的问题,仿照上面的Switch内部VLAN机制的图的形式,画了一张两台OpenWrt路由器通过VLAN互通,进而实现让两台路由器可以得到宿舍三个网口合计300Mbps的接入

需要说明的是:
最后的在宿舍的书桌背后的路由器如图

还记得初见Atom的惊艳以及日久感受到的速度慢和占用高,记得VSCode刚推出时的“难用”,现已今非昔比,本文主要介绍VSCode的一些简单的应用:部分实用的插件以及调试C,Python代码的方法
最初为了写LaTeX而使用 Atom + 插件 来作为代码编辑器(积累了些经验之后转而使用TeXStudio),之后也就顺其自然的用Atom写了作业的大部分代码(装插件还要看网络环境),之后就是遇到了幽灵和熔断漏洞的影响,笔记本的性能越来越力不从心,使用Atom打开大文件特别慢,运行也并不流畅,才发现Atom的性能问题被诟病已久,有人推荐了微软的VSCode —— 和Atom的主题、插件基本通用,但是性能好太多,于是我就换下了Atom,一直用到了现在
现代代码编辑器最基本的功能:Git,多语言支持,丰富的效率插件,VSCode都是有的,而它出彩的地方还是在于开发方面(其实我就是写下作业)
安装VSCode的时候记得勾选使用VSCode打开文件夹,因为VSCode的对工作空间要求比较严格的,另外对于Atom迁移而来的,可以选择Atom主题“One Dark Pro”以实现一个“平缓的过渡”
在调试代码和使用方面,常用的插件有:
考虑到配置繁杂,重装或者有多台电脑迁移配置不便,可以用Setting Sync插件通过Github提供的服务以实现配置的同步
常规插件其实各大代码编辑器都差不多,对于VSCode来说,个人接触到的,最惊艳的插件当属Remote-SSH:
开发环境或者说代码运行的环境在远程或者其他的系统上,需要使用SSH客户端连接到远程,使用SCP或者SFTP来传输文件,这里面SSH客户端是一个重要的角色,最开始使用Atom编辑加上脚本完成“本地编辑,远程调试”的过程,后面遇到了一度让我觉得“相见恨晚”的FinalShell,解决了SSH时的一些列问题,但是作为一个独立开发者维护的闭源软件,稳定性和安全性是一般般的
而Remote-SSH相当于把VSCod搬到了服务器上,同时解决了运行环境和文件传输两个问题,尽管类似的问题可能早就有成熟的方案,但是在常用的代码编辑器中就能实现还是相当感动的,安装完成本地的客户端之后在VSCode的左下角有一个蓝色的标记,点击之后按照提示添加服务器就好(遇到SSH的config文件权限的问题,换用另外一个ssh的config文件就好),初次使用连接服务器之后会在服务器端自动下载和安装VSCode的相关组件(常用的LInux发行版没什么问题,也不需要root权限,ARM架构也支持),之后再手动把需要的插件安装下就好
初次连接时打开文件夹需要重连,直接打开另外一个文件夹也会重连,感觉不方便的话,可以在打开文件夹之后再添加另外一个文件夹到工作空间中(会重新连接),文件夹一栏会变成了工作空间,之后添加文件夹就不需要重连了,工作空间的配置可以保存以便下次使用;文件的上传下载分别是拖拽和右键菜单,体验算是很好了
如果在远程跑代码可以安装Resource Monitor用于监测CPU和内存占用,其他的细枝末节的部分搜索下就有
这里就不造轮子了,已经有人做的很好了,Dev on Windows with WSL,其中主要使用了Remote-WSL插件,虽然个人一度觉得WSL是未来,但是使用了一段时间之后还是觉得不如Docker或虚拟机来得方便,尤其是和Remote-WSL一起推出的Remote-SSH诞生之后
无意中又看到Remote插件多了一个Docker,之前的docker插件在VSCode侧边栏可以方便的查看镜像容器的情况,而Remote插件可以直接把VSCode的运行环境放到容器内,并且可以直接接入正在运行的容器(也就是不需要预先安装SSH和开放端口),尤其对编译环境下修改代码比较方便
另外还有个有趣的地方,可以让Win下的Docker支持图形化界面(勉强可用)
这里直接把IP保存为变量了:
$DISPLAY=(ipconfig|findstr "IPv4")[1].split(" ")[-1]+":0.0";
docker run -it --net=host -e DISPLAY=$DISPLAY ....
VSCode全称Visual Studio Code,调试代码方面算是对得起Visual Studio之名了,权威的配置过程还是参考VSCode官方文档,本文介绍的是个人配置在Windows下的配置尝试,点几下就配置好了,故分享出来,仅供参考
有些作业要求用C语言写,最开始追求新奇,用的Visual Studio 2015以及Clang,看中的是强大的调试功能,但是对于写个简单的作业来说太费事,Clang的报错常常不理解
之后转而使用了更常见的Dev C++,基于GCC,照抄书上的代码也不会莫名报错了,在很长一段时间里都是用Atom写代码,Dev C++做运行和调试,
到了VSCode当然会想要接近Visual Studio的体验,编译器肯定不用Clang了,至于GCC,WSL里有,Win上的GCC的版本不知道用哪个好,看网上的博客配置tasks.json (build instructions),launch.json (debugger settings)依然颇为繁琐
直到后面遇到了Scoop,安装就很简单了:scoop install gcc,查看版本后发现是MinGW的GCC,安装CodeRunner扩展后就可以运行代码了
注:代码及工作目录的路径不要有中文
调试功能则需要C/C++扩展,Debug功能在VSCode的左侧应该是自带的,对新目录来说Debug一栏的左上角绿色三角形旁边会显示”No COnfiguration”,Debug时配置gcc.exe作为代码的编译器,GDB作为代码的调试器的关键就在这里了:
Add Configuration的时候选C++(GDB/LLDB),之后再选gcc.exe build and debug active file设置完成后会在工作目录下生成一个.vscode/launch.json的文件,文件定义了gdb作为exe的调试器,需要注意的是这里的preLaunchTask,定义了在执行调试在前需要使用gcc对代码进行编译,也就是下一步
回到C的源文件,点击Debug一栏的左上角绿色三角形开始调试,会提示Could not find the task ‘gcc.exe build active file’ ,点击Configure Task,再选gcc.exe debug active file,软件就会创建并打开.vscode/task.json,其中定义了gcc.exe编译的过程,也就是上一步的preLaunchTask
以上的文件在做了选择之后就自动生成好了,之后该文件夹内的C代码都可以透过VSCode的Debug来调试了,设置断点,查看变量体验还是比较现代的~
已知问题
自带的运行代码和调试的terminal窗口对部分编码支持的不太好,调试的时候会闪退
使用WSL GCC可以参考下面的链接(和上个链接的WSL Remote还是有些不同的): VSCode使用WSL环境开发C语言配置
首先在VSCode窗口的左下角,可以设置当前使用的Python解释器,运行依然是CodeRunner,在代码编辑窗口右键选择各种运行方式包括交互式。重点还是调试,这个时候可以选择创建一个新文件夹了(平时把Python代码都放到一个文件夹…),在新文件夹的情况下,点击调试会提示选择Debug Configuration:包括了Python File和Module以及其他没见过的类型
显然对于只会用调试Python File的情况,每次都做一次选择显然不太方便,那么可以选择Add Configuration,工作目录下会生成一个.vscode/launch.json的文件:
{
"name": "Python: 当前文件",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
在Debug的选项中也就有“Python: 当前文件”的选项了,如果想要在已经有launch.json的文件夹中调试,添加这一段到其中即可
调试Python文件的时候比较慢,比如调用Python还需要先激活Conda环境(选择Python解释器)
在编辑器窗口的右键选项中还有使用Jupyter-notebook作为交互式运行的选项,需要在Conda环境中准备:
conda install ipykernel
python -m ipykernel install --user --name 环境名称 --display-name "Python (环境名称)"
有上面的Remote-SSH,加上VSCode也是基于electron的,自然会想到能不能在浏览器中使用,偶然的一次机会还真的看到了这样的一个项目:Code-Server
这样一来,只要有一台配置OK的Linux的服务器,使用iPad之类的设备也可以在VSCode中看/写代码(随着iPad逐渐强调生产力,对键鼠支持的越来越好)
Name: Vibrancy
Id: eyhn.vscode-vibrancy
Description: Vibrancy Effect for Visual Studio Code
拖动有些卡顿,打开的时候窗口大小有些异常,不过,不影响代码体验~(笔记本上可能对GPU负担太大从而影响续航)
最近发现有个网站收集了很多微软的壁纸:Wallpaper Hub
最重要的是,网站有一些Fluent Design的元素,最明显的就是Acrylic的效果了
Scoop作为Windows下的命令行包管理工具,在之前的文章里用到的非常多,最近又看了下Scoop的说明,这里简要的介绍下更新后的特性,附带一些常用的命令行工具
Github:lukesampson/scoop的README对Scoop有了大概的介绍,我初次接触到是读到了 再谈谈 Scoop 这个 Windows 下的软件包管理器
需要注意的是如果Scoop安装的软件和Powershell的命令或者别名重合,Powershell的命令依然被优先使用
可以使用管理员模式打开powershell运行
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
# or shorter
iwr -useb get.scoop.sh | iex
部分软件源在Github之类的连接性不太好的地方,偶尔下载很慢而且易报错,现在Scoop推荐默认使用aria2进行多线程下载,只需要安装aira2即可开启多线程下载
scoop install aria2
参考SpencerWoo的文章添加的软件仓库基本上够用了
scoop bucket add extras
scoop bucket add java
scoop bucket add dorado https://github.com/h404bi/dorado
scoop reset,可以便捷的切换环境变量下的JDK除去上面介绍的一些,其实想得到软件都可以在Scoop中使用scoop search找下看看
$ scoop list
Installed apps:
7zip 19.00
chromedriver 76.0.3809.126
cmder-full 1.3.11
concfg 0.2019.03.09
ffmpeg 4.1.3 #编码工具
gawk 3.1.7
gcc 8.1.0
gdrive
git 2.21.0.windows.1
grep 2.5.4
innounp 0.48
iperf3 3.1.3 #网速测试工具
nodejs 12.5.0
pshazz 0.2019.04.02
R 3.6.0
sed 4.2.1
tesseract 4.1.0.20190314 #OCR工具
vim 8.1.1302
youtube-dl 2019.05.20 #偶尔下载视频
trafficmonitor #任务栏网速,CPU内存占用监测
screentogif #Gif录屏软件
ntop #类似htop的的终端下的资源监视器(但是做不到htop那么强大)
glow #终端下的Markdown Render
openjdk #添加java仓库后,默认安装最新版的openjdk
openjdk9 #java9
部分命令是无法在普通模式下运行的,一般的方法是打开一个新的管理员模式的窗口,相对来说不太方便,scoop可以安装sudo来实现对单一命令的赋权
比如设置禁用eth0接口的别名
scoop alias add ethd 'sudo netsh interface set interface eth0 disabled' 'disable eth0'
输入scoop ethd之后就会弹出用户账户控制的弹窗,提示需要管理员权限,用键盘确认就好,省去了再开一个窗口的麻烦(如果是长串命令都需要管理员权限的话还是开一个吧)
只介绍常用的简单指令
面对没有加密的m3u8直播录制,IPTV用的较多,m3u8的地址可以通过浏览器的检查工具找到
ffmpeg -i m3u8 'test.ts'
现在越来越多的网站选择把音频和视频分开,使用IDM下载两个文件可以直接用ffmpeg做快速的合并(复制)
ffmpeg -i v.mp4 -i a.mp4 -c copy output.mkv
当然如果youtube-dl支持视频网站的话使用youtube-dl更方便
常用于提取BGM,不做重编码的情况
ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac
-vn没有视频 -acodec copy说使用已经存在的相同的音频流
scoop依然有许多不成熟的地方,在高可靠性要求的环境下依然是不推荐的,最经常遇到的莫非是软件安装因为网络等问题终端,安装状态会返回成功,如果需要重新安装的话需要先进行卸载
再一个就是环境变量的问题,scoop可以在安装的时候配置好一些环境变量,但是卸载却不一定会移除,这就导致一些重要的软件在Scoop卸载之后再在其他位置安装会出现环境变量错误的问题
部分高度依赖于安装目录,权限以及关联众多的软件不推荐使用scoop安装,如Chrome
Powershell的别名设置不方便,直接使用WSL的自定义别名(.bashrc)调用Windows下的程序又不能直接在Powershell中运行,直到发现Scoop可以自由的添加“环境变量”,想起来Scoop alias来设置程序运行的scoop别名
本来的用法应该是为Scoop内的操作添加别名:
# Install app
scoop alias add i 'scoop install $args[0]' 'Innstall app'
scoop alias add add 'scoop install $args[0]' 'Install app'
# Uninstall app
scoop alias add rm 'scoop uninstall $args[0]' 'Uninstall an app'
scoop alias add remove 'scoop uninstall $args[0]' 'Uninstall an app'
# List apps
scoop alias add ls 'scoop list' 'List installed apps'
# Update
scoop alias add u 'scoop update $args[0]' 'Update apps, or Scoop itself'
scoop alias add upgrade 'scoop update $args[0]' 'Update apps, or Scoop itself'
但是这个格式看起来就很自由:
比如说给WinMTRCmd添加一个scoop mtr的别名
scoop alias add mtr '~/winMTRCmd $args[0]' 'MTR tools for Win CMD'
之后使用scoop mtr [host]就可以愉快的使用mtr工具了
这里以切换Java版本为例,例如在安装了openjdk和openjdk9之后,从默认的openjdk9切换到openjdk16
$ java -version
openjdk version "9.0.4"
OpenJDK Runtime Environment (build 9.0.4+11)
OpenJDK 64-Bit Server VM (build 9.0.4+11, mixed mode)
$ scoop reset openjdk
Resetting openjdk (16.0.1-9).
Linking ~\scoop\apps\openjdk\current => ~\scoop\apps\openjdk\16.0.1-9
$ java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-24)
OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
以下方法经本人验证通过,环境如下:
群晖 DS918+ DSM 6.2.4
mosquitto version 2.0.11
MQTTBox Version 0.2.3
前言:MQTT(Message Queuing Telemetry Transport)是一种基于发布/订阅(publish/subscribe)模式的”轻量级”通讯协议。客户端的发布者不直接将消息传递给订阅者,而是服务端(MQTT Broker)进行分发,一个客户端既可以是发布者,也可以是订阅者,更多介绍请参看维基百科上的词条 。以智能家居的情形简单举例,人体感应器(发布者)感应到有人时发布主题为”有人“的消息到服务端,而由于摄像头订阅了该主题,因此收到消息,开始录像,此时摄像头角色为(接收者),同时摄像头也作为(发布者)发布”监控异动“消息到服务器,而我们手机订阅了此主题,作为(接收者)便可收到消息。
目前有很多机构提供MQTT Broker服务,有免费的也有收费的。作为个人用户用于智能家居服务,我决定用已有NAS服务器自己搭建一个。参考了网上的一些文章,但大都写得有些复杂,对一般小白不是很友好,因此我尝试自创了一个极简的方法来实现,并记录下来供由需要的朋友学习。
第一步:管理员账号登陆群晖,在Docker中选择 “注册表”,搜索 “eclipse-mosquitto”,搜索结果中选择第一个,点击下载,选择标签latest。此时系统开始下载,可在“映像”中查看下载进度
第二步:下载完毕后,在“映像”里选择已下载的 eclipse-mosquitto 映像 ,点击启动按钮打开创建容器窗口。点击高级设置按钮,打开高级设置页面。
在高级设置中,勾选“启动自动重新启动”
在卷中,点击添加文件夹,在docker目录下新建文件夹 “mosquitto”并选择该文件夹,装载路径填写”/mosquitto/config”

在网络中,勾选“使用与 Docker Host 相同的网络”
确认应用后点击下一步,取消”向导完成后运行此容器“,然后应用
第三步:新建一个mosquitto.conf文件,并将该文件上传到 docker目录的 “mosquitto” 文件夹内。文件内容如下:
persistence true listener 18831 allow_anonymous true
文件上传后,再docker容器中启动第二步添加的 eclipse-mosquitto 容器
第四步:测试mosquitto服务
mqtt测试工具很多,我选择的是MQTTBox ,用chrome打开下列地址,添加应用后打开
https://chrome.google.com/webstore/detail/mqttbox/kaajoficamnjijhkeomgfljpicifbkaf?hl=zh-CN
点击”Create MQTT Client”,取一个名字,Protocol 选mqtt/tcp ,Host 填写你的主机地址和 mosquitto 服务端口 ,保存后可看到显示为Connected 表示已经正确连接上我们新建的mosquitto服务端

接着,添加一个订阅,主题随便写一个,我这里填FEEUS.COM,点击”Subscribe“完成订阅

在发布端发布一个订阅端一样的主题,这里也是 FEEUS.COM ,然后输入发布的消息,点击”Publish“后完成发布,该主题的订阅者即可收到该条消息
如果您喜欢这篇文章,或者它给您带来了帮助,您可以请我们喝一杯咖啡,我们将非常感谢您的支持!

