Recent submissions

Comment · 2 months ago
Linux already has its own binary executable format, ELF (that you could just statically link, if you wanted to bundle everything). Also the usual way to indicate that some file is executable on linux systems is just through an execute bit, not through an extension.

But the discussion here is more about how to package properly an application (for updates, app centralized management etc,) than how to deliver an executable on linux.

Comment · 7 months ago
Transpilation is here a necessary step to test the application because e.g. his browser won't be able to parse raw TypeScript code.

Typechecking is not: the browser doesn't care about it, it's mainly to help the developer verify its code.

So to speed-up the build during development (to have faster iterations) the idea is often to make the building process only about the build by removing "unnecessary" steps like type-checking from it, while having a separate linting / typechecking etc. process, which could even run in parallel - but not be necessary to be able to test the application.

This is often done by using tools like a bundler (e.g. esbuild) or a transpiler (babel, swc) to erase the types without checking them in your bundling process.

Comment · 1 year ago
Comment · 1 year ago
Yes basically, it's not the same dev yet sway is heavily inspired by i3 and works with i3 config files. As you wrote i3 is x11-only and sway is wayland.
Comment · 1 year ago
> but worse in every conceivable way

I always had an issue with that sentence (and I heard it a lot). Why would experienced software developers always come with a solution worse in "every conceivable way" when implementing logic answering a problem they're having, which would have the huge advantage of being tailored for their own needs?

I'm more of a library developer than an application one but I've seen that many JS webdevs have an aversion toward trying things themselves - instead always going for the most huge/"starred" dependency when they can. I'm not sure the impact of this philosophy is always better for a project's health than the total opposite where you would just re-invent your own wheel.

I do have seen multiple attempts at doing a specific homemade architecture that worked out well for some applications with very specific needs even 10 years later (For example I'm thinking about a 500k+ LOC JS webapp - not intended to be accessed on a desktop browser, but that's not the only successful long-lived JS project I know with their own archi). And I guess a lot of webapps do have their own specific needs where the "default framework" solution leads to some inefficiencies or hard-to-maintain / understand mess.

Comment · 1 year ago
Presumably this for now has only been seen for a specific tv client API that yt-dlp use and not all youtube videos (well, https://github.com/yuliskov/SmartTube/issues/4444 also saw it for "members-only" videos but again not all videos).

---

Also I suppose you make a reference to software DRM like Widevine L3 vs L1 (same thing for PlayReady SL2000 vs SL3000) which is not exactly Firefox vs Chrome. Firefox has even be known to work on the availability of hardware DRM on windows right now, (through the Media Foundation API I think?).

In the worst scenarios seen right now for example seen on services like Netflix, would be to only have lower qualities (e.g. 480p max) on browsers with only Software DRM available (like firefox) and encrypt better qualities with keys only available when there is hardware DRM available. Though I'm not sure YouTube would go that far for now? Netflix, Amazon and such have contracts with right-holders stating those protections as a requirement, but YouTube does not have (IMO thankfully) the same kind of relation and contract with "Youtubers".

I think that what YouTube wants to do for now is to greatly lower the amount of people not watching contents through its website/app (and thus not seeing ads). I would even think that this is mostly not about yt-dlp users, but more the huge amount of people relying on some Youtube-to-mp3 website or similar accessible tools. Here enforcing software DRM would be enough to at least temporarily break all those tools and force those users to go back on the platform I guess, and maybe you can also sue some tools' developers once there is an "encryption breaking"-mechanism embedded in it (IANAL)?

Comment · 1 year ago
Not him but because your answer surprised me I chose to reply: at 34 it is also something I always wondered.

Becoming obese always seemed a little extreme to me and I fail to imagine how someone could reach that state without the accordingly extreme food-related habits - though maybe I'm just lucky to have the "right" metabolism and thus cannot relate.

Though even if obesity was always linked to eating disorders, I understand that "just stop" is not an appropriate response to that issue.

Comment · 1 year ago
A particularly ugly but useful feature of "const enum" (sadly, the "const" flavor of enums are not referred to in this documentation), is that it's the only way to declare a compile-time constant in TypeScript.

e.g. for "development" vs "production" environments, you could write a declaration file for each of those envs as such:

  // production.d.ts

  declare const enum ENVIRONMENT {
    PROD = 0,
    DEV = 1,
    CURRENT_ENV = PROD,
  }
And then write in your code something like:

  // some_file.ts
  if (ENVIRONMENT.CURRENT_ENV === ENVIRONMENT.DEV) {
    // do something for dev builds
  }
It will be replaced by TypeScript at compile-time and most minifiers will then be able to remove the corresponding now-dead code when not in the right env.

This is however mainly useful when you're a library developer, as you may not have any "bundler" dependency or any such complex tool able to do that task.

Here, the alternative of bringing a complex dependency just to be able to replace some constants is not worth its cost (in terms of maintenance, security, simplicity etc.), so even if `const enum`s may seem poorly-adapted, they are actually a good enough solution which just works.

Comment · 2 years ago
I read the README.md of the project but I'm still not sure: What's the expected usage of this? How does the outputed WASM code then interacts with a runtime (and with which, is it intended to be a tool compatible with browsers and other WASM runtimes or is it only compatible with a runtime linked to the project)?

Somewhat linked questions: How does it react if it encounters e.g. web APIs inside the JavaScript code or other global identifiers only defined in some environment (e.g. a recent browser, Node.js etc.)? Or if it's not intended for those environments, how are you supposed to do I/O when using this?

Comment · 2 years ago
> actively omit subtitle languages that aren't "relevant" to your geolocation. I cannot respect a service like that.

This may also be due to legal issues / restrictions in the contract they had with that content's right holders or subtitles providers.

Comment · 2 years ago
I did not want to annoy anybody, I was just answering the "live very comfortably" part.

Yes I lived in Paris 15th arrondissement a little more than two years ago (for like 4 years?) with a less than 60k euros salary and felt personally that I lived comfortably.

> Yes by most normal countries

I know that 30 square meters was comfortable to me at the time and had no shame about it. I still find that I live in a "normal country" and don't really care that much what someone from another "normal country" would use as a diminishing adjective to qualify that apartment's superficy.

> is that a life frankly ?

First, it is, and I felt this part was kind of unnecessary. Founding a family is not the end goal of everyone, nor living in a mansion.

> So you take a shitty salary because you’re alone or do you take money to progress in your personal life and build something like a family ?

I did found someone (to also live with) in that time period, which roughly make the same salary than I, we both lived comfortably on our own before and our combined remunerations was thus much bigger when living together which means we could afford something bigger. We decided to move from Paris though, but I also understand people wanting to stay there.

And 60k is far from shitty, even in Paris. We even considered ourselves privileged as we had a usually better salary than our friends and a job we liked.

> but public transportation is a total disaster [...]

I am not that critical of Paris' public transportation, I thought it was good enough for going to work everyday or where I wanted to go most of the time.

> rent.it is around 1500 minimum

I was paying something like between 900 and 1k for 30-ish (don't remember) square meters. It's for the 13, 14, 15, 18, 19 and 20 arrondissements only I would guess, and [close] suburbs.

> waiting lines are in average 15 to 20 candidates per rentals

Yes that was an issue to me also. I had to send a lot of proposal everywhere to have a chance.

> Telco is 50 euros min without Netflix and football and Disney or Spotify

I just checked. I have different operators for phone and internet, and I'm at 20 for internet and 15 for mobile phone subscription. I'm also very bad at managing money so I'm sure I could spend less, if it mattered to me. No idea how much I spend for electricity, gas and so on, because I've never had any issue with money.

> people earning less than 4k net a month in the Paris region do look at the prices today

I did not and my girlfriend didn't two years ago look at prices when doing most day-to-day things, but maybe the situation evolved since then. Though to be honest we never lived an expensive life: we never had any TV for example nor Netflix and such subscriptions, and don't have expensive hobbies nor especially like expensive things.

Comment · 2 years ago
Not him, but I was in the same situation (I'm still in France with roughly the same salary but not in Paris anymore).

> let me guess you live in a 30 square meter hole

Living in a 30 square meter apartment was pretty normal, yes. Don't feel obliged to call it "hole", it was pretty OK when you're alone.

My rent was never more than a third of what I earned net. So generally less than 1K.

> any decent car would cost you 300 € a month

In Paris you don't need a car and most people I know don't have one. I still don't have a driver's license and most people I know from my generation don't have one either. So that's not an expense.

> telco bundle 100 €

For the whole Internet + mobile, you shouldn't pay more than 30 euros per month in France (which I guess is still pretty high? I'll have to look).

> that makes already 3000 euros a month of spending

I was (and still am I would guess, though it's a long time since I've calculated this), spending less than 2000 euros per month. And I'm not limiting myself: I often go out in a restaurant, go to the cinema every week, don't look at prices when I'm doing grocerie etc.

Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton