<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pablo Soifer</title>
    <description>The latest articles on DEV Community by Pablo Soifer (@draculinio).</description>
    <link>https://dev.to/draculinio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F615923%2F8924cc35-d377-41c2-91c9-39940ef79a2c.jpeg</url>
      <title>DEV Community: Pablo Soifer</title>
      <link>https://dev.to/draculinio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/draculinio"/>
    <language>en</language>
    <item>
      <title>Vibe coding an Operating System chapter 2</title>
      <dc:creator>Pablo Soifer</dc:creator>
      <pubDate>Thu, 31 Jul 2025 16:24:06 +0000</pubDate>
      <link>https://dev.to/draculinio/vibe-coding-an-operating-system-chapter-2-3o3</link>
      <guid>https://dev.to/draculinio/vibe-coding-an-operating-system-chapter-2-3o3</guid>
      <description>&lt;p&gt;Before we start, I have a github repository with the code, so check it &lt;a href="https://github.com/Draculinio/PythonOs" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the grub bootloader and our simple kernel, we want to start dividing our code, so I want now to have all the clear screen and print stuff into a different file. So asking ChatGPT (the good part of chatgpt is that it is not only giving the code but also suggesting next steps) he told me that putting prints in a separate file will be good. Not only that, also we can print in colors (we are using VGA mode)&lt;/p&gt;

&lt;p&gt;Here is video.c that ChatGPT did for me:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include "video.h"

#define VIDEO_ADDRESS 0xb8000
#define MAX_ROWS 25
#define MAX_COLS 80

// Colors (Need some more constants?)
#define WHITE_ON_BLACK 0x0F

static int cursor_row = 0;
static int cursor_col = 0;

// Writes a character on a position
static void put_char_at(char c, int row, int col, char attr) {
    char *video = (char*)VIDEO_ADDRESS;
    int offset = 2 * (row * MAX_COLS + col);
    video[offset] = c;
    video[offset + 1] = attr;
}

// Deletes screen
void clear_screen() {
    for (int row = 0; row &amp;lt; MAX_ROWS; row++) {
        for (int col = 0; col &amp;lt; MAX_COLS; col++) {
            put_char_at(' ', row, col, WHITE_ON_BLACK);
        }
    }
    cursor_row = 0;
    cursor_col = 0;
}

// Prints a string
void print(const char *str) {
    while (*str) {
        if (*str == '\n') {
            cursor_row++;
            cursor_col = 0;
        } else {
            put_char_at(*str, cursor_row, cursor_col, WHITE_ON_BLACK);
            cursor_col++;
            if (cursor_col &amp;gt;= MAX_COLS) {
                cursor_col = 0;
                cursor_row++;
            }
        }

        if (cursor_row &amp;gt;= MAX_ROWS) {
            cursor_row = 0;  // On overflow, wrap to the top (TODO: Scroll)
        }

        str++;
    }
}

//Prints with a specific color attribute
void print_color(const char *str, char attr) {
    while (*str) {
        if (*str == '\n') {
            cursor_row++;
            cursor_col = 0;
        } else {
            put_char_at(*str, cursor_row, cursor_col, attr);
            cursor_col++;
            if (cursor_col &amp;gt;= MAX_COLS) {
                cursor_col = 0;
                cursor_row++;
            }
        }

        if (cursor_row &amp;gt;= MAX_ROWS) {
            cursor_row = 0;  // Simple wrap (TODO: Scroll)
        }

        str++;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The interesting part of this project so far is that I thought that it was going to be like chinese for me, but for now, the code seems to be pretty simple to understand.&lt;/p&gt;

&lt;p&gt;The other interesting part is that when I was young consoles were 80x25. Now seems to be the same, good and easy to use.&lt;/p&gt;

&lt;p&gt;Obviously, the header was also updated adding the new functions&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#ifndef VIDEO_H
#define VIDEO_H

void clear_screen();
void print(const char *str);
void print_color(const char *str, char attr);

#endif
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this, the kernel main file looks a lot cleaner, now I don't need to add the video part to it, for now I can add there things like &lt;/p&gt;

&lt;p&gt;&lt;code&gt;clear_screen();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or to print stuff things like &lt;/p&gt;

&lt;p&gt;&lt;code&gt;print("This is a simple kernel written in C.");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or if I want colors:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;print_color("Welcome to the Pythonist OS!\n\n", 0x1E);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will print stuff in yellow and blue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0uiosjpgyl7sa6c3x1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0uiosjpgyl7sa6c3x1n.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As always I made the video (it is in spanish)&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/xh0fE8gD3SI"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>programming</category>
      <category>devlog</category>
      <category>ai</category>
      <category>assembly</category>
    </item>
    <item>
      <title>Vibe coding an Operating System chapter 1</title>
      <dc:creator>Pablo Soifer</dc:creator>
      <pubDate>Sat, 26 Jul 2025 13:10:36 +0000</pubDate>
      <link>https://dev.to/draculinio/vibe-coding-an-operating-system-chapter-1-4ilj</link>
      <guid>https://dev.to/draculinio/vibe-coding-an-operating-system-chapter-1-4ilj</guid>
      <description>&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;I am a developer. I love coding. But lately I started to be interested in this so called "Vibe coding". You know, on LinkedIn I see people claiming that they can do a complete application in hours, put them to market and don't need to hire developers.&lt;br&gt;
My first reaction was "ok, this is not possible, developers are needed even if you have something that creates code, because someone needs to check, read and understand code" but I had to try.&lt;/p&gt;

&lt;p&gt;Now that I did some some experiments doing "vibe coding" I noticed that yes, it helps a lot, it makes some things faster, you don't have to do a lot of the big stuff, just focus on the solution and in the parts where you really have to think. &lt;br&gt;
BUT (there is always a BUT here), you still need to know how to code, you need to understand what the AI is giving you, it makes mistakes, sometimes the code is not optimal and there are reported cases of exposed credentials and data. So, there must be a developer behind this.&lt;/p&gt;

&lt;p&gt;My first experiment was doing an Android app called "Card Umen". My experience with Kotlin is almost zero (I made something for a hackaton in the past but forgot almost all), so I worked with chatgpt, claude and gemini and yes, they made a bust on productivity but I needed to be there all the time correcting things. It is now an MVP and can be downloaded from &lt;a href="https://play.google.com/store/apps/details?id=com.cochecito.cardumen" rel="noopener noreferrer"&gt;here&lt;/a&gt;. I keep on doing this app and in the meantime learning a lot about creating products and about Kotlin.&lt;/p&gt;
&lt;h2&gt;
  
  
  Vibe Coding an OS
&lt;/h2&gt;

&lt;p&gt;But now, I want to explore if the AI can do something even more dificult: An OS&lt;/p&gt;

&lt;p&gt;So, only with the help of ChatGPT I will try to create one.&lt;/p&gt;

&lt;p&gt;As I believe that the best way to create software is to create something very small and iterate over it I asked chatgpt to create a simple bootlader and a simple "hello world" kernel.&lt;/p&gt;

&lt;p&gt;First it made me install Ubuntu on WSL, download all the tools, create the cross compiler, adapt Visual Studio Code to use on WSL, etc.&lt;/p&gt;

&lt;p&gt;Then, it came with a good idea: instead of a bootloader, why not Grub? For now lets use that, but in the future I want to experiment with booloaders, there are many reasons for choosing one or another.&lt;/p&gt;

&lt;p&gt;The next step was creating a simple kernel file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Video buffer address
#define VIDEO_MEMORY (char*)0xb8000
#define SCREEN_WIDTH 80
#define SCREEN_HEIGHT 25

void clear_screen() {
    char *video = VIDEO_MEMORY;
    for (int i = 0; i &amp;lt; SCREEN_WIDTH * SCREEN_HEIGHT; i++) {
        video[i * 2] = ' ';      // space
        video[i * 2 + 1] = 0x07; // white over black
    }
}

void kernel_main(void) {
    clear_screen();

    const char *msg = "Welcome to the Pythonist OS!";
    char *video = VIDEO_MEMORY;

    for (int i = 0; msg[i] != '\0'; i++) {
        video[i * 2] = msg[i];
        video[i * 2 + 1] = 0x07;
    }

    while (1); // Infinite loop to keep things there
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then create a makefile.&lt;/p&gt;

&lt;p&gt;If you want to see the entire code, this will be ALWAYS open source, for now I called it Pythonista OS (I am a HUGHE fan of Python and I wanted to make a tribute), so you can go to the &lt;a href="https://github.com/Draculinio/PythonOs" rel="noopener noreferrer"&gt;github repo&lt;br&gt;
&lt;/a&gt; and check it out (and do whatever you want with this).&lt;/p&gt;

&lt;p&gt;I am also doing videos about this journey (but they are in spanish) here&lt;br&gt;
  &lt;iframe src="https://www.youtube.com/embed/fDIOUIBnGVs"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>opensource</category>
      <category>vibecoding</category>
    </item>
  </channel>
</rss>
