Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

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

Submissions

comment 9y ago · link · parent

Given that the sustainability of Intel's profit margins are dependent on it, I am surprised they do not put more effort into making parallel programming easier. For example, GHC Haskell has a very promising parallelism/concurrency story with its many available programming models, including software transactional memory and lightweight threads, yet it is Microsoft funding it and not Intel.

comment 9y ago · link · parent

> Shouldn't the paradigm shift factor into the calculation of the simplicity?

Not at all. You sound like you're looking for excuses not to learn something new!

comment 9y ago · link · parent

> This Java you talk about, is still in the top 1-3 languages by programmers, is it not?

I'm disappointed that you appear to judge technology based on popularity. By this argument, JavaScript trumps Java.

> And supposedly Haskell is easier (according to the parent comment) but at the same time needs people to try harder to get it than Java? It can't be both...

I can assure you, having learned both, that understanding Java and all its idioms/patterns is at least as hard as learning Haskell, especially if one seeks to build concurrent software (where the intricacies of Java's complex memory model cannot be ignored).

Because of the immense amount of investment already made, likely these people give up when they realise they cannot make much use of it in Haskell, at least not at first.

> No, but it was the new novelty on greenfield staff.

You've made an incorrect assumption. The Haskell codebases I have worked on, in both cases, have been large and over a decade old.

Anyway, my original post was about the controversy of subtyping, not Haskell versus Java.

comment 9y ago · link · parent

Who are these people, were they professional programmers? How hard were they trying? Perhaps they just wanted a better Java?

Where I work we do have some business people successfully writing Haskell.

I've worked on very large codebases in many large organisations with C++, Java and Haskell. Haskell certainly wasn't the horror story.

comment 9y ago · link · parent

Ignoring all the abstractions and concepts (made possible by underlying simplicity), Haskell is absolutely a simpler language than C++ or Java with Generics.

EDIT: my point was that subtyping is controversial, I assume the downvotes are for my own personal position.

comment 9y ago · link · parent

Subtyping adds huge amounts of complexity to type systems and type inference. Dart even chose to have an unsound type system because subtyping and parametric polymorphism (generics in Java) were deemed too hard for Google programmers to understand. The Go designers agreed. Haskell and OCaml are a joy to program in, in part because they (mostly) eschew subtyping. So yes, subtyping is controversial.

comment 9y ago · link · parent

Trees can be modelled with sum types, the mathematical dual of product types (records). Java doesn't have sum types and so inheritance has to be used to encode them.

comment 9y ago · link · parent

The guitar suffered one of its biggest losses with the recent passing of Allan Holdsworth.

comment 9y ago · link · parent

It's not easy summarising it in one sentence, but 'auto batching' and 'caching' is what I meant by optimising the data retrieval.

EDIT: the Haxl docs describe it as "a library and EDSL for efficient scheduling of concurrent data accesses with a concise applicative API"

comment 9y ago · link · parent

It isn't the slightest bit similar to those! Haxl is a high-level library for specifying (and optimising) concurrent data retrieval.

comment 9y ago · link · parent

The only significant shortcoming of the Nix language is the lack of static types. Guix doesn't fix this. In fact there isn't an existing language in common use that offers statically-typed extensible records, which IMHO vindicates the bespoke approach.

comment 9y ago · link · parent

Most problems arise from using linked-lists in inappropriate situations. This includes using the default String type. Both the list and string syntax have been overloadable for a while, so using alternatives when necessary shouldn't be an issue. Understand the complexity of the data structure operations you are using and you will get fast code, laziness does not change this (although space usage can be hard to reason about).

The benefits of laziness is difficult to appreciate if you are not used to it. For a great example of the benefits it brings, please read this:

http://augustss.blogspot.co.uk/2011/05/more-points-for-lazy-...

comment 9y ago · link · parent

Linux would provide support for old hardware far in excess of what Apple provides. It's an OS for the many, not a priviledged few; and needs your support.

It's​ also a big security gamble downloading these hacked OSX images from questionable sources.

comment 9y ago · link · parent

> "you can do immutable/functional programming with regular ol' Python"

One cannot easily and safely do functional programming in Python due it's imperative semantics. For example variables are captured as mutable references and even a list comprehension will mutate its bindings.

If you want to do serious functional programming, use Clojure, Haskell and/or OCaml.

Edit: to the downvoters, it's about using the right tool for the job.

comment 9y ago · link · parent

FORTRAN pioneered expressions which were used in addition to statements. This was huge. Modern languages are still expanding on the idea of programming with expressions (especially functional languages).

comment 9y ago · link · parent

Actually INI files are usually in a predictable place. It is registry entries that are spread all over the registry and are not cleaned-up when an application is uninstalled.

comment 9y ago · link · parent

Laziness never prevented high-performance array libraries like Vector being implemented. GHC Haskell also now has a module-level pragma that turns on strict-by-default. Python typically doesn't implement any high-performance primitives anyway, it simply delegates to C/Fortran. Something Haskell could do equally well.

comment 9y ago · link · parent

Don't blame the NHS IT staff. The decision to not pay for XP security updates came from the highest level, the UK Tory government: https://www.benthamsgaze.org/2017/05/13/the-politics-of-the-...

comment 9y ago · link · parent

I want Nix and Nixpkgs. A genuinely innovative and different package manager / distro alternative.

comment 9y ago · link · parent

I'm running i3, polybar, connman and rofi as my Linux desktop environment and its very productive, configurable, lightweight and reliable. My only worry is that one day I'll be forced to move to something akin to what you describe. I blame object-oriented programmers.

comment 9y ago · link · parent

I've been doing this for years using pandoc and beamer.

comment 9y ago · link · parent

Inheritance may be a theoretical superset of ADTs, but it is not as convenient due to the complexity of subtyping and problems with its inference. Scala is the proof of this.

Both extensible records and open recursion can be achieved with ADTs, so why do we need inheritance with all its problems? You still haven't explained this.

I lumped inheritance and OOP together as this is what is typically packaged and available for us to use.

It is true that more principled traversals (e.g. catamorphisms) only match one level deep, but pattern matching is still a convenient and high-level syntax in such cases. Pattern matching would also complement e.g. attribute grammars.

comment 9y ago · link · parent

ADTs and pattern matching are much more convenient and higher-level in practice than using OOP with inheritance. The visitor pattern, essentially just a fold, is the best one can do in an OOP language. With type-class abstractions and data type generic programming, the gap widens further.

In Haskell, my current FP language of choice, I can implement a complex transform such as Lambda lifting in a few 10's of lines of readable idiomatic code.

comment 9y ago · link · parent

More generally, functor sum and products allow composition of recursive data types. The cofree comonad, which Brian describes, is a special case of a functor sum.

comment 9y ago · link · parent

Hate is a strong word. People can be very critical at times, myself included, but this isn't the same thing. People often vent frustrations and justify their own personal choices by criticising. It might often be a tad anti-social but I don't believe it is generally "hate". Personally I am sad to see less competition for the GNOME technology stack.

comment 9y ago · link · parent

Linux doesn't have to be that inconvenient. You can now buy machines preinstalled with Ubuntu LTS. If you want to keep upgrading to the latest and greatest, yes it can be a rough ride.

comment 9y ago · link · parent

Any perceived smugness on my part was a response to baiting from the parent such as "It's kinda sad nobody can compete with Apple".

Open-source can compete on many fronts and offers many other advantages (i.e. freedom), but on a pure ease-of-use assessment, I do not agree with you that Gnome or KDE could sway the parent, if Ubuntu completely failed to do so.

comment 9y ago · link · parent

Ubuntu are trying for ease-of-use and it's a noble goal. But if you are going to judge them only on ease-of-use, then it is difficult for them to compete with the resources of Apple, who are the richest company on the planet.

My point was that there are quality open-source projects out there, after you appeared to assert otherwise. But ease-of-use is not something developers/startups seem to be interested in spending time on.

If you want me to qualify stable, then let's compare Apple's bidirectional iCloud sync to Unison, or Time Machine to ZFS snapshots.

comment 9y ago · link · parent

I suggest you choose your distribution and software more wisely. Yes, this is the big disadvantage of freedom and choice.

comment 9y ago · link · parent

Free software offers a spectrum of quality and innovation; and you've picked the worst of it.

I use a desktop (i3), package manager (nix), editor (Emacs), programming language (GHC Haskell), file system (ZFS), bidirectional sync (unison) and security​ (gnupg) that are collectively far more innovative, powerful and stable than anything Apple have ever produced.

Of course, if you are specifically looking for consumer tech, ease of use and support, then open source probably isn't for you.

1
555657
69