zeitlings Posted February 7, 2023 Posted February 7, 2023 (edited) Convert Roman numerals to decimal and vice versa. Accepts Arabic numbers in the range 1 to 3999. Download on Github Edited July 12, 2024 by zeitlings unitof 1
Cipri Posted September 29, 2024 Posted September 29, 2024 Roman Numeral workflow keeps telling "Invalid Numeral".
zeitlings Posted September 29, 2024 Author Posted September 29, 2024 🤷♂️ What is the debugger saying? FYI, this forum is intended for general bug reports related to the Alfred App. A better place report your issue would be the thread for the workflow:
vitor Posted September 29, 2024 Posted September 29, 2024 Moved the thread to the right place. @Cipri For future reports, please be sure to consult the short guide on asking for help with a workflow. Cipri 1
Cipri Posted September 29, 2024 Posted September 29, 2024 5 hours ago, zeitlings said: What is the debugger saying? [17:26:55.029] Logging Started... [17:27:01.895] Roman Numeral[Script Filter] Queuing argument '2' [17:27:02.270] Roman Numeral[Script Filter] Queuing argument '20' [17:27:02.923] Roman Numeral[Script Filter] Script with argv '2' finished [17:27:02.927] Roman Numeral[Script Filter] {"items":[{"title":"Invalid Numeral","arg":"Invalid Numeral","text":{"copy":"Invalid Numeral","largetype":"Invalid Numeral"},"valid":true}]} [17:27:03.736] Roman Numeral[Script Filter] Script with argv '20' finished [17:27:03.740] Roman Numeral[Script Filter] {"items":[{"title":"Invalid Numeral","arg":"Invalid Numeral","text":{"copy":"Invalid Numeral","largetype":"Invalid Numeral"},"valid":true}]}
zeitlings Posted September 29, 2024 Author Posted September 29, 2024 Mysterious indeed. Have you tried reinstalling the workflow? Are you running macOS 13 or newer? I assume so, because there are no complaints about the Regex. The "Invalid Numeral" response is shown when the input is identified as not-a-number, i.e. casting "2" and "20" to an integer fails, which is nonsensical.
Cipri Posted September 29, 2024 Posted September 29, 2024 I have reinstalled the workflow, it didn't work. I´m running Sequoia.
zeitlings Posted September 29, 2024 Author Posted September 29, 2024 Since we have nothing to go by, I simply changed some implementation details: avoid direct ScriptFilter input, launch with explicit regex support, and compile, which might at least yield an error. -> Roman Numeral v1.2.0.
olivergiangvu Posted September 30, 2024 Posted September 30, 2024 Is the limit is up to 10,000? Any number beyond that take me to a Invalid Number.
zeitlings Posted September 30, 2024 Author Posted September 30, 2024 8 hours ago, Cipri said: Version 1.2.0 works! Thank you. Glad to hear it, although I can't say why. 2 hours ago, olivergiangvu said: Is the limit is up to 10,000? Any number beyond that take me to a Invalid Number. By convention, the limit is 3999. Quote The Roman numeral system technically doesn’t “stop” at 3,999, but the way it is typically written does. Roman numerals are additive and subtractive symbols, with values such as I (1), V (5), X (10), and so on. The largest commonly used symbol is M (1,000). To represent numbers larger than 3,999, Romans used a convention where a bar was placed over a numeral to multiply its value by 1,000. For example: • V̅ = 5,000 • X̅ = 10,000 • L̅ = 50,000 However, in most modern applications of Roman numerals, especially in things like clock faces or movie credits, numbers beyond 3,999 are rare, so the bar-over convention isn’t commonly used. Since the standard Roman numeral system does not have standalone symbols for values above M (1,000) and doesn’t easily represent more complex numbers, it’s often said to “stop” at 3,999 (MMMCMXCIX), the largest number that can be written with the commonly used Roman numerals. vitor and olivergiangvu 2
David H Posted December 1, 2024 Posted December 1, 2024 (edited) Alfred version: Alfred 5.5.1 Build 2273 MacOS version: Sequoia 15.1.1 Version 1.2.0 is not functioning as expected. When entering the keyword "rn" along with a value, no output is produced. Interestingly, downgrading to version 1.1.0 resolves the issue, and it works correctly. Here is the debug result with version 1.2.0: [20:30:38.728] Roman Numeral[Script Filter] Queuing argument '3' [20:30:45.325] Roman Numeral[Script Filter] Queuing argument '3' [20:30:46.683] Roman Numeral[Script Filter] Queuing argument '1' [20:30:49.372] Roman Numeral[Script Filter] Queuing argument '7' [20:30:49.427] Roman Numeral[Script Filter] Queuing argument '70' [20:30:49.934] Roman Numeral[Script Filter] Queuing argument '7' And here is the debug result with version 1.1.0: [20:44:46.346] Roman Numeral[Script Filter] Queuing argument '3' [20:44:47.110] Roman Numeral[Script Filter] Script with argv '3' finished [20:44:47.115] Roman Numeral[Script Filter] {"items":[{"title":"III","arg":"III","text":{"copy":"III","largetype":"III"},"valid":true}]} Edited December 1, 2024 by David H
zeitlings Posted December 1, 2024 Author Posted December 1, 2024 Hey @David H ¯\_(ツ)_/¯. Thanks for reporting though. v1.2.1 implements some preemptive workarounds for pitfalls that worked in other contexts. Added some debug loggingAdded preemptive known pitfall workaroundsCompiles without optimizations to preserve debug informationSwitched to xcrun swiftc
David H Posted December 3, 2024 Posted December 3, 2024 On 12/1/2024 at 4:10 AM, zeitlings said: Hey @David H ¯\_(ツ)_/¯. Thanks for reporting though. v1.2.1 implements some preemptive workarounds for pitfalls that worked in other contexts. Added some debug logging Added preemptive known pitfall workarounds Compiles without optimizations to preserve debug information Switched to xcrun swiftc Thank you for updating it! However, v1.2.1 is still not working. So I'm still using v1.1.0.
zeitlings Posted December 4, 2024 Author Posted December 4, 2024 7 hours ago, David H said: Thank you for updating it! However, v1.2.1 is still not working. So I'm still using v1.1.0. Are there any debug logs? Thanks!
David H Posted December 4, 2024 Posted December 4, 2024 9 hours ago, zeitlings said: Are there any debug logs? Thanks! I experienced the same result as with v1.2.0. [10:56:19.565] Logging Started... [10:56:20.966] Roman Numeral[Script Filter] Queuing argument '3' [10:56:24.102] Roman Numeral[Script Filter] Queuing argument 'i' [10:56:24.290] Roman Numeral[Script Filter] Queuing argument 'ii' [10:56:24.428] Roman Numeral[Script Filter] Queuing argument 'iii'
zeitlings Posted December 4, 2024 Author Posted December 4, 2024 2 minutes ago, David H said: I experienced the same result as with v1.2.0. I'd be of course interested in the logs of v1.2.1. The script makes some comments before accessing the Swift file, which you should be able to see. Something like this: [18:01:46.799] Roman Numeral[Script Filter] Queuing argument '2' [18:01:47.813] Roman Numeral[Script Filter] Script with argv '2' finished [18:01:47.818] STDERR: Roman Numeral[Script Filter] ~ [INFO] Compiling Binary [INFO] Converting to Roman: <2> [INFO] Converted to Roman. Returning.
David H Posted December 4, 2024 Posted December 4, 2024 3 hours ago, zeitlings said: I'd be of course interested in the logs of v1.2.1. They were the logs of v1.2.1, which was the same as with v1.2.0. I reinstalled v.1.1.0, which works, and here are the logs: [14:13:59.646] Logging Started... [14:14:01.936] Roman Numeral[Script Filter] Queuing argument '3' [14:14:02.440] Roman Numeral[Script Filter] Script with argv '3' finished [14:14:02.446] Roman Numeral[Script Filter] {"items":[{"title":"III","arg":"III","text":{"copy":"III","largetype":"III"},"valid":true}]}
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now