Better HN
topnewbestaskshowjobs
Log inSign up

softbuilder

1,830 karma · joined Mar 6, 2008 (18y ago) · 493 submissions

http://youell.com/matt
Submissions

comment 15y ago · link · parent

>the New York Times reported that there were 23,068 reported pickpocketing incidents in the city in 1990, amounting to nearly $10 million in losses.

That's over $400 per incident. Either people carry a hell of a lot of cash on them or there are some outliers with some interesting stories to tell.

comment 15y ago · link · parent

You're conflating decorator syntax, which I'm not discussing, and decorator functionality, which I am discussing. If there was no syntax for decorators and the only way to decorate a function was to use assignment/composition like in your example, I would still consider that to be a decorator.

A macro is going to be evaluated at compile time and will result in a matching pattern (often something that is structured like a function call) being expanded into some other construct that will be evaluated at runtime.

A decorator is going to be evaluated at compile time and will result in a decorated function being "expanded" into another function which will be evaluated at runtime.

No, they aren't the same thing. How could they be? The languages are different. But there is an underlying affinity.

comment 15y ago · link · parent

As jfm3 points out, you're not going to define new language syntax with decorators. You're also not going to apply them on the spot, inline with other code, since they are defined on a function, and aren't used in the same way as macros are in Lisp.

What you can do though is define behavior that varies based on the context. For example in Python you don't have function overloading or types, but with a decorator you can effectively create that type of behavior. So while you're not changing the language, you are changing the semantics of the functions you decorate.

comment 15y ago · link · parent

"Damned close" perhaps should be qualified as from the point of view of a Pythonista, given the ideals of that approach to programming. I took issue with the specific point that Python "has no macros", and then I qualified it, knowing full well that Lisp macros do more.

Decorators ultimately result in a function that is a substitute for another function. That function can have all sorts of wonderful runtime behavior, including access to arguments, the call stack, and other functions. Dismissing them as "adding stuff that happens every time the function is called" misses an entire dimension of their utility.

comment 15y ago · link · parent

>Python on the other hand has no macros

I challenge this. I won't pretend that Python has full macro equivalence, but decorators are damned close.

comment 15y ago · link · parent

Dashboards are awesome. That said I think they can easily become a glitter project that detracts from more critical work. Shell scripts, cron+email, or a bare-bones web page can all be cheaper alternatives and are quite useful.

comment 15y ago · link · parent

I had the opportunity to learn a little bit about fingerprints during a programming gig. The part he's missing here is that what he thinks is a smudge can sometimes still be used as part of a print. Partials aren't just from TV dramas, they get used all of the time in real cases. Also one thing most people don't know about is that prints can be "massaged" by law enforcement in what is essentially a photoshop-like process, so if a human technician can make a fairly good guess about what the print should look like, they still might be able to find a match.

comment 15y ago · link · parent

Straight out of the Dilbert mission statement generator.

comment 15y ago · link · parent

Ha! I've been wondering for years if they would do a third edition. You've given me hope.

comment 15y ago · link · parent

So it's like y'all or you-guys?

comment 15y ago · link · parent

What does "yinz" mean? I understood the others. This one remains a mystery.

comment 15y ago · link · parent

Just a bit of feedback here: When you can't help with relocation (which definitely can be costly, don't get me wrong) you contradict the notion that you're a well-funded startup.

comment 15y ago · link · parent

Looks a lot like the Durex logo. http://popsop.ru/wp-content/uploads/durex_logo_old.jpg

comment 15y ago · link · parent

Plus it has what plants need.

comment 15y ago · link · parent

Port from the original Perl version.

comment 15y ago · link · parent

A friend recently launched http://mybucket.co/ It could use some L&F finesse but it's a pretty nice system. And it'll import from delicious.

comment 15y ago · link · parent

The difference is that a CD is a commodity. People are not. Certainly there is a marketplace at work, but even if you do view programmers or designers as commoditized, no one wants to be treated that way. It's ugly behavior. (Although in my experience that is usually ignorance, not malice.)

comment 15y ago · link · parent

All I can think about is Batman vs. Spock. I mean, it's Spock, right? It's gotta be.

comment 16y ago · link · parent

You have nothing to be sorry about. If I had noticed that this was a self-post I would have phrased my response more personally and (hopefully) with more tact.

I'm not looking to second guess each of your examples, many of which were fine. I felt that your currying example was trying to bring in a purely functional toolkit ala Lisp when it wasn't appropriate. Function composition (which you allude to in your reply, yet I don't see) and blocks (especially!) show off Ruby's functional capabilities quite well and would be just as effective and more practical.

Btw, if you're quite new to Python, do yourself a favor and learn about list comprehensions. They can be quite wonderful.

Good luck!

comment 16y ago · link · parent

An unsatisfying article. Judging from the code, I am not convinced that the author gets Ruby. At the very least, Proc#curry doesn't make a very compelling example.

comment 16y ago · link · parent

Interesting idea, but most interesting is the retention of capslock. Is there ever a real use for capslock anymore? I can imagine turning it on by accident and promptly going insane.

comment 16y ago · link · parent

While it's a great demo, I always blanche at the "Mother of all demos" title.

Ivan Sutherland in 1962 is what I think of when I hear that phrase: http://www.youtube.com/watch?v=mOZqRJzE8xg

comment 16y ago · link · parent

> i think that is the fastest and best way to migrate a DB to a new server!

Except that your mysql password is now in your history?

comment 16y ago · link · parent

>someone needs to add a "WhatProgrammersCanDoWhenProgrammingIsNotFun" page

It's a wiki. Go for it! :)

comment 16y ago · link · parent

Portland, OR

AboutUs is hiring.

http://www.aboutus.org/AboutUs.org/Jobs

We're a good team looking for at least one new member. We're a Rails shop but you'll have to bring a lot more than Rails chops to make the cut.

AboutUs is a startup, but it's a very stable startup. The company has been around for four years and is venture backed. Many of us have families and all of us have lives outside of work.

We write a lot of code. We pair. We test. We deploy to a live site many times each day. We also wrestle daily against a tough legacy codebase and awkward (but improving!) infrastructure. Greenfield hackers won't dig it; refactoring hackers will.

The job is onsite (no telecommute) in Portland, Oregon. Many of us bike to work. There is weekly yoga. Daily ping pong. I think we have a vegan around here somewhere. And sometimes beer mysteriously appears in the fridge.

http://www.aboutus.org/AboutUs.org/Jobs

comment 16y ago · link · parent

I was just thinking that mention of strip clubs was noticeably absent. Beer is nearly unavoidable. Strippers, less so.

comment 16y ago · link · parent

>Everything is free downtown in the fareless square.

Sadly, not anymore. "Free Rail Zone" is the Newspeak for Fareless Square. Buses now cost you.

comment 16y ago · link · parent

http://calagator.org/ is your friend.

comment 16y ago · link · parent

Is inability to focus on text due to 3 glaring Google Ad blocks a sign of aging?
1
1314151617