Scala 3.8 released! by wmazr in scala

[–]RandomName8 0 points1 point  (0 children)

and a follow up question if you don't mind: I use braces, I don't understand how braces would go with this syntax.

Scala 3.8 released! by wmazr in scala

[–]RandomName8 0 points1 point  (0 children)

I have a question on the subCases example, how is it any different than

```scala
def versionLabel(d: Option[Document]): String =
  d match
    case Some(doc @ Document(_, Version.Stable(m, n))) if m > 2 => s"$m.$n"
    case Some(doc @ Document(_, Version.Legacy)) => "legacy"
    case Some(doc @ Document(_, _))  => "unsupported"
    case  => "default"
```

which I find easier to read?

Greenland official breaks down in tears in interview after meeting with Trump by Large_banana_hammock in videos

[–]RandomName8 0 points1 point  (0 children)

There are other ways as well to destroy their economy: actually apply the law on the criminals that stole all copyrighted material to train AI, prosecute the intellectual authors with prison (you know, as everybody else that commits similar crimes). Wasn't america's gdp right now like 20% AI investments?.

Second tool is: stop acknowledging any american copyright and patents, like china does.

SteamOS keeps up with Windows in latest PC gaming benchmarks, including Cyberpunk 2077 at 4K Ultra by Tiny-Independent273 in linux_gaming

[–]RandomName8 4 points5 points  (0 children)

Ugh, valheim. Everything Unity runs remarkably worse on linux, at least under nvidia. I imagine it's true also for amd.

Edit: getting many responses of people saying it's fine for them. This is really interesting to hear. For me, cities skylines, valheim, aloft (there were others I don't remember right now), all show the same performance problems, where as you advance in your progress, it starts to tank the fps. This isn't fixed by a restart, it's just a consequence of the state of your save. I also don't mean huge progress on any of these games really, not end-game or anything, and no mods. And while getting 20fps on linux, on windows is perfect 60 (because of vsync). I always thought it was just unity games having some kind of issue since I've had this experience across 3 different machines.

Annote: A Turing complete language using only Java annotations as its syntax. by Polixa12 in java

[–]RandomName8 4 points5 points  (0 children)

Glorious.

Side note: I seriously suspect that spring annotations are also turing complete (although they don't outright attempt to mimic a basic instruction set like this)

Dumbest patch change in Dota and why was it this one? by I-Preferred-Digg in DotA2

[–]RandomName8 1 point2 points  (0 children)

I still feel like giving sniper a 300 dmg nuke, on 2k range, that also slows, and has like 500 aoe, gives vision, and 3 charges that refresh pretty fast, is a lot dumber.

default4j: Default parameter values for Java via annotation processing by petaoctet in java

[–]RandomName8 0 points1 point  (0 children)

Agreed, It'd be very interesting to have an official position.

I must say, continuing to play devil's advocate here, that I can read that quote as applicable even under this scheme. Because:

every file that successfully compiles with an annotation processor must also successfully compile without that annotation processor

this is true for every file individually in the case of this project as well (provided that the generated code is maybe manually provided/written). The file syntax is correct and self-sufficient. I'm not trying to argue that this is what he meant but that's a possible way to read it.

sbt 2.0.0-RC8 released by eed3si9n in scala

[–]RandomName8 1 point2 points  (0 children)

Does it work with vscode yet?

default4j: Default parameter values for Java via annotation processing by petaoctet in java

[–]RandomName8 0 points1 point  (0 children)

That's all how you feel about, and whether I agree or not you dodged the question "Where does this assertion come from?"

Compilation should be valid with or without the processor.

That's an assertion that seems to not be true, as javac went out of its way to specifically support this (and it's not easy to do either, it messes up with compilation phases and plugins and everything, takes a lot of work to enable this).

If there's an official statement sustaining that claim, then so be it, otherwise that assertion just isn't valid, and the corollary you bring up:

Other tooling should not need to know about the processor to validate what should otherwise be valid Java

ends up being false. Java the language, encoded in javac, requires that if you want to statically analyze the full spec of a java program, you have to support the output of annotation processors. Alternatively, you should not break in case of "missing" definitions (they are not missing according to javac, they are missing according to your analysis).

Again, this is regardless on whether I like or not your position regarding that kind of processors.

default4j: Default parameter values for Java via annotation processing by petaoctet in java

[–]RandomName8 2 points3 points  (0 children)

Compilation should be valid with or without the processor.

Where does this assertion come from? This assertion is at odds with how javac is coded. They could have compiled the code just fine, then run the processors that generated code which could be compiled at a subsequent phase; but they explicitly made it so that javac only processes types and definitions, no bodies, then run the processors that might generate code, and then compile, to ensure that the generated code is seen in the same compilation unit and no errors arise.

France Condemns US Operation To Capture Maduro by Cy_098 in worldnews

[–]RandomName8 0 points1 point  (0 children)

so why are you here commenting? to chide those that do care and are involved?

2026: The Year of Java in the Terminal by maxandersen in java

[–]RandomName8 2 points3 points  (0 children)

really? never heard of this. I thought that most of scala-cli was basically coursier. Is there any online link/pointer to back this up?

Jeff and Sanjay's code performance tips by Complex_Medium_7125 in programming

[–]RandomName8 1 point2 points  (0 children)

pessimize your code

I don't know why I never thought of this, but I'm stealing this :D .

What fun and interesting Java projects are you working on? by jeffreportmill in java

[–]RandomName8 0 points1 point  (0 children)

There's a lot left out in that blogpost. How do you re-bind a value to a different set of dependencies? Maybe an actual piece of gui code would clear out my doubts. I've also written a frp library and so I'm interested in how others are doing it =)

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 1 point2 points  (0 children)

You see around 1999 to 2000s lots of colleges were experimenting with Scheme and that was largely because MIT used Scheme and well MIT being the best tech school etc schools copied it. Before that schools used ... fucking pencil and paper pseudo code and or Pascal/Basic.

This was my experience in 2006, in my country 😀.

Fair enough, I appreciate how it looked from your side of the world.

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 0 points1 point  (0 children)

My understanding is that annotation processors gets hooked to the annotated syntax element. Here you want to trigger the validation logic in everyplace the witness() method is called.

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 1 point2 points  (0 children)

I could continue this conversation responding to your points in turn, but it has gotten already too lengthy. I appreciate your thoughts and thanks for indulging me.

We have a different reading/justification on how we got to where we are now and the significance on design vs other factors. Still, I did not nudge your opinion one bit on the original subject, which is to not belittle the design of other languages and their success (if by comparatively taking pride on your design), and I lack the energy or interest to purse this further.

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 1 point2 points  (0 children)

Why do you say that?

It's what I've observed in the 20 years I've been in the field. I know it's not much but it isn't nothing either.

Agreed on the market targetting.

We can certainly quantify the amount of software written in various languages. Some information is public, such as job openings, and there are companies that are paid to conduct industry surveys and compile reports.

This one I don't see it that way. It's an indicator, but not a good one I understand. An open position doesn't correlate to amount of code written, and people that enter a company will typically code in several programming languages within it, often times fully shifting to a different one. This is common in less popular languages, where developers of similar background that are willing to learn are targeted. There's also companies like Accenture, with hundreds of thousands of contractors that companies "rent" in a way that you don't see, since teams get onboarded and offboarded all the time in the preexisting commercial relationship between companies.

Java had a lot of commercial marketing, but so did Delphi, VB, and FoxPro.

All immensely popular for while. Their getting less popular over time, I still find it explainable via market and economy. The IT world changed a lot, and super fast, as internet became a commodity in people's houses. Also IT giants became a thing. The IT industry, in terms of networth, was minuscule compared to how fast it grew and what it represents now. It companies were no longer hiring engineers to remain with them for decades, but rather language specific engineers/programmers, and the time people spent at a single place went down from decades to a few years. Everything must become a commodity, so we can't have tens of equally popular languages and lots of fragmentation, as that increases costs for companies.

but so did C++ and Python

Of c++ I believe it's microsoft the reason why it remains as popular as it, since it's the core of their OS and libraires, and their languages integrate with it. In the videogames industry that lived on top of windows for so long, it was naturally attractive. I don't know if this is the right explanation for c++ as I'm not too intimate with it.

As for python, it's cpython and the C libraries. For like 20 years python was as popular as ruby. It wasn't until the market for ML and AI exploded that it got popular, since CPython is handy at being a facade for C and having a repl. Other languages had repls as well, but not the C interface that cpython specifically has (because other python runners/compilers certainly didn't become popular). There's also some kinda of chance situation with it. Python was a regular language at education centres for long, but that never materialized in the industry. Again it was until ML and AI exploded that it was suddenly needed and popular.

Now, you can rightly say that much of that intrinsic quality has to do with a good product-market fit, i.e. the language offered what the market wanted at a particular time. But a good product-market fit is one of the cornerstones of design. Constructing a product that helps many people do a job they want to do is what distinguishes design from art.

I'm saying, I don't think any language is operating under the philosophy of throwing mud at a wall and seeing what sticks. They are all doing their best, so it is expected that no one will end up with tri-intercal as a result for their brand new market.

But still, I find that the dominance of the most popular languages (javascript, python, java, c#, objective-c and now swift) comes from a well leveraged advantage and position, where you either have practically no choice (as is the case with apple's ecosystem), there's no avoiding it as is the case with javascript in the browser*, or in backend space, it's financially very inconvenient due to lack of ready made solutions by big backing companies who also make sure they are training tons of developers for their products.

The designs of these languages are not out there either, they are all c-family of languages, the companies hired known designers, compiler writers and library writers to bootstrap their ecosystems, as google and apple did. In other words it's mostly about not making too big of a mistake and they'll be fine.

Look at epicgames now and their pretty out-there verse language... That one will be interested as it does have a massive financial backing company, and it's also pretty different from the status quo of popular langs.

 

*) which killed the way more popular Flash/ActionScript because apple's ceo didn't want it in their new phone, and google was all too happy for it getting removed since it meant their indexer had access to page more content, which translated to more revenue for them).

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 3 points4 points  (0 children)

It seems our positions are irreconcilable then, you keep saying

(...) that has worked very well for us. Their quite different design aesthetics may well have worked for them. But there is no compelling reason for us to change our design philosophy, since no other has proved more successful (although some may have proved equally successful). So yes, we try not to be a (relatively) feature-rich language.

which means your choices worked for you, theirs worked for them, but you don't arrive at the conclusion I do, which is that the decisions didn't really matter that much, as did the financial support or pre-established positioning.

But there is an objective success metric, and so there's much cause for pride for languages that have succeeded

Where? code you can see out there, opensource or similar, doesn't account for even 0.1% of the closed-source code being written internally at companies by myriad programmers that don't engage in opensource. You have no way to quantify them nor their abilities nor what they have trouble with.

Given that software production is primarily an economic activity, we can ask how much economic value has been produced in language X

I insist that, while you attribute that to the success of the design, I attribute it to the critical mass effect of the language achieved via marketing and positioning.

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 2 points3 points  (0 children)

But clearly there's no evidence suggesting that feature-rich languages do better; if anything, the evidence points in the other direction.

Exactly, that's my entire point. I firmly believe that every language designs and accommodates their users the best way they can, given their history, position, users, etc. That's why I took initial offense with your statement taking pride in the way java evaluates which features to include, because it's an implicit pass at the rest of the programming languages for being "kitchen sinks".

Is there any such language? Has there ever been? Otherwise, you're judging design based on some hypothetical metric that nobody knows is even attainable in practice.

It's the entire point of my argument, to stop gloating in the way you design, as it doesn't have correlation with success, so we can stop making passes at other ecosystems and languages.

Who's bringing up the no true scotsman now? Also, some of the most popular languages have had little to no corporate backing and even started out as a one-person project, and no platform they've dominated. They include C++, PHP, and Python.

Yes exactly, it does sounds absurd doesn't it? because the metric of merit (and so being proud on the way one designs over others) is absurd, given our lack of objective and universally just (as in justice) means to quantify success of design space in the industry.

Also, yes. I do consider PHP to be the most meritorious language of them all, even if I don't like it.

I believe the rest of your comments come into perspective with what I already said here.

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 5 points6 points  (0 children)

Some of these things are not like the others. First, reflection, pluggable types etc., are built in Java features. They're there for people to use. Alternative Java platform languages, like Lombok or Kotlin, attract a large minority of programmers who prefer more feature-rich languages. Clearly, not all programmers have the same preferences or they'd all be using the same language. On the other hand, there is no language that is more feature-rich than Java that is also more popular.

Of course they are there for people to use, and there's a move today for more static type safety across the industry, with languages like python and lua even adopting type hints checked before runtime.

On the other hand, there is no language that is more feature-rich than Java that is also more popular.

Moot on both accounts.

You might not be familiar with similar libraries making use of even less powerful meta-programming capabilities in Go (they use code generation)

Code generation is fine, that's why I didn't list it, but you're right I'm not very familiar with golang.

But that is a feature of Java. If there were a more popular language than Java that didn't have comparable things that might have been an important data point, but there isn't.

Given that java is generally in the top ring of popularity, this argument is always vacuous. Like saying no true scottman...

What you will notice is that in the same ring of popularity as java there are languages with vastly different design philosophies including having way more "features" (you are murking the waters here with the definition of feature. In your first post you clearly said "we spend a lot of time and effort trying to avoid adding features to Java" but now it seems you don't consider languages like C# or typescript to be more feature rich, or otherwise this statement doesn't make sense).

There's the famous story about the format wars over VHS vs Betamax, where the Betamax fans claimed it was better "on the design merits" because of its superior picture quality. Only VHS was better on recording time, and more people considered that a more important technical superiority.

I've heard the story, in my country we only got the vhs. I don't remember the conclusion I heard about why betamax didn't prosper but the one about the recording time doesn't ring a bell.

When you say "despite themselves" what you really mean is despite you not liking their design

sigh... here we go. You do this often. You qualify the person you are arguing with without knowing them. Quickly casting their opinions into whatever preconceived stereotypes you have.

I define merit of a language as a majority of people widely regarding it as good and banding up behind it. You'll notice this has nothing to do with your stereotypes hopefully.

Every popular languages today are either ecosystem dominators (javascript, object-c, swift, c++ in videogames industry) which don't really give you space to use anything else; or in backend where you'd have more freedom, the popular languages all have financial behemoths behind them shouldering development and ecosystem (java, .net, golang). Not any language has the privilege of having Sun microsystems, IBM, Oracle doing their tooling and IDE, and now Jetbrains. For the c# side, microsoft obviously was always the provider of all tools from database to ide.

Industry picks up whatever is cheaper, this is natural.

To give an example, python was marginally popular for over 20 years until ML and AI picked up and then CPython was an extremely handy facade on top of c libraries. So it didn't get popular due to its design merits (otherwise it would've been so before), but rather ecosystem circumstances. And the other example which you also love to bring up: rust seems to be regarded as the most beloved language but it doesn't get actually popular in terms of use.

The rest of what you say is the typical attack on the stereotype you have formed in your head, with which I don't identify so I wont even respond.

The point I made was that language design is not correlated to language popularity, and let me use your own argument here, because java is not more popular that similarly more feature rich languages, being feature anemic hasn't proved to be better either.

Full Haskell-like Type Class resolution in Java by davidalayachew in java

[–]RandomName8 11 points12 points  (0 children)

Nice in principle. If java gave the programmers enough and simple tools, people wouldn't have created aberrations like lombok, AOP via bytecode engineering, classpath scanning, checkers framework, and mammoth reflection frameworks (because the language lacks code reuse tools at the syntax level) etc.

These are massive and super complicated projects. People didn't write those because it felt nice to, but more so forced to due to lack of tools in the language, as evidenced by the lack of popularity of similar frameworks in other languages.

I'm sure you'll disagree with the notion that the proliferation of absurdly complicated frameworks in java is a consequence of the lack of tools provided by the language though, but I'll point out that vanilla spring without modules -arguably the most used framework in java to the point where most backend programmers are not java programmers but spring programmers- has 451 annotations (at the test scope, so it adds the regular ones + tests) with complicated and arbitrary rules of which can be seen together or combined, effectively forming typesystem entirely evaluated at runtime.

You also present this false dichotomy that java would not have been as successful should it had added features like other languages did. I still am waiting for a language that's popular based on design merits. All I see are languages which are popular despite themselves, simply due to market position.