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

> it's just an implementation detail than doesn't make the language more or less functional.

It affects the language very much, awkward currying and tupling, needing to wrap methods in objects. Subtyping also has many complex consequences. There is limited type inference and tail call optimisation versus functional-first languages.

> Scala isn't simply an evolution of Java. It offers a type system that goes beyond what you can do in F# or OCaml.

It offers higher-kinded types, but F# has units of measure, OCaml has polymorphic variants. Each has advanced features not offered by the other.

> The fact it's multi-paradigm and plays nice with Java's OO model doesn't make it less functional than these two.

It was not designed as a functional programming language first and foremost, that is my point.

comment 4y ago · link · parent

I don't even view Scala as a functional language, as functions (methods) are not first class. Lambdas are encoded as objects with a single method. It's much more expressive than Java and so better at expressing many functional programming ideas, but it's not a functional-first language, it's an evolution of Java.

The underlying issue is that it's a complex language with many experimental and interacting features, which can and do cause a lot of distraction. This is not the fault of functional programming. Have a go at OCaml or F#, which are nice practical sweet spots.

comment 4y ago · link · parent

> That attitude among Haskell devs is one of the problems. The conviction that it is a fundamentally better way of programming and that anybody who chooses anything else for anything is a worse programmer certainly hampers its success.

This is not true in my experience; and I have been professionally writing Haskell for over a decade. It is well understood that Haskell is excellent for reasoning about program correctness, but rather poor for reasoning about program performance/efficiency, especially memory usage. What Haskell programmers might get frustrated about is less suitable tools used for domains for which Haskell would be an excellent fit (smart contracts?). There are many domains for which correctness and productivity are important, but performance/efficiency less so. Haskell is still much more performant than many dynamic languages are.

OCaml is a nice middle ground, lots of functional goodness and type safety with a much more predictable runtime.

comment 4y ago · link · parent

Maybe they'll be offered a better deal.

comment 4y ago · link · parent

> You were literally wrong given the context of the conversation. It is immaterial which features Solaris got 13 years down the road in its competition with Linux.

No, you were wrong with the statement "This also glosses over that commercial Unices weren't superior technology.". The context was Linux killing off the (technically superior) competition, a process that took decades.

There are many other technologies that Solaris had years before Linux, e.g. decent SMP, Zones (containers), ZMF management and many other features that Linux still does not have. QNX had realtime features and a microkernel.

> I figure in your mind it has to do something with micro-architecture rather than vendors not giving a flying fart, so I'll bite.

The situation is more complex than "vendors not giving a flying fart". Linux does not have a stable module ABI, in fact, it doesn't even guarantee a stable API. This is all part of "kernel architecture" and highly relevant. Regarding microkernels, security concerns will eventually force this design on future operating systems (e.g. Google's Fuschia)

comment 4y ago · link · parent

You are trying to move the goal posts. Both Solaris and QNX are still examples of "superior technology" to Linux, despite both being dead for a long time. Kernel architecture is also highly relevant, ever wonder why Android phones only get a few years of updates?

comment 4y ago · link · parent

Solaris had technology like ZFS and dtrace (granted these now integrate with Linux). QNX had a micro-kernel and support for real time. Solaris would have made a better server OS and QNX a better mobile phone OS.

However Linux is free, and we have all benefited enormously from that, myself included and the tech giants.

comment 4y ago · link · parent

Even accepting it as a dynamic language that is predominantly imperative, it still has many surprising characteristics. The scoping, binding/assignment are conflated, no built-in records, limited lambdas, pervasive mutability and null/None, etc.

I accept that it's a huge improvement over many mainstream languages (certainly bash!), but I find e.g. OCaml/F#/ML code far easier to reason about. These languages are also hybrid imperative and so there is no need to use monads, they can be used just like Python.

comment 4y ago · link · parent

Commercial Unix like Solaris and QNX were far better engineered than Linux ever was. Even Minix, which was used to bootstrap Linux, had a micro kernel design.

comment 4y ago · link · parent

> He'd often go on intense (albeit well-informed) tangential rants, particularly about Python.

As an academic, it must be soul destroying to see the world dominated by ad-hoc efforts like Python. Just like Linux, it was one persons hobby project that repeated old mistakes and now threatens the existence of argubly better technology.

comment 4y ago · link · parent

Batteries last 3-4 years and can already be very hard to get hold off after that time. I had a tough time sourcing a genuine replacement battery for my 4 year old X1 Carbon. It's a shame as otherwise the user replaceable battery would be a huge advantage over e.g. a MacBook.

comment 4y ago · link · parent

Isn't part of the problem that no one can agree on the best subset? Compilers could provide pragmas and switches to enable projects to define their own language subset.

comment 4y ago · link · parent

Is Google going to have another stab at VR? I tried my 'cardboard' recently and none of the Google apps have been updated and some don't work any more (e.g expeditions). I don't understand why they put so much effort in originally and then just give up.

comment 4y ago · link · parent

Completely agree. Duracell batteries have been leaking consistently for me, I've stopped buying them and actively warn others. They have destroyed various remotes, torches and an expensive camera flash after only a few years.

comment 4y ago · link · parent

Perhaps Haskell could have defined tuples inductively. There are HList libraries that essentially offer this functionality though.

comment 4y ago · link · parent

> could help democratize how they get implemented

Was there any democratic process when "Solidity" was designed? Unfortunately, it does not appear to me that the right experts have been involved and that there was peer review. It looks like it was thrown over a wall, much like JavaScript was.

comment 4y ago · link · parent

Bi-directional sync is notoriously difficult to get right. See for example the paper "Mysteries of Dropbox" or the contents of any iCloud users address book. I use Unison which I trust (based on their peer-reviewed publications) and has a good UI to resolve conflicts. It isn't clear to me how Syncthing deals with conflicts or problems.

comment 4y ago · link · parent

Note that functions in other languages, like Haskell and Scala, do allow some control over evaluation order. One can annotate function parameters to achieve call-by-value or call-by-need as required.

Macros can analyse/manipulate the abstract syntax tree of their inputs, so I think of them as extending the compiler.

comment 4y ago · link · parent

Note that this cannot be written as a function only because Clojure uses strict (call-by-value) evaluation everywhere and has no way to change this (other than Macros). In theory languages could provide annotations to allow a user to specify whether parameters are call-by-value or call-by-need. Haskell and Scala both provide this.

But I don't think this is a bad example at all, I tend to think of macros as "extending the language/compiler", since they have access to the abstract syntax tree of their inputs, which is what is being done here.

comment 4y ago · link · parent

The Intel chipsets were limited for a long time in that they could only support a maximum of 16GB of LPDDR ram. Yet another reason Apple must have been frustrated with Intel.

comment 4y ago · link · parent

F# would fit the bill better I think compared to C#. F# has proper algebraic types like Rust, full pattern matching, immutability by default, less OOP baggage.

comment 4y ago · link · parent

Haskell actually goes to a lot of trouble to type check before desugaring. So lots of sugar, e.g list comprehensions, do get nice type error messages.

comment 4y ago · link · parent

It may not remain untracked, hopefully types for algebraic effects will land in the future.

comment 4y ago · link · parent

This is where the Kinesis contoured wells help. For example, typing T with qwerty on a Kinesis is no longer a "stretch".

comment 4y ago · link · parent

> This is completely wrong; I think you must be thinking of something other than Dvorak.

Yes, apologies, my example was wrong and I was probably confusing Dvorak with another layout. I would like to see some better statistics on hand alternation though, because qwerty is quite good at this (as Wikipedia states) and it would be interesting to see where it actually sits relative to the other layouts.

comment 4y ago · link · parent

I don't think there is universal agreement for Dvorak being more ergonomic than Qwerty. Qwerty was designed to make key presses with alternative hands statistically likely (to benefit mechanical type writers). But this is also a good ergonomic property. For example, common English works like "the" can be typed with one hand with Dvorak, but this is not necessarily ergonomic. It causes one to contort the hand more than if "the" is typed with alternative hands.

comment 4y ago · link · parent

As a heavy user of macros, looks like I'd want to avoid the ZMK version then. It's a shame, as Bluetooth could be useful.

comment 4y ago · link · parent

I remember being a new Linux user in the mid-90s at university. I was told by more than one computer science nerd that FreeBSD was more mature and reliable, which was probably true back then. But Linux just seemed to be where the excitement was (it even had coloured ls output!).

comment 4y ago · link · parent

> But are you saying it's common with production projects that use a compiler from 2003 or earlier? What's the use case?

Modern C++ compilers are not necessarily available on all platforms. For example, Solaris, AIX or old RedHat versions. Go doesn't have this problem yet, but it will.

1
202122
69