Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Little Twelve Toes
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Cameron Price
October 27, 2016
Programming
87
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Little Twelve Toes
Extending Elixir to support base-12 numbering
Cameron Price
October 27, 2016
More Decks by Cameron Price
See All by Cameron Price
Make it Fast: The Power of Benchmarking
cameronp
2
45
Other Decks in Programming
See All in Programming
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
130
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
260
ソフトウェアラスタライザ
fadis
1
790
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
140
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
280
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
110
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
0
420
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
160
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Unsuck your backbone
ammeep
672
58k
Un-Boring Meetings
codingconduct
0
410
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
490
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
370
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
890
Transcript
Little Twelve-Toes Extending Elixir to Support Base-12 Numbers
Little who?
None
None
None
If only this had been the norm…
Better??
Yes!
10 = 5 * 2
10 = 5 * 2 12 = 3 * 2
* 2
10 = 5 * 2 12 = 3 * 2
* 2 = 3 * 4 = 2 * 6
1,2,3,4,5,6,7,8,9,X,E, 10,11,12,13,14,15,16,17,18,19,1X, 1E,20
But this is kinda… uncomfortable, isn’t it?
Yeah, because the English language is base-10 also…
Solution: a new language for numbers
0..9 : The same 10 : X (pronounced ‘dec’) 11
: E (pronounced ‘el’) 12 : 10 (pronounced ‘do’)
13: 11 (do one) 14 :12 (do two) etc.. 24
: 20 (two do)
10: do 100: gro 1000: mo 10000: do-mo
Now we can say: 32X7 is “three mo two gro
dec do seven”
Now we can say: 32X7 is “three mo two gro
dec do seven” Easy peasy…
What’s this gotta do with Elixir?
Well, I got to wondering, how extensible is Elixir?
Introducing: Dozenex (https://github.com/cameronp/ dozenex)
In an ideal world: Decimal: 15 Hex: 0x0F Dozenal: 0d13
Unfortunately… it doesn’t look like you can add new number
formats
Compromise: Sigils!
def sigil_d(s, []), do: s |> String.split(".") |> _construct def
_construct([w]), do: w |> Dozenex.Integer. construct
iex(2)> ~d(13E) %Dozenex.Integer{digits: [1, 3, 11]} iex(3)>
defimpl String.Chars, for: Dozenex.Integer do def to_string(%Dozenex.Integer{digits: digits}) , do:
digits |> Dozenex.Integer. _convert_to_char_list |> Kernel.to_string end defimpl Inspect, for: Dozenex.Integer do def inspect(di, _opts), do: "~d(#{di})" end
iex(2)> ~d(13E) ~d(13E) iex(3)>
iex(6)> ~d(13E) |> Dozenex.Math.add(~d(22X)) ~d(369)
iex(7)> ~d(13E) |> Dozenex.to_doz_words "one gro three do el"
Ok, what’s missing?
NYI • Infix operators for +, -, *, /, and
..
NYI • Infix operators for +, -, *, /, and
.. • Floating point support
NYI • Infix operators for +, -, *, /, and
.. • Floating point support • Mixed Dozenal / Decimal math
PR’s welcome! (cameronp/ dozenex)
Learn more: • http://dozenal.org/ (The Dozenal Society of America) •
https://en.wikipedia.org/wiki/Duodecimal • https://en.wikipedia.org/wiki/Decimal#Other_bases
Thanks! I am cameronp on github, twitter, medium, gmail, and
the elixir slack team.