News for hackers. Stuff that matters.

BoyRobot777

Re:The Last Soviet Generation on Saturday December 25, 2021 @06:23AM (#29682342)
> There were 3 equally sized population groups at the time: pro Russia, pro EU and we-don’t-care.

Pro russia equally sized? Where are you getting this from? It seems you're just a troll and I'll stop engaging with you now.

> can’t guarantee the same outcome today.

Lithuania has one of most positive view on EU[1].

[1] https://www.pewresearch.org/global/2019/10/14/the-european-u...

Re:The Last Soviet Generation on Saturday December 25, 2021 @06:15AM (#29682297)
> And they make some serious revenue compared to the lasers.

I don't know why you've linked ekspla, which has 4x lower revenue than Light Conversion. And sure, the revenue is bigger in Pieno Zvaigzde, than in Light Conversion, but the profit is almost 3x lower[1][2]. Also, look at the grown of revenue. It's like night a day.

> Single German company is much bigger than everything laser related in Lithuania

So? Am I to understand that Germany has won the competition in laser related technologies and Lithuania has no chance?

> Regarding Taiwan and semiconductor factory. Sorry, I can’t take it serious being electrical engineer and working in semiconductor manufacturing.

We shall see :)

> The foreign policy is absolutely shit in Lithuania. Relationships with Poland and Latvia are a disaster.

Source? Because Poland and Lithuania has been cooperating on multiple levels and their relationship is at the highest right now. Latvia, Estonia and Lithuania also are cooperating on a lot of levels. Just recently, they've agree to create joint ‘operational area’ for defence[3]. They also agreed to jointly develop a MLRS artillery system for the first time. Thanks to russia, relationships are better than ever.

While relationships with authoritarian regimes were never warm to begin with so I don't see any loss here. Either you support pro-democracy or not. If not, relationship with these countries will be bad.

[1] https://rekvizitai.vz.lt/imone/pieno_zvaigzdes/apyvarta/ [2] https://rekvizitai.vz.lt/en/company/light_conversion/turnove... [3] https://www.lrt.lt/en/news-in-english/19/1569645/baltic-stat...

Re:The Last Soviet Generation on Saturday December 25, 2021 @05:42AM (#29682104)
> They’re too corrupt

Compared to what? China? russia?

> Lithuanian railway and Belarus deal should be known better to you.

It's has been blown out of proportion without understanding the full picture, not corruption. "The US Treasury Department's Office of Foreign Assets Control (OFAC) has officially confirmed that Washington's sanctions against Belaruskali, one of the world's largest potash fertiliser producers and exporters, are not binding on Lithuania's state-owned railways.[1]"

Lithuanian railway cannot just terminate their contract otherwise they will face legal consequences in Court of Arbitration. They are looking for a legal way to kill the contract, but it takes time and planing.

[1] https://www.lrt.lt/en/news-in-english/19/1568321/us-sanction...

Re:The Last Soviet Generation on Saturday December 25, 2021 @04:10AM (#29681688)
> Now it is just another weird faceless post Soviet country that made into EU and NATO. No strategy, no goals, no future.

You've been reading too much propaganda. Living in Lithuania is become better each year. Lithuania's GDP is like Belarus, while the population is 3x smaller. Lithuania has surpassed russia in GDP per Capita long time ago. Lithuania is #11 in doing business [1]. Lithuania is Largest Fintech hub in the EU in terms of licensed companies[2]. Lithuania is one of global leaders when it comes to laser technology. And currently, there are talks between Taiwan and Lithuania about semi-conductor factory. And that is being achieved in only 30 years or so.

Regarding being faceless. Lithuania has showed that it has a strong spine again and again against authoritarian regimes. By hosting Belarusian pro democracy leaders [3], by support Ukraine in every possible way in their path to democracy, and yes, supporting Taiwan, which resulted in spat between China and Lithuania. While we old western countries talk, Lithuania walks the talk.

Lithuania has very much a face. And that's the face of being pro democracy. Yes they are small and they rely on their partners support, but they have values.

[1] https://www.doingbusiness.org/en/data/exploreeconomies/lithu... [2] https://investlithuania.com/fintech-report-2020-2021/ [3] https://www.rferl.org/a/belarus-lithuania-official-oppositio...

Re:14-inch MacBook Pro review: A Mac Pro in your backpack on Monday October 25, 2021 @12:23PM (#28989655)
Is everything still glued together without being able to repair yourself? /s
Re:Asynchronous Programming in C# on Friday September 24, 2021 @01:20PM (#28645307)
You won't need to rewrite into async model, because project Loom will introduce virtual threads. That means your sync code will look exactly the same, but will have scalability of async.
Re:Java 17 / JDK 17: General Availability on Tuesday September 14, 2021 @04:53PM (#28530983)
https://advancedweb.hu/a-categorized-list-of-all-java-and-jv...

Only missing stuff from 17, but that's a short list.

Re:Java 17 / JDK 17: General Availability on Tuesday September 14, 2021 @04:45PM (#28530873)
This will be solved[1]:

record Point(int x, int y) {}

Point p = new Point(1, 2); Point pp = p with { x = 3; }

[1] https://github.com/openjdk/amber-docs/blob/master/eg-drafts/...

Value classes cannot provide the performance/memory flatness that Valhalla will bring though. So I'm not really sure what benefit does "values classes" bring. Just to make sure, you are talking about the inline class which is just a wrapper around single property?

   inline class Password(val value: String)
Re:Java 16 on Tuesday March 16, 2021 @05:34PM (#26483349)
I very much like text blocks as well. SQL/JSON can be finally understandable without all the "\n" +
Re:Java 16 on Tuesday March 16, 2021 @05:22PM (#26483162)
I think Loom can be abstracted away by Kotlin quite easily. Valhalla on the other hand won't work at all. You won't be able to have inline classes in android/older Java versions. Even more - specialized generics.
Re:Java 16 on Tuesday March 16, 2021 @12:39PM (#26479156)
>While they're about it, they should also add immutable/copying data structures.

They will start with records[1], but I think all value classes (Valhalla) should have this functionality eventually.

You will be able to write:

   record Point(int x, int y){}
   Point pp = p with { x = 3; }

[1]https://github.com/openjdk/amber-docs/blob/master/eg-drafts/...
Re:Java 16 on Tuesday March 16, 2021 @12:00PM (#26478551)
I was not aware that Microsoft invented algebraic data type.
Re:Java 16 on Tuesday March 16, 2021 @11:41AM (#26478282)
Every thread about new Java version has the same comment all the time. Why share it? What kind of response do you seek?
Re:Java 16 on Tuesday March 16, 2021 @11:38AM (#26478240)
There was a lengthy discussion some time ago[0]. Quote:

#### Why not "just" make contextual keywords?

At first glance, contextual keywords (and their friends, such as reserved type identifiers) may appear to be a magic wand; they let us create the illusion of adding new keywords without breaking existing programs. But the positive track record of contextual keywords hides a great deal of complexity and distortion.

Each grammar position is its own story; contextual keywords that might be used as modifiers (e.g., `readonly`) have different ambiguity considerations than those that might be use in code (e.g., a `matches` expression). The process of selecting a contextual keyword is not a simple matter of adding it to the grammar; each one requires an analysis of potential current and future interactions. Similarly, each token we try to repurpose may have its own special considerations; for example, we could justify the use of `var` as a reserved type name because because the naming conventions are so broadly adhered to. Finally, the use of contextual keywords in certain syntactic positions can create additional considerations for extending the syntax later.

Contextual keywords create complexity for specifications, compilers, and IDEs. With one or two special cases, we can often deal well enough, but if special cases were to become more pervasive, this would likely result in more significant maintenance costs or bug tail. While it is easy to dismiss this as “not my problem”, in reality, this is everybody’s problem. IDEs often have to guess whether a use of a contextual keyword is a keyword or identifier, and it may not have enough information to make a good guess until it’s seen more input. This results in worse user highlighting, auto-completion, and refactoring abilities — or worse. These problems quickly become everyone's problems.

So, while contextual keywords are one of the tools in our toolbox, they should also be used sparingly.

[0]. https://mail.openjdk.java.net/pipermail/amber-spec-experts/2...

Re:Java 16 on Tuesday March 16, 2021 @11:31AM (#26478123)
Why not Kotlin, C#, F#, ML and so many other languages?
Re:Reflections on Using Haskell for My Startup on Friday February 19, 2021 @08:34AM (#26192949)
With records, multi-line strings, and upcoming pattern matching + virtual threads, I hardly see any need to switch languages. I really enjoy working with Java and JVM ecosystem which is very vibrant and has a plethora of tools/libraries.

I'm happy when I'm productive and ship stuff. I'm unhappy when I have to struggle with obscure/undocumented libraries/tools.

Re:TeaVM: Build Fast, Modern Web Apps in Java on Sunday January 31, 2021 @02:03PM (#25981498)
> no more Hibernate and so on

Quarkus, Redhat's, native first frameworks works fine with Hibernate and GraalVM. One of contributors gave a [talk](https://www.youtube.com/watch?v=za5CSBX-UME&feature=youtu.be)

What licensing costs? OpenJDK is free. As it always have been. OracleJDK and OpenJDK starting from version 11 are virtually the same.
Except the opposite is happening lol:

- Contributes pretty much all of the closed source technologies (or what was originally to become closed source) of the Oracle JDK to OpenJDK, for example giving the community: JDK Flight Recorder; JDK Mission Control; ZGC; …and probably more stuff I can’t think of right now;

- Ensures the Oracle JDK and the OpenJDK builds are virtually indistinguishable;

- Starts providing a free OpenJDK build (which includes all these donated technologies);

- Provides uncountable man hours of maintaining and innovating the Java platform;

- Ensures that the community knows where to find the free bits by linking to them, and slaps on a bright yellow warning sign, so that everyone can see that the licensing has changed;

Some bits do not even make sense: >OpenJDK might survive as permanently stuck in version 8

??? Wat?

> We were told <...>

Yeah. Say no more... If only you would have looked. Anyhow, Oracle does the following:

- Contributes pretty much all of the closed source technologies (or what was originally to become closed source) of the Oracle JDK to OpenJDK, for example giving the community: JDK Flight Recorder; JDK Mission Control; ZGC; …and probably more stuff I can’t think of right now;

- Ensures the Oracle JDK and the OpenJDK builds are virtually indistinguishable;

- Starts providing a free OpenJDK build (which includes all these donated technologies);

- Provides uncountable man hours of maintaining and innovating the Java platform;

- Ensures that the community knows where to find the free bits by linking to them, and slaps on a bright yellow warning sign, so that everyone can see that the licensing has changed;

And how does the community react, you wonder? Yep, that’s right. “Oracle is the Devil”, “This is a bait and switch operation” etc. Ad nauseum.

ONCE AGAIN. You do not need to use OracleJDK. Just use OpenJDK from AdoptOpenJDK.

Re:IT Runs on Java 8 on Friday May 10, 2019 @04:21PM (#19881858)
You should checkout new RedHat framework - [Quarkus](https://quarkus.io/). This is a framework which leverages Graal to create native images. Those images are very small and optimized. For example one of Quarkus developers showcase the size of native image, spoilers - it's [19MB](https://youtu.be/BcPLbhC9KAA?t=103). It takes 0,004s to start.

In [this](https://youtu.be/7G_r1iyrn2c?t=3104) session, RedHat developer shows how Quarkus application is being scaled. Comparing to Node, it's both faster to respond to first request and have smaller memory footprint (half the size of node).

Re:Negotiations Failed: How Oracle Killed Java EE on Saturday May 04, 2019 @12:26PM (#19827413)
F# does not have higher kinded types, because of CLR. So no, they don't manage "work around" generics.

Regarding measurements: https://www.techempower.com/benchmarks/

Also, I am very interested to see new benchmark results once AOT SubstrateVM will be more widely adopted in JVM community. Demo: https://youtu.be/MN6jNIwl2FQ?t=1136

RedHat already working on a framework which takes full benefit of that: https://quarkus.io/

All in all, with upcoming value types, SubstrateVM adoption, fibers and nice languages improvements like records, future is brighter than ever for Java.

Edit. Regarding JVM vs CLR https://news.ycombinator.com/item?id=15955685

Re:Negotiations Failed: How Oracle Killed Java EE on Saturday May 04, 2019 @11:30AM (#19827045)
Here we go again with "true Generics". Type erasure makes interop easy (for an almost insignificant cost), including with Java prior to generics. But that's also what makes different languages on the Java platform interop so well (contrast with the CLR, where this is not the case; they've baked variance into the runtime and are paying a high price for that decision). If Java had baked their type system into JVM, Scala, Kotlin, Groovy would have to dance around that. Haskell, for example, erases all types, not just type parameters (well, sort of; it does reify the constructor tag/discriminator, which corresponds to type information in Java), and people get fancy with types in Scala, too. The only real annoyance erasure brings is that you cannot overload a method with another that erases to the same type.

All in all, The JVM is leading not only CLR on all fronts, but pretty much any other runtime. C# compilers and GCs are at least a decade behind Java's. You may argue on how important those things are compared to other tradeoffs, but those are the areas where Java was designed to compete at, and those are the areas where it is leading by a wide margin.

Edit: when Java was first introduced, its original designers stated their intention to construct a conservative, low-innovation frontend language, and a high-innovation runtime. In many respects, .NET has the opposite design. You may prefer one or the other and that's OK, but it makes comparing the two on any single aspect very problematic. Of course Java won't keep up on language innovation compared to .NET, and of course .NET won't keep up with Java on runtime innovation -- they each choose to get their competitive advantage in different aspects.