« first day (4060 days earlier)      last day (871 days later) » 

7:19 AM
cbg!
looks like I'm early for once
 
 
2 hours later…
9:40 AM
btw, does anyone happen to know an equivalent/similar module for mouse control, but like the python-evdev module? I'm aware of at least two but:
 1. `PyAutogui` have way more dependencies/requirement than `evdev`, and I prefer to not depend on it too much because of this...
2.`Pymouse` is promising, but I can't make it work right because of how outdated it is, on my current python install and it also require a weird python module called java.awt, which I don't know where/how I could install it on first glance (it's also incorporated into the module `PyUserinput`, but it isn't updated there either.)
I'm on linux
 
9:55 AM
point 1 doesnt seem particularly sensible.
if it works, why wont you use it
 
Hey Paritosh :) After our discussion a few weeks back, I've ended up having to re-evaluate what I'm going to build my new solver in (it was originally Cython). Any guesses?
 
@ParitoshSingh well, for this specific case, I just don't want to use it if it has more than one deps/requirement :) there are numbers of reason as to why, and I think it would either take too long to explain why or would just side track the chat (like what happened last time when I mentioned one of my pet project...)
but yeah, I wouldn't mind the deps otherwise, it's just for this specific case
 
@roganjosh is it rust? makes cute puppy face
 
In one!
 
woot woot! All aboard the hype train!
 
10:02 AM
@ParitoshSingh oi! making cute puppy faces is my job! :p
 
ha, seems like it works just like a bat signal, but for puppers, hola!
@NordineLotfi ok, that's good enough for me.
 
howdy - how goes the day?
 
There are a number of open-source VRP solvers, and they're all cannibalising each other so I went looking for the newer implementations and found this which uses a similar structure to ones I've been involved in in the past. Turns out it's not completely illegible/alien to me so I think I have a shot of building my own in Rust
 
actually, evdev module support mouse, but afaik, it doesn't actually have support for virtual mouse, compared to it's virtual keyboard support...so if I were to use this, I would need to hook it to a real mouse, or know the binary specs that it use with uinput
I guess I'll just use Xlib module if I don't find anything else :/
 
10:32 AM
@JonClements not too bad thanks, yourself?
 
@roganjosh same old, same old... :)
normal SSDD
 
We've been having so much SQL-related fun recently. Our cluster frequently hits the 500 connection limit now, which break the Matrix. All of the fires.
 
sounds like fun
 
Related, I found something fun from one of our customer projects - Dynamics 365 apparently doesn't do NULL. I don't suppose you've ever had to query that ecosystem?
 
thankfully not :)
 
10:41 AM
Blast!
 
I'm sometimes busy enough with 200 postgres servers across 5 global data centres that have replication issues now and then (that or someone yams something up)
oh wow... and wtf... Microsoft Dynamics AX does not support the concept of null values that is available in many other Database Management Systems (DBMS). A field in Microsoft Dynamics AX always has a type and a value.
 
... right?
And worse, it looks like it has some placeholder value for NULL that one of our query engines can snag, but psycopg2 might not
At least, that's my running hypothesis because stuff isn't making sense between our systems
 
Then it goes on to say: Any value with its date portion as 1900-01-01 is treated as null, regardless of the time portion value. Therefore the value 1900-01-01T22:33:44 is treated as null.
so... err... it doesn't have nulls, but will treat values as nulls anyway!?
 
"Any value with its date portion", though. So what about null floats, etc? I can't make sense of it properly. Basically, their system could be doing anything and it's borking our queries. The customer switched to that system and suddenly our deduplication query has collapsed and we've got hundreds of thousands of dupes
 
10:57 AM
Hey all! I would like thank all the users of the chatroom who helped me with my project. <3
If you wanna see my project, here you go: drive.google.com/file/d/1YCQVf6_JeqC8rSXAVhTUTYW5p6_yqaPI/…
 
11:11 AM
@roganjosh well.... there's no such thing as a null float :)
 
I can have an unpopulated float column, though?
conn = sqlite3.connect(":memory:")
c = conn.cursor()

c.execute("""
          CREATE TABLE test(
              something VARCHAR,
              other FLOAT)
          """)
conn.commit()
c.execute("INSERT INTO test (something) VALUES (?)", ("hello",))
conn.commit()
print(c.execute("SELECT * FROM test").fetchall())
conn.close()
What's it gonna do with that situation?
 
11:41 AM
you tell me? :p
.fetchall bugs me though - you don't use that in production code do you?
server side, it won't care... it's just got a transaction and cursor waiting to deliver...
 
No. I just wanted to illustrate that I have no idea what Dynamics 365 is going to do with that situation, only that it does something and that's probably what's broken our deduplicator
You told me I couldn't have nullable floats. Perhaps you might be right on semantics, but that's what I was referring to
 
when you say You told me I couldn't have nullable floats - are you referring to me or the really weird system you're trying to use?
 
36 mins ago, by Jon Clements
@roganjosh well.... there's no such thing as a null float :)
 
ahh sorry... maybe I should clarify... there's not a null float... there's either a null or a float
 
I'm also not using the system. Note, I don't work for this company or anything. We're a service provider for them, so we pull their data into our own systems. I'm not a contractor any more :P What I'm saying is that this client changed their backend and suddenly when we pull their data, we now get massive duplication from a query that's worked for years
 
11:50 AM
sounds all too familiar
 
I should also clarify what I meant by "null float". From that bat-yam documentation, it tells us that and actual date(time) can be considered NULL, and that there cannot be actual NULL values. So my point is; what the hell does it do with a FLOAT type column if there's no data? Does it just insert 1.2345 or something? :P
 
had to change some code that'd be running fine for nearly 3 years the other day because they decided to re-do their api
@roganjosh from their docs - it would seem 0 is a null? Even though 0 is a value!?
 
Now you're seeing my pain :P
 
was feeling it a while back if that helps :p
seems so contradictory
err... good luck? :P
 
I'm just gonna try see what we're pulling through because I really can't get my head around how that D365 system is supposed to work
 
12:09 PM
"differently" it seems :p
 
The only thing I know at this point is that ISNULL() in Redshift doesn't have a hope in handling this data. Thanks Microsoft for this fantastic X++... innovation.
 
12:23 PM
uhm, probably a weird question and not usually wanted, but does anyone know how to make a blocking while loop? as in, similar in spirit to what the socket modules does when waiting for data coming in, using recv and such. I recall some call it an event loop, but not sure.
I know I could just wait/use time.sleep but prefer not to
the use case for this would be to not have to wait, and thus have near instantaneous action in the loop + not having to spam/use too much of the cpu
 
@NordineLotfi a blocking while loop - errr - what's the use case here - it sounds very odd if you're dealing with sockets
 
@JonClements I'm not dealing with sockets per se -- this was just an example to illustrate an existing solution/example
another example less known would be the loop function used by the third party python-evdev module, which also is a "blocking while loop" too
 
right... so you provide an example that isn't actually your problem... that's not exactly useful to get answers
 
I don't know enough example of this existing, but based on my own observation, I know it's possible (without using wait/sleep, etc)
@JonClements it isn't, but it is for me here -- I like to usually ask completely irrevant things externally, but internally, it will help me tremendously
and even if I end up wrong, I mean, learning by doing doesn't hurt :)
 
What is a non blocking while loop?
while True:
    do_thing()  # <- "near instantaneous action in the loop"
 
12:31 PM
@AndrasDeak true but,
5 mins ago, by Nordine Lotfi
the use case for this would be to not have to wait, and thus have near instantaneous action in the loop + not having to spam/use too much of the cpu
you didn't take into account the other thing i mentioned :)
as explained, it is possible, even if the term/example are scarce/incorrect, the result make sense based on how I described it/observed it
just look at the two example that already exist(that I previously mentioned earlier)
 
The two things you want are at odds with each other. You can either wait, which doesn't use much CPU, or you can constantly check if your condition is met, which uses a lot of CPU
 
^
what you're describing sounds like an event loop which is the opposite of "blocking"
 
@NordineLotfi to be fair - we have taken into account what you've written - you're just not making too much sense in your description of what you want
and yeah.. what @Aran-Fey said
 
right, then let me ask another question instead:when using the socket module, say you have either a client/server implementation, one send data and the other receive right?
the one that send it, if using a while loop, just as Aran-Fey suggested (and that you would normally do) would work here, but if you wanted it to not wait/use sleep, and do action instantaneously, it would do so at the cost of more cpu cycles/usage
that's fine
but then, let's look at the receiving end
 
Are you trying to invent concurrency?
 
12:37 PM
@AndrasDeak ...are you telling me this is what it is? :o
 
I'm not really sure what you're asking and I'm not great with async, so not really.
 
alright
 
others here do know concurrency so they "only" have to figure out what you're asking
 
@NordineLotfi okay... for my sins, I might give this a punt, then what - what about the client end?
 
so as I was saying, if we look at the receiving end this time, (here, using recv from the socket module on the receiving side) it will do what I mentioned earlier, that is, it won't "wait/sleep", and if it ever receive any data, it will do whatever it was tasked to do, as fast as it receive it (as in, as soon as it receive it, sorry if I'm not explaining right)
and, without using too much cpu on that part, compared to a normal while loop
I'm i making any sense or? I'm not sure if there a better term than "blocking while loop" but I felt this made sense to me at least :/
 
12:42 PM
might be easier if you gave an example of what you expect in/out and what should happen in between
 
The "don't want" part of your description seems to be a busy loop: en.wikipedia.org/wiki/Busy_waiting
The usual remedy is... not to busy loop. :P
*exits chat room left*
 
audience goes wild
 
alright, last example I could come up with: a blocking read. I know how to do this, and I'm sure it sounds more familiar than whatever I mentioned here
 
@NordineLotfi at this point it might help if you defined what you believe "blocking" to be
 
how could I use something similar to that but to something else than a file object? (since usually it's used on stdin, etc) but on say, a variable/function's output?
 
12:46 PM
How is the variable/function's output going to change while you are waiting?
Is it running in a separate thread?
 
@MisterMiyagi yeah, that would be one of the use case
 
"one of" :p
 
@NordineLotfi You are looking at synchronisation, then. See e.g. docs.python.org/3/library/threading.html#lock-objects
 
@MisterMiyagi will I have to wait/sleep or will it use as much cpu as a "busy while loop" as you mentioned?
I basically want it to behave like a blocking read on stdin, but on something else than a file object
 
Lock.acquire() is backed by the operating system. In the usual cases it will be very efficient.
 
12:49 PM
I see
 
A function returns only once. So is it that
1. the function returns once in the future, or
2. it's not a function but something that generates results incrementally (like a generator)?
 
@AndrasDeak the 2. one yes :) (sorry if I forget to mention this part)
@MisterMiyagi so does that mean that the concept of "blocking read" or "blocking while loop" only exist in some form at the OS level? would be great if a pure python solution could exist somehow (maybe using the select module or smth, not sure)
 
What is "pure python"?
 
I also know linux does it on linux pipe for example, but I never saw/discovered any pure python solution of such concept yet (where it block read until data comes in)
@roganjosh as in, only using local python import (no C binding, etc)
 
@NordineLotfi The kind of "blocking" you describe only makes sense between threads. Those cannot exist without the OS.
The pure-Python solution is async and event loops.
These are reasonable straightforward to implement yourself if you know how.
 
12:54 PM
@MisterMiyagi I see! so I guess I wasn't completely wrong in thinking of event loop earlier hmm. Didn't know about async working this way, this is nice
Thanks for everyone help, I think I get to understand now :D
 
I'm confused now about the distinction between Python and having to call into the OS. Surely that's what CPython does and the OS orchestrates the program... otherwise nothing would ever run
 
@roganjosh you're right and I agree with you -- except we may not talk about the same representation/meaning here: Here I meant pure-python as in, only writing by hand local import, no third party import or external C binding (except for ctypes if that count as C binding?).
(as in, visually speaking, not talking about the result itself where the code may or may not be dynamically compiled/etc)
as others here noticed by now, I don't always know or find the exact term, if it exist, for a particular concept/representation, so maybe what I meant here by "pure-python" could be localized(?) to a single term
(just like earlier with the "blocking while loop" concept that I asked about)
well, at least I do know how to explain in length what I mean, even if no one beside me understand it (right away*) ;-;
 
1:21 PM
skipping 18709: INVESTIGATE LATER RE: LOCATION DETAILS
4 days later... sighs
 
@roganjosh nvm, I guess I got confused; guess you meant what you said earlier as an answer to what MisterMiyagi said :)
@JonClements SQL stuff?
the capitalized letter is almost always a clear giveaway it's about SQL stuff hmm
 
nope - API's that suddenly change the rules without telling you
 
@NordineLotfi No, it was to your comment
 
o-o
@roganjosh ah, gotcha :)
@MisterMiyagi btw, I think I nearly got a "blocking while loop" using async_read :D
@JonClements I'm guessing it's on company's api? don't they have some automated test in place to check for API change or something like that?
 
not this one... they just change everything, notify nobody and then blame it on the users to not having kept up :p
 
1:33 PM
@JonClements that's sad -- I wouldn't be surprised if they lose clients over something like this
 
you end up phoning the company and getting a "no we haven't changed anything" to then a few days later getting call back saying "oh yeah, we acutally changed X"
 
welp, guess they can't bother remembering their own api changed
 
c'est la vie
 
 
1 hour later…
2:59 PM
Hi folks, I don't understand why we don't just create local variables instead of modifying the function parameters in the following code: gist.github.com/pstricks-fans/98edb23a762994d5f119ac10cb93a905.
 
3:17 PM
It seems to me the parameters l and r are not mandatory because the array length can be obtained internally. :-)
 
in principle, that function would allow searching in a slice.
But it's probably because someone poorly translated an iterative algorithm.
 
@MisterMiyagi OK. It makes sense. Thank you!
 
 
1 hour later…
4:39 PM
My laptop is starting to freak me out. Despite the switch to a completely new SSD and a fresh install of the OS, both Windows and linux have somehow managed to remember a few of my settings
Anyone install Manjaro (Gnome version) recently? Is it now default to open files/folders with single click instead of double click, or is my laptop haunted?
 
 
2 hours later…
6:14 PM
How can I ensure that the versions of my package's requirements are correct before I publish a new release? Is there a way to configure tox to install the oldest permissible version of each dependency maybe?
In other words, how do I find out that requires = ["foobar"] is wrong and I need to change it to requires = ["foobar>=1.2"]
 
 
1 hour later…
7:19 PM
usually you just wait for your users to open an issue saying "is foobar 1.5 broken somehow?" and then you add "!=1.5" to your list. The earliest version that you allow is the one that includes all the features that you are using
you get that version by knowing all features that you're using by heart, and scanning your dependencie's changelog.. If there is a better way, I'd love to know it
 
That's the problem, I don't want to manually go through every feature I use and find out when it was added
Maybe I'll send the tox guys a feature request
 
I heard that in other languages, every lib ships its public API statically on each release. wouldn't that be neat?
 
The obvious solution is to, uh, parse pip index versions [dependency] for each dependency, taking the minimum that fits your version requirements, replacing each dependency with a pin, then running the tests. Obviously.
sounds like a hard task and for a version resolver
 
@AndrasDeak Yeah, that's probably what's gonna need to happen. The question, who's the poor soul who'll have to write the code for it? Me or someone else? :D
I accidentally a word. As usual.
 
nah, it's just poetic
The problem is that the resolver would properly have to take into account all valid forms of version specifications, and this feature would have to promise that some kind of optimal combination of "lowest" versions are found. Should the feature ensure that any higher version of any dependency will keep working? I don't know!
which is to say you're probably better off implementing something limited that works for your dependency tree, while you wait for the FR to be implemented
 
7:36 PM
Ah, so the answer to "me or someone else" is "both". This is an unexpected outcome.
 
I mean if you do it in public then you'll become the someone else, suddenly being in possession of a promised solution to a common yet fickle problem. And one that can work outside other packaging frameworks. You just need a tool you can run once and it will tell you the right dependencies...
with an exponential list of issues opened, I bet ;)
 
Hmm, automatically figuring out the correct version might actually be doable. I didn't even dare hope for that much
 
Doable, but NP hard, right?
since != specifications are a tihing, it might happen that a later version or more of them break, then unbreak
 
Halting problem hard, probably. But realistically you don't need to go that far
 
question is whether you want an exact dependency specification, or just a combination that works and is "low-ish"
@Aran-Fey at worst you can gather every single available version that fits your individual version specifications, and run your tests with every combination. Markedly finite cases.
 
7:45 PM
Just doing a bit of static code analysis to figure out if you're trying to access something that doesn't exist (yet) or calling a function with a parameter that doesn't exist (yet) should catch most cases, I imagine
 
My picture of != version specifications is of semantic issues. But I haven't had to use that ever, so I'm extrapolating from an empty set.
but it sounds like you're planning for LBYL and I have EAFP in mind
If the dependencies use intersphinx then you can directly look at the respective inventories. It again won't be foolproof, but a good estimate of the public API.
I mean for missing names, not missing arguments.
 
Hmm, let's see... my local "projects" folder contains 61 items, and my github contains 1. Yeah, I think I'm in a good spot to start working on yet another new project...
 
Hello guys,

Have your worked with Python images libraries before?
 
@Avra just ask your question
 
@AndrasDeak Interesting idea, but probably not sufficiently reliable
 
7:55 PM
Yeah, I first thought that something undocumented would be perfect in the "don't assume it's there" sense. But documentation is just too flaky, I mean there are many ways something is missed. And many projects don't use (inter)sphinx. Overall it just doesn't cut it to make such decisions on.
 
A tool that checks whether everything my package exposes to the public is also present in my documentation is next on my list...
 
admittedly I'm primed by having waded through a couple of object inventories a few days ago, when trying to make your sphinx extension suggestion work
@Aran-Fey do you have a working solution to "everything my package exposes to the public"? Just public in the "no leading underscores" sense?
 
What's this about a sphinx extension? I don't remember any recent conversations about anything sphinx-related
 
@Avra (I didn't say ask me. Anyway.)
 
@AndrasDeak Just grab every name from every __all__ definition in the whole project, done. Good enough for me
 
7:58 PM
I see.
 
@AndrasDeak Oh, that. Is it difficult to set up? I'll admit I haven't gotten around to trying it yet
 
@Avra the original version was best... for future reference please see our code formatting guide to chat and practice in the sandbox if necessary. I'm somewhat shocked you haven't been pointed to this before.
@Aran-Fey lol
 
I was led to believe it pretty much works out of the box
 
Sure. So I am just a little confused how the code above places 2 images per column aligned.

I tried to change parameters to get a sense of what it's doing, but still not fully understanding how it works.
 
I pretty much only tried it out of the box for a larger project I don't own, and I could only make it work for top-level names in a module but not methods on objects in doctests. It's supposed to work because it works in their own docs, but I didn't have the time nor expertise to try and make it work. The missing third-party method links seemed to be due to missing intersphinx inventory items. But intra-library references would have to work still.
@Avra Please repost that code block with proper formatting, or link to a code paste service.
 
 
1 hour later…
9:25 PM
github goes boing
 
oops
 
good time to play with the 500 error parallax illustration
 
"Incident with welp everything"
 
Too bad they don't have a Wile E. Coyote-type illustration of Octocat falling to the bottom of the canyon and hitting with a little poof of dust.
Github down? I can handle that for a little while. Stack Overflow down? Aaaaaarrrrggggghhhh!!!!!
 
 
1 hour later…
10:40 PM
finally, GH is back up :-)
 
no, it's flaky
I've seen it up and then down again. Until githubstatus.com is all green it might go back down again.
 
11:42 PM
now it's fixed
 

« first day (4060 days earlier)      last day (871 days later) »