#ot1-perplexing-regexing
1 messages ยท Page 123 of 1
id never imagine that a truck could move like that
welp now i think i have a future
i have nothing that satisfies me yet but i plan to adopt a kid if i get enough income to get them to a decent school
and maybe they can get rich
that would be pretty satisfing tbh
Why adopt?
Or there are much of kids that need home?
Then understandable
so i can get atleast 1 kid out of misery
You don't believe in natural way?
that would balance things
?
what sorta natural way?
misery of them.. uh, nuh, language issues
what
you mean that god will help them out or something?
by natural way you mean marriage and what not?

^ got the answer
i honestly have no idea of how orphan kids are treated here
I initially thought he meant that he is not going to get a kid in any way, but only to adopt...
id want to have a kid of my own, but since i dont really have an atraction to anything i belive that isnt possible
can relate in a way
If you still in school, i think you are relatively young, some feelings will be in future
and staying with someone just because i want kids seems pretty bad
almost leaving tho
by december im done
both true also no 
Will say same at 50'
some people are just ace, and some people have mental conditions that make it hard to tell what you feel
?
literally me
i prob have that menatl condition
some people really just have no attraction to anything
and some other people have issues that make it hard to understand how they feel about things
well yea u r in brazil
Most humans need companionship and relationships
ima gonna take you to brazil
didnt really have that while growing up
even among brazilians they say my life is pretty fcked up
doesn't mean you don't need
Nuh, I'm staying at haifa
then i will bring indonesia to you
i think im starting to get hungry
i normally only know when its hurting my stomach
but now i can feel its kinda uncomfortable
im gonna make a omelet
what does this cat means?
Have a nice meal
cat
ty

๐ฑ
So much food hhh
Cats must eat snakes, scorpions and mice.
they dont eat them, they just kill them
im jealous

Half of job
just hit it with a broom
Vipera berus, also known as the common European adder and the common European viper, is a species of venomous snake in the family Viperidae. The species is extremely widespread and can be found throughout much of Europe, and as far as East Asia. There are three recognised subspecies.
Known by a host of common names including common adder and com...
they call them black vipers where i live
All of us ig.. feeding cats bruh.. treating okay, but feeding??
That cat food monthly cost is about three times of my food cost
also wtf
first time seeing an actual duck duck go user lol
What are you using?
google 
it sucks balls
Firefox/duckduckgo
search operators seem to do jack shit these days
idont remember them being this useless before
Internet nowadays
What about vi-search? Or how its name..
im thinking of repeating food in school
since its free
just pray for them to not recognize me
like, eating a double meal?
Are boiled eggs more filling than fried?
There is
Less water
More heat
prob not since less vertical volume
Tomorrow i will try to find a job
On fry it splits more
the bus costs R$5,10 everytime you ride it
I mean its proteins or smth
so if i go to schooll to work and from work to home its R$10,20 total
$1 = R$5,59 now
Minimal wage, in internet they say 5.8k ils โ 1.5k$
theres rats in my food
Additional protein
i cant afford to get diseases tho
idk how many vaccines i took as a baby
so i dont know how immune i am
Better be safe ye
u live in a country with welfare tho
how much welfare does brazil have? 
I live in best country what do you mean
you sure do
I just don't have any job cause im too lazy, but still i have enough food and comfort
what is a welfare
Whats an ils
international license for shitting
Even with bank account says "you have 2.6 ils" last year
You need a loicense for that?
cant hit the toilet without it
Integrated library system
Idk, it's called like that.. Nis is more understandable
thats good to hear ig
like
oh 
Your poor
yea i get welfare
from schoo
i get R$200 a month
for studying
and at the end of the year i get R$1000
Your having starving pains
It means you are poor enough to get 3k $ per month with no questions
they give a lot of welfares because its cheaper to give the actuall salary
it would if my parent wasnt abusive and negletive
ur
theres a thing called "Bolsa familia" (Literall translation: family bag) that gives money to poor families based on a few things like number of kids etc
i discovered that i was receiving it just this year after my mother was forced to tell the truth
she was getting this only for herself and buying cigarettes and alcohool with it
and still is
but the gov dont give a shit
You don't drink?
she doesnt work a bit and receives like 2.5k
im still in school
brazilian people usually get all their liquids from their prey
they only need to eat
like a sand cat
and im not planning to drink
never
since i kinda experienced what drunk people have to give
and got the police called like 3 times
yeah but nothing ever happens and its the same thing every day
cant do nothing bout it
Sand cat does not sweat
when a divorce happens, the man is also forced to pay a certain monthly amount to the woman there?
Only naked monkeys sweat, and drink as hell much cause of that
Idk
Maybe, never researched country law on that, in my religion though there is such thing, "year worth of living for first time divorced"
with additional notes*
if i were a genious would i manage to live and get a decent life?
I can't see straight dependency in intelligence to wealth
Even decency
I always think, everyone has around same level of struggle
In one or another way, through the life
im probably a genius, but i dont tust brazilian IQ tests
Genius must be realised anyway
If can spot that rat can lead to deseas, your iq is 50+ atleast
95+ if you are ok with your life
I don't think inteligence is a number at all
But like.. that's only in some cases true, in most cases that very inaccurate
Everything is a numberthing
it is at least an immutable string
Why immutable?
mutable strings typically store a bit more data for things like resizing
slightly more complex data structure
Numberish aint number, you can't describe someone's personality with numbers
- they dont do interning (usually)
Even though you could plug quadrillions of weights on a ML model and simulate someone
Bruh, any character.ai setting
-50 charisma
LLMs can emulate the personalities of linkedin posters quite well
id say W for linear algebra
LLM is not linear algebra
Is emulation, not replication, you can't really describe someone with just that
It's few tier more complex
It's only your opinion
What if you are emulating your feeling huh?
Well, my point being inteligence is more similar to personality than to a number
my feelings run in the BEAM VM
Probably I am though
What about many numbers
Training neural network to make feeling seems easier than to make intellegence
Any number of numbers can be combined to one number
Not really
shhhhhhhhhhhhhhhhh the category theorists might hear you
You cant compress a 2D vector into a real without losing information, can trustfully convert It back
Has Someone solved three body problem?
Hi
Huh
How much bits per dimension?
You're talking on infinite precision
Nothing has infinite precision except God Himself
Obviously for a computer is the same thing, you point to the VRAM and mount and ext4 filesystem and It should theorically work
And yoink, sorry
np
im assuming this goes off the assumption that main memory in a computer is merely one big number?
Theorical math
e.g. my PC has one big 16gb number for memory
Yeah
16gb uint is fun
Python can handle that
but yeah we do have to lose theoriticaly infinite amounts of info to compress a physical thing into 16gb of data
Don't forget your Drive, your VRAM and your CPUs cache lines
1 more TB
๐
around infinity
Infinity is not a number. So, you cannot add or subtract it.
NVM
yea i smell BS
Hot take, which comes first, omega or infinity?
IQ ESTIMADO
It's cause we are physicists, we simplify
what was omega again
A greek letter
"your estimated IQ is above 140
An ordinal number defined as 'the last number'
Omega is smallest of infinities iirc
Oh
My last years on school also got blurred
Again, IQ tests don't actually tell you anything, most of your inteligence comes from the way you think and from the way you see things
IQ tests miss out on a lot of info
There is a right opinion
And your opinion is mostly wrong
don't IQ tests attempt to measure the way you think and how you see things
Hmm, nuh they measure your stress resistance
I would like to never hear about The Bell Curve ever again.
Contact:
https://twitter.com/shaun_vids
https://www.patreon.com/shaunfromyoutube
Section time codes:
6:15 Intelligence
17:18 The Bell Curve
30:03 General Intelligence
57:21 IQ Tests
1:41:15 IQ vs Environment
2:02:34 Politics
Content warning: discussion of racism, ableism, misogyny,...
who wants a
2:40 movie
for the sleepover
Wtf is sleepover
you sleep over at someone elses house
like u stay at grandmas house or something
I stay at my parents house
as a sort of party
IQ are mostly pattern recognition tests, as far as my expierence reaches, but, I know people with crazy IQs that are dumbasses because they don't use their little inteligence and see things in a way that they don't question things and Focus on making the least amount of effort to make them think that they understood something even if they didnt
Also know people way smarter than me with probably lower IQs
yea if i was smart i would have find a way to rest in peace back then
IQ tests are not only the progressive matrices. usually online not real tests will only have one test
if you have a real test like the wisc-v or something, it's multiple subtests
never taken an IQ test before, i feel like itll only bring me harm
Focus is more important than intelegence
I had one of those but I was too Young to remember, I just remember describing shapes and problems
Or im just telling that from side of "neighbours grass is greener"
both are important :P
+100 int +0 focus is hell of a live
The Wechsler Intelligence Scale for Children (WISC) is an individually administered intelligence test for children between the ages of 6 and 16. The Fifth Edition (WISC-V; Wechsler, 2014) is the most recent version.
The WISC-V takes 45 to 65 minutes to administer. It generates a Full Scale IQ (formerly known as an intelligence quotient or IQ sco...
Agreed
both are important :P
i dont like fighting over what is more important than what so i prefer to frame at follows:
both are terms in the same equation
Like you understand that your shit but can do nothing about that
so both are equally important and missing either will mess you up
Atleast+1 of focus needed
Focus is multiplicator
haven't you heard work smarter not harder :P
work
Not only that tbh
When you're smart enough you start to not only know you're shit, but also know literally every aspect of yourself
Hell, for me is defined as knowing why you feel bad
And harder is about str, not focus
yeah, both are important
It's like solving 2+2 but getting bored on first 2
cant solve 2+2 if stupid
cant solve 2+2 if too out of focus
sounds like they are in the same term and in the same equation
Not really, not everything is about solving the problem
Okay..
But
You can solve if stupid
2+2=2
Ez
"We asked for a square MF you are fired"
post modernism time
Wisdom +0 be like
Focus makes your inteligence work better, or worse, for good computing you need Focus, and for fast, superficial thinking you don't need it
For fast thinking you need focus to train fast thinking
me seeing an undocumented file where all the variables are named "var1, var2, var3..."
And still ig it requires some focus to get going?
Fast thinking aint superficial thinking
Js variables after "compilation" are cool af too..
When you go to inspect->sources-> *.js
Superficial thinking is like meeting someone, you don't think about It, yet, your brain has understood their personality traits
That's so superficial people don't notice
And what to do about it?
Okay yku know him
But you are too out of focus so you can't even notice them
Nuh im going too hard
Okay both are important
Well if you're fucking paralized or half braindead sure
I bet that had something to do with autism
I think autism makes you think more profoundly, and therefore, more slowly, consciously sometimes and only one thing at a time
A thing is bothering me for last two hours
Wha
What is it?
I would, why not?
It's irl personal thing
if you don't want people to ask about it, why are you bringing it up ๐ฟ
So it's private, right
Cause im frrr mad
@young shoal
You know there are lots of things you can't tell about but they are very huge chunk of your outer personality??
Can I asume your gender?
i have no idea what you mean by that
Like Subaru from rezero with his return by death
never watched that
Fr
You made me think It was something we were doing
Nuh you ok
You aint dying for saying It if you brought It up
But if you dont want to tell us, then don't
Thanks
the voices
hi defender
hiiii
Microsoft teams emote ๐คฎ
dumbass app decided to randomly stop working last meeting I had
Also gm Microsoft โข๏ธ Windows Defender
um actually it's a Microsoftยฉ๏ธ Fluent UIโข๏ธ Emoji
GM
what has microsoft done to you ๐ญ
Skibidi Emoji
i hate this bullshit man
whenever anyone does anything on any other social media, credit goes to the person who did it
but when 4chan does anything, credit goes to the collective
because anonymity

hacker known as 4chan moment
i hate this bullshit man
have you tried to stop watching youtube shorts
real
well i mean if it was a group effort (which it likely is), you don't just attribute it to one person only
dude, im on the frontpage
have you tried opening yt before
oh lmfao
no, actually, that's what invidious is for ๐
this emote
also you can probably just adblock the entire shorts section out of existence.
imagine buying youtube premium
hey you like computer stuff right
no i dont
that hacker 4chan
you must like the hacker vs military edits
โฆ what do you do here then?
does the number of chins have a well defined formula?
y=mx+b
get mad at computers
i learned latex because i had to write math notes in obsidian
Spelling entire words based
dont thinkso
obsidan stacked tabs is such a goated feature
it took me a while to appreciate it
i thought it was just a gimick but then i learned it supports horizontal scrolling
It reminds me of my brothers Roblox days
i cant find anything about obby
โNEW parkour obbyโ
( i meant obsidian )
OH
sorry i dont like big words
when u said "obsidian based" i thought it meant "obby is based on obsidian"
sounded like a fork ngl
See you soon!
#shorts
I got merch!
https://www.hoodieguy.shop
Follow these if ya want!
fb: https://www.facebook.com/DanielThrasherOfficial
twitch: https://www.twitch.tv/thrasherplus
insta: danielthrasher
twitta: thrasherdan
second channel: @thrasherplus
the otn ๐
@foggy jungle dis u?
(if you couldnt tell, i just started reading death note
Honestly I look like that right now, wrapping up my B.S. degree and grinding hard for my tests.
u and that are alrernate parallel mulitiverse universes apart
ur pfp does not look like that

spank
in js i assume?
i keep seeing it a lot with my peeps too, they cant use reduce to save their lives
same difference
no idea actually, whenever i see it i feel like commenting on the prs but also its not really that big a deal
feels like a nitpick
i wish i could just tell em to get good
it's not a nitpick. forEach consumes the stream
Hello
positively pythonic
wait im gen a and still don't understand. wtf does skibidi toilet mean? i mean ik the reference but what is the point ??
I'm gen z and i have no idea what that means
btw if you're gen alpha what are you doing here ๐
person finds out the oldest gen alphas are already 13+ years old
14 year olds are gen a or z?
they're among us
hows clg treating you
according to the creator of the term "gen alpha" it describes people born from 2010 to 2024/'25
isn't gen z 1997-2012
ya there's an overlap
W
college is good, but i do not wish to discuss it here
go then
doit
cant have your brother turning out like you
fr
what could be worse
a linux shill
yes
exactly
a linux shill is worse
what will I do when my brother starts talking to me about "hyper land" or "way land"
or how "X Windowing System 11" is "not sigma"
i just imagine "hyper land" as some place where you can go extremely fast
exempli gratia germany's autobahn
(accurate)
๐ I just met a proper linux shill a week back so I agree
man uses hotmail coz he doesn't want google ๐
were you the guy engliz was talking about
no
honestly i really don't give a damn what i use if it works
LMAO
did you also use hotmail thinking it was an escape from corporate land
if so that would imply that you also have a microsoft account
me and my homies used hotmail because we misheard it as hot male ๐ /j
this is just about how microsoft seems to have everything nowaday nywyw
hotmail - hot male
im aware of what you said
beddo
looks like it was made in paint 3d lol
Yea I think if the bed frame was brown it'd be more recognizable as a bed
omori colored bed
Looks somewhat like a random assortment of shapes
anything is a random assortment of shapes
Take control over what occupies your mind with Ground News. Go to https://ground.news/nutshell to get 40% off unlimited access
to a news platform that helps you break free from manipulative algorithms and discover news you might be missing.
And to make the most of your new optimistic life, check out our brand new Curiosity Guide: https://shop...
Yes I do
i have a free (no price) will, but maybe not a will that can be done
dosen't matter
even if we don't, but it has the illusion of that we do...then whats the point?
if it feels like free will, and works like free will, it's free will
Now give an A.I free will and see what happens
Just want to ask does anyone know any good alternatives to the nand to tetris book? Looking for something similar but a tad bit shorter and bit more beginner friendly to systems engineering
hey computer do you want to kill us all
!e
import random
print(random.choice([True, False]))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
True
yikes
I don't like that
!e
print([True, False][hash(bytes([__import__('random').randint(0, 255)])) % 2])
:white_check_mark: Your 3.12 eval job has completed with return code 0.
True
better
This is a million US dollars visualized and its not even the full stack
now why in the world would someone wanna stack a million US dollars
This is the United States of America we do anything
my friend gave me a dare

this is 1,000,000 US dollars visualized
every white pixel is a dollar bill
it's pretty crazy isnt it
for reference this is how much money i have
I see less than a million white pixels
nope, that is exactly one million
1000x1000 image
me walking into interrrp's house and resizing all of the money images to 64x64
as long as I don't open the image it's less than 1000x1000
do you want a million dollars or not
expand the image man
hello i am microsoft
i need million dollar for making windows 12
enable telemetry
please
we do not need a windows 12
yes, actually, we need a Microsoftยฉ๏ธ Windowsโข๏ธ 12 24H2
a million dollars for two keypresses?
no its proof that im microsoft
no, visualised million dollars*
gaslighted himself to think he actually has it
can't help anymore
this has "you are now a proud owner of this, picture of motorcar" vibes
If my video made you laugh, consider supporting me!
https://www.patreon.com/adriangraycomedy
https://ko-fi.com/adriangraycomedy
#comedy #satire #parody
https://mkorostoff.github.io/1-pixel-wealth/ posting this for no reason
i like posting propaganda
then pay in credit bitch
Currently watching the pyramid. This dumbass saw her father get impaled by a monster and said "I have to go back for him" lmao
!e ```py
boasd = True
print(True if boased == True else False)
!e py boasd = True print(True if boasd == True else False)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
True
boasd in [True, True == True, True is True == True is True and True or True, [True, True, True][True]]
@high haven, 

I'm funny
its true
the otn never lies
hope you been good moyen
who the fuck is rex, and who cares if he's funny or not?

not yet but about to
theres this summer drink at one of my favorite cafes
ube iced latte
gotta get it while its still here
a nobody
real

Kinda late but this movie was pretty dumb lol
The characters shared a single braincell
And the monster looked wierd
hey rex!
I've remapped my pinkie key to be underscore normally, and colon when shifted
that sht sucks
Put some respect on his name, it means king because he is ๐๐
who is rex
yeah, never heard of his name since im here
anybody gonna explain me his history?
he's a guy
he runs
he enjoys coffee
he does data science
why would you need to science data
you use science to get data
you shouldn't need to scence the data
if you're having to science your data that just means you didn't science hard enough to get the data in the first place
just science harder next time
make me
sup sup
we have someone named rex?
Never heard of โem
howโs it going
i mysteriously disappeared from this server for a while
work and all
@solemn tulip, I'm, again, trying out jj for routine work
how do you use pre-commit with it, if at all?
I did notice there's a relevant jj fix command, that wasn't there before
iirc that is still a thing under discussion
also found a fun quote in the discord
pre-commit hooks are evil, pre-publish hooks are fine
and yeah, that's quite new
the before and after flags for rebasing and whatnot are very nice, if you haven't seen those already
"take this revision and insert it after/before these commits"
frfr
moving between different "branches" is also pretty seamless
just jj edit -r abc
without having to commit, that is
you can drop the -r from that
also, I can recommend trying the new+squash flow rather than the edit flow
makes it trivial to abandon some attempted change
but they aren't, per their own admission: #ot2-never-nesterโs-nightmare message
There are three off-topic channels:
The channel names change every night at midnight UTC and are often fun meta references to jokes or conversations that happened on the server.
See our off-topic etiquette page for more guidance on how the channels should be used.
yeah it was a waste of time to watch ngl
oh yeah, I was jumping around a bit between unrelated changes, so edit was the way
Only watched it because I thought it was tomb raider (I thought a scene from tomb raider I saw in a youtube clip was in the pyramid)
went halfway through then realized I was watching the wrong movie because the characters were dumb af
Like bro, you see your rover get munched tf up and all you can think about are costs lol
๐งโ๐ณ
yo rem, can i have some stew?
you're not rem
Huh. What is that, like a shrimp gumbo?
2024 27 aug
Is this still related to regex or something else?
instagram femboy moment
def _audit_changes(session: SessionType, client: Client) -> None:
"""Audit changes to the session."""
print(session.deleted) # noqa: T201
print(session.new) # noqa: T201
print(session.dirty) # noqa: T201
for instance in session.dirty:
changed_attributes = {}
state = inspect(instance)
for attr in state.attrs:
if attr.history.has_changes():
changed_attributes[attr.key] = (attr.history.deleted[0], attr.history.added[0])
session.add(
AuditLog(
actor_id=client.id,
action=f"UPDATE {instance.__class__.__name__} {instance.id}",
detail=str(changed_attributes),
),
)
@thick osprey can I bug you about audit logging again?
I actually have an MVP (see above) that I'm fairly happy with.
I had "action" and "detail" as strings.
I just read up on some SQLAlchemy black magic, and I was able to get a str(dict(changes)) of the changes into "detail", which I will change into a JSONB column at some point.
That part I'm pretty sold on, but the "action" I'm not so sure about...
Right now I have f"UPDATE {instance.__class__.__name__} {instance.id}", which...
My main concern is figuring out how to tie the audit record to the actual record.
In the days of yesteryear, I used to have a string column for the class name and a column for the ID, and I would filter based on class name in code.
I actually mostly like this idea.
But I keep getting told it's a bad idea to not have the constraints set at the database level.
On the other complete other end of the spectrum, I think you were the one that told me that I should have an optional foreign key column in the table for each table being audited.
I'm just being whiny, but that sounds like "so much effort"...
the idiot
Not sure I follow completely on what you're trying to tie a row to. 
is this for tracking changes to things ๐ค. one row is one change to one or more rows?
I just read up on some SQLAlchemy black magic, and I was able to get a str(dict(changes)) of the changes into "detail", which I will change into a JSONB column at some point.
we tried something similar on mainframe: we usesqla.something.TypeDecoratorto translate a pydantic model to a postgres JSONB
there's also UserDefinedType
My main concern is figuring out how to tie the audit record to the actual record.
wait, are you thinking of introducing an audit row for each row that is added to some table? i just comprehended this
Say I have orders, which have items and are placed by a customer
So I'd have a customers table, an orders table, and an items table
I want to audit CRUD actions to each of them
So previously I had
CREATE TABLE audit_logs (
id UUID,
target_class TEXT,
target_id UUID,
action TEXT,
changes JSONB,
);
So when a customer signed up I'd do
INSERT INTO customers (name) VALUES ("Preocts");
INSERT INTO audit_logs (...) VALUES ("customers", [idgoeshere], "CREATE", '{}'::JSONB)
And then when you place an order I'd
INSERT INTO orders (placed) VALUES (current_date);
INSERT INTO audit_logs (...) VALUES ("orders", [idgoeshere], "CREATE", '{}'::JSONB)
I'm just not super happy with target_class being a TEXT.
I keep getting told "
, don't use strings as replacements for relations"
Though.... it is actually working just fine for me, so.... maybe I just
and keep doing it...
this is postgres, right?
yea
Though SQLA
I'm writing raw SQL for my examples, but I'm using my ORM in prod
Do you even have a relation to anything here? It's just a log saying that some change was made to some class (table?).
no, yes
What do you intend to do with an audit record?
sql blame
yeah. why do you need this? there's pgAudit

postgres also has built-in logging
The feature request from business is a (for example) "view order history" button on an order page that shows them all the changes made to that order
ah, that's a lot more specific. what i've implemented in the past is a sort of linked list of changes
table looks something like
create table log (
id int primary key,
up int references log(id),
down int references log(id),
msg text
);
So you just need to be able to show a history. All you need is a primary key from the target table to find all the audits in a particular order? Is that target_id?
Yes, but....
I also have audits for customers and audits for items and audits for...
That's the target_class
Why? Are there different uses that you haven't mentioned or is that scope creep?
Well -- the idea is that there would be a "view history" button on every type of entity, not just orders
it feels a bit odd to group all kinds of audits in one table
but maybe it's not that weird if they all have the same data 
Then it's the same situation right? You just need a way to say "What's the history on this record?" That table would have a primary key for a row, right?
Well yeah but I...
I have no garuntee that the primary keys don't overlap
What I'm trying to piece together is what the primary ask of the business is (this should be the only feature) and how the audit table helps you reach it.
I don't see any dates or ordering for these audit rows. Left out for brevity in the example?
Yea
the uuids?
There's a mixin applied to all tables:
class TimestampsMixin:
"""Add created, updated, and deleted timestamps to a model."""
created: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
server_default=func.now(),
)
"""The date and time the object was created"""
updated: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
server_default=func.now(),
onupdate=func.now(),
)
"""The date and time the object was last updated"""
deleted: Mapped[datetime | None] = mapped_column(
DateTime(timezone=True),
nullable=True,
)
"""The date and time the object was deleted (NULL if not deleted)"""
Ah. Then fenix's point comes to light. You must have a constraint otherwise how will you look anything up? If it's one table the primary index could be the other table's primary key and the table's name (classes name? orm speak is odd to me)
with Session() as session:
order = Order(...)
session.add(order)
session.commit()
order_audit_history = session.scalars(
select(AuditLog)
.where(AuditLog.target_class == order.__class__.__name__)
.where(AuditLog.target_id == order.id)
).all()
It's not pretty
but it does run
would an order create other stuff than order target_class?
I don't understand the question
it feels odd to even filter by target_class if the key is for all intents and purposes unique
Creating an order would create a AuditLog(target_class='Order', ...)
Each item added to the order would create a AuditLog(target_class='OrderLineItem', ...)
unless the same id can have different type of audit entries
It's entirely possible
Yes, I'm using completely random UUIDs, so the chance is supposedly ridiculously small
But there's no actual guarantee that they'll be unique across many tables
birthday paradox :sip:
ridiculously small is an understatement
err, wrong message reply
Understood
But it took me five minutes to add this column and entirely remove the possibility
Holy hell my work phone is exploding
WTF is on fire
to grab some stuff I've mentioned before:
to have a 10^-16% chance of collision you need to generate 2.6ร10^10 uuids
for 50% chance of a collision 2.2ร10^19
Oh
It took the night shift five messages and a picture of their monitor to tell me that they forgot the link to a SaaS app
So what you're saying is it's not 0?
if you care about absolutely guaranteed unique keys, why are you even using uuids?
you would use stuff whose entire purpose is handing out unique ids
or you just use uuids with the knowledge that even with the birthday paradox the chance of a collision is truly ridiculously tiny
Or...
Now hear me out
I just stick the class name in the front and don't worry about it
actually, why even use uuids?
you can just use some incrementing number
why even risk the collision within one table?
... PG will make sure the PKs are unique, won't it?
If it is generating them, I would assume it would reroll a constraint violation for an insert.
Me too
It's been a day or two since we had databases that just said "lul, no more keys, insert failed."
Though... somehow... I work with people who still make tables where that is possible. :sigh:
did you know that postgres needs to vacuum approximately every 2 billion transactions
Does that.... matter?
kinda
I'm going to figure out how to make it do that tomorrow just for you
it already does it if you don't touch it
the reason is that it uses a 32 bit int for transaction IDs. for multiversion concurrency control, postgres needs to know if a transaction is older than another. to do that it compares the transaction id. greater tid = younger. but you don't want to just run out of tids. so it wraps them around and uses modular arithmetic
So.... what was the consensus?
when vacuuming, it will go through and clean up by marking transactions as "frozen", meaning the tids can be used again
if you don't touch the config, it will work fine
You guys want me to make an audit table per entity table?
what do you waaant
use a key (tableoid, row oid)
Is this going to turn into the notes thing again?
CREATE TABLE audit_logs (
id UUID,
order_id REFERENCES orders(order_id) NULL,
customer_id REFERENCES customers(customer_id) NULL,
):
tablead, a tableoid in the table of endotables
get out
the what thing? (also sql can't have trailing commas) (also you made a sad face ๐ฆ )
Sounds like you have something that works. Did I miss something there?
The other thing I need to have on multiple tables
I was previously recommended to create a table with a foreign key to each possible entity
that sounds horrible
I keep getting told it's a "bad idea" โข๏ธ so I feel like I should be doing something.... *waves hands* "better"
By whom? Someone on your team writing the solution?
that's what I said
Nah, I have no team
This server, this chat right now, we're talking about how it's "bad" to not have constraints
i'm honestly not a fan of putting this as a database table. technically you could make a foreign key to some postgres system tables :sip:. like pg_tables.tablename
Where else do you put your data?
In HTML files in the frontend?
you should just keep this as logs, and process with elasticsearch or something
Ugh. I'm working on a library at work where the devs chose that everything gets indented to ridiculous levels because "readability" and "no sad faces"??
def some_function_name_goes_here(param1: str, param2: str,
param3: str, param4: str):
...
Instead of the sane:
def some_function_name_goes_here(
param1: str,
param2: str,
param3: str,
param4: str,
):
You have constraints though, don't you? Can more than one audit row have the same target_class and target_id?
diffability is nice
It's painful. I cannot get them to even consider a formatter. "Just run the linter and fix it".
I'm just... so glad they have all the time in the world to fix trailing whitespaces manually. 
yeah that's why you write
select
col1
,col2
,col3
Yes, because that entity can be created, updated, updated again, updated yet again, and then deleted
But your point is correct -- those two fields together definitively define what entity this audit entry refers to
semi-related I'm guilty of writing
where
true
and ...
and ...
```when I work on queries
just comment it ๐ฉ
Congrats, that's a valid argument for not having a constraint. :)
constraints do have a cost, that is increased time to update as well as increased storage costs. but you do get added safety
if I comment out the first condition I need to remove an and
what's the thing you're testing with the true ๐ค
I just want the ability to comment out conditions without thinking when doing some data extraction
ah. it lets you comment out each one by one
yeah, first one isn't a special case anymore
I saw my old manager do it and realized it's kinda neat ๐ฅด
I deployed the alpha of the rewrite
Archived the newly legacy code
Business needs a feature I haven't rewritten yet now, a few months earlier than expected
I'm going to have a busy week 
eww no
skill issue
yoo
I wanted to ask, I need a vps that is not based in america. Preferebly cheap and very fast bandwith.
any good suggestions?
Huh not in America eh? Sounds kind of sus
And in that case I'm sure setting up a scam/abuse company is only a few google searches away
you are highly suspicious
no?
i can tell you why
im using an api for polymarket
and that api is banned in america
and for the api I need to be fast
so proxies are not an option
this is a vpn, i need a vps
If the api is blocked in the US then thats a sign you shouldnt be doing what youre trying to do
its not banned in europe
oops. Sorry, I misread the OP
i live in europe
i dont see your issue @tardy rain
look up polymarket its a crypto prediction market
its nothing illegal
Why does it matter if its banned in america then
because i need a vps
i want to run it on a server
that was my whole quesiton
vps can not be in america
because american ips are banned on polymarket
I've used swissmade for some stuff: https://swissmade.host/en/vps-switzerland
thank you :)
isnt swiss more expensive than an asian one tho?
no idea
I was just pointing you at something European that I've used and have been happy with.
yea i see, good share thanks
Digital ocean has servers in Europe, my friend had one with UK location
OVH is from France and mostly hosts there, I believe. OVH is fairly cheap but has bad support (like not informing clients about maintenance and related downtime...)
You have to pay for someone else's prediction? Or do you have to make a prediction for some sort of derivative contract?
its just like financial a market, so you have market makers that make predictions and say that they want to buy/sell for specific prices. Then you have market takers (gamblers) that buy against these prices
Lmao this is wild, betting on politics and other world news
its pretty awesome tbh
This is how betting should be, its purest form imho
i think its one of the most accurate forms of getting predictions
Not betting on horses and dogs and whether a guy fakes an injury in the 2nd half
because real money is involved
Comrade Kamala 3 times 
I have no comment on the gambling or predictions tbh. I was just trying to figure out why they don't operate in America
Gambling restrictions probably
They need shittons of licensing
People are betting on whether the bieber child is a boy or a girl ๐
Who's the maniac behind this site
Yea could be gambling regulation. When I heard predictions I thought it might be something about selling securities (promising a return on investment)
peter thiel funded this shit
one of the paypal devs
Wasn't he angel investor early on in ethereum
idk tbh
Gambling related global warming lets gooooooooo
This is beyond late stage capitalism
Based
He bet $1600 on nuclear explosion yes ๐
Pretty grim, are the cards there for him? Stay tuned
Must be a Russian oligarch betting for black swan events
That's what I mean by black swan event he got money to just throw at it
I think losing all of your money is normal for betting
Yea
you win $1000 one time and it keeps u going until u are broke
Ray lost all the liquor money?!?!?
fffffuck I need to grind!!
This is no time to relax
Do or don't and then you're dead
I'm up to my eyes in it
Need to push harder
Put pressure on myself until I evolve
@agile summit cant see any other option
are you reporting from a specific message or from a user profile?
I clicked on the profile then the 3 dot menu then Report User Profile
For underage it has to be from the message, it has different options
ยฏ_(ใ)_/ยฏ
Based discord devs
old man narc
welcome to Discord, we can't actually properly report on deleted messages
Get off my lawn kids
mar has all the age limits by country memorized in order to report at peak efficiency
Also edited messages
surely if you report an edited message the discord people should be able to see that
Apparently not
discord is so data hungry they must store every iteration of a message
Yeah they store it but don't let you manage a report
average Discord design
I once asked Joe about his old contacts at discord and he said old support team was fired and replaced by outsourced one, which works like a black box. No real way to contact them outside of report form on the website, which already requires message id.
Rem had problems reporting whole servers of malicious actors, we had proof with webhooks that dumped passwords etc into discord, discord would be able to track it by just looking into that server or what was sent through that webbook - but without the message id the report was deemed useless...
also there were cases where rem would have an alt account join a server with bad guys to gain access to individual messages for reporting purposes, then discord would ban rem's alt and none of the bad guys
rem catching strays all around
skill issue
I forget that I exist outside of my own sentience.
This still pisses me off.
can i remove my email linked to proton mail?
or sign up proton mail without having to use my mail?
I am no average cow
Yes
Is there a way to see all notes I have on every user in Discord without going the GDPR route?
self botting ig 
idk how you would get a list of users though unless you're just checking your friends list or a specific set of servers' users
yeah I don't think it is possible without requesting all of your data
did bro run out of notes
What use do notes even have
Birthday storage
No reminders though, so you have to remember to check that note on their birthday to remind yourself
Wouldnt it be easier if the birthday person says so in a chat
keeping track of alts
Yeah but it's considered "polite" if you already know
plus name changes, though that's less of a problem now
how so?
I can't even remember to close my mouth
pretty sure you can?
yeah there's an Edit button right next to your username in the user settings
- reason why I blocked someone or added them as a friend
- loves|hates specific things
- thing never to mention nearby them
if their username has nothing to do with their real life name? yes
isn't there an immutable one?
besides your user ID, I don't think so
pretty sure that was the whole thing where the made everyone pick a username
