#⌨coders-cave

1 messages · Page 81 of 1

main brook
#

the heck jupe

#

that's so punny

hasty bane
#

im logging rn

hasty bane
#

@orchid frigate question

#

when you pass

#

a variable to some function

#

without referencing with &

#

does the function steal the variable and does it just delete it afterwards if its not used anymore (redirected to a second function for example)

#

or am i wrong

main brook
#

& passes the pointer

#

so the exact reference

#

to that variable

hasty bane
#

wbshy yes

#

but

#

what if i dont &

#

what happens

main brook
#

depends if i remember

#

the thing is

#

if you pass & the pointer

#

its the memory address to that value

#

but without its

#

its just the value

#

so for objects

#

without & is:

obj.doSomething();

with & is:

obj->doSomething();
lapis flint
#

How i like quantum bugs

#

When you received bug

#

And then trying to check it by adding log funcs

#

and after this bug removed by itself

#

what i am doing wrong?

main brook
#

a glitch

#

yes

floral summit
#

spoiler:shsh

steady kayak
#

Hi

wooden roost
#

How do I add custom traits

main brook
#

@orchid frigate

#

windows shell sucks

#

it doesn't use UTF-8 and not ANSII COMPLIANT

bold rover
#

Hi hi rei

bold rover
main brook
#

HAH

#

i made my python logging portable

main brook
#

the os itself is fine

main brook
hasty bane
#

suspicious phone code

main brook
#

lmoa no

main brook
#
import logging
import sys
import click
from copy import copy
from typing import Optional

COLOURED_LEVEL = {
    logging.NOTSET: "{}".format(click.style("LOG", fg="bright_white")),
    logging.DEBUG: "{}".format(click.style("DEBUG", fg="bright_green")),
    logging.INFO: "{}".format(click.style("INFO", fg="bright_blue")),
    logging.WARNING: "{}".format(click.style("WARNING", fg="yellow")),
    logging.ERROR: "{}".format(click.style("ERROR", fg="red")),
    logging.CRITICAL: "{}".format(click.style("CRITICAL", fg=(255, 40, 40))),
}


class ColouredFormatter(logging.Formatter):
    def __init__(
        self,
        fmt: Optional[str] = None,
        datefmt: Optional[str] = None,
        style: str = "%",
        use_colours: Optional[bool] = None,
    ):
        if use_colours is None:
            self.use_colours = sys.stdout.isatty()
        else:
            self.use_colours = use_colours
        super().__init__(fmt=fmt, datefmt=datefmt, style=style)

    def formatMessage(self, record: logging.LogRecord):
        copied: logging.LogRecord = copy(record)
        if self.use_colours:
            levelname = COLOURED_LEVEL[copied.levelno]
            copied.__dict__["levelname"] = levelname
        return super().formatMessage(copied)


class ClickStreamHandler(logging.StreamHandler):
    def emit(self, record: logging.LogRecord):
        try:
            msg = self.format(record)
            click.echo(msg + self.terminator, nl=False, file=self.stream)
            self.flush()
        except RecursionError:
            raise
        except Exception:
            self.handleError(record)
#

here's the full code

hasty bane
main brook
#

the only dependency are click

hasty bane
#

tats cool

main brook
#

ues

wet girder
#

My friend has had to restart discord 3 times today already because windows just fucks up his audio for no apparent reason every few hours

exotic vessel
#

Ah yes... The nerd cave

barren shale
#

because its probably a driver issue

#

since if never seen anyone complain about it anywhere

wet girder
#

¯_(ツ)_/¯

barren shale
#

so its not that common

#

i could argue that i couldnt find a driver for my wifi adapter on linux

#

but that's not linux's fault

wet girder
#

Yep, but people make it seem like it Linux's fault and only problem on Linux but it is definetly problem on Windows as well

lucid rain
hard monolith
# lucid rain

I’m glad the newborn baby will pass away quickly

native marten
#

grfgjj111_hhisif

#

thats how u add rick into ur game

buoyant junco
#

I think my favorite part about this cave is that the stalagmites are really spiky

hasty bane
#

it does Thing x times if you specify smth like how many times to do it

#

in python that'd be
for i in range(10):

#

or

#

you can make it do Thing to every element in some collection

#

again in python:

#

for i in my_list_name:

#

"i" either represents the element its currently on or the number from range()

#

wbshy i think you were memin but i still explained le loop

#

ive no idea how cpp arrays work

#

agree

#

but rust

#

is not wbshy

#

kek

gray nebula
#

Hey can anyone tell me how to give traits

hasty bane
#

we really need some thing that says "NOT GAME RELATED"

main brook
#

@orchid frigate

#

guess what

#

i have a subdomain with ssl

#

its a tunnel

#

i don't need to buy packages like

#

a database

#

since i host them all locally

hasty bane
#

🤔

#

i should prob learn about hosting

#

because

#

ill need it soon

main brook
#

yes

hasty bane
#

He ate too many kernels and died

bold rover
#

Busy person

sinful vessel
#

hello

main brook
main brook
#

yes?

#

what

#

i mean that's okay

#

lmao

#

but issues are

#

cin doesn't cut newline

#

it cut spacebar

#

aka whitespace

#

switch statement are good if

#

you're checking for 1 condition

#

and ==

#

lile

#

if a is 1 or 2

#

but not if

#

a + b is 69

#

or b is 10

#

i mean for the case

#

format yoyr code properly smh

wet girder
#

what do you mean by letters?

#

Variable names? Strings?

wet girder
#

it is shit to read anyone elses code when they don't format code in any way

main brook
#

if you mean a single character

#

its storing the ascii value

#
int a = 'a';
#

this is valid

main brook
#

lmoa

wet girder
#

Idk if I even use a formatter

#

I've never specifically installed one atleast

main brook
#

same

#

until i found out black

#

its cool

#

i get tired of formatting code myself

wet girder
#

black looks quite nice

main brook
#

not productive

main brook
#
$ black [file or directory]
wet girder
#

but I mostly code in JS and C# nowadays

main brook
#

nice

#

oh no

#

fuck

#

hamza is gonna come here

#

since you mentioned C#

wet girder
#

lol

main brook
wet girder
#

Quick change of subject

#

oh wait that's a finnish site

#

these

#

My current headphones have so shitty mic that everyone keeps complaining about it

#

and the passive noise canceling on them is basically nonexistent

#

and they're over 20€ cheaper atm

#

so for example in:

int a = 10;```
#

a is just the variable name

#

if you mean that

#

But if you mean

int variablename = 'a'```
It saves the ascii code of the letter a
main brook
#

i just use an earphone

#

with a shitty mic

#

you can even hear the wind

#

lmoa

wet girder
#

I use JBL Tune beat 600 something atm, they're good for music and entertainment but suck with gaming

#

like a lot

main brook
#

listen to music

#

while coding

wet girder
#

I need headphones for online school, possible remote work and gaming mostly. And all those are way better with nice microphone and noise cancelling headphones

wild rune
#

foo = 1
if foo >= 1:
reset_life()
else:
pass

if main== 'main'
print('that module is just a mess')

wild rune
tropic dagger
#
reset_life()
if main == 'main':
    print('Another module -_&+(;')
#
#include <iostream>
#include "otherModule.hh"

int main(int argc, char** argv)
{
    std::cout << "Module gone. No need to even test it.";
    return 0;
}
hoary hound
#

fuck yeah

#

finally got this c++ linked list working

#

reversing lists with pointers is pain desolate

#

nevermind there's a bug

#

ffs the reversing method was working but the print function was not

#

I'm smort

hoary hound
#

Had to use notepad to simulate variables debugging because idek how to make c++ debugger work in VS code think

barren shale
#

wait

#

why is making a linked list hard

#

isnt it like one of the most popular things

#

you can find code for it everywhere

knotty root
#

assembly

wet girder
#

Aand let's not get sexist or anywhere close that

knotty root
#

why not

#

are you mad because you code in python so is a subhuman

hoary hound
hoary hound
#

Especially for someone who hasn't touched c/c++ in years

barren shale
#

im saying understand it from online

#

no need to reinvent the wheel

hoary hound
#

I think I understand stuff better if I make it myself

#

Might not be true

#

Buuut I did it anyways

barren shale
hoary hound
#

Now I know what can go wrong during the exam, and (maybe??) how to fix it wbshy

#

Ah who am I kidding

#

Of course I will repeat the same errors xzibit

hoary hound
main brook
#

haydot is like

#

kind obsessed with assembly

wild rune
main brook
#

meu?

exotic vessel
#

Ah yes.... The nerd cave

main brook
#

dcoder sucks

#

its literally

#

running your code

#

from a server

#

so its limited

mental jacinth
#

They say, coding sucks

#

In the voice chat

mental jacinth
#

They're paying 800 dollars for a python dev

#

In Bangladesh

#

It'll rise in future I'm sure

somber jetty
#

800 dollar

main brook
#

so i uh

#

i fucked up

#

i apparently accidentally

#

reformatted my partition

#

to ext4 linux

#

and the device became read only

#

but i just

#

unplug it and plug it back

#

the write protection just go poof

#

and i managed to turn it back to FAT32

#

formatting sucks smh

mental jacinth
#

But job in the privet sector is risky a lil bit

#

They could fire you when business not good

#

So, I would take a job in government owned sector

somber jetty
#

damn

#

that is a lot of money

mental jacinth
#

Yes it is

#

It's gonna increase I belive

#

The future is coming

#

Get ye skillz, you shall survive the Information Technology Revolution

buoyant shadow
#

beans

main brook
#

i have regex

#
([>\]]\s[<\[])|([<\[]|[>\]])
#

for parsing discord bot usually command usages

#

like command <arg1> <arg2>

#

became an array

#

[ "arg1", "arg2" ]

main brook
#

150k per year

mental jacinth
#

And these

#

Decode me THE answers

#

Ok, let ne

mental jacinth
#

@knotty root see it ?

main brook
#

this is literally like

#

asking a korean person to translate japanese

#

even though some do know japanese

#

its not like

#

we all know japanese

#

like this channel and your request

#

"decode this morse code"

#

dude just

wet girder
#

Handling data with JS sucks so bad. I am doing advent of code with JS because I really need to become proficient with it for school and even the first puzzle is annoying to do with it

#

If I was using python, I'd already be done

#

it only took me 37 minutes to do the first puzzle

#

not too bad considering I knew nothing about handling data with JS

wet girder
#

This error makes no sense

I am just doing:

array.shift();
array.push(item);

2000 times and after few hundred the array becomes Canceled

#

I can't find any reasoning why it does that

#

it just randomly becomes Canceled

#

hmm it doesn't seem to matter

#

it is still using the data inside the array correctly

#

it just logs it as Canceled

main brook
#

timeout is likely

bold rover
#

@wet girder By the way can you deal with this

main brook
#

mine works lmao @wet girder

wet girder
#

Mine for some fucking reason isn't

#

I have no idea why

lean stag
#

I have the greatest and dumbest project idea: a mod that uses neural networks.

main brook
#

that's hamza

hoary hound
#

a neural network for what hmmwtf

#

I've always wanted to start ML but the math behind it kinda scares me, also can't find neither a decent tutorial nor the time to do it

mental jacinth
#

Hurt

#

Gurtis

#

Wait, holy crud he's coding for 7 hours

#

Pro stuff

hoary hound
#

ooops forgot to close vs code before leaving

wet girder
cunning summit
#

i'm really fascinated by neural networks and machine learning in general, problem is, i only know lua lmfao

#

have to learn python

orchid frigate
#

Alright well

#

took a lil break because I realised what an asshole I became for a moment there

#

but im back 😎

orchid frigate
#

Actually lua may be a bit harder than python but havent worked in either so idk

orchid frigate
#

I have had vs code open for 11 hours 7 days in a row

#

Back when I tryharded coding

cunning summit
#

i believe lua is easier than python

orchid frigate
#

seems very wordy and I would have to agree it does look a bit easier

#

but still I dont think you will have a problem with python and if you do remember that you can always ask here

sullen tapir
#

What time exactly is the update coming out

waxen kiln
#

00:00:00.000

broken hatch
#

I only know some HTML and a tad CSS

rain hornet
#

Ey. Me too! I’m mastered scratch, because I use it for school, but I’m studying Unity

main brook
#

lua is literally

#

"fuck you"

#

no exaggeration

#

python is easier than lua

wet girder
main brook
#

yss

#

yes

orchid frigate
#

Lua seems incredibly uneededly wordy

#

Like if something then end

#

This seems more complex than using brackets

main brook
#

not really

#

not the issue here with lua

#

it has a functional programming

#

but not object oriented

#

and exception are basically non-existent

#

except for one

#

and it sucks

#

handling tables are fucked

orchid frigate
#

seems like an unpleasant language now innit🧐

main brook
#

always has been

#

lmao

#

go error handling is better than lua

#

because you don't get weird undefined shit

#

sometimes a function returns a pair of error and results

#

sometimes they throw an error

#

and the error

#

is fuckin text based

#

so an integer error shows the same error as string error

orchid frigate
main brook
#

but different text

orchid frigate
main brook
#

usually they return

#

true or false

#

if it errors

main brook
#

so like

#

to raise an error

#
error("text")
#

you can't differentiate between errors

orchid frigate
#

Ok pretty normal

#

ah

#

so its just

#

panic

main brook
#

yes

orchid frigate
#

or error

main brook
#

there's also

#

warn()/warning()

orchid frigate
#

alright but this seems like awful design

main brook
#

yes

#

and did you know

orchid frigate
#

no

main brook
#

arrays in lua

#

are the fucking same as a table

orchid frigate
#

😄 awful I guess

main brook
#
local array = {2,3}
local _table = {1: 2, 2: 3}
#

and to iterate

#

both is the exact same

orchid frigate
#

ok so uhhh 1 has two?

#

havent worked with tables

#

Wait there was some language where arrays start at 1 not 0

#

is this the one

main brook
#

yes

#

its index based

#

not offset based

orchid frigate
#

Ok well I can officially say

#

this is awful

main brook
#

lua tables are similar to javascript object

#

so

#
a = {}
a["x"] = 1
a.x
#

but you can't have undefined

#

which leads to fucking shitty behavior

orchid frigate
main brook
#

everything is null if the thing doesn't exist

#
> x
nil
> a = {}
> a["x"] = 1
> a.x
1
> a.y
nil
>
orchid frigate
#
a["X"] = 1 //the x-ed member???
main brook
#

eh

orchid frigate
#

this would cause days of trying to figuere out some simple mistake in language

main brook
#

yes

#

it sucks

orchid frigate
#

Well

#

lemme add lua to the languages I dont want to see ever again

main brook
#

lmoa

orchid frigate
#

also

#

anyone got an idea on how to make alot of using tags easier

#

things are getting incredibly unreadable

#

hi

#

Took a break

#

realised what an asshole I was before with constantly reminding people with what I do so decided to stay away from discord for a while

#

but now im back

#

better than ever

#

Go ahead I mean you dont need permission to ask something

cunning summit
#

honestly

#

i don't understand what is wrong with lua because i haven't tried any other programming language except for c# which i didn't last long in

orchid frigate
#

Ummmm...

cunning summit
#

c# was just a pain because it was overly complicated in places where it really didn't need to be

orchid frigate
#

try another language some time and learn the more...detailed stuff

#

you will realise its design is awful

cunning summit
#

having to write ";" after everything is just annoying

orchid frigate
cunning summit
#

and the language is barely readable

orchid frigate
#

but the lower you go the more this becomes an issue

#

lower level languages like cpp and c can be incredibly complicated because they dont have as many features

#

even tho c# is a higher level language

#

Thats why they arent as widely used

cunning summit
#

bad languages

orchid frigate
#

no no no

#

without c and cpp oss wouldnt exist

cunning summit
#

they are good to make new languages out of but anything else is just.. no

orchid frigate
#

or would be written in just assembly

#

which is insanely

#

stupid

orchid frigate
#

I prefer writing in c than in python for instance

#

Alright well now that I have made an array of all forbidden languages (spoiler alert ||lua||)

#

time to get to work

hoary hound
#

haven't tested but prob works

#

dict[1] and dict['1'] count as different entries

orchid frigate
#

is it like

#

enums

hoary hound
#

dictionaries are like

#

arrays

#

but you can use other objects to index

#

like strings

#

or objects

orchid frigate
#

sounds stupid

#

and useless

hoary hound
#

it's kinda useful actually

#

dictionaries are also in C#

#

but better than how they are implemented in lua

#

a lot more stricter

orchid frigate
#

I always thought they were the same as lists

#

and lists are the same as arrays

orchid frigate
hoary hound
orchid frigate
hoary hound
#

lol

#

I spent years using lua for roblox dev and yeah most of the time it sucks

#

you don't want to see OOP in lua

#

you DO NOT

orchid frigate
#

isnt that

#

luau

#

like the c# interpratation of lua

hoary hound
#

luau is the roblox version of lua

orchid frigate
#

btw luau is also banned

#

in the array

#

are there any other lua like languages

#

that I can ban

hoary hound
#

hmmmmmmm

#

not that I can think of

#

maybe there was something like moon lua

#

I think

#

gotta check

#

this is like

#

"we worked hard so you can use lua without having to use lua"

orchid frigate
#

ah so this also looks awful

hoary hound
#

lmfaooo this is the lua version

orchid frigate
#

Why does it have an end tag

hoary hound
#

this is what I meant when I said "do not look up lua OOP"

orchid frigate
#

why

#

why

#

oh waity

#

Ok my bad I know why

hoary hound
#

wait till you hear about metatables

#

tables

#

about tables

sonic wedge
#

ayo

orchid frigate
#

Why are there so many types of arrays

hoary hound
#

there really is just one type

#

table

#

nothing else

sonic wedge
#

can you download worlds or no beacause im new to this game

orchid frigate
#

But like

#

there are dictionaries
lists
arrays
tables

#

why

#

just use fucking arrays

hoary hound
#

yeah but they are all tables

#

just different use

sonic wedge
#

ok so how?

bitter sedgeBOT
sonic wedge
#

thx

orchid frigate
#

Wait so

#

tables are like

#

all data types

#

that hold multiple things

hoary hound
#

you can put whatever you want in tables

#

using whatever index type you want

orchid frigate
#

eh

#

just use enums

#

best thing ever

hoary hound
#

it gets messy if you abuse it

#

I know nice

orchid frigate
#

Only thing about enums

#

iritating through one is garbage

#

no languages supports enums as well as arrays and whatever other table it has

#

it has an error

#

no but seriously show some code

hoary hound
#

seeend the coode

#

I'm doing binary trees rn

#

they are cool but still I hate pointers

#

a bit less now

orchid frigate
#

this is like going to stack overflow and saying "my code in an undefined language doesnt work when it should help?!?!"

orchid frigate
#

are

#

amazing

hoary hound
orchid frigate
#

dont you ever say anything bad about pointers or I will block you forever

#

and unfriend you on facebook

hoary hound
#

nooo not facebook maximsob

orchid frigate
#

this is me unfriending you on facebook

#

after saying pointers bad

hoary hound
#

I mean pointers are just hard to learn but they are cool indeed

orchid frigate
#

eh

#

you give em some adress]

#

btw you can use ```to make code

hoary hound
#

please

orchid frigate
#
string syntax = "highliting";
hoary hound
#

`

#

use this three times

orchid frigate
#

wait this is cpp correct

#

ok ok I can work with this

hoary hound
#
string pin;
 string start;

string yes; 
string password;
string Start;
string playername;
int entry;

 
    cout << "**Hello This is A Pokemon Fan Made Game Called Pokemon Fan Made Version 1 Input Start To Start the Game**\n >>";
    cin >> start;



         if (password == start)
        {

        cout << "Dr.Roway: Hello Young Man " << endl << endl;
        sleep (3); 

        cout << "Dr.Roway: Would You Mind Telling Your Name?\n >>";
      cin >> playername;

        cout << "Dr.Roway: My Name is Dr.Roway Stone The Pokemon Doctor Who study's About Pokemon" << endl << endl;
        sleep (3);

        cout << "Dr.Roway: I Was Your Father Friend " << playername << endl << endl; 
        sleep (3);

        cout << "Dr.Roway: You're Father Made A Request From Me to Give You A Pokemon" << endl << endl; 
       sleep (3);

       cout << "Dr.Roway: Do You Wish To Pick A Pokemon " << playername << " ?" << endl << endl;
       sleep (3);
       cout << "Type Yes To Pick a Pokemeon\n >>";
       cin >> yes;
      }
orchid frigate
#

ok so first and formost

hoary hound
#

there we go

orchid frigate
#

alot of mistakes

#

so you never assign anything

#

like string start is unasigned

hoary hound
#

password is unassigned

orchid frigate
#

when you compare it you are comparing to nothing which should result in an exception

#

nothing is assigned

#

everything inside the if statement should be tabbed

hoary hound
orchid frigate
#

also like

#

completely random tabs

hoary hound
#

just use auto indent feature in vs code xzibit

orchid frigate
#

no functions

hoary hound
#

very useful

orchid frigate
#

so all this is never going to be ran

#

and alot of errors will start

#

ah so thats in main

#

but still

#

random tabs

hoary hound
#

ohhhhh

#

you are declaring password twice

#

the second time you gotta do
password = start;

#

don't put string in front of it

orchid frigate
#

also nice game name

hoary hound
#

oh wait

#

wait where is that piece of code

orchid frigate
#

ok what else

#

im happy you used == because to this day I forget the second =

#

ok uhhh

#

at one point you do double endl

#

kinda useless but ok

#

nah

#

its the same

#

\n and endl are the same

#

space before the next string

#

or after

#

basically use spaces

#

and tabs please

orchid frigate
#

why is there a random tab in the middle of the code

#

two random tabs actually

#

4 spaces

#

no no no please

#

I enjoy talking to others about this

#

basically tabs should only be used if you are putting code inside of methods, statements etc

#

not randomly putting them

#

use pastebin

#

makes everything much easier

#

and shorter

#

or github

#

no no wait wait

#

use like

#

pastebin

#

or github

#

this is very long

#

or atleast use the three `

hoary hound
#

pastebin would be cool

#

pretty sure you don't even need an account to do it

#

can you just give me the errors

#

maybe that'll help

#

bruh

#

so what happens when you run it

knotty root
#

helloworld.(1)-5611.=False

hoary hound
#

so it skips all the couts?

#

ok there's something weird going on

#

so you declare a bunch of strings

#

without initializing them

#

then you assign password to start with password = start

#

the problem is that neither password nor start contain anything

#
string var1;
string var2;
var1 = var2;

this doesn't do anything at all

#

variables are like containers

#

they contain stuff

#

but the name of the variable doesn't really mean anything, except for you

#

if you want to set password to the string start, you need to do
password = "start";

#

with this, you are assigning the variable password's value to the literal "start"

barren shale
#

but you need a key

#

dictionaries are actually a hashmap

#

with the key being the hash

#

that's why they are fast

hoary hound
#

yup

barren shale
#

you cant master c++

hasty bane
#

you cant master any language really

orchid frigate
#

you can master the basics

#

but you cant master all libraries

#

and mastering the standard library is insanely difficult

#

because its huge

#

you dont have to know c++

#

in fact you dont have to know any difficult language nowdays

#

the most widely used languages and best paid are also the easiest like python, html(if you call it a language), css, js, c#

#

so on

#

also mastering the basics of cpp takes like

#

3 years

#

because of all its quirks

hoary hound
#

wut

#

@knotty root

#

I mean yeah, c++ is the hard way of learning programming, you start from the basics and learn about some low level stuff like memory management, dynamic allocation, pointers, all that stuff. If you are not interested in knowing how it works, you can go with easier languages that abstract most of that stuff for you

#

java is meh, I guess it's still widely used but I don't really like it. Python on the other hand is quite easy to get started with and has a lot of little things that you don't usually find in other languages

#

honestly I'd say, do some research on both

#

and decide

wet girder
#

Java doesn't have as good job opportunities anymore and there are less and less every day pretty much

#

it's not a modern language so to say

#

But doing your own research for your purposes is the best thing to do

orchid frigate
#

very old

tropic dagger
#

Python is pretty widely used because it's easy and powerful but it's extremely slow.
Java is old and outdated but if you are doing mobile dev then it's probably your best choice.

wet girder
#

There are other choices than py and java

#

I'd personally recommend C# as it can be used for almost anything

#

and it's quite easy to move to other languages

wet girder
tropic dagger
wet girder
#

And Swift for iOS ofc

tropic dagger
#

Swift is dead.

#

Last I knew, Swift isn't really in use anymore.

wet girder
#

Well if you want to make iOS apps natively you have to use Swift because apple bullshit

tropic dagger
#

Oh ok

orchid frigate
tropic dagger
#

Still bullshit.

orchid frigate
#

"We have our own os with our own design and kernel and hardware because fuck you"

tropic dagger
#

They have their own Arm-based CPU architecture now too I think.

orchid frigate
#

This seems so overly complicated

#

apple is literally me if I was a company

#

Making absoluetly everything myself because...well actually the reasons are different

#

but still

tropic dagger
#

Yeah. Apple is pretty insane.

#

But nothing compared to MS.

orchid frigate
#

it is kinda a bold play tho

tropic dagger
#

They're like the British Empire of the tech world.

hoary hound
orchid frigate
#

having everything done by you

#

means you own your market

orchid frigate
#

apple's marketing team is smart ngl

hoary hound
#

well yeah they sell stuff for absurdly high prices and a lot of people still buy them, so yeah they are big brains

orchid frigate
#

And then they make little to no parts for their hardware so the parts are also expensive

#

and actually working on the hardware is expensive because its hard

#

damn they are showering in money

orchid frigate
#

and for home os

#

but outside that no

#

from what I heard all 500 best supercomputers use some linux distro

#

and alot of stuff is linux

#

elloh

#

no

#

olleh

barren shale
orchid frigate
#

I think thats a bit overkill at this point

barren shale
orchid frigate
#

they are becoming too independent

barren shale
#

cuz they can make stuff with slow chips but they are still competing with the best

#

if you have your own everything

#

you can tune everything to your need

#

making it super efficient

orchid frigate
#

Yes but noone will want you if you are competing with yourself I dont think

orchid frigate
#

Ok what im trying to say is

barren shale
#

apple has a very big share of the market

#

most people want apple

orchid frigate
#

Becoming too independent means you are dividing two groups

#

mac users and non mac users

barren shale
#

even better

orchid frigate
#

and its a big gamble if you win

barren shale
#

lock people into your own stuff

#

make it so they cant change

#

sounds like good marketing

orchid frigate
#

and that also means you cant really interact with anything non mac so things become even worse

barren shale
#

but they make there stuff so good

#

that people dont care

#

in western countries most people dont care that apple is expensive

orchid frigate
#

And I can agree

barren shale
#

i mean if its not good marketing apple wouldnt be worth over 2 trillion $

orchid frigate
orchid frigate
barren shale
#

actually it was the other way around

orchid frigate
#

But like your own arm based architecture?

barren shale
#

microsoft was competing with apple

orchid frigate
#

Thats overkill

barren shale
orchid frigate
#

Why

barren shale
#

look at the new mac books

#

these things are so fucking good

#

and the battery is huge too

orchid frigate
#

hmmm

#

interesting

barren shale
#

jk the battery isnt huge

#

but it lasts longer than everything else

#

which is even better

orchid frigate
#

its apple their phone batteries suck so I didnt expect much

barren shale
#

what

#

what

#

i have an iphone xs

#

battery is so good

orchid frigate
#

I have heard alot of complains about it

#

but they also came from people living in first world countries complaining that they dont have a phone for 3k so

barren shale
#

its not as good as a 5000 ma battery

#

but its very good for a 2000 ma battery

#

that 2000 lasts like a 4000 on an android

wet girder
#

mah not ma

#

You don't count capacity in milliamps

wet girder
#

the batteries keep dying in the "cold"

#

0c is quite warm still ngl

barren shale
#

depends

#

in the UAE 17 was cold

wet girder
#

well point being, iphones are not good to use in winters in finland

#

which is why very many finns keep changing away from apple

barren shale
#

what

#

but all the phones have the same type of battery

#

lithium ion batteries

#

all the same thing

wet girder
#

I have never had a phone that wasn't able to be in -30c - -35c, but everyone I know who has apples can't take their iphones out of their pockets when it's cold outside

barren shale
#

well the recommended temperature for a battery is above 0c

wet girder
#

tru

orchid frigate
#

I mean like

#

What do you want to do in python

orchid frigate
#

Our summers are insanely hot which is strange for thr country's location

#

So sometimes while doing something I just see the phone dying

#

Or my pc becomes a fucking helicopter trying to deal with the heat

orchid frigate
#

no like

#

you can learn stuff in python

#

robotics

#

ai

#

etc

#

everything is different

eager pulsar
#

i cry cause of HTML at night

main brook
#

yeau

#

html do be taking your husband

#

and threatening to kill him

#

unless you make a good html structure

wary matrix
#

Cin?

#

The one in c++?

#

Yea the console is available in py as well as js and c#

#

As well as most languages I presume

#

If u meant actual cin

#

No

#

But console? Yes

#

The terminal

#

U know where words come out

#

What I thought ur able to get input from user

#

In python

#

what rly?

#

I can't believe it lol

#

Bcuz it only works in c++ or c

#

It's one of the interfaces 2 the console/terminal/whatever u call it

#

I search a bit and it said you can use input()

orchid frigate
#

Havent learned python so idk

#

just like make a project for yourself and whenever you get stuck search the answer online

main brook
#

cin is literally

#

from C++ std namespace

#

python streams are file based

#

for inputs

#

its handled on

#

sys module

#

sys.stdin

#

for outputting to the stdout

#

sys.stdout

#

but you rarely use this

#

there's print() and input()

#

hm?

#

first of all

#

use codeblock

#

```language(like py or js or something)
code
```

#

second of all

#

your code doesn't match the error

main brook
#

imagine like

#

"the gallon was leaking"

#

but you showed them a broken dispenser

#

not the gallon

orchid frigate
#

yes very nice

knotty root
orchid frigate
#

???

cunning summit
#

what language is that

wary matrix
#

Just curious

main brook
#

yes

#

its just the

#

fd's

#

for the terminal

#

like

#

the wrapper on sys.std[in/out/err]

#

are just file wrapper to the /proc/pid/fd/[0/1/2]

#

or whatever its located

#

on the process

wary matrix
#

o

#

thx

main brook
#

yes

#

here's an example wait

wary matrix
#

do they get replaced or do they just stay there forever building up? or is there a limit until they are replaced?

#

or do they get cleared when the program ends? and when two python programs run together they just use

fd/0 for first
fd/1 for second

#

and etc.

main brook
main brook
#

the stdout/stderr are just temporary

#

they're for displaying text on the console

#

they don't contain any size likely

#

you can't read them because there's write only

#

there's no limit to them however

#

the file descriptor also got deleted if the program ends

#

two python program running together is gonna be different

#

like they have different pid

#

so each referring to their own streams

#

even though they're the same fd

wary matrix
#

so why the file wrapper? for structural and design purposes?

main brook
#

its not system wide fd

wary matrix
#

oh

main brook
#

its easier for us to do that

wary matrix
#

ok thx

main brook
#
>>> sys.stdout.write("hi\n")
hi
3
>>>
wary matrix
#

there's no istream or smth in python?

main brook
#

istream?

#

like inputs?

#

because if yes

wary matrix
#

or is the design gonna be too "far apart" and weird

main brook
#
>>> sys.stdin.readline()
hi
'hi\n'
>>>
wary matrix
#

so they just immediately use file

wary matrix
#

idk how to word ir

main brook
#

well in general its

#

input stream right?

wary matrix
#

ye

main brook
#

well python input stream is fd 0

#

its read only

#

it wraps to a file

main brook
wary matrix
#

so why instead of

istream => file
Istream => console

They use

file => console

main brook
#

ah

#

well i mean

#

the file stdout and stderr and stdin

wary matrix
#

it's an oversight? early on?

main brook
#

are wrapper around the console

#

so everything written there is written to console

#

or read from console

#

they treat fd as files

#

normal files

#

specifically stream

#

we don't have separate

#

like print()

#

they take a file argument

wary matrix
#

o

main brook
#

if you provide a file object other than the standard one

#

it writes to the file

main brook
wary matrix
#

like they didn't see that others would use stream like functions aside from files

#

or is it just named like that

#

so they just "fake" a file?

#

bcuz u said there's no size

main brook
main brook
#

its similar to /dev/null

main brook
#

they don't wanna make python complicated

#

since the standard i/o is like

#

also a fd

#

they treat is as file

#

since you can read and write to a fd

wary matrix
#

but it's not actually written to?

main brook
#

its written

#

but never stored

wary matrix
#

o

#

thx

main brook
#

similar to how this works

#

i echoed

#

but redirect its stdout

#

to /dev/pts/0

#

which outputs to my terminal

wary matrix
#

does echo save automatically? sry I don't use linux

main brook
#

no it just

#

write to a file

wary matrix
#

Ooo ok

main brook
#

it doesn't do any saving

#

also windows have similar command

#

called "echo"

#

literally the same

wary matrix
#

sry I don't do that much in windows

main brook
#

oh then what os are you using

wary matrix
#

I meant I do not use the command line that much aside from just git and installing crap

main brook
#

ah lmao

orchid frigate
#

I sometimes wonder

#

When some code is ran the results(prints) are put into a terminal

#

But what is that terminal

#

what traits does it own

#

how does printing on it work is it just integrated vga

main brook
#

well i mean

#

terminal is uhm

#

a place where shell commands are executed

#

like bash for example

#

that's a shell

#

different shell may output different result

#

depending on some traits

#

but outputting through it is

#

hard to explain

orchid frigate
#

Ok well I guess the better question then is

#

...wait im stupid

main brook
#

with the unix filesystem there's some folders

#

that are virtual

#

so my guess is that

#

when you write to the terminal

#

it writes to the device

#

and that device is the machine itself

#

so

#

gah this is confusing

main brook
orchid frigate
#

whats a shell but I already answered that myself

#

basically

#

its literally just a file that reads info from the user and tells the kernel to execute it(the kernel is needed because its the only program with unlimited power)

#

so its simple af

#

the kernel does the heavy lifting

#

Actually I guess everything is already on the kernel so it just needs permissions

main brook
#

o

mental jacinth
#

Mmmmmm

tropic dagger
main brook
#

no

#

you can't

#

because apparently

tropic dagger
#

Exactly.

main brook
#

they're reserved

#

fuck you windows

#

why can't you just

#

use like

tropic dagger
#

wincon

main brook
#

/dev/device

#

like linux filesystem

tropic dagger
#

It's abbreviated to con.

main brook
#

what's con though

tropic dagger
#

It's a dos thing but windows is big compatible.

tropic dagger
main brook
#

ah

tropic dagger
main brook
#

no im like asking

#

not saying

#

lmao

tropic dagger
#

Oh yeah it should be msdos

#

And any other dos.