HackerTrans
TopNewTrendsCommentsPastAskShowJobs

SureshG

no profile record

Submissions

We Built ExoQuery

exoquery.com
1 points·by SureshG·7 tháng trước·0 comments

comments

SureshG
·3 tháng trước·discuss
New GraalVM project Crema now supports runtime class-loading. Here's a full Clojure runtime built with GraalVM native-image + Crema: https://github.com/borkdude/cream
SureshG
·2 năm trước·discuss
> That means that Java programmers have to be very careful when writing code

From JEP 444:

The scheduler does not currently implement time sharing for virtual threads. Time sharing is the forceful preemption of a thread that has consumed an allotted quantity of CPU time. While time sharing can be effective at reducing the latency of some tasks when there are a relatively small number of platform threads and CPU utilization is at 100%, it is not clear that time sharing would be as effective with a million virtual threads.

Also, in this scenario, i think the current scheduler (ForkJoin Pool) will use managed blocker to compensate those pinned carrier threads.
SureshG
·2 năm trước·discuss
>"write once, run anywhere"??

You know that the code compiled using future version of java won' work in older versions..rt? I would like to know if any other programming language does that kind of thing.

> t should be as fast and easy to use and

How did you conclude that it's not fast? They are creating native binaries just like Go or any other AOT languages with GCs. Graal native images are as fast or faster than Go. Also it contains a REPL, that's why bigger size. So for CLI tooling as a developer using pkl, you won't see any difference if it's written in java + kotlin or golang.
SureshG
·3 năm trước·discuss
For java/Kotlin, we are using JTE (https://jte.gg/#getting-started), pretty nice build tooling and IDE support to generate pre-compiled templates without additional code generation steps.
SureshG
·3 năm trước·discuss
>An average JVM needs 500+ MB of RAM

We are running small services with heap size under 100 MBs and is absolutely possible with new JVM versions. If you want ever smaller without JIT, native image is also an option. Moreover in most scenarios, JVM provide better peak performance. So here is a tradeoff
SureshG
·4 năm trước·discuss
> I don't see the advantage to this over async/await style programming

Harmonious with the platform (jvm) which is based on threads, better stack-traces, accurate profiling info and simpler programming model (without adding async/await/suspend keyword everywhere) etc are some of the advantages.
SureshG
·4 năm trước·discuss
Modern java (check this - https://www.infoq.com/articles/data-oriented-programming-jav...) is really not that bad. Golang is like far more verbose than even JDK 8 (9 old release) for most parts. The issue is, many java users have only experience with spring ecosystem for doing most of the stuffs. There are far better alternatives in java ecosystem. There are other JVM languages like Kotlin with provides 100% interop with the ecosystems and is far better language than go.
SureshG
·4 năm trước·discuss
> The Go build tools fit your analogy better.

Go uses two build tools for any non-trivial projects. One write in go.mod and another in Make :D (see this - https://github.com/kubernetes/kubernetes/tree/master/build/r...)
SureshG
·4 năm trước·discuss
Yes, IMO game changing for java. Read this JEP - https://openjdk.org/jeps/425

Here is a simple echo server running on Virtual thread (using same old blocking APIs, handle 5m persistent connections) - https://github.com/ebarlas/project-loom-c5m/blob/main/src/ma...
SureshG
·4 năm trước·discuss
https://micronaut.io/

https://spring.io/projects/spring-boot

https://quarkus.io/

For Kotlin: https://ktor.io/
SureshG
·4 năm trước·discuss
Check compose mpp, uses Kotlin and Skia under the hood. Really good performance overall.

https://www.jetbrains.com/lp/compose-mpp/
SureshG
·4 năm trước·discuss
> because there’s nothing better!

You should check out compose multi platform - https://www.jetbrains.com/lp/compose-mpp/
SureshG
·4 năm trước·discuss
May be by next LTS (java 21 - 2023 Sep) :D
SureshG
·4 năm trước·discuss
> None with the same performance characteristics,

Most JVM languages (Kotlin/Scala/Clojure) including Java :) In fact kotlin/java has better peak performance than Go. Main advantage for go is the reduced memory footprint.
SureshG
·4 năm trước·discuss
Yes, nerdctl compose will work for most of the use cases. Check this compatibility guide - https://github.com/containerd/nerdctl/blob/master/docs/compo...