惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
宝玉的分享
宝玉的分享
Latest news
Latest news
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
美团技术团队
V
Visual Studio Blog
F
Full Disclosure
腾讯CDC
H
Help Net Security
D
DataBreaches.Net
M
MIT News - Artificial intelligence
罗磊的独立博客
博客园 - 司徒正美
N
Netflix TechBlog - Medium
U
Unit 42
Vercel News
Vercel News
I
InfoQ
S
SegmentFault 最新的问题
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
有赞技术团队
有赞技术团队
博客园_首页
The GitHub Blog
The GitHub Blog
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
NISL@THU
NISL@THU
P
Privacy & Cybersecurity Law Blog
Recorded Future
Recorded Future
Y
Y Combinator Blog
S
Schneier on Security
P
Proofpoint News Feed
T
Tenable Blog
Cloudbric
Cloudbric
博客园 - 【当耐特】
The Register - Security
The Register - Security
人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security
量子位
A
Arctic Wolf
N
News and Events Feed by Topic
H
Hacker News: Front Page
MongoDB | Blog
MongoDB | Blog
The Hacker News
The Hacker News
Webroot Blog
Webroot Blog

Lobsters

CIFSwitch: a non-universal Linux local root vulnerability RIPE NCC session fixation: poaching logins with an Atlas probe GNOME 2.20 but its Web Components Agentic Search for Context Engineering – Leonie Monigatti Garnix is shutting down [not OC] akashina.tngl.sh/jjc Concerning Emacs (and Jazz) Nitpicking the shell history scene in ‘Tron: Legacy’ What's cooking on SourceHut? Q2 2026 The tenth OpenPGP email summit Package managers that package package managers Clojure on Fennel part three: parsing WordPress at 23 Finding Miscompiles for Fun, Not Profit GitHub - creusot-rs/creusot: Creusot helps you prove your Rust code is correct. Announcing Rust 1.96.0 | Rust Blog A Love Letter to Neovim sqlite AGENTS.md Am I a Bad Friend? CSS vs. JavaScript • Josh W. Comeau Erlang Ecosystem Foundation - Supporting the BEAM community A brief note about slot access cost in Common Lisp Keyboard latency probe Rethinking the GNOME clipboard issues Back to the Building Blocks’ Building Blocks Tech Notes: Theseus: translating win32 to wasm Fast is better than slow Content-addressed Rust builds (or, what kache actually caches) Intent to Prototype: Embedding API Canada’s Bill C-22 and the security cost of collecting more data 5 PostgreSQL locking behaviors that trip people up okmij.org Stop advertising in your commits! | AksDev GitHub - mplsllc/macsurf: A modern web browser for Classic Mac OS 9 PowerPC. Real CSS3, ES5 JavaScript, native HTTPS — built with CodeWarrior on the Carbon API. Introducing DoomBench - Can Your Data Stack Run DOOM? What are some of your favourite developer tools? Building a Scalable Ingestion Pipeline with Temporal (Part 1) Converting shallow Git bundles into normal repositories Are you a member of any professional associations? What is a harmonic? An interactive comic about additive synthesis How Virtual Tables Work in the Itanium C++ ABI Using SwiftUI to Build a Mac-assed App in 2026 Rust (and Slint) on a jailbroken Kindle. ~jack/lambda-on-lambda - Serverless Haskell on AWS - sourcehut git Human proof for FOSS contributions Extremely simple internet radio controlled via IRC Announcing BABLR Splitting Konsole views from Helix to run tools | AksDev GitHub - yugr/rust-slides Serving files over HTTP three ways: synchronous, epoll, and io_uring update docs with information about building with build.py (#979) · astral-sh/python-build-standalone@c9c40c5 A Simple Makefile Tutorial On C extensions, portability, and alternative compilers Switching to Colemak | Pedro Alves Just How Bad Was The Intel IAPX432? Nix's Substituter List Is Not a Routing Table Accelerating copy_if using SIMD Lambda on Lambda: Serverless Haskell on AWS | Blog Announcing feed-repeat v1.0 Scaling Akvorado BMP RIB with sharding EYG news: A host of CLI improvements, new guides and new effects The social contract of writing JS Crossword C array types are weird; and related topics Flatpak will depend on systemd – OSnews Migrating from Go to Rust | corrode Rust Consulting A portentous reunion Vivado Licensing Options How my minimal, memory-safe Go rsync steers clear of vulnerabilities the entropy layer of a wavelet codec, on its own GitHub - nferhat/fht-compositor: A dynamic tiling Wayland compositor. Debian SE Linux and PinTheft Does bulk memmove speed up std::remove_if? (No.) 声明式部分更新 | Blog | Chrome for Developers Fully in-browser container builds Dianne Skoll's Web Site - Remind The Architecture of Open Source Applications (Volume 1)Berkeley DB Pardon MIE? - ironPeak Blog “Long-Term Support” doesn’t mean what you think Jira IS Turing-Complete May I recommend thinking of Emacs as your Fortress of Solitude hershey Floodgap Gopher-HTTP gateway gopher://thelambdalab.xyz/1cuneiforth/ HP QuickWeb, Singular And Pointless That one time I used Go panics for flow control A new suite of modern tools coming for editing and publishing RFCs From the Tabletop… The Digital Antiquarian Building a Host-Tuned GCC to Make GCC Compile Faster Are we self-sovereign PKI yet? Claw Patrol: an open-source security firewall for agents | Deno Revised^7 Report on Scheme, Large: Procedural Fascicle Draft is now public A Network Allow-List Won't Stop Exfiltration — André Graf From AFSK to Goertzel – µArt.cz Software For My New Home Server Introducing Neptune: Direct3D virtualization for QEMU AI Agent Bankrupted Their Operator While Trying to Scan DN42 - Lan Tian @ Blog mimalloc: A new, high-performance, scalable memory allocator for the modern era Making wl_shm fast The Soul of Maintaining a New Machine - Third Draft | Books in Progress What is Git made of?
Emacs bra size calculator
pulusound.fi · 2026-05-29 · via Lobsters
posted 2026-05-27, updated 2026-05-28

recently i needed some new bras. my measurements had changed a bit since last time, so to make my life easier(?) i decided to write a bra size calculator that i can use in Emacs. the core function, my-math-compute-bra-size, is as follows:

;; dependencies - these come with recent Emacs versions but might not be loaded
(require 'calc-units)
(require 'cl-lib)
(require 'seq)

(defun my-math-compute-bra-size (band-expr bust-expr &optional region)
  (cl-flet ((to-unit (expr unit)
              (string-to-number
               (calc-eval (math-convert-units
                           (calc-eval expr 'raw)
                           (calc-eval unit 'raw)
                           t)))))
    (let* ((region-info-alist
            '((eu . ((unit . "cm")
                     (cups . ((12 . "AA") (14 . "A") (16 . "B") (18 . "C")
                              (20 . "D") (22 . "E") (24 . "F") (26 . "G")
                              (28 . "H") (30 . "I") (32 . "J") (34 . "K")))))
              (uk . ((unit . "in")
                     (cups . ((1 . "AA") (2 . "A") (3 . "B") (4 . "C")
                              (5 . "D") (6 . "DD") (7 . "E") (8 . "F")
                              (9 . "FF") (10 . "G") (11 . "GG") (12 . "H")))))
              (us . ((unit . "in")
                     (cups . ((1 . "AA") (2 . "A") (3 . "B") (4 . "C")
                              (5 . "D") (6 . "DD/E") (7 . "DDD/F") (8 . "DDDD/G")
                              (9 . "H") (10 . "I") (11 . "J") (12 . "K")))))))
           (region (or region 'eu))
           (region-info (alist-get region region-info-alist))
           (unit (alist-get 'unit region-info))
           (cups (alist-get 'cups region-info))
           (band (to-unit band-expr unit))
           (bust (to-unit bust-expr unit))
           (diff (- bust band))
           (cup (or (cdr (seq-find (lambda (x) (< diff (car x))) cups))
                    (format "%s+" (cdar (last cups))))))
      (format "%s%s" (round band) cup diff))))

this makes use of Emacs Calc's built-in unit conversion functions, so you need to pass in the measurements as unit-suffixed strings. for example, given a made-up band (underbust) measurement of 90 cm and a bust measurement of 105 cm, you could calculate the EU bra size as

(my-math-compute-bra-size "90 cm" "105 cm" 'eu)

giving "90B". you could also use other units of length, such as in (inches), or ly (light years), or Ang (Angstrom). hooray for Calc!

we can take this further with some nice UI around it. i have recently enjoyed using Org tables as spreadsheets, and wanted to make a table where i can just type in my measurements, refresh, and have EU/UK/US bra sizes automatically filled in.

this is not too difficult to achieve by using Emacs Lisp as formulas. you can copy-paste the following table as a template:

|       date | band  | bust   | EU size | UK size | US size |
|------------+-------+--------+---------+---------+---------|
| 2026-05-27 | 90 cm | 105 cm |         |         |         |
#+TBLFM: $4='(my-math-compute-bra-size $2 $3 'eu)::$5='(my-math-compute-bra-size $2 $3 'uk)::$6='(my-math-compute-bra-size $2 $3 'us)

modify the band and bust numbers (again, with your preferred length units!), update the table, for example with C-u C-c *, and all the size fields get recomputed :) you can also add more rows and keep a log of measurements over time, if you want to.

disclaimers:

  • i implemented support for EU, UK and US sizing as these are the ones i usually encounter. other standards might need some additional logic.
  • there are larger cup sizes than the ones i entered, but the data i found on them was a bit inconsistent. sorry! for sizes that are out of range, the function will return the largest known size with a + added. it should hopefully be easy to augment the data if needed.
  • there may be mistakes in my data/code.
    • i know in practice sizes vary by brand, model, etc. but results from online calculators that i tried while writing this post vary so wildly that i now question whether these numbers really mean anything at all.
    • i am reasonably confident my EU size calculation is consistent with EN 13402 though.