HNHacker News
TopNewBestAskShowJobs

tzahola

1,317 karma · joined September 18, 2017

submissionscomments
tzahola··on Youtube-dl: Command-line program to download videos
I used to use it frequently, but nowadays I just replace “youtube.com” with “hooktube.com” in the URL.
tzahola··on React Native: A retrospective from the mobile-engineering team at Udacity
1. I reviewed the app. I didn't attribute any of the issues to React Native itself, did I?

2. The Airbnb and UberEats apps were written by expert native developers (I happen to know a few of them), using some React Native.

You see, expert native engineers can deliver quality apps using native frameworks. And surely, if they look into React Native, most of the time they can manipulate it from the JS side to get the desired outcome on the native side. The middleware is a hinderance for them as it gets in their way of implementing what they want in the first place.

It's like building those ship models in a bottle: if you know how to build the ship, you just have to learn how to do it through the neck of the bottle. If you don't know how to build it in the first place, well... that's a different story.

tzahola··on Show HN: Axax – Async iterator extensions for JavaScript
>Wouldn't it be wonderful if ESnext allowed you to write event loops that maintain state with block scope variables instead of all the hacks we have to resort to now?

I think this is already possible:

    let event = null
    while (event = await getNextEvent()) {
        ... // process event
    }
getNextEvent() creates a promise, registers an event handler which resolves it and returns the promise.

Have I misunderstood your question?

tzahola··on The Future of Computing: Logic or Biology (2003) [pdf]
I prayed for the starter motor to be able turn the crank with whatever charge was left after my brother borrowed my car and drained the battery by leaving the headlights on.
tzahola··on Important database news from the last few months
Why do you put SQL statements in the “core”? Just put them behind and interface and call it a day.

SQL and relational data is the only option, unless someone comes up with an equally powerful alternative with similar theoretical underpinnings.

tzahola··on React Native: A retrospective from the mobile-engineering team at Udacity
The “gun” being which language?
tzahola··on React Native: A retrospective from the mobile-engineering team at Udacity
Ok, this works only for fullscreen because of vh. Let's say I want this to work within another DIV too, so you can't use vh. (and the parent DIV's size is flexible, so you can't hardcode it into calc(...)).
tzahola··on React Native: A retrospective from the mobile-engineering team at Udacity
>limiting the width with max-width limited to at max width * aspectratio

Sorry, I don't understand this.

tzahola··on React Native: A retrospective from the mobile-engineering team at Udacity
1. When the app starts, the onboarding screen appears with a flicker/glitch: https://imgur.com/IyjM82n

2. The app starts with a launch image (the logo in the center), which then fades away to show another launch image (with the logo on the top half of the screen): https://imgur.com/0n3Zbof (probably because ReactNative must load the JS bundle before it can show anything)

3. The login screen of the application fits on the screen, yet it can be scrolled up/down for seemingly no reason. The amount you can scroll feels suspiciously close to the height of the iOS status bar: https://imgur.com/P6conGz (probably because ReactNative sets the UIScrollView's contentInset incorrectly)

4. Text fields / buttons look like on a website.

5. When you navigate back from the login screen after a failed login, there's a brief moment while the "Unsuccessful login with Facebook" message is visible, which then quickly disappears: https://imgur.com/hTTKbIt

Sorry, but it feels like a webapp to me. Though it might be perfect for your use case!

Update: I've found some other issues:

6. You can't interact with buttons (e.g. "Next" button on registration) while the keyboard is visible: https://imgur.com/dpy5xv8

7. The first time you switch to a tab, it's completely empty, then suddenly the content pops into place: https://imgur.com/JKaCJED

8. Tapping on the search button makes the content of the previous page jolt against the top of the screen while navigating to the search page: https://imgur.com/BJDYvda (focus on the panda)

9. The "sidebar" menu feels very out of place on iOS. Also, when you select e.g. "Settings", the content on the right does a very weird fade/slide animation: https://imgur.com/ChNzvwW

10. When you switch between two non-adjacent tabs, the viewport slides over the in-between tabs too: https://imgur.com/BZFU0Sv

tzahola··on React Native: A retrospective from the mobile-engineering team at Udacity
>One of my devs was really sabotaging processes just because he hate JS.

Did you fire him/her?

tzahola··on React Native: A retrospective from the mobile-engineering team at Udacity
I check out "modern" web development from time to time.

What's the state of the art in 2018? Can you have a DIV with a fixed aspect ratio fitted to the screen? Last time I've checked (in 2017) this was impossible without JS.

tzahola··on Fuzzyset – A Human-Readable Interactive Representation of a Code Library
Maybe he’s programming in APL
tzahola··on Juggalos figured out how to beat facial recognition
Ok, here's an example from the cvdazzle site: https://cvdazzle.com/assets/img/coreana/coreana-04-copyright...
tzahola··on Juggalos figured out how to beat facial recognition
But it's not a neutral face. It's a face of disdain and contempt.

This is a neutral face: https://cdn.psychologytoday.com/sites/default/files/styles/a...

And this is the face of disdain I'm talking about: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSGkhmT...

tzahola··on Juggalos figured out how to beat facial recognition
Checked the cvdazzle site. Why do these models - and models on "high fashion" photos in general - look always like they feel deep contempt towards the viewer? Where did this trope come from? What are they trying to suggest? I don't get it.
tzahola··on Pointers Are More Abstract Than You Might Expect in C
You're right. There's no undefined behaviour for ==:

Two pointers compare equal if and only if both are null pointers, both are pointers to the same object (including a pointer to an object and a subobject at its beginning) or function, both are pointers to one past the last element of the same array object, or one is a pointer to one past the end of one array object and the other is a pointer to the start of a different array object that happens to immediately follow the first array object in the address space.

tzahola··on Perhaps it is simpler to say that Intel was disrupted
Jah, szerintem is gecijó a diverzitás! :P
tzahola··on Pointers Are More Abstract Than You Might Expect in C
Yup, I've mistyped "true" as "false".

If you set "_start" and "_end" to addresses of different objects, then you're invoking undefined behaviour and all bets are off. But this should be perfectly valid IMO:

    extern char* _start;
    extern char* _end;

    void foo() {
        for (char* c = start; c != end; c++) ...
    }

    int main(int, char**) {
        char buf[128];
        _start = &buf[0];
        _end = &buf[128];
        foo();
    }
Right?
tzahola··on Pointers Are More Abstract Than You Might Expect in C
There's nothing surprising in the first example. Comparing the addresses of stack variables is undefined behaviour.

The second one is more interesting:

    extern int _start[];
    extern int _end[];
    
    void foo(void) {
        for (int *i = _start; i != _end; ++i) { /* ... */ }
    }
GCC optimized "i != _end" into "true". The kernel guys fixed this by turning "_start" and "_end" into "extern int*". I always thought [] was just syntactic sugar over a regular pointer, but seems like I was wrong.
tzahola··on Below the Surface – Finds from an archaeological project in the River Amstel
Works horribly in Safari.
tzahola··on Porsche shatters the Nürburgring record we thought was unbreakable
Not bad, but this is still my all time fav Nürburgring lap: https://www.youtube.com/watch?v=OSMCfPASImQ
tzahola··on The Matrix Calculus You Need for Deep Learning
Math? Meh.

Just throw more GPUs at it bro. Gradient descent 4ever! xD

/s

tzahola··on I'm Scott Aaronson, quantum computing/computational complexity researcher. AMA
Algorithms 101
tzahola··on SICP Goodness – Why you don't need looping constructs
Technically you don’t need loops, that’s true.

But from a pragmatic standpoint, it’s just too easy for someone to turn a tail-recursive function into non-tail recursive, causing a stack overflow eventually.

So when working in a large team, with run-of-the-mill programmers, I’d stick with loops.

tzahola··on IEEE Position Statement in Support of Strong Encryption [pdf]
With enough participants, security implies effective anonymity. See Tor.
tzahola··on Going IPv6 Only [pdf]
What prevents you from supporting IPv6-only networking? HTTP libraries support it out of the box. If you use sockets, just update them to use PF_INET6 and it'll be backward-compatible with IPv4 through IPv4-embedded IPv6 addresses.
tzahola··on C++17 Features That Will Make Your Code Simpler
You assume that the point of using types is readability, which is false.

Types let the compiler reject a large set of invalid programs, which would otherwise produce a runtime error in a dynamic language.

    for (auto foo : foos) {
        foo.bar()
    }
I don't care about the exact type of `foo`, so I let the compiler deduce it behind the scenes. However, I still want it to break my build if `bar()` doesn't exist!
tzahola··on C++17 Features That Will Make Your Code Simpler
>Can you write code that is completely safe?

Yes. Just don't use raw pointers. Use unique_ptr, shared_ptr and weak_ptr instead.

tzahola··on Anti-If: The missing patterns (2016)
Mostly good advice, but without multiple dispatch, polymorphism can only work in the simplest cases, and even then it's often not worth the boilerplate.
tzahola··on 'Unique' cannabis compound reverses brain aging in mice
Thx for the advice, but I haven’t smoke pot since 2012 (was 19 at the time), and I don’t intend to try again.

The first few times I did it back then, everything was cool, but then something clicked in my brain that permanently associated pot with extreme anxiety.

On one hand I’m kinda thankful that this saved me from turning into a lazy pothead in my teenage years, like some of my friends did, on the other hand it sucked being the weird guy who always passes up the spliff without takin a hit. ¯\_(ツ)_/¯

← PreviousPage 4 of 29Next →