« first day (4762 days earlier)      last day (411 days later) » 

07:42
I see Copilot is already looking forward to Halloween
08:20
@smci Sacrilege, there are no boring parts :D I love all the 8 books <3
@Aran-Fey All work no play makes CoPilot a bad boy!
 
2 hours later…
10:00
Is there a way to say "Hey IDE/pyright/mypy, alert me if I forgot to implement an abstract method in this class"?
Don't they do that automatically?
AFAIK it's a type error not to implement abstract methods.
It only complains if you try to instantiate the class
My current workaround is
if TYPE_CHECKING:
    Foo()  # This'll alert us if we forgot to implement something
from abc import ABC, abstractmethod
class Abstract(ABC):
    @abstractmethod
    def foo(self):
        pass
class Concrete(Abstract):
    pass
Concrete()
This shows Pylance and MyPy error for me
Cannot instantiate abstract class "Concrete"
"Abstract.foo" is abstract
Yeah, that's pretty much what I'm doing
Ah, right
 
3 hours later…
12:57
When not using a piece of software like an install script and it just works after 6months, that feels like a miracle and a gift :D
 
2 hours later…
14:48
do all constructs in Backus–Naur form correspond to a construct in pyparsing?
i'm willing to put in the time necessary to learn the theory (linguistics? comp sci?) to be able to use pyparsing for more complicated parsing tasks, where should I start?
@shintuku Yes, (E)BNF is pretty basic.
@shintuku Reading up on PEG parsers is a good idea. The papers on the topic are pretty lighweight usually.
noted, thanks for the comments!
15:08
If you are familiar with Propositional calculus (a fancy term for formalising if-then relations) or willing to skip over intimidating formulas, the paper on Left Recursion in Parsing Expression Grammars is surprisingly readable.
For a simple start, I would recommend to just build your own (non-left-recursive) PEG parser.
The entry-level paper on PEG is "Parsing Expression Grammars: A Recognition-Based Syntactic Foundation" by Bryan Ford which formalised and named the approach.
@MisterMiyagi i've done a lot of mathematical logic so piece of cake! thanks a lot for the reference
ooooo and thanks for that article, will jump right into it
15:24
I know I'm always a few weeks behind the latest news, but meta.stackexchange.com/questions/393806/… is quite a rough announcement. Is it only me or do philippe's answers feel like chatgpt generated? I would not be surprised if he isn't even responding himself. His answers seem so formulaic, void of meaning and robotic. Very astonishing. The ship is sinking faster than I would have thought.
"formulaic, void of meaning and robotic" That might be part of the job description. Wouldn't be my cup of extra strong coffee.
@MisterMiyagi I mean I guess, you are right... Just sad when something this ugly touches my nice happy bubble :P
Yeah, there hasn't been much fun stuff on meta lately. :/
I've recently been watching a number of videos about VC funded companies all in the same boat. What I thought I understood about VC... I really don't. Watching Patreon constantly shouting about their next rounds of funding... for them to be going down the pan now. How could they possibly spend anything close to the amount of money such a site was raising?
"lately" :D I mean Meta was always a kind of a dumpster fire, but now with SE going down it's like pouring oil into it
15:32
In my head you could run it from a 50 person team
And they were already on track to make £25m per year organically before they raised Series A
@roganjosh I think you are approach this from the wrong angle, aka a realistic technical one.
It'll be interesting to see whether the next gen tech companies take this bait. SE walked into this problem at around the same time as other companies so maybe the writing wasn't so clearly on the wall at that point
16:29
print("Howdy")
17:11
if we're notating something in BNF, is there a standardized way to notate validation requirements?
17:29
What's the latest+safest on Python data obfuscation for textual data present in DB?
Do you really mean "obfuscation" here?
You could use encryption but that wouldn't be limited to python. Just to be clear, if this textual information is a password then obfuscation and encryption don't work
17:56
any simple way to make pyparsing automatically name ParserElement objects the same as the variable name denoting them?
18:40
eh, takes 2 seconds to properly name parser elements and it avoids issues
That variable name isn't available to Pyparsing in the first place.
You could, of course, rather than using a separate variable, store the ParserElement in a dict using its name as a key.
 
3 hours later…
21:27
Sorry to tell you python folks but,
although I am an avid fan of OOP and believe usually OOP is the way to go. I feel like Python, unfortunately, is not made to be used in large OOP codebases
if you think OOP is the best and only way to go, then you are pretty narrow-minded :)
not everything needs to be a class. actually, many things do not need to be classes. for example, anything where having instances does not make sense should probably not be represented as a class
No existing programming language actually has good support for OOP
Just throwing my hat into the ring
probably we shouldn't be feeding the troll 🐟
@ThiefMaster in C++ that's a static member function as there is no need to instantiate the class. You put it in a class to have a logical grouping
@Aran-Fey * laughs in C++ *
so how exactly is that better than a python module? :p
your static c++ Foo class is my foo.py module
21:33
Let me formulate it differently, doing OOP and eg inheritance in Python feels weird borderline erroneous
I have too much faith in humanity, so I'll go ahead and ask. Why?
@ThiefMaster I m not a troll. Just not a Python expert as I have only been using it for a couple of months now professionally. And my experience from those couple of months is that it just feels incorrect to me
well the way you started the discussion did feel somewhat provocative :)
I also feel like it doesn't scale well inter alia due to how people tend to use the language
Python being loosely typed and very intuitive, whatever crap you write works somehow. So all script kiddies tend to go loose
I still haven't heard a single reason why python's OOP is bad
21:38
@Aran-Fey oh wait, wait... I had a similar discussion with you already in the past and you made an interesting point back at that time
let me first double check what you wrote back then
either way, in the meantime, I still stand by my point, ie that it doesn't scale well due to how people tend to use it
@Aran-Fey In C++ codebases there often are coding guidelines telling you that eg everybody shall inherit from some base class or what not, override function XYZ etc... enforcing specific coding patterns. DUe to the lack of compile time checks enforcing such patterns is difficult. Next to this, as stated, people often use Python for rapid scripting/prototyping. So when those same people start using Python for large professional codebases you run into issues
I do agree that a lot of 3rd-party packages have bad code, but I don't see that as a big obstacle for scaling of all things. As long as your code is good, your codebase can grow just fine
@LandonZeKepitelOfGreytBritn given your long-term history please try to have a higher signal-to-noise ratio. You're welcome to have actual technical discussions here as long as they have a real point other than arguing for arguing's sake.
But IMO this point is mostly good for structuring stuff properly. Properly as in "a bit closer to how it would be done in C++"
so I might be biased in that regard
@AndrasDeak--СлаваУкраїні thank you for your feedback. Will keep you updated in case of doubt.
Perhaps I should read Python code with proper OOP patterns. As my view might be tainted due mostly reading bad examples
21:48
I hope "proper OOP patterns" prominently includes "encapsulation" because oh boy
@Aran-Fey or @ThiefMaster got any suggestions?
ie suggestions on open-source Python codebases with commonly used OOP constructs. That way I'll first read something considered as being good
I'm afraid you're asking the wrong guy. I'm the type of person who writes everything myself because all the existing code sucks
(Including mine, most of the time, but what can you do. Skill issue.)
22:24
ah, time to throw this one out there again: stop writing classes
@LandonZeKepitelOfGreytBritn fortunate, then, that inheritance has nothing to do with whether you are doing OOP or not
@LandonZeKepitelOfGreytBritn "loosely typed" is not well defined. Python is largely referred to as strongly typed with duck typing. "[Due] to the lack of compile time ..." is only half true, Python has mypy, however the type system isn't as good as TypeScript's. But AFAIK TypeScript has the most static typing features of all languages. But then the question is what does static typing have to do with OOP and inheritance?
@Aran-Fey tfw
@LandonZeKepitelOfGreytBritn I honestly tried to think of projects that could be an example here, and I can't think of a single one. I'd guess it's because as soon as someone gets good enough at python to write good python code, they stop using classes to build taxonomies
which seems to be what you're after
@Arne I thought the sentence would end in "move to Rust" :P
23:05
PROCESS_ALL_ACCESS = 0xF0000L
5
Is Microsoft trying to tell me something here?

« first day (4762 days earlier)      last day (411 days later) »