HNHacker News
TopNewBestAskShowJobs

paldepind2

533 karma · joined February 8, 2013

You can also find me on GitHub: https://github.com/paldepind
submissionscomments
paldepind2··on Apple and Meta go to war over interoperability vs. privacy
That's true, but then, I'm not saying that the Quest is an offline-only device without cloud features. I'm saying that Meta didn't invest $63 billion just to create a "suction pipe for hoovering up that data". They have much bigger ambitions than that.
paldepind2··on Apple and Meta go to war over interoperability vs. privacy
And in what way are they then selling that data (which is what the person I replied to talked about)? Just the fact that the data is being sent to a server doesn't mean much. Tons of modern products relies on literally recording your data and sending it off to a server.
paldepind2··on Apple and Meta go to war over interoperability vs. privacy
> All their other “products” are just suction pipes for hoovering up that data.

I don't think that's true for their VR/MR hardware. That's Meta's attempt to get a product that is _not_ like that, but which instead gets them in a position similar to where Google and Apple are for phones. I.e., where they own the platform and can profit off of that.

paldepind2··on Trump wins presidency for second time
Thanks. I had no idea there where that many parties in the parliament. At the last election I got the impression that it was just Le Pen's party, Macron's party, and a left-wing coalition. But I guess that was simplifying media coverage.
paldepind2··on Trump wins presidency for second time
> You'd need proportional representation or something like the French system or you wind up with very skewed results

Is the French system a good example of a multi-party system? It currently seems to be struggling with handling three parties and it doesn't guarantee proportional representation. The presidential election is a winner-takes-all system and in the election for the Assemblée Nationale each constituency is a winner-takes-all.

paldepind2··on What Color is Your Function? (2015)
Thanks for the reply. I can understand that the purpose here isn't to be as powerful as JavaScript, but rather to be simpler and easier. That being said, is there a way to achieve the below or is that beyond the limits?

    const result = Promise.race(job1(), job2());
paldepind2··on What Color is Your Function? (2015)
I think there's something important and correct in this take.

As another example to your point, whether a function returns a list of foo's or a single foo is a also a color. You have to do completely different things when calling a function that returns a list compared to one that just returns a single value. And that's not just empty pedantry. Haskell let's you treat "list" as an effect (since it is a monad). Array languages like APL, J or R are colorblind with respect to "a list"/"not a list" as the difference is erased (to a large extend). So there really is a whole rainbow of function colors (basically types).

On the other hand, this point of view doesn't really invalidate the original coloring argument at all. The effect encapsulated by "async" really is one that can be annoying and one that can actually be made implicit with a result that many would prefer.

paldepind2··on What Color is Your Function? (2015)
I'm curious how you would you do something like the following? Is that just not supported?

    const promise1 = job1();
    const promise2 = job2();
    const [result1, result2] = Promise.all(promise1, promise2);
paldepind2··on Adding row polymorphism to Damas-Hindley-Milner
> For example if a function needs to take a record containing x as a field with type int, it should also accept a record with y as a field that it does not use.

Not sure if I misunderstand what you mean, but this does not require subtyping. One of the key distinguishing features of row polymorphism is that exactly this can be achieved without subtyping. The extra unused fields (`y` in your example) are represented as a polymorphic type variable _instead_ of using subtyping. See for instance page 7 in these slides: https://www.cs.cmu.edu/~aldrich/courses/819/slides/rows.pdf

paldepind2··on Learning to Learn
That summary is pretty good based on what I remember from the book. I think the second to last point, _effort_, deserves a bit more of an emphasis though. It's actually a common theme through all the effective learning methods that they require more effort and that more effort generally implies more effective learning. As an example, simply rereading a text takes little effort compared to doing flash cards, and the later is more effective.
paldepind2··on Learning to Learn
I agree with the blog post that learning how to learn is an important skill. But the post offers very little beyond a few tips on how to actually achieve that. For people interested in actually learning how to learn I'd recommend the book "Make It Stick: The Science of Successful Learning", which offers a lot of details on this topic based on actual scientific research.
paldepind2··on Google must open Android for third-party stores, rules Epic judge
That's what Steam is. It works on both Linux, Windows, and macOS, and it sells apps for all three platforms. Funding isn't a problem, as Valve takes a cut of sales. The whole thing is only possible though since the supported platforms are not locked down.
paldepind2··on QtCS2024: Compile once, Run everywhere
The description on cosmopolitans webpage states:

> Cosmopolitan Libc makes C a build-anywhere run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine.

WebAssembly would not achieve the same thing as it's in the same category as Java bytecode where you need some interpreter/VM/JIT/compiler to actually run it.

paldepind2··on Playing Sudoku in TypeScript while the type checker highlights mistakes
> As for BigInt, I default to it by now and I've not found my performance noticeably worse. But it irks me that I can get a number that's out of range of an actual int32 or int64, especially when doing databases. Will I get tto that point? Probably not, but it's a potential error waiting to be overlooked that could be so easily solved if JS had int32/int64 data types.

If your numbers can get out of the range of 32 or 64 bits then representing them as int32 or int64 will not solve your problems, it will just give you other problems instead ;)

If you want integers in JS/TS I think using bigint is a great option. The performance cost is completely negligible, the literal syntax is concise, and plenty of other languages (Python, etc.) have gotten away with using arbitrary precision bignums for their integers without any trouble. One could even do `type Int = bigint` to make it clear in code that the "big" part is not why the type is used.

paldepind2··on My Favorite Algorithm: Linear Time Median Finding (2018)
I think you answered your own question. It's the standard average-time analysis of Quicksort and the (unmentioned) assumption is that the numbers are from some uniform distribution.

Why would the distribution have to be symmetric? My intuition is that if you sample n numbers from some distribution (even if it's skewed) and pick a random number among the n numbers, then on average that number would be separate the number into two equal-sized sets. Are you saying that is wrong?

paldepind2··on Optimizing a bignum library for fun
Yes, the talk is called "What We Got Right, What We Got Wrong" from GopherConAU 2023. It's available on YouTube: https://www.youtube.com/watch?v=yE5Tpp2BSGw
paldepind2··on Optimizing a bignum library for fun
That's cool. I didn't realize that those languages used arbitrary-precision integers by default. I know that many language offer a bigint but to me the difference between having bigints and them being the default seems significant. For instance, in JavaScript the `n` notation and them being called `bigint` (and not just `int`) is going to mean that they will get used very rarely.
paldepind2··on Optimizing a bignum library for fun
Speaking of bignum libraries, I recently watched a talk with Rob Pike where he mentioned that one thing he regretted about Go was not making the default integer implementation arbitrary precision. Supposedly the performance overhead for normal numbers is very small, and you avoid the weirdness and complicated semantics of fixed precision integers. I found that to be quite fascinating, especially coming from a "low-level guy" like Rob Pike. Ever since I've been wanting a language with that feature and to understand how bignum implementations work.
paldepind2··on Ask HN: Those who write, which app/tools do you use to draft and write text?
When I write I use Neovim as it's what I'm used to and the formats that I write in are non-WYSIWYG formats like Markdown or LaTeX. My partner is a non-technical person and an author who writes fiction books. She uses Scrivener for that. From what I can see it's a very high quality piece of software for that purpose.
paldepind2··on Apple says it spent three years trying to bring Apple Watch to Android
Just because AOSP exist doesn't mean that Apple would be able to get any Apple Watch specific things merged. And if you get something merged into AOSP today it will be quite a while before a significant portion of the Android devices in the wild actually contains those additions.
paldepind2··on Can Europe's trains compete with low-cost airlines?
The article refers to a new fee for plane tickets that was decided upon last year in Denmark. It's quite a minor fee though that is not expected to affect consumer behavior. Trips in Europe will have a fee below 10 euros and flying from Denmark to New York will have a fee of around 40 euros. Furthermore it will only be fully phased in in 2030.

Source (in Danish): https://www.altinget.dk/artikel/regeringen-lander-aftale-om-...

paldepind2··on Universal domain types
Thanks. Makes sense, I think you're right.
paldepind2··on Universal domain types
Really great and interesting blog post! The different categories of domain types identified all seem useful. It's clear how practical these ideas can be when implementing or thinking about domain-specific types. I'll definitely be keeping these terms in mind for future programming.

> Identifiers have no structure, i.e., we don’t care about their internal representation. The only fundamental requirement is the ability to compare values of those types for equality. This lack of structure suggests an appropriate mathematical model for such types: a set, a collection of distinct objects.

I don't understand what this is trying to say and this "mathematical model" of sets doesn't seem to be applied further on. In math, objects are usually always assumed to have a notion of equality, so I don't see how that alone implies a set. A mathematical abstraction that matches the `Eq` trait would be a setoid.

The `LocusLike` trait is a lot like a metric space with a total order. I wonder if it can be implemented by things that are not basically numbers under the hood (not that it needs to, just curious)?

> Unlike design patterns, the universal domain types are based on mathematical abstractions and can be specified precisely.

I feel like this is over-selling it a bit. I think the ideas are great but, at least as presented here, I don't think they are rigorous enough to deserve the label "mathematical abstractions".

paldepind2··on How to make a better default Firefox UI
Thanks for the link. That certainly shows that Google was sponsoring an aggressive and fairly ugly ad campaign.

> UI was comparable.

They were not at all comparable. Here is an image of what Firefox looked like when Chrome was released [1]. Here is an image of what Chrome looked like at release [2]. Barring some design tweaks Chrome looks roughly like any modern browser whereas Firefox looks ancient by modern standards. It has the app menu, no integration with window decoration, a separate search box, tabs below the address bar, etc. Lots of things that Firefox would copy over the coming years. There's a reason Chrome was named after its Chrome–the UI was a huge selling point.

1: https://user-images.githubusercontent.com/25581533/141687681... 2: https://blogoscoped.com/files/google-chrome-browsing/search-...

paldepind2··on How to make a better default Firefox UI
Do you have any data to back that narrative? I know Mozilla is pushing that explanation, but from how I remember it Chrome gained market share because it was technologically superior to Firefox when it was released. It had a much more modern UI, much faster JS implementation, sandboxed tabs, etc. All features that it took Firefox years to copy. Some would say that Firefox has never caught up.

I find the ads narrative pretty hard to believe. Back in the days, Firefox could compete with IE, which was the default in Windows, by being technically superior. It seems very likely that Firefox's users, who had gone out of their way to install Firefox, would also be very willing to go out of their way to install a new better browser even in the absence of ads.

paldepind2··on The Namingless Programming Language
I know that this is mostly for fun, and it looks cool. But on a serious note, as someone who's dabbled in both J, stack languages (Forth and Factor), as well as tacit programming in Haskell, I'll say that naming is an awesome way of making programs more readable.

Trying hard to avoid names (by, say, eta reduction in Haskell) is a fun excercise that rarely leads to more understandable programs.

paldepind2··on The humble brilliance of Italy's moka coffee pot (2018)
It was the inventor's son, and not the inventor himself who was buried in a large moka pot. It's written in the article.
paldepind2··on Gentoo goes Binary
I wouldn't say systemd is the "one place" where Arch has an opinion. Quite the opposite, Arch is just as opinionated as the average distro. On Void Linux you can choose between musl and glibc, on Arch you're forced to use glibc. On Gentoo you can choose your init system, on Arch you're forced to use systems. On Debian you can have `/bin/sh` be any POSIX shell, on Arch you're forced to have it be Bash. On nixOS you can choose between rolling and normal release, on Arch there's only a rolling release. I can't really think of anything you can customize on Arch that you can't configure on most distros, but perhaps I'm missing something.
paldepind2··on Change of Name: Coq –> The Rocq Prover
Fantastic news! Great to see that they've finally decided on a new and better name which the project most certainly deserves.
paldepind2··on A data corruption bug in OpenZFS?
> Just because Shuttleworth thinks he cant be sued by Oracle for including ZFS in Ubuntu with some hastily reasoned shim doesnt mean Oracle wont nonchalantly send his entire company to the graveyard just for trying.

Canonical has been shipping the kernel with ZFS for more than 7 years and so far they have not been sued by Oracle.

← PreviousPage 2 of 4Next →