Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

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

Submissions

comment 3y ago · link · parent

I use it every day too. Issues are not rare. It can even bluescreen windows (docker garbage collect on a many core workstation). I would not recommend over Linux if one has a choice (I don't).

comment 3y ago · link · parent

IMHO The bugs are far worse than the telemetry. Many Linux distributions are now more stable than both Windows and MacOS.

comment 3y ago · link · parent

WSL2 is still too buggy to recommend this - e.g. they still haven't fixed the 100% CPU on wake from sleep.

comment 3y ago · link · parent

It's only "fully functional" if it's running Haskell or OCaml. ducks

comment 3y ago · link · parent

> sometimes a PL has to go down an unconventional path to make something new.

Absolutely, just look at Haskell as an example.

> most important part is figuring out who is going to use the PL and what problems they are solving.

Completely agree. Rust and Go have received a lot of criticism over the years, but I think that is often down to them not being as general purpose as many people try to claim. The creators had particular users and use cases in mind.

comment 3y ago · link · parent

Actually generic types can make reasoning about code much easier. This is the opposite of runtime dynamic types. Generic types tell you what the code doesn't (and cannot) do. Any generic type basically cannot be inspected or unpacked, see the paper "Theorems for free" for examples.

comment 3y ago · link · parent

Glad to hear there is more to come! I do think OCaml 5 not only keeps the language relevant but also makes it even more interesting.

comment 3y ago · link · parent

The Seq module has more functions than the List module. There are also more of_seq functions than of_list throughout. 5 years ago the compiler standard library was not a serious proposition, it is becoming more so now.

comment 3y ago · link · parent

> You're also correct that you don't have to use lists, but again most OCaml code does.

If the list is not being used in a critical section, what's the problem? The implication here is that OCaml is slow or inefficient. OCaml is often orders of magnitude faster than other high-level languages (e.g. Python). Arrays in OCaml can result in some very fast code.

comment 3y ago · link · parent

> Where are the types?

OCaml supports type annotations practically anywhere, if you want to add them. Alternatively, you can use an editor that supports querying or showing types for bindings. VSCode and Emacs support this.

> Remember recursion? How about linked lists?

A lot of beginner material uses List to introduce algebraic data types, inductive and equational reasoning - but you don't have to use them. In fact, the standard library encourages Seq instead over List.

It's a shame the author did not get past the basics, as there are many interesting comparisons to be made. For example, OCaml 5 effect handlers are a very interesting alternative to Rust's Async.

comment 3y ago · link · parent

Pixel phones are the bleeding edge though. You are basically beta testing for the other Android vendors.

comment 3y ago · link · parent

The biggest problem with LSP is that it's a lowest common denominator solution. If I try to edit OCaml using an LSP solution, I don't get features like "query type of symbol", presumably because JavaScript doesn't need it.

comment 3y ago · link · parent

Yes this appears to be a silly suggestion, tuples are everywhere, especially as arguments for functions where it does not make sense to name the fields. They are also a structural type and records in Haskell are, unfortunately, nominal types. If Haskell records were structural (one would use newtype to make a nominal record), then tuples could be syntactic sugar for a structural record with field names 1, 2 etc. There is value in unifying them with records, but we still need them.

comment 3y ago · link · parent

> From where I'm sitting software is millions of times better today than it was in the 90s when I first started hearing people saying this.

Define better. I enjoyed computers more in the 80s. There was less bureaucracy. Cubase on the Atari ST never crashed. The modern C++ one does crash, often.

comment 3y ago · link · parent

I would suggest that len works as the article suggests; and "Hello".codepoints gives the behaviour you want.

comment 3y ago · link · parent

> And for this reason, String iteration should be based on codepoints

Why not offer both and be clear about it? Rather than just "length", why not call them code points? The Python docs for "len" which can be called on a unicode string say "Return the length (the number of items) of an object.". It doesn't look like a clear and easy to use API to me.

comment 3y ago · link · parent

> Fibres, goroutines, promises, futures, job queues, etc, are poor substitutes for Actors.

They are not necessarily substitutes, they are lower level primitives that allow more complex models, like Actors, to be implemented.

All execution models have trade offs; and sometimes we might prefer an execution model without deadlock, livelock and starvation. So for a general purpose language, a complex model like Actors is ideally a library and not enforced as the only way of achieving concurrency.

comment 3y ago · link · parent

One example for you: anytime you needed to use the "Visitor pattern" to do a transformation from one representation to another - you don't need it now. Sealed classes and pattern matching will be more succinct and easier to reason about.

comment 3y ago · link · parent

Don't forget the bus that promised 350 million extra per week for the NHS !

comment 3y ago · link · parent

This bug makes WSL a pain to use on laptops. I hope it's fixed!

comment 3y ago · link · parent

I have a work provided X1 Carbon with an Intel that often overheats and throttles. Would an AMD solution be better?

comment 3y ago · link · parent

> C++ doesn't have any "memory problems"

Well, every time I see someone claim this, I roll my eyes.

comment 3y ago · link · parent

> and not the "I think Haskell and Ocaml is great readability" academic crowd.

Actually, Rust could still learn a lot from these languages. In Haskell, one declares the call site as async, rather than the function. OCaml 5 effect handlers would be an especially good fit for Rust and solve the "colouration" problem.

comment 3y ago · link · parent

> Async/await is here to stay and is the right abstraction, git good, and it's not even difficult to use anyway.

It's probably the right abstraction for Haskell, or any other language that works well with functional programming, lambdas and monads. Loom is a better fit for Java. Rust also would have probably been better off with something else. Effect handlers might have been a good choice.

comment 3y ago · link · parent

Similarly you cannot use LSP to query the type of a symbol, something I do all the time in OCaml and other typed languages.

comment 3y ago · link · parent

I'm spoilt by my Kinesis keyboard, I just can't use any laptop keyboard for a significant amount of work.

comment 3y ago · link · parent

My theory was that RedHat was concerned about software patents and/or law suits, so felt they had to significantly change Gnome 2, even if it would make people less productive.

comment 3y ago · link · parent

Maybe. I've seen few Java apps that don't use Spring or something similar. The parent described a simple domain, arguing it is the common case, but nonfunctional requirements like testing typically make the problem more complex. So I dispute that Java is good enough for the common case and that nothing from Haskell would be beneficial. Incidentally, Java's leadership agrees.

comment 3y ago · link · parent

> Gradle is declarative

Gradles own docs say "Well-designed build scripts consist mostly of declarative configuration rather than imperative logic".

When it's up to the programmer to make a script declarative, it's not a declarative language.

1
789
69