HNHacker News
TopNewBestAskShowJobs

entha_saava

244 karma · joined May 3, 2020

submissionscomments
entha_saava··on The Next Step for Generics
Wait...

I have seen average programmers who can write less dumbed down code than the most succinct code possible in Go.

I have seen below average programmers who understand how to use generic data structures / programs in C++ / Java / C# etc..

> It's designed to be simple, to be boilerplate, to be easily reviewable/checkable by coding teams.

Boilerplate and easily reviewable are at the odds. Unless Enterprise style java is the bar, it is hard for anyone to say that. Go is too much boilerplate than average programmer's python code, for example. Don't tell me python is dynamic. The average programmer doesn't do metaclass magic.

Being so much boilerplate and verbose `if err != nil` and no generics and no methods/functions for common operations like finding the index of an element in an array. All this leads to for-loop-inside-while-loop-inside-for-loop attrocities where it is harder to decipher what the intention is. Compare to python where you have methods on collections to carry out common manipulations, and list comprehension in python is so cleaner than 4 line imperative go code.

Go seems to miss why python/JS/ruby are so popular. It is because so much is built in that you can communicate __intent__ clearly without getting bogged down in details. Compared to any modern language that's not C and not mediaeval C++, Go is so much more verbose. Even java has enough shortcuts to do these common things.

And don't start telling me this leads to incomprehensible code. Coding standards are there. What's unreadable is 8 level indented imperative attrocity of blue collar language Go.

> Not sure why Go and Rust are always the compared languages.

They both emerged at same time and have some overlapping scope - eg static native compilation, memory safety etc.. but there similarities end. However, there is lack of a a popular, succinct natively compiled language which gets out of the way to write software. Everyone knows expressive languages need not be slow or difficult to deploy. Some people have to write Go in dayjob and the sibling rust, having quality-of-life improvements that anyone expects in a post-2000 language [0], seems to be a closer candidate to comparison (even though rust isn't the optimal language for the things Go is used for, given it is a systems language with static memory management) Others like D and Nim have a fraction of users. Of course there are also some vocal rust fanboys who think crab god is not popular because world is anti intellectual.

entha_saava··on The Next Step for Generics
> LLVM is also slow in general.

Agreed. But so is GCC. And I guess many of the 'zero cost' abstractions require some advanced optimizing compiler like LLVM to be zero cost (or move that complexity to compiler end).

They specifically mentioned the technical debt and poor LLVM IR Generation issue though. I wonder if it has yet gotten attention or fixed. Maybe @pcwalton knows.

entha_saava··on The Next Step for Generics
Reference counting still requires you to keep track of cycles. Also performance is less than GC, especially in multithreaded environments. And Swift is not a serious language outside apple ecosystem.

OCaml is actually very good language. I hate how people outright dismiss it mentioning multicore. Neither JS nor Python have great multicore story. And most applications don't need multicore.

Wish there was a good static compilation toolchain for .net core. F# would gain much more traction then.

entha_saava··on The Next Step for Generics
> One of the things I like most about Rust is that it forces you to think through your design and address complex tradeoffs, and often won't even compile until you do.

I have heard this bullshit enough times. "Orange crab god doesn't like it so you are doing it wrong". No, you shouldn't have to care about memory management nuisances when that's not relevant and rust being a language suited for systems domains with correct static memory management (Good thing for systems domain), makes those irrelevant details surface in implementation.. what you said isn't true for other domains.

This kind of shilling is what leads to rust evangelism strike force memes.

entha_saava··on The Next Step for Generics
Fearless shilling or zero manners evangelism.
entha_saava··on The Next Step for Generics
I have to refute this 'simple and practical' claim.

Not having generics and neither having very common tools doesn't seem very good. You will have to write a for loop for what is a simple function call in python or javascript or <insert modern language here>. Such detail easily interrupts reading / writing flow.

entha_saava··on The Next Step for Generics
D has generics and compiles fast. There are probably other examples too.

The overlooked thing is rustc produces poor quality LLVM IR which is also mentioned in FAQ.

And generics reduce amount of manual for loop juggling code one has to write. I don't think adding generics makes much of a difference.

entha_saava··on The Next Step for Generics
Is rust's slow compile time because of poor LLVM IR generation or just because monomorphization? D has generics and compiles fast. I guess Nim compile times are okay, too..
entha_saava··on The Next Step for Generics
Exceptions don't lead to silent but dangerous and hard to debug errors. The program fails if exception is not handled.
entha_saava··on The Next Step for Generics
Maybe you think go is simple. But I don't.

You need a for loop for what is done in other languages with one method call.

Removing an element from an array doesn't look like that. It is some slice appending trickery.

Having null and having to check errors every 5th line or so..

It lacks idioms like list comprehensions or map / filter. Reading code is spent in details like whether a for loop is index(), count(), map() or filter().

Instead of some simple code like x = condition ? a : b you are writing imperative verbose code like: if condition { x = a } else { x = b }

Go maybe simpler than enterprise-style java. But that's not 'simple'.

http://archive.is/YPxJP

entha_saava··on The Next Step for Generics
There are some python based ones.
entha_saava··on The Next Step for Generics
I just wish people shitting on statically typed languages would remember they came to solve the mess that arose from dynamic typing.
entha_saava··on The Next Step for Generics
This is a generalized feeling about good static type systems.

What is missing is a language with good static type system (Algebraic data types, stream/iterators, generics), simple and having GC, for application domains where prototyping speed matters.

entha_saava··on An understanding of AI’s limitations is starting to sink in
Nothing wrong with python or JS. But there are many things wrong with bootcamp / workshop people who come out just learning Python with some ML library or JS with some web framework. They don't know even basics of CS and arguably produce bad, inefficient code.

There is a famous word for latter - 'webshit'. The former doesn't have such a title. But there is an obscure one originating from a Slashdot comment IIRC something like: 'you are one of those data science idiots from python schools eh?'

Edit: I didn't mean disrespect to those doing meaningful research. But that's not what most of things sold as 'ML' are.

entha_saava··on Show HN: A simple GUI Notepad using C++ natively made in my high school in 2015
Many teaching faculty are resistant to change because it requires them to learn something. That's the biggest problem. although some boards have successfully switched to teaching python.
entha_saava··on Show HN: A simple GUI Notepad using C++ natively made in my high school in 2015
Well, teachers aren't interested in all these. They just teach in some rote learning fashion. But at least having CS as subject helps to create interest in students about programming. That's it.

Even in Engineering courses, some teachers don't even properly indent code and can't even write themselves a recursive algorithm for eg: printing a number in binary. This is not an issue limited to CS/programming, but manifests more because it is a practical subject and a fast growing fields.

But some students get interested in programming earlier rather than rote learning other choices of subjects (eg: biology). That's the benefit of having CompSci/Programming in curriculum.

Source: learned programming in turbo C++ in India during my HS (called +2 or Pre-university here).

entha_saava··on Free Textbooks from Springer, Categorised
Off topic, but last time I posted a link to upenn's online books page, it went unnoticed. Great resource IMO.
entha_saava··on Free Textbooks from Springer, Categorised
Can I introduce you to library genesis? Or, if you don't like piracy, upenn's online books Page?
entha_saava··on An understanding of AI’s limitations is starting to sink in
It sounds like some buzzword speak. Most things that are heralded as ML are nothing but data science idiots from python schools applying some basic math transformations and overselling them.
entha_saava··on Flow browser passes the Acid tests
Yeah it is mostly web devs being crap. No problem with sites like HN.
entha_saava··on “Huh” exists in all human languages, according to research (2019)
Neither in South Indian languages.
entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
To be fair, rust is a good systems programming language, for scenarios where correctness is important and runtime footprint must be small. I have no problems with it promoted as a good systems programming language. It seems much more modern than Ada or something and may lend itself better to formal verification.

What I hate is rust fanboys' propaganda that rust is great for every purpose including CRUD stuff because crab god moral and borrow checker is moral responsibility. There is lot of dishonest marketing sounding like rust doesn't have cognitive overhead compared to other languages. It gives me an impression that, in best case, it is selection bias among people that successfully learn and use rust, or in worst case, some people trying to show off that they learned a 'hard' language and it is 'easy' for them.

Secondly rust community is very political and polarising that many people don't like. It almost seems full of non-STEM-worthy people although they are a vocal minority..

entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
> I think it is also very hard to make a performance argument in 2020. Especially when you are comparing low level against something like the newest C#/.NET Core stack.

I agreed until this. I don't take anything not AOT compiled with an optimizing compiler as fast.

JITs may work well for numeric benchmarks with one tight loop, but there is extra memory and energy overhead.

entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
You think only inexperienced programmers cause memory errors?

I am no fan of rust and actually hate its evangelism. But this is ridiculous.

entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
It seems to me some people are genuinely excited too much about it and some people are trying to show off that a 'hard' language is easy for them.
entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
> extra hype made people more sensitive..

Sure, because you people talk about it literally everywhere.

> other one is the fear of realizing that Rust is going to take over some day.

It is not. It is a good systems language, not so much for application domains where other languages get shit done in half the cognitive load. just because rust community likes to promote rust for everything and involves in dishonest marketing that borrow checker is not a problem, rust is not the optimal language for applications domains where high guarantees and low resource usage aren't mandatory.

entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
Except npm has order of magnitude more users.
entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
Even legitimate criticisms get downvoted or countered with dishonest marketing speech like 'borrow checker doesn't matter'.
entha_saava··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
At least they don't bring politics in it.
entha_saava··on Performance of modern Java on data-heavy workloads
And many string types, like Haskell /s
← PreviousPage 4 of 7Next →