HNHacker News
TopNewBestAskShowJobs

bobbyi

1,158 karma · joined April 1, 2007

submissionscomments
bobbyi··on Django 4.0
When I first started using the python tool/ library named fabric, I knew that putting just "fabric" into google would not get me what I wanted, so I instead searched for "python fabric". The top results were trying to sell me handbags and boots.

(These days, the library does rank first for "python fabric").

bobbyi··on Git ls-files is Faster Than Fd and Find
This has annoyed me in the past: https://stackoverflow.com/questions/9883851/why-git-ls-files...

It's a useful command that I consider to be relevant to end users, not just an internal "plumbing" utility

bobbyi··on Weekly Top 10 lists of the most-watched TV and films
How are the names of the movies in the table not links that take me to the movie so I can watch it?
bobbyi··on Facebook Unceremoniously Kills Off 'Oculus' Brand
New Playstation VR is on the way.
bobbyi··on New language features since Java 8 to 17
I imagine there's a reason it's necessary, but it's weird that "sealed" is basically "final" with the ability to do "permits" instead of just adding "permits" as a keyword that can be put on "final" classes
bobbyi··on You shouldn't invoke setup.py directly
The only case where I still invoke setup.py directly is "python setup.py test". I already knew it's deprecated, but don't understand what I'm supposed to do instead.

The article recommends tox, but how did tox get installed?

I can currently create and activate a new empty virtualenv, "pip install -U pip", clone and cd into my project, and run "python setup.py test". My test dependencies are automatically setup and my preferred runner (pytest) is used. If I change those in the future, the same commands will keep working because I am configuring those in setup.cfg, etc.

If I am now expected to manually "pip install tox" before testing my project and change that in the future if we start using something else, isn't that a step backward to the situation pyproject.toml et al were supposed to solve with needing to manually install specific stuff before using a project?

bobbyi··on You shouldn't invoke setup.py directly
> Not if your build step includes code generation (other than Cython).

Is it possible for Cython? Their guide shows using setup.py:

https://cython.readthedocs.io/en/latest/src/tutorial/cython_...

bobbyi··on The wealthiest 10% of Americans own a record 89% of all U.S. stocks
That is household income. A lot of households have two adults with jobs, so don't conflate that number with what an individual makes.
bobbyi··on My Logging Best Practices (2020)
Yes. I think logging before is still useful, but it is for hangs, not exceptions.

If your program disappears into a black hole doing some operation that doesn't have (and needs) a timeout specified, you want to know what it was about to do when you last heard from it.

bobbyi··on TrackerZapper Mac app silently removes tracking parameters from links you copy
"Transparently" is a conceptually similar word that had positive connotations
bobbyi··on What’s New In Python 3.3
Python 3 has been making performance improvements over 2.x. 3.2 included the new GIL. 3.3 includes more memory-efficient Unicode strings.

Pypy is focussed on supporting 3.x. There are two major initiatives going now, one of which is numpy support and the other is Python 3 support.

People aren't "investing time on Python 2.x libraries and features". Python 2 is going to just receive security and bug fixes and all new work is on Python 3. Major libraries are currently supporting Python 3, including almost all of the widely used ones (numpy, scipy, sqlalchemy, virtualenv, etc). The ones that aren't, are being ported (django, twisted).

Overall, the tone and information in your post is quite outdated. Your sentiments were shared by a lot of people circa Python 3.1, but now it is 2012 and the Python ecosystem has mostly got a handle on how to straddle two versions, after being help up for a bit by discovering that the initial "lib2to3" approach wasn't the best solution for many projects.

bobbyi··on What’s New In Python 3.3
Most significant libraries and tools work with 3.x by this point. SQLAlchemy, numpy, scipy, cherrypy, WebOb, pymongo (as pymongo3), virtualenv, pip, pygments, jinja2, tox, nose, ...

It's too bad that django, zope and werkzeug (flask) aren't there yet. I understand that a lot of people on this site use django and so these discussions are always dominated by people complaining that they can't use Python 3 because their dependencies (django) aren't available.

But the Python community is much bigger than django and today most of the rest of the ecosystem is ready and working fine. The parts that aren't, are getting there rapidly.

bobbyi··on Ask HN: Who is Hiring? (March 2012)
San Francisco, CA

Affine Systems generates data about online video using computer vision (face recognition, product recognition, scene classification, etc.) for advertisers to use in targeting and filtering their online video campaigns.

We did over a million dollars in revenue over the last two years working on campaigns for major brands. We recently raised our B round, led by Crosslink Capital, the investors behind Pandora.

We are looking for test-driven engineers to work on an internet-scale video processing pipeline using Python, MySQL, Hadoop, Selenium, ffmpeg and other open source tools. Its goal is to find and ingest videos from web pages and to generate and store metadata about those videos using our vision algorithms written in C++.

If interested, please contact me (founder/ chief engineer) at bobby@affine.tv

Thanks.

ITERN and H1B are welcome. No REMOTE hires, please.

bobbyi··on Splash screens == sloth
They can't follow the article's suggestion of giving you a mini-game to play during the load screen because that would violate Namco's patent 5,718,632 which covers exactly that:

http://www.google.com/patents/US5718632

bobbyi··on Django ORM vs. SQLAlchemy
Isn't Hibernate SQLAlchemy for Java?
bobbyi··on Python for Humans
> it has a rather arcane interface, in particular if you want to read the output (stdout or stderr) of a subprocess.

  oputput = subprocess.check_output(my_command)
bobbyi··on Python for Humans
If backticks are good enough for them, then they don't need the more complex usecases that Popen allows, so just tell them to use check_call or check_output. As far as they should be concerned, the subprocess module has two functions that are straightforward to use.

And those functions are more convenient than the default behavior of backticks, because they handle for you raising an exception if the subprocess fails.

Python:

  import subprocess
  output = subprocess.check_output('command')

Perl:

  $output = `command`
  die "failed: $output" if $?
bobbyi··on PySmell - intellisense for python
How does it compare to the completions provided by rope?
bobbyi··on Steve Losh's .vimrc
I find semicolon and comma to be very useful so I am surprised when I see people remap them or use them as leader.
bobbyi··on Ask HN: Please stop "This."
"The post is word-for-for the one that I opened this page in order to post".
bobbyi··on Modern Web Application Architecture
He talks about wanting to charge for the API. If the javascript on your public website directly calls your (otherwise paid) API, how can you avoid exposing the credentials it uses which are unmetered?
bobbyi··on Git 1.7.7 changes affecting the everyday developer
You could use Plone

http://plone.org/documentation/kb/how-to-create-a-plone-blog...

http://plone.org/documentation/kb/mailtoplone-integrate-emai...

bobbyi··on It’s time for Python 2.7
Have you tried pypy?
bobbyi··on Ask HN: Who is Hiring? (October 2011)
San Francisco, CA

Affine Systems generates data about online video using computer vision (face recognition, product recognition, scene classification, etc.) for advertisers to use in targeting and filtering their online video campaigns.

We did over a million dollars in revenue last year working on campaigns for major brands. We recently raised our B round, led by Crosslink Capital, the investors behind Pandora.

We are looking for test-driven engineers to work on an internet-scale video processing pipeline using Python, MySQL, Hadoop, Selenium, ffmpeg and other open source tools. Its goal is to find and ingest videos from web pages and to generate and store metadata about those videos using our vision algorithms written in C++.

Please no remote hires. You must be able to work alongside us at our office in San Francisco five days a week.

If interested, please contact me (founder/ CTO) at bobby@affinesystems.com

Thanks.

bobbyi··on “I hate almost all software” — Ryan Dahl
He lost me at tab completion
bobbyi··on Show HN: PyCloud, a Python IDE in the web browser with interactive tutorials
If I try "import math" or "import itertools" I get an ImportError. "import sys" works though.
bobbyi··on Ask HN: Who's Hiring? (Intern Edition)
San Francisco, CA Affine Systems generates data about online video using computer vision (face recognition, product recognition, scene classification, etc.) for advertisers to use in targeting and filtering their online video campaigns.

We did over a million dollars in revenue last year working on campaigns for major brands. We recently raised our B round, led by Crosslink Capital, the investors behind Pandora.

We are looking for test-driven interns (and full-time) engineers (and sysadmins) to work on an internet-scale video processing pipeline using Python, MySQL, Hadoop, Selenium, ffmpeg and other open source tools. Its goal is to find and ingest videos from web pages and to generate and store metadata about those videos using our vision algorithms written in C++.

We are looking for paid interns for this semester (and beyond) who are capable of working alongside us in our office in San Francisco.

If interested, please contact me (founder/ CTO) at bobby@affinesystems.com Thanks.

bobbyi··on Show HN: Pump, a dead simple Pythonic abstraction of HTTP.
They are both predated by:

    public class App extends HttpServlet {
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/plain");
        response.getWriter().println("Hello world");
      }
    }
bobbyi··on Forgotten C: The comma operator
Item #7 in More Effective C++ is to "never overload &&, || or ," because it changes the order of evaluation (with the boolean logic operators, it changes because the usual short-circuiting behavior is gone since the second argument has to be evaluated to pass it as an argument).
bobbyi··on Forgotten C: The comma operator
C++ allows overloading the comma operator. This can be (ab)used to make the following syntax work for, e.g., initializing a vectorish type:

    MyType obj = 1, 2, 3;
Due to the precedence of operators, this is actually equivalent to

    ((MyType obj = 1), 2), 3;
so as long as the overloaded assignment operator returns an object that the comma operator mutates and returns, this can be made the have effect of initializing the declared object to a "list".

This trick is used by Boost Spirit to allow things like (example from http://stackoverflow.com/questions/54142/c-comma-operator)

    keywords = "and", "or", "not", "xor";
← PreviousPage 3 of 13Next →