Better HN
topnewbestaskshowjobs
Log inSign up

panic

29,749 karma · joined Sep 16, 2009 (17y ago) · 3,593 submissions

Submissions

comment 10y ago · link · parent

1. Sketch out what you want the first iteration of the language to look like. Write some example programs in your language.

2. Write a lexer: a program which turns a string of source code in your language into a list of values like "open parenthesis", "plus sign", "if keyword", "identifier". These values are called tokens. To test your lexer, output each token and see if your example programs tokenize properly.

3. Write a parser: a program which turns a list of tokens into a structured representation of your program's source code. For example, "if keyword" "identifier" "equals sign" "number" "then keyword" "print keyword" "identifier" might turn into an IfStatement with a predicate EqualsExpression (that itself has a left IdentifierExpression and a right LiteralNumberExpression) and a list of Statements for the code to run. You can write the parser yourself (look up recursive descent parsing) or use a parser generator tool to do it.

4. Write a code generator: a program which goes through your structured representation and outputs lower-level code (in this case, C) for each expression and statement.

2792.

Myth: “CS Researchers Don't Publish Code or Data”(jxyzabc.blogspot.com ↗)

26 points · by panic · 10y ago · 15 comments

2793.

Caching best practices and max-age gotchas(jakearchibald.com ↗)

1 points · by panic · 10y ago · discuss

comment 10y ago · link · parent

One problem would be instruction size. On a system with (e.g.) 32 registers, each register can be addressed with 5 bits, while a memory address is 32-64 bits.

comment 10y ago · link · parent

On a phone, scanning can be much faster and more pleasant than typing.

comment 10y ago · link · parent

I'm confused by the replies saying that more dense labels would somehow harm usability for driving or navigation. When you're driving, you know where you're going, the map knows where you're going, and it's easy to see the route you need to take. When you're not on a route, denser labels help you to orient yourself with the map and to know when to zoom into a particular location.

That said, I also think the focus on paper maps is misplaced. Old-style road maps had to answer the question, "how do I get there from here?" New-style digital maps don't need to answer that question any more! Questions new-style maps need to answer include:

* I know the name of a place or street; where should I zoom in to see more things around that place or street?

* I need to go to a (gas station / rest stop / hospital); where's the closest one?

* How would I get home from where I am?

* I'm in an unfamiliar place and would like to go "downtown" (where there are restaurants and things to do); where is "downtown"?

* Where is my car right now?

Roads help you to orient yourself with the map, but they aren't as fundamentally important to digital maps as they were to old-style road maps. The visual space of the map might be better spent helping answer questions like these.

2797.

Rewriting from scratch, should you do it?(nibblestew.blogspot.com ↗)

3 points · by panic · 10y ago · discuss

comment 10y ago · link · parent

How does this compare to stream fusion? http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.104.7...

comment 10y ago · link · parent

FWIW, I saw a flash of unstyled text on Safari for Mac.

comment 10y ago · link · parent

Note that "INT" stands for Intelligent Narrative Technologies, or AI for understanding and generating narratives.

2801.

Science Considered Harmful (2013) [pdf](pdfs.semanticscholar.org ↗)

1 points · by panic · 10y ago · 1 comment

comment 10y ago · link · parent

You can see for yourself why he was banned: https://news.ycombinator.com/item?id=10017538

comment 10y ago · link · parent

We only started talking about "mobile-first" after the iPhone. Until we start to see real AI technology with similar impact, I think it's too early to talk about "AI-first" anything.

comment 10y ago · link · parent

Yeah, you'd have to combine it with a length limit on the text of bills.

comment 10y ago · link · parent

This article has some comparisons between Oodle's LZNA and LZHAM (at least as of a year ago): http://cbloomrants.blogspot.com/2015/05/05-09-15-oodle-lzna....

comment 10y ago · link · parent

At least the legislature has to spend some time renewing them. Everyone bears the cost of having to know and follow all the laws; lawmakers having to spend the time to renew every law would be a better alignment of incentives.

comment 10y ago · link · parent

For software with variable-sized inputs, performance never stops being relevant. Higher performance increases the maximum size of inputs you can handle. For a text editor, the lower the footprint, the larger the files it can edit and the more of them can be edited at once.

comment 10y ago · link · parent

Yeah, using "occasionally" in both places drew a parallel that I didn't intend. We can expect people to make mistakes without accepting broken software. As you say, there are processes that can reduce the impact of mistakes on the final product. I think a culture of taking issues seriously is also important. Small mistakes are easy to make, but they're easy to fix if the organization has a good way for them to be reported and allows people to spend time fixing them.

comment 10y ago · link · parent

I think "bug-free" software is a distraction. It's fine to make the occasional mistake. The real problem here is that nobody seems to take these mistakes seriously. Everyone seems to expect software to be occasionally broken, including the people writing it.

comment 10y ago · link · parent

Yeah, you're right, I didn't word that very well. I edited the comment (it used to say "No, sorry, you shouldn't point that out. You should refund the money…")

comment 10y ago · link · parent

I should point out that we're really talking about two types of customer service experiences here. When it comes to our Plus merchants, we're facing way less challenges simply because we're interacting with them via tablets or electronic ordering. Where we don't succeed yet, is the customer service part of our Anywhere product. Here we don't have integrations with all merchants and the error rates are higher and so is the level of complexity when something goes wrong.

That's great, but it's your responsibility to manage this complexity. You should refund the money to your customers when there's an error, not give excuses.

comment 10y ago · link · parent

If Postmates wants to keep doing well, they need to improve their customer service. A restaurant significantly overcharged me (or the driver bought dinner for himself?) and they wouldn't refund any of it. There are tons of similar comments on the app.

comment 10y ago · link · parent

This series of articles doesn't have any costumes, but it's still a good read: https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-...

2814.

Wikipedia Is Basically a Corporate Bureaucracy, According to a New Study(gizmodo.com ↗)

2 points · by panic · 10y ago · discuss

comment 10y ago · link · parent

No joke! See this thread: https://news.ycombinator.com/item?id=11561336 for some real-life implementations of this technique. Since the Fibonacci numbers are integers, at the end of your computation you'll get a number like "a + 0 sqrt(5)". Then you can just take the "a" part.

2816.

Let’s do some old-school hacking on our new-school hardware (2014)(davidad.github.io ↗)

1 points · by panic · 10y ago · discuss

1
939495
120