#Isotope

1 messages · Page 1 of 1 (latest)

thick trail
#

Do you have any code yet or is it just the logo?

analog schooner
#

it's only the logo so far. I'm themeing it around it

#

I have almost no C experience and i need some help

#

i try to learn, but manuals end up with me making Deltarune fangames from the amount of words there are.

#

:p

thick trail
#

If you try to learn C while doing OSDev, you're not making things easier for yourself.

analog schooner
#

where is a good place to start?

thick trail
#

I mean

#

depends how much programming experience you already have

analog schooner
#

i know basic syntax and how to call int main() {
//code here
}

blazing grove
#

throw that out basically

#

you need to understand linkers and executables to start it

thick trail
nova yacht
analog schooner
#

I was going to have this as a project so that I could build as i learn, so pessimism won't be helpful

analog schooner
# blazing grove throw that out basically

so you're saying syntax doesn't matter? If I learned anything from my experience from developing games, is that no matter what experience you have in a field: it will be useful.

blazing grove
#

tho it is def not enough

#

i was referring to the int main thing

#

it's not used

#

and that's not how it works in an OS

#

also, have you ever coded in other langauges?

analog schooner
#

JS, Python, HTML, GDScript, bash, and Lua

#

although JS brings me nightmares

blazing grove
#

you might try c++ then

#

might be simpler in some cases

analog schooner
#

is C++ as low level as C? (and do header files exist? it's the onl area that i mastered in C)

blazing grove
#

yes

#

it's c with classes and namespaces

#
  • other cool stuff
analog schooner
#

ok, im going to try c++

blazing grove
#

and also helps to prevent silly stuff with memory

#

you can still do it

#

but it helps a bit by separating cast types

analog schooner
#

so im going to go down a rabbit hole rn

#

wish me luck

blazing grove
#

gl, it's not that hard once you know the basics

analog schooner
#

oh

#

my

#

gosh

blazing grove
#

?

analog schooner
#

i remember C++ from when i tried QT Creator

blazing grove
#

lol

analog schooner
#

it sent me down a rabbit hole

#

and i failed miserably

blazing grove
#

qt is a separate thing

#

don't worry about that

#

thinking with classes and namespaces might actually help a lot

analog schooner
#

thank goodness there won't be any QtButton::whateverthispartis

blazing grove
#

well, that is basic c++ syntax

#

tho you make the classes

#

so you know what they do

analog schooner
#

im off to the grind. 🫡

blazing grove
#

what ide will you be using?

analog schooner
#

Pulsar Text Editor (above)

blazing grove
#

...

analog schooner
#

the packages make it easier

blazing grove
#

pls use at least vscode or even better: Clion

analog schooner
blazing grove
#

clion is one of the best for c and c++

#

vscode can be too with the right configs and extensions

analog schooner
#

sudo dnf install clion
???

blazing grove
#

use jetbrains toolbox

#

you are on windows?

analog schooner
#

nope. Fedora Linux

blazing grove
#

...

#

why are you using windows icon pack, bruh

analog schooner
#

bc i likey

#

:p

#

also the default breeze icons look bad to me

blazing grove
#

i switched away from fedora directly, lol

#

and went with arch

#
  • hyprland
analog schooner
#

My 2006 laptop could never

#

im scared of how many upgrades i gave it

blazing grove
#

anyway, CLion should be available via flatpack

#

if you want

#

idk if they made it free now for community or it's still paid tho

analog schooner
#

hoping its free

#

Free for non-commercial use
CLion is now free for non-commercial use. This means that students, hobbyists, and open-source contributors can use it without charge, as long as they are not using it for commercial purposes. This change opens access to a wider audience, removing barriers for individual developers not engaged in commercial work.
JetBrains
+3
from bing

blazing grove
#

gg

analog schooner
#

wait its by jetbrains

blazing grove
#

ye

analog schooner
blazing grove
#

wdym?

analog schooner
#

they always pull last minute signups

blazing grove
#

no?

analog schooner
#

so i avoid it

#

also it requires an account (why does it need one????????)

blazing grove
#

to check for licenses, bruh

analog schooner
#

i'll stick with vscode

blazing grove
#

lol

analog schooner
#

idk what to do lol

#

im just staring at it and burning my eyes

nova yacht
#

learning a programming language by writing an os is like learning architecture by making the empire state building

#

take a step back and get to grips with the toolchain and language first

#

this place will be here

analog schooner
#

im just going to use C++ as a support for the Lua framework the OS will be built around

#

before you say it, i know Lua is not low level

blazing grove
#

....

#

yeah gl with that

#

i suggest you start with the basics first

#

leave lua integration way later

maiden token
#

oh god lua being used for the entire os??? why have you done this

nova yacht
#

the actual kernel can't be done in lua

analog schooner
#

and i've already began mapping out the folders

analog schooner
nova yacht
#

you might want to look at what I did, as all my system apps are in BASIC

#

but still, if you don't know C++ yet a kernel isn't a good first project

#

dismiss the facts all you like

#

I look forward to seeing what you make

#

(actually do)

analog schooner
#

completely different

analog schooner
analog schooner
#

i realised PyQt is better so im running python for app code.

#

typing this from the web browser for my OS that custom-made

lean river
#

Ditrium hydrogen OS:

nova yacht
#

lmk when code or screenshots

analog schooner
analog schooner
# nova yacht lmk when code or screenshots

#include <iostream>
#include <fstream>
#include <string>

int main() {
std::string username, password;
std::ifstream infile("credentials.txt");

if (infile.good()) {
    std::string storedUser, storedPass;
    infile >> storedUser >> storedPass;
    infile.close();

    int attempts = 0;
    const int maxAttempts = 5;

    while (attempts < maxAttempts) {
        std::cout << "Username: ";
        std::cin >> username;
        std::cout << "Password: ";
        std::cin >> password;

        if (username == storedUser && password == storedPass) {
            std::cout << "Access granted.\n";
            break;
        } else {
            std::cout << "Access denied. Try again.\n\n";
            attempts++;
        }
    }

    if (attempts == maxAttempts) {
        std::cout << "Too many failed attempts. Access locked.\n";
    }

} else {
    std::ofstream outfile("credentials.txt");
    std::cout << "Create a new username: ";
    std::cin >> username;
    std::cout << "Create a new password: ";
    std::cin >> password;
    outfile << username << " " << password;
    outfile.close();
    std::cout << "Credentials saved. Restart to log in.\n";
}

return 0;

}

could you test it? it will link into the main kernel loop soon.

thick trail
analog schooner
#

just a thought

tight onyx
#

Not even as an analogy

#

The model of a computer maps pretty poorly to the model of a brain

thick trail
thick trail
#

but in my experience, it never works out

analog schooner
thick trail
#

the kernel has no concept of usernames and passwords

#

it just knows UIDs and GIDs

analog schooner
thick trail
#

I mean, sure, but that's its own separate userspace program

#

and has nothing to do with the kernel

analog schooner
#

login is just an illusion.

thick trail
analog schooner
#

i'll take a break. i've been working for hours

nova yacht
# analog schooner

this is just windows? I don't get it. it isn't the program you shared the code of

thick trail
nova yacht
#

I guess. nothing here makes sense

#

I don't want to come across rude, but this feels like trolling to me

analog schooner
analog schooner
#

then i'll change Desktop environments, add a unique package manager, add a console app, include WINE for Windows/WinNT compatibility, and then it'll be half done.

#

you know what, I'm just going to delete this post.

#

if people think my effort to learn C++ is a troll and that i just shouldn't be doing this because I have "no experience" (I actually have some. if you read my introduction), I guess i should just stop

#

I have a lot on my plate already, and this took a lot of planning to do, and i guess it was just a waste.

nova yacht
#

or make an OS that accepts portable code and port apps

#

and the fact you're saying you'll just port wine, shows you really don't get it

#

and a package manager and a WM

#

if you want to actually do this start small

#

with just a kernel

#

go from there, not at the user app end

#

because you don't even have an api to connect apps to yet and it 100% won't be identical to linux

analog schooner
#

(im prototyping how they'll look, and i'm planning to include WINE as my own port through LOTS of configuration and recoding) I get that it won't be identical, and that's the point. I don't want it to be linux. I'm taking the kernel and basing it off of it. I get that I may seem inexperienced, and I get it. I get how WINE won't work without an actual kernel to read it, so I'll use the Linux kernel. Android did it, so why can't I? I get i don't get some stuff, but I've basically had to change how I used fedora by changing so many GRUB options, removing a DE, changing to X11.

#

i get that im a little (maybe a lot more) inexperienced, I just decided to step outside of my field of expertise for once and try something new.

#

(sorry for the paragraph)

analog schooner
#

the post is closed and will be deleted

nova yacht
analog schooner
nova yacht
#

I'm sure you can get it right. you're a game dev yes?

#

think of writing a kernel as not writing a game engine but as making an opengl implementation in software

#

it's 90% reading and implementing specs

#

then you put your game engine on top (syscalls abi, etc) then the game (user apps)

#

and just like when someone says "I'm going to make a game engine" they often don't realise it's nothing like making a game

analog schooner
#

I get it, so putting a Desktop environment on it is kind of like choosing your renderer, and the kernel is the game engine you chose.

#

i began doing it and my laptop's about to blow. who knew changing the linux kernel would turn my laptop into a jet engine?

nova yacht
analog schooner
#

chat im scared

nova yacht
analog schooner
analog schooner
nova yacht
analog schooner
#

I'll just bring a baby chicken and a goat named Egyptian book of the dead. if that works.

nova yacht
#

nah there's no shortcuts

unless you have the necronomicon, a boomstick and a chainsaw.

analog schooner
#

i have Running up That Hill on repeat just in case...

analog schooner
#

ok, I;m 1/100th of the way of trial and error. C is really hard when using it for OS dev