Jump to content

Roman Numeral Converter


Recommended Posts

  • 2 months later...
Posted

Screenshot2024-09-29at13_12_03.thumb.png.07fc67b30b3c783b7b5963c8e5da4ffd.png

Screenshot2024-09-29at13_12_08.thumb.png.61aba77570a9bb9d246485a33c0aef48.png

🤷‍♂️

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:

 

 

Posted
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}]}

Posted

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.

 

Posted
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.

 

  • 2 months later...
Posted (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.

Screenshot_2024-11-30 20.36.39_ESzKLm.png

 

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'

 

 

 

Screenshot_2024-11-30 20.36.39_ESzKLm.png

 

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 by David H
Posted

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

 

 

Posted
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.

Posted
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!

Posted
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'

 

Posted
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.

 

Posted
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}]}

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...