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'm a fan of Java's synchronized, and sometimes wish that Rust had something higher-level object-level synchronization primitive

There are two big problems with Java's synchronized that I can think of. It adds a monitor and therefore memory overhead to every single object. And it publically exposes the monitor allowing potentially bugs due to unintended use by clients.

comment 3y ago · link · parent

> Adopt language epochs

I guess the issue has always been that no one can agree on particular language subsets?

However, one could view projects such as Google's Carbon as precisely that. A restricted safer subset of C++ with a more succinct syntax.

comment 3y ago · link · parent

I use to watch and really enjoy Lloyd as a young kid. It was still shown on TV in the 80's and absolutely approachable for a wide audience.

comment 3y ago · link · parent

> Just an awful product all around

It's all relative, anyone that's been forced to use "Skype for Business", would welcome Teams with open arms.

comment 3y ago · link · parent

The parent was asking for the correct form, the syntax of EDN is necessary but not sufficient to specify this. A type (or a schema) is needed. Even if documented manually ad-hoc, that is better than nothing and would stop people needed to search the internet for examples.

comment 3y ago · link · parent

I think you might be asking for a type :)

comment 3y ago · link · parent

> A model is desirable, and putting programming practice on a sound logical footing is a fine idea.

Many functional programming languages are based on formal logic. For example, Haskell is based on an augmented System-F.

comment 3y ago · link · parent

And if you did purchase Intel, the machine would likely be uncompetitive with respect to power efficiency and/or performance.

comment 3y ago · link · parent

To me, it's less terrifying than Facebook or Apple monitoring and controlling every penny I spend or receive.

comment 3y ago · link · parent

Isn't the split more Apple/Not-apple? The Samsung is perfectly usable without the Google ecosystem.

comment 3y ago · link · parent

As long as we can agree they are both terrible, then all is good :)

comment 3y ago · link · parent

For me, iPhone is a terrible experience, e.g no proper FLAC support and poor Bluetooth codec support.

comment 3y ago · link · parent

> Rust is too big for my small brain, unfortunately.

Rust is harder because it imposes constraints on the programmer in order to enforce memory safety. These constraints don't magically disappear if you are trying to write memory safe code in C.

comment 3y ago · link · parent

> HelloSystem is dealing with a vastly harder problem

I really don't think so. The original Mac had 128K.

comment 3y ago · link · parent

Arrows do imply certain behaviours, if the laws are to be satisfied. For example, they require synchronous streams. This means one can't really do things like coalescing very easily.

comment 3y ago · link · parent

Is there a formal spec for ReStructuredText? Not every project would want a dependency on the Python ecosystem.

comment 3y ago · link · parent

I've played with ChatGPT and see it as (at best) just complimentary to existing approaches. Unfortunately, I also see it as a vector of misinformation and potentially harmful. It appears highly knowledgeable on topics that I know little about, but otherwise it's replies are often riddled with errors and inaccuracies. It also seems unable to quote sources or references for such information. It seems reasonable to use a statistical process to generate conversational chat and boilerplate, but as a source of truth, it appears not.

comment 3y ago · link · parent

There's no need. The % placeholder can be used for a consise lambda syntax and would work with a F# application operator.

comment 3y ago · link · parent

The "Hack" pipe really is a bit of a hack. It conflates two orthogonal issues, a consise lambda syntax and function application.

comment 3y ago · link · parent

Don't forget that "type derived code" also happens with any language that has implicit arguments, e.g. type classes in Haskell and implicits in Scala. For example, in Haskell, if I compare two lists-of-maps-of-tuples for equality, there are many nested equality functions involved, but the type class machinery generates this code, at compile time for me. In a language without this, e.g. OCaml, many generic operations like equality, to_string, serialisation, etc become very painful.

comment 3y ago · link · parent

> That't why Microsoft used Freebsd TCP/IP utilities in Windows.

And for a time the actual TCP/IP stack!

comment 3y ago · link · parent

I don't downvote people for posting negative experiences and constructive criticisms. If anything is "pathetic", then I would suggest doing such a thing is.

comment 3y ago · link · parent

You think the likes of GTK and Qt give a better UI than VS Code? I'll tell you why there are no mature bindings in Rust for these toolkits and it has nothing to do with OOP. It's because there's no demand for it.

comment 3y ago · link · parent

Only by the Apple fanboys, I wouldn't take it personally.

comment 3y ago · link · parent

> Are you seriously saying that Apple wiped all your “friend’s” files

Why is it so hard to believe? The machines aren't modular or repairable, everything is soldered on the main board. The T2 security prevents cloning of the SSD.

comment 3y ago · link · parent

The best UIs, such as visual studio code, are now written in HTML.

comment 3y ago · link · parent

Haskell also has traits (type classes) and "methods" on them, I don't think anyone would seriously claim it's object oriented. The Rust website is clearly just a piece of marketing. Most languages that are not "OO first" will likely provide alternative mechanisms to encode OO if you want it.

comment 3y ago · link · parent

> How can you say that subtyping is not useful?

Well I said less useful. The applications you list can be solved without the nominal subtyping that Scala has invested in. Sometimes Scala feels as permissive as a dynamic language, for example an erroneous integer in an array of floats, is still a valid array, it's inferred as an array of "Any".

comment 3y ago · link · parent

OOP is absolutely not essential, that's why new languages like Rust, are not OO. OOP is not necessary for mutable state.

comment 3y ago · link · parent

> A quick research suggest that 1ML can't model objects and classes (in the OOP lingo), as per slide 6.

But what does he mean by "Objects" and "Classes"? Everything good about objects that a pure functional programmer would want is captured by first-class modules. The internal mutable state and subtyping/inheritance relationships are much less useful. In fact, even OOP thought leaders are advising not to use them.

> In the meantime, I will continue enjoying Scala that allows me to do Pure FP in a modular fashion while getting paid for it because of its huge (relatively speaking) job market :)

That's a very good reason to use Scala! But please do take a good look at Haskell too, if only just for interest. Many leading Scala programmers ended up moving to Haskell, in order to get deeper into FP.

1
131415
69