Better HN
topnewbestaskshowjobs
Log inSign up

davidism

148 karma · joined Jan 16, 2012 (14y ago) · 42 submissions

Submissions

comment 10y ago · link · parent

Start Writing More Classes: http://lucumr.pocoo.org/2013/2/13/moar-classes/

HN discussion: https://news.ycombinator.com/item?id=5204967

comment 10y ago · link · parent

The biggest objection to switching to 3 has been that library support hasn't been there. It's pretty clear that despite reservations about 3, the support is there now. Getting major libraries in the scientific community to focus attention at three can only be good for improvements in support, performance, and adoption.

3.

Python 3 support in scientific Python projects(python3statement.github.io ↗)

5 points · by davidism · 10y ago · 1 comment

comment 10y ago · link · parent

For more information, the current discussion about a new release is at https://github.com/mitsuhiko/flask/issues/1575#issuecomment-...

comment 10y ago · link · parent

Even sub-communites don't solve the problem. There are certain subreddits notorious for dogpiling on posts in other subreddits. The article mentions this indirectly by observing that what starts out on one platform can easily migrate across communities, even to communities you're not aware of.

comment 10y ago · link · parent

There's a mismatch in scale: the number and diversity of members on platforms like Twitter is huge, but the ability to moderate is tiny. It would be interesting to see if a system could detect the dogpile effect, by looking at common phrases, checking if many users messaging one user all follow a common user, etc. and offer some sort of temporary relief until a controversy dies down. On the other hand, that's not actually solving the root of the problem.

7.

Everyone’s offended these days(eev.ee ↗)

90 points · by davidism · 10y ago · 103 comments

comment 10y ago · link · parent

> Although that way may not be obvious at first unless you're Dutch.

There is one obvious way: strings are encoded to bytes, bytes are decoded to strings.

comment 10y ago · link · parent

It's not replaced, both are perfectly valid. And this addition also exists in Python 2.

comment 11y ago · link · parent

Getting rid of timezones is not as good an idea as you might first imagine. http://qntm.org/abolish

11.

California Man Wins Lawsuit After Neighbor Shotgunned His Drone(motherboard.vice.com ↗)

5 points · by davidism · 11y ago · discuss

comment 11y ago · link · parent

HgFlow already exists and is actively developed: https://bitbucket.org/yujiewu/hgflow/wiki/Home. It even goes above and beyond GitFlow and adds generalized streams and sub-streams. I've never had to use those extra features, but the core model works well.

comment 11y ago · link · parent

> People walk away from a game of Cards Against Humanity thinking that they’re hilarious.

Which people? My friends and I walk away from a game of Cards Against Humanity thinking we had a fun time coming up with stupid combinations for an hour. I can also turn the author's previous sentence around and state that there are probably many people that get too invested in elves and orcs as well.

> ... this passes once you’re more familiar with the language and are using it for real things

> ... a large enough subset of the community never reaches that stage

This is true about pretty much every programming language (and probably generalizable to most non-programming things too). The author just happened to apply it to Ruby and Haskell for some reason.

If there's a message such as "programmers should be more aware of the language's strengths and weaknesses and shouldn't feel overconfident", it's lost in the paragraphs of vague complaints.

comment 11y ago · link · parent

This is being talked about now with [PEP 411 - Provisional packages in the Python standard library][1].

[1]: https://www.python.org/dev/peps/pep-0411/

comment 11y ago · link · parent

Yes, if reusable/sharable queries are something you want, then you don't really have a choice but to expose an API for creating and retrieving them. Not sure if you're trying to make some other point related to the `Accept:` header the parent comment was about.

comment 11y ago · link · parent

A fair point. I was referring to the api being separate from the frontend, not what the api is returning. But I could see someone designing their application the way you describe.

comment 11y ago · link · parent

> A GET query is always a URI. Anyone can link to it.

Except this isn't really useful outside of bookmarks in a browser. Who would bookmark an API endpoint returning JSON? In code, it's just as easy to make a request with query parameters as it is with a post body.

    #!/usr/bin/env python
    import requests
    requests.get('http://example.com/', params={'key': 'value'})
    requests.post('http://example.com/', data={'key': 'value'})

18.

Python's response to the recent bug found in Timsort(bugs.python.org ↗)

4 points · by davidism · 11y ago · discuss

comment 11y ago · link · parent

We recognize that it's gotten a bit out of control lately, hence the topic during the meeting. I think we ended up with some good guidelines for managing it.

comment 11y ago · link · parent

Then edit your question to acknowledge the "duplicate" and clearly explain why your question is different. It will automatically go into a Reopen Queue where users will evaluate it and vote to reopen. The system's not perfect, so if it still doesn't get reopened, open a discussion on meta.

comment 11y ago · link · parent

Most comments should end up as an edit to the question or answer, clarifying some point, at which point they can be removed. The Question and Answer are the important things on Stack Overflow, not the communication that went into creating and tuning them.

The remaining comments are just fluff, such as "thanks", which can more appropriately (for the site) be expressed as an upvote or accept. Or they're asking a new question, in which case the parent's comment applies.

comment 11y ago · link · parent

The answer was not closed, the question was. This is not a bad thing, as it funnels everything towards one canonical location.

comment 11y ago · link · parent

They don't have much value to Stack Overflow, obviously, otherwise they would have remained opened and been voted up on Stack Overflow.

comment 11y ago · link · parent

Honest mistake on my part, thanks for linking it.

25.

Why Stack Exchange (Still) Believes in Private Offices(blog.stackoverflow.com ↗)

5 points · by davidism · 11y ago · 2 comments

comment 12y ago · link · parent

That warning is old. Most popular Flask extensions work well with Python 3 now. I've recently written a large Flask application targeted at Python 3 with no issues. If you have problems with Python 3 compatibility, report the issue, the maintainers are good about fixing these things.

comment 12y ago · link · parent

To solve this, I have a custom Celery instance that wraps each task in my flask app's context. So you can treat celery tasks as just another request.
12