I've been working a bit with Clojure, and found their concept of truthy/falsy values quite refreshing for a dynamic language: Only false
and nil
are considered falsy values, everything else is truthy.
None of that confusion of "Is 0 true or false? What about the string "0"? What about empty strings and empty lists?".
Maybe this will bite me in the future, but so far it looks like a good decision.
On that note, I've also learned that Java's Boolean
actually provide (now deprecated) constructors that break reference equality (and in turn break Clojure's checks).
Namely new java.lang.Boolean("true") eq new java.lang.Boolean("true")
is false while the recommended alternative java.lang.Boolean.valueOf("true") eq java.lang.Boolean.valueOf("true")
is true.
I guess it makes some sense, but I always thought that there was no public Boolean
constructor.
“Join the Open Web”
Now that you've seen the dangers of social media, the question is, what are you going to do about it?
Just released Minart 0.6.2 with experimental support for vector graphics (the 3d engine stuff I've been showing) and faster convolutions.
Here's a quick demo of Scala-kun made with vector shapes and motion blur: https://gist.github.com/JD557/4855c0ea10a7b777d32a1dc46db4d4db
With Windows 10 reaching EOL and with all the hype about Steam on Linux, I finally decided to format my old desktop and install PopOS.
I haven't seriously used desktop Linux in a while (almost a decade), however I used PopOS in a VM a while ago and was quite happy. I also wanted something that "just works", and PopOS promised just that.
Overall and I've got to say... I'm a bit disappointed with the current status of desktop Linux. I've got everything working now, but there's no way some things would be acceptable for a non-technical user.
I was mostly surprised with Flatpak and the amount of tweaks that I have to do with Flatseal... For something that seems to be the recommended install method in the Pop!Shop, I would expect most things to just work . Instead, by default:
-
Steam doesn't let you setup alternative install directories
-
VLC doesn't have GPU acceleration
-
Syncthing (via Syncthingy) cannot run in background mode
Also, getting Steam to install games to a separate drive was such a pain in the ass (mostly because steam silently fails, but also due to some quirks with auto-mounting)...
Hopefully things will get better in the near future, but 2024 is clearly not yet the year of Linux desktop.
Quick update on the rasterizer thing. I got the a rotating Stanford bunny (~70k tris) rendering at 10-15 FPS (~30-35 FPS if static).
I think this is as far as I'll go for now.
By the way, for those that want to try to implement something like this, the implementation was heavily based on https://jtsorlinis.github.io/rendering-tutorial/
A very short and sweet tutorial on rasterization, with some nice interactive demos.
I had a long weekend, so I decided to take a quick look onto adding geometric primitives to Minart (inspired by https://github.com/JD557/minart/issues/514)
After writing the rasterizer, I couldn't resist to give it a spin (pun not intended) with a basic 3D software renderer.
I was expecting to be able to draw ~10 polygons on screen, but it went better than expected. My demo was running ~500 "flat-shaded" quads (I cheated a bit on the shading) at more than 60 FPS with no issue (it started to struggle at about 2k).
While not very impressive for a 3D engine, that was never the goal. I think this should be more than enough for basic polygon drawing use cases.
Apache Pekko 1.1 released ❤️
https://pekko.apache.org/docs/pekko/1.1/release-notes/releases-1.1.html
Over the last few weeks I've been playing around with building a simple caffeine tracker app for Android app with Scala.js and Tyrian.
It's not super polished, but it was a fun experiment: https://github.com/JD557/coffee-tracker
I also wrote a blog post detailing the experience:
https://blog.joaocosta.eu/articles/8cd240f/writing-an-android-app-with-scalajs
Just signed the Stop Killing Games EU Citizen's Initiative.
This initiative calls to require publishers that sell or license videogames to consumers in the European Union (or related features and assets sold for videogames they operate) to leave said videogames in a functional (playable) state.
Specifically, the initiative seeks to prevent the remote disabling of videogames by the publishers, before providing reasonable means to continue functioning of said videogames without the involvement from the side of the publisher.
The initiative does not seek to acquire ownership of said videogames, associated intellectual rights or monetization rights, neither does it expect the publisher to provide resources for the said videogame once they discontinue it while leaving it in a reasonably functional (playable) state.
More info: https://www.stopkillinggames.com/eci
Your help is welcomed 📝
How extensively is Scala used in the public sector?
We are collecting all examples to make a strong case to apply for funding to help maintain the critical infrastructure.
Share with us by filling out the form or by replying!
https://docs.google.com/forms/d/e/1FAIpQLSfyqXADVCCiP6PBxEfr6co4ty434o2g84viZ6qWGXk7ZuxIOw/viewform
Exciting news, #ScalaCLI 1.4.0 is out! 🔥
Among other things, it updates #ScalaToolkit to default to 0.4.0, which now makes it possible to use it with #ScalaNative 0.5.x.
Scala Native has also been bumped to 0.5.4, by the way. (1/3)
Scala 3.5.0-RC2 is available for testing — the banner change is the bundling of scala-cli as `scala` https://contributors.scala-lang.org/t/3-5-0-release-thread/6666/25
I was checking out HTMX (downloaded the docs to read during the flight) and decided to add some sprinkles to this blog.
I want to keep this site working without any JS, so I just went for the basic hx-boost
and hx-indicator
.
I'm amazed by how well "It Just Works".
It's obviously not as nice as a more complex JS integration, but it's such a quick win that I might start using this more often.
Here's RokRok, a Gopher Client written in Scala: https://github.com/JD557/rokrok
This is mostly a toy project to try out Minart + InterIm + Scala Native Multithreading, so don't expect too much.
I do plan to work on it a bit more, as it is a nice way to test InterIm features.
Just released InterIm 0.2.0, with Scala Native 0.5 support, implicit component layouts and some critical bug fixes.
https://github.com/JD557/interim/releases/tag/v0.2.0
I'll try to update Spaeti and finally release my Gopher client demo using this version soon.
ANSOL rejeita "medidas de segurança" da EMEL
https://ansol.org/noticias/2024-05-13-ansol-rejeita-medidas-seguranca-emel/
No more monads! Direct-effects explained:
https://inner-product.com/posts/direct-style-effects/
I wrote up the what, why, and how of direct-style effects using Scala 3. It's a chonky piece but I think it's reasonably comprehensive as a result.
If you hate monads, you should love this! If you love monads, you should still love this, because the monads are still there, disguised as continuations, watching and waiting...
Finally released the final version of Minart 0.6.0: https://github.com/JD557/minart/releases/tag/v0.6.0
This version drops Scala 2 support and updates Scala Native to 0.5. The Minart Pure module was also removed.
This version has been in the oven for a while, so it includes a ton of bug fixes since 0.5.3.
Just released Minart 0.6.0-M3 with Scala Native 0.5.0 support.
https://github.com/JD557/minart/releases/tag/v0.6.0-M3
This version might be (even) more unstable than usual, but I wanted to get it out ASAP to find as many bugs as possible before the proper 0.6.0 release.
Looks like Manning has some free books, courtesy of some sponsors at https://www.manning.com/corporate-splash
I've read "Data Pipelines with Apache Airflow" and can definitely recommend it if you are into data engineering and want to learn more about Airflow data pipelines.