HNHacker News
TopNewBestAskShowJobs

dottrap

1,373 karma · joined January 30, 2013

submissionscomments
dottrap··on 10GHz at under 1V by 2005 - The future of Intel’s manufacturing processes [2000]
I'm surprised Intel made this bold claim so late. When I was in college in the late 90's, my computer architecture prof said the physics problems get really hard starting around 4 to 8 Ghz. He said it as it was common knowledge in the industry.
dottrap··on Former Apple engineer: Tim Cook made Apple a 'boring operations company'
Tim Cook has performed well for share holders. He has led Apple to record shattering profits, huge cash surpluses, and even in years like this where they came in under target, they still dominated in profits relative to their peers.

For share holders, the pressure on Tim Cook is not for him to step down. The pressure on Tim Cook by many share holders is to focus only on iPhone and for him to abandon the Mac, Apple TV, and other things that are not considered material to the profits of the company.

We saw this before during the iPod domination years. Vocal share holders wanted Steve Jobs to ditch the Mac and focus only on iPod.

dottrap··on Former Apple engineer: Tim Cook made Apple a 'boring operations company'
> he's not a tech guy

Well, he kind of is, but not in a way that appeals to most tech geek crowds.

He has a degree in Industrial Engineering which (defined by Wikipedia): "work to eliminate waste of time, money, materials, man-hours, machine time, energy and other resources that do not generate value".

Engineering to make things more efficient and reduce waste may not be "tech sexy", but to make it happen involves real technology and engineering.

dottrap··on Update on the Swift Project Lead
Lattner joined Apple in 2005. That's even longer than 5 years.
dottrap··on King – man + woman is queen; but why?
I wonder, if you could train on just Disney movie scripts, would

King – man + woman = Princess?

Or maybe: King – man + woman = villain?

(because of characters like Cruella, Maleficent, Ursula, etc.)

dottrap··on Why Skee-Ball Doesn't Change
But something did change, at least where I went.

When I was a kid, I remember the ball effortlessly glided off the launch ramp into the air for the holes. Sometimes I would roll as hard as I could just to see how high it would go (into the top net and ricochet down into the scoring holes).

I recently went back and the launch ramp is like a speed bump now. The balls no longer smoothly roll and launch into the air. Instead they smack hard into the bump and lose most of their momentum and barely make it to the holes.

I can't for the life of me figure out how to actually get the ball in the highest value holes any more. The harder I roll it, the harder is smacks into the bump and it goes nowhere near the holes. Don't roll that hard, and it barely makes it over the bump.

I really hate the change and I stopped playing. It is no fun anymore.

dottrap··on So you think you know C?
>> read the standard

>> Casey Muratori, who's a better C programmer than me, is of the opinion that you should check your compiler's behavior rather than read standards.

In Casey Muratori's case, he's the type of person who cares to understand what the compiler is actually generating under the hood. He doesn't exactly trust the compiler to always do the right thing.

There was an episode of Handmade Hero where he caught an optimization #fail of the compiler and tried to figure out what was going on (live). https://twitter.com/cmuratori/status/596775025023287297

Casey Muratori also has been developing in Visual Studio for a very long time. Visual Studio has a long, tortuous, history of being non-stanards compliant and buggy. And Microsoft until very recently, never cared to fix anything. (And it still doesn't conform to C99, let alone C11.)

dottrap··on Replacement Samsung Galaxy Note 7 phone catches fire on Southwest plane
Also, "PC" was never a specific company. You could infer things like Microsoft or Dell or HP or whatever, but they avoided specifically naming a company.
dottrap··on Twitter Shares Slump After Report Says Google Won’t Make a Bid
And in addition, why should Disney pay (especially at a premium) for what they are getting for free?
dottrap··on The cost of forsaking C
>>>Few years ago that was phones,

> ObjC and Java

To defend the parent's point, Objective-C is a pure superset of C. And there are quite a few frameworks on the Apple platforms that are pure C (not Obj-C), e.g. CoreGraphics, CoreAudio, ImageIO, OpenGL, etc.

dottrap··on Behind the Pixel: Google’s First Real Threat to Apple’s iPhone
>> I've never owned a phone with more than 2GB of RAM and I'm not sure what I'm missing out on.

> It's Linux under the hood which will always make use of more memory,

Linux won't really be the beneficiary of all the extra RAM in this case. The motivation behind the extra RAM is Java.

It is well known (i.e. researched) that garbage collection system performance is heavily dependent on free RAM. You typically want around 4x the amount of your peak memory usage to keep the garbage collector speed reasonable. The more free RAM, the better the performance.

http://sealedabstract.com/wp-content/uploads/2013/05/Screen-...

But having 4x has been a real challenge for mobile and Android over the years, especially as people want to do more and more with the phones. It also didn't help that Dalvik and ART are new ground-up implementations of the Java VM which means a lot of optimizations for garbage collection needed to be reimplemented from scratch.

The lack of needing to support a garbage collector is a big reason Apple can get away with shipping far less RAM in their phones which in turn helps keep their profit margins high.

dottrap··on Ranking TV Shows That Got Canceled
Sledge Hammer! 2 seasons. Ran against Cosby as the sacrificial lamb.
dottrap··on Ranking TV Shows That Got Canceled
ALF was moved from Monday to Saturday and the ratings crashed. The show ended on the cliffhanger where ALF is caught by the military. Everybody assumed the show would be renewed, but it was cancelled. NBC exec Brandon Tartikoff later regretted cancellation feeling the show should have gone another season or two.
dottrap··on A Digital Rumor Should Never Lead to a Police Raid
Nope, not an urban legend. This is really happening.

Just last week a home with 5 children was wrongly raided: http://www.denverpost.com/2016/09/14/swat-officers-raid-home...

Wrong house with Grandmother and Teen girl raided with flash-bang: http://reason.com/blog/2015/08/03/swat-team-liable-for-wrong...

This gamer was "Swatted" and the web cam caught it: http://reason.com/blog/2014/08/28/militarization-of-police-h...

This 1-year old baby was critically burned by a flash-bang grenade thrown into the playpen: http://www.cnn.com/2014/10/07/us/georgia-toddler-stun-grenad...

dottrap··on The Correct Way to Validate Email Addresses
I'm not sure if they are context-free, but talks about Parseable Expression Grammars, specifically Lua's LPeg, implies they might be. Conceptually, PEGs are to Context Free Grammars as RegEx is to Regular Expressions.

You can find multiple short email validation snippets using Lua LPeg pretty easily, but this is from the Lua creator's talk about LPeg which includes a part about proper RFC822 validation and how complicated it is for regex, but can be concisely done with PEGs.

http://program-transformation.org/pub/WGLD/Austin2012/Robert...

Here is the entire PEG slide. (Looks CFG-ish to me.)

    address <- mailbox / group
    group <- phrase ":" mailboxes? ";"
    phrase <- word ("," word?)*
    mailboxes <- mailbox ("," mailbox?)*
    mailbox <- addr_spec / phrase route_addr
    route_addr <- "<" route? addr_spec ">"
    route <- ("@" domain) ("," ("@" domain)?)* ":"
    addr_spec <- local_part "@" domain
    local_part <- word ("." word)*
    domain <- sub_domain ("." sub_domain)*
    sub_domain <- domain_ref / domain_literal
    domain_ref <- atom
    domain_literal <- "[" ([^][] / "\" .)* "]"
    word <- atom / quoted_string
    atom <- [^] %c()<>@,;:\".[]+
    quoted_string <- '"' ([^"\%nl] / "\" .)* '"'
dottrap··on When Big O Fools You
Do you know how the popular ARM based chips fare in comparison?
dottrap··on “Node.js is one of the worst things to happen to the software industry” (2012)
There are certain classes of programming and mathematics that really need integers such as cryptography and fields that would need big number libraries.
dottrap··on Marissa Mayer’s Payday
The problem is that is all due to the Alibaba stake.
dottrap··on iPhone, iPad and Mac sales are down, but Apple only cares about services now
From the conference call:

Maestri: Services now account for 11% of Apple's overall revenue, up from 8% in the year-ago period.

Cook: Switchers from Android and other platforms accounted for the highest percentage of iPhone buyers than ever before.

dottrap··on The World of Subversive Garfield Spinoffs
I read some of the Peggy Jean (Charlie Brown's girlfriend from 1990-1999) strips. It's brilliant comic gold, filled with both hope and cruelty throughout. I don't think Schultz ever played anything for just laughs. His brilliance was he captured all parts of humanity, light and dark, in his strips, even until the end.
dottrap··on Three Big Lies (2008)
Mike has given multiple talks on Data Oriented Design.

Another example he gave at CppCon was a Chair class. In a real game, you may have a static chair, a dynamic lighting chair, a breakable chair, a physics chair. There is a tendency to make these all relate through some common Chair class because they all share some "chairness" in the real world. But in reality, the data and transformations each need have nothing in common and trying to shoehorn them into some relationship because it resembles something in the real world is counterproductive.

dottrap··on Three Big Lies (2008)
You’ve missed a lot of important real world details about what’s going on in the system, which is the heart of what Mike Acton talks about.

> Say what? In C++, you'd simply create another object that is another instance of the Rocket class. Behold, "more than one".

So now you have a bunch of separate instances of rockets which are probably scattered throughout heap memory which will lead to cache misses on every access. Mike is describing the lost optimization potentials here because you didn’t think to reason about how you will use this data.

A simple example, every rocket needs to update its position every frame and probably obeys a velocity equation defined in the game. Iterating through every rocket scattered out through heap memory is already going to kill you with cache misses. But additionally, since all the rockets obey the same equation, we should be using SIMD to compute everything which can let us do 4x-16x operations (or more depending on hardware) for the same cost as doing one. But chances are your Rocket class ivars are not nicely laid out for SIMD (AoS vs. SoA), so you will be forced to copy or swizzle a bunch of data which negates the performance benefits you are trying to win with SIMD. If you designed your data upfront with this idea in mind (many rockets for batch operations), then you get both cache optimization wins and SIMD wins, and now we are talking about speed ups that can be easily 10x-100x. And we haven’t even touched the possibility of further parallelizing this across multiple cores.

A real world example they gave at GDC on SIMD was a many-players-to-many-doors problem they had to solve. On every frame, any player near any door had to automatically open like in Star Trek. 30 doors and 100 players means they have 3000 tests they have to run. The original algorithm wasn’t data oriented and what Mike Acton would probably call typical C++ BS: A single Door class. On strict CPU budgets to handle everything else in the game, the cache misses alone were worrisome. In the talk they (obviously) convert to SIMD with the idea of ‘many’ using Data Oriented Design (which also solves the cache miss problem). They got a 20x-100x speed up (depending on the number of players and doors).

dottrap··on Three Big Lies (2008)
Because it isn't just about cache optimization. How you organize your data impacts the types of transformations that can and need to be done. Utilizing SIMD is another thing that is extremely sensitive to data layout.
dottrap··on Squid, octopus, and cuttlefish populations have been rising since the 1960s. Why?
Also, some Chinese. But there's only up to a billion of them, so not much demand.
dottrap··on Disney stops making video games in house – insiders reveal what went wrong
They were commercially successful.

http://www.ign.com/articles/2008/05/23/capcom-releases-lifet...

(NES) DuckTales outsold all their (NES) Mega Man's. It's an interesting comparison because DuckTales shares a lot of similarities with Mega Man.

Disney franchise sales for them ranks 4 in total which is high, but still misleading because Resident Evil is ranks 1 and they weren't making Disney games in that era where more people bought video games. I speculate the Disney number would be much bigger if they did.

dottrap··on Disney stops making video games in house – insiders reveal what went wrong
This is the exact model that LucasArts had. If you listen to stories from the original LucasArts crew, like David B. Fox, they tell stories that they were not allowed to make Star Wars games (originally to their disappointment) because George Lucas knew there was always somebody else willing to pay him gobs of money for the permission to make a Star Wars game. They take all the risk, and he makes money.

So this model is proven. Despite the hypothetical risk to not owning the IP, there was always somebody willing to pay and take the gamble.

dottrap··on Disney stops making video games in house – insiders reveal what went wrong
Sadly, it won't matter. Here's another example of Disney neglecting successful markets they created. I just re-read this DuckTales 25th Anniversary Retrospective from a few years ago because Alan Young/Scrooge died the other day.

Excerpt:

  But what media company has almost 4 times the market   
  capitalization of CBS and is among the largest media
  conglomerates in the world? That would be Disney of course. 
  And what is Disney doing to celebrate the 25th Anniversary 
  of DuckTales, the most successful syndicated cartoon series 
  in history? Absolutely nothing.
  I'm always quite amazed at Disney's inability to capitalize 
  on their own successful products.

http://playcontrol.net/ewing/jibberjabber/ducktales-25th-ann...
dottrap··on Dynamic Swift
It doesn't sound like you've read any of the articles. There are details and tradeoffs and limitations found by the people talking about them. And there is a massive knowledge vacuum because if there is a good solution, it's not something that is obvious and well discussed by Apple. Ignoring and dismissing them doesn't make them actually go away.

Here's two on just the Responder chain: http://inessential.com/2016/05/17/responder_chain_followup http://shapeof.com/archives/2016/5/dynamic_swift.html

The bigger point (which is in that first Brent Simmons link) is that people have built all sorts of frameworks and tools over the past 20 years depending using of the dynamic features of Obj-C. Some are Apple's like all the above plus others like Interface Builder and XCTest, but other people have built their own things too that rely on the same concepts. How do these people move forward in a Swift world?

None of these people are arguing that Swift is terrible and going back to Obj-C. They are trying to use Swift. They are only interested in solving the problems they have (and well). When Swift fails to solve a problem or is far worse than its predecessor, there is a problem.

Not everybody can nonchalantly throw their stuff overboard like you are willing to do with Core Data.

dottrap··on Dynamic Swift
What's going on here is Brent Simmons has been posting a series of blog articles expressing concern that very useful dynamic features used in Obj-C to great effect cannot be currently done in pure Swift. And many of the old guard that is knowledgable in how Obj-C+Cocoa is implemented and have built their own powerful things on top of it are also expressing their same concern that Swift has not addressed how these things are going to be done without Obj-C.

http://inessential.com/2016/05/18/what_im_doing_with_these_a...

There are key technologies in Cocoa like the Responder Chain, NSUndoManager, Key-Value-Coding/Key-Value-Observing/Cocoa Bindings, Core Data, that are made possible due to Objective-C's dynamic features which allows for easy coding and also impressive decoupling.

The concern is that some developers actually need to develop things like this and Swift doesn't offer anything comparable. Additionally, as Swift enters new platforms where Obj-C doesn't exist, or if Apple kills off Obj-C support, there is no obvious replacement for those who want/need to build systems like Cocoa. For right now, Swift is a good consumer of Cocoa, but not something you could implement Cocoa with.

dottrap··on Deoptimizing a C++ program
Your case seems to fit nicely with "Typical C++ Bullshit" by Mike Acton (and any of his Data Oriented Design talks).

https://macton.smugmug.com/Other/2008-07-15-by-Eye-Fi/n-xmKD...

← PreviousPage 5 of 15Next →