Recently, Lorenzo Gabriel released https://github.com/lolgab/scala-native-jdbc, a JDBC implementation for Scala Native, which allows libraries that rely on JDBC (such as Scala-SQL) to be used in a native environment.
I've been slowly playing around with adding DuckDB JDBC compliant connector to it, and it's looking pretty nice. I did have to use some trickery to avoid hitting issues with SQLite/DuckDB dialect mismatches, though.
I plan to open source this eventually, but first I want to make some more tests and clean the code (there's quite a few manual memory management involved).
I also need to figure out how this should be distributed... On MacOS DuckDB is distributed via a dylib
with an rpath, which is a bit annoying to use on Scala Native... TBD
Last Christmas my brother and I purchased a 3D Printer (Bambu Lab A1 mini).
Even though I haven't been an heavy user, it has already proven quite useful, especial for custom supports and organizers that one would have an hard time finding in a store.
It feels quite magic to be able to code something in OpenSCAD and have it appear in the real world.
Today I built a couple of supports for some Krakebs that I had lying around. I think they turned out pretty cool, so I uploaded the model to MakerWorld.
Not that I think that anyone will print that, but I should build the habit of sharing some models.
For some reason, Youtube has been recommending me a ton of wave function collapse videos, so I decided to play a bit with it for map generation.
I think my code still has some bugs, but I'm happy enough for now. Maybe I'll pick it up in the future if I decide to use it for an actual game or demo.
Compiler Explorer (https://godbolt.org/) now supports recent Scala 3 versions
It's a nice convenient tool for seeing what JVM bytecode your Scala code turns into
PR bringing versions up to date: https://github.com/compiler-explorer/compiler-explorer/issues/5405
I've been working on a collection of small minigames (inspired by 1x111) with simplistic graphics (inspired by He is Coming)
It still needs a bit more polish, and I want to add some more games before releasing it, but it's cool how easy it is to write simple games with some very basic primitives such as AABB collision. The code for some of the games is surprisingly short.
been learning and thinking about the Burrows-Wheeler transform and so far my conclusion is "what the fuck?"
https://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform
So! It's been ages! For releases, 2024 was my 'lost' year as I slogged through the surprisingly hard problem of building a component UI system from scratch.
But I'm pleased to announce a raft of new releases. If you want to do some weird stuff with #Scala, look no further..
SDL3 is officially released! https://github.com/libsdl-org/SDL/releases/tag/release-3.2.0
https://code.europa.eu , managed by @EC_OSPO now holds more than 200 #OpenSource projects with a total of 755 code repositories covering:
🩺 healthcare
💻 Big Data
🤖 AI
💶 procurement
🥦crop diversity
... and much more!
All open to software developers to use freely 👉 https://europa.eu/!pX8987
For the #Scala crowd —
For a while now, we've been debating the idea of adding a new bit of syntax for really-concise collection literals; most other languages have one, but we don’t.
That discussion has now been formalized into a Pre-SIP, a formal proposal being actively considered by the community: https://contributors.scala-lang.org/t/pre-sip-a-syntax-for-collection-literals/6990
I like the proposal, personally; y’all might want to give it a look if you have opinions about such things…
Published a port of https://github.com/nayuki/QR-Code-generator to Scala, cross-compiled to JVM/JS/Native.
It's now easier than ever to generate QR codes in Scala.
Check it out at https://index.scala-lang.org/jd557/qrgen
Today I woke up with a BIG surprise! ❤️
Today raylib is the most popular open source Game Engine! 🤯
A simple C library.
In year 2024.
I can't wait for 2025! 🚀
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