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

Agreed. Objects for everything results in code that is riddled with hidden mutable state and side-effects (state is not encapsulated). It's impossible to reason globally about such systems, even before threads are added. Objects can be used as a reasonable module system, which is why many still advocate them, although IMHO better module systems do exist (e.g. in OCaml).

comment 9y ago · link · parent

There's not enough detail here to really comment. I can say that Haskell has the best software transactional memory implementation out there, thanks to purity and controlled side-effects. Haskell's explicit handling of state also helps provenance and keeping state managed / in the database.

comment 9y ago · link · parent

Yes I think Snap empowers the app vendor at the expense of the sysadmin. I think Nix is a much better approach for servers.

comment 9y ago · link · parent

Didn't Snap appear first? Why is FlatPak not an example of NIH?

comment 9y ago · link · parent

What exactly do you mean by "OO SOA structure at the high level"? Do you mean essentially a function from a document to a result? If so, then what exactly is object-oriented about it? I'm no expert on industry lingo, but "Service Oriented Architecture" sounds to me much more functional than object-oriented.

That you feel the need for DI frameworks is a great shame and more F#'s failing than functional programming per se. If F# had inherited the module system from OCaml, then there would be much less need to use objects. In OCaml, DI comes for free with module functors, no framework necessary. As it stands, I agree that you are somewhat forced to use objects as a module system, as F# has no other. That is what MS should fix.

comment 9y ago · link · parent

C# is also multi-paradigm, or certainly well on its way, as it gets more and more functional features. F# needs to be functional-first.

comment 9y ago · link · parent

If you want "OO aspects", you can use C#. F# should focus on being a functional language. Features like currying exist for a reason.

comment 9y ago · link · parent

Striking a balance? It's the Innovator's Dilemma!

comment 9y ago · link · parent

My wife's Mac has had numerous issues with updates and upgrades and third party software. In comparison, my NixOS machines update flawlessly, as expected from a stateless OS. But that's also just an anecdote :)

comment 9y ago · link · parent

> you don't have to be afraid an OS update will make your laptop unbootable.

That's not true. Apple's yearly OS upgrades can and do brick machines. At least with Ubuntu, I'd stand a good chance of diagnosing and fixing the issue.

Also, we are just talking about Ubuntu here and not all Linux distributions. For example, NixOS is a Linux with an entirely different method of managing upgrades.

comment 9y ago · link · parent

You cannot make sweeping statements like that. Yes the Mac stuff can be convenient, but in no way is it better than all free alternatives.

For example, despite the shallow learning curve, in our house, time machine was both unreliable and patronising (the time travel UI). For me, I'm using ZFS snapshots for my backup, technically it's more than a notch better than time machine.

Another example would be Notes, Apple have demonstrated over many years that they cannot write reliable bidirectional sync. Unison just works.

comment 9y ago · link · parent

I like to think of paper as immutable storage. All my mistakes remind me how safe my jottings are versus the average note taking software effort.

I do use org-mode and git at work, but even then will often capture to paper.

comment 9y ago · link · parent

Yes it is a bit unnecessary in the simple list example above, but Endo becomes useful when using arbitrary nested Foldable structures and when composing monoids, e.g a pair of monoids is also a monoid. In other words, it becomes useful at scale.

To quote from Paul's post: "The trouble is that very often, the sorts of examples that are easy to discuss aren’t of sufficient scale to reveal any major differences between A and B."

comment 9y ago · link · parent

Dart is just another junk food programming language in the same vein as Java (with some of the same people involved). If you really want to learn what a "strong mode" is, learn OCaml. Good job Bloomberg for Bucklescript.

comment 9y ago · link · parent

I found a page explaining the differences between bucklescript and js_of_ocaml : https://github.com/bloomberg/bucklescript/wiki/Differences-f...

comment 9y ago · link · parent

Scala does not have true sum types though, it uses subtyping to encode them. When I tried it, I found that pattern matching was often unsafe. I am glad that Scala has raised awareness of FP, but its implementation of FP is heavily compromised by its focus on OO.

comment 9y ago · link · parent

The most recent OO-branded attempt at this was Scala. I certainly found it rather tedious and error prone compared to Haskell or OCaml.

comment 9y ago · link · parent

If you are predominately working with immutable data, you are essentially doing functional programming. In which case you'd be much better off in a functional-first language. Using Scala entirely for FP has not worked out well in practice. Even the authors of "Functional programming in Scala" eventually abandoned it for Haskell. Scala has certainly raised awareness of FP, which is a big positive in its favour and the support it does have for FP is an improvement over Java.

comment 9y ago · link · parent

If OO is a better fit for parallel programming, why are functional programming models such as Hadoop or Spark, so much easier than message passing alternatives such as MPI? My answer is that they bring abstraction and composition, which classical OO does not easily allow, thanks to mutable state.

comment 9y ago · link · parent

Microsoft intend to fix this with their new Precision Trackpad standard.

comment 9y ago · link · parent

Would Windows 10 not give you most of want you want?

comment 9y ago · link · parent

PC laptops have often had better keyboards than Macs (e.g. Thinkpads), so I and many others would disagree with you there.

The trackpad situation is a legitimate gripe, but this is hopefully improving with Microsofts Precision Trackpad standard.

The big advantage of stepping outside the Apple garden into the wider world is choice. You have choices like matte screens, 17" screens, up to 64GB RAM, hotswap batteries, upgradable components, ARM chips, Xeon chips etc etc

Even the current Macbook Pros (high spec Airs) have had equivalents available in the PC world for a while, e.g the X1 Carbon, which is being upgraded to KabyLake soon, while Apple have only just released their Skylake machines.

comment 9y ago · link · parent

I tried Libreoffice writer briefly recently. I imported some large pictures onto a single page and it became unusably slow. It seemed to be redoing an expensive computation (likely the pictures) with every character I typed. So yes, clearly not as optimised as Word. I had to reluctantly ask to borrow my wife's computer with MS Office for this particular task.

comment 9y ago · link · parent

Exciting stuff! The JVM really needs a modern statically typed functional language.

comment 9y ago · link · parent

I don't think it is necessarily a bad thing if they remain Haskell 2010 compliant and use pragmas for their own extensions. I certainly would like to see features like extensible records and variants; and this is unlikely to happen anytime soon in GHC, as the focus seems to be dependent types.

comment 9y ago · link · parent

These machines are unfortunately already obsolete (relative to their premium price) now that Intel Kaby Lake machines are starting to appear. Kaby Lake offers significant battery life improvements over Skylake.

comment 9y ago · link · parent

The headphone jack is beautifully simple, DRM free, sounds good enough even for audiophiles and has been around for over 100 years. Buying a decent pair of headphones with a jack is a worthwhile investment. Buying "lightning" anything, much less so.

comment 9y ago · link · parent

It's being advertised as being suitable for movies and games. Personally I can only successfully stream movies when I'm not on the go with a laptop.

comment 9y ago · link · parent

Haskell, which is now a very mature language, over 26 years old.

comment 9y ago · link · parent

With some generic programming, even complex data can be radix sorted in linear time. Google the Discriminator papers of Fritz Henglein.
1
585960
69