« first day (4763 days earlier)      last day (410 days later) » 

01:39
@Aran-Fey I got NameError: name 'Optional' is not defined (because child.py did not explicitly import Optional). Is that what you got?
Eww. Nasty. I had too much faith in Python...
02:10
What?
02:28
as a way to track my time usage I made a timer in which I can input a description of my time. i made a grammar for these descriptions in order to be able to put everything in a database. now the grammar is a pain, so I made a CLI that helps me write a proper description
is there a way to pipe the CLI's output into the timer, while it is actually running?
 
1 hour later…
03:36
nvm that, found an easy workaround
but while working on the project, i wondered: is there already a tool that allows you to define a context-free grammar then helps you write a grammatically correct sentence through features like suggestions and autocompletion?
or at least tells you the nature of the token you're currently writing
 
3 hours later…
06:09
Well, this is just the way I wanted to start today. How have I managed this?
(env) joshpilkington@Joshs-MBP ex_machina % deactivate
zsh: command not found: deactivate
(env) joshpilkington@Joshs-MBP ex_machina % source env/bin/activate
(env) (env) joshpilkington@Joshs-MBP ex_machina % deactivate
(env) joshpilkington@Joshs-MBP ex_machina % deactivate
zsh: command not found: deactivate
(env) joshpilkington@Joshs-MBP ex_machina %
@roganjosh conda deactivate
I should have shifted that months ago
As in, removed it entirely. Indeed - zsh: command not found: conda
Hmm
  File "/Users/joshpilkington/Desktop/git/ex_machina/env/lib/python3.11/site-packages/flask_login/utils.py", line 14, in <module>
    from werkzeug.urls import url_decode
ImportError: cannot import name 'url_decode' from 'werkzeug.urls' (/Users/joshpilkington/Desktop/git/ex_machina/env/lib/python3.11/site-packages/werkzeug/urls.py)
So it's still actually running that env
I'll just start with a burnination. I've not even had a cup of tea yet
06:44
@smci Yep
07:31
Hmm, I feel like something has definitely changed with VSCode in recent versions if you have multiple instances of it running. Now it chooses to deactivate venvs seemingly at random if I move between windows, and it seems like it was locked to env before because I presumably set it in a different terminal. In between I have updated and now the behaviour is the opposite :/
08:11
@roganjosh Great, so it's the same now as in Pycharm :D which is horribly, but at least it's consistent between IDEs :P
Huh, I never use Pycharm so it wouldn't occur to me that this was existing behaviour in another IDE. There really was no need to start poking around with these mechanisms because this is just baffling behaviour, only to then swing the boat in entirely the opposite direction in the next update. Just leave things alone guyz :'(
08:25
Can anyone recommend a good scratch pad tool for planning out DB relationships visually? Something quick and simple because I have hit a point of really complex interdependencies and my usual approach of just drafting it out in SQLA classes for hours until I'm happy is going to be impractical to see the whole picture
@roganjosh ah whiteboard?
In general I love yED for graphing designs
Especially the auto-layout functionality is neat
It should be DB-specific so it should look something like this but I'm struggling to search for those tools specifically
Aha, these. I was being too specific in my searches. Sorry I was vague
08:43
@roganjosh Thanks for these links, in a month or two, we will try to normalize our DB to 3NF and these things might come in quite handy. I might hit you up when we start normalizing the db
No worries and sure thing. I could see them in my mind's eye but couldn't quite get the words together to dig out the tools :P
 
1 hour later…
09:53
@Hakaishin FWIW I'm actually finding the two best-fit (visually) tools much harder to use than just drafting out SQLA tables at this stage. Lucid seems the easier approach but I think it actually makes more sense at the time of documentation rather than brainstorming
while we on the topic would you recommend 3NF or 3.5NF(Coddy something)
Tbh I probably wouldn't notice any difference. this seems somewhat arbitrary
 
3 hours later…
13:01
@roganjosh names and addresses of users
I'm no expert on databases or cyber security, but my suggestion would be to encrypt it with a password stored in the keyring and a pepper
Is this for GDPR or something else?
To the best of my understanding (i.e. you'll need to check), in the case of GDPR, there is no specified standard for storing PII, only that you can justify the steps you took and that it was necessary to store it for the functioning of your business (and the right for users to be "forgotten" etc, but that's less relevant)
There are threats from both within and outside. External hackers may try to get hold of your database, and there's plenty you can do there to harden your server storage and have the filesystem encrypted. But that'll do naff all if the database (at least in postgres) is running because the filesystem will be decrypted. It only helps against physical theft, basically
If you encrypt on the python side, then basically you run the risk of any employee that can see the code getting the encryption key. I'd personally go with putting the PII itself into a separate table and locking down the permissions on that table to only people within the business that have a legit reason to be querying it
FWIW at my last company, we just filled in a survey for each client to highlight that we were aware that we were holding PII as a necessary part of our jobs and everyone on the project could get at it. We had SOC 2 and ISO 27001 accreditation.
@roganjosh encryption does naff all if the server is breached*. Hardening is absolutely useful to try stop this in the first place
14:00
Is there a way to ensure that a pip install is still running? I'm compiling opencv-python on a budget device and it should take hours, but I'm just not sure anymore how many hours :) I just have the mssage Building wheel for opencv-python (pyproject.toml) ... \
14:14
htop? That's the extent of my suggestions sorry
gpt said the same :P thanks, the suggestion is actually good and it is still running not frozen
Oh man, that's quite a put-down :'(
Although, how many paragraphs were in its answer?
@roganjosh wait why? It's actually giving quite a few good suggestions: chat.openai.com/share/c5f698cb-d56f-4cd8-8c52-03a7b974dce7
gpt is a fantastic rubber ducky and for things like general concept advice it can be quite useful
Thinking about it, I would def watch a video which starts with a random seed question and let's 2 gpts talk to each other
just to see where they go :D
14:32
@Hakaishin something just feels icky that my answer is corroborated by GPT. Can't explain it
@roganjosh to me that sounds like I don't like that my calculator also says 2 + 2 is 4 :D What would you expect it to say? Something totally wrong? (It might seem like I think AIs don't pose a danger, far from it. But currently people seem hurt in their honor if a tool agrees with them, which is weird to me. A colleague at work told me he feels like cheating when he uses it :D )
I don't suppose we'll be able to have a meaningful debate that will say anything that hasn't been said ad nauseam on basically every platform. In the current stage I guess people will just have to agree to disagree; I should have let your comment pass sorry. Let's move on :)
14:53
@ABcDexter waaait a minute. I've made an implicit assumption you're talking about data you are storing here. Are you planning to distribute this data outside of your organisation?
 
3 hours later…
18:19
<continent> ::= North America | Europe
<european_cities> ::= Paris | Berlin | London
<north_american_cities> ::= Toronto | New York | Vancouver
<city> ::= <european_cities> | <north_american_cities>
<location> ::= <continent> <city>
suppose I have the above grammar. How do I express that the city must correspond to the correct continent?
<location_euro> ::= Europe <cities_euro>
<location_na> ::= North America <cities_na>
<location> ::= <location_euro> | <location_na>
Or do parsing and validation separately
@Peilonrayz i see! do you know if there's a standardized way to express validation?
if we do parsing and validation separately as you say
Not in BNF, you'll have to use a standard language (C, Python, etc.) or create a DSL.
I see, thanks a lot!
You may be able to use/abuse schema validators as well (think JSONSchema)
18:36
all of this is making me wonder, is there like a standard reference on the conceptual aspect of language design? i'm making a database query/insertion grammar and I wonder if there's more sophisticated stuff that would help me understand the bigger picture
A while back I wrote an answer why BNF is better than Python. I've not come across what you want. If you find something I'd be interested in reading too.
will do!
18:57
@shintuku Kevin from this room has a pet project on this. I was asking him how he approached the problem to which he replied here. This is the repo. All hail KevinScript. There might be something to learn from his experiments
This says it much better than I did
interesting stuff! thanks for the references
 
3 hours later…
21:53
Is there a way to tell static type checkers that calling my class's constructor isn't allowed? I thought of annotating it as -> NoReturn, but that doesn't really do much
"it" as in __init__()?
Ah, it as in constructor, so new/init
Changing the class to a module? :D
Not in this case (: I'm writing my own enum
'Course you are!
I imagine a "but we have enum at home" meme...
It seems I'm out of luck here. Every enum is automatically turned into a dataclass, which creates a new constructor. And that apparently even takes precedence over the annotations of my metaclass's __call__
Aren't dataclasses the bane of your existence anyway? Like a floor made of legos.
22:09
Well, yes and no. I can't stand them, but I still use them because they make my code more DRY
(I write a lot of classes)

« first day (4763 days earlier)      last day (410 days later) »