Its a very common quesiton in both exams and job interviews: Convert Roman numbers to Arabic (Integer) numbers; so XIV should return 14.
Jadi
jadi@jadi.net
npub1c29w...pw98
A freedom lover from Iran. Techie, Programmer, Linux expert & Content creator who advocated the freedom of keyboard and human rights.

Installed the #Nostur app on ipad, functinal and beautiful. Thanks @Fabian
Begin on Nostr makes me happy.
Being on X makes me anxious.
I understand how Nostr works.
I do not understand youtube tech & algorithms.
When on Nostr, I have the "I have to make something" mentality.
When on Instagram I'm on "let's do one more scroll" mode.
So I'm #Nostr .
A friend has given me his #FlipperZero (with a 3 board extension). Its fun but IMO 90% of the people will stop even charging it after the first month. Cool for demos and some fun but mainly an expensive universal IR remote. Lets see how mine will end up ;)
Recently I'm recording some videos; describing the solutions to some programming interview questions. In this one (from Google) we are faced with an ordered array and we need to remove the duplicated elements and return the number of unique values; IN PLACE!
FTC banning not only fake reviews but also "Misuse of Fake Social Media Indicators" which means fake followers and likes.


Federal Trade Commission
Federal Trade Commission Announces Final Rule Banning Fake Reviews and Testimonials
The Federal Trade Commission today announced a final rule
In this short video I'll show you how to start your LLM (Large language model) journey as a programmer. After a short intro on LLMs, I'll show you how to start using a smaller model (SLM / Small language model) via ollama and interact with it using CLI, Curl & Python using openai library.
Top Algorithm Interview Questions Fully Explained; Ransom Notes using hashmaps
regreSSHion: RCE in OpenSSH's server, on glibc-based Linux systems explained
winner of #AI_of_shit
In this video I'm solving the Merge Sorted Arrays problem using the Two Pointers solution while explaining all my thought process. I'll use C for fun :D
#algorithm #programming #interview
Check this #clock and be amazed
Check the page-source and try to understand how ti shows the time ON its own js code.
#javascript #blackmagic

Qlock - A JavaScript Quine Clock
Displays the current time in a seven-segment style, embedded within its own JavaScript source code. (321 bytes)
Top Algorithm Interview Questions Explained - Valid Parentheses - Stacks, Easy
In these series I'm going to solve many Programming Interview questions related to algorithms and explain my thought process. I will try to be detailed and show you how a programmer thinks when confronted with such questions.
This one is about Stacks and is Easy:
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
An input string is valid if:
- Open brackets must be closed by the same type of brackets.
- Open brackets must be closed in the correct order.
- Every close bracket has a corresponding open bracket of the same type.
Unleash Your Inner Geek: Crafting your own Unix Command! Program your own 'who' and 'users'.
Ever wondered how the Unix wizards conjure up their spells? Join me on a thrilling journey as we decode the magic behind the who and users commands. This isn't just another tutorial; it's your gateway to becoming a command line sorcerer on Linux, BSD, or Mac systems.
We'll start by unraveling the mysteries of the UTMP unix version 1 format on OpenBSD, guiding you through the arcane process of information extraction. Then, we'll peek into the very source code of the users command, revealing secrets that have been closely guarded by the Unix Elders.
By the end of this adventure, you'll not only be versed in the ancient UTMPX texts but also be ready to craft your very own users or who commands. Imagine creating a bespoke tool like is_logged_in, which can divine the presence of a user with a simple 1 or 0.
Prepare for that 'Eureka!' moment, as the curtain lifts and the commandline's enigmatic workings become clear. If you're armed with basic programming knowledge, this video will elevate your skills to mystical heights.
So, are you ready to wield the power once held by the Unix Elders? Let's embark on this quest for command line enlightenment together!
Ansible. Ansible. Ansible. Running larege playbooks on a cluster of servers to test our installation process and become ready for our next release. #work
Published a new version of my UTMP-Classic crate. It can parse the classic UTMP files which #OpenBSD still uses to keep track of logged in users and such.
in this version I upgraded the zerocopy to 0.7 series and it needed some changes because of the new zerocopy::Ref .

crates.io: Rust Package Registry
Hetzner (like many other providers) do not provide #OpenBSD machines.. but there is a nice #syadmin trick to install your beloved OS over whatever they provide. In this video we will see how you. In short:
1. Create your #GNU / #Linux machine
2. Login, wget & dd the IMG
3. Reboot in Console and install using network installation (say http packages)
4. Reboot in your new OS
5. Have fun.
Here is my video of above steps... with some more info, discussion and fun :)
Reminder: #Nostr is decentralize. Change your client, start your relays. Keep it decentralized. Decenteralization is not only a tech concept, but a metnal one. Search for clients and try them. Contribute and have fun.
Have 10mins to deepen your understanding of #Unix like systems?
Check the utistd.h page. This is the header file that provides access to the POSIX operating system API. Even a quick browse can show you how your program talks with your OS.
For example whenever your program needs a higher privilege (or to act as another user), it calls `setuid` for that. Or starts with `sudo/doas` to have a higher access but calls `setuid` to become "nobody" in most of its life cycle.
If still have a click to spare, check the setuid.h on #OpenBSD man pages:
in most cases OpenBSD man pages are the best references you need to understand the OS.
#BSD #Linux
unistd.h - Wikipedia
setuid(2) - OpenBSD manual pages
I was sending a minor PR to the uutils / #coreutils project regarding a breaking test on #NetBSD and thought its a good opportunity to record a video and:
- talk about the uutils/coreutils which is a rewrite of coreutils in Rust
- show the #NetBSD env and do some coding in it
- Show the flow of sending a PR on #github