HNHacker News
TopNewBestAskShowJobs

haglin

114 karma · joined September 6, 2017

submissionscomments
haglin··on The Future of Java SE [video]
Can you elaborate? I don't understand what you mean.

Oracle contributes patches to OpenJDK, for instance lambda support.

Do you want less of that? Are the commits made by Oracle employees especially bad?

It's not like you need to use the Oracle JDK. There are many different distros, just like Linux.

haglin··on The Future of Java SE [video]
Curious, what change within Oracle do you want to see?

Java is still free, so it can't be that.

haglin··on The Future of Java SE [video]
You were unlucky, the hg server went down during the weekend http://mail.openjdk.java.net/pipermail/jdk-dev/2018-October/...

This doesn't happen often.

It's definitely not a research project. There are many large companies who contribute to OpenJDK, for example Oracle, SAP, Red Hat, SAP, Google and Amazon

https://blogs.oracle.com/java-platform-group/building-jdk-11...

haglin··on Java Is Still Free
Just use OpenJDK.
haglin··on Java is still available at zero-cost
I think generics in Java works pretty well.

Should it have been there from the beginning. Yes, but it would have delayed the release of JDK 1.0.

People often complain about type erasure, but I have seen very few examples of everyday programming where it would have helped. I think type erasure was a reasonable compromise.

The only real use case I can see is value types.

You want List<int> to be backed by array of ints, not Integer objects. But there are already plans to add this to JVM, once value types are added.

haglin··on Why Google Stores Billions of Lines of Code in a Single Repository (2016)
Google's handling of their source code makes me wanna work there.

I don't like distributed version control systems with hundreds of repositories spread out. It makes management more complicated. I understand this is a minority view, but that is my experience. It was easier to work in a single Perforce repository than hundreds of Git or Mercurial repos.

haglin··on Should I Learn Java in 2018
And more is coming:

Fibers, pattern matching, continuations, value types, low latency garbage collector …

haglin··on Google has been letting app developers read users’ Gmail
Don't be evil.

The greatest trick the Devil ever pulled was convincing the world he didn't exist.

haglin··on Comparison of Erlang Runtime System and Java Virtual Machine [pdf]
It may be worth mentioning that project Loom [1][2] aims to add continuations and lightweight threading to Java. It is lead by Ron Pressler, the author of the Quasar library mentioned in the paper.

Also, JDK 11 (Hotspot) comes with a new concurrent non-generational garbage collector (ZGC) [3] that has an average pause time of 1 ms [4]. It is still an experimental feature, but that will most likely change over time.

[1] http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.htm...

[2] http://openjdk.java.net/projects/loom/

[3] http://openjdk.java.net/jeps/333

[4] https://youtu.be/tShc0dyFtgw?t=4m58s

haglin··on Java: "+=" applied to String operands can provoke side effects
I believe there is a JEP to fix that, but it doesn't say if it will make JDK 11.

http://openjdk.java.net/jeps/8200758

haglin··on Nebulet: A microkernel that runs WebAssembly in Ring 0
Java Applets were supposed to be safe too.
haglin··on Subscription Hell
You need ONE wallet and then you can use it for all sites. It's much, much easier.

Setting up the wallet doesn't need to be more complicated than setting up a card with Apple Pay. You don't need to understand the underlying technology to use it in millions of stores.

Today's system is like setting up Apple Pay every time you need to buy something in a store you have not visited before. It's a horrible user experience.

haglin··on Java is too old, What should you learn in 2018?
Java has changed a lot over the years, for example generics, lambdas, default methods, type inference, and new things are in the pipeline, for example value types, data classes, and pattern matching.

The JDK libraries has also grown. You could probably spend a week just learning about java.util.concurrent.* and how to write efficient multithreaded code.

haglin··on Subscription Hell
Someone always have to pay, one way or the other.

With microtransactions you only pay for what you want to consume and you don't need 10+ different subscriptions. That is the benefit.

If you only want to spend 2 dollar a month, that's fine.

haglin··on Subscription Hell
If it is built into the browser, it will not be harder than say cookies. When it comes to US dollars, you have to pay transaction fees and it can take days before the transaction is completed.

The user doesn't need to know what a cryptocurrency is, the dialog will be displayed in dollar, or whatever currency you happen to use in your country.

Today's system is more complicated. You have to create an account, confirm e-mail, remember your password, enter credit card number, address, expiration date etc.

haglin··on Subscription Hell
What we need is a cryptocurrency capable of handling microtransactions. Then we need web browser support (a standard) for a cryptocurrency wallet.

When you visit a web page, you can pay for the content by clicking Yes in a dialog box. When you don't have money in you wallet, you can fill it up using your credit card, or some bank solution. The price is shown in your currency of choice, but all the transactions happens on the blockchain.

People who make web pages can paste in some javascript to charge for content. No third party organization needs to get involved and the seller can't get charge backs. The transaction fee will be low so that you can charge pennies for a news article. This will work without you giving away you credit card number, name, address, e-mail etc. to the seller.

haglin··on Short Story of a Long Migration (from Java 7 to Java 8)
"Let’s try an another strategy then: bump as little as we can. This strategy worked much better."

Not sure this is a better strategy - it accumulates technical debt.

I think you should try to update as much as possible and stay ahead of the curve. That way you can reap the benefits of performance improvements, bug fixes and richer APIs. Sure, it makes sense to not use the bleeding edge, but being on the oldest possible version doesn't seem to be a good strategy either.

haglin··on Sinclair Spectrum Designer Rick Dickinson Has Died
I didn't understand how pop and push worked.

I thought each register, i.e. BC or DE, had its own stack. I couldn't understand why some programs crashed. Very frustrating when you had to reload everything from tape again, and again, and again...

haglin··on Java is Pass-by-Value
You need a controversial title, or the topic will be ignored and not discussed here.
haglin··on Why you can have millions of Goroutines but only thousands of Java threads
Project Loom will add support for millions of threads (fibers) to the JVM.

http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.htm...

haglin··on 'I’m not having children because I want to save the planet'
100 billion could, without problem, live on this planet using nuclear energy and vertical farming.
haglin··on Improved Docker Container Integration with Java 10
> It will never be as good as a modern language like Kotlin (data classes are my favourite feature there), but it is good enough

Data classes may come to Java.

http://cr.openjdk.java.net/~briangoetz/amber/datum.html

http://mail.openjdk.java.net/pipermail/amber-spec-experts/20...

Fibers, continuations, string literals, pattern matching and value types are in the works.

http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.htm...

http://openjdk.java.net/jeps/326

https://www.youtube.com/watch?v=n3_8YcYKScw

http://openjdk.java.net/projects/valhalla/

haglin··on Open-sourcing a 10x reduction in Apache Cassandra tail latency
"To reduce the GC impact from the storage engine, we considered different approaches and ultimately decided to develop a C++ storage engine to replace existing ones."

I wonder how the numbers would have looked with the new low latency GC for Hotspot (ZGC). https://wiki.openjdk.java.net/display/zgc/Main

Early results from SPECjbb2015 are impressive. https://youtu.be/tShc0dyFtgw?t=5m1s

haglin··on Stop casting to List (Java)
If you use LinkedList and ArrayList in an API, you can't pass a list created by the following factory methods:

Collections.emptyList() Collections.singletonList() Collections.unmodifiableList() List.of()

As niftich points out, use the marker interface java.util.RandomAccess, if you want to know if the list allows constant time access.

haglin··on Not only is it possible to beat Google, it could happen sooner than we think
I have tried not to use Google, but I always come back.

Results from Altavista, Bing and DuckDuckGo are so much worse.

Note, it's not that Google has personal information on me. I'm not logged in, my cache is cleared, I use a VPN and google.com/ncr when it was available. Not sure how they do it. Perhaps their tracker sees how long people have visited a page and then they give those pages higher priority.

Perhaps other search engines can do a better job, but they had over a decade to improve their results and they are still far off.

haglin··on Server-Side I/O Performance: Node vs. PHP vs. Java vs. Go
What a lousy article.

"Most Java web servers work by starting a new thread of execution for each request that comes in "

Nobody who has a performance critical application starts a new thread for every request.

That would be beyond stupid.

haglin··on Why Google stores billions of lines of code in a single repository (2016)
I work in a large company and I have used a central repository for six years and a distributed for six years. I think a central repository is better. The benefits are:

1) Transparency. I can see what everybody else is doing and if somebody has an interesting project I can find it quickly. You can also learn a lot from looking at other peoples changes.

2) Faster. To check out the source code for the project I now work on takes an hour in the distributed system, while it only took 5 minutes in the centralized system.

3) Always backed up. All code that is checked into the central repository is backed up. It has happened twice that employees have left and code was lost because they only checked it in locally.

Many have only used CVS or SVN, which are horrible. I rather use Git or Mercurial, but Perforce is really good.

haglin··on 28-year-old makes millions buying from Walmart, selling on Amazon
Problem is, I don't want to work with repacking stuff, or managing others repacking stuff.

I want to build amazing software, and for that I need a larger company who can market my inventions and talk about it on conferences and road shows.

I will earn less, but I will be happy.

haglin··on Data Classes for Java
Some reasons:

- more efficient representation

- thread safety

- security (defensive copy)

- validation

- logging

- debugging

- backward compatibility

haglin··on New Project: ZGC – “Z Garbage Collector” for Java
What does the Z stand for? Zettabytes?

If GC pause times do not increase with the heap- or live-set size, it could handle such large heaps.

← PreviousPage 2 of 3Next →