#Isotope
1 messages · Page 1 of 1 (latest)
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
Well, I'd recommend learning C really well before embarking on OSDev.
If you try to learn C while doing OSDev, you're not making things easier for yourself.
where is a good place to start?
with a beginner's C tutorial
I mean
depends how much programming experience you already have
i know basic syntax and how to call int main() {
//code here
}
...
throw that out basically
you need to understand linkers and executables to start it
here
a template to start
yeah, then look up a tutorial that covers C thoroughly
i think this is like giving someone a car to drive and letting them loose on the road when they havent learned to walk yet
i'd probably crash the car either way.
I was going to have this as a project so that I could build as i learn, so pessimism won't be helpful
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.
well, basic syntax yes
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?
is C++ as low level as C? (and do header files exist? it's the onl area that i mastered in C)
ok, im going to try c++
and also helps to prevent silly stuff with memory
you can still do it
but it helps a bit by separating cast types
gl, it's not that hard once you know the basics
?
i remember C++ from when i tried QT Creator
lol
qt is a separate thing
don't worry about that
thinking with classes and namespaces might actually help a lot
thank goodness there won't be any QtButton::whateverthispartis
well, that is basic c++ syntax
tho you make the classes
so you know what they do
im off to the grind. 🫡
what ide will you be using?
Pulsar Text Editor (above)
...
the packages make it easier
pls use at least vscode or even better: Clion
ok.
clion is one of the best for c and c++
vscode can be too with the right configs and extensions
sudo dnf install clion
???
nope. Fedora Linux
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
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
gg
wait its by jetbrains
ye

wdym?
they always pull last minute signups
no?
to check for licenses, bruh
i'll stick with vscode
lol
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
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
....
yeah gl with that
i suggest you start with the basics first
leave lua integration way later
oh god lua being used for the entire os??? why have you done this
you need to know a lot of C++ to do this
the actual kernel can't be done in lua
im talking about system apps
and i've already began mapping out the folders
also i have been learning, so you can't just assume skills stay stagnant
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)
if you read it, it was a project to make as I learn. NOT a first project.
completely different
it's going to need support from C++ to work, if that helps
i realised PyQt is better so im running python for app code.
typing this from the web browser for my OS that custom-made
Ditrium hydrogen OS:
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.
that looks like a userspace program running on top of an OS rather than an OS kernel
it's a command line login for the built-in console.
also, how much RAM does our brain have?
just a thought
It doesn't have any
Not even as an analogy
The model of a computer maps pretty poorly to the model of a brain
my brain has zero bytes of RAM
anyway, having a built-in kernel mode shell is generally considered a bad design decision
also, in your case it would require implementing the C++ standard library inside the kernel
everyone joins and say this
but in my experience, it never works out
(almost) Every linux distro has it available by pressing Ctrl+ Shift + F2
nope, login and shell are not implemented in the kernel
the kernel has no concept of usernames and passwords
it just knows UIDs and GIDs
this one is it's own login display manager, like sddm
I mean, sure, but that's its own separate userspace program
and has nothing to do with the kernel
exactly, its supposed to be a separate program that opens into the kernel.
login is just an illusion.
But shouldn't the kernel be loaded first to even be able to run such a program?
that's what im doing right now actually. It will first open the kernel, launch the login screen while suspending processes, and then it will show the desktop and kill the login process if you logged in correctly.
i'll take a break. i've been working for hours
this is just windows? I don't get it. it isn't the program you shared the code of
I guess they're saying that they're running their own browser in Windows.
I guess. nothing here makes sense
I don't want to come across rude, but this feels like trolling to me
because it isnt, and i'm still running linux. I'm running the apps there first because I need to actually get them working before exporting to the OS. I just used a Windows icon pack because the Breeze one looks bad
it's not a troll. I'm trying to integrate apps first and getting it to run Python. I'm going to base it off of the Linux kernel and change the code to C++.
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.
but this isn't how it works, you write apps in your os
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
(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)
the post is closed and will be deleted
you can do it if you do it in the right order. kernel first. if you look at what everyone else is doing they make the kernel first for a reason. if you just take the Linux kernel that isn't really hobby os dev though but you could make something of it.
i deleted my kernel already because i did it completely wrong :p
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
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?
the laptop fan gods demand a sacrifice
should i jump in the portal that just opened?
chat im scared
bring a chicken
mine are still hatching.
i have roast chicken if that works
no it must be live for sacrifice. also bring the blood of a virgin, the Egyptian book of the dead, a goat and a crucifix.
im not in egypt
I'll just bring a baby chicken and a goat named Egyptian book of the dead. if that works.
nah there's no shortcuts
unless you have the necronomicon, a boomstick and a chainsaw.
i have Running up That Hill on repeat just in case...
ok, I;m 1/100th of the way of trial and error. C is really hard when using it for OS dev