~gloatingfiddle/xkcd-2637-encoding

b4772f065514f32c242d4b814762e67693de7693 — David Hagerty 2 years ago 1d53315 master
Add starter files
3 files changed, 24 insertions(+), 0 deletions(-)

A LICENSE
A README.md
A cmd/rn2637.go
A LICENSE => LICENSE +9 -0
@@ 0,0 1,9 @@
 The MIT License (MIT)

Copyright © 2022 David Hagerty

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

A README.md => README.md +8 -0
@@ 0,0 1,8 @@
# XKCD Roman Numeral Encoding

This is a little toy encoder that implements the encoding demonstrated in the alt-text of [XKCD 2637](https://xkcd.com/2637).

I make a few opinionated changes to have the encoding be reversible, which unfortunately ruins the joke in the alt-text.
I am considering making that a command-line option, however.

It could also be fun to have the decoder spit out every possible decoding of the text input.

A cmd/rn2637.go => cmd/rn2637.go +7 -0
@@ 0,0 1,7 @@
package main

import "fmt"

func main() {
	fmt.Println("hello world")
}