#ot1-perplexing-regexing

1 messages · Page 126 of 1

glossy niche
#

makes me wanna kms

#

my lambda is nice and on node 20

vale raven
#

Depends on the company
One of my apps is already running on 3.13

But.... what does the version of Python matter when comparing space saving "optimizations" of one install vs 50 different exe(s) each which their own install?
Your way would require 50 different updates, while just installing would only require updating once

vale raven
brittle void
vale raven
#

Imagine you have 50 different programs to run

#

And you made an exe for each one

#

Now you have 50 copies of Python that each have to be rebuilt individually

brittle void
#

why rebuild?

#

if it works... ?

vale raven
#

So you're just going to stay on the old version forever?

glossy niche
vale raven
#

So you're going to rebuild them all?

brittle void
#

and also, cant i just combine all of those scripts into 1 exe?

#

ok nvm

#

that'd be inefficient to use

glossy niche
#

if you want to optimize space then I think pdm has a pnpm style cache for packages, but idk if that fixes whatever problem you have

brittle void
vale raven
#

So for example, to email everyone their morning reports, a cron job runs docker run --pull always --detach ghcr.io/idi/steve:edge daily-reports

#

But to make sure the cached data is up-to-date, every hour it runs docker run --pull always --detach ghcr.io/idi/steve:edge update-orders

tardy rain
#

We use 2.7, 3.8, 3.11

vale raven
tardy rain
#

Yes

vale raven
#

My condolences

tardy rain
#

Most of what i do is in 2.7

vale raven
#

Whenever I get a job, I hope I'm not forced to use many versions
I can't keep multiple versions of syntax in my head at once

tardy rain
#

Its not that bad tbh but i dont do anything special

#

So far been caught lacking by dict insertion order once

#

Also annoying 2.7 errors about unpacking dicts and such

prime lagoon
quasi blaze
quasi blaze
#

Do you think one can effectively engage in a weekly meeting about finances without having at least a fundamental understanding of finances?

spare oriole
quasi blaze
honest star
#

If I was expected to attend a weekly finance-focused meeting with a person there whose job it is to do the finance stuff, I would expect that person to effectively communicate the important stuff in a way I can understand.

If there's a gap in understanding or terminology, the finance person should be able to explain and cover the gap.

quasi blaze
#

Meeting about finance for the sake of finance

young shoal
#

there's no basic understanding that can give you understanding of complex topics that you need an expert for

abstract briar
#

I get 50kb download speed when installing tensorflow with pip. Other libraries downloading at normal speed. Can you try downloading tensorflow?

tardy rain
#

I swear to god if you post this one more time I will ban you irl

tardy rain
#

In your own words, "you dont ask questions"

quasi blaze
young shoal
quasi blaze
young shoal
#

it's not a refutation, more a refocusing

quasi blaze
#

Are you suggesting that it’s not a good idea for every employee to have a fundamental understanding of what every employee does in a company because an expert surpasses the knowledge of the fundamental level?

young shoal
#

no

quasi blaze
#

So then where’s the disagreement?

young shoal
#

it doesn't matter whether someone has a fundamental understanding or not

young shoal
tardy rain
#

Keezy what are you getting at

quasi blaze
tardy rain
#

Are you suggesting your manager doesnt have a basic understanding of the tech used?

young shoal
quasi blaze
tardy rain
#

Why are you making this argument

#

Is someone you know at work lacking this basic understanding?

quasi blaze
young shoal
#

but that's saying nothing. obviously you should know what the meeting is about

quasi blaze
tardy rain
#

Ok, was there an inciting incident though? Perhaps some frustration with a non-technical manager?
What made you get up this morning and post this here

young shoal
tardy rain
#

What is

young shoal
quasi blaze
#

It doesn’t matter what inspired my argument

young shoal
#

it matters if you want to fix things instead of just argue

tardy rain
#

See youre trying to get people to agree to this inoffensive sentiment of "everyone should have a basic understanding" but then you'll say "hah well my manager doesnt"

#

But you dont fucking know

#

CAUSE YOU DONT ASK QUESTIONS

quasi blaze
tardy rain
#

It sure is though

quasi blaze
#

I am talking in general

tardy rain
#

Now you are

#

As soon as someone agrees you'll switch up

#

You've done it before keezy we're not fucking stupid

young shoal
# quasi blaze I am talking in general

the problem is that when you make your statement general, it loses any meaning. obviously you should know what a meeting you're in is about, at least tangentially. but this is clearly different from someone knowing about all areas of the company

robust zephyr
#

Every time I look in here the same thing is happening

young shoal
#

real

lament cairn
#

#python-discussion message @rough sapphire

My harddrive was replaced with a windows installation media
What does this mean? can you give more details?

rough sapphire
#

I was trying to get windows on a usb stick and then after i was done i wanted to play a game but my game started updating, i was confused because there shouldn't be any patches at the moment, after i found out that i wasn't updating anything

#

i was installing the entire game

#

I then went into the files and my entire disk drive was instead of 1.8tb it was 32gb

#

And EVERYTHING i had on there was gone

grave cove
#

You probably formatted it

#

There are probably some tools to recover it but they’re not reliable

grave cove
#

yes

rough sapphire
#

Like unsafe?

#

Or not probably to work

grave cove
#

no; they just can’t get all the data back

rough sapphire
#

I'm using disk drill right now

grave cove
#

or they may get corrupted data back

rough sapphire
#

its gotten 24 gb right now

#

Any i get back is better than nothing

lament cairn
rough sapphire
lament cairn
#

pithink what?

rough sapphire
#

its like

lament cairn
#

i found azure dev tools. is that what you were using?

rough sapphire
#

yes

lament cairn
#

hm

#

yeah sounds like an accidental format

#

anyways next time have backups ready :)

lament cairn
#

you can only recover like 700mb with the free version

#

it'll show all the data it found but it won't be recoverable past 700mb total

rough sapphire
#

i have to pay?

lament cairn
#

to recover everything, yes

rough sapphire
#

how much

lament cairn
#

¯_(ツ)_/¯

#

the program should have a page for like

#

pricing

#

last time I had to recover files from a hard drive, I used photorec
recuva is also an option
not sure how good either of those are compared to disk drill

CGSecurity

PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks (Mechanical Hard drives, Solid State Drives...), CD-ROMs, and lost pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec ignores the file system and goes after the underlying data, so it will still...

rough sapphire
#

i dont mind

#

i will pay

#

why is it read only

#

and how do i change it

lament cairn
#

is it a removable drive?

rough sapphire
#

external

lament cairn
#

¯_(ツ)_/¯

#

could be disk failure, usb controller being mad for no reason, windows thinking the partition needs repairing, etc
you can try making it writable with diskpart on cmd., there's a few tutorials online showing how to do it

rough sapphire
#

Thanks

#

what i could do

#

i guess

#

is just clip the clips on there

#

that i want

#

xdd

#

im not paying 100 ngl

rough sapphire
#

@lapis trench

#

okay here

lapis trench
#

e

rough sapphire
#

you said

mines has if statements, variables, loops, and printing

lapis trench
#

yes

rough sapphire
#

i have all of those except printing

#

i dont have a terminal

#

ill need to write a driver for that

lapis trench
#

like this ```
assign x -> (5)

while (%x > 0) {
reas x - 1
printf
}```

rough sapphire
#

wait let me

#

btw is ur language compiled

lapis trench
#

its only parsed

rough sapphire
#

mines compiled

#

toward my vm bytecode

lapis trench
#

whats a compiler?

rough sapphire
#

oh wait

#

my compiler is a little broken rn

#

for some reason i didnt fix while loops xd

lapis trench
#

what is a compiler

rough sapphire
#

it turns code to assembly

lapis trench
#

oh

rough sapphire
#

heres a program

#
0000 0010 0000 0001 0000 0000 0000 0101 
0000 0010 0000 0010 0000 0000 0000 0000 
0000 0100 0010 1000 0000 0000 0100 0011 
0000 0110 0000 0100 0000 0000 0000 0000 
0000 0010 0011 1111 0000 0000 0000 1010 
0001 0000 0011 1111 0000 0000 0000 0100 
0000 0010 0000 0000 0000 0000 0000 0101 
0000 0100 0011 0100 0100 0000 0100 0011 
0000 0100 0000 0000 0001 0001 0000 0000 
0000 0110 0000 0010 0000 0000 0000 0001 
lapis trench
#

it finally works! ```
assign x -> (5)

while (x > 0) {
reas x -= 1
printf

}```

rough sapphire
#

:p

#

anyway im gonna go on my phone

lapis trench
#

mines

#

just takes individual lines

#

and interprets it into python code

#

and executes it

rough sapphire
#

im back

rough sapphire
lapis trench
#

but first

#

it adds all those intepreted lines and adds it to a list of all the lines

#

then it exectes it

rough sapphire
#

hm

#

mine does it character by character

lament cairn
acoustic moss
#

holy shid hes back

carmine apex
#

🥳🥳🥳🥳🥳🥳🥳🥳🥳

#

yesnt why did you leave us

tardy meteor
#

im hooked on board game arena has anyone tried it

dry scarab
#

Only one thing i tried this week was sololearn. And im the third in my league

strange blade
#

uwu

small coral
median domeBOT
#

uwu

small coral
#

oh god.

brittle void
#

just do it

small coral
#

corrupted discord link.

#

.

small coral
#

.

#

ooh

median domeBOT
#

^^ uwu <<https://discowd ʘwʘ com/channyews/267624335836053506/463035241142026251/1285938801771810869>>

median domeBOT
#

^^ uwu <<<https://discowd> ʘwʘ c-com/channyews/267624335836053506/463035241142026251/1285938801771810869>>

quasi blaze
torpid hare
#

my computer runs on 2, 1 and 0's

#

I add a new type of transistor

brisk nymph
#

fart

eternal depot
quasi blaze
tardy rain
#

Where was it discovered?

grave cove
#

depends how you look at it but not really imo

solemn tulip
lament cairn
lament cairn
solemn tulip
#

and you ditched pydis of all servers 😭

acoustic moss
#

😭

lament cairn
#

this was the only public active server I was in ¯_(ツ)_/¯

solemn tulip
#

also, anyone fancy salad?

acoustic moss
#

um

#

if you say so

solemn tulip
#

I didn't make the rules

dapper dew
#

Mmmmm food classification

#

My favorite bike shedding topic

acoustic moss
#

post the taco cube

dapper dew
#

ALL HAIL THE CUBE RULE

C U B E R U L E

#

No identifiable form of starch means it is a salad

glossy niche
# quasi blaze It’s discovered

I admit I haven't thought too deeply about it but I've always viewed mathematics as something humans invented to make sense of the world

#

but also, in a way, I feel like this is sort of unfalsiable cuz I don't have a way to prove either side correct

solemn tulip
#

solid cube?

#

i.e. a new category?

solemn tulip
quasi blaze
grave cove
#

it is invented though

quasi blaze
grave cove
#

we came up with it

quasi blaze
grave cove
#

sure

acoustic moss
#

we defined what 1 and + mean

graceful basin
#

the axiomatic system under which 1+1=2 is logically true holds regardless of universe, and its properties were indeed discovered, but that axiomatic system was invented

quasi blaze
# grave cove sure

How would it be logically reasonable for 1 + 1 to not equal 2 in another universe?

grave cove
#

i dunno, have you been to another universe?

#

i haven't

quasi blaze
graceful basin
#

fixed

grave cove
graceful basin
#

it is a very obvious way to make that axiomatic system, so it may seem somehow fundamental to existence, but it was very much invented.

quasi blaze
grave cove
#

i dunno, its another universe

quasi blaze
graceful basin
grave cove
#

idk what the point of debating of 1+1=2 in another universe is

solemn tulip
#

1+1 could be 0 with reasonable-ish axioms

quasi blaze
grave cove
#

can you prove it mathematically?

quasi blaze
#

It’s axiomatic

grave cove
#

you can say anything is axiomatic and it would be true

solemn tulip
#

1+1=2 is not an axiom

quasi blaze
solemn tulip
#

it's a corollary

#

from the axioms we chose

grave cove
quasi blaze
grave cove
#

why not?

quasi blaze
solemn tulip
#

as mentioned before, the universe doesn't matter, the chosen axioms do

grave cove
#

who are you to dictate the laws of another universe?

grave cove
quasi blaze
graceful basin
#

mathematics is built around inventing definitions that describe ocasionally useful things.

grave cove
#

tfw math is occasionally useful

graceful basin
#

in the case of 2=1+1, they were invented to count things

grave cove
#

math phds when someone finds a practical use for their research:

glossy niche
grave cove
quasi blaze
#

That’s why it’s not invented

grave cove
#

yes, if your logic is correct and two people agree on the axioms, they must necessarily agree on the conclusion

glossy niche
solemn tulip
quasi blaze
#

The conclusions to the mathematic answers were not invented

graceful basin
solemn tulip
graceful basin
#

I would argue that's not exactly a useful statement tho

glossy niche
grave cove
#

aint nobody readin allat

solemn tulip
#

they just threw it in later on because why not

graceful basin
solemn tulip
#

you shouldn't need much more than some succ

graceful basin
#

and fundamentally, mathemantics, unlike most science, is not actually about describing real-world phenomena

grave cove
#

real

glossy niche
#

idk how to explain it but I think this gives me better perspective into this

graceful basin
#

the mathematical process is approximately - pick a definition, research what conclusions you can get based on that definition.
Now, there are some moderately obvious definitions, especially relating to geometry and counting and such, but even then, they were picked arbitrarily.

glossy niche
#

I have no explanation, only vibes

graceful basin
#

(fun fact: it is pretty damn hard to actually make a proper logical foundation for all of conventional mathematics that is sound and makes sense).

solemn tulip
#

it's more like you kinda can't

graceful basin
#

I honestly don't remember what the status on that is

solemn tulip
#

Gödel's incompleteness theorem and whatnot

young shoal
#

yeah that thing

young shoal
glossy niche
#

where did the philosophy majors go

#

time to bother them again

eternal depot
vale raven
stark prawn
#

🦇

#

🚫 🐶

quasi blaze
patent girder
#

.wa s define axiom

median domeBOT
quasi blaze
glossy niche
young shoal
glossy niche
#

An axiom, postulate, or assumption is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments. The word comes from the Ancient Greek word ἀξίωμα (axíōma), meaning 'that which is thought worthy or fit' or 'that which commends itself as evident'.
The precise definition varies across fields ...

#

In mathematics, an axiom may be a "logical axiom" or a "non-logical axiom". Logical axioms are taken to be true within the system of logic they define and are often shown in symbolic form (e.g., (A and B) implies A), while non-logical axioms are substantive assertions about the elements of the domain of a specific mathematical theory, for example a + 0 = a in integer arithmetic.

grave cove
#

aren’t axioms like the smallest unit

#

you can’t break it down more to prove it

glossy niche
#

sumn like that

quasi blaze
glossy niche
#

whats the source for this

glossy niche
young shoal
glossy niche
grave cove
#

💀

young shoal
#

ah

quasi blaze
tardy rain
#

Whats the proof that an axiom is true

grave cove
#

isn’t finding good source documents taught in college

young shoal
#

yes

stark prawn
grave cove
#

most of my geneds had writing components where a certain number or vetted academic sources were required

tardy rain
#

Well yes, you learn but youre not taught

glossy niche
#

honestly, wikipedia gets exponentially less useful if you have a degree on the topic yert

grave cove
#

I guess learned would be the better term then

glossy niche
#

i found myself using it a lot less after graduating

young shoal
# quasi blaze U beat me to it

you can't prove an axiom. for example the parallel postulate. it isn't true or false, it just changes what geometry you're talking about

grave cove
#

Wikipedia sites their sources

glossy niche
patent girder
glossy niche
#

yea

#

id like to think LLMs would compliment that nicely if you RAG it nicely

patent girder
#

I think that's likely to be the case in the future, when they get more reliable and common apps have an in-built way to interface with them

graceful basin
# quasi blaze That’s not an axiom then if you have to “make them up” Axioms are references of...

that is neat, axiom somehow simulatinously means "a fact that has already been proven", and "the foundation of a logical system on which further proofs can be built". In this case, I use it in the latter meaning. For example, when defining natural numbers, you don't prove that zero is a natural number, you state that zero is a natural number, and that the successor of a natural number is a natural number. Those are two axioms of natural numbers.

jovial oriole
#

Bro what is going on with my math instructor?

#

today she got a call and everyone agreed her to pick it up

#

afterwards she explained that it was a doctor telling her that her mother is in a vegetative state

#

and she legit said "her health is sort of like a sinusoidal function, it keeps going up and down. She just about to die. Im sorry i interrupted the lesson guys, i did not come yesterday and i might not come a couple weeks in the future"

#

And went back to teaching like nothing happened

karmic gust
#

kind of sounds like your math instructor explained exactly what is going on with your math instructor

thick osprey
#

Agreed. Unfortunate that she can't take more time off but she is likely just focusing on the day-to-day.

jovial oriole
#

bruh

#

Im more surprised about how plainly she explained that

patent girder
#

People deal with grief in different ways

quasi blaze
#

So since we hashed out the discussion of mathematics being invented or discovered. Can we all unanimously agree that the mathematical formulas are invented and mathematical conclusions are discovered?

torpid hare
#

math it's literally what is happening

#

descartes thought math was something that we born with

karmic gust
grave cove
quasi blaze
hybrid rock
grave cove
#

yeah its a form of art

hybrid rock
#

(But often is because the things we find interesting tend to be somewhat based on reality in some way)

#

(Nature gives us puzzles we like)

#

(In the past math was all constructive, and based on real problems)

#

(That's why Euclid's elements is all about constructing things (that have to do with physical (locally Euclidean) geometry (e.g. a house)))

carmine apex
#

what's with the parens did this turn into lisp-discord

carmine apex
hybrid rock
#

Side notes to side notes.

#

Trig for example came about from the physical based desire to compute volumes of domes and such (lots of cones, cyclinders). I wonder why...

hybrid rock
#

So it's both.

grave cove
hybrid rock
#

You discover some math, then invent some tool from that (e.g. the quadratic formula).

#

The tool lets you discover more math.

vale raven
hybrid rock
#

IDK why this question keeps being brought up. It's really straight forward IMO.

#

No major insight to be gained from this.

#

Engineers (for the physical version of this) focus on making tools mostly, and making them very good. A physicist might discover it first, but their tools are often pretty bad at first and they are not interested in making them really good unless they really need them for the next step they see.

#

(In reality people in these fields are a mix of these professions)

#

(All physicists in the past would tend to make their own tools (with the help of a lot of assistants), making them engineers too)

#

(Now these tools are so complex that you often need to specialize in them (a physicist might understand the general ideas of a lithography machine for CPUs, but can they build one? Probably not))

hybrid rock
grave cove
# vale raven No, they’re going to to eat, they’re going to splurge on the _Coca Cola_ _You BE...

try it, it's fun:

When three professors are seated in the restaurant, the hostess asks them: “Does everyone want coffee?”

The first professor says: “I do not know.”

The second professor then says: “I do not know.”

Finally, the third professor says: “No, not everyone wants coffee.”

The hostess comes back and gives the coffee to the professors who want it. How did she figure out who wanted coffee?

young shoal
vale raven
grave cove
#

based

hybrid rock
#

(It's an important step in math to "want something to be true")

#

If you look at old math, it's all a bunch of numeric computed tables by hand and then based on that try to find the pattern (this is prior to plots which were a major invention).

#

(Or it's geometry (because no symbolic algebra yet, which is the same thing written another way))

#

Babylonian numeric search was realizing that you can do binary search for guessing and that this was better (hot/cold).

#

(And that each guess it closer to the correct value than before so you can keep going, this is a major key insight)

#

(Early seed of limits)

young shoal
#

bro loves parentheses

robust zephyr
#

Maybe they want us to evaluate the sentences in parenthesis first

young shoal
#

hmmmmm

glossy niche
#

bro speaks a lisp dialect

fringe rain
#

bro uses BODMAS

undone granite
#

No way, its Guido

torpid hare
#

how a country block a site like X for the entire country

#

I get it now, the police come in with a warrant

#

and the own employees of the company have to take it down

lament cairn
#

now it would be more difficult had Cloudflare not cooperated with the brazillian government because now visiting twitter is like visiting any cf protected website, and the only way to tell would be through plaintext DNS requests or through DPI

lament cairn
lament cairn
jovial oriole
torpid hare
outer pebble
lament cairn
# torpid hare what did you mean by ASN? Autonomos System Number? It's it a layer above ip rang...

what did you mean by ASN? Autonomos System Number?
yes
It's it a layer above ip range?
no, you can think of it as an ID given to ISPs
https://www.arin.net/resources/guide/asn/
An Autonomous System (AS) is a group of one or more IP prefixes (lists of IP addresses accessible on a network) run by one or more network operators that maintain a single, clearly-defined routing policy. Network operators need Autonomous System Numbers (ASNs) to control routing within their networks and to exchange routing information with other Internet Service Providers (ISPs).

torpid hare
lament cairn
#

wdym

torpid hare
#

for example, the routing policy from a y country doesn't allow routes that access specific range of banned web applications

lament cairn
#

i think so yes

#

countries can choose to tell isps to not route certain ips or ip ranges

#

or route them differently

torpid hare
#

or the Internet Service Providers have a common standard that all they can communicate

lament cairn
#

so can an isp choose independently to not route certain ips without a previous court order, for example

torpid hare
#

like cloudflare does?

lament cairn
#

im not that sharp on networking stuff

lament cairn
torpid hare
#

got it

young shoal
#

bgp goes hard

torpid hare
#

border gateway protocol? bgp-4?

solemn tulip
brittle void
solemn tulip
#

a lot of python recently actually

#

also jfc, I have a diffmarker where one arm is 900 lines

young shoal
#

🗿

brittle void
deep pawn
#

Definitely not that

brittle void
solemn tulip
#

you can also spot some local honorary local birds

junior hearth
#

classic sky

solemn tulip
#

||cranes||

junior hearth
#

classic birds

young shoal
lament cairn
#

look at this tiny mf thing

cloud oxide
patent girder
glossy niche
solemn tulip
glossy niche
#

what build r snow leopard

cloud oxide
undone granite
#

I love the emoji in your bio

solemn tulip
#

am joking

lament cairn
solemn tulip
#

the keyboard can control the mouse, but I rarely use it

#

I just use a mouse

solemn tulip
cloud oxide
cloud oxide
solemn tulip
#

I have a keyboard heavy workflow anyway, so I don't use the mouse much unless I interact with a web browser/browsing code

quasi blaze
#

I read my preparation sheet before the exterminators came in and did treatment in my apartment and it says

“Do not be alarmed if you see increased pest activity for 7 to 14 days after the treatment. This is normal and it is the result of the treatment.” How is this a normal part of the treatment?

grave cove
#

seems like something you should ask the exterminators

graceful basin
#

The pests are being actively threatened so they start doing more things than normal I'd guess

young shoal
grave cove
green pelican
# quasi blaze No

Now, you might think it odd that after a pest control treatment pest activity would go up, but in some cases that can happen. The good news is, these spikes usually only lasts a couple of days and is part of the effective removal process.

A pest control service doesn’t use products to make more bugs appear in hopes you’ll hire them longer, but the products they do use can actually drive pests out of hiding.

#

seems chill

#

unless psvm is a certified pest control expert

#

oh nvm im slow

#

thats what hey werer saying

patent girder
outer pebble
#

💀

glossy niche
brittle void
#

hey @thick ore

#

u there?

thick ore
#

yes

brittle void
#

finished playing?

#

i need some help from u again

#

u free?

thick ore
#

Errm

#

what kinda help

brittle void
#

its react again

#

js, not ts

thick ore
#

oh

#

whats the issue

brittle void
# thick ore whats the issue
<input
    type="checkbox"
    className="tristate-checkbox"
    checked={currentVal == valuesArray[0]}
    onChange={(event) => {
      cycleStates()
      if (onChange) onChange(event)
  }}
  ref={(elem) => {
    elem.indeterminate = currentVal == valuesArray[1]
  }}
/>

is this not an ok way to make a checkbox element to change to the intermediate state?

glossy niche
#

what is that ref doing

#

have you considered useRef?

brittle void
brittle void
glossy niche
#

yeah but ive never seen anyone using it like that

brittle void
#

but some guy saw that above code and said that this is a bad practice

glossy niche
#

also, both on change and a ref?

#

you usually only need one

#

usually you would just have an on change that does a setState()

brittle void
#

now im doing it like this

useEffect(() => {
  if (inputRef.current)
    inputRef.current.indeterminate = currentVal == valuesArray[1]
})


const inputRef = useRef()
<input
    type="checkbox"
    className="tristate-checkbox"
    checked={currentVal == valuesArray[0]}
    onChange={(event) => {
      cycleStates()
      if (onChange) onChange(event)
  }}
  ref={inputRef}
/>
#

idk if im still doing it in the way, that'd be considered as a "good practice"

#

or, in the "react" way

glossy niche
#

that useeffect looks sus

#

where dependency array

#

i actually forgot how to use effect

brittle void
#

ok, i'll include that too

#

also bro, idk why
but when i update a child component
it just updates every single parent component bro

#

why is it like that?

glossy niche
brittle void
#

and why cant it just update only the child?

glossy niche
#

what "child" are you referring to here?

brittle void
# glossy niche are you passing any state down?

im storing an object as a state
and im passing a value from one of its keys to the child
and i do supply that state's setstate function to the child component (this input tag)'s onchange function
so, does that mean that'll update the parent?

brittle void
glossy niche
#

have u read the docs? pithink

#

react docs r very good

glossy niche
#

what are the contents of on change?

#

if it contains a setState that updates the parent, then the parent will obv update

brittle void
#

ok i cant believe that i actually forgot ohw states work in react

#

so, states update the parent component in which it is created, and thus re renders every single child component
am i right?

glossy niche
#

if u update a parent children will update with it

brittle void
#

ok so, how do i make it in such a way that'll achieve this?
i need to share a value between the parent and its direct child
this value will be used to decide how to render a component using in-place conditionals,
like this

<input
  checked={currentVal == valuesArray[0]}
  onChange={(event) => {
    setCurrentVal() // currentVal is from the parent component. and we're inside the child component
    if (onChange) onChange(event)
  }}
/>

but it should also not re render its parent component
is there anything like this in react?
the only thing i find like this in react is by having such value in useRef and passing it inside the child component does the job what i expected
but people said that its not how useRef should be used

glossy niche
#

why in place conditional ?

brittle void
#

why not?

glossy niche
#

if you want something to persist across renders, put it in the state

brittle void
#

is it a big issue?

#

or is it normal thing that i dont have to worry about?

glossy niche
#

usually such a small rerender is not an issue

#

iirc use memo and use callback can be used to prevent a Re render

brittle void
#

i did use some usecallbacks for the functions that are defined under the child element
and that did reduce unnecessary re renders
but when i asked for some doubts in my code, he got so pissed off for seeing so many bad usage of usecallbacks
and said i dont need them

#

maybe i should take a deeper look into the docs

#

sigh time to start learning again

glossy niche
#

well yea rerenders are not that big of deal unless ur like rerender ing the whole page

brittle void
#

ok
got it
im just over exaggerating for optimizing it to oblivion
and then i'd just start to do premature optimization
is there a cure to not to do it?

glossy niche
#

like if you can NOTICE the difference

#

optimize

brittle void
#

i dont have much knowledge in dsa
by getting good at it, can i remove such paranoia in me?

glossy niche
#

mmmmmmmmmmmmmmmmmmyea

brittle void
#

🤨

glossy niche
#

but the thing is, algorithmic optimizations where you drop the big O of something are rarely the optimizations you need

#

usually its something like caching, etc

#

buffering, async operations, using the correct API

#

etc etc

frozen crane
#

@graceful finch I made moussaka

#

do you like or no

#

(I'm American)

graceful finch
#

Haha that seems pretty tasty.

#

Was it?

frozen crane
#

ye

graceful finch
#

W

frozen crane
#

this time I processed the onions and made the bechmael extra thick

#

made a big difference

graceful finch
#

Some greeks prefer pastitsio over mousaka. You should try to make it sometime.

frozen crane
#

oh interesting

glossy niche
#

looks pretty different from what my family makes

#

usually we use ground lamb + fried eggplants for the filling, and the top most layer is toasted pita + yogurt

acoustic moss
#

only greek food i remember is souvlaki

glossy niche
#

oh, im assuming thats the greek version, the version we make is the middle eastern one

glossy niche
#

esp in greek salad

acoustic moss
#

is that a pun

#

nvm feta isnt always goat cheese

glossy niche
#

wah?

#

pun ruined

frozen crane
granite tree
#

That is outstanding. Love moussaka (and pastichio or however you spell both

quasi blaze
tardy rain
#

I've never really liked moussaka

#

Weird texture

#

Same with pastitsio

dapper dew
#

Would a fair description be this is shepards pie but with eggplant?

#

I do have eggplant and potatos to use this weekend, this might be the dish to use them

frozen crane
ocean pond
#

Today 10 girls asked me out

dapper dew
#

Ah

ocean pond
#

Apparently it was ladies room

dapper dew
#

The bechamel

#

Looks pretty impressive!

ocean pond
#

If u are ugly, just show ur crush the more attractive female friends after getting friendzoned from them

#

Works everytime

rare wing
#

$$$

glossy niche
#

I think sour cream > bechamel

#

by a lot

tardy rain
#

Yes

#

Bechamel is yucky

glossy niche
#

do u guys serve ur massouka cold or hot btw

we usually serve it cold pithink

tardy rain
#

Hot usually

solemn tulip
glossy niche
#

sour cream mixed with fresh thyme :3

solemn tulip
#

or would you put sour cream in it? pithink

glossy niche
glossy niche
#

too most layer being cheese

#

now that I think of it, my lasagne is pretty unauthentic lol

solemn tulip
#

that feels like a crime

torn pier
#

and i like choccy pizza, what's more crime?

dapper dew
#

Choccy pizza is more of a cookie cake though

torn pier
#

with fruits :D

glossy niche
glossy niche
#

u r mixing savoury and sweet here

torn pier
solemn tulip
torn pier
#

pineapple pizzas good too :D

#

havaiian 😋

frozen crane
#

@stiff robin I've been meaning to ask you about that 20+ year old "personal kit" repo of yours. have you written anything about how you designed it?

frozen crane
stiff robin
#

Well... yes and no.

For personal use it's just part of my standard account install, with the scripts in ~/bin and/or ~/bin-cs and the perl in ~/lib/perl and the python in ~/lib/python.

For reuse I install the whole checkout in /opt/css, with an /opt/css/env.sh which sets $PYTHONPATH and a few other things so that it is found - users can just source that.

For project use, pip install. The more reusable/stable stuff is on PyPI: https://pypi.org/user/cameron.simpson/

Some things go up there to support other things, so at need something might get spiffed up a bit and published so that pip install can get everything required.

frozen crane
stiff robin
#

Well, I don't write any perl these days. I had a bunch of perl stuff before I moved to Python, which was something I put off for more years than I should have.

frozen crane
#

what feature of perl do you miss the most and why is it autovivification?

stiff robin
#

Once you've got an installed base of code, shifting languages has this barrier that all your modules don't help you anymore - they need reimplemnting as needed.

#

"autovivification"?

Perl's kind of succinct. For tiny things it's all right. I wrote a lot of object oriented perl too, but Pythons just better.

Miy personal philosphy on languages is use the "smallest" tool which succinctly and clearly solves the problem. So my rough hierachy is usually essentially shell, awk, python depending on complexity and the task. Was shell, awk, perl. Ovbiously it isn't a strict hierachy.

frozen crane
#

autovivification. it's how my uncle described a language feature where nested data structures are created implicitly. In Python terms, suppose that foo['bar'][0] = 'hello' doesn't require prior instantiation of foo['bar']

stiff robin
#

Ah that. Yes.

#

defaultdict and the like is your friend in Python.

#

autovivication is handy, but to me it's like os.makedirs vs os.mkdir. I almost never use the former, too prone to accidents. (Looking at you, Docker.)

frozen crane
stiff robin
#

Depends on small. You can build a lot of classes, and classes on classes. Etc.

frozen crane
#

Squiggle is joining the chat?
Are you two alts of eachother?

stiff robin
#

Some of it of course is a statement on what I personally tend to undertake.

#

Nope.

hybrid rock
frozen crane
#

I hold both of you in high regard, so take it as a compliment inasfaras my opinion matters.

stiff robin
#

There's recursion in Perl's regexps? Because I was pretty sure Pythons re module is PCRE compatible.

hybrid rock
#

But either way, everyone tries to copy / play catchup to Perl's regex.

frozen crane
#

what about """raku"""

hybrid rock
#

Raku is Perl 6, they renamed it.

outer pebble
hybrid rock
stiff robin
#

I'm a little leery of using regexps in some turing complete sense etc. Perl's overreliance on the in parsing is in some ways a detraction - you've got this one powerful tool and it gets used for everything.

I'm a big regexp fan, but feel it's a bit prone to making cryptic fragile things. Back to my "the smallest tool which succintly and clearly solves a problem" rule of thumb.

#

I've never used Perl 6, I shifted mostly to Python from Perl 5, about when Perl 6 was new.

frozen crane
#

oh, you just reminded me of a coworker who likes perl. which undermines my original statement.

#

he just had his 35th anniversary with the company.

stiff robin
#
Yes, sometimes Perl looks like line-noise to the uninitiated, but to the
seasoned Perl programmer, it looks like checksummed line-noise with a mission
in life.        - The Llama Book
hybrid rock
#

And for that one-liner case, it's great, but meant to be used in an interactive environment, like vim.

stiff robin
#

... or sig quotes JAPH and all that.

hybrid rock
#

It's similar to Fortran in that regard, and I wish new languages did not just completely ignore them.

#

Problem is that everyone tends to code in their domain, and use a language that supports that specifically. So those making a new language are only focused on things in their domain, they may often not even be aware of the other ideas.

hybrid rock
frozen crane
hybrid rock
frozen crane
hybrid rock
#

IDK the Raku lore.

stiff robin
#

ISTR that there were breaking syntax changes. Possibly large - I never really found out.

glossy niche
#

chat is this real

#

wait I misread this

#

I thought the cat walked 800 miles

#

fucking news outlets man

prime lagoon
#

When I go outside that domain, it's C++ or Python for me.

#

But even so, I rather use a DSL if it is good for it

harsh tundra
#

@sullen pier re: #python-discussion message
I love weird decor, I guess? I have some skull (most probably dog's, but maybe fox's, idk) we found in a forest. I'm still sad that last fall we went to look for mushrooms and found a lot of bones (including vertabraes! it was some animal's old dinner - some bones scattered but also a lot in one place) but I didn't have anything where I could put them to bring home :c

sullen pier
#

I think I found cow skull fragments a couple of times

vale raven
#

Now there's a title I never thought I'd hear

tardy rain
#

Lmao

#

Girl with the dogs is great

#

The second channel is more fun

granite tree
#

Leg hair, if you are wearing shorts

#

So damn annoying

radiant cosmos
#

anyone recommend any good anime to watch?

ocean pond
#

its not an anime, its an emotional rollercoaster with lot of thrills and suspense

#

every character has a proper background story shown

#

which ll help u connecting

#

let the ss speak for itself

radiant cosmos
#

i read naruto > 10 years ago. only newbies say naruto
anyone who is not a newbie recommend any good anime to watch (please don't say bleach/naruto/boruto/attack on titan/death note/one punch man/ kuroko no basuke/haikyuu/steins gate/gintama/GTO/berserk/assassination classroom/full metal alchemist. i have seen those)

ocean pond
#

really good puzzlling story with beautiful ending

#

darwin game is another thrilling anime

#

but short one

#

if u want 100+ episodes anime then u wont find good stories except the one u already watched

radiant cosmos
#

if i wanted to watch hundreds of episodes i can always watch gintama.. there is no anime greater than gintama.. it is the 🐐

ocean pond
#

assassination classroom is also fun if u want laid back exp

radiant cosmos
#

again seen those oldies

ocean pond
#

classroom of elites got new season

radiant cosmos
#

i'm looking for undiscovered gems.. not the already popular bc i have seen those

ocean pond
#

also time i got reincarnated as slime

#

ah the hidden gem i consider is miss kobiyashi dragon maid
cute and fun anime with one of the best animations

radiant cosmos
ocean pond
#

the jiggling physics is 📈

vale raven
#

chat get back up
you're too down bad

ocean pond
#

if u want some good romantic then The Quintessential Quintuplets is nice

ocean pond
#

talking about oldies, if u havent watched jojo then u cant talk about oldies

radiant cosmos
#

ffs

ocean pond
#

if u like fighting, u can watch whole series of baki

radiant cosmos
#

what part of undiscovered gems dont u understand?

vale raven
#

why you gotta hate on everything??

ocean pond
#

use some brain cells

torn pier
#

if it's undiscovered it is discovered it is undiscovered so it is discovered

#

¯_(ツ)_/¯

ocean pond
torn pier
#

too

ocean pond
#

like someone says there are aliens but no one has discovered

radiant cosmos
#

in english undiscovered means not discovered by majority especially anime newbies like u. it means discovered by anime aficionados who know it's good enough to become popular before it becomes popular

torn pier
ocean pond
#

where

torn pier
#

idk

ocean pond
radiant cosmos
torn pier
#

just

radiant cosmos
#

okay i m watching frieren now 👋

ocean pond
#

lol

#

typical weeb, asked to suggest some anime, then went to watch the anime he was already planning

torn pier
#

xD

ocean pond
#

and who only talks by emotes 👎
emo-boi

radiant cosmos
#

it was suggested by an aficionado. not a wannabe newb like you

torn pier
ocean pond
#

ok a weeb suggested another weeb

willow narwhal
#

Alright kids, calm down

torn pier
#

and?

bright scroll
#

Brooooo

opal stump
#

im hiring anyone who can do extensions for my project (wage free)

bright scroll
#

I lost the credit

opal stump
#

i will dm link to a documentary thingy

#

its pastebin dw

fading frigate
#

You want people to work for you for free?

#

🤔

opal stump
#

but this idea is stupid

fading frigate
#

So why not just call it a collab

opal stump
#

no idea

#

lmao'

#

im js dumb

opal stump
glossy niche
ocean pond
#

I use spotify on lappy but never got a single add

plush sun
#

CSS question. I'm only curious if it's possible, but is there something in CSS that can repeat parts of a rule? Something that matches all these paths: div section h1 div section div section h1 div section div section div section h1 div section div section div section div section h1 // and so on with repeating "div section" ```
div > section > h1
div > section > div > section > h1
div > section > div > section > div > section > h1
div > section > div > section > div > section > div > section > h1
// and so on with repeating "div > section >"

#

Search engines just keep giving me irrelevant stuff

tardy rain
#

Or maybe not, just reread what you typed

plush sun
#

Yeah, I don't think it's nesting

tardy rain
#

Probably need some preprocessing

plush sun
#

Yeah

#

Lemme see if Less or Sass has it

#

I can't find anything about it

#

I blame enshittification

#

I've noticed that div section h1 is all that's needed for this scenario, but that's not what I'm talking about

#

Lemme edit my question

plush sun
solemn tulip
plush sun
#

You would still need to manually add :is(div > section >) rules per repetition

solemn tulip
#

if you can nest them things should work, no?

#

stuff like

:is(
  div > section > :is(
    foo,
    bar
  ),
  table
)
robust zephyr
#

I can't think of any reason to be that specific and it's also slower to do this

lapis trench
#
dip * 46
booster * 50
🐟 * 8```
torn pier
#

?

lunar shore
#

are game engines just abstractions?

#

abstractions for APIs like OpenGL and Vulkan and so on?

patent girder
#

I think it's more than that

tardy rain
#

Everything's an abstraction of differences in voltage

patent girder
#

But I'm not sure how you define an abstraction exactly

lunar shore
lunar shore
patent girder
#

I don't know enough about game engines but there's a lot of stuff they do to make your life easier

lunar shore
lunar shore
patent girder
#

Like ultimately you can say "this is all just an abstraction to draw some stuff on the screen with OPenGL" but idk

lunar shore
#

yeahhh

#

it's all just so complicated lol

graceful basin
plush sun
#

I'm looking for a way to repeat parts of a rule, not pick any of two or more selectors

solemn tulip
# plush sun I think you misunderstood my question

huh, I assumed you meant the ability to extract a common prefix

div > section > :is (
  h1,
  div > section > h1,
  div > section > div > section > div > section > h1,
  div > section > div > section > div > section > div > section > h1
)
```the ability to "repeat this one or more times" seems like an unlikely thing to exist as a selector
plush sun
#

I kinda think so too

solemn tulip
#

is div > section > h1 not a specific enough rule?

#

it would match all of these cases, wouldn't it?

plush sun
#

It might be enough, but I thought I edited my initial post out of that

solemn tulip
#

so afaict your whole list of rules
(assuming you meant to , them together)
ends up kinda just collapsing to div > section > h1

#

not exactly equivalent because of specificity stuff, but basically the same

plush sun
#

That's true

#

Lemme find the code that made me ask the question

#

Actually, nevermind my question

solemn tulip
#

having different styles for h1 in the same document seems like an odd decision 🥴

plush sun
#

The code that made me ask my question has different properties for each repetition, making my attempt to find a single selector impossible

robust zephyr
#

Why do you think you need or want such a specific selector?

#

Are you aware that if you change the layout of the HTML at all this will break?

#

> means direct descendent

plush sun
plush sun
robust zephyr
#

Well that's a silly assumption if you ask me!

#

If you don't want to repeat code then use less specific selectors

#

Like, why not just make a .section-header class?

solemn tulip
#

(realistically, just a rule for h1 and similar)

robust zephyr
#

Yeah, that's totally an option too!

#

I've been at jobs where nested more than two levels wasn't even allowed

plush sun
robust zephyr
#

Because your headers are likely to be all the same

#

Just different sizes

#

Have you ever looked at how something like Bootstrap works?

plush sun
#

I have not, in fact

#

I was under the impression that Bootstrap is outdated

solemn tulip
robust zephyr
#

I think it's a matter of preference, but it's totally still usable

#

Tailwind is another popular option

solemn tulip
plush sun
solemn tulip
robust zephyr
#

I would recommend choosing a framework and letting it do this kind of stuff for you, so you can have a good looking site without defining every little style like this

plush sun
#

That's fair

robust zephyr
lament cairn
rough sapphire
lament cairn
#

no

#

snow leopard
from the many snow leopard image s i have saved

rough sapphire
#

im a cat person though

spare oriole
#

Eating chiles in Mexico wasn’t such a good idea

rose hare
#

TIL in c and cpp, whether char is signed or not depends on implementation

#

and got -15 on a test because of this dangit

acoustic moss
#

what the fuck

#

"please give me a negative q character" - statements dreamed up by the utterly deranged

solemn tulip
#

ascii ought to be enough for anyone

rose hare
#

and I thought chars stored 0-255

#

and the question was asking what this outputs

char d = 173;
printf("%d", d);
#

(the correct answer is the negative one)

sharp jasper
#

Unless there was more to the question, the only correct answer is "it is implementation defined"

solemn tulip
#

there is also a good case to be made for not using char for numbers at all

#

i.e. use uint8_t

#

in C++ there is also std::byte for the case of "this is just bytes of data, I'm not treating these numerically"

young shoal
#

unsigned numbers bad in general

solemn tulip
young shoal
#

yeah

#

i think it's 1) treat data as bytes and 2) you actually want the wrapping arithmetic

graceful basin
#

if it is signed, it is actually UB to do this

#

signed overflows are undefined behaviour

#

did you happen upon a bad C course

rose hare
solemn tulip
#

why is this in a ds course? 🥴

young shoal
#

data structures but it's actually just primitive data types 🥴

rose hare
#

talked about data types (how the same bits can represent different things depending on the type it is)
which lead to how to represent (negative) integers

rose hare
young shoal
#

did you learn about floats

#

that is pretty useful

rose hare
# young shoal did you learn about floats

if you mean ieee754, not really, we skimmed through it
how to neg integers -> how to turn decimal(floats) into binary -> recursion(???) -> arrays(now)
now that I look at it for the 2nd time, why are all these things in the ds course

young shoal
#

rip

#

floats are based

rose hare
#

prof briefly mentioned that it's like scientific notation then moved on to the next topic

young shoal
#

that is indeed true

rose hare
#

iirc 1 bit for sign, 8 bit for exp, the rest for the number

#

f32

young shoal
#

something like that

glass gorge
#

Oh. boi... Today has been a real blocked / Slack arguments day. Can i just please write some code?

graceful basin
#

we did this in assembly

#

which is also about the only language where a signed overflow doesn't indicate a bug in your code

rose hare
#

our assembly class is like next year or something, so the timing is a bit awkward

solemn tulip
patent girder
#

What does **sign mean? To the power of the sign? I don't get it

acoustic moss
#

if sign is 0 its (-1)**0 = 1

#

if its 1, its (-1)**1 = -1

patent girder
#

oooh I see

solemn tulip
lament cairn
lament cairn
grave cove
vale raven
prime lagoon
solemn tulip
#

and poop emojis

prime lagoon
#

oh yeah, i didn't every chars. just a short bit over 100000 chars

patent girder
#

Monty Python mentioned

carmine apex
lament cairn
#

Android malware is boring
most of it is either really simple and obvious phishing or apps that hide from google play's crappy automatic checks

lament cairn
glossy niche
#

horse posting hours

mild abyss
#

🥴

thick ore
#

oh hey

#

i havent seen u in a while

torn pier
lament cairn
#

mow!

lament cairn
glossy niche
#

do you guys know any apps that let you search the contents of images like in Google photos or Samsung or ios gallery?

I want something I can install on my win 11 pc or maybe an android phone that doesn't ship with it

uneven pine
#

I only know of one I heard of but it's MacOS only

#

And thus I don't even remember the name

harsh tundra
#

!rule ad <@&831776746206265384>

royal lakeBOT
#

6. Do not post unapproved advertising.

granite tree
#

Hi, we don't allow self promotion or unapproved ads. Appreciate your goals, but please dm Modmail first for approval

lament cairn
alpine tusk
#

yum

patent girder
foggy jungle
lament cairn
grave cove
#

have you considered making a site for all these pics

tardy rain
#

One already exists

grave cove
#

source?

lament cairn
tardy rain
lament cairn
tardy rain
#

Do you main mordekaiser

#

Huehuehue

mint matrix
#

Some silly Billy in an Indian call center forgot their f strings

harsh tundra
#

"of these 50 states" as if there were any other states

spare oriole
#

there's a few countries that consider the US has more

harsh tundra
#

Like my banner on discord

#

And my lockscreen is also a photo from r/foxes

solemn tulip
#

but on the other hand, fox

harsh tundra
# solemn tulip the contrast with the text is bad 😔

I could've edited the photo to have darker top, but it's just date and charging info so 🤷 first digit of 24h time is easy to discern
and it's not like in 12h clock where there's just 2h between 11am and 1pm, so I feel the difference (the closest same second digit in 24h clock is 4h, it's hard to miss it, lol)

modern swift
brittle void
thick ore
#

threads is filled with millenials and gen x's that all strangely glaze apple

brittle void
#

that number looks legit

hybrid root
glossy niche
#

chrome is a pile of shit, it keeps corrupting my extensions for some reason

#

happens so often

#

and everytime it happens, all my data is lost

modern swift
#

||jk I use brave||

glossy niche
#

chrome is the best PR campaign for firefox

modern swift
#

but I use chrome for logging onto some other accounts that I dont use often

#

and it just works, never really had problems

glossy niche
#

sometimes a product ticks me off so much it makes me wanna grab the dev and run their ass on a cheese grater like in spongebob and this is such a case

modern swift
#

im guessing its something to do with your extensions

glossy niche
#

extensions that had this happens:

  • ublock
  • raindrops
  • web activity time tracker
  • others

all of them open source except for rain drops, and it happens often on all of these

modern swift
#

I use ublock origin + grammarly + yt unhook

#

works pretty great

modern swift
glossy niche
#

hmmmmm

#

never heard of unhook

modern swift
#

to see which one causes it exactly

glossy niche
#

every week, 1 of those gets corrupted and requires a re install

#

i dont see why they would affect one another

modern swift
#

interesting, which version is it

glossy niche
#

i dont even have them on simultanously because i use different accounts

glossy niche
modern swift
#

I use 129.0.6668.70

glossy niche
#

and this has been happening for months

#

on different accounts

left willow
#

The thought occurred. While we laugh. Consider the interview question:
You are given an array of 7 lines. How many of them can be consider perpendicular to each other?

#

What would be your response?

sharp jasper
#

"What is a line, in this context?"

tardy rain
#

Is it typical to work on silly IQ puzzles on the job? I'd like to end the interview right here. Thank you for your time.

#

Dont have the time or the energy for riddles in an interview process

sharp jasper
tardy rain
#

I'll take random leetcode over this nonsense any day

#

At least leetcode is somewhat applicable

sharp jasper
#

My mind goes straight to a project I worked on that involved lines in arbitrary dimensional space so maybe I interpret the question more fairly

viscid gate
lament cairn
royal osprey
#

How is everyone?