Better HN
topnewbestaskshowjobs
Log inSign up

tammerk

18 karma · joined Dec 3, 2020 (6y ago) · 19 submissions

Submissions

1.

Lowest position for Java in Tiobe Index since 2001(tiobe.com ↗)

2 points · by tammerk · 5y ago · discuss

comment 5y ago · link · parent

I can't find in documents but does multi-threading effect consistency somehow? Is there a chance that I wouldn't read what I just wrote? I'm talking about single node, not about replication, cluster etc.

If it provides same consistency, is threading like :

sock_read();

lock(datastructures);

set x=3;

unlock(datastructures);

sock_write();

comment 5y ago · link · parent

Difference between Go and Java, Java drives developers to write bloated code. Bunch of abstract classes, interfaces, fancy inheritance, getters/setters, OOP patterns, classes for anything and everything .. all in a different file. Normally, some code can fit in a single file, a logic can be a method but Java way of doing it in 20 files, 20 classes, 3 sub-classes, 3 interface implementations. I think this is the boilerplate that matters most.

I think Go will not ever be as bad as Enterprise Java because language and community culture which is shaped by language, don't give you as much opportunity to abuse it. If Go gets some new features that may enable abusing it, then yeah, history will repeat :)

comment 5y ago · link · parent

Literally author is asking for something in the cloud which is abstracted away, fast, easy to use and easy to debug. This is not possible imho. There are always trade-offs. You can't get all of them for "free". e.g serverless services will be slower than your own setup, like always. Debugging, I'm not sure but I don't think it will be as easier as your own setup ever.

comment 5y ago · link · parent

I agree but I didn't consider these while saying C is the fastest. These are not "general purpose", like you don't write your db, browser, http server or game engine with these.

comment 5y ago · link · parent

I didn't mean C is not fast or not faster than other languages. It's still the fastest one I believe.

What I meant is undefined behaviors allow compilers to optimize in a way that would not be possible otherwise. So, it might be a deliberate decision back then, to leverage performance. I don't know, just an idea.

comment 5y ago · link · parent

Nowadays, it doesn't provide any performance gain. I didn't see those days but maybe it was important for performance back in 70s/80s/90s even it was risky? e.g null terminated string was chosen due to low space overhead.

comment 5y ago · link · parent

It's more funnier that although language is full of traps, in practice it works quite well. I don't think any C developer(or let's say %95) knows all the rules mentioned in the article, yet we are still one piece.

Does anybody know any paper for bugs per lines of code for different languages or something similar?

comment 5y ago · link · parent

We'll see if they are going to prevent this.

comment 5y ago · link · parent

This is way beyond being "controversial". First thing probably, HN team can investigate all China related posts and gather users who flagged these posts and take action accordingly.

comment 5y ago · link · parent

> Five cent army, assemble!

Quick link : https://en.wikipedia.org/wiki/50_Cent_Party

They also flag posts to take down from the first page. Just look how many votes do this post have but barely on the first page, about to fall down.

comment 5y ago · link · parent

https://github.com/jepsen-io/jepsen/issues/399

> Yeah! I mean, I find a lot of linearizability errors in various databases, but this was also my very first time doing this kind of test, and it varies from system to system. Could have easily slipped through the cracks.

In summary, aphyr thought Zookeeper is linearizable even though it doesn't provide linearizable ops.

Looks like Zookeeper needs to be tested again.

comment 5y ago · link · parent

There are no hidden calls, mostly there is one way to do something. No exceptions, so you can see entrance and exit points of a function. There is no "abstraction" feature, so you tend to keep your code away from unnecessary abstractions.

You can find counter-examples ofcourse, bad programmers can create a mess from anything and everything.

My question is, as an example, how come Linux kernel's code ,nginx's code or memcached's code 100 times more readable than any other project in another "better" language.

This is why people say C is simple. You have limited options and you tend to end up with a "simple, readable" solution.

No one says "C is perfect, you should use it for anything and everything, it handles all the issues of computers, no gotchas, no surprises, 3 year old kids should start with C programming."

14.

Port of many Plan 9 libraries and programs to Unix(github.com ↗)

1 points · by tammerk · 5y ago · discuss

comment 5y ago · link · parent

I've seen in Cockroach db documents last month : https://www.cockroachlabs.com/docs/v20.2/cockroach-debug-bal...

This technique even has a name : ballast file

comment 5y ago · link · parent

I remember I loved it's keyboard. I really liked feeling back then, used to type even when computer was not on :)

One generation of programmers learned programming with these, I remember schools had these computers, it was a privilege to have computers in schools back then when you think about it.