#⌨coders-cave

1 messages · Page 78 of 1

tropic dagger
#

The items inside would become worthless fast.

orchid frigate
#

all items are open source
I think inflation would have happened long before you

tropic dagger
#

Nah because everybody else found a way to modify it.

#

If you straight up steal it then it's worthless.

#

But if you change it, it has new value.

orchid frigate
#

inflation is open source you can delete the file

tropic dagger
#

No

#

Inflation is proprietary

#

Or however you spell it.

#

You don't even see the machine code.

#

It's server-sided.

orchid frigate
#

not if i backwards engineer the .exe file

tropic dagger
#

It's on the server not the client.

orchid frigate
#

ok but hear me out
maybe the devs were stupid]

#

and made in client sided

tropic dagger
#

No the devs were really intelligent.

orchid frigate
#

right elon musk was the head engineer

tropic dagger
#

They knew it would be fragile so they protected everything they had to.

orchid frigate
#

he wouldnt allow that

tropic dagger
#

The only frontend things are the login, withdrawal and deposit methods.

#

Everything has been crashed so much it kinda has to be that way.

#

Encapsulation

orchid frigate
tropic dagger
orchid frigate
#

wait

#

what tf are we even talking about

tropic dagger
#

If we wanted to beat the system we should just move into the digital world.

tropic dagger
orchid frigate
#

France in code?!?

tropic dagger
#

Finance.

#

Money

#

But it's got code principles.

orchid frigate
#

France would be coded in low level C

tropic dagger
#

No France would be coded in aunt Frank's backyard concoction language.

#

They're not that fast. Or capable.

orchid frigate
tropic dagger
#

Yeah

#

Bcmp

orchid frigate
#

Britain would be coded in malbolge because of how complicated they are to understand

#

Can I get some crisps and a waer

tropic dagger
#

No they're in assembly.

#

I can understand them.

orchid frigate
#

there is like

#

1000 assemblies

tropic dagger
#

x516

orchid frigate
#

all of them more difficult then the last

orchid frigate
tropic dagger
#

Yeah but not x516

#

It's from Computer 2.0

#

It's OO and cool.

orchid frigate
#

mov bp, 0x90000000000

#

or smt

tropic dagger
#

No

#

move(no, 900000000000);

#

Or you could moveStack(90000000000);

#

moveStack is preferred.

orchid frigate
#

Damn that looks high level for assembly

#

Like there are actual words

tropic dagger
#

That's because it is.

#

You can torture yourself with old style syntax but the other is preferred.

orchid frigate
#

You know what I just got an awful Idea

#

Like its really bad

#

But kinda...good

tropic dagger
#

What is it?

orchid frigate
#

High level assembly as an actual language

#

I can try to learn how to make a language

tropic dagger
#

Yeah that would be cool.

orchid frigate
#

it shouldnt be more difficult then a bootloader...right

tropic dagger
#

Not like C/C++ but just understandable assembly.

orchid frigate
#

yea like

tropic dagger
#

It's basically a compiler.

#

I've had that idea but I don't have to time to go through with it.

orchid frigate
#
[bits 16]
move registers::bp, 0x9000
move registers::sp, bp ;There is like an actual list of all registers 
halt
tropic dagger
#

I'd have to actually learn assembly

orchid frigate
#

Idk how to make it less complicated

orchid frigate
#

Way easier then C

#

Mainly because it doesnt have alot of stuff to do

#

wait I got an idea

tropic dagger
#

#bits 16 is::moveStack(0x9000);

orchid frigate
#

ok a bit better

tropic dagger
#

is = instruction set

orchid frigate
#

like to learn them

#

because currently they are the hardest part of assembly

tropic dagger
#

is::move(sp, bp); Replace bp and sp with what they stand for

orchid frigate
#

too wordy I think

tropic dagger
orchid frigate
#

the stack goes down]

tropic dagger
#

Yeah.

orchid frigate
#

but it shouldnt go below 0x7000 as thats bios memory

#

and you could fuck your pc up

tropic dagger
#

Yeah.

orchid frigate
#

so you put it high

tropic dagger
#

Moving it too low generates an error.

orchid frigate
#

no no no the compiler refuses to run at all at that point and immediatly halts the pc

#

to prevent from overwriting bios

tropic dagger
#

No like when the compiler see that in the code or the function itself will throw an error at compile time.

orchid frigate
tropic dagger
#

It's still in human-readable format.

orchid frigate
#

the assembly code is assembled first meaning the assembler goes through every line to make machine code so it could also do a check

#

but wait im confusing assembly with high level assembly

tropic dagger
#

The error in the better assembly language

#

Yeah

orchid frigate
#

at this point my brain works in assembly

tropic dagger
#

My brain works in C++.

#

It messes with me all the time.

#

I see too much ambiguity and contradictions.

#

Undefined variables and stuff.

orchid frigate
tropic dagger
#

Not even a pointer. They don't get pointers.

orchid frigate
#

They get lost in memory

tropic dagger
#

They're copies that I'll eventually remove.

#

std::vector<person> insignificants({thatGuyWithPiracyOnHisGitHub});

#

Ight I gtg.

orchid frigate
#

You know whats worse
In math class the teacher says some number and im like wait that doesnt sound like hexadecimal

#

aight cya

tropic dagger
#

Yeah exactly.

#

I need to partition my mind so I have normal and programming.

north dune
#

unity - we offer easy ways to develop games in 3d or in 2d, which one would you like to use?

me: 2d but also

#

this table is made of UI elements rotated

this is supposed to be a 2d game

#

its the same trick my 3d mod is based off of

regal token
#

What coding language are worldbox mods?

north dune
regal token
#

Mk

bold rover
#

I can't tell if Unity is quitting and just making the edges of the cards really sharp

orchid frigate
orchid frigate
#

@barren shale so I let tabnine write something about and apparently you are starting up on Linux but you are on windows

north dune
north dune
bold rover
#

Owww, makes sense

bold rover
#

Ahhh

north dune
#

see they dont look so bad here

bold rover
#

Yeah, Just looks really noise when You're not in 2D view

#

But it does look lovely

north dune
#

when i add a 3d view in the game itself itll look better

north dune
#

yeah i dont use them

#

no clue what they are

#

but im pretty much just starting out, theres a lot i dont use/know about

main brook
#

well Makefiles are great

#

very great

#

very not confusing at all

barren shale
# north dune

try to set the texture to no point on those suits textures

#

so they dont look blurred

#

dont use point unless texture is very small

#

like this 18x35 pixels texture

barren shale
#

@knotty root rat

#

draw door

#

now

#

or else

north dune
orchid frigate
barren shale
#

filter should be point

orchid frigate
#

only if you have alot of terminal commands that are the same every time

barren shale
#

so they dont look blurred

orchid frigate
#

you run one command 10, 50, 100 others can run

orchid frigate
#

they are really fucking confusing

main brook
#

well

#

makefiles are for like

#

easy recompile

orchid frigate
#

Ye

main brook
#

or something

#

also i successfully made a chroot

#

of alpine

orchid frigate
#

Incredibly useful they are

main brook
orchid frigate
main brook
#

very exquisite

orchid frigate
#

I once had a makefile that consisisted of 50 lines 20 of which were directories

main brook
#

running alpine chroot on a glibc based dist

orchid frigate
#

Most confusing shit ever

main brook
#

i never even used makefiles

#

i usually use bash scripts

orchid frigate
# main brook

So uhhh I know this is a stupid question but what does it do

#

I have never done something like it so idk

main brook
#

it basically changes my filesystem

#

to alpine

#

temporarily

#

its a virtual machine but

orchid frigate
#

Sounds... complicated

main brook
#

more in depth

main brook
#

all i have to do is just

orchid frigate
#

Ok thats cool af

main brook
#

install alpine chroot version

#

unpack it

#

and it already have all the shit

#

all i have to do is just

#

chroot to it

#

currently im not using chroot but a fork of it

#

since im on android

orchid frigate
#

Yea sounds as simple as downloading a i686 elf linker

#

Spoiler alert

#

Its not simple at all

main brook
#

its simple as fuck heh

#
u0_a615@localhost:~/proot# cat alpine.sh
OLD_PATH=$PATH
PATH=/bin:/usr/bin
unset LD_PRELOAD
$PREFIX/bin/proot -r ~/proot/alpine/ -0 -w / -b /dev -b /proc -b /sys /bin/sh
PATH=$OLD_PATH

u0_a615@localhost:~/proot#
#

im gonna try it on my rpi

orchid frigate
#

Unix

#

Oh how i miss you

#

The windows terminal sucks you cant download anything on here nor use grub

orchid frigate
#

Doesn't have most things I need

#

Like linkers

#

Are versions of gcc

main brook
#

true

#

im gonna try it with actual chroot to demonstrate the use of it

#

anyway

#

@orchid frigate

#

its like a cheap version of a distribution

#

it lacks filesystems since its running virtually

#

not actually on your host

#

but via your host

north dune
barren shale
north dune
#

i know its blurry and needs fixed, but your suggestion isnt the way to do it

#

if they were actual textures then probably

#

right now i rescale the middle text/icon, which blurs the edge

scaling it back to 1x and changing font instead fixes the issue

barren shale
#

noice

#

but maybe using a texture than a font is safer

#

for different OSes they might not have the same default font

north dune
#

for sure, this is just the simplest version of the card prefab i made

#

but as for default font, does it display differently in unity?

#

i could pack one with it i guess?

visual arch
#

101010101101010101010101010110

regal token
#

I wonder how hard it would be to merge together Piranha's code with a race's minimum requirements to make a water civilization/merfolk

#

Minimum being trait gaining, reproduction and housing on water

barren shale
#

that's how i used to do it too

#

i think its the only way

barren shale
#

king and his friend

#

going through doors

orchid frigate
#

how is he exiting a door that doesnt exist

#

unrealistic 0.69/10

orchid frigate
#

its minimind

barren shale
orchid frigate
#

his cousin

orchid frigate
#

anyway did you make an actual door

#

so that the game is realistic

barren shale
#

that's clearly an elevator

orchid frigate
#

BRU

#

BRU

#

lmao game still unrealistic

#

not great dev support

#

0.420/10

barren shale
#

games are not supposed to be realstic

orchid frigate
#

you walk into a door

#

you exit in the middle of nowhere

#

without a door

barren shale
#

its a

#

portal

orchid frigate
#

you said its a door

barren shale
#

changed my mind

#

now can you shut

orchid frigate
#

portals do have textures

barren shale
#

borat isnt here to draw one

orchid frigate
#

like how will the player know what it is

#

thats why you put a door

#

as a texture

barren shale
#

that's not a door

#

that's a brown thing

orchid frigate
#

ok

#

you put a door (brown thing) as a texture

barren shale
#

you mean brown thing (door)

barren shale
#

well then ur stooopid

#

cuz i just told you its a door

orchid frigate
#

I challenge you

#

to a duel

barren shale
#

no

orchid frigate
#

Lmao loser loses again because he forfeits

barren shale
#

i didnt forfeit

#

i declined

orchid frigate
#

forget

#

forgor

#

💀

barren shale
#

ahah

orchid frigate
#

hamza say no

barren shale
#

a person of such high rank as me does not accept duels from peasants like you

orchid frigate
#

say no or im gonna let tabnine write something else about you

barren shale
#

im not talking about discord rank

orchid frigate
#

ok trial mod

#

lol

barren shale
#

lol

#

ok worst coder ever

orchid frigate
#

lul

#

ok...I forgor who you were 💀

barren shale
orchid frigate
#

nah such a human does not exist

#

you cant be more perfect then perfect

barren shale
#

you say you are perfect

orchid frigate
#

aH I rember you are

#

hamza

orchid frigate
#

that guy who used to call people's code bad

barren shale
#

you rember me ?

orchid frigate
#

Then your mom them

#

and leave

orchid frigate
barren shale
#

omah

#

you rember me

#

:OOO

orchid frigate
#

Yea

#

I rember you 😸

barren shale
#

YOUR MoM ????????????

barren shale
#

nice copying me

orchid frigate
#

this chat has lost all purpous because of you

#

so you are banned

#

from coders cave

#

officially

#

i mean not officially

#

but...unofficially

barren shale
#

lol

#

ok boomer

orchid frigate
#

you are unoficially banned from here

orchid frigate
barren shale
#

o k b o o m e r

barren shale
#

boomer with a fat mother

#

so generic

orchid frigate
#

hamza

#

say something

#

but say it in your favourite programming language

#

@barren shale you made me ping you

barren shale
#

gbye

#

have things to do

orchid frigate
#

no

#

if you leave I will your mom you in dms

barren shale
#

@orchid frigate

#

here

#

learn unity

vital goblet
#

unity gaem engine bade 😭😭😂😂

knotty root
#

o

orchid frigate
barren shale
orchid frigate
#

lmao

#

no

barren shale
#

ok

orchid frigate
#

@barren shale Wait..you are making a kernel?!?!

#

Tabnine said you are making a kernel

#

and it doesnt lie

elder yoke
barren shale
#

👀

#

maybe im playing video games all day

#

maybe i have things to study but instead im playing

orchid frigate
#

cool

#

or maybe

#

you are building a kernel

mental jacinth
#

Hmmm

#

I need advice

#

Can I put the Def command in another Def command ?

#

Like

#

def code():
def hello():

#

Is it possible ?

barren shale
#

It’s defined only within the first define

dull osprey
orchid frigate
#

rust can do it

#

but in rust that function automatically becomes local to the other function and thus

#

useless

orchid frigate
#

You know what I got a new hobby

#

letting tabnine write something about hamza

#

thats amazing

#

damn, where did you go wrong?

#

@barren shale get over here and run the kernel properly

barren shale
#

ur mum

orchid frigate
#

lol

#

are you making a BIOS or smt

#

how are you running a kernel

#

or failing to run a kernel I should say

orchid frigate
#

It only uses strings you have previously written so it just repeats itself

#

and it also really likes kernels for some reason

#

it keeps repeating kernel over and over

barren shale
#

actually

#

your mother

bold rover
#

No hamza

#

Why

barren shale
#

cuz

#

@knotty root you gonna draw me that door or what

bold rover
#

For god sake,now I understand why rei Block you

barren shale
bold rover
#

I-wbhammer

orchid frigate
#

From that movie

#

Megamind

barren shale
#

oh

#

i thought it was

orchid frigate
#

from the movie spy

#

made by spy

mental jacinth
#

You are making a os

orchid frigate
#

ye

mental jacinth
#

I saw it in github

orchid frigate
#

uhh yea

#

i got some problems with git rn

mental jacinth
#

Hmm

orchid frigate
#

I have alot of new code, gonna share it in a bit

mental jacinth
#

Yes, coding always has problems in general

#

With everyone

orchid frigate
#

also its done but its on a new repository

#

and currently doesnt work because of the giignore file

mental jacinth
#

Giig what

orchid frigate
#

and like 1000 other stuff

mental jacinth
#

Repo what

#

Haha too complex,

orchid frigate
#

you know, github repository

#

also to make the boot image you gotta have an incredibly specific instillation of rust

hasty bane
#

just found out about Proton

barren shale
hasty bane
#

Proton is a compatibility layer for Microsoft Windows games to run on Linux-based operating systems. Proton is developed by Valve in cooperation with developers from CodeWeavers under contract. It is based on a fork of Wine, and includes several patches and libraries to improve performance and compatibility with Windows games. Proton is designed...

#

linux gaming time

barren shale
#

oh

#

lmao

#

you didnt know about that ?

hasty bane
#

nope

#

lmao

barren shale
#

when you install steam on linux it keeps telling you DO YOU WANT TO USE PROTON

#

PROTON IS GOOD

#

USE PROTON

hasty bane
#

why not

barren shale
#

and its pretty good

hasty bane
#

AllTheThings les go?

#

windows destroued at last!

barren shale
#

sometimes running a game on proton is better than running it natively on linux

orchid frigate
#

@barren shale Do you want more tabnine written texts

#

😄

barren shale
#

tabnine sucks

#

copilot sucks

hasty bane
#

copilot bad?

#

y is copilot bad

#

ive heard a lot of good things about copilot

barren shale
#

i mean its good

#

but it still sucks

hasty bane
#

kek

barren shale
#

its only good for casual thigns

mental jacinth
#

Mmm

#

This mistake, I can not solve

#

Something is wrong heer

barren shale
#

what is the error

#

wtf

#

wtf

#

wtf

#

@mental jacinth first time using python ?

mental jacinth
#

Bruh

#

No

barren shale
#

wtf is int.fstint

#

u sure this is python ?

mental jacinth
#

I don't remember the right ine

mental jacinth
barren shale
#

python doesnt need datatypes

mental jacinth
#

what

barren shale
#
first = int(input("Enter the first integer"))
#

should be like this

mental jacinth
#

Oh

orchid frigate
#

@barren shale your BIOS sucks

#

the bios isnt the one to call the kernel but...shut

orchid frigate
#

lol

orchid frigate
#

Atleast mymotherBIOS can handle a kernel

#

HamzaBIOS cant do that

main brook
#

@mental jacinth btw

#

we don't explicitly tell python

#

what variable is what type

#
foo = "bar"
foo = 420
foo = 6.9
foo = True
#

some operations like

#

/ always returns float

#

so 2/1 will be 2.0

barren shale
#

apparently he forgot

main brook
#

also

#

by doing

#

int.something = 1

#

you're adding an attribute

#

or overriding them

#

from the int class type

barren shale
#

wait what

main brook
#

int, str, bool, float

barren shale
#

you can add attributes like that ?

main brook
#

these basics types

#

are also a class

#

and also

#

you're not able to add your own attribute to the classes

#

because some builtin are immutable

orchid frigate
#

to set the LEDS on a keyboard you gotta get 0xFA(ACK) which is quite funny (I swear my humor is the same of that of an 8 year old)

main brook
#

that's actually funny

orchid frigate
#

the guy that made that must have hated LED keyboards

main brook
#

heh

#

here's a funny joke /s

#

"what does the server ask from the client to keep the connection alive? ping, because you would pong back"

#

iam funny

orchid frigate
#

that...actually made me giggle

#

why did it make me giggle is unknown

#

but it did

#

the programming version of dad jokes

#

cool part about them is that only like 0.5% of the population understands them

main brook
#

are you a dad haydot?

main brook
#

atleast we're not those people who claims to like hack fb/ig

#

with a cool coloured output

#

when its not doing anything

orchid frigate
main brook
#

let me help you with that /s

orchid frigate
#

until hopefully atleast 10...15 years

main brook
main brook
main brook
#

bleh how

#

how did you forgot

orchid frigate
#

I mean I havent thought about how I forgot it I just know I forgot it

#

wait hacking os inbound

main brook
orchid frigate
#

currently I seem to be hacking the government

#

but no joke thats much faster than I thought it was gonna be

#

I guess writing straight to vga buffer instead of doing like 2 compilations is kinda fast

main brook
#

yes it is fast

orchid frigate
#

@barren shale you wanted speed you got speed

barren shale
#

reminded me when i made a program in bash

#

that opens itself

orchid frigate
#

Perfect timing lol

barren shale
#

and i placed it in the startup of a school computer

#

evil plan

#

that was like 5 years ago

orchid frigate
#

Did it atleast close the previous window

barren shale
#

ofc not

#

that wouldnt crash the computer

#

its a loop

#

so each window opens itself forever

#

computer crashes in like 2 seconds

#

you need to reinstall the OS

#

i think its impossible to fix the PC

orchid frigate
#

Why doesn't rebooting fix it

barren shale
orchid frigate
#

Because the thing isnt working anymore

barren shale
#

it starts instantly

orchid frigate
#

Oh

#

You evil man thats genius

barren shale
orchid frigate
#

What did the teacher say

barren shale
#

idk

#

he probably thought the pc got a virus or something

#

cuz they are connected to the internet

#

that was when i was in the UAE

orchid frigate
#

If I do this at my school the teacher would and principal would expell me from using computers until i graduate

barren shale
#

how would they know tho

orchid frigate
#

I mean its pretty obvious

#

They know im a programmer

#

I bragged about making viruses

barren shale
#

no proof

orchid frigate
#

Told the teacher im gonna install one on the pc

#

Its adding 1 + 1

orchid frigate
barren shale
#

well

#

idk how a camera can catch a monitor with a high enough resolution

#

but sure

orchid frigate
#

Plus the room is like 4 meters wide she would notice

barren shale
#

lol

orchid frigate
#

But the teacher seems to hate windows

#

And Microsoft in general

#

Today she constantly talked about how Microsoft apps are everything there is and told us why we should switch to linux

barren shale
#

a teacher not liking windows

#

is like shooting urself in the leg

exotic vessel
#

Ah yes... The nerd cave

orchid frigate
#

Oh you are back

#

Did you get a job

#

Who am I kidding of course you didn't

exotic vessel
#

I got an Interview soon

orchid frigate
#

Werent you too cool for jobs or smt

exotic vessel
#

I need money to be an alpha predator

orchid frigate
#

Cool well are you gonna talk about coding

exotic vessel
#

Depends

#

Is coding cool.

#

?

orchid frigate
#

Yes

#

Actually depends

exotic vessel
#

Elaborate

orchid frigate
#

If you only talk about coding its not very but if its a hobby or a job you its cool

#

Plus you can make cool stuff

exotic vessel
#

Understood

#

I will now learn to code like an alpha

orchid frigate
#

Cool

#

I suggest you start by getting an idea on what you wanna do

mental jacinth
#

Hmm

#

I wonder if

#

I can solve my very complex maths with a program

#

Well

#

Let's start with cube root

barren shale
#

bruh cube root

#

that already exists

mental jacinth
#

Cube root like square root

mental jacinth
barren shale
#

x to the power of 1/3

#

in python its x**(1/3)

mental jacinth
#

Yes

#

Oh

#

Thonks

barren shale
#

works like a charm

orchid frigate
#

@barren shale nice argument but...

barren shale
orchid frigate
#

same thing just 1000 times slower

barren shale
#

n o n e c a r e s

orchid frigate
#

This took like 300 lines and its still much faster because:
no compile time because we write straight to vga buffer

barren shale
#

omg its 0.01 ns instead of 1ns

orchid frigate
#

you would constantly tell me how my code is slow

#

well look at me now

#

its fast

barren shale
#

fast

#

but

#

unpractical

#

faster to run but not faster to code

orchid frigate
#

great argument however...

barren shale
#

people use python for a reason

orchid frigate
barren shale
#

sometimes you dont want to write 300 lines so you can type your mother

#

sometimes you want to do it with 3 lines

orchid frigate
#

if I use grub it will be bootable on any x86 pc

#

actually idk how this bootloader works I use booimage crate

#

might be more then just that

barren shale
#

n o n e c a r e s

orchid frigate
#

ok mr. Hamza

#

what do you care about thats so

#

practical

#
 
Console.WriteLine("Great arguement however, ");
while(true)
  Console.Write("Your Mother");

look practical code

orchid frigate
#

is that better

#

is that more impressive did I have to read 2000 hours of documentation for that

barren shale
#

you didnt have to waste 2000 hours of reading for that

orchid frigate
#

what would I do in those 2000 hours thats so practical

barren shale
#

make something practical

orchid frigate
#

like what

#

program in scratch

barren shale
#

whatever practical thing you want to do

barren shale
orchid frigate
#

someone has to make the OSs

#

someone has to keep them alive

barren shale
orchid frigate
#

Are we gonna use Windows or Linux for the next 100 years

#

because they are good enough

#

hell why not play the same game for 200 years because its good

barren shale
#

we can upgrade them

#

no need to make new ones

#

when we need new OSes it will be probably for quantom computers

#

so everything you are learning now

#

goes down the drain

#

into the sewers

orchid frigate
#

why would you go through the trouble of rewriting them when you can start from scratch

#

idc

barren shale
#

who said that upgrading is rewriting

orchid frigate
#

You always make my day worse

#

Im blocking you

barren shale
#

ok

orchid frigate
#

goodbye

barren shale
#

bye

#

unpracticaldot

hasty bane
#

everything possible has already been made wbshy

#

and if you're saying we should make everything in one single OS

#

not a very good idea, is it

hasty bane
#

i doubt quantum computing will introduce some brain-destroying shit that no programmer will be able to understand

orchid frigate
#

so it will most likely introduce new processors meaning new assembly

hasty bane
#

instead of assembly you'll have q-assembly

orchid frigate
#

thankfully enough we should have learned from the past so we shouldnt make the mistake of overcomplicating it

hasty bane
#

and im sure corps will try to make it as close to existing assembly as possible to make it easier to migrate to quantum computing

#

or at least reasonably close

orchid frigate
#

i think it would be good if they made it like a high level language but that wont really work considering how assembly works

hasty bane
#

plus, quantum computing isn't something that we will have in five years

#

or ten years really

#

we can set our goals as high as we want

#

but remember the people that said we'd have flying cars

orchid frigate
#

Well we do

#

Technically

hasty bane
#

do you own a flying car

orchid frigate
#

Sadly no

#

😔

hasty bane
#

that means you should keep learning the low level stuff

#

instead of sitting for 10 years waiting for quantum computers to come

orchid frigate
#

Plus someone has to know about low level no matter how advanced everything is

#

Someone has to keep it running

hasty bane
#

ye

orchid frigate
#

Unlucky individuals they(maybe we 😳) are

hasty bane
#

im not sure why hamza even said that everything you're learning will go down the drain

#

because c# compiles to what? wbshy correct

#

the more i read about this the more i want to learn smth like Rust

#

im low-key tired of high level coding and i also want to try my hand at making FAST things

#

@orchid frigate recommend ideas

orchid frigate
hasty bane
#

yes

#

exactly why i want to learn it

orchid frigate
#

Ah

#

Ok brb

hasty bane
#

the garbage collection thing for rust is also very interesting

orchid frigate
#

Ok so lets talk about rust

#

Rust is a high level programming language that has the ability to run like a low low level language through its nightly version (basically a version with features that are unstable)

#

It can be a very good high level language meaning it can do alot of the things high level languages can

#

But also a very good low level language having inline assembly, having many APIs like vulkano

#

And the bootimage crate or the best thing to be made ever

#

Making your rust code directly to a working os image in a premade bootloader

#

One of the best features of rust is its crate system

#

Its amazing

#

You write your crate and the version in your cargo.toml file and boom you can now use that crate

hasty bane
#

o

#

You can do web stuff in Rust, right?

#

i heard sth about Firefox

orchid frigate
#

Ummm...I think?

#

Haven't really delved into web stuff

#

But there should be a crate about it

#

There is millions

#

Apparently its amazing for web dev

#

Incredibly fast

hasty bane
#

oooooo

#

epico

#

im gonna read moar about it later

#

it sounds very cool

#

could prob let me add stuff that I'm not able to rn

orchid frigate
#

Now im just gonna warn you

#

Rust is... difficult

#

When I jumped from cpp to rust it felt incredibly difficult to do anything

hasty bane
#

hmm

#

That just makes it more fun then

orchid frigate
#

Yes and you won't use if statements like

#

Ever

#

Match statements are way better

#

They are basically the same as switch in c# and C but you have to specify what the compiler should do incase the var you are checking isnt matched with anything

#

Which usually looks like this:

_ = (),
hasty bane
#

wait

#

no if statements?

orchid frigate
#

there are

#

they are just...

hasty bane
#

wbeyes2 what would make me not use if expressions

orchid frigate
#

not very useful considering match

hasty bane
#

oh wait

#

so

orchid frigate
#

now if statements are still useful

hasty bane
#

you just use elif instead of if?

#

or switch

#

whatever

orchid frigate
#

and better then match because match has alot of stuff it cant do

hasty bane
#

hmm

#

wait

#

nvm

#

okay I'll need to do some hello world stuff with this

orchid frigate
#

ok so

#

here is an example of a match statement

#

its a kinda complex version with those brackets but whatever

hasty bane
#

spooky

orchid frigate
#

so:

fn main(){
  let var = 9;
  match var{
    9 => foo(), //if var = 9 we call foo
    _ => (), //if not, we do nothing
  }
}
hasty bane
#

oo

#

tats kinda cool

orchid frigate
#

it is

hasty bane
#

tats really cool actually

#

wbshy i like this

orchid frigate
#

and I just realised how complex that first example was

hasty bane
#

yeah it looked like enchantment table

orchid frigate
#

like I barely understand it and I have worked in this for a while

hasty bane
#

kek

orchid frigate
#

and also

#

all statements, loops and whatever dont have brackets

hasty bane
#

does it use indentation?

orchid frigate
#

so

int main(void){
  if (1 == 1){
    std::cout >> "Hi" >> endl;
  }  
}
#

cpp

#
fn main(){
  if 1 == 1{
   println!("Hi");
  }
}
#

also println! prints a line

#

And damn is it not annoying to implement this without the standard library

hasty bane
#

🤔

#

OH

#

i see what you meant

#

i thought you meant it was like python

#

but it is for the if (x == y)

orchid frigate
hasty bane
#

no no no

#

i thought you could do loops like

orchid frigate
#

yea you can

hasty bane
#

While True:
memes();

orchid frigate
#

oh uhh no

#

but

hasty bane
#

instead of
While True{
memes()
}

orchid frigate
#

there is a loop which is:

fn foo() -> !{
  loop{}
}
#

basically

#

function foo is a function and the -> ! means it shouldnt return

#

at all

#

like anything

#

not just () but absolutely nothing

hasty bane
#

o

orchid frigate
#

useless if you are not making a kernel but eh

#

also

orchid frigate
#

loop{} loops forever

#

unless you break it

hasty bane
#

no need for while True?

orchid frigate
#

nope

hasty bane
#

just loop{
lulz()
}

#

that's interesting

orchid frigate
#

yep

#

very useful

hasty bane
#

indeed wbshy

orchid frigate
#

also you can easily throw panics which basically stops the application by doing:

fn main(){
  panic!("panic info here, you can say whatever you please");
}
hasty bane
#

i wonder how the web stuff works and if it's going tofry my brain

orchid frigate
#

damn I enjoy teaching

hasty bane
orchid frigate
#

Yep

hasty bane
#

ooo

orchid frigate
#

Also uhhh the trait system exists....

#

dont touch it alot

hasty bane
#

why

orchid frigate
#

its incredibly complex

hasty bane
#

is it useless or is it regex levels of insanity

orchid frigate
#

its... its very useful but if you are doing very very specific things

#

also its not that its useful

hasty bane
#

wbshy what kinda things

orchid frigate
#

its that its going to be annoying

#

VERY annoying

hasty bane
#

i see

#

so I'll just

#

avoid it

orchid frigate
#

Because lets say you try to do something and all of the sudden you will see
"This random data type doesnt have this specific trait and thus cannot do this"

hasty bane
#

wbshy i don't like this

orchid frigate
hasty bane
#

spooky

orchid frigate
#

but thats...not useful for high level stuff

#

only very low level

#

you can also call C functions

#

Idk why you would but thats a thing

hasty bane
#

hm

#

okay this sounds

#

really fun

#

and new

#

and cool

#

and i hope the web stuff won't destroy my brain

orchid frigate
#

lemme check for a good web crate

hasty bane
#

i despise having to work with zillions of megabytes of nodejs or django etc

orchid frigate
#

and yes libraries are called crates here

hasty bane
#

why?

#

why not call them libraries

orchid frigate
#

because of the crate system

#

ITS AMAZING!!!

hasty bane
#

lootboxes

#

why is it amazing and how

orchid frigate
#

you have this one cargo.toml file

#

where there is some space called [dependencies]

hasty bane
#

🤔

orchid frigate
#

if you write the name of the crate and the version there, like lets say:

[dependencies]
bootloader = "0.9.8"
volatile = "0.2.4"
spin = "0.5.2"

you get to use them freely

hasty bane
#

what does toml stand for

orchid frigate
hasty bane
#

is it like

orchid frigate
#

but rust uses it alot

hasty bane
#

rust file?

#

oh

#

rmm

#

hmm

orchid frigate
#

ye

hasty bane
#

nice

#

and you can pick specific versions?

#

or how does that work

orchid frigate
#

You dont have to download everything yourself

hasty bane
#

🤔

#

but how are you going to use the code

#

if you dont have it

orchid frigate
#

of that crate

hasty bane
#

hmmm

orchid frigate
#

so you can just pick the latest

hasty bane
#

and

orchid frigate
hasty bane
#

is that the only advantage of crates over libs

#

o

hasty bane
#

automatically?

orchid frigate
#

yep

hasty bane
#

when you run the file?

orchid frigate
#

yes

#

or build

hasty bane
#

does it store it in the project folder or something similar?

#

or is it global

orchid frigate
#

ok so projects

#

to code in rust you need to do alot of prep work

hasty bane
#

wbshy because if project folder then that's like venv

orchid frigate
#

you need to download:
rustc
rustup
cargo
rust

#

afterwords you set them up

hasty bane
#

oh

#

that's fine i guess
what about starting coding a new project?

orchid frigate
#

and to make a project you go to terminal, go to the folder where you want your project and type cargo init

hasty bane
#

sounds okay

orchid frigate
#

it will automatically make a building enviorment

hasty bane
#

you have to go through setup for nodejs anyway

#

so

orchid frigate
#

that you can just cargo build to build and cargo run to run

hasty bane
#

okay si

#

so

#

build compiles the thing?

orchid frigate
#

yes

#

but doesnt run it

hasty bane
#

and run runs the build

#

okay

orchid frigate
#

What else...to install rust I recomment watching a tutorial

#

its a long process

hasty bane
#

that's alright

#

as long as the making a project isn't too bad

orchid frigate
#

its very easy

hasty bane
#

yee

orchid frigate
#

you can also do some customization like choosing what version of rust to use or download a different toolchain

#

lets say not stable but nightly

hasty bane
#

wait

#

so when you do init you can pick version?

orchid frigate
#

yes

hasty bane
#

venv moment

orchid frigate
#

here is how you make a more complex project

hasty bane
#

wdym by more complex

orchid frigate
#

cargo new projectName --bin --version 2018

hasty bane
#

what does --bin do

orchid frigate
#

this will create a folder with a project which will use 2018 edition of rust and its...

#

the bin is...

#

it will do binary stuff which Im kinda confused about considering it doesnt compile the file to a bootable file but the bootloader crate does

#

but yea

hasty bane
#

huh

#

so

orchid frigate
#

and the cargo.toml file allows for alot of custimazation like an author's name, version of the crate, instead of using the main.rs file to use a different file

hasty bane
#

is it just one of the things that you just have

#

in everything

orchid frigate
#

Wdym

hasty bane
#

well

#

a function that isn't mandatory but everyone uses it because its good and there's no real reason not to use it everywhere

orchid frigate
#

like a main function or smt?

orchid frigate
hasty bane
#

nno?

#

okay wait

#

what does the bin really do

#

is it just miscellaneous stuff

orchid frigate
#

I think what its meant to do is compile to a binary file and give it to you

hasty bane
#

🤔

orchid frigate
#

but what I do to get the binary file is use the bootimage crate

hasty bane
#

so compile the code to binary instead of whatever the build thing does?

orchid frigate
#

I guess? Maybe the bootimage crate only works if the project has this attribute

#

Im not too sure I just need to have it in os dev projects

hasty bane
#

hm

#

interesting