HNHacker News
TopNewBestAskShowJobs

turnipla

121 karma · joined March 22, 2020

submissionscomments
turnipla··on It's 2020 and I'm using image maps
Downvoted why? I told the truth. Why would you use an antiquated feature that's not up to par with SVG?

The absolutely ridiculous part of this is that they're using JS to create additional DIVs on top of the image.

Why use the map at all?

Edit: May 20th 2020: the day I learned HN users are retarded

turnipla··on It's 2020 and I'm using image maps
And that’s a bad idea.

HTML images maps are not responsive. Just use SVG, it works without any scripts and it resizes with the image.

If you use <foreignObject> you can also use a fully responsive <picture> tag

turnipla··on Don't set the language of your website based on user location
> Why would you want to see Laotian?

Statistically speaking, Laotian users speak Laotian. As a traveler, I’m the minority.

Regarding the rest, I feel you. They can guess whatever language as long as they make it easy to change it, without unnecessary redirection games.

Apple.com is relatively good with this:

> Hey I see you’re in Thailand, maybe you want to check out the Thai site.

turnipla··on Don't set the language of your website based on user location
Yes and no.

I’m in Switzerland, please follow my browser language. Don’t guess whether I speak Swiss, French, Italian, etc

I’m in Laos, my OS is in English. Please show me Laotian.

However, do make it easy for anyone to change the language. I shouldn’t have to hunt the settings page when traveling.

turnipla··on Don't set the language of your website based on user location
Why wouldn’t Germans have their “browser languages configured correctly?”

German is well supported by software. If Germans want German content, they’ll have their OS set to use German.

Filipinos on the other hand would be a better example: Their software is likely to be in English but surely they prefer reading Tagalog or Cebuano.

- -

As a traveler, I’m thoroughly annoyed by being shown websites in the local language, but that would be perfectly fine if it was easy for me to change the language.

Sadly though changing the language often means having to learn what “Settings, Language, <language name>” looks like in the current country.

turnipla··on The Death of Couchsurfing?
I don’t think you ever used CS before and don’t understand it regardless of the current situation (which will resolve eventually)

COVID surely affected all hospitality, but money isn’t relevant to CS anyway.

turnipla··on Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
This is exactly it!
turnipla··on Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
This breaks my use case

    function shorten(text, length)
      const t = document.createElement('input')
      t.maxlength = length
      t.value = text
      return t.value
    }
turnipla··on Ask HN: Is there a search engine which excludes the world's biggest websites?
Google used to let you blacklist websites many moons ago, that would go a long way already.

Now there are a few extensions that do that, but obviously they only hide the results from each page, so sometimes you will see pages with 2 results, if any at all.

turnipla··on In Defense of the Modern Web
It depends. Neat short animations can be nice. Even your lightbulb “dimming in” and out would be quite nice.

What you’re complaining about is the lightbulb taking 3 seconds to turn off and its toggle costing $100. Now that something nobody likes.

turnipla··on In Defense of the Modern Web
Hey that Makepad looks great. Too bad it doesn’t make my phone keyboard appear. You know… the same thing you get by adding a plain `contentEditable` DOM attribute.

Maybe reinventing the whole damn car on canvas isn’t a great idea either. I bet that the keyboard isn’t the only part that doesn’t work.

Flash was hated for this reason too: Breaking affordances. Imagine everyone reinventing their own UI framework on each app.

turnipla··on The World's Longest Alphabetical Email Address (2004)
I love that it stores 6000 mails in 6.0 Megabytes.
turnipla··on Coming to Chrome: a new way to use tabs
> The fact I have to go three menus deep just to open the history screen is bad

History is never more than 2 clicks away:

    - Open Library button, click History
    - Open History menu (macOS)
However, yes, core browser functions seem to be stuck to what they looked like in the year 2000 for most browsers. Only Safari basically tries to reinvent its UI every couple of years.
turnipla··on 2020 13-inch MacBook Pro review: The standard macOS workhorse
There's a comparator on apple.com: https://www.apple.com/mac/compare/
turnipla··on Lidl to Launch Rival to AWS
You’re talking about ecommerce, not automation.

Automation is unrelated to where products are sold.

Automation might just mean one fewer cashier at a regular store.

turnipla··on Lidl to Launch Rival to AWS
How does this make sense? Automation lowers prices, not margins.

The prices go down because you don’t have to pay people. If it costs the same, you don’t lower prices just because you’re using automation.

turnipla··on We Chat, They Watch
> extremely engaged with and integrated into the global system, beholden to Law and a robust court system

Uhm yeah but countries do nothing when Russia annexes Crimea, what do you think they’d do if the US simply spies on them? Absolutely nothing. It’s literally happening right now and it’s public knowledge and “it’s just a matter of national security.” Case closed.

turnipla··on Static Sites with Elasticsearch
You’re confusing static with serverless.

Your content is indeed static but your search is not: It’s handled by a service that parses your requests and produces output.

Static content on the other hand are files being served straight from the filesystem.

As for Disqus, they’re not static either, they’re just “a service for static websites”

turnipla··on Suitcase: A macOS tool for deploying GUIs for simple commands and scripts
All of that doesn’t seem to belong on to CLI flags. I love the possibilities this opens up, but I’d much rather write a configuration file.
turnipla··on A Critique of React Hooks
I never got into React, but seeing it compared to Svelte I find it hilariously convoluted. Hooks make it even worse.
turnipla··on A one-line package broke `npm create-react-app`
This is correct. Many tools are split into multiple packages for — hear me out — convenience.

I regularly extract features from my apps into new npm packages. This way they can be reused by other apps.

Troglodytes can keep copy-pasting code between apps while npm users publish once and update everywhere.

turnipla··on A one-line package broke `npm create-react-app`
Good luck vendoring node_modules.

Why are these threads filled with people who know nothing about node?

npm and yarn both have lockfiles for this purpose. Vendoring only bloats your repos.

turnipla··on A one-line package broke `npm create-react-app`
This is not a library. Stop thinking of it as a library. It's a building block, a module.

> why a library like this is even necessary?

Do you know how to determine whether something is a Promise?

Wrong. Also the first few StackOverflow answers are wrong or incomplete.

You know what's better? Using the same library 3.4 million repos depend on, that is tested and won't break if you use a package-lock.

> Can't you just wrap everything and treat it like a promise?

Maybe. Maybe not. Treating everything as a Promise means you have to make your function asynchronous even if not necessary.

turnipla··on Incremental Builds in Gatsby Cloud
I think that’s the point. No plugin system. Compare Babel to Bublé or even Sucrase for example: https://github.com/alangpierce/sucrase

Preparing data for external use always takes extra effort.

You can build an efficient self-contained tool in JavaScript too.

turnipla··on Incremental Builds in Gatsby Cloud
I don’t think it’s a language issue. Even for JavaScript bundlers you have the slow extensible bundle and the “new super fast bundler” that dies in a month because it only fits one use case.

How flexible is Hugo? And how many plugins does someone generally use?

turnipla··on The crash of the global flower trade
> The world has more than enough food growing to feed everyone.

That's quite a statement you made there, especially in the context of Africa.

turnipla··on Userscripts Are Fun and Are Still Very Much Relevant
Your OS might be able to “reduce white point” everywhere or you can replicate it via color profile.
turnipla··on Colornames.org – A collaborative effort to name all 16.7M colors
You’re missing the point of the query. What’s the point of using the query at all?

OP suggested it as a way for users to customize their HN color; Then you suggested to take this query and make an extension out of it.

If you want to customize your HN color, use CSS, not this roundabout way through a query parameter.

The query never makes sense anyway. If HN were to allow customization they’d allow it in the options, not as a random query that you have to set manually.

turnipla··on Colornames.org – A collaborative effort to name all 16.7M colors
That’s called CSS. Use a user style, not javascript. The query is not applicable since its not offered by HN themselves.
turnipla··on How to manage HTML DOM with vanilla JavaScript only?
Risk of what? You can make dependencies fully sticky with lockfiles.

Instead of adding a file to your “libs” folder you add a line to package.json

Any code that isn’t in my repo is code I don’t have to maintain.

Left pad can’t happen anymore (for 4 years now) and if you don’t know that you’re either lying or outdated (like those files in your libs folder)

Page 1 of 2Next →