I like your questions about this and they all seem fair but I kinda wanna encourage you to go ahead and write it yourself; it’s a fun way to convert into Roman numerals that both is and isn’t intuitive at the same time.
- 0 Posts
- 31 Comments
I noticed my “and so on” is literally a noop here so yeah.
No, cause you do the replacement from large to small, I.e. you’d first check for 10 I to replace with X (none found); then replace 9 with IX (check), then check for 5, 4 and so on.
It does.
9 is IX though, and that works.
6 works fine, as it replaces the first set of 5 I with V and then there’s nothing to replace.
I’d written it in typescript for all it’s worth; go ahead and try it yourself :)
I’ve written it that way and it works, as in it will replace left to right and you replace iiii to iv after iiiii to v
It also works the other way round: wanna convert Arabic n to Roman? Just write n times ‘I’ and revert these replacement in inverse order.
Red? Hotpink or bust!
rooroo@feddit.orgto
Programmer Humor@programming.dev•I created the weirdest political compassEnglish
442·4 months agoIt wouldn’t be a good compass if nobody had strong issues with it:
- System vs Toy is not opposed to each other. Should have been system vs abstract or useful vs toy or whatever
- Where LISP? Best language missing makes graph bad
Edit: before people tell me there’s already ‘obsolete’ on the graph, no, there’s loads of obsolete languages that are still useful, and many more new languages that are either built for fun or not used for sad or good reasons.
Edit2: I’m also halfway sure that brainfuck is older than rust (but don’t wanna look it up). But if that’s true your axis mean several things at once anyway and you should feel bad (not really though).
rooroo@feddit.orgto
Programmer Humor@programming.dev•I created the weirdest political compass
9·4 months agoI’m sure everyone can suggest something better regardless of what they’re looking for in a programming language.
Naaah. Good programmers know how to use
as any as anyto make this work in typescript as well.
Unless you’re in JS.
Everybody complaining about css like “but it doesn’t do what I want if to do without me investing a minute into why”.
Ironically, it’s oh so often the RTFM crowd.
I don’t see how it is a joke tbh. Thought that was one common interpretation of said law.
rooroo@feddit.orgto
Buy European@feddit.uk•A guide to switching your Music Streaming provider to support more ethical and European-based companies!
4·8 months agoHonestly another circle with “pays artists less shit than others” or “pays small artists at least partially” would be good. Fuck Spotify.
rooroo@feddit.orgto
Programmer Humor@programming.dev•When anyone questions what I do at work all day
131·8 months agoI’m what you describe: my technical skills aren’t top notch but I communicate well. But I don’t bullshit my way up any ladders, but try and do what I do best; that is, facilitate the communication between people who might not be able to communicate with each other.
Not many in my teams could put a finger on what exactly I did, but all agreed I was fairly valuable and things became worse when I left.
rooroo@feddit.orgto
Buy European@feddit.uk•EU to exclude US, UK and Turkey from €150bn rearmament fund
211·9 months agoAnd it’s not like a shared interest in a secure Europe is being disregarded. Just EU money going to EU states or those with contracts if I’m not reading this wrongly.
It’s even worse than I thought tbh. Half a year ago I considered a move to Proton, now I’m glad I didn’t.
Ohhh haha that makes sense. Fun!