@alexelcu@social.alexn.org
@alexelcu@social.alexn.org avatar

alexelcu

@alexelcu@social.alexn.org

This profile is from a federated server and may be incomplete. Browse more on the original instance.

alexelcu, to Java
@alexelcu@social.alexn.org avatar

With #Java's evolution (discriminated unions, pattern matching, virtual threads), are #Scala / #Kotlin still worth it?

Scala & Kotlin have a culture of doing things at compile-time, the former more so than the latter.

This yields safety & expressiveness, and is reflected in features that Java will never implement, in platforms that it will never target well, or in paradigms it will never embrace.

Java is still Java, and you're stuck with Spring, Hibernate, and Jackson, sorry.

alexelcu, to random
@alexelcu@social.alexn.org avatar

Twitter's domain is now officially x.com — this is probably the worst rebranding I've ever seen 😄

alexelcu, to programming
@alexelcu@social.alexn.org avatar

In principle, I know the advantages of dynamic type systems — treating code as data, or inventing types on the fly, based on runtime conditions. In practice, I've never seen any good use of dynamic type systems, only downsides.

Everything good about dynamic type systems has to do with tooling. The culture of simplicity, the REPL, the scripting, creating types based on external input (DBs, JSON files), etc. These are all great, yet nothing that a static language can't do better.

#programming

alexelcu, to programming
@alexelcu@social.alexn.org avatar

It doesn't matter if people disagree on 4-spaces indentation for 3 because:

‣ Most of you haven't worked with “optional braces”, yet;

‣ When you'll do, and frustration builds up, my SEO-optimized website will be there to whisper in your ear 👨‍👦

alexelcu, to programming
@alexelcu@social.alexn.org avatar

I still can't wrap my head around the #Lichess chess server being built in Scala 3 and using Typelevel libraries, in an #FP style. This chess server is insanely popular.

https://github.com/lichess-org

#Scala #Scala3 #Typelevel

alexelcu, to random
@alexelcu@social.alexn.org avatar

Apache #Pekko is replacing #Akka in Play Framework ❤️😍

I really wish Lightbend well, I hope they thrive, but blowing up the FOSS ecosystem around Akka was a foreseeable consequence of its licensing turning proprietary. All FOSS projects will predictably move to Pekko, and Pekko isn't a drop-in replacement (due to the inevitable change in packages), which puts Akka in a very tough spot.

N.b., version 2.9 is probably the last release with support for Akka.

https://github.com/playframework/playframework/releases/tag/2.9.0-RC2

alexelcu, to programming
@alexelcu@social.alexn.org avatar

“In #Scala, Cats-Effect's Resource is too difficult, and all those implicit params and tagless final makes code hard to read 😣”

Goes back to #Java:

https://quarkus.io/guides/cdi-reference
https://docs.spring.io/spring-framework/reference/core/beans/dependencies/factory-collaborators.html

👹 #op

alexelcu, to opensource
@alexelcu@social.alexn.org avatar

Having a domain name and website for your project is great. You don't want #GitHub to own the entire online identity of your project.

But you should stay away from the .io TLD:

  1. It's a country TLD that's disputed, and while it may not go anywhere…
  2. It's getting more and more expensive, which for #FOSS projects is a problem.

The best TLD for FOSS projects is probably the .org TLD.
Or, if stuck on .io, at least pre-pay it for years in advance.

#TLD #domains

alexelcu, to mastodon
@alexelcu@social.alexn.org avatar

Pro-tip for people self-hosting their own #Mastodon instances…

On small servers, it can get lonely. For instance, following a tag (like #scala) will yield no results from people you don't already follow.

The solution is to subscribe to a “relay” (Settings > Administration > Relays), but an unfiltered stream brings a lot of junk, also increasing hosting costs.

For me, the better solution is this follow-only relay that can be filtered by tag or instance:

https://relay.fedi.buzz/

#Mastoadmin

alexelcu, to programming
@alexelcu@social.alexn.org avatar

Writing an article on how awesome #Scala3's support for type-classes is, for a general audience, but it's a hard to write article 😒 #Scala

alexelcu, to programming
@alexelcu@social.alexn.org avatar

“Use the best tool for the job” is bullshit advice, a lazy form of persuasion, used to justify crappy tools.

I'd rather not have to learn new tools for every job, I want multipurpose tools that are useful for many jobs, that I only master once and use indefinitely, that can adapt to changing reqs, that are not a fad destined to become obsolete in the next news cycle.

“When all you have is a hammer…” hell yeah, give me a good hammer, let me view the world as a bunch of nails!

🔥🔥🔥
#programming

alexelcu, to opensource
@alexelcu@social.alexn.org avatar

#FOSS / #OpenSource / #FreeSoftware is not just access to the source code.

It's also the right to fork, in case you don't agree with the direction of the project. Or to profit from someone else's work without paying them a dime. What distinguishes FOSS from proprietary software is that FOSS gives users real ownership.

It's totally OK for Amazon or Oracle to take your work and repackage it. If you're not OK with that, then FOSS may not be right for your business.

alexelcu, to programming
@alexelcu@social.alexn.org avatar

Scala has Type Classes as first-class citizens.

In a narrow sense, that's because instances get passed around as values. By comparison, Haskell devs talk about sometimes preferring “dictionary passing style” instead of typeclasses. In Scala, it's the same thing.

Ofc, Scala can't really force global uniqueness, AKA “coherence”, which is important for making data structures reusable & ensuring the correctness of operations on that data…

1/2

alexelcu, to programming
@alexelcu@social.alexn.org avatar

How is IntelliJ IDEA for Scala 3 these days? Does it work?

alexelcu, to programming
@alexelcu@social.alexn.org avatar
alexelcu, to python
@alexelcu@social.alexn.org avatar

#Python has batteries included in its stdlib, but when those batteries aren't enough people have to resort to installing pip + virtualenv + pyenv, alongside the OS's native packager, which they still need for native dependencies.

In #Scala, for writing all kinds of scripts, with all sorts of dependencies, all you need now is Scala CLI; which can also help with distributing your script as a JAR, or as a native executable:

https://scala-cli.virtuslab.org/

Checkmate, Atheists!

alexelcu, to programming
@alexelcu@social.alexn.org avatar

Out of the Alt-JS languages I've played with, .js seems to be the best.

Given it's probably not widely adopted, its maturity is surprising. E.g., ScalablyTyped can convert TypeScript definitions, and actually works. Interop is good. And the compiler is, dare I say it, pretty fast compared to 2–3 years ago. Scala 3 also helps. E.g., it has untagged unions, just like TypeScript.

I'm surprised that it's in better shape than , for all its multi-platform marketing.

alexelcu, to random
@alexelcu@social.alexn.org avatar

One thing I don't get in IDEs is the warning that I'm shadowing another variable name.

Bro, name shadowing is healthy, as it can prevent errors. You should be giving me a warning when I should be shadowing a name, but I'm not.

#op

alexelcu, to random
@alexelcu@social.alexn.org avatar

Some people have a clear pattern of:

  1. Crap on other people and solutions to gather attention 💩

  2. Then spread messages of unity and collaboration, to wash away the negative perception of personal brand;

  3. GOTO 1.

The Internet still amazes me.

alexelcu, to mastodon
@alexelcu@social.alexn.org avatar

This is a cool browser extension that collects #Mastodon profiles from the websites that you visit. It helps to find the people whose blogs you follow:

https://streetpass.social/

alexelcu, to internet
@alexelcu@social.alexn.org avatar

I no longer want online social networks that are creating proprietary & locked gardens. Out of the old guard, I only have a #LinkedIn account left.

#BlueSky is supposedly interoperable via its “AT protocol”. Thus far, there's only a single instance of it. If #BlueSky really wants to be a good Internet citizen, it should implement #ActivityPub for integrating in the #Fediverse.

If they do it, I see no reason to move. And if they don't, I see no reason to move either.

1/2

alexelcu, to random
@alexelcu@social.alexn.org avatar

Scala Native 0.5.0 released. Introduces multithreading and delimited continuations 😍

https://scala-native.org/en/stable/changelog/0.5.x/0.5.0.html

alexelcu, to programming
@alexelcu@social.alexn.org avatar

Martin Odersky's thoughts on "Lean Scala"

What do you think? #Scala

https://odersky.github.io/blog/2024-03-21-post.html

alexelcu, to programming
@alexelcu@social.alexn.org avatar

The breaking API changes in Cats-Effect 3.5.x still hurt.

The underlying issue is that wrapping non-cancelable APIs (e.g., #Scala Future) is really common, and at the same time you can't block cancellation — some leaks go with the territory of using Future in the first place. Most futures are not linked to cancelable stuff, many are simply OK to forget.

IO.fromFuture now has the wrong default, at least when integrating with some common APIs like Akka Streams.

alexelcu, to programming
@alexelcu@social.alexn.org avatar

We have static #programming languages that are both adequate for the server-side and can target the client-side (Javascript, WASM, native, etc), such as #Scala, #Kotlin, #Rust, #FSharp, #Typescript.

The biggest advantage of using the same language is that you can share code, starting with the data models, alongside serialization, and parsing/validation rules. The API can thus be easily kept in sync, and a server-side test is also relevant on the client-side.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • mdbf
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • lostlight
  • All magazines