HNHacker News
TopNewBestAskShowJobs

marwis

373 karma · joined December 26, 2019

submissionscomments
marwis··on Oasis – a small, statically-linked Linux system
But dynamically linked library only needs to be loaded to RAM once whereas with static linking you'd be loading the same code many times (unless you compile everything to single binary like BusyBox). This also gets you better cache utilization.

Also I think inlining would typically increase the total size of output rather than decrease it.

marwis··on WASI 0.2.0 and Why It Matters
Security. Applets exposed massive API surface while wasm exposes almost nothing.

Also applets were too slow to start with Sun's implementation of the day while wasm works reasonably well in all browsers from day one. That matters a lot for adoption.

JVM improved but applets missed their chance. You only get one.

marwis··on JEP Draft – Derived Record Creation (Preview)
Do you consider in-box PowerShell and MS Office to be rare enterprise/nonsensical scenarios?

Or how about C# Source Generators that were introduced just few years ago and are stuck on .NET Standard 2.0 because of Visual Studio using .NET framework?

There is a lot of actively developed software out there either built in .NET or using it to provide extensibility that is now stuck as you can't add support for .NET Core without breaking all existing plugins.

The only alternative is complete redesign with out-of-process architecture which is not going to be compatible and might be inappropriate in some scenarios.

marwis··on JEP Draft – Derived Record Creation (Preview)
Good to know you can disable delivery completely once signed up, I haven't used mailman in ages! I will sign up in this case. The signup page only lets you switch to digest, which can mislead new users.

BTW mailing lists can work great for guest visitors who don't want to subscribe. They can also work great for teams who don't want guests.

The problem is openjdk mailman allows guest posting and lies about guests posts awaiting moderation. Had they simply disabled guest posting and said up-front that you must subscribe and send rejection notice to guests I would be perfectly fine with that.

Mailman sucks worse than even Google Groups and in this case it's also poorly configured.

PS. To add to frustration, LastPass (I know it's shit but don't have time to migrate) somehow can't deal with Mailman signups - it will generate but won't save passwords.

marwis··on JEP Draft – Derived Record Creation (Preview)
> They just released a proposal that effectively side-steps the problem of checked-exceptions-in-lambdas. Here is a link -- https://inside.java/2023/12/15/switch-case-effect/

This is fine but removes only about 10% of the pain of mandatory exception handling inside typical lambda.

Nothing short of making exceptions transparent to lambda receivers will cut it for me.

> Kotlin is using an annotation to disambiguate between Java style records and Kotlin style records

This is inherent risk of building on top of something you don't control. Don't really see this as fair comparison. It's a known design constraint. The only way to avoid it is to not build on top of Java or not adding any features on top of Java.

> To give another example with C#, there has been a lot of recent discussion about finding potential alternatives to their async-await concurrency model. They cite the level of effort it takes to maintain the async await style code and the costs that come from this.

I had a very different take-away. They did PoC with virtual threads and decided it's not worth the switch now and async-await that they have is good enough.

https://github.com/dotnet/runtimelab/issues/2398

> Some of the languages it gets compared too aren't even that old yet.

C# is more than old enough to drink and Scala just had its 20th birthday this weekend :) Java is only 4 years older than C#.

marwis··on JEP Draft – Derived Record Creation (Preview)
Going extra mile to ensure Google can't index doesn't sound like mere deprioritization.

I will admit the system works if its goal is to prevent wasting OpenJDK devs time on repetitive topics.

I was going to ask one such potentially repetitive question (can't tell without search) but waiting for non-existent moderator to approve my message successfully drained any energy I had for this :)

marwis··on JEP Draft – Derived Record Creation (Preview)
In theory exceptions can be easily found with static analysis. I suppose lack of such tools (and failure of code contracts which I think could've verified it statically) means that vast majority of people are happy with status quo.

Just an idea - maybe you can use CodeQL?

The transition to .NET core is indeed rather painful but it's just Microsoft's choice. Things were dropped/backwards compatibility broken mostly to simplify runtime but I saw nothing that couldn't have been emulated with some modest effort.

Also they could've easily softened the transition by continuing development of .NET Standard a bit longer and allowing side by side hosting of 4.x and Core in same process as that seemed to be the plan in the beginning. I guess they don't care.

marwis··on JEP Draft – Derived Record Creation (Preview)
> Tradeoffs like this are painful, but they make for a better language. Not to mention, for faster long term progress.

Don't think like Java is a good example of that, more like the anti-example. Plenty of more sophisticated languages move way faster without negative effects on long term progress (C#, Kotlin, to some extent Scala)

> A well designed feature becomes easy to extend. A poorly designed one is easy to extend initially, but becomes far more difficult in the long run.

Most of Java problems come down to unfortunate design choices in the past. E.g. checked exceptions vs lambdas

marwis··on JEP Draft – Derived Record Creation (Preview)
Well this isn't really like Lombok since it doesn't hack compiler internals but just generates some code using very standard annotation processor.

The alternative is to write this code by hand which isn't any better.

marwis··on JEP Draft – Derived Record Creation (Preview)
I know this and I hope you realize how horrible this is for community engagement.

I'm surprised there isn't an option to send your request via post mail.

Also other community-hostile behaviors of Java/OpenJDK project:

- mailing lists have no search function and block search engines/crawlers by returning 403 (apparently robots.txt is not enough!)

- can't post to mailing list without subscribing despite information that such messages will just need to be approved by moderator (they never are)

marwis··on Good DevEx increases productivity. Here is the data
That's surprising.

GA workflows are basically yaml lists of docker container names to run. I thought it would've been trivial to emulate. At least much easier than any other system.

marwis··on JEP Draft – Derived Record Creation (Preview)
Well, records are immutable so assignment must go to newly constructed instance, meanwhile new instance does not exist yet so any read must be from old instance.

Seems very intuitive to me (and same as C#).

marwis··on JEP Draft – Derived Record Creation (Preview)
The problem with this approach is that in the mean time the people will have to adopt crutches like https://github.com/Randgalt/record-builder and by the time Java adds missing features all the codebases will be forever polluted with legacy workarounds that nobody will dare to remove because of backwards compatibility.

It also hinders adoption of new features as people will prefer to maintain consistency in their codebases.

marwis··on JEP Draft – Derived Record Creation (Preview)
Sadly non-contributors cannot submit issues and comments nor observe tickets :(
marwis··on JEP Draft – Derived Record Creation (Preview)
Also C# records do not support initialization code so you can't validate arguments :(
marwis··on Good DevEx increases productivity. Here is the data
What's wrong with local runners like nektos/act?

I haven't used personally but curious if it has some shortcomings they don't mention.

marwis··on The Bun Shell
Actually Powershell is terrible for piping anything native. It will damage whatever data you pipe.

That's because unlike other shells where piping just passes through binary stream, Powershell is based around the concept of piping streams of .NET objects so it will try to parse output of one native command into a list of .NET strings, one for each line, and then print them out to input of another command. Not only making it extremely slow but also changing new lines \n to \r\n and maybe other special characters.

marwis··on The Bun Shell
> You install git on windows, it's got a (POSIX) shell.

I don't think it's in the path by default so if some program like npm calls exec("rm") it's still going to fail I think.

marwis··on We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres
Oh, actually one can just spawn non-virtual thread to solve it.
marwis··on We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres
This seems different.

It pins goroutine until it is explicitly released ensuring that multiple native calls will remain on the same platform thread and nothing else is going to use it. This is critical for namespace manipulation on Linux.

Java only pins for duration of native call and synchronized blocks.

It looks like Java does not offer equivalent API? For now could be achieved with synchronized but if synchronized will be changed in the future to not pin it would break.

marwis··on A NetBSD/amd64 guest can now boot in 18ms
Exactly, you just need to separate things that need to happen before snapshot from things that must be run every time. Then you just snapshot as part of the build.

This is how GraalVM and OpenJ9 achieve instant startup of Java programs.

marwis··on Driverless User Space File Systems for Windows, macOS, and Linux
It probably doesn't change at all. Blog mentions a way to assign ports to hostnames so I think ports are supplied out of band to SMB client and not included in UNC.
marwis··on Driverless User Space File Systems for Windows, macOS, and Linux
MS blogs say that a way to associate ports to hosts is coming.

Unfortunately it doesn't look like they are planning to support ports directly in UNC paths.

marwis··on Show HN: I made an app that consolidated 18 apps (doc, sheet, form, site, chat…)
Microsoft was pushing something like that few years ago under the name Fluid Framework: https://youtu.be/tPw5kFkXtt4

But seems to have devolved into generic state synchronization library these days.

marwis··on Driverless User Space File Systems for Windows, macOS, and Linux
It's not possible I'm afraid. At least wasn't when I looked last year.

DAV is arguably easier than p9 since everything has HTTP libraries and most people know it.

marwis··on Driverless User Space File Systems for Windows, macOS, and Linux
It's aliased so you can't bind two different services on the same port on different 127.0.0.x addresses. Windows has built-in SMB server.

PS. Loopback driver is not 3rd party.

marwis··on Driverless User Space File Systems for Windows, macOS, and Linux
Also I think your solution is insufficient because Windows SMB server always binds on wildcard address. You have to disable SMB service or arrange that your server starts before system SMB server.

There are some guides online about it.

marwis··on Driverless User Space File Systems for Windows, macOS, and Linux
Not needed anymore. Latest version of Windows 11 finally allows mounting SMB on arbitrary port!

  NET USE F: \\localhost\foo /TCPPORT:1234
It also supports QUIC and RDMA. I wonder if it would be possible to achieve zero copy with RDMA.
marwis··on Modern Java/JVM Build Practices
Would be nice to show how to handle multimodule projects. Maven does that out of the box but Gradle is rather complicated (too many ways).

Another idea: publish as inheritable POM for Maven and Gradle convention plugin so that people don't need to copy all that boilerplate (with some refactoring to make it reusable)

marwis··on Go: What we got right, what we got wrong
Scala had it 2 years before golang, OCaml more than decade. https://en.wikipedia.org/wiki/Structural_type_system
← PreviousPage 3 of 11Next →