Better HN
topnewbestaskshowjobs
Log inSign up

_dps

1,602 karma · joined Jun 7, 2011 (15y ago) · 406 submissions

I roam the world trying to make things better with computational mathematics. Once upon a time I taught applied math at USC.

(email:demetri.spanos@gmail.com)

Submissions

comment 11y ago · link · parent

Might you by chance be familiar with Rodney Brooks' work on subsumption architectures [1]? If not, I would summarize the underlying idea (my words not his) as "don't try to jump too many layers of abstraction in one go" [2].

So I wonder to what extent you would consider this a predictable outcome from the classifier in question not being part of a subsumptive architecture --- which at a guess would look like

  - glance/texture responses fed into 
  - boundary-recognition layers fed into
  - object persistence/tracking layers 
  - fed into abstract scene reasoning
It seems to me, as a non-vision researcher (I mainly worked in planning and control), that the most obvious counterargument to the image being a spotted cat is based on boundary/object/scene reasoning, and that it's "reasonable" for the texture/glance layer to say "looks a lot like a cat texture".

[1] https://en.wikipedia.org/?title=Subsumption_architecture

[2] I realize this may seem, superficially, anathema to deep network research, which advocates letting the network find its own intermediate levels of abstraction. But it's actually compatible in my view because Brooks advocates (again, paraphrasing quite a bit) that the separate layers should have different objective functions, and that in fact the need for different objective functions (in a prioritized order) is the cause of emergent layering in nature. "First, don't die. Second, find shelter. Third, find food etc." So one can imagine deep networks each finding their own locally useful abstractions for each objective function in the "Maslow" chain, while still having some macro architecture that tracks human-imposed design principles.

comment 11y ago · link · parent

That's an interesting result; do you happen to have a citation? I couldn't find one with a few minutes of Google Scholar.

If I understand Concorde's claims correctly, there is still the question of finite numerical precision (it doesn't seem to use MPFR or any other arbitrary precision library). Perhaps the suboptimality of the path is less than 1e-7 or 1e-16 (depending on precision) times the distance between the "looped" cities?

Having said that, one of the authors of Concorde is R. Bixby, a co-author of CPLEX (which was for decades, and may still be, the industry standard LP solver including for branch-and-bound problems). And Chvatal is another very widely regarded LP researcher. So I would take Concorde's claims of optimality at face value (though of course there could be a data input error somewhere).

Edit: Ah, I misunderstood the sense of "loop"; I thought there was a subcircuit (which I believe can be optimal in some cases), but instead there are two segments crossing each other that, per wrk1's comment below, should really be shorter if their destinations were "swapped". Rough Google-maps math suggests that would reduce the distance by ~10 miles out of ~16k, which seems well above numerical precision.

comment 11y ago · link · parent

Disclosure / for dang: I edited the title per my interpretation of the guidelines. In context it's not misleading, but on HN I figured "The Traveling Tesla Salesman" in isolation would cause many mistaken clicks and could be taken to be linkbait.

Dan, please edit back (and bury this comment) if I overstepped :)

244.

Solving the Traveling Tesla Salesman Problem with Python and Concorde(mortada.net ↗)

111 points · by _dps · 11y ago · 36 comments

comment 11y ago · link · parent

This is an excellent point and maybe you gave me a good compact summary of the situation. Perhaps you can tell me if you agree.

The kind of work I do tends to involve a small number of low-variability data types, and the ROI on complex logic (w.r.t. computational performance) has to be very high for it to be accepted into a project. We don't shy away from complex logic, but we do have a high hurdle for it to cross before it becomes a net win.

In contrast, Haskell is perhaps best for large numbers of high-variability datatypes where complex logic is inevitable, regardless of performance costs. And it helps precisely by encoding as much of the complex logic (e.g. safety rules) into the variability and expressiveness of the type system.

I guess all that may be obvious, in hindsight. But I think your comment helped me crystallize the distinction. So, thanks :)

comment 11y ago · link · parent

I would be interested in your thoughts here because Haskell has always seemed, theoretically, a great fit for me but it has never panned out in practice.

I believe you and I have a common-enough mental framework (theoretical-leaning applied math Ph.D., happy to hold forth on e.g. algebraic geometry, information theory, nonlinear dynamical systems etc.). I look at Haskell and it certainly feels clean and beautiful like all the mathematics that I love. But then I try to use it and, objectively, I get less done (even though I knew what an endofunctor was before even seeing Haskell!).

My longest stretch of trying to use Haskell every day was about 3 months at which point I was still substantially less productive than my preferred mix of C/Python/Lua (I mainly do heavy-lifting numerical work coupled with low-latency server designs). I also feel like I get more done in OCaml.

So, you being someone whom I identify as similar in skills to myself, I ask you: what gives? :-)

comment 11y ago · link · parent

You are implicitly presuming an expected utility framework (more generally, that people rank outcome distributions based solely on their long run central tendencies).

This isn't the case (or even uniquely formalizable) in base (non-e.u.) utility theory which requires choice-order preservation under arbitrary monotonic transformations of the scoring function. Expectation ordering is not necessarily preserved under such transformations.

E.U. is a common paradigm because it is a useful approximation and allows numerical calculations but it is not all (or even, the core) of utility theory except in very limited circumstances (e.g. purely monetary payoffs and linear utility of money).

248.

· discuss

249.

· discuss

250.

· discuss

251.

· discuss

252.

· discuss

comment 11y ago · link · parent

I'm not sure I understand your requirements but might DynASM be useful? It's one component of the JIT library behind LuaJIT but many people use it for run-time code generation completely outside a JIT setting.

http://luajit.org/dynasm.html

comment 12y ago · link · parent

At the risk of being perceived to move the goalposts, I think there is a real lesson to engage with: empirically, for large classes of programmers, syntax, uniformity, and absence of boilerplate actually make a larger difference in out-the-gate productivity than many would like to admit. I understand that this isn't a lesson about programming per se, but I think it's a lesson about the practice of programming.

I see this repeatedly in our internship program, where people often ask after we "promote" them to other language work "Why can't XYZ look as clean and simple as Python?". I do think that's a lesson worth learning, and it's a little hard to learn except by osmosis. If I just tell someone "empirically, syntax matters a lot more than you might think in doing real work" it's easy to dismiss as understood-but-not-important. Jonathan Blow has a bit in one of his videos about "understanding" vs "really viscerally understanding", and I think this is one area where the latter simply can't be achieved without direct experience.

comment 12y ago · link · parent

> Manhattan is not the only way ... neither is it even the most unpleasant.

> There are ways to build dense cities that people can afford to live in and actually enjoy living in.

This is a subject that deeply interests me. I would be interested to hear your thoughts on what you consider viable alternative models; personally, Manhattan and its satellites seem the closest to a realistic (if obviously flawed) design strategy for achieving livable density.

comment 12y ago · link · parent

You touch on many things I have thought about for years :)

I think the Mountain View / Palo Alto / Sunnyvale area mirrors the San Gabriel valley structure pretty closely (with Palo Alto ~= Pasadena, Menlo Park+Atherton ~= San Marino, Sunnyvale+Mountain View ~= Glendale+Burbank). So in that sense they are similar in one particular region.

On the other hand, LA downtown is surrounded by confederate townships. San Francisco is in some sense a city on a hill. Similarly, there is nothing like the Venice / Santa Monica / Malibu cluster providing "coastal" political influence to the city. There is no way that, e.g., Pacifica or Half Moon Bay would ever be able to be first class citizens in local politics the way that Venice/Santa Monica/Malibu are in LA politics.

Continuing the contrast, the LA area doesn't really have anything like the East Bay.

I could go on and on, but I will leave it at that for now. I do think that anyone who thinks they have an opinion on LA, but hasn't lived there, should take a moment and think that maybe it really is different from their expectations or previous experience of large cities.

Edit: one could, I suppose, say that Long Beach is, in some sense, analogous to the East Bay. They are parallel in an economic and social class sense, but I still think the East Bay is much more of a cultural component of SFBA than Long Beach is of LA Metro.

comment 12y ago · link · parent

I agree broadly, but I feel obliged to stand up and defend Los Angeles here (needless to say, I am biased; I used to live there but do not currently).

If you have lived in a big city but have not lived in Los Angeles, it is not reasonable to use your experience to model Los Angeles. It is much more like a loose federation of nearby townships than it is a city like New York City. This is as much a cause is it is an effect of car culture and freeways; the two feed each other and cannot be meaningfully separated into cause and effect as far as I am concerned.

There are parts of "LA Metro" that I find charming, and parts that I find terrible. But there is nothing that I would call representative of the whole. Downtown vs Santa Monica vs Redondo vs San Fernando vs Eagle Rock vs Alhambra etc. Treating LA as a monolith is not a useful approximation. (to be clear, I spent a substantial amount of time living in major cities across Europe and the US, including London and San Francisco, so I'm speaking with a moderate amount of diverse experience).

comment 12y ago · link · parent

> katamari of design features

Did you coin this phrase? It's a fascinating, evocative, and quite possibly accurate description of many of the systems I find most frustrating. In any case, thank you for bringing a smile to my face today :)

comment 12y ago · link · parent

> subtle text-shadows and gradients to enhance legibility (scientific reason)

Honest question: can you provide citations for this claim? I have been trying to produce a compendium of all the empirically-supported claims about visual design affecting usability. I have yet to find citable claims for these cases, and would greatly appreciate a leg up in the effort :)

comment 12y ago · link · parent

Does anyone know the licensing status of the TTFs?

comment 12y ago · link · parent

> Besides being a compiler guy, i'm an open source lawyer.

Apologies for replying in-thread (I couldn't find contact in your profile). Would it be possible to ask you a few questions about a perhaps-novel compiler licensing question for an open source application we're developing (we're a commercial entity and can pay for your time)? If so you can reach me at the email in my profile.

comment 12y ago · link · parent

In my experience the "category theory" claim is imprecise but not unfounded. Without fairly serious abstract understanding of monads, functors, and applicatives (at a bare minimum), it is not possible to write Haskell code profitably. By that I mean that without such knowledge you should have just written something else.

To make Haskell a serious advantage and not just a minor benefit (compared to, say, SML), you probably also need to understand kinds. Let's bear in mind that the vast majority of practicing programmers can't reasonably define an algebraic data type, and that it's not their fault, because the ROI for learning such things is often negative.

I do think there is a reactionary "don't-wanna-learn anything" vibe against Haskell among certain groups. But I think we should be clear that, to get the power that Haskell promises, you do need to learn many new things. Those things, while not exactly category theory in a narrow sense, are closer to category theory than they are to conventional programming knowledge.

comment 12y ago · link · parent

From the article:

"It's definitely air travel. It's not exactly flying."

This phrase has an Alan Kay-ish quality, and was enough to pique my interest. Anyone seriously trying to execute on a project that addresses this concern seems worth following. Who knows, you might even succeed :)

comment 12y ago · link · parent

I may be able to help. As a fellow Southern European (living in California), I make it a point to try to help people from that region with employment where I can.

I employ people (fully remotely) all over the world, and I help several other companies do the same (I assume basic professional/IT English). I'm not actively hiring right now, but I know a few companies who are.

My email is in my profile. Best of luck regardless.

comment 12y ago · link · parent

"LuaJIT FFI is a library for Lua. It doesn't change the language at all ... "

This is literally true, of course, but in my ~5 yrs using it now I can say that writing LuaJIT+FFI-data-type code is, for me, both aesthetically and mechanically different from writing plain Lua code. The post captures it quite well:

  This is basically the inverse of the old promise that languages like Python came 
  with: that you would write your whole application in Python, optimise the “hot 
  spots” with C, and voila! C speed, Python convenience, and money in the bank.

  This was always much nicer in theory than practice. In practice, your data 
  structures have a huge influence on both the efficiency of your code, and how 
  annoying it is to write.
I often write my LuaJIT programs from the ground up designed around C data types and C-style memory allocation discipline. Bu I can always ditch that in areas where I know I don't care (e.g., configuration loading etc where 10 lines of C become a 1-liner in Lua).

comment 12y ago · link · parent

I thought this may be of interest to HN since the author posts here occasionally and there has been past discussion of his book/typesetting framework [0].

I personally found "Butterick's Practical Typography" very compelling, and I happily paid for it (apparently well above the median selling price!). I'm a little disappointed to read that Mr. Butterick has only made something less than $15k over the course of the first year; while he seems cheerful about it in the post, I can't imagine that such a payout comes close to covering his opportunity cost for creating a high quality book.

Economic structures that support high-quality open-access content seem to be an ongoing challenge with no clear answers.

[0] https://news.ycombinator.com/item?id=7822057

267.

The economics of a web-based book(practicaltypography.com ↗)

177 points · by _dps · 12y ago · 73 comments

comment 12y ago · link · parent

> There's no point in denying that and Go will end up like both Java and C++, both of which didn't have generics in the beginning - and so it will end up with a half-baked solution ...

[I take no position on whether Go should have generics]

Go has one thing that neither of the other languages had: Rob Pike. This is not meant with any disrespect to Gosling or Stroustrup, and I don't know Pike personally, but he has a reputation for sticking to his convictions even (especially?) when they are contrary to "market pressure".

comment 12y ago · link · parent

In context, you're right of course. But you might be underestimating the number of non-web programmers who have this reaction. I know many such people, and many have asked me "The term API predates the web; In what sense is this an API?".

For such people, I propose the metaphor that HTTP APIs are a form run-time linking where the root URL (api.example.com) is the "library" and the valid URIs (api.example.com/list_of_cats) are the exported "symbols" you can reference from your program. Performing a GET on such a "symbol" is like dereferencing the pointer you get from calling dlsym. The 400 and 500 range status codes are like dlsym's error codes: 404 is a failure to find the symbol, 500+ is various run-time errors, etc.

comment 12y ago · link · parent

At the risk of continuing to be boring, I think it's important not to mix technical concepts with social welfare concepts; they serve different goals and it is easy to get a misleading impression of one when trying to apply it in the other domain. Economics is plagued with these problems (cue half-informed people raging about how "Economics assumes people are perfectly rational, but Ariely told me they weren't [0]! Take that establishment!")

Utility is a very specific tool devised to model choice behavior. It is a basic idea of utility theory that "Vikram gets much less utility from the lobster than Yolanda" is not a meaningful statement within the framework. There's no wrangling or wiggle-room with this point; interpersonal utility is formally incomparable.

Similarly, it is well-trodden that markets tend to allocate scarce goods to those with the greatest willingness and ability to exchange other scarce goods for them; market theory doesn't presume to say anything about who enjoys the scarce goods the most. This is why, beyond choice and market theory, we need something that addresses social value systems. Utility does not pretend to do this, except to the extent that an individual may value social justice in their personal utility function.

So, while I take your point that my post was technical and, yes, dry, them's the ropes when it comes to utility theory. Correct statements tend to be boring ones that don't evoke human interest. If one wants to evoke human interest (a perfectly reasonable goal) I think it's best not to mix in half-appropriate technical concepts when there is substantial potential for confusion.

[0] For anyone who is curious, I estimate 80% of Ariely's "irrational" examples are easily explained by understanding that making optimal choices with imperfect information has a cost in time and effort; when you price in this cost in time and effort, making suboptimal-but-easy-to-make or even random choices is actually perfectly rational within the framework.

1
8910
14