HNHacker News
TopNewBestAskShowJobs

epidemian

1,261 karma · joined May 6, 2011

https://demian.ferrei.ro
submissionscomments
epidemian··on The wealth of the 25 richest families in the world soared 43% in the last year
Other dynamics, like inflation and gentrification to name a couple, can make Situation 1 basically the same in practice to Situation 2. It just makes it more difficult to point out because "everyone's money number has gone up, so the system works!"
epidemian··on Richard Stallman reveals he has cancer in the GNU 40 Hacker Meeting talk [video]
Words have meaning.

You used a word that has a specific meaning to refer to something else, hence the miscommunication.

epidemian··on Live near your friends
I think the downvotes you're receiving are misjudged. It's a personal opinion to have, and as long as you're not harming or forcing that opinion onto others, i respect it.

I don't share it though. And it's interesting to think what assumptions lie beneath it. If you were bi, would your wife not allow you to hang out with men too? And if she were bi, what would you think of her having woman friends? Do you think this arrangement would also be "the most sensible thing to do" for a non-monogamous person, or for someone who's monogamous and completely at peace with their partner?

epidemian··on Web apps are better than no apps
> Sorry, not even remotely close. I want to see some serious evidence.

There was this blog post of a company trying improve their clients' webpage performance by incrementally migrating them from JS to WASM/Rust: https://zaplib.com/docs/blog_post_mortem.html

In short, their idea failed. Those rewrites did not yield the "orders of magnitude" perf improvements that they were hoping for. A quote from the article:

> Rust is faster than JS in some cases, but those cases are rarer than we expected, and the performance gain is on the order of 2x some of the time, not 10x most of the time.

Having had a good deal of experience programming in JS, this doesn't surprise me. JS engines are extremely good at JIT optimizing, especially if you know what you're doing and give them code that's suitable for optimization (e.g. using mostly primitives and arrays, simple loops, avoid creating tons of intermediate data structures, etc).

IDK if any of this counts as "serious evidence". It's purely anecdotal really. But it's on par with the "evidence" presented as a counter to this.

epidemian··on The ad-based internet is dying, and it's getting worse in the process [video]
Depends on the definition of "for free".

Depending on where one lives, but many people have access to "free" government services, ranging from roads, education, unemployment security, healthcare, and more. The costs of these services are payed by taxes.

Some "free" services are sustained via donations. Wikipedia is a good example of this.

Some people might say that those are not examples of "for free", because someone is paying for those things, either via taxes or donations. They do have a cost for society. Yes, but in that case then ad-based services are not free either: the advertisers are putting the money to run those services, and the society is also paying a huge cost in thousand of hours of people's lives wasted down the drain, promotion of harmful products, scams, etc.

epidemian··on Twitter now requires an account to view tweets
> [...] perhaps Twitter was sold for its existing content rather than existing or active user base.

Not a very significant distinction: if active users stopped posting, scrappers wouldn't have much of a reason to keep scrapping.

epidemian··on The Rails Doctrine
Yes, definitely omit parentheses when calling a method without arguments.

For calls with some non-block arguments, it's not so clear-cut as "always include parentheses".

Some methods are so prevalent that they almost become part of the language "syntax", even though there's nothing syntactically special about them. For example, you rarely see parentheses used on calls to `attr_accessor` or `private`:

  class Cat
    attr_accessor :fluffiness
    
    private def plan_world_domination
      # TODO
    end
  end
I think parentheses around `private(def some_method ... end)` would be especially non-idiomatic. Even though passing the result of the `def` expression to the `private` method is exactly what's happening.

Another place where it's usual to omit method call parentheses is on embedded DSLs. For example, in RSpec it's uncommon to include parentheses on calls to `describe` or `it`.

  describe "RSpec DSL" do
    it "looks neater without parentheses" do
      # ...
    end
  end
epidemian··on Rails Cheat Sheet
Using factories doesn't mean you need to persist everything to the DB on every test.

If you're using FactoryBot for example, you can use `build(:taco)` to instantiate a Taco without persisting it to the DB. If you use `create(:taco)` instead, then yes, the Taco will be saved to the DB, as well as all its associations (if any). This can of course bloat up your test execution time if you're doing this kind of instantiation + persistence on every test.

FactoryBot docs generally use `build` in their examples, as this should be the default build strategy used for most tests, while `create` should only be used on cases where you actually need to interact with the DB.

epidemian··on Bluesky Frustrations
Considering that VC funded projects tend to attract "career oriented" developers that have no incentive other than money or prestige, i'd say that could be a good thing.
epidemian··on Inkscape is hiring: Accelerating the GTK4 migration
> How come?

The fragmentation on Linux desktop causes a lot of churn, both in users looking for more cohesive desktop experiences, and on developers looking to not having to deal with all this mess.

In regards to major backwards-incompatible version changes, to me it's pretty clear that many developers simply don't give enough priority to maintaining backwards compatibility. Most cases i've seen of backward-breaking changes were unnecessary: the new features could've been added while maintaining the existing APIs (maybe deprecating them if needed). The decisions to not maintain the existing (and now deemed "old") APIs were not done on a technical ground, but more on an ideological/purist ground, where the "old" APIs were considered "bad" or too costly to maintain (both claims totally subjective and not supported by much evidence). And simply not enough thought was put in considering how users of the APIs may find it difficult to do a major version update, or might simply churn away and not do the update or look for an alternative.

Now, i don't have direct experience with GTK, so i might be totally bullshitting and maybe nothing that i said applies to GTK major version bumps. But the fact that so many projects find it hard to update and are stuck on older versions for long times, and that the desktop UI paradigm hasn't changed that much in the last 20 years (how much MUST the APIs for windows and UI controls change then?) makes me suspect that there is at least a bit of that backwards-compatibility disregard here too.

epidemian··on Conway's Game of Life digital clock
It's more impressive to have it running on your browser, with infinite levels of nesting, both "in" and "out": https://oimo.io/works/life/
epidemian··on Gig Workers Are Being Stabbed, Stoned, and Abused in India
> And like any country you have to be careful while visiting as a tourist.

I don't understand what you mean by any country. I think every country i've visited so far has been safer than my home country. So in my case at least, no, i didn't have to be particularly careful as a tourist, in fact i've needed less care when being abroad than when being at home.

epidemian··on Using {blocks} in Rust and Go for fun and profit
Yep. And they also keep single-use code local to the only place it's being used at the moment, which i think can help the readability and maintainability of said code :)

Functions do have a place too of course; even single-use ones. Especially when you can give them a clear purpose and name.

epidemian··on The 12-bit rainbow palette
IDK it's cool to be able to write these nice colors with 3 hex characters :)
epidemian··on React I love you, but you're bringing me down
> [React Context] was never meant to replace Redux, and as far as I know nobody from the React team has ever claimed something like that.

I think the conflation came more from the "community" than from the React team itself. Many people were (ab)using Redux for simple cases were Context would have been sufficient and, in the process, paying the price of having a lot of boilerplate related to writing anemic "reducers" whose only purpose was to store things on the global state, and eventually also paying the price of having a ball-of-mud of a global state where no-one could be sure of the dependencies between components, as anyone could be accessing anything on that big ball-of-mud. (Been there; not proud.)

So, when the Context API came along, with a much leaner API (no actions or reducers) and less "global-y" feel than Redux, people who were misusing the latter naturally saw the former as a good replacement

epidemian··on Figma: A Random Walk in Palo Alto
> Serious question, what about Figma is unique to a cloud app over a desktop app with cloud features.

There's probably nothing unique about it, but the server/browser model allows anyone on a team to access the Figma project as long as they have a web browser, while a classic client/server model would require a dedicated client software to be installed to access the project.

On my last job, we switched from using Abstract for sharing designs between the designers and developers, to using Figma for both designing and sharing between all team members, and the switch was a huge success.

Speaking for myself alone, the experience on Abstract was pretty terrible: the native application didn't have a Linux version, and the web client was dog-slow, buggy and limited in features. Figma, on the other hand, being the same web client for everyone, meant a pretty decent experience from the get go, which was a welcome change TBH.

epidemian··on Tell HN: We are trying to get tail calls into the WebAssembly standard
> How likely is it that the depth of the JSON structure would exceed the maximum depth of the stack?

Not that unlikely i'd say, at lest if the stack size is unreasonably small.

For example, on nodejs, JSON.stringify() chokes with a nested array of 10K depth:

  > N=10_000; JSON.stringify(JSON.parse("[".repeat(N) + "]".repeat(N)))
  Uncaught RangeError: Maximum call stack size exceeded
      at JSON.stringify (<anonymous>)
Curiously, JSON.parse() is OK with arrays of 10M depth (and probably more). A difference of over 3 orders of magnitude between functions that seem pretty symmetrical at first glance.

Imagine that you build some software that lets users nest things —e.g., a circuit designer, a visual programming language, a UI builder, etc— and you wanna save these nested structures as JSON, or process them recursively. Pretty natural fit i'd say. Now, as a user, i'd be pretty upset if my magnum opus of a very complex circuit, or giant visual program, or very busy beast of UI art, starts creashing the program when exceeding a mere 10K elements. My computer has gigabytes of memory! And, presumably, there's a lot still available. But nope, a meager stack can ruin all the fun.

I personally think this is a pretty silly limitation to have on software, especially given today's memory sizes.

epidemian··on Meta bans staff from open discussion of Roe vs. Wade
> You want to force me to agree with you or become unemployed

What in the hell? I think i totally failed to communicate what i mean if took that from what i said.

I tried to say that it's a personal decision of mine to try to change my workplace if i learn that people i work with/for are completely immoral. Like, i don't wanna work with people like that. It's a personal decision. But i wouldn't want to force anyone to agree with me or anything of that sort. Sorry if it came out that way, i didn't mean to.

epidemian··on Meta bans staff from open discussion of Roe vs. Wade
> People like you must have always been...

No need for these assumptions. Your argument is clear without them.

Maybe you and i would not respond the same way on the same situation, and that's OK. Personally, when i had coworkers that would say things that i consider totally indefensible, yes, it made me feel terrible and angry, but at the same time, i was at least glad to now know who i was dealing with. I knew that person couldn't be trusted, and how i should (avoid to) interact with them. This is especially true for me in the cases where such person is a superior, or when nobody else in the organization calls on their shit; those are start-to-look-for-another-job situations for me personally.

And, sincerely, i don't think banning such topics from work environments would work for these kind of cases. Those people will keep being the way they are and acting their shitty way when and where they feel they'll get away with it; you'll just may not know who they are, yet.

Disclaimer: i'm not from the USA, or a "first world" country, so it's very possible for our cultures and work environments where we've been to be quite different.

epidemian··on Meta bans staff from open discussion of Roe vs. Wade
As far i understood, this is about allowing or disallowing employees to discuss the ruling. Nobody is talking about forcing people to take part on the discussion or to pick a side —you always have the option not to participate on these things— so i'm not really getting where your point is coming from, sorry.
epidemian··on TC39 Proposal: Type Annotations
Oh, yes. Silly mistake. I've fixed my comment. Thanks for the catch!
epidemian··on TC39 Proposal: Type Annotations
> Given that the above works in the browser, what exactly is it doing?

Oh, buckle up!

  new DOMPoint<Number>(4,5)
Let's first clean things up a bit: DOMPoint an Number are just identifiers. So, let's replace those with a and b:

  new a<b>(4,5)
Let's also add some spacing around these tokens to distinguish them better:

  new a < b > (4, 5)
Yep, those < and > are comparison operators.

And let's also add some parentheses to make clear the order of operations in these comparisons. The above expression is equivalent to:

  (new a < b) > (4, 5)
Now, let's remember that a is DOMPoint, so `new a` is just instantiating a new DOMPoint object. Yep, the parentheses at the end of the `new Something` calls are optional if no parameters are passed.

  > new DOMPoint
  DOMPoint { x: 0, y: 0, z: 0, w: 1 }
(That's the result of trying that out on a JS console. The initial > on the first line is the REPL prompt, not part of the JS syntax. And the second line is what the REPL prints.)

So the < operator is comparing a DOMPoint object to b, which is Number, which is just a constructor function. IIRC, what JS does is these kind of situations is to convert both operands to strings and then compare those.

  > (new DOMPoint).toString()
  "[object DOMPoint]"

  > Number.toString()
  "function Number() {
      [native code]
  }"
So the first < comparison is going to compare these two strings, and since '[' is less than 'f' (of course... ASCII), the < result will be `true`. The whole expression can then be reduced to:

  true > (4, 5)
The right-hand side of this > operation, `(4, 5)`, is curious. The parentheses are just normal parentheses for grouping expressions, but what's inside of them are two expression joined together by the comma operator[1]! Basically, both expressions, 4 and 5, are evaluated, one after the other, and the result of the whole is the result of the last one:

  > 4, 5
  5
So, we're almost there! The whole thing can now be reduced to:

  true > 5
Since one of the operands is a number, JS tries to convert the other one to a number too. `true` converted to a number yields 1, which is not bigger than 5 — finally, something that makes sense!

So now we know why the whole thing that looks like TypeScript but isn't, is valid JavaScript and evaluates to false :)

  > new DOMPoint<Number>(4,5)
  false 
1: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
epidemian··on Luna Cryptocurrency Collapse: How UST Broke
Hello, i'm from a country which is going through rapid inflation (>50% annually).

It's true that people here need either an alternative currency for purchasing foreign goods (access to USD or other currencies is restricted, and customs fees are insane), or an alternative asset for keeping the value of their savings.

But it's not true that people need Bitcoin. As a currency for purchasing things, Bitcoin is useless. People here are better off evading customs taxes (smuggling), and purchasing via USDs bought on the black market. And for keeping the value of their savings, again, people usually turn to USDs. Some people have speculated with BTC and other cryptocurrencies, yeah, but this is not so much for savings, but more for greedy speculation.

And it's not like the USD is important on itself, it's just an intermediate goal for something else. If the USD becomes too unstable or loses much of its value, people here will turn to other stronger foreign currencies.

So, imagine what this means in the context of what your parent comment said: that Bitcoin's ledger being trivially replaceable.

No, Bitcoin is not needed here. Not at the moment at least. And if it is in the future, so be it, but so can be any other crypto or alternative currency. Who can predict which it will be (if any)? I don't see how betting on future Bitcoin's value for countries like mine makes any sense when there nothing inherent about Bitcoin that would make more valuable than any other alternative currency.

epidemian··on Tether starting to lose its peg too, after Terra did
#whynotboth?

Grifters should be punished for their scams, and it's also acceptable for "investors" on these scams to lose their money i think (that's a hard punishment already; no need for anything extra). Thinking of it the other way around: as a society, it wouldn't be nice to bail out or compensate these "investments", as doing so would encourage people to keep doing throwing their money on things they don't have any clue about and expect to be compensated if it turns out bad.

epidemian··on We lost 54k GitHub stars
This is a similar attitude to blaming users who close an program without saving, telling them it's their fault; the program even asked if they really wanted to close without saving!

But, it's also totally possible for a program to store a backup, and let the user restore that the next time they open the program in desperation for not having saved their document in a moment of distraction.

> but it should be a "lesson learned"

Yes. And as the article notes, the lesson can be that software and UX can be make to accommodate better for possible user mistakes. I personally think it's nice to have Undo actions, or some ways to revert possible mistakes. It makes software way less scary :)

epidemian··on Node-ipc supply chain attack: peacenotwar
> in Linux we either have all or nothing (root vs user)

And it's not like non-root user is nothing. I, as a user, can of course access and edit files on my $HOME directory. But it's insane that a transitive dependency of a dev dependency that has been installed without even my knowledge can have by default the same permissions to access and override any file on my $HOME directory.

epidemian··on Solid.js feels like what I always wanted React to be
i think an immediate mode UI library would make sense if you want to render to a canvas or a similar "backend". maybe for things like games, or some interactive graphic things

but if you want to render to the DOM —and you want to use the DOM if you want to have decent accessibility, or not have to reimplement all the complex user interactions that the browsers take care of— then i think an immediate mode framework might have a great impedance mismatch with the DOM, as the latter is a retained mode GUI model

epidemian··on Ask HN: Is it just me or do 99% of SWE jobs offers seem completely pointless?
Absolutely. I feel there's a lot social pressure involved in accepting to dedicate half our waking time and most of our mental energy to jobs that in no way we'd choose to do if it wasn't for the money.

Not only are many (most?) of SWE jobs quite questionable in their value, but they are also very inefficient in my experience, at least in bigger organizations. So you're not only dealing with the dissatisfaction of doing something that's pretty meh (at best), but also with the boredom of being super inefficient and knowing you could do so much more with your time.

Of course, we're all free to leave and do something else. But it's not easy to go against the current.

epidemian··on Best practices as code using RuboCop
> because it doesn't matter

But, if it doesn't matter, why not let RuboCop make all `if`s consistent with `rubocop --auto-fix` and be done with it, instead of configuring RuboCop to not complain about it?

It seemed that this style choice did, in fact, matter a bit. At least enough to make you change RuboCop's defaults to accommodate to it. And that's fine; that's why those things are configurable :)

Of course, it's also fine to decide not to use RuboCop if you need to reconfigure a lot of it's defaults. Fighting with our own tools doesn't make any sense, but for some reason it's not an uncommon thing to do in this industry.

epidemian··on Sweden clears snow-covered walkways before roads (2018)
And also because it's not the only variable at play. Considering the variable "protection against the elements", one of the groups have cars as protection, while other have mere shoes or bikes. So different variables can be combined to try to balance things out.
← PreviousPage 3 of 14Next →