Better HN
topnewbestaskshowjobs
Log inSign up

coolSCV

11 karma · joined Oct 7, 2012 (14y ago) · 7 submissions

Submissions

comment 13y ago · link · parent

This is why you have backups.

comment 13y ago · link · parent

I decided to simply add to the description, "use parentheses to specify operator precedence."

comment 13y ago · link · parent

Clearly a bug. Thanks when I have more time I will fix it. I didn't give much thought to operator precedence, I assumed the user would specify it using parentheses.

The idea is what is important though. Recursive descent parsing uses the functions that correspond to types in the grammar to mutually call each other thus parsing the expression recursively in a descending fashion.

comment 13y ago · link · parent

The calculator seems to miss the point of recursive descent parsing. The parser should follow naturally from the grammar. As an example, here is a 52 line python calculator:

https://gist.github.com/ascv/5022712

The idea isn't to 1-up the OP but rather to showcase the technique of recursive descent parsing. The wikipedia entry for recursive descent parsing also has a very nice example.

comment 13y ago · link · parent

An analogous case is the programmer who relies on libraries and abstraction and "knows just enough to be dangerous." Statistics and optimization mathematics in particular are vulnerable to this. If you haven't read the proofs or you cannot prove it yourself, then you truly don't understand it. I'm not claiming this is you since your post doesn't imply that.

However as an example, if someone is solving linear or non-linear programs using <insert software or library here> but hasn't bothered to thoroughly study the mathematics underlying either and is just plugging in numbers from the constraint equations they came up with, then I would not want that person doing any sensitivity analysis. There would just be no way to be confident that they are interpreting the results correctly.

comment 13y ago · link · parent

Certainly it was the missing "the" in the title.

comment 13y ago · link · parent

> Wikipedia is not designed to be a pedagogical repository; arguing that the mathematical language sucks because a terse summary in wikipedia is not enough to understand the material is missing the point.

Nicely worded. I think the real issue is that many people want mathematics to be easy to read and understand. Unfortunately, much of mathematics is not easy to read nor is it easy to understand regardless of how it is written. Mathematics, like many other things, often requires a lot of intellectual scaffolding to be built from the bottom up. There is no shortcut to the top.