101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

484
active users

#vala

0 posts0 participants0 posts today

GSoC update! @AlleyCH is diving into the Vala compiler to bring native JSON (de)serialization support.

She has been exploring the full compilation pipeline and is working on a new valajsonmodule.vala. Adding native support will make it much easier for Vala developers to work with structured data out of the box—less boilerplate, better developer experience. ✨

Read the full blog post:
alleych.github.io/gnome/compil

Hello World :) · Compiler KnowledgeIntro
Continued thread

When using `requires` and `ensures` together, your method provides a complete guarantee or “contract” 🤝

```vala
double calculate_average(int[] values)
requires (values != null)
requires (values.length > 0)
ensures (result >= get_minimum(values) && result <= get_maximum(values))
{
int sum = 0;
foreach (int value in values) {
sum += value;
}
return (double)sum / values.length;
}
```

Continued thread

Postconditions specify what must be true *after* a method executes. They represent the guarantees that the method makes about its results:
```vala
double normalize_percentage(double value)
ensures (result >= 0.0 && result <= 1.0)
{
return double.min(1.0, double.max(0.0, value));
}
```

The special variable `result` is the return value of the method 🧠

Continued thread

Preconditions specify what must be true before a method executes:

```vala
double calculate_square_root(double value)
requires (value >= 0.0)
{
return Math.sqrt(value);
}
```

And you can add as many as you like!

```vala
int get_element(int[] array, int index)
requires (array != null)
requires (index >= 0)
requires (index < array.length)
{
return array[index];
}
```

Check this out: Vala has “Contract Programming” features that make it super simple to define preconditions and post-conditions for methods! You can add `requires ()` and `ensures ()` clauses to any method to automatically return null and avoid garbage input or output 🧵 👇

Despite my body aching and being sleepy all over, I managed to work out a small #sdl3 #Vala bindings update.

I have now implemented the SDL3_gfx library! This is a special small library that implements:

* Some special primitive drawing routines, like circles, pies, beziers, etc.
* A simple framerate manager.
* Some algorithm filters (I still need to understand how these work to make proper samples).

But in any case there are samples for framerate and primitives. Enjoy!

We now have more than 1000 followers! A big thank you to those who joined us! We are going to achieve more and more, the project is going very well, the next stable release will have _a lot_! Happy #vala coding to everyone out there on their own projects, we love to support you and will continue to do so!

BUT, I now call here for help to manage this Mastodon account. I, @lw64 have managed everything so far, but I don't have time anymore. I will mentor everyone who wants to contribute, its easy!

Doing marketing on #Mastodon is so fucking much work. In almost a year, I couldn't even double the follower count of @vala_lang (now almost 1k)
And engagement is still not that much. Rarely there are replies to our posts.
We are not a business, we don't want growth growth growth, we just want to build our own small community in the fediverse. Isn't that what it is meant for?
Without a community the project will die. #Vala is an open source project like many others.

I need a break.

Hello, anyone interested in helping out with this mastodon account?! 😃
Anyone that is a bit active in #Vala can do it! It is really not difficult, and the more people contribute, the smoother it goes!
Social Media is really important for a project like this, so I hope we can continue like this, soon reaching 1k followers!
Whoever is interested can comment here or in discord or matrix!

So I just moved the #SDL3 #vala vapis to @Codeberg migrating from Github was actually pretty easy!

codeberg.org/edwood-grant/sdl3

I also added a new GPU rotating colored cube example. So this makes the whole thing a bit more complete 😛.

I will probably just make the github repo either a mirror or just leave a message on top pointing the the actual repo in codeberg.

I mean it makes sense to have this project outside of big tech. I feel that, at least for me, is important.

Can I get a @vala_lang FLOSS hacker interested in this fine newcomers-difficulty-level UX issue to solve in #gitg?

I tried starting to fix it myself a year ago and couldn't figure out how to get past my initial attempt to check the horizontal vs vertical orientation of the layout. I could try again (if I'm desperate enough), but would need a pair programming session with a #Vala enthusiast… or such an enthusiast could probably solve it by themselves in half an hour: gitlab.gnome.org/GNOME/gitg/-/

GitLabAbility to turn off unneeded columns in the history view (or automatically turn off non-essential ones when width is constrained) to reduce visual overload and horizontal scrolling (#424) · Issues · GNOME / gitg · GitLabDue to commit 6593323c, version 45.alpha from flatpak...