Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions

Submissions

comment 4y ago · link · parent

> doesn't mean that the application of that understanding to implementation humans will take a liking to is well understood.

I really like how ML implements it, does that make me somehow less human?

comment 4y ago · link · parent

Such a function can still be pure on the outside. This is real (state) encapsulation, not the encapsulation sold to you by OOP vendors.

comment 4y ago · link · parent

> God what's the compilation time of millions of line of Haskell?

It wasn't compiled with GHC, but a proprietary compiler. It could typecheck the entire lot in a few minutes (in parallel) which was usually enough to detect breaking changes.

> There are plenty of industrial languages with algebraic data types and immutability.

A few do, yes, certainly not plenty. But defaults matter and immutability means more than just "const", e.g. persistent collections.

> Not as many as I would like with purity but I doubt it will take 30 years.

Given that big tech is delivering languages that are basically the same as Algol 60, I honestly think it will take at least 30 years.

http://cowlark.com/2009-11-15-go/

comment 4y ago · link · parent

> my guess is that the great languages Academia cook-up scale poorly on code bases which receive tens of updates per day

Why would they? Many are designed meticulously to address the issues industry has. I've worked on a multi-million line Haskell code base in a financial institution and it scaled better than e.g. C++ or Python. In 30 years time, I'm sure the industry will be extolling the virtues of algebraic data types, purity, immutability and referential transparency.

comment 4y ago · link · parent

Yes retrofitting is hard. However, "Generics", also known as parametric polymorphism is well understood and goes back to Milners ML from the 70s.

comment 4y ago · link · parent

The Sony Xperia's look good, but they are expensive.

comment 4y ago · link · parent

Is APFS part of Darwin? If not, then that would support your point.

comment 4y ago · link · parent

Thanks for the tip! I will try a needle and see if it helps.

comment 4y ago · link · parent

I've tried compressed air. I still suspect mechanical wear. The port is after all, extremely small and intricate and of questionable design.

comment 4y ago · link · parent

Not always true. The USB-C port is already loose on my Android phone after only 1 year of use. I cannot use it with a DAC on the go for music, as the slightest wobble will cause a disconnect. I never had this issue with headphone jacks, but even so, wireless has some advantages.

comment 4y ago · link · parent

It is exceptional work, but the system-on-a-chip design is a form of compromise, especially with regard to the availability and pricing of RAM configurations. The current MacBooks ship with the same amount of RAM as my Android phone.

comment 4y ago · link · parent

Yes it could. But lenses offer much more than that. They are sometimes called "functional references", because a lens can be used for both reading and updating; and can be passed around. They can also be composed and combined in arbitrarily complex ways, e.g a lens into a map, option or a list.

comment 4y ago · link · parent

Mobile phones are at least 10% of all e-waste. But yes it's not just Apple, it's an industry wide problem. I'm sure that's what Cooke probably tells himself when he collects his 100 million yearly pay check. But since nobody likes government regulation, I just see the situation getting a whole lot worse.

comment 4y ago · link · parent

> apple isn’t generating that much waste

They shipped 1.65 billion devices in 2021.

For the price we pay, we should be leasing them and Apple should be taking them back and properly recycling them.

comment 4y ago · link · parent

In the 2020 Apple claimed they had 49.88 percent of the UK market for mobile phones.

comment 4y ago · link · parent

The business of "selling you things" as many and often as possible is a danger to the environment and future generations. There is 155 thousand tonnes per year of e-waste generated in the UK alone (source Gaurdian). The current situation is not sustainable. Apple are also masters of vendor lock-in, making it very difficult for people and businesses to leave the ecosystem.

comment 4y ago · link · parent

Knowledge of the Y-combinator helps avoid making your language divergent (sometimes desirable), disallowing explicit recursion is not enough! The typed lambda calculus uses static types to prevent the Y-combinator and give a sound logic for proofs.

comment 4y ago · link · parent

The MacBook Airs have 8GB unless you build to order. My point is that Apples system-on-a-chip architecture, while giving big performance and efficiency gains, comes with a trade-off. That trade off is availability and pricing of RAM configurations.

comment 4y ago · link · parent

I didn't say there is "no difference" between these machines, that's ridiculous. My point is that Apples system-on-a-chip architecture, while giving big performance and efficiency gains, comes with a trade-off. That trade off is availability and pricing of RAM configurations. That 8GB or 16 works for you is great, but it doesn't work for every use case.

comment 4y ago · link · parent

I never complained about the speed or battery life of the machine, so your mocking tone is unjustified. Apple's system-on-a-chip M1 architecture has essentially got a lot of its speed/efficiency gains at the expense of limiting RAM options. Today even web browsers running typical web pages consume gigabytes of RAM. So yes, 8GB of RAM for such expensive machines is disappointing for me personally. My work issued laptop has 32GB of RAM.

comment 4y ago · link · parent

I don't understand the point you are trying to make here. I wish you luck getting a 2022 Apple machine with 8GB of RAM to handle 2 VMs, IntelliJ, a logic project with 100 tracks or 4K video editing. These tasks are all limited by available RAM and the available RAM has not significantly increased since 2012 (my point).

comment 4y ago · link · parent

The killer feature of the M1 chip is actually performance-per-watt, not outright performance/speed. It does not help to oversimplify things.

comment 4y ago · link · parent

> Not to be rude but this is an inaccurate and poor understanding of computers

Not to be rude, but a poor understanding of computers would be to think that speed is all that matters. Software has only been getting more and more complex and bloated over the last 10 years. What good is 16GB of super fast RAM if the machine is swapping out to disk regularly?

comment 4y ago · link · parent

Yes it's made with iPhone/iPad parts instead of PC parts :)

comment 4y ago · link · parent

Almost 10 years ago we purchased a MacBook Pro with 16GB RAM and 512GB SSD for approx 2K UK pounds. It's really surprising and disappointing that a decade later these same specs essentially cost the same!

comment 4y ago · link · parent

My work-issued X1 Carbon with Windows 10 came with busted sleep out of the box. So yes, Windows is no better.

comment 4y ago · link · parent

I don't get why the Apple wins? You'd have plenty of issues on a MacBook running an unsupported OS.

comment 4y ago · link · parent

Why not encode the starting offset into the type domain? Or at least distinguish between normal and unusual. Then the function signature can restrict to 1-offset arrays if that is what it assumes internally.

comment 4y ago · link · parent

If one has a different type or trait for unusual and normal range indices, then the signature for the procedure that assumes indexing from 1 can be written to disallow other starting indices.

comment 4y ago · link · parent

This is not true. For example, the issue regarding custom index ranges causing silent data corruption (6 examples) could be fixed with static types.

Look how many of the other bug reports contain the phrase "does not check for" or refer to specific primitive types.

1
171819
69