News for hackers. Stuff that matters.

Sagi21805

Re:Building Rust Procedural Macros from the Grounds Up on Saturday June 06, 2026 @02:52PM (#48427801)
Said the inner block inside the for loop could not be a function, because break does not mean anything not inside a loop, but the macro, which seems like a function, injects it into the code which is inside a loop, which is valid
Re:Building Rust Procedural Macros from the Grounds Up on Saturday June 06, 2026 @02:50PM (#48427790)
That's really cool, I was not familiar with this and will look into it!
Re:Building Rust Procedural Macros from the Grounds Up on Saturday June 06, 2026 @01:27PM (#48427058)
Thanks!

Couldn't agree more, both on proc macros and operating system, I did not find sufficient information on the internet. That is exactly the purpose of this book.

Re:Building Rust Procedural Macros from the Grounds Up on Saturday June 06, 2026 @01:10PM (#48426904)
Yea that's sound about right

The macro explained in that section was mainly for me to learn macros, and save up some boilerplate with nice syntax.

Re:Building Rust Procedural Macros from the Grounds Up on Saturday June 06, 2026 @12:58PM (#48426795)
Thanks for the warming comment!
Re:Building Rust Procedural Macros from the Grounds Up on Sunday May 31, 2026 @03:28PM (#48348877)
During the development of Learnix operating system I needed to represent bitflags inside some structures.

While there were alternatives with 3rd party libraries, the goal of the project is to implement and learn as much as I can.

Most of the guides I found online explained the concept great, but created only a simple macro as an example. So I decided to write about it myself too, with a real usage to create a bitfields attribute proc-macro, that takes a struct and turns it into bitfields.

Hope you will have a great read!

Re: on Wednesday May 13, 2026 @02:03AM (#48118381)
Hi! This is a project that I am working on for quite a while.

The main goal is to teach operating systems and Rust.

This is still 'beta' and a lot of things are missing (especially Rust chapters) but I would like to know what you think if it :)

Re:Ask HN: What are you working on? (May 2026) on Sunday May 10, 2026 @04:01PM (#48087324)
I am working on the Learnix operating system (https://gitHub.com/sagi21805/LearnixOS) Mainly an educational project, to understand and teach about OS and Rust concepts (The OS is written in Rust)

https://www.learnix-os.com

Re:LearnixOS on Saturday December 27, 2025 @02:00AM (#46399775)
I plan to cover more, like disk drivers, file systems, processes, shell, user space, processes, until we can run a working program!

Hopefully, also networking

Re:LearnixOS on Saturday December 27, 2025 @01:55AM (#46399753)
This project started because I wanted to understand the linux that sits on my computer, which is x86. There is a possibility that on the future it will have multiple architectures supported, probably starting with arm, but I can't promise that
Re:LearnixOS on Friday December 26, 2025 @06:43PM (#46397618)
You are correct, and it will be fixed!
Re:LearnixOS on Friday December 26, 2025 @04:20PM (#46396397)
Because I didn't really publish it, I didn't check all the grammar and type errors

This is something I will improve when the initial release will come

Re:LearnixOS on Friday December 26, 2025 @03:40PM (#46396015)
That's actually an interesting idea, the main reason is that I wanted to take a doom port that is posix compliant and see if I can make it run
Re:LearnixOS on Friday December 26, 2025 @03:38PM (#46395975)
When I started writing this OS, Rust was a pain, and I needed to understand a lot of things that I didn't know about the language, I can flag on some sections that people can skip because they are more language related, but I think that it is very important, and can be beneficial to people that come from other languages, or to people that want to understand rust more deeply.

In every chapter I try to initially explain the topic and then implement, or something in between. but I think the implementation is important because it completes the picture.

Re:LearnixOS on Friday December 26, 2025 @03:26PM (#46395858)
I like the current name and already have the domain :|
Re:LearnixOS on Friday December 26, 2025 @03:25PM (#46395838)
Will do!
Re:LearnixOS on Friday December 26, 2025 @03:24PM (#46395824)
Hi! I am the developer of this, and I really appreciate the feedback!!

The book is still on development and this is why I didn't even publish it here, I just recently finished the highlighter which was a lot of work, and I probably will require more.

Currently I am trying to make book and OS unique by developing and creating an explanation on AHCI, which I didn't see much on the internet. And then I try to handle all of the grammar, and typos