veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

202
active users

#glowdust

0 posts0 participants0 posts today

Have you ever looked at pattern matching in #Rust and thought

"I really wish I could pattern match on expressions"

Well, I did. And I have my own language to mess up.

radiki.dev/posts/match-and-bin

I'm interested to know why _technically_ this would be a bad design choice for Rust. But I think it makes sense for a database query language.

If there is interest, I can do a follow up on how I implemented this.

radiki.dev · A step beyond Rust's pattern matchingGoing from “I have no clue what I’m doing” to “Hey, it worked!”, one weird idea at a time

Just a quick design note for #Glowdust

In #Rust, you can do

```
if let (one, 2) = (1,2) {
print!("one = {}", one);
}
```

This will print, because 2 == 2 🤯 and "one" is assigned a value.

But this:
```
let three = 3;
if let (one, three) = (1,2) {
print!("one = {}, three = {}", one, three);
}
```

is misleading - the "three" in the pattern will shadow the "three" outside, so the pattern will match again. Bound variables can't affect pattern match.

But what if they could?

#Rustlang

1/3

Chris here radiki.dev/posts/functional-qu takes an interesting take on rethinking #databases #queries. In #Glowdust functions are used for storing data. Together with user defined types and functions on those, he presents a way to build higher-order ~functions~ queries by folds. Now this is especially useful by anything recursive.

Until now, I found #Glowdust interesting, but hard to grasp.
That what @chrisg now presented makes it tangible for me.

radiki.dev · Database queries, functional styleCan your database do folds? Mine can (sort of), and I’m gonna brag about it.

#Glowdust is licensed under the GPLv3 and will remain free and open source forever. No open core, cloud-only or other shenanigans.

It is what I am doing full time, without any corporate or other funding and I want to maintain this state of affairs.

However, expenses are starting to come up and demand attention.

If you can afford it, and care to help me with this effort, consider a donation:

liberapay.com/chris.gioran/don

LiberapayDonate to chris.gioran via LiberapaySupport chris.gioran's work with a recurrent donation.

New #Glowdust features dropped today:

1. Return is finally a statement, which means you can have it outside of blocks in queries

2. Statement blocks, so you can have updates from your queries and still have them make sense, which is always good

3. An experimental `!!` operator, that makes an atom out of a statement block, which is weird but sort of useful (this will probably go away soon)

Enjoy: codeberg.org/glowdust/glowdust

Codeberg.orgglowdust/README.md at masterglowdust - The core for the Glowdust DBMS

This week I am working on a new operator for #Glowdust, which for now has the symbol "!!"

It is meant to indicate that the user purposefully left a block without a return value.

Background:
In Glowdust, a query can contain an inline block atom that can return a boolean value which will allow the query to proceed if true, otherwise it retrieves the next value from the cursor. For example:

```
match f(x)->(y), {x>y}, println(x)
```

only prints x's that are larger than their y's (1/4)

I want to add a #codeofconduct on #Glowdust and I am looking for templates or examples.

I have searched on Mastodon under various hashtags but I haven't found anything so far. And with web search being what it is, I can't find any examples of actually successful, well liked, enforceable CoC cases.

Any pointers would be more than welcome.

And while we're at it, resources on how to enforce said CoC would also be very handy.

Today I fixed something that's been bugging me in #glowdust - queries starting with function calls would not stop the pipe if they evaluated to false.

Well, now they do. Got some nice refactorings out of it as well, and the `return` keyword is starting to work nicely too.

Release time:

#Glowdust 0.0.1 is out

codeberg.org/glowdust/glowdust

It is a new kind of DBMS, with a functional-like data model and query language - the README has a description, example queries and a small tutorial.

You'll see that it is not nearly done, but I still went ahead and released anyway. A short blog post explaining this choice is here: radiki.dev/posts/glowdust-rele

It's licensed as GPLv3 and it's written in #rust

Codeberg.orgglowdustThe core for the Glowdust DBMS
Continued thread

It needs to be designed in, as a bespoke goal, from the start. And I think that's doubly true for #glowdust, which is built with #asmalldbms principles, where usability is fundamental.

Which brings me to my current work. I think that, even though the current json based store for glowdust is "experimental", it must work with future versions, which will have more efficient file formats and different execution engines.

Which is very, very hard. But that's architecture for you.

2/2