#voice-chat-text-0
1 messages ยท Page 63 of 1
They actually had to change one of the ramen flavors to not be Oriental
Eh, keep me away from Socrates and everything will be good
I don't know
I don't think they are
Ginger is a root plant, yeah
HA
See you Bella
Hello
HA
Damn near
Yo Mustafa
@somber heath I'm going to eat raw ginger one day
And I will feel nothing
It's quite nice tbh
what has Ron Weasley ever done to you
Yessss

Hello
Good for cough, good for upset stomachs as well
๐
Hell yeah
One of my favorites !
Oh fun fact, red heads typically have worse oral hygiene issues.
Usually in the form of gingervitus
Fell right into it
Word for word
Oh god there was one ginger ale I had... It was unfiltered. And it still had the slight dry burn to it, but it was so creamy
It was amazing
And I cannot find it any more
You laughed, don't lie
I have a goal to find the driest ginger ale I can find
Like essentially like drinking sand
Oh candied ginger is dope
And again, good for the stomach
That's what she said
hello
Geeze, that's what she said to most of what you just said, Opal
to all
Yo
It's weird, I don't like ginger snaps
I think it's more the spices
Yeah like ginger bread men
Can't drive one handed?
The blessings of automatic
Steering assist isn't turning assist
Yep
It's got a knob on
Oh yeah
It's so you can be turned around looking back and still turning it into position
With more accuracy than you might be able to get with no knob and one hand
Eh
Nothing worth relaying
Well
And it's got a knob on
Eh
Pretty par for the course
The way you said "oh yeah"
Just killed me
I love you opal
I wish I could say that was intentional
I miss voicelock
So do I
who knows?
Vanlock
maybe he did it with intention
Relay it to the viking
i mean..............
We had Vanlock, earlier.
And I missed it!? 
Ping me next time!
I shan't make promises.
Baron von Vanlock
It's not English, though
It's shady in that trenchcoat
It'd be Germanic, ye?
Sorry, brb
Eh, who needs logos
Given that it's in a production build, I mean...really?
At least it's better than the other 13 build I could have got stuck with, which others did, which didn't have the right wifi module drivers.
I return
Oh neat
Got someone in the office asking me about monitors
I don't know shit
Like, they're getting it for their office.
Just get whatever
And if insurance is paying for it, go nuts
@willow lynx What'd you have?
Oh sure sure
Fair enough
Can't go wrong with rice
Opal
Damn
That's not bad
Nah
Rice is everywhere
Rice is love, rice is life
Rice is heavily used in Mexican cuisine for example
hmm
I can attest to this
@ashen wave Yo
It is
@willow lynx It's shipped dry, so it's easy to have everywhere
๐ถ Rice rice baby ๐ถ
Oh good, there's the stupid brain comment I was waiting for
๐ถ Lice lice rabies ๐ถ
bruh
I always associated caviar with like fancy dining
yall ever eat meat or nah?
Because both are good
def main() -> int:
for i in range(1,2000):
print(i)
return i
while True:
main()
Is there no recursion?
because i dont really understand how to block recursion
i didnt see tht coming
Loops aren't recursion and shouldn't be stated as such
i finally dont have recursion
Re-occuring vs recursion.
But a loop is a loop and recursion is recursion. You can integrate the two within each other, but those individual parts are separate
There's something about the word "fusion" that just sounds inherently cool
Right right
Wait
The compiler allows it or does it as optimization
Nor do I, in fairness
Fair
Shit
I forgot what I was doing
My attention span is going to just screw me today, I can tell
Okay
So
Bear flow
Data bricks?
Neat
Or shitting bricks when the data gets screwed up
Same with my work boots
why would you need it?
That part no. But they're like.... construction boots.
300 degrees?
Yep
Those heavy duty ones
CAT, the maker of construction equipment
I think their full name is Caterpillar?
Can't remember
Their boots are dope
The last pair of steel toes I got were rubbing into my toes
The CAT ones are hella comfortable
@warm jackal I think he's on Cameo
@sour tartan ๐
hi
Good thing they aren't Achilles brand
In the same way that I really really want there to be a Flying Dutchman airlines
Ignoring the fact that the ship sank
"No no, it's fine, this is a plane"
I use Excel a lot at work
Doesn't help
Lucky still made me rotate his plate
It's just a cat thing
Huh
Would have been his own fault
She's gone
she left @warm jackal
I kind of wish that HTML tag attributes were separated by commas
"This is unacceptable. HUMAN! Fix this, chop chop!"
But handsome
So it evens out
no u
I wasn't but I am now
I don't know actually
Also, the various ways you can dictate sizes in HTML
Just weird
All with the power of temperature
@vast jackal ๐
hey
@vast jackal ๐๐ป
yea.....
"VALIDATING FOOD"
yall have your pets operated?
"NOM NOMS CONFIRMED"
or nah?
Operated?
specially hemlock and opal
"oh yeah","I love meat other than food","nutless"
@rose ingot ๐
how to explain this?:}
hi
why cant i speek
where do i have to to the commanmd
eat.....food......i guess
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
oh my i am listening......
All good
so do you guys can help me
There's plenty of folks who treat VC as a podcast of sorts
if its ok can you tell us 'bout the previous "idiots"?
@rose ingot What's the question?
i am total new in python and want to make a if statemant, but it dont work
I called them "Hit and run trolls" or as Opal said, "Assholes"
oo thenks for that...........
@rugged root
yea actually screaming like that is equal to cyber bully.....
You need to store the user's response in a variable
:}assholes again
yes
Crap, back later
no no my friend......if the rule is for betterment of others it is not inconvienint....
yeh
Inconvenient in the short term for newcomers with legitimate interest in being able to talk.
I appreciate you being so understanding about it. Plenty of people are a bit... less patient with the system
(okay ACTUALLY brb this time)
thanQ for the compliment
@warm jackal like this?
var = input("which one you want?")
if var == "1":
def say_hi():
print("hi")
say_hi()
else:
def say_hd():
print("Hd")
say_hd() ```
@rose ingot
acc to ur code
can we use if-elif-else over here?
thank you
hope it helps
i avoid making a function
yeh me too
at the top
yes
i refrain from using def though:}
it is
but i try to manage without it
and makes programs faster*
noted. Thanq
hello
ahh okay
bye.....gotta go...thanq for the advices and helps
also
my enghlish is not so good sry
imports, defs, classes rest of code.
using if again n again
class def
@dusk raven how many languages do you know fr.
like to code a mediocre program
an average common sense would be able to comprehend it
ty delta
yeh cuz i do sumtimes face problems in C
@sharp urchin how can i make that the prgram clos
@somber heath can you speek german ?
opal how can i make a exit
import sys
sys.exit()```
@granite trail could u give me stream permissions?
the nitro sniper is not working its just a genaroirt i copyed @somber heath
One sec, DELTA
wait let me destroy the sniper @somber heath
Thx
@somber heath here is the version
@magic osprey ๐
Just put you on the probationary period, DELTA
You have the perms now
The 3 week thingy
Hello
A whole second? Lucky!
It's not enough Mississippis
They're not... THAT bad
They're no Missouri
-cries in Missourian-
aight imma head out now
Later cruiser
bye yall:}
@molten pewter How are you on this #blessed day
Take a nap
Heard it from a wise man once
Well
More than once
Brocrastination
Eh
I don't think there's anything worth salvaging from my brain
It's one of my many charms
True
The plethora of dad jokes
HA
School pageant. Kids dress up as states. One child dresses up as a web address. The father when confronted claims his daughter told him she had to dress up as Ms URI.
Oh that's gooooooooold
Group By function
!d itertools.groupby
itertools.groupby(iterable, key=None)```
Make an iterator that returns consecutive keys and groups from the *iterable*. The *key* is a function computing a key value for each element. If not specified or is `None`, *key* defaults to an identity function and returns the element unchanged. Generally, the iterable needs to already be sorted on the same key function.
The operation of [`groupby()`](https://docs.python.org/3/library/itertools.html#itertools.groupby "itertools.groupby") is similar to the `uniq` filter in Unix. It generates a break or new group every time the value of the key function changes (which is why it is usually necessary to have sorted the data using the same key function). That behavior differs from SQLโs GROUP BY which aggregates common elements regardless of their input order.
Hey AF
"ohno not again"
I'm still not entirely sure how to do the async version
@midnight agate Yo
Wait, would it really benefit from being async
@undone idol yo
@midnight agate I detect a hint of sarcasm
just groupby version for AsyncIterator instead of Iterator
๐
So, we were primarily talking about job interviews and the hiring process
You and me have enough of a rapport that such formality is not required
why would anyone make a project folder in downloads dir ๐ฅด
rapport
Richard?
((me still not knowing English))
I'll go check whether those two words are actually related
(surname and another noun)
Rapport is a mutual understanding and familiarity
.wa s define rapport
a relationship of mutual understanding or trust and agreement between people
Close enough
I think it's French in origin?
Because the t is silient
@verbal zenith Sup
https://en.wiktionary.org/wiki/rapport
lots of places
Type it out
waddup
Since they're talking about something already @verbal zenith
Oh sorry, didn't mean to double ping
You're fine
I did
@rugged root plz
@uncut meteor Sup
meanwhile French:
But they're all saying "Borrowed from French"
I am formally requesting assist-ance
Try to be all frenchy french moon language, and it's literally the same word
So good
I'm typing it out so just give me one moment
No rush
(correction: Richรกrd not Richard)
@zenith radish Sup
Oh hi LP
Mostly finished my F# thing
Neat
Now just making a gRPC/REST server to talk to
@zenith radish we have tildes now
letsbuilda/imsosorry#9
So did you like F#, hate it, kind of eh about it
And then I'll need to make a discord bot
@uncut meteor One of my favorite subs
If you wanted to help, I have a string of text with new lines, I have an index to it as well called cursor, I need to from that cursor value discern the line and column of the character at my cursor or "index"
testte\n
^ end of line 1
tes&test\n
^ line 2, column 4, index 10
testtest\EOF
My attempt was to count each new line operator up to cursor as
str[:cursor].count("\n")+1
Then use this value somehow to get the column, but for whatever reason I'm very confused...
I want git commit history review
There's a better way of doing this, but that requires I refactor my code, which I guess I'm fine doing, but this is only for errors, and I'd hate to refactor just for one specific thing like that
@zenith radish Just curious. I really like how it feels, so I like hearing other people's thoughts on it
Don't "TODO" your license, just make an issue for it
Oh you really did go with Just
Seems fine to me
Are you unhappy with it?
It supports functional paradigms
How so?
In practice you will be using it with preexisting dotnet libraries which are all so OOP it hurts
You gain basically nothing by using it over C#
Including code brevity
Hmmm... not sure off the top of my head. The help system would likely have a better system than I can offer, unfortunately
Common tasks like mapping over a list are done in a stupid way
Pipeline Oriented Programming is also just a dumb idea imo
The exception management is lifted from C# with no additional operations to make it proper to use
Lisp
Which derivative
The other one
I know there's a representation of what I want, it's certainly possible I'm just not giving this enough thought I think either way thanks
If my attention wasn't so split right now and I had more time I'd tear into it, sorry
I tried Clojure and it just didn't click with me
"JavaScript"
(joke repeated a dozen times only gets funnier)
Not a terrible answer, honestly
It has quite a few things that let it leverage a functional paradigm
LP, what got you on the F# kick in the first place
can some one help me in a private call ?
why?
This is a use case which is objectively better suited for a functional implementation
VS C#'s deeply nested OoP
Fair
vbecause i havea probleme with a scribt
You can ask here
What seems to be the problem?
and i cant speek in voice chat
Good news!
Typing is free
my app crash
I think it may be easier with messaging (compared to async/await-ish constructs that asyncio provides)
OCaml
(F# ancestor)
no its just crash
is it in python?
Nim?
Nim, OCaml, PHP, Perl
add logs and catch errors
Mm, true. OCaml influenced F#
where are they
We strongly recommend against even trying to make a Python exe because they're so terrible
There is one for PHP
I could swear I've seen one in Julia...
Found it
Haxe
don't start it from explorer
run the EXE from cmd or powershell
you will see errors if they happen
@uncut meteor I missed the question
how i can do thet
I'm curious
how can i run the exe from powershell
Was that a Nitro Generator?
Were you the one that Opal told we couldn't help on something
idk what you
ok, nvm, then not my business
noooooooooooooooooooooo its not
i startet python yesterday, how is that possibnle for me to make one
Pasting large amounts of code
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
its only crahs when i opne exe
why do you need exe in the first place?
are you distributing it?
Would still like to see the code. Sometimes it's trying to grab a library and you have to do it a specific way
@uncut meteor Your mom
add input() at the end
i do it in a exe, because i dont want to use pip etc
so i use exe that friend dont have to dowlaod py
Still need pip to make the exe
I think it's that I haven't messed with Docker enough to really form enough of a confusion
How did you make the exe?
Like what command
Docker is holy
That's it
That's the conclusion
I don't doubt that
I'm going to be honest Griff, I cannot remember exactly what you asked
!e
import string
print(string.ascii_letters + string.digits)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
My ADHD brain is suuuuuuuper bad right now
Wait - Confusion?
Why are we confused?
Not confused, intimidated then
Just the whole dev opsy stuff
I suppose
I just haven't futzed with it much
auto-py-to-exe
Open up a powershell prompt and then drag and drop the exe into the window
Then run it
it doesn't crash
it just exits
it ends and exits
Me too
The uwu crap, my brother wanting the bot updated, me wondering if Chris will let me PR it back into SirLance...
My work computer went to sleep because I was writing the uwu release issue on my laptop
I'm very broken today
there is no crahs report
of course there isn't
Yeah, it's just executing too fast so the prompt pops up then closes really fast
yes but why
AF suggested adding an input() at the end of the code in order to hold the window open
wait guys
because it reaches its end
you didn't put a loop around the choice selection
As the very last line of code, just put input()
it ends because it reaches its end
peak of my explanations
That'll make it sit and wait for Enter to be pressed and hold the window open
Hemlock helper this guy
He's explanatory AF
yes
@midnight agate We hear you
know i have a knew problem, how i make a key that go back to home when i press
that dont work
can you pls give me the option that i can speek in voice and i cant share my screen
pls
I try not to make exceptions to the voice gate, sorry
i need help but i cant speek, i arlready have 50 text
ik
I'm right now doing the actor-ish model groupby
class ActorIteratorResponseListener(ABC, Generic[T_contra]):
@abstractmethod
def some(self, element: T_contra, /) -> None:
raise NotImplementedError
@abstractmethod
def none(self, /) -> None:
raise NotImplementedError
class ActorIterator(ABC, Generic[T_co]):
@abstractmethod
def next(self, listener: ActorIteratorResponseListener[T_co], /) -> None:
raise NotImplementedError
but i am new and need help now
for async
async I chose myself because I earlier solved another AsyncIterable problem
may you can help me ?
(that other problem was actually for some software I still have running right now)
i cant explain with texting
why use classes if you already have a db of some sort.. seems like a waste of memory to create instances of data already available to me.
I need a reference on how i would benefit..
current I iter over my data and and pack what i need into a variable called package, then add each to packages for use when processing.
ORM models are classes
When you load the data out of the database, it comes into Python as class instances
hey so do pygame stays in system when is python deleted or ...
delete python from your computer go to python web page press download > windows and chose version that you want
thank you
You don't download them
They're builtin
Really
Really
!eval
import secrets
print(secrets)
import string
print(string)
@sweet lodge :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | <module 'secrets' from '/usr/local/lib/python3.11/secrets.py'>
002 | <module 'string' from '/usr/local/lib/python3.11/string.py'>
No need to apologize for learning
installed? running in a venv? possible version conflict with python
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@median lintel ๐
hello
why
wtf
kkkkk
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
all the channels bro
User information
Created: 3 years ago
Profile: @mossy pelican
ID: 648246656982056960
Member information
Joined: a month ago
Roles: None
Activity
Messages: 4
Activity blocks: 1
Infractions
Total: 0
Active: 0
I've been here for a month
Have over 50 messages in the server
I'm waiting for day time
bye guys
@cloud edge ๐
yes
Can i get python downlaod please
becasue python site is not opening
i need for windows
One moment.
Maybe it's like a DNS server problem...
402 forbidden
@somber heath ??
my location??
india
asking me??
like for a hosting company
I need to learn
nono
like a place
where are you connected
in a public space, or on your personal home
home
wifi
jio wifi
idk
can u add it in google drive I will download from there
give me the link
so from where should I download
wait trying
๐ฆ
wait leme use my brain
Leme tryyyyy
I have 4 rdp
Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.
then
once more please and slow
got it
next to the link
then?
could you enter?
nono
done
amd64
fyi: thats the computer architecture(amd64, arm64), since you are on windows amd64 is the one for you
have you completed python?
@somber heath @plain dagger ?
means you both learned it?
dude
I need a teacher
like you
so you have python certificate?
python easy or difficult?
experience is my certificate
can you teach me python?
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
actually I want to prepare for hosting purpose
the python docs are actually pretty good
Corey Schafer, YouTuber, playlists for Python.
Hey @plain dagger!
It looks like you tried to attach file type(s) that we do not allow (.zip). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.
Feel free to ask in #community-meta if you think this is a mistake.
dm me
I need to download it?
library.pdf
i need to download this alsso????
???
@plain dagger
yes
a4 side or us letter size
A4 is the best but any u want ig
@fallen depot ๐
zip is better for windows
@cloud edge How goes the process?
trying to understand
?
brb fellows
prolog is an example for logical programming
meanings of some paradigms are about imposing limitations
not my view, copied from Kevlin Henney
iirc, examples were:
structured forbids goto
OO forbids function pointers (in what sense? idk)
functional forbids mutability
.capitalize also alters letters other than the first one
fun fact: .capitalize changes the length of the string sometimes
this was from a single talk or multiple talks by Kevlin Henney
second thing I forgot exact wording
it does it less directly
are you talking about contravariance?
so, second thing is very far from what it actually means
it's just me trying to reconstruct random remembered words into a semi-coherent phrase
I'm right now looking at Pylance "bug" almost just about it
in another project, I'm building an event hierarchy and there's a lot of contravariance-related things also
for example, something, that can listen to an event, is contravariant over the type of that event
to be honest, I don't know about what channels would be more appropriate
though, yes, there are people who talk only about politics
whereas the other end, i.e. something that you can listen to events from, is covariant
and, if there's something that you can both send events to and receive from, is invariant
Pylance will shout if python is improperly typed, including variance nuances
unlike PyCharm, iirc
(for non-Microsoft distributions it's Pyright)
Pylance is for VS Code distributed by Microsoft
Pylance is based on Pyright, if I understand correctly
(both are by Microsoft)
@midnight agate ```py
a = input('string :')
b = list(a)
c = (b[0].upper())
b[0] = c
for i in b:
print(i,end="")
Pyright is used in alternative distributions of VS Code like, for example, code-server
and probably, also, outside of VS Code
!e
a = "examplE"
b = list(a)
b[0] = b[0].upper()
for i in b:
print(i, end="")
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
ExamplE
so this code does capitalise the first character
but:
it doesn't print \n at the end
it takes long time to print() (especially, to a slow terminal)
moreover, it takes long time (less than print-spamming but still noticeable) to do the list-conversion
unlike str.capitalize(), it doesn't lower the rest of the characters
first and second can be fixed by using print("".join(b))
!e
a = "examplE"
b = list(a)
b[0] = b[0].upper()
print("".join(b))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
ExamplE
issues we have left are: list operations, non-.capitalize interface
to get rid of the first and, if we need to, take care of the second, we can do the following:
!e
s = "examplE"
print(s[0].upper() + s[1:])
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
ExamplE
check with "aba"
!e
a = "string"
b = a[0].upper()
print(a.replace(a[0], b))
@azure rivet :white_check_mark: Your 3.11 eval job has completed with return code 0.
String
!e
a = "aba"
b = a[0].upper()
print(a.replace(a[0], b))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
AbA
use count=1
!e
a = "aba"
b = a[0].upper()
print(a.replace(a[0], b, 1))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
Aba
Is that how that works
I didn't notice the , /) in signature
Learn something new errday
!e
s = 'example: รแบ'
print(s.lower())
print(s.lower().upper())
print(s.lower().upper().lower())
print(s.upper())
print(s.upper().lower())
print(s.upper().lower().upper())
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | example: รร
002 | EXAMPLE: SSSS
003 | example: ssss
004 | EXAMPLE: SSแบ
005 | example: ssร
006 | EXAMPLE: SSSS
upper/lower changing the length
yes
lower and upper are idempotent but don't commute
Spooky
my async groupby is already 250 lines long and roughly 20~30% finished
with 0 async/await keywords
I have the patterns book but didn't read it yet
it just exists in my possession
for two years
I only used websockets in aiohttp
for communications between services
The patterns book
"Design Patterns: Elements of Reusable Object-Oriented Software"
by
The "Gang of Four"
test successful
(can hear)
it shouldn't be too expensive
code is rarely "finished"
that's just the nature of software products
usually it's only finished when it's dead
https://github.com/ReRubis/social_network
- Folder and file names do not follow some rules and aren't convinient.
- The way I extract data from sqlalchemy object is weird.
- The "business" logic isn't separated.
socnet/routes/posts_route.py line 63
if str(react.reaction) == 'like':```
match str(react.reaction):
case 'like':
...
case 'dlike':
...
socnet/routes/posts_route.py line 118
model = repo.update_post(post_to_add)```
@midnight agate those not really type hints
those type hints are fastapi wiring
yes
(just that type hints are used only where they're required)
annotations
socnet/routes/posts_route.py line 171
if posts:```
unless it's None
You don't. That's not something I'm comfortable with implementing. Role and permission control is only ever going to be done by mod+ staff
return self.query.filter_by(post_id=postid).all()
can .all() return None?
I'll check
Going back to sleep now
I have one application in flask
yes
i deploy in railway
I not try to write the best code
I try to make my project
but I love to improve
my code
I'd suggest you don't use """ for multi-line comments
those are for documentation
Portuguese
(as per pep8)
vc pafa pt
ooooo
miseravi
kkkkk
where you from
?
kkkkk
Now I study modules in python
use more init.py
in my projects
singleton cringe
-- the most "expert" opinion I can give
first, reduces testability
yes, sometimes good for small project
as with any other global variable
(overused) example:
global instance of Clock
now, let's assume you need to check some time-specific code (i.e. code that does things differently depending on night/day)
so, to make a test that depends on a clock other than the global default one, you have to either replace the global variable or pass the value in as an argument
swapping the instance can interfere with something else
whereas when choose to pass the argument, why not just do it everywhere instead of referring to a global instance?
it's more of "singleton pattern is misused too often"
people go for it because of its ease but end up making a mess
assumption that there will always be one instance of something is just that, an assumption
it may be correct, or it may end up being wrong requiring to rewrite everything
Hi i am in windows
can someone helpme
When I am installing pandas with pip
error comes
it is a pattern which has its correct uses
those uses are quite limited
as is with other patterns
turn off antivirus, turn off firewall
if fails, check your ssl installation
I'm not against patterns
singleton has too much potential to be misused
how to turn off antivirus and firewall??
example:
asyncio.get_event_loop
and why it gets obsoleted
asyncio.get_event_loop was doing the classic singleton thing of "get global instance or make one and set it"
and, turns out, people sometimes need more than one event loop
so that's how it got split into new and get_running
singleton, just like every pattern, is fine when used according to its limits
it's just way easier to get it wrong compared to others
it's a problem to which the singleton was an inappropriate solution
@vocal abyss come voice chat 1
DI is more sane than singleton
for most uses
like, you have the same guard but not as a global
it doesn't use
also, yes, the initialisation is a problem for singleton
if it takes parameters to init the instance, how is it done?
so, there's another failure mode for singleton usage (apart from multiple instances):
non-trivial initialisation
it's not bothersome
(this way I'm revisiting my knowledge on patterns so not bad)
they will be same
since some version
I had singletons in the biggest python project I was making
getting rid of them was the driving force behind the latest and most effective improvement to the structure
mostly it's about managing persistent database connections
not exactly connections
those are in-memory database instances
this experimental thing:
https://gist.github.com/afeistel/75111e3fc5c9b5d93c4196f686c0752f
startup and shutdown is async
so, the existence of __aenter__ and __aexit__ is what's important there
yes, async with
I'd switch to Rust if it had async with
maybe it has
before the refactoring, the manager instances were created in multiple different modules as global variables and managed in main module
because 'r'
reading the file
not writing to it
handling the non-existence of the file, yes
io2db applies a stream of requests (passed as IO) to the in-memory key-value store (dictionary)
file may or may not be empty
I wrote this
don't remember which year it started (probably 2021)
old name
at first it was just an experiment but then I managed to make something useful out of it
it's very easy to add this as a key-value store to an async application
right now, I use it mostly for discord bots
though it's limited
I'm attempting to make it depend on discord as little as possible
so, most services, that this gets separated into, won't even know discord exists
one bot (the most complex one) will get its dependencies reduced
(by using some smaller API)
another bot is 100% dependent on discord right now because it's made for a specific discord community
and one more is just too small to try to decouple it
only two operations: get and set
no iteration, (almost) no deletion
"factory" should be renamed to "manager" and "connection" should be renamed to "instance"
both suffixes may sound meaningless, but right now that's the best naming option
even though factory-instance pair may sound more familiar, it'd still be mislabelling
"improving" at chess
(50.1% -> 50.5% relative standing with 0 games played)
it's lichess so not very impressive
starting rating is 1500
"inflated"
they and chesscom have different rating models
currency is inflated in amount not value
that's why inflated
if I understand correctly
fun fact: in this module, transactions and connections share a common interface which allows to do second-order transactions
not because it needs to be possible, but because it can
nested in some sense, yes
yes, rollback can be done at different levels
because it's an incorrect term that I just made up
both are VirtualConnection (which should be called "abstract" but I failed at naming)
VirtualConnection doesn't actually have set methods; it only allows writing "in bulk", i.e. accepting difference in a form of a dictionary
like |= on dict
also, a valid critique about this code:
excessive usage of Futures
Futures are (in certain contexts) considered somewhat too low-level and primitive
why does the book have such age restriction on the site I looked up
C is not for kids
tbf, that may be because of how they deliver them
"copying"
the book seems to be around 2k RUB
every single one I can find is sold out
DoS
btw, beef's getting out of Russian essential food list because "almost no one can afford it"
that's what the reasoning was to exclude it from price regulations
so, it's too expensive
that's why it "should" be allowed to become even more expensive
"83% correct translation"
or less
I need to count
as for "attack" part:
stream of requests (questions in that case)
usually requiring more effort to respond (answer) than to request (ask)
symbol-wise it's 87.5%
@spring karma
you can write here so others can see also
