q-rews's comments

q-rews | 4 years ago | on: ‎Amplosion: Redirect AMP Links on the App Store

Apollo is the answer. Reddit’s properties are a dumpster fire. Heck even the desktop version regularly starts playing some random video I scrolled past a minute ago… good luck finding it. Absolutely embarrassing “bugs” everywhere on Reddit, even before getting to the dark patterns.

q-rews | 4 years ago | on: Elk: A low footprint JavaScript engine for embedded systems

> In developing this interpreter they eliminated some of the languages features to make it simpler.

That means you can't run general-purpose code safely, which means you should probably write/rewrite/adapt it, which means you might as well use a different language.

I'm a JS developer, but the parent might have a point here. Why run something like this in production when you're likely to end up in unexpected situations? Either a runtime is compliant, or you're going to have a bad time.

The project is cool, but I wouldn't use it as an example for what JS can do.

q-rews | 4 years ago | on: Hospitals lift curtain on prices, revealing giant swings in pricing by procedure

You’re right, my estimate for a short surgery in a private Thai hospital last Monday was “10k/11k THB excluding fees.” I walked out of the hospital 2 hours later having paid 9.1k THB (270 USD) painkillers included.

Estimates are fine, it’s just that they don’t benefit US hospitals. Stop justifying them, they’re scamming you.

q-rews | 4 years ago | on: Database containing personal info of 106M visitors to Thailand exposed online

By law the hotel has to register your arrival online, as a foreigner.

Obviously this is easily skirted by having another person do the check in and you arriving later. I've also stayed in some guest houses in Thailand last month and they did not register me, but that doesn't mean they should have done so.

If they don't, technically you're on the hook for not registering.

q-rews | 4 years ago | on: Ask HN: I hate vertical scrolling. How can I paginate the web?

Wow, that is amazing. The picture dictionary is incredibly useful when learning a language and it's the first time I see it, in a general-purpose tool too!

When learning a language I have to keep a dictionary, Google Translate, and Google Images open at the same time, and it's frustrating to find that neither language tool includes direct access to the other 2.

q-rews | 4 years ago | on: Ipv6excuses.com (2016)

This is like the comment “Who needs the iPhone 13’s faster CPU” I read yesterday on a random forum, except you’re on HN and you should probably know better.

The reason is simple: IPv4 addresses are getting more rare and therefore more costly.

q-rews | 4 years ago | on: Excel as Code

I don’t know why you would say that.

Excel is democratizing tool for programming. It’s a true WYSIWYG for databases, calculations, plotting, and more. And it’s just a regular app that every PC has.

Everyone needs a table. Hey did you know your table can do math automatically? It actually can fetch live forex data too. And infinitely more.

q-rews | 4 years ago | on: Currying in JavaScript

Currying makes it implicit, but it's the same thing.

    const one = curriedSum(1)
    one(2)
is the same as

    const one = sum.bind(null, 1)
    one(2)
with the exception that the latter is explicit and not as slow as `curriedSum`.

Both `sum` and `curriedSum` can be used the same way:

    curriedSum(1)(2)
    sum.bind(null, 1)(2)
or just:

    curriedSum(1, 2)
    sum(1, 2)
One of the advantages is that non-curried functions make the return value explicit. You can't implement `sum(...addends)` with currying because curried functions have a fixed number of parameters. Once past that, a call will not return a function anymore.

    sum.bind(null, 1).bind(null, 2).bind(null, 3).bind(null, 4) // Still not called
    curriedSum(1)(2)(3)(4) // Maybe it works, maybe undefined is not a function

q-rews | 4 years ago | on: You may not need Moment.js

I think details did in fact replace many of those checkbox hacks, but people also say it’s still the wrong tool for accordions and such, which confuses me.

q-rews | 4 years ago | on: You may not need Moment.js

Probably not. A few requests surely got cached, but the vast majority likely did not. jQuery has its own official CDN URL so that probably had a chance at being deduplicated.

q-rews | 4 years ago | on: You may not need Moment.js

It already exists, but it’s mostly about hacks that aren’t very accessible, like using checkboxes to simulate interactivity.

q-rews | 4 years ago | on: You may not need Moment.js

True but also the amount of code React requires (even putting the library itself aside) is ridiculous. I’m working on a React project (but not directly on React) and the file length for ridiculously-basic stuff is mindboggling. Vue and Svelte are much saner.

q-rews | 4 years ago | on: You may not need Moment.js

Is this sarcasm? I wish publishers gave a damn about page weight. I’m sure some big names do, but most don’t, and it’s easy to see if you open any monetized website at all.
page 1