HNHacker News
TopNewBestAskShowJobs

peferron

834 karma · joined June 26, 2013

https://peferron.com — peferron@gmail.com
submissionscomments
peferron··on Millions of electric cars are coming. What happens to all the dead batteries?
The warranty on ICE powertrains is usually around 5 years or 60k miles, which is much worse.
peferron··on Why is zero not falsy in Clojure? (2015)
Nope, it's a great design decision.
peferron··on Cybercriminals who breached Nvidia issue one of the most unusual demands ever
That's weird. I've been using an Ubuntu desktop with a GTX 1080 daily for years now, across multiple major OS versions and driver versions, with zero GPU-related issues.
peferron··on Solid.js feels like what I always wanted React to be
Fully agree.

With React, "plain JS" works just like I expect it to. If I have an event handler that does `x = foo` then I don't expect my component to re-render. Why should it? I'm just changing the value of a local variable. If I want to re-render, there's no way to express that in plain JS, so I'll use React's API and write `setX(foo)` instead. Now it's clear that it's not just changing the value of a local variable, but using React's API to do something else.

With Svelte, writing `x = foo` doesn't just change the value of a local variable. Maybe it's going to run a bunch of magic to update a piece of the DOM instead. Or maybe I need to prefix it with `$: ` which in plain JS is a label for a continue or break statement, but here doesn't mean that at all and means reactivity instead.

Oh, and to conditionally render an element, instead of writing idiomatic JS like `condition && <Element />`, I now have to write `{#if condition} <Element /> {/if}`.

WTF. What looks like plain JS is now magic, and what should look like plain JS such as conditional rendering and lists are now some contrived templating constructs.

And almost everyone here is telling me that I should find that simpler somehow.

It makes zero sense.

peferron··on J. Kenji López-Alt says you’re cooking just fine
I went to Wursthall twice and found it to be mediocre. Backhaus is indeed excellent, and in a completely different league.
peferron··on Ask HN: How do you deal with getting old and feeling lost?
Having kids and being a good parent can be really hard. Parents trying to convince others to have kids might be trying to validate their own choices. We do that all the time for trivial choices like iPhone vs Android, so it's expected that we'll do it even more for irreversible choices like having kids. I wouldn't read too much into it.
peferron··on Adobe tricks users into a 12 month contract
> There are all sorts of viable competitor apps

> monopoly

You lost me there. Are you using a different definition of monopoly than the usual one?

peferron··on Deno Deploy Beta 2
The parts used to make your car were likely delivered to the factory by a semi truck, and not by another car. Should you buy a semi truck to go to the mall then, since even the carmaker thinks that cars aren't good enough? Obviously not. Different requirements are a thing.
peferron··on Deno Deploy Beta 2
If you're building a application on top of PostgreSQL and GraphQL then there's no Rust equivalent to PostGraphile, which is a JS/TS lib.

If you're building on top of GCP services, there are official JS/TS libs but no official Rust libs.

If you're doing data science then the ecosystem of Python libraries (another interpreted language) will get you up and running much faster than Rust.

So yes, there are plenty of cases where using an interpreted language will be much more productive than limiting yourself to Rust.

peferron··on Vue 3.2
It's weird for this analysis to focus on the total size of the app. If a Svelte app has 100 components but a page only uses 10, then surely it's possible to only fetch these 10 components and defer the rest, right? This way the size of each page does not have to grow linearly with the size of the app. And the size of each page matters more than the total size of the app -- after all, we're on the web, not on mobile where users need to download the whole app before running it. Am I missing something here?
peferron··on I had to give a wrong answer to get the job (2017)
> an algorithm that takes 1/(randFloat()) time to insert an element to the data structure where randFloat() returns any possible floating point number with equal distribution, is still O(1) algorithm, even though there is no upper limit on how long it can take to execute.

According to the definition, if 1/(randFloat()) = O(1) then there must be a constant M that satisfies 1/(randFloat()) <= M * 1. But according to your own words there's no upper limit to 1/(randFloat()), therefore there's no such constant M, therefore it's not O(1).

(In practice on most systems there would be an upper limit since a float can't be infinitely close to zero, but let's act as if that wasn't the case.)

peferron··on Generating JSON Directly from Postgres
Sounds awesome. To anyone interested in that approach, the closest open-source stack would be:

  - PostgreSQL
  - PostGraphile
  - Restrict prod to only allow persisted queries
  - Generate TS types using apollo-cli or graphql-code-generator
peferron··on Generating JSON Directly from Postgres
Once you start having multiple data sources, business logic implemented in application code might be easier to reuse than business logic implemented in one of the data sources. For example: start with Postgres, then add ClickHouse to the mix. It might be easier to let the application handle access to both DBs, rather than write RLS policies in Postgres and then try to apply them to ClickHouse.
peferron··on Tech workers swore off the Bay Area, now they’re coming back
> The weather takes some adjusting, but not more than it took to adjust to the Bay Area fogginess for this SoCal native. Most of the year it’s beautiful out here.

4 months a year above 90F, 7 months above 80F. I'm glad it works for you, but that's some adjusting indeed; people don't set their thermostats to 80F or 90F for a reason, and it's not just cost.

Regarding Bay Area fogginess, did you mean SF / Pacific coast fogginess? Most of the Bay Area seems to be fog-free. I don't remember the last time I saw fog in San Mateo.

peferron··on OSSU: Path to a free, self-taught education in computer science
Is it a protected title where you live?
peferron··on Amazon workers vote against unionizing in Alabama
> "Unlimited PTO" isn't unlimited, and is a bad deal for the employee in all ways.

Then work for a company with fixed PTO. There are plenty of these; the vast majority, actually. Why are you so hell-bent on denying that choice to people who wish otherwise? Even worse, you're telling these people that they are wrong and that unlimited PTO cannot possibly be a good fit for them. How can you expect people not to disagree when they have first-hand experience of the contrary?

peferron··on Amazon workers vote against unionizing in Alabama
> not showing up to work at all. That's unlimited, and we all know you'd get fired if you did that

You can also take the fixed PTO allocated by the company, and then elect to not do any useful work the rest of the time either. What's your solution to that? And why can't this solution work in an unlimited PTO environment?

Note: I don't think that unlimited PTO is a good fit for all industries (it certainly isn't), but your position seems to be that unlimited PTO is never a good fit, which I disagree with.

peferron··on ClojureScript 1.10.844
It seems fairly subjective. I'm familiar with Clojure and happily use it at work, but I haven't seen anything in CLJS that comes close to the power of automatically generating types for GraphQL queries, for example. With a single command, I get notified if some client queries do not respect the server schema, plus separate types for each response which provides autocomplete and information about each field (type, nullability...) right in the editor. I don't feel the need to reload a bunch of times because everything usually works on the first try. I still need to tweak the CSS but I tend to prototype that in the browser dev tools anyway.

I'd pick CLJS over JS but not over TS.

On the backend, I'd pick Clojure over both JS and TS in a heartbeat, though.

peferron··on Fed up with the Mac, I spent six months with a Linux laptop
I agree that you don't need i3 for the common scenario (IDE + terminal in my case). i3 is more about the myriad of uncommon scenarios that come up all the time.

For example, maybe I want to keep an eye on several terminal commands at the same time. With i3 I just press the terminal shortcut n times and I have n new terminal windows sharing the space. If one of the commands fails with a long error message I press another shortcut and the terminal windows are now tabbed and full height, with the IDE still visible on the side.

Or maybe I want a small browser window or Slack window in a corner to keep an eye on a meeting or discussion while I work.

Whatever uncommon layout best serves my needs right now, i3 can get it done in seconds.

You never really need a tiling WM, though. i3 just solves my problems really well, so well in fact that I actively enjoy using it. Some people feel the same way about vim, and you never really need vim either.

peferron··on Fed up with the Mac, I spent six months with a Linux laptop
I use a Mac laptop for leisure and a Linux desktop for work. I'm very happy with both. Switching their roles would be miserable: Linux laptops can't compete on trackpad and battery life, and Macs can't compete on perf especially if you need more than 16 GB of RAM. Macs also don't have i3, but that's subjective.
peferron··on Fed up with the Mac, I spent six months with a Linux laptop
> Tiling wms like i3 target a very narrow user base. Unless you are a sysadmin or just work only with terminal they are pretty useless.

If you only use the terminal, you don't need a tiling WM because tmux and others offer similar functionality out of the box.

Tiling WMs are useful in the opposite scenario, when you use many different apps and need a unified way to manage them all.

peferron··on Gallup: U.S. church membership dips below 50% for first time
I'm atheist, and my answer is simply empathy I guess? I just try to treat others in the same way I want to be treated.

People who say that morality can't exist without religion are scary. If they suddenly lose their faith, are they going to start hurting others? What if their religion has blind spots that doesn't tell them how to behave in a specific situation, or tells them that groups like gays and non-believers are fair game?

peferron··on Pollution from fossil fuel combustion deadlier than previously thought
> I took the family to Europe in 2019, in terms of smokers and smoking it was like going back in time compared to the US.

Last time we went back to France, we took the kid to the playground and adults were smoking a few meters away from the slides. After double-checking that there was indeed a sign indicating that smoking was forbidden, I told them to step and they did, but apparently nobody else cared.

I haven't see that happen yet in the SF Bay. Obviously though, we get wildfire smoke for several months, and right after that people start burning wood in their open fireplaces for winter, so it's not all rosy either.

peferron··on Hockey goalies are too big now
I loved the article and read it entirely, but I'm definitely even less interested in hockey now.
peferron··on Lisbon’s startup scene rises as Portugal gears up
> Only really matters if your only concern is wealth

I don't get this knee-jerk reaction where, if you discuss money, then it immediately must be the only thing you care about. Why can't it just be one element of the equation, along with other usual stuff like weather, food, etc?

peferron··on Lisbon’s startup scene rises as Portugal gears up
Even without buying, you can spend a higher % of your income on rent and still end up saving more in absolute numbers; and the absolute number is what eventually matters unless you're dead set on picking a place and never moving again.
peferron··on Threadripper 3990X: The Quest To Compile 1B Lines Of C++ On 64 Cores
Yep, with permanent WFH due to the pandemic I started working on a desktop with 5950X + 64 GB memory and it's been a huge upgrade over my work laptop (and probably any laptop available at the moment).

It's much quieter under load as well.

peferron··on Threadripper 3990X: The Quest To Compile 1B Lines Of C++ On 64 Cores
If you use an alerting system you should eventually get one at MSRP from e.g. Amazon. Yes, it's a hassle.
peferron··on Studying the impact of U.S. immigration barriers on global knowledge production
> I find it quite telling that you are surprised Greeks might be considered anything but white, while not showing any surprise about Turks. I don't think there's any difference in skin color, so that confirms my suspicion that "whiteness" isn't just about looks.

There are many more people of Greek descent than of Turkish descent in the USA. It's very possible that the person you replied to is simply not familiar enough with people of Turkish descent to express surprise at your claim.

peferron··on Studying the impact of U.S. immigration barriers on global knowledge production
I live in the US, but was born and raised in France and Greeks are considered white there. If the 1998 football team described as "black-blanc-beur" had included players of Greek descent (and maybe it did?), they would have been part of the "blancs", just like Youri Djorkaeff.

Take what you read with a grain of salt. I'm certainly very skeptical of the implied claim that Germans wouldn't consider Greeks as white.

Note that being considered white doesn't preclude Greeks from being discriminated against, just like some people discriminate against e.g. white Poles.

← PreviousPage 2 of 11Next →