#ot1-perplexing-regexing
1 messages Β· Page 140 of 1
I was thinking of exactly that study
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
Why does it lowkey make me read faster
season of mists and mellow ????
close bosom-friend of the maturing sun
cbb to do the rest
what word is ftisnflurues

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
cheater!
i just found it from googles
Season of mists and mellow fruitfulness
Close bosom-friend of the maturing sun
Conspiring with him how to load and bless
With fruit the veins that round the thatch-eves run
see this is the sort of outlier that offsets the general average
spiders georg of english sentences
the point is that this image here, and the allegation of the (non-existent) study that brad repeated, is only half the story. you sometimes can jumble the inner letters, but it quickly becomes harder with longer or rarer words
Just have poetry keep the normal spelling
Erevy tinhg esle is fnie
lol
yall want actual trippiness?
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
Now we just need python to support that
the pniot is taht tihs iagme hree, and the agletialon of the (non-etxniest) sdtuy taht bard rtpeeaed, is olny hlaf the srtoy. you stemmieos can jblmue the iennr ltrtees, but it qkcliuy bmocees hdraer wtih lneogr or rearr wdros
it's...... comprehensible
If we have .uwu we should have this as .scramble
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
last sentence is like dutch but it's english
need a translation for the last one
I must say while Dutch is a horrible language it's not comparable
Dit is Nederlands en ik vind dat het er niet op lijkt
But it would be interesting to add support for scrambled keywords to python just so people can write truly cursed python
Finally, then, after some 20 years of orthographical reform, we would have a logical, coherent spelling in
yus(?)use throughout the English-speaking world
use
ohhh
So you can do like lmdbaa and it works like lambda
dutch is like a bit more consistent in spelling than english, and it's somewhat close to english
Blame Friesian
Everything bad from Dutch and English is probably because Friesian and french
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
This is Dutch and In my opinion it doesn't look like it
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
it stil luks wird doh
.sort could also be fun
fi ew aehv .uuw ew dhlosu aehv hist as .abcelmrs
..aaaabcdeeeeefhhhhiillmorsssstuuuvvwww
Bourbon
duck react
hi
POSIX/bash actually ahs some nice features
echo "${VAR:?shits missing dawg}"
is my fav feature that i only recently discovered
fails the script if var is null
Cannot imagine willingly choosing Bash in 2025 for anything
I love this for docker compose files. :3
yeah but their syntax is diff
:#
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
Huh? For env var stuff, it's the same syntax. https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/#interpolation-syntax
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
source?
not meπ
I'm pretty sure ghostiex is an llm or Markov chain
Nah id win
you can't win the time
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
That's a lot of USD
You're like, rich
a couple US deez
scholarship money coming in clutch
eveything ends, even the ashes
not even Jeff Bezos has that kind of money to invest in computers
are you from old money?
old money?
yes
is this a movie reference
llm would be a compliment
can confirm
How can you confirm? Is that your bot?
this but with the documentation
1:1.3k upvote ratio is crazy
i showed that reddit post to my friend and they were confused as to how its even possible to happen
i don't even save in zip files
save in a proprietary compression format instead
although uh
cursor fucks up a major part of your code, changes are written, and you don't know how to undo
sounds like something that git solves
honestly picking the wrong tech shows prolems u never thought existed
@plucky ridge where's the signup sheet?
@carmine apex you've been called out
: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.
this one is training all the little balls to shoot a moving target based on its velocity and position
wow, thats interesting
looks cool
you have the code for it?
no I don't, I did a wipe of my ssd without realizing I had not backups and lost like 10 of these projects and most of the footage I had
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
it's true though, git is overrated π
@rough sapphire stop spamming my CHAT.TXT
?
yeah
huh
LMAO
??
what did you find?
fwiw, I'd change your password / reset the tokens. I don't trust any of this, knowing they're using discord auth.
how could they get my password using discord auth?
..
sup @severe wadi
Listen, you don't trust it but he does. You don't have to get in the way. It's fully trustable. I cannot force you to trust me but I am just telling, stop judging a website.
I'm trying to keep this server safe. You're posting links to a service that: uses discord auth and is logging information about users, including their IP. Don't post the link again.
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.
I don't trust this but I think he meant oauth instead of authπ€
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
why?
What do you suggest instead
Sharepoint
OneNote 365
hi
Would be based but i hate onenote cause it wont stay closed
clearly I haven't shilled enough if you need to ask π
the git ux is quite bad
jj makes so many powerful workflows, that are hard or annoying with git, trivial
Why it have 2 hash π₯΄
is it actually worth it
if all ur projects r in git
that's the thing, you can use it with git as a backend
it's a vcs frontend that can support many backends
one is the interal hash of the backend, one is jj's stable change id
ohhh
so it's a unified front end for vcs?
sounds interesting
is it a vcs or a vcs front end
I'm confused
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
I like to describe it as a front end
there are some vague plans to maybe have a useful native backend or whatnot, but no immediate plans
and worth noting, google internally has their own backend that's backed by their internal version control stuff
I have many frontend:
PyCharm
Sourcetree
git
GitKraken
GitButler
do I need moreπ₯΄
jj is very nice, I can recommend
just to say, yes it's basically a vcs frontend
I'll check it out when I have time ty
I do have high enough reliance to use git as read-only only
But IDE would probably hate it
jj is very nice
average jj shill
jj ππΌ
change name to jjchat when?
there's no emoji for jj
π―π―π
π―
why does putting two of them together make it look different
π―π―
wack
tries to render a country code
There's a dedicated emoji for all competent and respected VCS systems
for example

Sup chat
"GET //download//Users/NoName/.cloudflared HTTP/1.1" 404
"GET //download/Users/NoName/.cloudflared HTTP/1.1" 404
@modern pagoda whats virus.bat
Just a simple bat I made
also people can list all the files on your computer btw
{"code": "/Users/NoName/Desktop"}
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)
you just do the requests manually
How do you even got all that, I tried opening HTMl and I don't have that menu
ctrl+shift+i
or right click > inspect element (or maybe just "inspect" on some browsers)
and then
firefox or chrome?
Opera GX
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
depends on how you tried to stop path traversal
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
avoiding path traversal is basically just adding a check to see if the normalized path is within the expected root
too long
!paste
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.
What do you have against sticks?
I mean is_safe_path, is_safe_filename and secure_filename are the function we are gonna need to look at
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))```
weirdly restrictive file name check
pretty sure secure_filename is the only one you need, but doesnt hurt to be extra careful
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
using startswith for paths also irks me
It checks if the code is in the folder.
"/foo/bar/safety_is_a_lie".startswith("/foo/bar/safe")
you generated code, no?
the code is generated
it's not a user input
it's not a user input
better to be extra
than less
@timid latch How'd you learn all these hacking things?
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.
Hey
sometimes its just throwing interesting inputs at a system and seeing what happens
@modern pagoda question, on the chat app, how are you sanatizing the messages?
bleach
sanitized_message = bleach.clean(message, tags=[], attributes={}, strip=True)
I see, thats prolly safe then
can you get the webhook url in /webhook?
except it can give you a false sense of security
dont think so, its proxied via your backend
try getting it from my backend
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)
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
might not work
there probably is a nicer way than relative_to
it is in debug mode
but whatever
how so?
not as much security
who cares anyway
I already have it, so no need for another one
huh?
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
it checks if it is in the code folder
it doesn't
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
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?
same issue
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
how about you test the example I shared?
Yea, the code I just sent you fixes the problem
try
do it yourself
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'))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
True
there are parts of os.path one could use to do this properly
the point is, if the parent is the file share folder
I just don't understand why you're doing a hacky string based thing when the proper check is as easy or easier
90% of the time when i'm doing string manipulation for security checks, it's not a good way
@thick ore sup
!e it's a one line implementation, even
import pathlib
ROOT = pathlib.Path('/the/path')
def is_safe_path(p: pathlib.Path) -> bool:
return p.resolve().is_relative_to(ROOT.resolve())
def test(p):
if is_safe_path(pathlib.Path(p)):
print(f'{p} is safe')
else:
print(f'{p} is unsafe')
test('/the/path')
test('/the/path/sub')
test('/the/path_oh_no')
test('/the/path/..')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | /the/path is safe
002 | /the/path/sub is safe
003 | /the/path_oh_no is unsafe
004 | /the/path/.. is unsafe
we love pathlib
pathlib makes dealing with paths a lot less error-prone, yeah
Pathlib overriding the behavior of the division operator is the single best addition to programming in the last 10 years
!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/..'))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | True
002 | True
003 | True
004 | False
it's one of those things where I'm unsure if I love or hate it
!e
code
wait what??
you can run code in here ??
that is sick :)
!e
print('hello world')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
hello world
the bot is open source, the github is linked on its profile
thanks man
internally, it uses snekbox
@thick ore do you also program in rust??
teach me mooooooooooooore i dont even know what that is ??
btw thanks for the link
rust is a systems programming language, like C/C++ but better
you should read the rust book, it's a good start
sick, but i think i should start by getting a good grasp on python before i go and learn somthing new
Agreed
unless its posseble to combine the two in a small project ???
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
that sounds hella cool
It has been a couple few years since I went through the rust book
I've dabbled in basically everything
Actively I use C/C++, Rust, C#, python and JavaScript
all for different things ore
Yeah
but can you just use rust instead of c/c++ or the other way around ?
Theoretically yes
why use extra energy to remmeber them all
Also according to mods π€ I have to send you the link in DMs
Rust is for my own projects
oh do you work in game dev?
what does it accualy do??
@thick ore go to #ot2-never-nesterβs-nightmare or DMs
Well I mostly deal with hardware. I'm on the infrastructure side
ours just tell us to buy a new computer if anything more then someone has fogotton a code, happens
Yeah basic help desk stuff is a bit below my position lol
Just enjoyed a nice 4am coffee on my lunch break
I work overnigjt
I hate the sun
fair
yeah so thats not changing anytime soon
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
i have always wonthert about peoples social lives when they work at night an i imagin sleep in the day. if you even sleep????
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
well if it fits your lifestyle i imagine they pay alot for the "bad hours"
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
is that why your bio says that you hate technology haha
yeah my laptop is dead in 4 min
Replaced it with 2xSATA drives in RAID0 because my board keeps killing NVME drives
Then found one of my RAM sticks was dying
maybe get a new board instead
sounds like it could be less expencis in the long end
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
shit my laptop di
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.
sorry what, did i read that right?? 128gb of ram! VM's or do you use it as a personal lab?
Crazzy stuff dude
Game dev, streaming, and 3d stuff eat RAM
I regularly hit the cap on my 64GB
Ooo you stream :) ?
unfortunate combo for your RAM
Yeah the onlything that would make it worse would be trying to open the epic games store
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
need rewrite of steam in tauri
Hm... sshs into partner's pc to check ram 128GB here as well
Last week around half of that was in use for sure.
In our case the computer runs almost 24/7 so we also use it for some self-hosted solutions for our home
Rewrite it in scratch and you'll still get better results
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
possibly
@raw zephyr Have you read Nedbat's writeup on names/references vs values?
Or watched the pycon talk?
yeah
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
I know some basics of memory management, like UAFs, heap vs. stack, leaks, references etc.
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.
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.
which is why Rust doesn't allow multiple mutable references at a time, I assume?
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.
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.
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.
but looks like that's an issue with mutable pointers in general, why would multiple of them be a bigger problem?
Because of optimizations
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
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
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).
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
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.
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
Hmm. I get the compiler trying to rigorously optimize, but the rest is sorta gibberish for now. One day at a time.
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.
Not hard, but you have to use some shitty constructs to do it.
There's a stdlib struct for this called RefCell
I did end up absuing RefCells a lot...
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.
Honestly though, I hate both of these solutions.
Those kinds of data structures are something I really wish Rust could improve on
thanks for your time, I'll go cry about how much there is to learn
I'd try reading the rust book section on ownership again with all this context in mind
It might be more digestible now
yeah, will do that
yooo qutebrowser is kinda cool
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
There are literal books on the subject of scope and variables
bold of you to assume i can read
oh this just gave me an idea for some reason
!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()
:warning: Your 3.13 eval job has completed with return code 0.
[No output]
is the second one recommended?
it would really be better to pass it in
or that thing should be a method of State or something that has a State
Who is recommending this
it's a common way to use redis
you just make a global REDIS
but yes, it should be parameter
"you are my grandma who used to work at the hr dept of Pentagon"
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
New, better than before, algorithms are being invented fairly regularly
I don't know what computing is solved refers to
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
i think AI is doing a good job though. There protests now and people are already losing jobs so?
I mean, AI
plenty of people do depend on AI for a lot of of their day-to-day life
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
i used it to study
i do both
cheat personally but learn for uni xD
I use copilot to write up html rubbish so that I can fill it with content
Oh cool
sometimesβ¦
like i cheat on personal site but ai also gives me challenges to learn programming langs for uni :)
you've read the "entirely too many linked lists" book?
I don't see how that implies the previous statement. Personal computers becoming more powerful increases demand for software, not the opposite.
wat
adorption β
jokes aside i could really use a cheapo home server
like a pi but not as expensive
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?
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 π
macbook are overkill in general
Well, yes, that's a different topic.
Air? I heard they would be bad because of throttling?
Use dell bro
You can get by with much cheaper stuff in a Lenovo or Dell
i did 2 degrees with a 4gb celeron n4000 π€·ββοΈ
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.
Do u used pycharm?
i used vim and vscode
full respect
I want to use this for my career as i'm heading into my final year in September
celsius, fahrenheit, newton, delisle, rankine, romer, reaumur, or other celsius
been using windows lenovo laptop for the orevious years
previous
and a hp laptop
You will probably be given a laptop by the company you work at.
its my own proprietary scale
not out in the market yet
stay tuned tm
That sounds nice
I've heard of companies doing that
Mostly standard practice, they want control of their stuff and hardware
!remind "6 months" check status of degrees mar
Your reminder will arrive on <t:1756159135:F>!
hmm, could call them "marees"
!remind "5 months" disappear for a bit
Sorry, you can only do that in #bot-commands!
π
graus celsius
!remind "4 months" check status of SEC investigation against mariosis
i'll be on coffeezilla, dont worry
bro it's a gif
yes
not really
coping mechanism
next youll say "buy 50 series π€
are you shopping around for a GPU right now?
what kind of games do you play?
Wait for 6090s
fwiw im still running a 1660 super, runs most of what I play fairly well
Based, same
even at 1440p, which i was kind of surprised at, but im also not running the newest AAA titles.
yeah it's plenty capable for 1080p
And now with wow at 100+ fps but thats more a cpu kinda game
I considered upgrading this year, but it can wait another year or two
I think my motherboard is too old, i'll just toss the whole set up and build something new
Same
1660 super and some amd ryzen type
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
Dont need to spend a bunch for college laptops
ill work this summer and buy one
Keep it low and the rest in the pc budget
idk about cheese but if you're down with indian i like, like, what's essentially a potato curry that we eat with chapatis or puris.
you could also do like, a potato bake thing
potatoes go with a lot of things
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
How big is your toaster
ok i call it it a toaster cuz i toast bread in it
its one of those mini ovens/airfryers etc things
@drowsy rose whats going on in here
woops i was in the wrong chanel
anyway
my neovim config is pretty complciated
i have like 164 lines of code just for my statusbar
I am similar, at like 186 lmao
I basically have mode, how many buffers open, file name, spacer, LSP connected, filename, file position
and git in there somewhere on the left
there
does that appear ?
yup
It's good fun ::)
lol
I also coded my own session management
some bits are jank as fuck
I think mine is way worse ππ
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
okay that looks less cleaner buut its less cursed
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
also imma just yoink your bufnr thing rq
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
ic ic
TIL table.insert(t, v) instead of t[#t+1] = v
lmfao so real
how am i still learning things about my mother programming tongue οΌοΌ΄οΌΎοΌ΄οΌ
excuse my code, it can get messy sometimes
sometimes i just write it so I can understand it the best way possible lmao
brazil mentioned
lua king
think he meant lua, lua being from brazil
yes i knew that
unless I am mistaken
but it's like saying "the moon mentioned"
I do wish one thing tho, that lua would index from 0 π
thats my only wish in the world
-# that rhymed
some people love it
0 indexing is peak
lua is that one language made for normal human consumption

but you gotta think about the roblox kids man
hai viv
(except for the metastuff)
we talking vim?
Yeah, I think that's it
but the normal humans are wrong
i was a normal human when i was learning programming ;^;
well um
what does one even use the status line for
i don't think a 5th grader learning programming is something normal but that's besides the point
well it is now unfortunately
location
thats what line numbers are for
how many strikes you have on duolingo the lsp
I prefer not to look at how bad my code is
got the terminal for that
nice looking good ! here is mine
sometimes i dont want to remind myself how bad i am at bash
zsh but whatev
love zsh
I find zsh to be a bit easier to work with and add stuff to
I have bacon if I want to see all my diagnostics
transparency π
i switch between transparent and solid
I got transparent browser π
viv loves transparency so much they created an entire fucking browser with transparency
π
I just wrote the custom css to make it transparent
thoughts on tokyo night
i would make a comment but it's rather political
one of my favs for sure
idk, I haven't tried new themes much in like a decade
wombat is my one true love
tokyo, catpuccin, nightfox and my own
I even maintain my own version of it
i do like rosepine too tho
tokyo is my default
yhe tokyo is super nice
@viral parrot sent wezterm config via pm btw, not sure if u saw.
this is what i have instead of transparency (no wm)
wow
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
i like it
(slightly out of date screenshot, probably)
poor man's transparency
ngl half the reason i made the hiding thing was so other people didnt see my anime bg loll
yeah, keeping it simple and clean
I actually posted this setup on reddit today, https://www.reddit.com/r/unixporn/comments/1iyhjo9/hyprland_first_time_showing_my_rice_got_some/
fuk it, let them see π
form from function and whatnot
lel
collect::<AocResult<Vec<Vec<i32>>>> rust of all time
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)
the line numbers are so annoying to read with that bg
proc macros are such a black box
day1 of the AoC where I learned rust
I never tried rust, been looking at zig a bit tho.
probably refactored a bit, but still
like at least i could get by with my terrible (read: competitive programming) C++ and py skills in rust
I actually maintain a proc macro crate with ~30 stars π
this emphasizes my point
even rust programmers have no idea how proc macros work
error_muncher
isn't it just AST transformations?
strictly speaking its only AST generation, but yes
or is that the non-proc macros?
don't you get AST as input? or is it a plain token stream?
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
its a tokenstream
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
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
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.
Isn't https what everyone uses
Doesn't GH prefer https
read my second message, with literal quote from the github docs
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
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.
opted in to fine-grained personal access tokens
Is that done in repo settings?
the org has to do it, not you. you said you "accepted an invite", so I don't think you're managing the org
also, sounds like it would be under org settings, not repo settings
There is no organization
then check again if you can select your friend as resource owner for a new token
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
Under Resource owner, select a resource owner. The token will only be able to access resources owned by the selected resource owner.
I can only select myself
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?
3ish hours working on a project and i already feel tired
how tf will i survive Real Work
remind me the 6(?) rules for abelian groups again
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
??? how is this trivial
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
I've never seen the C and backwards C set notation either. Maybe I have and I've just forgotten.
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
well he's written "we see that" and not clarified it so i assume to him it's trivial
wdym
the N C H? idk what that is.
it means subset
this is a graduate text don't worry about not understanding it
mathematicians be like "it's trivial" (proof is in the most complex language you've ever seen)
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.
this book has just been him going "yeah this is trivial" and me spending hours walking through the proof
Unless he explained it to me.
i'm sure to him it is trivial
He probably had to think a lot just to simplify it down to one paragraph.
mathematicians often use the word "trivial" to mean like
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.
"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
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
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
yeah you lost me
i will spend the next few days banging my head against the wall and get back to you on that
i agree
but again this text is meant for graduates
Yeah I guess
so i can understand him being much more concise
for the record
this book is 900+ pages long
it's a lot
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
Graduate Texts in Mathematics Serge Lang Algebra Revised Third Edition
I'll definitely look through it. In a couple of years or so.
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
You'll have to remind me about monoids. We've reviewed group theory basically every year in the math lectures
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
groups without inverses
you do group theory in hs?
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
isomorphism theorems?
idk how basic is very basic tho
eh
It's really hard for me to learn something new.
i mean group theory is quite abstract
And the lecturer goes through something new every week.
One week it's basic trig. The next it's AMO.
cosets?
The more you try to prod the more embarrassed I'll be at the lack of knowledge I have...
hey that's the first step
you learn the words
and then you learn the intuition
and then you can apply it
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.
oh speaking of
My trauma dump is slowly leaking into this chat 
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
... 
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
i just don't like having to keep track of factors of two numbers
i would rather multiply them together and factorize that whole thing
I guess
I just find the grouping method simpler because I'll probably make mistakes when dividing
doing it the way i mentioned above just makes it easier (for me at least) to figure out it's -8 and +3
I guess
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