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

But Category Theory is different to all the other examples you gave, as it describes program composition. i.e. building larger programs from smaller ones. Computer scientists have been searching for the "mathematics of program construction" for a long time, desperately trying to make the process more formal. Category Theory is what many seem to have arrived at. There are even books about it, e.g. "The Algebra of Programming".

Most computer science graduates are well schooled in algorithms, complexity, linear algebra etc. However, the vast majority of their time commercially will not be spent implementing some core algorithm, but instead gluing systems together and consuming/writing APIs. Any mathematics that helps them better accomplish this would be good to add to their toolbox.

comment 4y ago · link · parent

Yes, over-engineering is common in many languages, especially Java, where Spring and OOP patterns would be deployed everywhere. It is not a unique problem to Scala.

comment 4y ago · link · parent

I'd like to understand how such a pinnacle of human design and engineering came to depend on a technology that is, putting it politely, certainly not.

comment 5y ago · link · parent

Exactly, that is why Gnome is not as intuitive as it could be, it does not work at all like Windows or Mac OS. Sway works very differently to Windows and MacOS, but at least brings potential productivity advantages in doing so.

comment 5y ago · link · parent

People use their apple account to register with utilities and banks. If Apple decide to randomly shutdown your email because "artificial intelligence" (statistics), then this causes much more major problems than simply wiping your photographic life away.

comment 5y ago · link · parent

> Under socialism you do not get do pick jobs at will. And you better show everyone how happy you are at the job assigned to you.

Socialism might mean you have more choice of work, because there is greater social mobility and access to education. Perhaps also you might work for a "cooperative" firm, where every employee is a part owner and gets to vote on issues and a take on the profits.

comment 5y ago · link · parent

I could equally well claim that capitalism is evil and destroying lives (and the planet). But such a view would be just as one-sided as yours. The Nordic model, especially Finland, gives a good example of how socialist ideas can work. Socialism is about collective ownership, not authoritarian regimes.

comment 5y ago · link · parent

A very good article. That's exactly how I always thought about objects, essentially just first-class modules.

comment 5y ago · link · parent

iTunes won't even play FLAC files, so it's rather inconvenient for people with existing libraries. Yes I know I could convert it all to some proprietary Apple format, but it's easier to just not buy an iPhone.

comment 5y ago · link · parent

This statement:

>> do everything both low-level and high-level together

> This is very far from true. Like, not even the tiniest bit true

Does not really align with:

> It is easy to program in C++ or Rust and pay no attention at all to where allocations happen

(This is what high-level languages offer)

> It is totally allowed to drop to a C level of specification.

(This is what I mean by low-level)

I would also argue that in Rust the memory management unfortunately does affect the ergonomics of lambda and async, for example the need to explicitly pin memory.

I really don't mean to criticize all the recent effort that has gone into Rust, it is certainly a huge improvement over C++. But it's far from perfect and I'm arguing that is probably not the fault of any of the individual choices, but rather the language goals. I would like to see a future where we use more specialised languages; rather than the many languages that can both peek/poke bytes and implement the full lambda calculus. More specialised, simpler, languages are much more amenable to static analysis and formal methods.

comment 5y ago · link · parent

I want both, so I get to decide the most appropriate for my problem.

comment 5y ago · link · parent

I hope it was clear from my earlier post that I am arguing "No" for your questions above, especially regarding C++ and Rust. This doesn't necessarily mean I don't think great software cannot be built with these languages, but rather I do not see them as the future.

comment 5y ago · link · parent

What do you mean "an effect system is redundant to code"? An effect system may or not come with additional static typing. I would argue that static effect types are certainly not redundant, having programmed Haskell professionally for many years. But that's just the usual static types debate.

Unrelated to typing, algebraic effect handlers probably have the most ergonomic implementation of async I have ever seen (looking at the OCaml multicore previews).

comment 5y ago · link · parent

> This list, together with already mainstream features, turns a programmer’s learning curve into an uncompromising cliff.

This is because many insist on having one giant programming language to do everything both low-level and high-level together. Rust just follows C++ along this same path. The resultant language will always be a complex compromise that is suboptimal for almost everything. For example, both Rust and C++ have too many high-level abstractions to easily reason about where allocations will happen and their manual memory management makes lambdas and async painful. I personally would favour the use of multiple languages. Such an approach is commonly emerging anyway due to practicalities, e.g. Python/C/Fortran use in machine learning.

comment 5y ago · link · parent

Are you sure? What language are you referring to?

For example, although Java method definitions are essentially defined in terms of tuples, function classes and objects in Java are all entirely nominal.

comment 5y ago · link · parent

The F# ones are tacked-on and have awkward syntax, but otherwise, why not? As I said, anonymous records could permit named arguments for free, e.g.

    let foo {x, y} = x + y
    in foo {x=1, y=2}
The function "foo" above has type:

    { x:int, y:int } -> int
Again, a nominal type can always easily be created from a structural type.

comment 5y ago · link · parent

Here's a counter example. I've seen numerous Java projects define a nominal predicate type, for example com.google.common.base.Predicate. None of these are interoperable without writing adapter code. ML and Haskell would essentially use a structural type:

    t -> bool
Much simpler and easier to consume.

How would you assign a nominal type to the result of a SQL query?

So there are arguments on both sides. My point was that structural types can always easily be turned into a nominal type, but not the other way around. Therefore they should be the default.

comment 5y ago · link · parent

I would add sructural types, for example anonymous (extensible) records and variants. Nominal types are overused in nearly all programming languages, even futuristic ones like Haskell. The default type definition should be a structural type, because it is easy to then simply name it if required.

Every C or Java programmer writes a function definition in terms of a tuple of parameters, despite not having first class tuples. Functional programming languages can also return tuples, but where are the anonymous records? These would allow defining functions with named arguments essentially for free.

comment 5y ago · link · parent

The T14 has DDR4 RAM instead of LPDDR4, in order that it can support DIMMs. Even the soldered portion will still be DDR4. The X1 has LPDDR4.

comment 5y ago · link · parent

> It is closer to a “what is the best you can do” benchmark

As I suspected. So of course this tells us very little about how fast idiomatic code is relative to other languages. "The best I can do" is to invoke hand optimised assembly language, but rarely is that the right choice.

A much more useful test would involve benchmarking some similar real world apps that solve the same problem.

comment 5y ago · link · parent

I agree it's not a useful comparison. That's why I don't give much weight to statements such as "Java comes on top in every individual category of all the benchmarks".

comment 5y ago · link · parent

Such programs are often specially and painstakingly constructed to avoid all the commonly used language features that are inefficient. For example, in Java, user-defined data types are heap allocated and generic code boxes everything, even primitive types (an ArrayList of ints becomes unfortuately an array of pointers).

Are these programs benchmarking typical idiomatic Java, or just some subset of the language?

comment 5y ago · link · parent

It's not as simple as soldered versus socketed. There are no DIMMs for low power LPDDR4 RAM, so if you buy a machine with DIMMs, the battery life is slightly worse. This is especially noticeable when the machine is sleeping. I just buy twice the RAM I really need, to help future proof it. Although the disadvantage of this is that one is often forced into buying hotter and noiser Intel chips.

comment 5y ago · link · parent

Python is not limitless. It has very much reached its limit and has major problems with performance, concurrency/parallelism, static analysis and formal semantics. This is why many refer to it as a "scripting language". This doesn't necessary stop people building billion dollar businesses with it though, look at PHP.

comment 5y ago · link · parent

Perhaps the OP just wanted a simple custom algorithm that would be easy to integrate?

I do not understand why rejecting a million-lines-of-code dependency implies the person is a troll?

comment 5y ago · link · parent

At least one can remove the bloatware from Windows!

comment 5y ago · link · parent

It works as well on Linux as it does using Windows for me, using Intel graphics (both have minor issues with displayport MST, i.e one USBC and two monitors). Are you using NVidia hardware by any chance?

comment 5y ago · link · parent

It's not that simple (and never is). Displayport and Windows are a big part of the problem.

comment 5y ago · link · parent

Not true. For example the Amazon reviews of any displayport KVM will be mostly one star. This is usually because dynamic switching of displayport works so badly on all operating systems.
1
212223
69