Timeline for Alphabetize Integers
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | CommunityBot | Commonmark migration | |
| Dec 10, 2016 at 19:56 | comment | added | Ilmari Karonen | ...and, unfortunately, I found a bug in the sorting: it turns out that hyphens do matter, e.g. for the comparison between 44 ("forty four") and 40004 ("forty thousand four"). This can be fixed with a string replacement like replace the text "-" in Q entry with " ", but that costs a lot of bytes. Also, it turns out that, to correctly sort the test case 40, 44, 40000, 40804, 40004 (which should sort in that order), you'll also need Use American dialect (to get rid of "and") and replace the text "," in Q entry with "" (to remove a comma from 40804. :( | |
| Dec 10, 2016 at 19:25 | comment | added | Ilmari Karonen | I finally got a chance to play with Inform7 a bit, and managed to re-golf your entry down to just 118 bytes. Since posting Inform code in comments doesn't work very well, I went ahead and edited it into your answer directly. I hope you don't mind, feel free to revert and/or tweak my edits any way you like if you do. | |
| Dec 10, 2016 at 19:23 | history | edited | Ilmari Karonen | CC BY-SA 3.0 | re-golf down to 118 bytes, edit description to match; I hope you don't mind, feel free to revert or edit further if you do |
| Dec 2, 2016 at 18:56 | comment | added | wubs | I'd say the "and" at the end is fine. I didn't say that the delimiters had to be uniform, so this is a perfectly acceptable answer. If I could give points for most interesting answer, I would give it to you. I really enjoy the readability of this language, even golfed. Nice job! | |
| Dec 1, 2016 at 23:01 | comment | added | Ilmari Karonen | +1 for the language choice. I'd have to check, but I suspect there are some golfing opportunities left, though; for example, does the parser really require all those "the" articles? And you'd have to ask the OP, but I don't see any obvious reason why " and " would not be a valid delimiter. Even if not, a single space is explicitly allowed, so just say "[R entry] " should suffice. | |
| Dec 1, 2016 at 21:04 | history | edited | Draconis | CC BY-SA 3.0 | Added explanation. |
| Dec 1, 2016 at 20:59 | history | edited | Draconis | CC BY-SA 3.0 | Trimmed off a few bytes by decrementing instead of incrementing. |
| Dec 1, 2016 at 20:57 | comment | added | Draconis | @Pavel Indeed! "(number) in words" returns a string with a textual representation of the number. It conveniently uses "minus" for negative numbers, and while it puts hyphens between words, it does so consistently and alphabetizes hyphens before all letters (so the end result is the same). | |
| Dec 1, 2016 at 20:52 | comment | added | Pavel | I'm slightly confused by this. Is words a reference of the spelled out versions of numbers, built into Inform 7? | |
| Dec 1, 2016 at 20:49 | history | answered | Draconis | CC BY-SA 3.0 |