Hacker News new | past | comments | ask | show | jobs | submit | snkzxbs's comments login

Says Mr. Vaccine Guy.

Can you please not post unsubstantive comments to HN? We're looking for curious conversation here. Your short posting history has multiple comments like that, and we ban accounts that comment like this repeatedly. Please read the guidelines and make an effort to keep within them.

https://news.ycombinator.com/newsguidelines.html


Requiring more power plants doesn’t mean that power will be more expensive. Power will only be more expensive if we get more demand and less supply. If supply (power plants) increases linearly with demand there won’t be a price difference.

Power doesn't work as simply as that.

Example: as a regulated utility it will often cost more per unit if underused vs optimal generating supply (which has already been passed through into rates)

Additionally, the generating source heavily influences ultimate cost.


I suppose they can just take them down.

They can, and then they’ll have to face their customers directly with it being exactly clear (even to “normies” who don’t follow obscure tech news like this) exactly whose greedy fingers are taking things away from them.

Up till now, situations like Kindle were just weird quirks to most people and most people wouldn’t have been able to tell you why you can’t do this very normal-seeming thing on iOS. If/when Apple takes it away, it’ll be obvious to everyone what’s going on.


There are plenty of no longer supported apps on people's phones.

No one is blaming Apple for it.


I think it'd be a bit different if Kindle, Spotify, Netflix and co. all suddenly stopped working/got worse.

And if Apple yoinks them out, then why should the developer respect the "no disparagement" or "no telling your customers about payment/alternatives"? Which to me was always the ultimate expression of Apple absolutely knowing they are being greedy. Not just "You can't tell your customers you can pay less elsewhere", but "You can't even tell your customers about our involvement in your pricing decisions".

I don’t think information about the NK regime posted on house.gov should be completely believed.

You are missing the fact that a lot of people in Spain, maybe the majority, do what’s called a “jornada partida”, which means that businesses close at around 1-2 pm and then reopen at around 5-6 pm. During that time people generally have lunch and maybe sleep.

Especially during the hotter months, the streets are practically empty.


This seemed to me to vary by region. It was near universal when I visited Andalucía, including in Sevilla. It was uncommon in Madrid, and I don’t remember encountering it at all in Barcelona.

Is that actually still a big thing? I've worked on several projects with people in Spain, and none of them did that. Lunch was never more than an hour, and basically everybody was back from lunch and working by 2.30 at the latest.

Jornada partida doesn't tend to apply to office workers and white collar work in general. It's common to see it in small shops, but it's in steep decline even in those areas.

The difference is that decades ago all movies were about how good and just the US was and now everything Hollywood produces is movies that tell that the US is the devil and other generic progressive slop. Is that really the image the US wants to project to the world?

> They all include blockchain identifiers. I've looked up the blockchain addresses; none of them have ever received payments. This is an ineffective scam.

How do you know they don’t make a new address for each message or maybe for every x messages?


If you think fairness in videogame competitions is frivolous then do not participate in them. Is it frivolous to not want dopers in cycling competitions?

As someone who doesn't participate in those, your comparison seems poor to me. Like my mom asked a while back if I'd get into valorant with her and my sister on weekends sometime, but I'm not going to dual boot or buy another computer just for this game. Why do they require rootkits for casual play? It'd be like bicycle manufacturers subjecting you to drug tests and access to random home inspections to ride around your neighborhood.

If you need to protect competitive play, keep it to actual competitions/make it optional for free play. I'm not giving you unrestricted access to my brokerage account, all of my files, all of my emails/text messages, etc. (which root access on my computer has) so you can prevent cheating in a Sunday night video game.


You don't need a driver to read that kind of data anyway, so your concerns are moot. Once you install any application on your PC, there's not a lot that it can't access.

It's super easy to run games as a user without access to important data. It's possible you could make that completely seamless with bwrap and gamescope for an embedded session, but I haven't looked much into that.

Of course no security tools work if the game is root.


That’s fair. Don’t play then. In the meantime the overwhelming majority of us will enjoy the game with a minimal amount of cheaters, which is what we desire.

> Is it frivolous to not want dopers in cycling competitions?

There are a couple reasons to care about doping in professional sports, that don’t apply here.

First off, these matchmaking games are not real professional competitions. It is more like a pickup game; the stakes are essentially zero. Nobody cares if you dope for your pickup games or your weekend bike rides for friends (other than that that would be a ridiculous thing to do of course).

Second, professional athletes are celebrities. Abusing performance enhancing drugs sets a bad example for the kids watching. Because most people playing matchmaking games aren’t celebrities, they aren’t setting a bad example. And anyway, cheating in videogames has no side effects.

> If you think fairness in videogame competitions is frivolous then do not participate in them.

I mostly don’t. But I can spot wasted engineering effort when I see it, and will continue to call it out.


10 minutes is extremely charitable. Make it more like 2 minutes. (And we give the government over half our salary for this level of attention!)

Sounds like the american system only your employer takes it out of your check before you even see it

Both your statements are just plainly false (and I’m pretty sure you know it)

They are both correct.

Primary care physicians do not spend more than two minutes diagnosing you in my experience. The diagnosis is always shallow and sometimes wrong because of how rushed the process is.

You pay a third of your salary in taxes, then you pay VAT on everything you buy plus many more taxes for other things such as your property. It amounts to more than half the money you earn.


If I'm ever paying a third of my salary in taxes, I'm positively rolling in money. And, that's not how VAT works.

Yes, that’s how VAT works. You, the end consumer, pay it and the government pockets it.

The third sentence of the Wikipedia article begs to differ. https://en.wikipedia.org/w/index.php?title=Value-added_tax&o...

> A value-added tax (VAT or goods and services tax (GST), general consumption tax (GCT)) is a consumption tax that is levied on the value added at each stage of a product's production and distribution. […] VAT is an indirect tax, because the consumer who ultimately bears the burden of the tax is not the entity that pays it.

(Even then, Wikipedia is oversimplifying: "ultimately bears the burden" isn't how economies work.)


What that means is that you don’t pay VAT directly to the government, the business collects it from you and is responsible for giving the money to the government. But yes, the burden is on the end consumer.

Au contraire, the burden is on the end consumer's employer, who pays the money to the consumer, who pays it to the business, who is responsible for giving the money to the government.

… And so on, and so forth. "The burden is on" is not how economies work. Personal property is owned, but money is merely controlled – and that control is subject to caveats, because money only has value as far as it can be exchanged for goods and services. Most forms of taxation (but especially VAT) are abstract accounting tricks to accomplish complex cybernetic effects, with no simple interpretation as a levy or tithe.


That’s the most convoluted way of explaining taxes I have ever seen. By that logic nobody pays any taxes. Of course neither economists nor the government feel that way about taxes (including VAT), which is the reason why foodstuffs have a lower VAT.

Most non-luxury foodstuffs have a lower (often zero) VAT for the same reason that certain organisations pay zero VAT, and income tax is progressive. It has a similar effect as a subsidy, although the psychological interpretation is different (and you can't discount human behaviour when modelling an economy).

> And we give the government over half our salary for this level of attention!

Well that's factually bullshit.


Sorry if this sounds like a stupid question but - is there no "Go to definition" command in an IDE that can help with something like this? I mean, I understand that there is, but it doesn't work well with Ruby. Why?

Other people have mentioned "dynamic typing" as being the reason for this, but that's not actually true. The real reason is two Ruby features: `define_method` and `method_missing`.

If you have a class `Customer` with a field `roles` that is an array of strings, you can write code like this

  class Customer
    ROLES = ["superadmin", "admin", "user"]

    ROLES.each do |role|
      define_method("is_#{role}?") do
        roles.include?(role)
      end
    end
  end
In this case, I am dynamically defining 3 methods `is_superadmin?` `is_admin?` and `is_user?`. This code runs when the class is loaded by the Ruby interpreter. If you were just freshly introduced into this codebase, and you saw code using the `is_superadmin?` method, you would have no way of knowing where it's defined by simply grepping. You'd have to really dig into the code - which could be more complicated by the fact that this might not even be happening in the Customer class. It could happen in a module that the Customer class includes/extends.

The other feature is `method_missing`. Here's the same result achieved by using that instead of define_method:

  class Customer
    ROLES = ["superadmin", "admin", "user"]

    def method_missing(method_name, *args)
      if method_name.to_s =~ /^is_(\w+)\?$/ && ROLES.include?($1)
        roles.include?($1)
      else
        super
      end
    end
  end
Now what's happening is that if you try to call a method that isn't explicitly defined using `def` or the other `define_method` approach, then as a last resort before raising an error, Ruby checks "method_missing" - you can write code there to handle the situation.

These 2 features combined with modules are the reason why "Go to Definition" can be so tricky.

Personally, I avoid both define_method and method_missing in my actual code since they're almost never worth the tech debt. I have been developing in Rails happily for 15+ years and only had one or two occasions where I felt they were justified and the best approach, and that code was heavily sprinkled with comments and documentation.


To add, the above code is a pretty near approximation of the literal code inside the devise codebase, which is a very standard Ruby auth system.

See here:

https://github.com/heartcombo/devise/blob/main/lib/devise/co...

        def self.define_helpers(mapping) #:nodoc:
        mapping = mapping.name

        class_eval <<-METHODS, __FILE__, __LINE__ + 1
          def authenticate_#{mapping}!(opts = {})
That code is *literally* calling class_eval with a multi-line string parameter, where it inlines the helper name (like admin, user, whatever), to grow the class at runtime.

It hurts my soul.


It's been widely understood in the Ruby community for some time now that metaprogramming—like in the example above—should generally be limited to framework or library code, and avoided in regular application code.

Dynamically generated methods can provide amazing DX when used appropriately. A classic example from Rails is belongs_to, which dynamically defines methods based on the arguments provided:

class Post < ApplicationRecord belongs_to :user end

This generates methods like:

post.user - retrieves the associated user

post.user=(user) - sets the associated user

post.user_changed? - returns true if the user foreign key has changed.


Aren’t all these enhancement methods that are added dynamically to every ActiveRecord a major reason why regular AR calls are painfully slow and it’s better to use .pluck() instead? One builds a whole object from pieces, the other vomits put an array?

It's simply not true that "regular AR calls are painfully slow." In the context of a web request, the time spent instantiating Active Record objects is negligible. For example, on my laptop:

Customer.limit(1000).to_a

completes in about 10ms, whereas:

Customer.last(1000).pluck(:id, :name, :tenant_id, :owner_id, :created_at, :updated_at)

runs in around 7ms.

Active Record methods are defined at application boot time as part of the class, they're not rebuilt each time an instance is created. So in a typical web app, there's virtually no performance penalty for working with Active Record objects.

And when you do need raw data without object overhead, .pluck and similar methods are available. It’s just a matter of understanding your use case and choosing the right tool for the job.


Thank you both for the time you spent explaining this.

Mainly because of the dynamically typed nature of the language. Not limited to Ruby/Rails. My colleagues used RubyMine because of this. I'm using Neovim with LSP, it's ok but nowhere near Go for example.

Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: