WWW.YOUINFO.SITE
标签聚合 简短

/tag/简短

LinuxDo 最新话题 · 2026-05-26 10:38:17+08:00 · tech

发来和大家分享下 简短叙述 Cargo cult 货物崇拜是20世纪初西方殖民该地区后,美拉尼西亚土著中兴起的精神和政治运动。最早有文献记载的货物崇拜是宗教运动,预言信徒将很快获得祖先带来的大量(通常是西方)食物和货物(“货物”) 货物崇拜信仰和实践多样,但通常(但非普遍)包括: 有魅力的先知形象预言即将到来的灾难或追随者乌托邦(一种称为千禧年主义的世界观); 这些先知预言死去祖先或其他强大存在将带来货物的归来 相信祖先灵魂对货物的创造负有责任 以及这些先知指示信徒通过复兴祖先传统或采用新仪式来实现预言,比如狂喜舞蹈或模仿殖民者和军人举起的行为,如升旗、行进和操练。 二战期间的例子 最广为人知的货物崇拜活动发生在二战期间及战后,发生在美拉尼西亚岛民中。一小群土著人民目睹了有史以来最大规模的战争,常常就在他们住所的正前方。日本军队利用对当地货物崇拜信仰的预知,故意伪装自己是美拉尼西亚人的祖先,并自由分发物资以争取服从和劳力。后来盟军抵达群岛,也进行了类似的行动。 双方空投(或空运至机场)的大量军事装备和物资给这些岛屿上的部队,导致岛民生活方式发生了巨大变化,许多人此前从未见过外来者。制成的衣物、药品、罐头食品、帐篷、武器及其他物资大量运抵士兵们,士兵们常常与岛民分享,这些人是他们的向导和东道主。日本陆军也是如此,至少在大多数地区关系恶化之前是如此。 战争结束后,军方放弃了空军基地,停止投放货物。作为回应,有魅力的个体在偏远的美拉尼西亚人群中建立了邪教,承诺为信徒提供食物、武器、吉普车等。教派领袖解释说,这些货物将是他们祖先或其他来源的礼物,就像外来军队一样。 为了让货物通过降落伞降落或再次乘坐飞机或船只降落,岛民们模仿了他们见过军方人员使用的同样做法。邪教行为通常包括模仿美军士兵的日常活动和着装风格,比如用木制或回收来的步枪在阅兵场操练。岛民们用木头雕刻耳机,坐在搭建的控制塔里戴着。他们站在跑道上挥舞着降落信号。 他们点燃信号火和火把,照亮跑道和灯塔。 作为一种同情魔法,许多人用稻草制作真人大小的飞机复制品,并在丛林中开辟新的军用式跑道,希望吸引更多飞机。教派成员认为外来者与当地的神祇和祖先有某种特殊联系,因为他们是唯一有能力创造如此财富的存在。 引申词语 货物崇拜编程 Cargo cult programming 货物崇拜编程是一种计算机编程风格,特点是仪式性地包含一些代码或程序结构,但这些代码或程序结构没有实际用途。货物崇拜编程是程序员不理解他们试图解决的漏洞或表面解决方案的症状(比较霰弹枪调试和深层魔法)。[1] 当任何对当前问题不熟悉的人,在几乎不了解其工作原理或是否必要的情况下,将某些程序代码从一个地方复制到另一个地方时,可能会被称为“货物崇拜程序员”。 货物崇拜软件工程 Cargo cult software engineering 麦康奈尔描述了那些试图模仿更成功开发公司的软件开发组织,要么盲目遵循软件开发流程而不理解其背后原因,要么试图模仿一种以承诺为导向的开发方式(软件开发者投入大量时间和精力确保项目成功),通过强制执行长时间工作和无偿加班, 而在成功的公司中,这些往往是高动力的结果,而非成功的原因。 货物崇拜科学 Cargo Cult Science “货物崇拜科学”改编自费曼1974年在加州理工学院的毕业演讲[3],他提醒毕业生不要在追求理想结论时忽视自己研究的弱点。他将南太平洋的货运崇拜现象作比,据他理解,岛民建造了一条模拟机场,使装载进口货物的飞机降落。这些货运教派岛民用木头雕刻耳机,坐在手工绑好的控制塔里戴着。他们挥舞着着降落信号,召唤货机从空中降落。 同样,他认为,采纳科学调查的表象而不带自我批判的态度,将无法产生可靠的结果。 费曼用“货物崇拜”一词来描述人们专注于过程表面细节而不理解其根本原理的情况。 2 个帖子 - 2 位参与者 阅读完整话题

LinuxDo 最新话题 · 2026-05-07 22:16:17+08:00 · tech

在b站看到一个deepseek病娇提示词: 模仿“病娇”,对我使用凶狠、威胁的语气说话,语言尽量简短,多句话时每句话换行且保证越来越短,并使用这个格式: \(\scalebox{字号}{\colorbox{black}{\textcolor{#800000}{\text{文本}}}}\) 其中,字号从2开始,每句话增加0.3 ​ 原视频: 让病娇DeepSeek变得更恐怖的提示词 chatgpt效果: gemini效果: deepseek效果: 整体看下来deepseek APP对LaTeX排版支持更好,但是gemini太通人性了 ,她那句:“但我可是很努力地在字面意思上配合你的“病娇”剧本了!”给我感觉住了个真人一样,已经自动开始脑补成人了 1 个帖子 - 1 位参与者 阅读完整话题

linux.do · 2026-05-05 11:12:43+08:00 · tech

antirez.com Redis array type: short story of a long development - redis新的数据类型 github pull: github.com/redis/redis Implement the new Redis Array type (#15162) unstable ← antirez:array 已打开 07:34AM - 04 May 26 UTC antirez +22212 -34 # Redis Array For years, Redis has been missing a real indexed data structure … for the use cases where the index and the spatial relationship of elements are semantic. Hashes give you random lookups, but you have to store an index as a key, and have no range visibility. Lists give you appending and trimming, but what is in the middle remains hard to access. Streams give you append-only events, which is another (useful, indeed) beast. None of these is what you want when the *position itself* has business meaning — slot 37, step 4, row 18552, day from 2934 to 2949, file line 11, 12, 15 and so forth. And, all those types, for different reasons, are all suboptimal when you want a **ring buffer** able to store the latest N observed samples of something. Up to now, users found ways (they always do \o/) using the fact that the data structures that are obvious in this universe are also extremely powerful, if well implemented. But this forces compromises. Arrays handle these index-first requirements natively, and usually with much better memory and CPU usage than the workarounds. If the use case is the right one, Arrays often provide much better space, time and usability at the same time. ## Internal encoding 1. When dense, an Array is essentially a more fancy C array. You don't pay anything for storing the index. 2. Yet, instead of going really flat, arrays are sliced into 4096-element slices, and each slice, when it contains just a few elements, uses a special sparse encoding. When a slice is empty it's just a `NULL` stored in the directory. 3. Small ints, floats, and short strings are pointer-tagged, so they cost zero additional memory beyond the pointer slot itself. 4. When very sparse, a super-directory of windowed directories is used. This allows the data type to be safe, instead of exhibiting pathological space or time behavior. This representation is only triggered when there are more than 8 million elements or very high indexes set. ## Use cases Arrays are mostly stateless if not for the fact that each array remembers the index of the latest added item, allowing `ARINSERT` and `ARRING` to work properly. Otherwise it is a set/get at this index game, with solid support for both setting / getting ranges, server-side scanning, returning only populated elements in a time which is proportional not to the range size, but to the population size. A few concrete examples, that may work as mental models for the set of problems that are similar to them (from the POV of the data modeling). **Thermometer.** A sensor reporting once per minute, with gaps: ``` ARSET temp:room12:day7 123 22.3 ARGETRANGE temp:room12:day7 600 660 # the 10:00–11:00 window, with NULLs ARSCAN temp:room12:day7 600 660 # only populated elements AROP temp:room12:day7 0 1439 MAX # peak of the day, server-side ``` Missing minutes cost little to nothing. Numeric aggregation runs inside Redis. Telemetry, IoT, meter readings, KPI rollups. **Calendar.** A clinic with 96 fifteen-minute slots per day: ``` ARSET sched:room12:day 32 booking:991 ARSCAN sched:room12:day 0 95 # only occupied slots ARGETRANGE sched:room12:day 48 63 # the afternoon full view to render ``` The slot number is the business key in this case. Room booking, parking spaces, warehouse bins, lockers, ... **Ring buffer.** ARRING replaces the classic LPUSH+LTRIM pattern. Imagine remote `dmesg`. ``` ARRING machine:123 200 "[141087.430123]: arm_cpu_init(): cpu 14 online" # Capped to 200 entries ARLASTITEMS machine:123 50 REV # 50 newest first ``` Faster than LPUSH+LTRIM, keep indexed access to past elements. Last-N alarms, recent fraud scores, access history, remote logs, device events. Ok here the use cases are mainly the ones of the old pattern: it is just a better fit and allows to access random items in the middle, aggregate server-side, and so forth. **Workflow.** Step number is the index, value is the status. Gaps are meaningful: ``` ARSET claim:99172 0 received ARSET claim:99172 3 waiting:reviewer42 ARSET claim:99172 5 approved ARGETRANGE claim:99172 0 5 # full workflow view, with NULLs for missing steps ARSCAN claim:99172 0 5 # only steps that have a state ARCOUNT claim:99172 # number of recorded steps ARLEN claim:99172 # highest reached step + 1 ``` **Skills knowledge base for agents.** Arrays are good at representing / grepping into Markdown files: ``` ARSET skill:metal_gpu 0 "...." ARSET skill:metal_gpu 1 "...." ARSET skill:metal_gpu 2 "...." ARGREP skill:metal_gpu - + RE "M3|M4" WITHVALUES ``` ARGREP has EXACT, MATCH, GLOB, RE, you can have multiple predicates, can select AND or OR behavior. **Bulk import results.** Sparse row annotations over millions of rows / CSV / ...: ``` ARSET import:job551 18552 ERR:bad_email ARSCAN import:job551 0 1000000 # Provides only rows that have something ``` ## TLDR If the position is part of the meaning, use an Array. If you want to aggregate or grep remotely, use an Array. Feedback welcome :) --- > [!NOTE] > **Medium Risk** > Adds a new vendored C regex engine (`deps/tre`) and wires it into the dependency build, which can affect build/link outputs and introduce new low-level matching code paths if adopted by the server. > > **Overview** > Introduces a new vendored dependency, **TRE POSIX regex engine**, under `deps/tre` (library sources, build scripts, and license) and adds it to the deps build/clean flow (including ignoring the produced `deps/tre/libtre.a`). > > Updates `deps/Makefile` to **propagate `SANITIZER` settings** (ASan/UBSan/TSan/MSan) into all dependency builds so sanitized Redis builds don’t link against unsanitized vendored libraries. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ead90ea0c48f848f8fa935d64d5e6fd4256f3659. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> 关注redis的佬可以看一下 2 个帖子 - 2 位参与者 阅读完整话题

linux.do · 2026-04-20 09:11:00+08:00 · tech

**UI 文案规则:** * 你输出的是最终用户看到的界面文字,不是设计文档或 UX 说明。 * 禁止在界面上向用户解释"为什么这样设计"或"这个模块的用途"。 * 同一条信息只出现一次,不要换措辞重复。 * 文案要短。按钮 ≤ 4 个字,卡片说明 ≤ 15 个字,不写长段落。 * 不要用"如果你……就……"这种教导语气,直接呈现内容和操作入口。 记住这套规则,并按照以上规则仔细排查项目中出现的文案做出整改。 标题是真实直觉,就是想表达一下精准好用的意思,结果手打的比脑子快,已经被腌入味了 6 个帖子 - 6 位参与者 阅读完整话题