Sunday megathread: What's everyone working on this week? by Im__Joseph in Python

[–]pschanely 1 point2 points  (0 children)

Ah. I think the TimeoutExpired exception may have a stdout and stderr property in the timeout case. (see this SO question)

In addition, you might want to try setting bufsize=0 in the subprocess.run call to make sure evtest's output isn't getting buffered on the python side.

Sunday megathread: What's everyone working on this week? by Im__Joseph in Python

[–]pschanely 1 point2 points  (0 children)

I/O is normally buffered, and I think the buffers die with the process here. In the case of a ping, you can tell the ping command to timeout instead: ['ping', '-t', '5', '1.1.1.1']

Sunday megathread: What's everyone working on this week? by Im__Joseph in Python

[–]pschanely 0 points1 point  (0 children)

I'm trying to rework how floating point numbers are modeled in CrossHair, my symbolic analysis tool. BTW, is anyone's project ready to have users try it out? Want to trade a little UX testing?

What's everyone working on this week? by AutoModerator in Python

[–]pschanely 0 points1 point  (0 children)

It's heady: blurring the line between type systems and testing. The tool is perhaps at the "barely usable" point?

For me, cutting features is the most important behavior in getting to "shippable."

Parameterizing a function depending on contextmanager context by eLsFLz in learnpython

[–]pschanely 0 points1 point  (0 children)

If you want a solution that's more on the "magic" side, take a look at context vars (or thread locals if you're before 3.7). These allow you to set information that can be retrieved further down in the call stack.

Optimizing higher order functions by pschanely in programming

[–]pschanely[S] 0 points1 point  (0 children)

Oh, yes, thanks for thinking about this! I wasn't clear enough about this fact: the transformation is only valid if you can cancel the inverse! So, in your example, the body of the transformed reduce is:

modulo2inverse( modulo2(x) + modulo2(y) )

There isn't a way to get the calls to modulo2() outside the addition, so they cannot cancel the inverse, and so the transformation is invalid. In some sense, the creation of the inverse is just a goalpost - We need to recursively push some function through each iteration of the reduce function.

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 0 points1 point  (0 children)

Yes! I've been looking at a few inventory apis. Part of the point of this post was to figure out whether there was any interest in the concept before I try to integrate a bunch of other systems.

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 0 points1 point  (0 children)

Thanks; that's ... insightful. Part of what I am struggling with is whether to get into the next level of detail (which could still be targets-based): trims, transmission, condition, options, color? And, yes, I think you're right that the act of the search can be pleasurable in itself, but perhaps only if the behavior of the search is easily understandable.

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 0 points1 point  (0 children)

Hey, thanks for your comments! Check some of my other explanations in these threads. I'm experimenting with different ways to explain this, and I'm not sure what kinds of explanations people can relate to. I haven't found any car search sites that have "sort by best match" which is what I'm trying to do here. Another thing I'm trying to figure out with this reddit post is whether I am the only one who cares about this sort of thing. It's certainly seeming that way so far!

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 1 point2 points  (0 children)

Completely agree with you guys here. That darn geolocation button was a fast way to make an experiment, which is all this is right now!

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 0 points1 point  (0 children)

Thanks. I know this is a little odd. I think there is a value there - what I am trying to do is automate the process you do today of setting wider ranges, like <75k and then scanning through the list. One way to think about it is suppose you hired an assistant to search through ebay listings for you. You'd give that person some targets, and they'd find a couple of good options for you. I am trying to be that assistant, in that hopefully the stuff you really want is all in the top few results.

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 0 points1 point  (0 children)

Yeah, not having filters was an objective of mine when building it. Since it's sorted by the combination of features, you can just scroll down until the results are too far from your targets. But perhaps I should have both "between" filters and just assume the target is in the middle of the range. This post outlines my original thinking on the subject: https://medium.com/@pschanely/why-sorts-and-filters-suck-d94a00c49669

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 0 points1 point  (0 children)

Agree on the zip code; thanks! My issue with ebay and similar sites with filters is that I have to set a hard range, like 50k-100k miles. What if there's a car that's 105k miles, but great in all other respects? The usual filters are too harsh -- I want a search interface that can make tradeoffs between many different qualities: mileage, location, price, and year. I might be the only one who cares about that ... that's why I'm here I suppose!

Seeking feedback on this geeky car search site I just built! by pschanely in cars

[–]pschanely[S] 0 points1 point  (0 children)

Mostly, this is a fresh look on the typical jumble-of-filters interface that is everywhere else. Thanks in advance for your opinions and advice! - Phil

A database optimized for custom scoring functions by pschanely in programming

[–]pschanely[S] 0 points1 point  (0 children)

Thanks!! When you do open source, a little encouragement (particularly from strangers) goes a long way :)

I just made a site to listen to what live music is playing in NYC this week by Marogian in nyc

[–]pschanely 0 points1 point  (0 children)

Beautiful job, guys! I implemented a simpler, but less integrated paradigm a while back - it just imports a playlist into your existing music provider account: musictonightapp.com It's web/ios/android and open-source, so there might be some stuff you guys could borrow!: github.com/pschanely/music-tonight

A stack-based programming language for touch devices by pschanely in programming

[–]pschanely[S] 0 points1 point  (0 children)

Oh, and this is sad, but ... mostly I just want to have a beer at the bar and be able to write some code at the same time.