Better HN
topnewbestaskshowjobs
Log inSign up

panic

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

Submissions

1171.

Modeling Message Queues in TLA+(hillelwayne.com ↗)

195 points · by panic · 8y ago · 46 comments

1172.

Noria: dynamic, partially-stateful data-flow for high-performance web apps(blog.acolyer.org ↗)

3 points · by panic · 8y ago · discuss

comment 8y ago · link · parent

To save you a click: it’s antagonism. “People who are antagonistic resonate more with populist messages.”

comment 8y ago · link · parent

Not usually—always. How can you ever blame someone when software doesn't do what they expected it to? What should they have done differently?

And people internalize this stuff! When poorly-written software does something unexpected, they blame themselves, calling themselves "stupid" or "not good with computers". It's not you, it's us!

comment 8y ago · link · parent

I can also recommend Proofs and Refutations by Imre Lakatos. It's an unusually easy read for a philosophy book (fewer than 200 pages and written as a sort of Socratic dialogue) and engages with some very deep problems related to the nature of mathematical proofs.

comment 8y ago · link · parent

The look of the text is just the tip of the iceberg. Many text editing operations are tightly integrated with the operating system and impossible to implement without an editable element. For example, on recent iPads you can move the cursor around by swiping the keyboard with two fingers. I don't know how you'd support this gesture without creating an actual editable element on the page.

1177.

Duckspeak vs. Smalltalk: Decline of the Xerox PARC Philosophy at Apple (2011)(dorophone.blogspot.com ↗)

122 points · by panic · 8y ago · 77 comments

comment 8y ago · link · parent

In order to have native-quality text editing on the web, you need to use the DOM. Using the DOM limits what kind of UI you can have.

1179.

The city that solved homelessness (2017)(crosscut.com ↗)

2 points · by panic · 8y ago · discuss

1180.

Su Hui’s Star Gauge (2012)(poetrychina.net ↗)

55 points · by panic · 8y ago · 5 comments

1181.

Emil Post: Psychological Fidelity(inference-review.com ↗)

21 points · by panic · 8y ago · discuss

comment 8y ago · link · parent

A couple months ago there was a nationwide prisoner strike in the US against this practice: https://www.theguardian.com/us-news/2018/aug/20/prison-labor...

1183.

Find Your Voice: Writing for a Webzine (1999)(polaris.gseis.ucla.edu ↗)

24 points · by panic · 8y ago · 8 comments

1184.

The Google Pixel 3 Is a Very Good Phone. But Maybe Phones Have Gone Too Far(buzzfeednews.com ↗)

37 points · by panic · 8y ago · 28 comments

comment 8y ago · link · parent

The demo is worth a watch if you haven't heard of DabbleDB before: https://www.youtube.com/watch?v=6wZmYMWKLkY

comment 8y ago · link · parent

I think that feeling has more to do with the way people used the internet than it does with AIM itself. Nobody "goes online" any more. Now we're always online, so it's less special.

comment 8y ago · link · parent

I miss the social features of the original del.icio.us. Pinboard is okay, but it's much harder to find other people to follow.

comment 8y ago · link · parent

Vary for traits doesn't do that, though! "Size of a particular view" isn't a trait, and "value of a single constraint" is different from the layout of the view.

Let me give a concrete example. Say you're writing a view to display a photo in a swipeable gallery. You want to position the associated UI elements where there happens to be room around the photo. That is, when the photo is tall, you want the UI to be placed on the side, but when the photo is wide, you'd prefer the UI to go on the bottom. The individual UI elements are mostly the same, but the layout is different for each state.

With -layoutSubviews, you can write your two layouts as usual, then use an if statement to switch between them:

    - (void)layoutSubviews
    {
        if (_tallMode) {
            // ... tall layout ...
        } else {
            // ... wide layout ...
        }
    }
Shared code can be factored out as necessary. Animation can be done with the following pattern:

    [view layoutIfNeeded];
    // -setTallMode: sets the layout needed flag if the value changed
    [view setTallMode:shouldBeTall];
    [UIView animateWithDuration:duration animations:^{
        [view layoutIfNeeded];
    }];
How would you specify these two states using IB/autolayout? And how would you animate between the states as you swipe between photos?

comment 8y ago · link · parent

I'm not talking about hardcoded layout; the math to position a view a certain distance away from an edge is very easy to write.

In fact, it's easier to make dynamic views in code. What if you want some part of your layout to change based on the size of a view (as determined by screen size, dynamic type setting, language and so on)? Do you create two separate XIB files? How do you keep them in sync?

1190.

Calculator Forensics Results Sorted by Result (2007)(rskey.org ↗)

1 points · by panic · 8y ago · discuss

comment 8y ago · link · parent

Interface Builder and Auto Layout were both designed for the Mac and have never really fit in on iOS. The best way is honestly just to write code: implement a -layoutSubviews method which updates the UI to match your app state, then call -setNeedsLayout whenever the state changes.
1
394041
120