« first day (3930 days earlier)      last day (1009 days later) » 

12:13 AM
Yeah so trying to use the static members of the class, which as i'm growing to realize makes it harder. The class is actually a python enum.
 
 
1 hour later…
1:40 AM
cbg
 
 
5 hours later…
6:21 AM
cbg
 
 
1 hour later…
7:40 AM
@Mikhail I don't quite get what's the difference here. __init__.py is conceptually a regular module.
Then again, it's not like the module/package/import docs make this particularly clear...
 
8:04 AM
Yeah that probably a typo on my part, I really need to merge the content of the class with globals()
Still really suck at python
 
Is there any reason why you are using a class for this at all?
For all intents and purposes, a module already is a class with only static methods and attributes.
 
I agree it's a strange thing to do, but if you're sure you want to do this... globals().update({obj._name_: obj for obj in MyEnum})
 
Basically I have a python enum where the enums are static members, I want to alias the enums into the init.py namespace...
@Aran-Fey yep kinda going to do that...
alternative is to do it without a loop aka enum_val1= MyEnum.enum_val1
 
I'd bind the enum members inside the module, and maybe add them to __all__ with a star import in init.
 
8:19 AM
The socket module does it the other way around: It defines module-level constants and then creates an enum from that. See the source.
 
OK, either way the binding logic is not in __init__.py which is my point.
 
 
2 hours later…
10:28 AM
hi @AndrasDeak
 
cabbage
 
11:21 AM
I can't remember what the general consensus was about async libraries over all our multiple discussions. Was it trio that generally comes out on top?
 
It's pretty neat.
 
Thanks :)
 
FWIW, last year I looked most libraries were written for asyncio. So you might not have a choice...
 
 
1 hour later…
12:43 PM
It looks like I might not have to bother. I'm trying out FastAPI and was concerned that it wasn't going to allow me to call my sync functions but actually it can?
 
oh yeah it can
cbg
basically any async outer* universe calling an inner sync function is never a problem, as far as i know. compatibility issues only happen the other way.
 
That makes more sense than whatever was going on in my head :P
 
@roganjosh why you choosing FastAPI over flask?
 
looks like they also have a section that outlines async def vs def in more detail here
 
I could write it in flask but I was interested in looking at its validators from pydantic and in theory it should also run faster given that it was written specifically for this task and not a full web framework
 
12:51 PM
Fair
 
Plus I do need my own code to pull in data from multiple other systems which I may do through async myself as I need this thing as fast as possible
Thanks Paritosh :)
 
np! reading through it myself.... uh, i recommend skipping the whole burger analogy. sigh. lol
 
.... but now you've got me intrigued!
 
@ParitoshSingh What the 🍔 did I just read?
 
it gave me emoji fatigue. and i didn't even know that was a thing.
@roganjosh oh dear. i apologize in advance. :P
 
1:01 PM
aaaaaaargh
nuke that yam from orbit
 
im sooo sorry AD haha, oh dear.
 
you'd love their github repo, Andras...
 
Dear ðŸĶŒ reader 👋 you 👉 are 🇷 an 1ïļâƒĢ idiot ðŸĪŠ. Love, 💌 FastAPI ðŸ’Ļ
10
 
okay, there we go finally. the best section is at the end, which, amusingly enough, is also the section they suggest skipping.
> When you declare a path operation function with normal def instead of async def, it is run in an external threadpool that is then awaited, instead of being called directly (as it would block the server).
> If your utility function is a normal function with def, it will be called directly (as you write it in your code), not in a threadpool, if the function is created with async def then you should await for that function when you call it in your code.
so yeah, zero issues in either cases. actually i think their choices are rather sensible
 
I always knew that people having birth dates starting with 2 was unnatural...
Can't wait for someone to invent dabbing in code
 
1:10 PM
looking to be an early adopter? :P
 
Felt like reading a copypasta LinkedIn post
 
1:40 PM
ugh, I'm pretty sure that last time I read that section it wasn't an abomination. now I got to wade through the blame logs and find out who committed that crime
 
all the recent commits have leading emoji, so it might be easier than you think ;)
Also, nice pun
 
ðŸ•ĩïļfound itðŸ•ĩïļ
 
"Spanish translation". Nice try.
 
2:01 PM
There's an issue on that, by the way.
 
that is the first time I am seeing emojis in a doc, that too in a high profile library
 
I do like emojis leading the commit message for example but this is just too much
 
the guy who commented in the issue has more emojis in his bio laurel
 
2:44 PM
If diplomacy fails, you can always try to get them canceled on twitter for being ableist against people with reading disabilities.
"I'm having difficulty reading this, can you make a reasonable accomadation for me?", "No, because I don't have difficulty reading this, so therefore it is fine"
"humans tend to relate images better than letters" -- ah yes, which explains why written language never really caught on, and why we still use only hieroglyphics to this day
 
how Western-centric of you :P
I suspect 5 of those thumbsups are fairly recent ðŸĪĢ
 
@Kevin Can it be cancelled as it's part of their culture?
 
Anything can be canceled if you yell loud enough to drown out the opposition
 
Is there a yelling emoji ?
 
Depends. There's one with a censored mouth.
If you just mean talking loudly then maybe not. But I'm not an emojiologist so who knows.
Might be worth another issue on that repo. See if they have github discussions.
 
3:00 PM
I think I would have preferred if the first reply was just "no, it's our culture and we're not changing it. [issue closed as not a bug]". I know a disingenuous "we'll wait and see" when I see one.
 
Maybe they should add an emoji translation of the documentation
 
3:38 PM
Unrelated topic. I've got two Python scripts that would like to send messages to one another, iff the user has them both open at the same time. What should I use for this? Sockets?
subprocess seems inappropriate because I'm not interested in creating new processes. It's the user's job to open the applications manually. If they don't do that, then presumably they're not interested in using the communication feature.
 
i think most things that can be done with sockets can be done with a higher api interface
another way to think about this might be in terms of messaging, using some message queue for the plumbing
 
Yeah, I'm not married to sockets. It's just the first thing that came to mind.
 
unfortunately i dont have any specific suggestions for you here, never attempted this kind of thing before.
 
I can think of a couple approaches, but they're all a bit rickety in one way or the other. Sockets, writing to a common file, multiprocessing.shared_memory, win32 api hijinks... Race conditions and resource leaks abound
 
You could use some kind of queue system like ZeroMQ
 
@Kevin does it help with logistics if the two processes agree on a client/server setup?
 
If those are all the approach you can think of, you should google "python interprocess communication" :P
 
Send a message to the fax machine, whose paper tray feeds into the scanner, which uploads the message back to my computer
 
4:06 PM
@Kevin named pipes?
 
@AndrasDeak Perhaps. On a conceptual level it feels arbitrary to declare one of them to be the server and one the client, but on a practical level it's not harmful
 
Well yeah, if it made sense semantically you'd already be doing that.
 
... Until management comes in tomorrow and says "great job making projects A and B communicate. Now we need project C to talk to the both of them"
 
one server might still help with that :P
 
@MisterMiyagi Reading up on this... Promising.
Windows named pipes are apparently a bit wonky compared to Unix. Naturally.
 
4:10 PM
they exist at least...
 
Yeah, I count my blessings for that
 
Named pipes sound future-manager-proof as well serverfault.com/questions/276834/…
 
@Kevin or there's a publisher/consumer (pub/sub) model of kafka etc.
 
4:39 PM
HDBSCAN is infuriating to try and install on this Mac. I think I've finally learned how to spell "defeat"
#error architecture not supported
     ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'xcrun' failed with exit status 1
 
there's something rather amusing about "fatal error: too many errors emitted, stopping now". As if even the program is too tired of throwing errors, and just wants you to stop.
 
"architecture not supported" would have been a helpful thing to see along the way through this battle but, if it was shown, it was completely buried in the stream of output it kept generating. At least then I would have seen my foe :/
If it's an architecture problem, it's odd that people suggest that I could potentially do it with conda, though. But it took an hour of installation to just get that error :'(
 
you're installing through conda currently?
 
No, this was through pip but with --no-binary :all: and my laptop just sat for an hour on "installing dependencies" and all the fans fired up. No idea what it was doing
 
ah okay. in that case, conda might be a good shout, i'd say it's worth trying
 
4:53 PM
Maybe. I messed up my python installations badly when I first started with a Mac and I'm not confident to get things right a second time for just 1 library. I don't understand why pandas compiles when it requires Cython but this comes about because originally it throws an error about PEP-517
 
why did you want to do it without binaries?
just out of curiousity
 
Same error as this about PEP-517
 
i see. or more like, i see that this is above my paygrade, and i shall now smile and wave.
 
Ooo, I just picked that particular question from a google auto-complete and found a question with a similar (pervasive) error.... and now I see --no-use-pep517 as a suggestion. Maybe that'll work!
 
5:08 PM
Same error :(
On a slightly different level, I don't think I even understand the error. It looks like it's just yelling at me because the package wants to enforce a different standard for installation rather than anything that's going to stop it compiling (the PEP is probably beyond me too as I don't really know clang etc.)
 
5:21 PM
You do have the python devel stuff and such, do you?
 
Good question. I was trying to find a way I could install that but brew can't find it, so I wasn't sure what else to try there because I don't have apt-get
I found something say that if I did brew install python then it would come with it. But I don't want to do that; I really want to try everything else before messing with python installations again
Part of the problem may be that I just don't have an intuition on what Mac actually does. I found Linux confusing at first, coming from Windows, but nothing like this. Everything I find seems to explain it in ways that linux distros can fix... and I can't find a working equivalent
 
5:37 PM
Because according to apple, "you just shut your little mouth and let us handle everything [we want you to be able to do]"
 
Seems painfully true after this saga :/
 
Oh yay... have been asked if I would be up for doing a code review... turns out it's PHP so the answer is already "no thank you", but line 11 is array_push($srcerr, 'Prodcut feed source file not found!'); .... which I thought was probably just a simple typo, but no... reading down further (and PHP isn't anything I want to get involved with) it's entirely yam even from my understanding of the language...
	}elseif($prodCnt==1){


	}else
umm.... that sort of stuff manages to irritate me... is there actually meant to be something there!? :p
 
6:00 PM
Is that an implied pass?
 
Well, now you know why they want it to be reviewed...
 
you have to pour lemon juice on it to reveal the code
 
On the screen, the RAM, or the hard drive?
 
in that order to play it safe, I guess
 
I'd say it's hiding in the RAM; we know that "PHP is actually fast and good now", so it's gotta be in-memory
 
6:04 PM
Might as well pour it over the guy who wrote the code too, for good measure
 
I have a feeling that the PHP written by that person is not modern
 
naming conventions are interesting too: foreach($priceData['PRODUCT'] as $priceDataa)
makes me wonder if the data had another level of nesting, if it'd be priceDatab or priceDataaa....
heh... if($priceDataa['CODE']==$priceDataa['CODE'])... rightio... yep... turning this one down... don't think I can get away with charging 'em for a two word report of "it's yam"...
@AndrasDeak ...or an actual developer? :p
 
@roganjosh I've just checked on my system. brew install python3 and XCode should be sufficient.
The only annoying thing about using brew for python is that venvs break if brew updates python. Though it looks like they fixed that now, keeping the old versions around unless you remove them explicitly.
 
6:22 PM
Gosh, thanks so much for looking into that!
 
Wait until it's actually working for you. :P
Back when I switched from Linux to MacOS, my main problem was leaning to keep my hands out of the OS' innards.
 
This is why I didn't road-test the suggestions until I'd exhausted other approaches (which I think I have by this point but that didn't clear my fears :P )
 
7:10 PM
Can someone tell me what this line is doing? github.com/facebookresearch/detectron2/blob/master/projects/…
 
thats an empty dict typehinted with stuff. since it's a type hint, it won't actually "do" anything
 
are the primitives imported from typing statically-typed?
 
they're just type hinted. it's used for static verification, it doesn't affect what can be assigned at runtime.
 
uh... i'll admit to you i have no idea what your sentence means. but python type hints dont do anything, you could freely violate them if you wanted. You would need to use a static type checker like mypy if you wanted code types to be analysed and used, python and the type hints themselves don't do anything.
 
Thank ye both
 
7:19 PM
The only time I can see a string like "Action" in a type hint is with introspection and that suggests it needs Annotated?
 
Annotated is when you want to add meta-data for use by tools other than type checkers.
 
So what is "Action" doing here in terms of types?
 
It's a forward reference to the Action class
 
@roganjosh ....you're thinking that "Action" is correct. it im pretty sure this code base was trying to typehint that it's holding objects of the class Action
tsk, so much faith in us programmers. shame.
 
Got it. Thanks
 
7:25 PM
i will say though, the way the dict is hinted, this is older version of python isnt it. probably 3.6 and so on
so yeah, im quite sure type hints back then were like the wild west. anything goes.
 
using the actual builtins as generic type hints is only possible since 3.9.
libraries are going to take a while until they can switch...
 
oh, it's that new? i see, didn't realise
... you can probably guess how much i use type hints.
 
Probably worth pointing out that I don't have a single package that fully type-checks. ^^
 
Random thought of the day: I wonder where the phrase "as far as I can tell" came from, and why nobody ever asks "How far can you tell?" as a follow-up question
 
....sigh, here goes my next 15 minutes searching online.
 
7:31 PM
About 14, Aran
On a good day I might smash a 16, but it's rare
 
14 what, roganjosh
 
How far I can tells
 
hm. needs a unit.
 
... that's the joke :'(
 
@Aran-Fey twelve parsecs
 
7:33 PM
tellimetre perhaps?
@roganjosh this is no laughing matter, we genuinely need a unit. ;)
i'll offer up a couple quatloos for the best unit for measuing tells
 
Some measure of brainwave activity divided by a something?
Damn, I've shown my hand now. I didn't realise there were quatloos involved
 
@ParitoshSingh radian!
 
already taken, im afraid :P
 
The unit I'd usually expect is "minutes spent googling"
 
but i can't tell that far :'(
 
7:39 PM
Can boring units be disqualified, please?
 
sure. okay, new rule, boring units are disqualified. the threshold will be decided on the boring factor measured in ..... ah..uhm... hmm...
 
... new contest. How do we measure non-boringness per character of the unit? :D This could take a while...
One thing I like about Room 6 is that there's no Bike-shedding :P
 
You know, you can probably measure distances in bike shed lengths...
 
Maybe we need alpha-wave-amplitude / mean-bike-shed-length?
That might give a measure. But it depends on what those alpha brain waves are cooking up :/
 
 
2 hours later…
10:13 PM
hi
 
hello
 

« first day (3930 days earlier)      last day (1009 days later) »