Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

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

Submissions

comment 2y ago · link · parent

So Swift does implicit conversions?

comment 2y ago · link · parent

Yes, in fact even a Harrier Jump Jet was designed with pencils and a slide rule!

comment 2y ago · link · parent

You won't get much insight from a study period measured in hours. CT has actually been incredibly beneficial for computer science. Monads were first used to give denotational semantics to imperative languages. CT has also influenced Haskells design, giving many general and consistent abstractions across it's libraries. Looking ahead, CT is teaching us how to build software in total languages.

comment 2y ago · link · parent

There is significance coverage of OOP features, hence my Java-like comment. I would have personally left OOP out for a beginner book, it isn't really fundamental. Another advantage to using Java in the first half, could be to use Java closures to implement Lox closures.

comment 2y ago · link · parent

My apologies, that does indeed seem like a reasonable way of doing it.

comment 2y ago · link · parent

My minor nit pick is that it uses mostly the Java language to implement a Java-like language. What have we gained? Surely something Python-like in C would be more rewarding, one would be gaining a level of abstraction.

comment 2y ago · link · parent

Usually but not always. For example, the removal of an empty effect free infinite loop. This should be an error.

comment 2y ago · link · parent

> Third party vendors are absolutely not "forced into writing unsafe kernel drivers".

> And kernel mode is fundamentally required for security software like this, as far as I understand.

These are conflicting points. They cannot both be true.

comment 2y ago · link · parent

Microsoft may be negligent in selling a product unsuitable for these applications. Windows is unsuitable precisely because it can be brought down by third party updates, such that it cannot recover without manual intervention by technical experts. Third party vendors are forced into writing unsafe kernel drivers because Microsoft does not provide sufficient user mode APIs.

Windows has a dated design and a security model no longer fit for purpose. As for your other example, it could be protecting users from malicious programs that may delete data, simply by having a better security model, like Android and iOS.

comment 2y ago · link · parent

There no problem with this, as long as these cars and other appliances aren't plugged into the internet.

comment 2y ago · link · parent

It's the true Scotsman fallacy. These Crowdstrike programmers are not true C programmers!

comment 2y ago · link · parent

It's interesting to me that lay people are asking the right questions, but many in the industry, such as the parent here, seem to just accept the status quo. If you want to be part of the solution, you have to admit there is a problem.

comment 2y ago · link · parent

Linux and open source also have the potential to be far more modular than Windows is. At the moment we have airport display boards running a full windows stack including anti-virus/spyware/audit etc, just to display a table ... madness

comment 2y ago · link · parent

Hopefully now people might wake up to the idea that these tech monopolies are not leading to safe, secure and reliable systems. They will wonder how a third party component could cause such breakage. I expect many will be calling for regulation.

comment 2y ago · link · parent

I think there should be a second edition of this book then :)

comment 2y ago · link · parent

Yes but my point is that these problems are as hard as we want to make them. For a simple language implemented in C, maybe it's fine to never free any memory until the process quits.

comment 2y ago · link · parent

It doesn't have to be a crazy amount of work, see Lisp-in-Lisp in the original SCIP book or a lambda calculus interpreter in Haskell (fits on a screen).

comment 2y ago · link · parent

When Java gets pattern matching, it will become a more reasonable choice to write an interpreter in.

comment 2y ago · link · parent

A type checker is only going to add limited value if you don't put the effort in yourself. If everything string-like is just a string, and if data is not parsed into types that maintain invariants, then little is being constrained and there is little to "check". It becomes increasingly difficult the more sophisticated the type system is, but in some statically typed languages like Coq, clever programmers can literally prove the correctness of their program using the type system. Whereas a unit test can only prove the presence of bugs, not their absence.

comment 2y ago · link · parent

A better way to deal with this versus dependency injection frameworks is to allow the generator to be configurable and to be honest about where the seed is coming from. The random seed is an implicit input read from the runtime environment as a side effect. Future languages should treat side effects as first class and allow, for example, custom handlers to be installed to intecept or modify their behaviour.

comment 2y ago · link · parent

Absolutely it is about trade offs, sometimes bugs are just an inconvenience and time-to-market is more important. But bugs can result in lost business and even lost lives, for example UK Post Office Horizon. Horizon was built (bungled) on the cheap, but the overall cost of that saving must be dwarfed by the financial cost of the resultant scandal.

comment 2y ago · link · parent

You missed out GitHub !

comment 2y ago · link · parent

> the user can’t know that something over there made it so something over here can’t type check

To the Swift developers: just add source positions to your type AST, in addition to the term AST, then you'll know where a type has come from. It lets you give error messages like: expected type A (line X) but got type B (line Y).

Hindley-Milner type checkers perform well in Haskell and OCaml. I don't think this type system can be blamed entirely for Swifts problems.

comment 2y ago · link · parent

I don't think the "failures" are necessarily always technical, e.g. upstart versus systemd or GNOME versus Unity. To me it looks like Red Hat has possibly too much control and influence.

comment 2y ago · link · parent

The PowerToys UI is a dot net application I believe.

comment 2y ago · link · parent

It looks a bit biased to be honest, nothing about Go being prone to race conditions due to the choices it has made, for example.

comment 2y ago · link · parent

I had always assumed that the UK killed it's tech industry by selling it all off for short term gain. That needs regulation to prevent.

comment 2y ago · link · parent

I switched to Capture One. Not as easy to use as Lightroom, but the RAW processing is actually superior. It's a one time purchase. The professionals can choose to upgrade every year, the casual users can upgrade less frequently.

comment 2y ago · link · parent

By what measure? Haskell can be a huge productivity multiplier. The standard library is built upon many powerful, unifying and consistent mathematical abstractions. For example, there is almost no boilerplate to write for any traversal, mapping, error handling etc. The average Pythonista simply has no idea what they are missing. But Haskell doesn't have anywhere near the third party ecosystem of Python, so is less productive by some measures.
12345
69