#ot1-perplexing-regexing

1 messages Β· Page 140 of 1

small coral
#

you -> you
flee -> flee
easily -> easly

carmine apex
dapper dew
#

I was thinking of exactly that study

carmine apex
#
Soaesn of mtiss and mloelw ftisnflurues,
Csloe boosm-feinrd of the mrtuniag sun;
Cnponsiirg wtih him how to laod and besls
Wtih friut the viens taht runod the tahtch-eevs run
#

decode that

grave cove
#

Why does it lowkey make me read faster

strange blade
#

season of mists and mellow ????
close bosom-friend of the maturing sun
cbb to do the rest

#

what word is ftisnflurues

carmine apex
strange blade
#

Season of mists and mellow fruitfulness,
Close bosom-friend of the maturing sun;
Conspiring with him how to load and bless
With fruit the vines that round the thatch-eves run

#

easy

carmine apex
#

cheater!

strange blade
#

i just found it from googles

small coral
#

see this is the sort of outlier that offsets the general average

#

spiders georg of english sentences

carmine apex
dapper dew
#

Just have poetry keep the normal spelling

Erevy tinhg esle is fnie

strange blade
#

lol

carmine apex
#

yall want actual trippiness?

strange blade
#

sure

#

I'll be sure to cheat again

#

(if there is a cheating component possible)

carmine apex
#

oh heck this page is longer than i remember

#

For example, in Year 1 that useless letter "c" would be dropped to be replased either by "k" or "s", and likewise "x" would no longer be part of the alphabet. The only kase in which "c" would be retained would be the "ch" formation, which will be dealt with later. Year 2 might reform "w" spelling, so that "which" and "one" would take the same konsonant, wile Year 3 might well abolish "y" replasing it with "i" and Iear 4 might fiks the "g/j" anomali wonse and for all.

Jenerally, then, the improvement would kontinue iear bai iear with Iear 5 doing awai with useless double konsonants, and Iears 6-12 or so modifaiing vowlz and the rimeining voist and unvoist konsonants. Bai Iear 15 or sou, it wud fainali bi posibl tu meik ius ov thi ridandant letez "c", "y" and "x" β€” bai now jast a memori in the maindz ov ould doderez β€” tu riplais "ch", "sh", and "th" rispektivli.

Fainali, xen, aafte sam 20 iers ov orxogrefkl riform, wi wud hev a lojikl, kohirnt speling in ius xrewawt xe Ingliy-spiking werld.
from projectrho, quoting a story from KW Lessing in 1946

zealous comet
small coral
dapper dew
carmine apex
#

disappointingly, even the last sentence is understandable without reading the rest, but it's jarring how reading it in order makes subsequent sentences progressively more readable

small coral
#

last sentence is like dutch but it's english

strange blade
#

need a translation for the last one

zealous comet
#

But it would be interesting to add support for scrambled keywords to python just so people can write truly cursed python

small coral
carmine apex
#

use

small coral
#

oh

#

that's nice

strange blade
#

ohhh

zealous comet
#

So you can do like lmdbaa and it works like lambda

small coral
zealous comet
#

Everything bad from Dutch and English is probably because Friesian and french

small coral
#
Dit  is Nederlands en  ik vind  dat  het er niet op lijkt
This is   Dutch    and I  think that it  it not  look like
``` somewhat
zealous comet
small coral
#

xis is ingliy end ai xink xat it luks laik it (wel, eksep for xe xs)
this is how it would look like written like the last sentence above

#

it's a veri kul rendiyon of xe ingliy langwej

small coral
#

it stil luks wird doh

solemn tulip
#

fi ew aehv .uuw ew dhlosu aehv hist as .abcelmrs

willow narwhal
#

..aaaabcdeeeeefhhhhiillmorsssstuuuvvwww

rough sapphire
#

Whiskey cannot be it

#

There's to be something better

dapper dew
#

Bourbon

rough sapphire
#

Ohh

#

Nah

glossy niche
#

real

#

or should I say

#

rl

brazen ingot
#

duck react

unkempt python
#

never really had to write a large bash script before

#

it's fun

sharp isle
#

hi

glossy niche
#
echo "${VAR:?shits missing dawg}"
#

is my fav feature that i only recently discovered

#

fails the script if var is null

robust zephyr
#

Cannot imagine willingly choosing Bash in 2025 for anything

harsh tundra
glossy niche
#

:#

#

i do like that they tried to mimic POSIX in some way

#

in the env files too

#

ALSO FUCK PYTHON AND NODE JS DOT ENV PARSERS

#

GARBAGE

#

please use your fucking shell

#

fuck that garbage

harsh tundra
torpid hare
#

let's calm down it's just a earth orbiting to sun and we will all die, literally all people on this server will die someday

thick osprey
#

source?

uneven pine
#

I'm pretty sure ghostiex is an llm or Markov chain

torpid hare
drowsy rose
#

chat i need laptop suggestions

#

uhhhhh reqs:

  • budget: <1200 USD
  • OS: dualboot win/linux
  • durable (won't break if i drop it a few times which i inevitably will)
  • dont relaly need a discrete gpu, but probably a decent cpu
#

currently leaning towards a thinkpad rn

vale raven
#

That's a lot of USD
You're like, rich

drowsy rose
#

a couple US deez

drowsy rose
torpid hare
torpid hare
#

are you from old money?

drowsy rose
torpid hare
#

yes

drowsy rose
#

is this a movie reference

lament cairn
drowsy rose
robust zephyr
#

How can you confirm? Is that your bot?

glossy niche
#

this but with the documentation

thick ore
#

1:1.3k upvote ratio is crazy

glossy niche
thick ore
#

lmao

#

at least this dude has some form of version control

glossy niche
#

i showed that reddit post to my friend and they were confused as to how its even possible to happen

small coral
thick ore
#

save in a proprietary compression format instead

small coral
#

although uh

thick ore
glossy niche
#

honestly picking the wrong tech shows prolems u never thought existed

vale raven
#

@plucky ridge where's the signup sheet?

rough sapphire
vale raven
#

@carmine apex you've been called out

royal lakeBOT
#

:incoming_envelope: :ok_hand: applied timeout to @spark salmon until <t:1740291157:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

undone thorn
woeful phoenix
undone thorn
#

it's pretty simple though, just some plain matrices for weights and biases that do forward prop, then the training is cross breeding (literally just selecting values from one parent randomly) the best parents and applying a little mutation

#

wanted to add NEAT to it but I never got that far along

#

here's another one I still have, the slimes learn to navigate, green is positive reward and red is negative

solemn tulip
modern pagoda
#

@rough sapphire stop spamming my CHAT.TXT

rough sapphire
#

?

modern pagoda
#

..

#

wanna know what I see?

rough sapphire
#

yeah

modern pagoda
#

Ima log out you..

rough sapphire
#

huh

modern pagoda
#

LMAO

rough sapphire
#

??

modern pagoda
#

refresh the website :)

#

@rough sapphire refresh again

rough sapphire
#

omg

#

wait

#

i think i just found something

modern pagoda
granite tree
# rough sapphire wait

fwiw, I'd change your password / reset the tokens. I don't trust any of this, knowing they're using discord auth.

rough sapphire
#

how could they get my password using discord auth?

modern pagoda
granite tree
modern pagoda
# granite tree I'm trying to keep this server safe. You're posting links to a service that: use...

You are really a fun-killer, and this server is safe already. Also, Discord is already logging users' IPs. Plus, if they refresh the website, it keeps them logged in. Why? Because of the IP that is saved in a document.

And sometimes, a lot of the time actually, IPs get reset once in a little bit. Discord auth means nothing, it just gives a service or a program your information or limited access. Discord auth cannot actually disruptly infect your discord, and if they remove discord auth from their account and come back to the website, their information is gone off of the logs.

I know your intention is good, but you also should trust. Look at the positive reason on why the website does this and does that before jumping to the bad reasons they are doing this and doing that.

brazen mortar
brazen mortar
#

Also btw, I would assume you need to check each token so people might spam requests with correct form but invalid oauth token to get you rate limit by discord

jaunty wraith
uneven pine
#

What do you suggest instead

tardy rain
#

Sharepoint

uneven pine
#

OneNote 365

solid stump
#

hi

tardy rain
#

Would be based but i hate onenote cause it wont stay closed

solemn tulip
#

the git ux is quite bad

#

jj makes so many powerful workflows, that are hard or annoying with git, trivial

brazen mortar
uneven pine
#

Git compatible

#

So it's just a front end for git

#

I have that

#

It's called vs code

glossy niche
#

if all ur projects r in git

solemn tulip
solemn tulip
solemn tulip
glossy niche
#

ohhh

#

so it's a unified front end for vcs?

#

sounds interesting

#

is it a vcs or a vcs front end

#

I'm confused

solemn tulip
#

so e.g. a git hash will change even if you like just update a description

#

but the change it will be the same, which makes it easy to refer to it

solemn tulip
#

there are some vague plans to maybe have a useful native backend or whatnot, but no immediate plans

solemn tulip
brazen mortar
#

I have many frontend:
PyCharm
Sourcetree
git
GitKraken
GitButler

do I need moreπŸ₯΄

solemn tulip
#

jj is very nice, I can recommend

solemn tulip
glossy niche
#

I'll check it out when I have time ty

brazen mortar
#

I do have high enough reliance to use git as read-only only
But IDE would probably hate it

young shoal
#

jj is very nice

low chasm
#

average jj shill

jaunty wraith
#

jj πŸ‘πŸΌ

grave cove
jaunty wraith
#

there's no emoji for jj

grave cove
#

πŸ‡―

#

why does putting two of them together make it look different

#

πŸ‡―πŸ‡―

#

wack

jaunty wraith
#

tries to render a country code

grave cove
#

\πŸ‡―

#

wild

jaunty wraith
#

πŸ‡― + πŸ…ΏοΈ = πŸ‡―πŸ…ΏοΈ

#

wack

#

πŸ‡ΊπŸ‡°

vale raven
#

for example

modern pagoda
#

Sup chat

#

"GET //download//Users/NoName/.cloudflared HTTP/1.1" 404

#

"GET //download/Users/NoName/.cloudflared HTTP/1.1" 404

timid latch
#

@modern pagoda whats virus.bat

modern pagoda
timid latch
modern pagoda
#

Runs a virus

timid latch
#

also people can list all the files on your computer btw

modern pagoda
#

how????

timid latch
#

{"code": "/Users/NoName/Desktop"}

modern pagoda
#

LMAO

#

i gotta try this holdon

timid latch
#

gotta do it via dev tools since the frontend enforces a valid code in the input field

#

(and this kids is why you never trust frontend validation to be in place)

modern pagoda
#

hmm

#

lemme try myself

timid latch
#

you just do the requests manually

modern pagoda
timid latch
#

ctrl+shift+i

#

or right click > inspect element (or maybe just "inspect" on some browsers)

modern pagoda
#

and then

timid latch
#

firefox or chrome?

modern pagoda
#

Opera GX

timid latch
#

oh, well no clue then

modern pagoda
#

Oh

#

I found how to do it

#

well..

#

Lemme fix it

#

Can you overwrite a file tho?

#

@timid latch

#

try getting the content in "C:\Users\NoName\Downloads\woopies.txt" and change it

timid latch
#

depends on how you tried to stop path traversal

modern pagoda
#

hmm

#

Did you do it?

timid latch
#

dont think so

#

the ratelimit is really annoying to test with πŸ˜›

#

and also if you want pentesters its usually something people pay for

#

honestly it would be easier if you just showed the code

#

that way we could just point out if theres a exploit instead of poking the url with a stick

solemn tulip
#

avoiding path traversal is basically just adding a check to see if the normalized path is within the expected root

royal lakeBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

modern pagoda
vale raven
timid latch
modern pagoda
#
from werkzeug.utils import secure_filename

def is_safe_filename(filename):
    return re.match(r'^[a-zA-Z0-9_.-]+$', filename) and filename not in {"..", ".", ".htaccess", ".bashrc"}

def is_safe_path(path):
    return os.path.realpath(path).startswith(os.path.realpath(FILE_SHARE_FOLDER))```
solemn tulip
#

weirdly restrictive file name check

timid latch
solemn tulip
#

also seeing a bare - in a character class worries me

#

consider escaping it

#

this safety check is weirdly amusing

    code = generate_code()
    code_folder = os.path.join(FILE_SHARE_FOLDER, code)

    if not is_safe_path(code_folder):
        return "", 
#

nothing user controlled

solemn tulip
modern pagoda
solemn tulip
solemn tulip
modern pagoda
solemn tulip
#

it's not a user input

modern pagoda
solemn tulip
#

which makes the check kinda silly

#

you know the thing is safe

modern pagoda
#

better to be extra

#

than less

#

@timid latch How'd you learn all these hacking things?

timid latch
#

a lot of it is just knowing dev stuff and hence having a general idea of what mistakes people can make.
also watched some ctf videos on youtube back in the day so have some clues about what common exploits are.
if you actually go into the hacking space theres a lot of stuff I have no clue about

#

in general tho the question you usually ask yourself is "how might somebody naively implement this and how would I exploit it in that case" and then just testing stuff out based on that.

modern pagoda
#

Hey

timid latch
#

sometimes its just throwing interesting inputs at a system and seeing what happens

modern pagoda
#

I fixed the exploit

#

now, no more hacking

#

unhackable now

timid latch
#

@modern pagoda question, on the chat app, how are you sanatizing the messages?

modern pagoda
#

sanitized_message = bleach.clean(message, tags=[], attributes={}, strip=True)

timid latch
#

I see, thats prolly safe then

modern pagoda
#

can you get the webhook url in /webhook?

solemn tulip
timid latch
modern pagoda
timid latch
#

dont think you can, unless you can trigger a error that returns a traceback where it happens to be included.
(but considering you shouldnt be running this in debug mode anyway I dont really count that too much)

solemn tulip
#

isn't this basically all you need to properly avoid path traversal?

import pathlib

ROOT = pathlib.Path('/the/path')

def is_safe(p: pathlib.Path) -> bool:
  try:
    p.resolve().relative_to(ROOT.resolve())
    return True
  except ValueError:
    return False
solemn tulip
#

there probably is a nicer way than relative_to

solemn tulip
#

but whatever

solemn tulip
modern pagoda
#

who cares anyway

#

I already have it, so no need for another one

solemn tulip
#

your is_safe_path is buggy

#

this isn't

#
# assume the root is /a/b/safe
/a/b/safe_lol_jk  # safe according to your function
/a/b/safe/../unsafe  # safe according to your function
#

the thing I showed would reject both of those

#

you have unnecessary constraints on the file name that might end up safe in conjunction with the buggy is_safe_path check

#

while the thing I posted just checks the thing you actually want to check

#

is the target underneath the expected root

modern pagoda
solemn tulip
#

it checks if one of the strings is a prefix of the other

#

which is a buggy check for paths

#

I guess the realpath usage makes the second one not work

#

but the first one is still an issue

#
In [1]: FILE_SHARE_FOLDER
Out[1]: '/the/path'

In [2]: is_safe_path('/the/path_oh_no_this_is_not_correct')
Out[2]: True
modern pagoda
#
def is_safe_path(path):
    # Normalize both the provided path and the file share folder path
    normalized_path = os.path.normpath(os.path.realpath(path))
    normalized_folder = os.path.normpath(os.path.realpath(FILE_SHARE_FOLDER))
    
    # Check if the normalized path starts with the normalized folder path
    return normalized_path.startswith(normalized_folder)
#

@solemn tulip better now?

solemn tulip
#

same issue

modern pagoda
#
def is_safe_path(path):
    # Get the absolute path of the input
    real_path = os.path.realpath(path)
    
    # Normalize the path for consistency
    normalized_path = os.path.normpath(real_path)
    normalized_folder = os.path.normpath(FILE_SHARE_FOLDER)
    
    # Check if the normalized path starts with the target folder path
    return normalized_path.startswith(normalized_folder)
#

I ain't updating no more

solemn tulip
modern pagoda
#

try

#

do it yourself

#

test it yourself

solemn tulip
# modern pagoda test it yourself

!e

import os

FILE_SHARE_FOLDER = '/the/path'

def is_safe_path(path):
    # Get the absolute path of the input
    real_path = os.path.realpath(path)

    # Normalize the path for consistency
    normalized_path = os.path.normpath(real_path)
    normalized_folder = os.path.normpath(FILE_SHARE_FOLDER)

    # Check if the normalized path starts with the target folder path
    return normalized_path.startswith(normalized_folder)

print(is_safe_path('/the/path_oh_no_this_is_not_correct'))
royal lakeBOT
solemn tulip
#

there are parts of os.path one could use to do this properly

modern pagoda
solemn tulip
#

I just don't understand why you're doing a hacky string based thing when the proper check is as easy or easier

thick ore
#

90% of the time when i'm doing string manipulation for security checks, it's not a good way

modern pagoda
#

@thick ore sup

solemn tulip
royal lakeBOT
thick ore
#

we love pathlib

solemn tulip
#

pathlib makes dealing with paths a lot less error-prone, yeah

uneven pine
#

Pathlib overriding the behavior of the division operator is the single best addition to programming in the last 10 years

modern pagoda
#

!e

import os

FILE_SHARE_FOLDER = "/the/path"

def is_safe_path(path):
    # Get the absolute path of the input
    real_path = os.path.realpath(path)
    
    # Normalize the path for consistency
    normalized_path = os.path.normpath(real_path)
    normalized_folder = os.path.normpath(FILE_SHARE_FOLDER)
    
    # Check if the normalized path starts with the target folder path
    return normalized_path.startswith(normalized_folder)

print(is_safe_path('/the/path'))
print(is_safe_path('/the/path/sub'))
print(is_safe_path('/the/path_oh_no'))
print(is_safe_path('/the/path/..'))
royal lakeBOT
solemn tulip
modern pagoda
#

!e

royal lakeBOT
#
Missing required argument

code

obsidian abyss
#

wait what??

#

you can run code in here ??

#

that is sick :)

#

!e

print('hello world')

royal lakeBOT
obsidian abyss
#

haha

#

how the hell did they implement that???

undone thorn
obsidian abyss
#

thanks man

thick ore
obsidian abyss
#

@thick ore do you also program in rust??

thick ore
#

sometimes

#

i built a chip8 emulator with it

obsidian abyss
#

teach me mooooooooooooore i dont even know what that is ??

#

btw thanks for the link

thick ore
obsidian abyss
#

sick, but i think i should start by getting a good grasp on python before i go and learn somthing new

uneven pine
#

Agreed

obsidian abyss
#

unless its posseble to combine the two in a small project ???

uneven pine
#

It is but you should have a solid grasp of python first

#

Towards the end of the rust book they have you create a python accessible function in it

#

Or at least they used to

obsidian abyss
#

that sounds hella cool

uneven pine
#

It has been a couple few years since I went through the rust book

obsidian abyss
#

how many laguages do you "know!

#

*"know"

uneven pine
#

I've dabbled in basically everything

#

Actively I use C/C++, Rust, C#, python and JavaScript

obsidian abyss
#

all for different things ore

uneven pine
#

Yeah

modern pagoda
#

sup @undone thorn

#

my website is CLEAN

#

no more viruses

#

no more traverse

thick ore
#

we'll see about that

#

no diddy tho

thick ore
obsidian abyss
modern pagoda
uneven pine
#

Theoretically yes

obsidian abyss
#

why use extra energy to remmeber them all

uneven pine
#

But I use C++ for unreal engine

#

I just prefer to use what's native

modern pagoda
#

Also according to mods πŸ€“ I have to send you the link in DMs

uneven pine
#

Rust is for my own projects

obsidian abyss
#

oh do you work in game dev?

uneven pine
#

It's a hobby

#

I work in I.T.

obsidian abyss
#

what does it accualy do??

modern pagoda
uneven pine
#

Well I mostly deal with hardware. I'm on the infrastructure side

obsidian abyss
#

ours just tell us to buy a new computer if anything more then someone has fogotton a code, happens

uneven pine
#

Yeah basic help desk stuff is a bit below my position lol

obsidian abyss
#

fair... πŸ˜†

#

also sounds a little more fun

uneven pine
#

Just enjoyed a nice 4am coffee on my lunch break

obsidian abyss
#

what????

#

4 am

uneven pine
#

I work overnigjt

obsidian abyss
#

why ???

#

for fun

uneven pine
#

I hate the sun

obsidian abyss
#

fair

uneven pine
#

And I've been a night owl.my whole life

obsidian abyss
#

yeah so thats not changing anytime soon

uneven pine
#

For the last 3 years I've been working 10am-9pm and I never got any better at getting out of bed on time

#

I now start work 8pm and it's so much easier

#

Despite being a way more active and demanding job oftentimes

obsidian abyss
#

i have always wonthert about peoples social lives when they work at night an i imagin sleep in the day. if you even sleep????

uneven pine
#

Yeah I sleep from about 9-10am til 5-6pm.

#

I'm already antisocial. I do not and basically have never been the "go out and do things" type

#

When I was in my early 20s my friends and I used to roll around andhang out at 24hr coffee shops and diners back then

#

And we'd have the occasional parties

obsidian abyss
#

well if it fits your lifestyle i imagine they pay alot for the "bad hours"

uneven pine
#

These days I don't do a lot

#

Go out with my girlfriend when we get the chance, other than that just stay at home and game do my job at home because my PC keeps breaking

#

6 minutes of lunch break left

#

Then once more into the fray

obsidian abyss
uneven pine
#

Yeah

#

My NVME drive died completely

obsidian abyss
#

yeah my laptop is dead in 4 min

uneven pine
#

Replaced it with 2xSATA drives in RAID0 because my board keeps killing NVME drives

#

Then found one of my RAM sticks was dying

obsidian abyss
#

maybe get a new board instead

#

sounds like it could be less expencis in the long end

uneven pine
#

I ain't got $300 to replace the board with lol. The drives were enough of a stretch

#

Plus it's the second board doing it.

#

It's a known issue on AMD 5000 series

obsidian abyss
#

shit my laptop di

uneven pine
#

Specifically x570 chipset afaik. They overpower the NVME slots for whatever reason. The Ryzen 5000 series has some bad power delivery issues.

#

USB too

#

I'm upgrading to a 9800x3d and 128GB of DDR5 at the end of the year

#

Just got some bills to pay off in the mean time

#

Okay back to work. Take it easy.

obsidian abyss
celest onyx
#

Crazzy stuff dude

uneven pine
#

I regularly hit the cap on my 64GB

obsidian abyss
#

Ooo you stream :) ?

thick ore
#

unfortunate combo for your RAM

obsidian abyss
uneven pine
#

Epic games runs better than steam's old ass spaghetti code bloated ass security vulnerability of a platform.

#

It's needed a complete rewrite from the ground up for a decade and isn't getting better

thick ore
#

need rewrite of steam in tauri

harsh tundra
uneven pine
zenith kettle
#

I think its time to get a new computer if my laptops battery is 4% of designed capacity and its parts are 6 generations behind and the GPU was low end when it was released

young shoal
#

possibly

sick nexus
#

@raw zephyr Have you read Nedbat's writeup on names/references vs values?

#

Or watched the pycon talk?

raw zephyr
#

yeah

sick nexus
#

Great

#

So here's the deal: in Python, you do not have any choice about where to store an object.

#

The memory which the object data is located in is always managed for you by the interpreter

raw zephyr
#

I know some basics of memory management, like UAFs, heap vs. stack, leaks, references etc.

sick nexus
#

Ok good. Then you're almost there.

#

So as you probably know, variables in C/C++/Rust work fundamentally differently from Python. In those languages, every variable always has its own identity, since it is directly storing an object.

#

Most variables are local, which translates to storing the object inside the call stack

#

char *foo() {
    char buf[256];
    return buf;
}```
And the reason this is garbage is: `buf` stops existing as soon as this function is over with.
raw zephyr
#

yep

#

following so far

sick nexus
#

And C just lets you do this. These types of mistakes in C and C++ typically result in runtime bugs, which is the motivation for the borrow checker existing.

#

Now let's look at a slightly less trivial example

#

Lists

#

lists are great. But they introduce some complexity. Because the size of a list might need to change, the list's elements can't be stored on the stack.

#

The Rust equivalent of a list is a Vec, as you may already know. And the way it works is like this: A Vec has 3 variables: a pointer to some heap memory for its elements, a counter for the size of that memory, and a counter for the amount of that memory already used.

#

When a Vec is made, the function constructing it allocates the heap memory. And when a Vec goes out of scope, its destructor function runs, which frees the memory. Simple

#

Where this gets weird is:
What would happen if you directly copied a Vec?

#

Rust won't let you do this, but let's pretend you could.

#

If you just duplicated the Vec's 3 variables, you'd have two Vecs both pointing at the same memory. Which would be bad.

#

Because storing into the first Vec would overwrite elements of the second. And if you destructed both vecs, that memory would get freed twice.

#

Or worse, if you destructed only one Vec, the other vec would now be using free memory.

raw zephyr
#

which is why Rust doesn't allow multiple mutable references at a time, I assume?

sick nexus
#

It's a little broader but that is related

#

This is what the concept of "ownership" is trying to talk about

#

When you assign a Vec to a different variable like this:

fn foo() {
    let v1 = vec![1,2,3];
    bar(v1);
}
fn bar(v2: Vec<int>) {

}```
The Vec *does* get copied. A new Vec is allocated in `bar`'s stack memory, and the variables from the Vec in `foo`'s stack memory are copied into it.
#

But to fix the problem of use after free / double free, the first Vec becomes invalidated.

#

Rust wants to offer you a set of useful abstractions and shorthands for talking about this stuff. But problems like this are what the borrow checker rules exist to solve.

#

I think most of the rules probably make some intuitive sense if you're with me so far. The multiple mut refs thing might still be confusing though, because you can have multiple pointers to the same thing in C, and use them all

#
int foo;
int *p1 = &foo;
int *p2 = &foo;

*p1 += 1;
*p2 += 1;
*p1 += 1;
#

In Rust this is a no-no, but in C this is perfectly fine

#

It's a weird case where the rules are different, and it's because of optimizations.

#

Compilers really like to cache values which you read from pointers.

#

Because reading from memory is expensive.

#

And even reading from the CPU cache is more expensive than reading from a register.

raw zephyr
#

My intuition for that is: multiple mutable references means there may be multiple things modifying a value at the same time, but that doesn't really make sense outside of parallel programs.

sick nexus
#

Yeah, the race condition excuse is a lie. Don't listen to people who tell you it's because of race conditions, they don't know what the hell they're talking about.

#

It's because if you write through a pointer of type T, any subsequent read from a pointer of type T cannot be eliminated.

#

The compiler wants to delete unnecessary memory reads.

raw zephyr
#

but looks like that's an issue with mutable pointers in general, why would multiple of them be a bigger problem?

sick nexus
#

Because of optimizations

graceful basin
#

isn't it to maintain invariants on types? a mutation could invalidate any existing reference, so you can't mutate if there are multiple references to you.

#

things like combining a running iterator and push

sick nexus
#

That's also a reason. There are a lot of reasons why it makes sense to restrict mutation through pointers.

#

Another reason is to prevent you from "moving" a value out of a mut ref

#

i.e. if you have a mut ref to a Vec

#

and you copy that vec to a local

#

now any other refs to that Vec are pointing at crap

graceful basin
#

something I don't see mentioned anywhere near enough in this context is that even as a Python programmer, you do manually manage lifetimes whenever you're dealing with anything except memory.

with socket.socket() as sock:
    return sock

has the same bug the buf example does (if we assume a closed socket is useless, which isn't really the case). Now, Rust actually gets a clean win over Python here

let sock = Socket::new();
return sock
``` will *move* sock out of the function into the caller, and will not Drop it (thus closing it et al).
sick nexus
#

This is true, and a good point

#

You do write python code which depends on other code having set things up a certain way

#

And if you break those dependencies, everything explodes

#

Just not memory

graceful basin
#

and honestly, I find things like "I won't run out of sockets because I forgot to close them" a bit more compelling than you get to not have the 2% overhead of a garbage collector if you manage your memory manually.

sick nexus
#

Yep, RAII isn't limited to only fixing memory leaks, but also resource leaks in general

#

And descriptor leaks can cause bads

#

So, anyways, the multiple mut refs thing is one of the things that won't make intuitive sense coming from C

#

I think it's probably the biggest one

raw zephyr
#

Hmm. I get the compiler trying to rigorously optimize, but the rest is sorta gibberish for now. One day at a time.

sick nexus
#

You should still have the background for the reasons to make sense with some of these examples. It prevents you from breaking things like iterators' internal state and resulting in garbage implementation-defined logic, and it allows the compiler a lot more guarantees about how it can use stuff

#

If you've seen restrict in C it's kinda like having restrict on everything.

#

The other thing that gets messy is when you have things like structs which contain references.

#

Or worse, data structures which like to operate referrentially.

raw zephyr
#

how hard would it be to implement a linked list in safe Rust? πŸ‘€

#

impossible?

sick nexus
#

Not hard, but you have to use some shitty constructs to do it.

#

There's a stdlib struct for this called RefCell

raw zephyr
#

I did end up absuing RefCells a lot...

sick nexus
#

You can also build your own memory and reference system with blackjack and hookers

#

And store everything in Vecs

#

Then use indexes instead of pointers.

raw zephyr
#

a bit cursed

#

just a bit

sick nexus
#

Honestly though, I hate both of these solutions.

#

Those kinds of data structures are something I really wish Rust could improve on

raw zephyr
#

thanks for your time, I'll go cry about how much there is to learn

sick nexus
#

I'd try reading the rust book section on ownership again with all this context in mind

#

It might be more digestible now

raw zephyr
#

yeah, will do that

unkempt python
#

yooo qutebrowser is kinda cool

thick ore
#

how come this isn't recommended:

x = 10

def modify_state():
    global x
    x = 42
``` but this is:
```py
state = State()
assert state.x == 10

def modify_state():
    state.change_x()
    assert state.x == 42
#

both are still mutating a global value right

uneven pine
#

There are literal books on the subject of scope and variables

thick ore
#

bold of you to assume i can read

small coral
#

!e ```py
class State:
def getattr(self, attr):
class expassign:
def eq(
, other):
self.attr = other
return True
return _expassign()
def change_x(self, x=42):
self.x = x

state = State()
assert state.x == 10

def modify_state():
state.change_x()
assert state.x == 42

modify_state()

royal lakeBOT
solemn tulip
#

it would really be better to pass it in

#

or that thing should be a method of State or something that has a State

graceful basin
#

it's a common way to use redis

#

you just make a global REDIS

#

but yes, it should be parameter

glossy niche
#

"you are my grandma who used to work at the hr dept of Pentagon"

lament cairn
#

i keep hearing that "computing is a solved problem" and all the hype around AI and automation is nothing more than a desperate attempt from silicon valley and the greater tech industry to justify its existence
i wonder if the field of computer science will "die"/become irrelevant not because of AI but because there's simply not much more to do to justify having it as a separate field instead of, say, a subset of mathematics or engineering or whatever

graceful basin
#

New, better than before, algorithms are being invented fairly regularly

#

I don't know what computing is solved refers to

lament cairn
#

at least for the conusumer/average person, there's not much you can do in top-of-the-line hardware that can't be done on a mid 2010's laptop
i understand that for large businesses and researchers that obviously isn't true

rough sapphire
graceful basin
#

plenty of people do depend on AI for a lot of of their day-to-day life

rough sapphire
#

Yeah

#

Lots of people in school use AI

#

some use it to cheat some use it to learn

graceful basin
#

and well, half the stuff you'd be doing on your 2010s laptop is happening on top-of-the-line hardware in a datacenter elsewhere

rough sapphire
#

i used it to study

torn pier
#

cheat personally but learn for uni xD

strange blade
#

I use copilot to write up html rubbish so that I can fill it with content

jade osprey
#

Oh cool

torn pier
#

like i cheat on personal site but ai also gives me challenges to learn programming langs for uni :)

woeful phoenix
woeful phoenix
raw zephyr
#

how dare you add another bookmark on my browser

#

honestly there's too much going on

quasi coral
#

python bad

#

bad

#

badňň

#

i am doing finall exam from this shjit

#

😦

#

turtle

rain marsh
#

wat

glossy niche
#

adorption βœ…

#

jokes aside i could really use a cheapo home server

#

like a pi but not as expensive

hollow cypress
#

hello developers

Is a m4 pro macbook pro overkill as a comp sci final yr student aspiring for a software dev -> devops career?

24gb ram 512gb ssd

OR is the base m4 macbook pro with 16gb 1 fan in chassis fine?

steady hound
#

16gb of ram is more than enough.
You'd probably be fine with something even cheaper, like (if you're set on Macbooks) an Air M2? Probably half the price you're looking at.

#

@hollow cypress πŸ‘†

tardy rain
#

macbook are overkill in general

steady hound
#

Well, yes, that's a different topic.

hollow cypress
hushed ruin
#

Use dell bro

steady hound
#

You can get by with much cheaper stuff in a Lenovo or Dell

tardy rain
#

i did 2 degrees with a 4gb celeron n4000 πŸ€·β€β™€οΈ

steady hound
#

Don't overspend on your first laptop for college. Kinda like going to a hardware store and getting a tool for the first time, you get the cheapest one you can find.
Eventually you find it's just fine, or you learn what you need next time.

tardy rain
#

i used vim and vscode

hushed ruin
hollow cypress
carmine apex
hollow cypress
#

been using windows lenovo laptop for the orevious years

#

previous

#

and a hp laptop

steady hound
tardy rain
#

not out in the market yet

#

stay tuned tm

hollow cypress
#

I've heard of companies doing that

steady hound
#

Mostly standard practice, they want control of their stuff and hardware

hollow cypress
#

but im not sure what my case will be -- I dont want hopeful thinking

#

ah

carmine apex
royal lakeBOT
#
Yep.

Your reminder will arrive on <t:1756159135:F>!

carmine apex
#

hmm, could call them "marees"

tardy rain
royal lakeBOT
#
Noooooo!!

Sorry, you can only do that in #bot-commands!

tardy rain
#

πŸ™Š

carmine apex
tardy rain
#

i'll be on coffeezilla, dont worry

jovial oriole
#

Is 3060 outdated?

#

Im running a shitty apu

#

anything seems good rn

grave cove
young shoal
#

not really

grave cove
#

coping mechanism

lament cairn
#

next youll say "buy 50 series πŸ€‘

low chasm
#

what kind of games do you play?

tardy rain
#

Wait for 6090s

low chasm
#

fwiw im still running a 1660 super, runs most of what I play fairly well

tardy rain
#

Based, same

low chasm
#

even at 1440p, which i was kind of surprised at, but im also not running the newest AAA titles.

tardy rain
#

Its been 5 years now

#

It ran elden ring just fine

#

Also god of war

low chasm
#

yeah it's plenty capable for 1080p

tardy rain
#

And now with wow at 100+ fps but thats more a cpu kinda game

low chasm
#

I considered upgrading this year, but it can wait another year or two

tardy rain
#

I think my motherboard is too old, i'll just toss the whole set up and build something new

low chasm
#

that's probably what I'll end up doing when I upgrade

#

I'm running a prebuilt

tardy rain
#

Same

low chasm
#

costco prebuilt 😀

#

costco's pretty great

tardy rain
#

1660 super and some amd ryzen type

low chasm
#

tbh rather than an upgrade ill probably just need a laptop for college

#

not sure how keen I am on lugging this thing to my dorm

tardy rain
#

Dont need to spend a bunch for college laptops

low chasm
#

ill work this summer and buy one

tardy rain
#

Keep it low and the rest in the pc budget

grave cove
#

@low chasm i got some potatoes what do i make

#

i feel like eating some cheese too

low chasm
#

you could also do like, a potato bake thing

#

potatoes go with a lot of things

unkempt python
#

slap them potato in the toaster, take em out, cut it halfway open with a knife or smth, put some butter, salt and pepper, cheese, bacon, green onion, and sour cream in the potato, mix and eat

#

or maybe dont mix

timid latch
#

How big is your toaster

unkempt python
#

ok i call it it a toaster cuz i toast bread in it

#

its one of those mini ovens/airfryers etc things

analog star
#

@drowsy rose whats going on in here

drowsy rose
#

anyway

#

my neovim config is pretty complciated

#

i have like 164 lines of code just for my statusbar

analog star
drowsy rose
#

lmao

#

send

#

oh wait

#

here's mine lol

analog star
# drowsy rose send

I basically have mode, how many buffers open, file name, spacer, LSP connected, filename, file position

#

and git in there somewhere on the left

drowsy rose
#

ic ic

#

i have mode, file, git, current file loc and LSP

drowsy rose
#

yup

analog star
#

It's good fun ::)

drowsy rose
#

lol

analog star
#

I also coded my own session management

drowsy rose
#

some bits are jank as fuck

drowsy rose
#

like wtf is this 😭

analog star
drowsy rose
#

lmao fair

#

literally held together by duct tape and random SO snippets

analog star
#
local function show_lsp()
    local bufnr = vim.fn.bufnr()
    local clients = vim.lsp.get_clients({ bufnr = bufnr })

    if clients ~= nil and #clients > 0 then
        local lsp_names = {}
        local lsp_names_set = {}
        for _, client in ipairs(clients) do
            if not lsp_names_set[client.name] then
                table.insert(lsp_names, client.name)
                lsp_names_set[client.name] = true
            end
        end
        if #lsp_names > 0 then
                return hl_text .. "LSP:" .. table.concat(lsp_names, ",")
        end
    end
end
#

think this is mine

#

had to remove a few parts

#

just a few if checks for long named LSPs

drowsy rose
#

okay that looks less cleaner buut its less cursed

analog star
#

but I remember working with it, it's like working through a maze, trying to extract the LSP from the table etc.

#

while also trying to make it clear so u can understand it later

#

lmao

drowsy rose
#

also imma just yoink your bufnr thing rq

analog star
#

hl_text is something from somewhere else i think

#

I think it's just a highlight that i made above in the code

#

and stored it in a variable

#

thus returning it with highlight

drowsy rose
#

ic ic

small coral
drowsy rose
#

lmfao so real

small coral
#

how am i still learning things about my mother programming tongue οΌˆοΌ΄οΌΎοΌ΄οΌ‰

analog star
#

excuse my code, it can get messy sometimes

#

sometimes i just write it so I can understand it the best way possible lmao

thick ore
#

brazil mentioned

analog star
#

lua king

small coral
#

how do you find brazil in this conversation

analog star
small coral
analog star
#

unless I am mistaken

small coral
#

but it's like saying "the moon mentioned"

analog star
#

I do wish one thing tho, that lua would index from 0 πŸ˜‚

#

thats my only wish in the world

small coral
analog star
#

some people love it

drowsy rose
#

0 indexing is peak

small coral
#

lua is that one language made for normal human consumption

timid latch
thick ore
drowsy rose
#

hai viv

small coral
timid latch
#

we talking vim?

analog star
drowsy rose
drowsy rose
#

also no status line 3:

small coral
#

well um

timid latch
small coral
#

i don't think a 5th grader learning programming is something normal but that's besides the point

drowsy rose
#

uh

#

lsps

drowsy rose
timid latch
drowsy rose
#

how many strikes you have on duolingo the lsp

drowsy rose
#

git branch

timid latch
#

I prefer not to look at how bad my code is

timid latch
analog star
drowsy rose
#

zsh but whatev

analog star
#

love zsh

drowsy rose
#

no clue what the difference is

#

and i use both

timid latch
analog star
#

I find zsh to be a bit easier to work with and add stuff to

timid latch
#

I have bacon if I want to see all my diagnostics

solemn tulip
#

transparency πŸ˜”

timid latch
#

transparency IS AMAZING

analog star
solemn tulip
#

flat color 😌

timid latch
#

I got transparent browser πŸ™ƒ

drowsy rose
#

viv loves transparency so much they created an entire fucking browser with transparency

analog star
#

πŸ˜‚

timid latch
drowsy rose
small coral
analog star
solemn tulip
#

wombat is my one true love

analog star
#

tokyo, catpuccin, nightfox and my own

solemn tulip
analog star
#

i do like rosepine too tho

drowsy rose
#

tokyo is my default

timid latch
#

yhe tokyo is super nice

analog star
#

@viral parrot sent wezterm config via pm btw, not sure if u saw.

solemn tulip
drowsy rose
#

this is what i have instead of transparency (no wm)

drowsy rose
#

wow

timid latch
#

my status bar for the system itsself is just waybar with a bit of custom css, I am pretty happy with how it came out tho

drowsy rose
#

very utilitarian

#

why are the icons tinyt

analog star
solemn tulip
drowsy rose
#

ngl half the reason i made the hiding thing was so other people didnt see my anime bg loll

solemn tulip
timid latch
analog star
solemn tulip
drowsy rose
drowsy rose
timid latch
#

anyway I need to write some proc macros now (should be a pretty simple one tho.... actually I think it might be possible just with the normal macro system, but it is a better ux as a derive macro)

solemn tulip
drowsy rose
#

true

#

i've bumped the line number colors a bit btrw

#

it was even worse

#

before

drowsy rose
solemn tulip
analog star
#

I never tried rust, been looking at zig a bit tho.

solemn tulip
#

probably refactored a bit, but still

drowsy rose
#

like at least i could get by with my terrible (read: competitive programming) C++ and py skills in rust

timid latch
drowsy rose
#

this emphasizes my point

timid latch
drowsy rose
#

even rust programmers have no idea how proc macros work

solemn tulip
solemn tulip
timid latch
solemn tulip
drowsy rose
#

i have no clue

#

i've never written a macro

#

i've considered, but gave up

solemn tulip
timid latch
#

derive macros can only generate new code alongside the thing they annoate.
attribute and function style macros basically get given a ast as a input and produce a ast as output

timid latch
#

actually so is the output

#

well actually

#

let me double check something

#

yhe you get token streams

#

because the macro content might not be valid rust

#

like theres not way to turn proc_macro!(1 + - * 213 <> hi) into a ast, but it is a valid macro input

manic hinge
#

I'm getting this when trying to push using a GH token I just made

Username for 'https://github.com': username1
Password for 'https://username1@github.com':
remote: Permission to username2/repo.git denied to username1.
fatal: unable to access 'https://github.com/username2/repo.git/': The requested URL returned error: 403
#

It has permission to access all repos

#

And most other perms

#

And I have access to the repo

harsh tundra
#

use ssh url, not https?

#

or it's exactly because it has "most perms"

Organization owners can restrict the access of personal access token (classic) to their organization. If you try to use a personal access token (classic) to access resources in an organization that has disabled personal access token (classic) access, your request will fail with a 403 response. Instead, you must use a GitHub App, OAuth app, or fine-grained personal access token.

manic hinge
#

Doesn't GH prefer https

harsh tundra
#

read my second message, with literal quote from the github docs

manic hinge
#

I'm using a "fine-grained personal access token"

#

"This token has access to all repositories owned by you." sounds like I should not get access

#

Because the repo is not owned by me

#

But I have accepted an invite to it

harsh tundra
#

yes, the docs say the "resource owner" would need to be the org/other person

#

Under Resource owner, select a resource owner. The token will only be able to access resources owned by the selected resource owner. Organizations that you are a member of will not appear unless the organization opted in to fine-grained personal access tokens. For more information, see Setting a personal access token policy for your organization.

manic hinge
#

opted in to fine-grained personal access tokens
Is that done in repo settings?

harsh tundra
#

the org has to do it, not you. you said you "accepted an invite", so I don't think you're managing the org

manic hinge
#

It's my friends repo

#

And he invited me

harsh tundra
#

also, sounds like it would be under org settings, not repo settings

manic hinge
#

There is no organization

harsh tundra
#

then check again if you can select your friend as resource owner for a new token

manic hinge
#

Well it's a public repo

#

So this should apply

harsh tundra
#

YOU own

#

again, fine-grained access token asks you to choose a "resource owner"
that has to be the person/org that owns the repo
not you

harsh tundra
manic hinge
#

I can only select myself

shell raptor
#

Any VSCodium users here?
I want to install this extension: https://open-vsx.org/extension/banacorn/agda-mode
OpenVSX says that banacorn is a verified publisher.
But when I click "install" in VSCodium, I'm seeing this, saying it's not verified. What's up?

lament cairn
#

3ish hours working on a project and i already feel tired
how tf will i survive Real Work

tardy rain
#

you wont work as hard

#

true story

crystal spruce
strange blade
#

remind me the 6(?) rules for abelian groups again

crystal spruce
#

this is from serge lang's algebra, and i'm wondering if anyone can see what the "trivial" argument lang has omitted that uses H/N being abelian and the 3-cycle commutator also being a 3-cycle to conclude that N must also contain every 3-cycle

strange blade
#

??? how is this trivial

crystal spruce
#

he shows right after this that for n >= 5 the alternating group is generated by 3-cycles and that the alternating group is simple, so i assume he doesn't expect that to be used in the proof

strange blade
#

I've never seen the C and backwards C set notation either. Maybe I have and I've just forgotten.

crystal spruce
#

so i'm wondering if i'm missing some easy argument as to why H/N being abelian means N is "large enough" to contain every 3-cycle

#

that doesn't require appealing to A_n being simple

crystal spruce
strange blade
#

the N C H? idk what that is.

crystal spruce
#

it means subset

strange blade
#

Oh it's just subset

#

I knew I saw that from somewhere

crystal spruce
#

this is a graduate text don't worry about not understanding it

lament cairn
#

mathematicians be like "it's trivial" (proof is in the most complex language you've ever seen)

strange blade
#

No I feel like this is one of those TV show scene's where the character understands each seperate word but can't understand the thing put together

#

I've learned all this before somewhere

#

Just doesn't seem trivial.

crystal spruce
#

this book has just been him going "yeah this is trivial" and me spending hours walking through the proof

strange blade
#

Unless he explained it to me.

crystal spruce
#

i'm sure to him it is trivial

strange blade
#

He probably had to think a lot just to simplify it down to one paragraph.

crystal spruce
#

mathematicians often use the word "trivial" to mean like

strange blade
#

My math lecturer makes it very clear to us that to do well in olymath we need to make it set out so that it makes sense for anyone reading it.

crystal spruce
#

"this isn't very interesting it's just the same arguments that many people have done before and you've probably seen, so i won't waste time going over it"

#

i'm relatively new to this stuff tho so kinda dying

strange blade
#

lol

#

If you're struggling I have no chance

#

If you figure it out though I'd be interested

#

Just ping in ot because I think I have dms turned off

crystal spruce
#

i'm pretty sure like this is a fundamental part of the proof of the unsolvability of the quintic btw

#

like S_n being unsolvable for n >= 5 is why 5 is the threshold for polynomial eqns being solvable in radicals

strange blade
#

yeah you lost me

crystal spruce
crystal spruce
#

but again this text is meant for graduates

strange blade
#

Yeah I guess

crystal spruce
#

so i can understand him being much more concise

#

for the record

#

this book is 900+ pages long

strange blade
#

That's nothing

#

dunno why but my friend was reading this

crystal spruce
#

for the record

#

the first 30 pages probably more than covered the entire group theory book i went through when i was first learning it

strange blade
#

Is this book public source or whatever it's called?

#

I'll save it away if it is.

crystal spruce
#

Graduate Texts in Mathematics Serge Lang Algebra Revised Third Edition

strange blade
#

oh yeah

#

dang

crystal spruce
#

it's a tough book

#

been working through it during my uni commutes

strange blade
#

I'll definitely look through it. In a couple of years or so.

crystal spruce
#

so far my opinion of his writing is that it's very good as a source if you're very familiar with the content already

#

like the opening stuff about monoids and very basic group theory was pleasant to read

strange blade
#

You'll have to remind me about monoids. We've reviewed group theory basically every year in the math lectures

crystal spruce
#

and then i started to stumble with quotient groups because i wasn't too familiar with them yet, and so working through the book helped solidify that

crystal spruce
#

you do group theory in hs?

strange blade
#

uh no

#

It's outside of school olymath training

#

I still suck at math

crystal spruce
#

ic

#

how much group theory tho?

#

do you do sylow theory?

strange blade
#

Very very basic stuff

#

And things that are just taught if they are necessary for a question.

#

Just randomly plastered together knowledge with old dusty duct tape

crystal spruce
#

isomorphism theorems?

strange blade
#

lol no

#

Like I said

#

I'm bad.

crystal spruce
#

idk how basic is very basic tho

strange blade
#

The other students probably know about all this stuff.

#

I'm just behind.

crystal spruce
#

eh

strange blade
#

It's really hard for me to learn something new.

crystal spruce
#

i mean group theory is quite abstract

strange blade
#

And the lecturer goes through something new every week.

#

One week it's basic trig. The next it's AMO.

crystal spruce
#

cosets?

strange blade
#

The more you try to prod the more embarrassed I'll be at the lack of knowledge I have...

crystal spruce
#

i mean

#

you still know more group theory than i do when i was your age

strange blade
#

barely

#

I don't know how to apply any of it

#

I just know words πŸ₯²

crystal spruce
#

hey that's the first step

#

you learn the words

#

and then you learn the intuition

#

and then you can apply it

strange blade
#

Yeah, I guess

#

I just feel stupid when I realise that I have been there for a year longer than the other guys in my year, and they're all still better than me.

#

They'll probably catch up in no time. While I still struggle with something like a non-monic quadratic.

crystal spruce
#

oh speaking of

strange blade
#

My trauma dump is slowly leaking into this chat MenheraNervousEhehe

crystal spruce
#

i recently had an epiphany about those

#

say you're factoring ax^2 + bx + c

#

if you instead factor x^2 + bx + ac = (x - h)(x - k)

#

then

ax^2 + bx + c 
= ((ax)^2 + b(ax) + ac)/a
= (ax - h)(ax - k)/a
#

and i find factoring monics easier than factoring non-monics

#

so i do it this way

#

i just didn't have the epiphany that the reasoning was as simple as this until recently

strange blade
#

... IslaConfused

crystal spruce
#

for example uh

#

4x^2 + 7x - 30

#

you factor x^2 + 7x - 120 instead

#

and you get x^2 + 7x - 120 = (x + 15)(x - 8)

#

so 4x^2 + 7x - 30 = (4x + 15)(4x - 8)/4 = (4x + 15)(x - 2)

#

i find it easier this way

strange blade
#

oh uhh

#

that's like the grouping method we're taught but a bit more complicated

crystal spruce
#

i just don't like having to keep track of factors of two numbers

strange blade
crystal spruce
#

i would rather multiply them together and factorize that whole thing

strange blade
#

I guess

#

I just find the grouping method simpler because I'll probably make mistakes when dividing

crystal spruce
# strange blade

doing it the way i mentioned above just makes it easier (for me at least) to figure out it's -8 and +3

strange blade
#

like forgetting to do 8/4 or something

#

to get x-2

strange blade
#

I feel like the grouping method is literally just doing non monic but slower though

#

It's just the factors of a*c that add to b

crystal spruce
#

yeah it's the same with factoring x^2 + bx + ac

#

just an alternative way of thinking about it ig

#

not that i need to factor quadratics too often anymore

strange blade
#

I don't anymore hopefully

#

just did the test today

strange blade
#

We were given the option to choose

#

The most confusing one for me is probably completing the square

#

somehow my classmates know it like it's second nature

#

I'm just behind