My graduation cap runs Rust
214 points
• 6 days ago
• Article
Link
从未大学毕业的 Eric Park 分享了他在美国毕业帽和礼服租赁体系的经历,指出租金高达 94 美元且必须归还。他还幽默地质疑典礼上把流苏从右侧移到左侧的传统,打趣称这是对左撇子的"歧视"。这一传统促使他制作了一个装置:当流苏被移动时,帽檐底部会亮起灯——毕竟根据租赁协议和 Purdue University 的规定,把帽子点着显然不被允许。
该项目使用了 Digispark ATtiny85 微控制器、 48 颗 WS2812B LED 、从报废的苹果 USB-C 数据线回收的线材、用于检测流苏的簧片开关和磁铁、一个 USB-C Power Delivery 触发板以及一个移动电源。代码用 Rust 编写,耗时大约两小时,但由于 avr-hal 和 ws2812-avr 库默认不支持 ATtiny85,他不得不对它们进行 fork 和补丁处理。硬件组装花了三个多小时,Eric 指出动手总比别人说的要难。
尽管做成了这个装置,Eric 最终决定不在毕业典礼上佩戴它,因为他觉得看起来"相当俗气",像孩子眼中的游戏电脑,或是老一辈人认为会诱发癫痫的闪烁灯。他在视频中对快速闪烁灯做了警告,并提到与癫痫相关的一个错失的玩笑机会。项目完整源码可在他的 GitHub 仓库 github.com/ericswpark/gradcap-rs 查阅。
Eric Park, who had never graduated from college before, shares his experience with the US graduation cap and gown rental system, noting the high cost of $94 and the requirement to return them. He also humorously questions the tradition of moving the tassel from right to left during the ceremony, jokingly suggesting discrimination against left-handed people. This tassel-moving tradition inspired him to create a contraption that would light up the bottom of his cap when the tassel was moved, since setting the cap on fire was likely prohibited by the rental agreement and Purdue University regulations.
The project uses a Digispark ATtiny85 microcontroller, 48 WS2812B LEDs, wires salvaged from a dead Apple USB-C cable, a reed switch and magnet for tassel detection, a USB-C Power Delivery trigger board, and a power bank. The code was written in Rust, which took about 2 hours, though it required forking and patching the `avr-hal` and `ws2812-avr` libraries since they didn't support the ATtiny85 out of the box. The hardware assembly took over 3 hours, which Eric notes is always more challenging than people claim.
Despite building the device, Eric decided not to wear it to his actual graduation ceremony because he felt it looked "pretty tacky," comparing it to what kids might think of as a gaming PC or what older generations might consider seizure-inducing. He includes a video warning about rapid strobing lights, referencing a missed opportunity related to the seizure comment. The full source code for the project is available on his GitHub repository at github.com/ericswpark/gradcap-rs.
93 comments • Comments Link
• 作者选择用 Rust 来做 LED 毕业帽项目,虽然比用 Arduino 库更费事,但主要动机是想写出一个吸引眼球的博客标题,评论者觉得这一点很有趣。
• 在美国,不同学校的毕业帽和学位礼服租赁政策各不相同:有的学校要求昂贵的租赁(约 94 美元),有的学校则提供更划算的购买选项,甚至免费提供礼服,反映出各高校做法不一致。
• 学术礼服的租赁模式是按受众定价的典型例子,像 Jostens 这样的公司通过与机构签订合同获利,因为做采购决定的管理层并不直接承担费用,这种情况类似教材定价或监狱电话的垄断。
• 有评论质疑租赁比购买更经济的说法,指出清洗、检修和重新分配二手礼服的成本可能高于直接制造新礼服;也有评论提到像 Aliexpress 上存在廉价替代品。
• 许多毕业生因为不想付租赁费而选择不去参加典礼,指出不参加典礼也能拿到学位证书,有人认为仪式更多是为学校和家庭而非真正为毕业生本人举办的。
• 讨论显示学术礼服的做法在国际上差异很大,英国大学也普遍租赁礼服,但经常参加典礼的学者通常会买自己的礼服,有时还会额外定制口袋等细节。
• 有人分享了毕业礼服的创意替代用途,包括用作万圣节服装、捐给今后的毕业生,甚至有人开玩笑建议把学位帽纳入葬礼安排。
• LED 毕业帽项目本身引发了关于不同微控制器平台适用场景的讨论,有人指出 ATtiny85 板在低成本、简单 GPIO 和 HID 项目中表现出色。
• 评论还谈到在毕业典礼上戴 LED 帽的社会接受度问题,许多学校有严格的装饰规定,突然亮起的灯光在正式典礼上可能会造成干扰或惊吓。
• 对话还涉及大家对高校从学生体验各环节(从礼服到项目关闭)中牟利的普遍不满,一位评论者提到他们的 CS 研究生项目在他毕业当年被关闭。
总体讨论反映出人们对学术里程碑商业化的不满,尤其对许多人认为给学生增加不必要经济负担的礼服租赁模式抱怨最多。尽管各机构做法差异很大,普遍共识倾向于认为这些费用具有剥削性,尤其是学校不提供购买选项时。 LED 毕业帽作为一个轻松的切入点,引发了关于机构定价、仪式传统价值以及在面对任意限制时人们如何创造性地解决问题的更深入讨论。 • The author chose to use Rust for an LED graduation cap project despite it being more difficult than using Arduino libraries, motivated primarily by wanting a catchy blog post title, which commenters found amusingly relatable.
• Graduation cap and gown rental practices vary significantly by institution in the US, with some schools requiring expensive rentals (around $94) while others offer affordable purchase options or even provide them for free, highlighting inconsistent approaches across universities.
• The rental model for academic regalia exemplifies captive audience pricing, where companies like Jostens exploit institutional contracts since administrators making purchasing decisions aren't the ones bearing the costs, similar to textbook and prison telephone monopolies.
• Some commenters question the economic logic of renting versus buying, noting that the logistics of cleaning, inspecting, and redistributing used gowns might actually cost more than manufacturing new ones, while others point out that cheap alternatives exist on platforms like Aliexpress.
• Many graduates choose not to participate in ceremonies altogether to avoid rental fees, noting that diplomas are awarded regardless of ceremony attendance, and some view the ritual as being more for the institution and families than for the graduates themselves.
• The discussion reveals that academic regalia practices differ internationally, with UK universities also commonly renting gowns, though academics who attend multiple ceremonies often purchase their own and sometimes customize them with extra pockets.
• Several commenters share creative alternative uses for graduation regalia, including Halloween costumes, donations to future graduates, or even the humorous suggestion of incorporating the cap into funeral arrangements.
• The LED graduation cap project itself sparked discussion about appropriate use cases for different microcontroller platforms, with some noting that ATtiny85 boards are excellent for simple GPIO and HID projects at low cost.
• Commenters debated the social acceptability of wearing an LED-equipped cap at graduation, with some noting that many schools have strict decoration policies and that sudden light activation could be disruptive or startling in a formal ceremony.
• The conversation touches on broader frustrations with how universities monetize every aspect of the student experience, from regalia to program closures, with one commenter noting their CS graduate program was shuttered the year they graduated.
The discussion reveals widespread frustration with the commercialization of academic milestones, particularly the rental model for graduation regalia that many see as an unnecessary financial burden on students. While practices vary significantly between institutions, the consensus leans toward viewing these costs as exploitative, especially when schools don't offer purchase alternatives. The LED graduation cap project served as a lighthearted entry point into deeper conversations about institutional pricing, the value of ceremonial traditions, and the creative problem-solving that emerges when people refuse to accept arbitrary constraints.