You are reading content from Scuttlebutt
@cryptix (yet another feed) %K/XMsjI8+OdsjCI/lckrVUvVBZzZaKonig3brrMzv38=.sha256

After dabbling with #Elixir for a bit last year and realizing that I had to dip into #Erlang as well, I got overwhelmed by the thought having to learn two languages and stopped learning either… 🙈

Now I’m between jobs (a few detail over here) and gave erlang a fair chance and I really like it! Reading https://learnyousomeerlang.com was pretty easy because I at least remembered all the basic types from elixir last year. Just had to learn the syntax for the most part.

I really really like how concise it is and embracing exceptions is refreshing after all those years of if err!=nil { return err } which you usually have after each statement in Go. Check out this comparison of a basic WAV file reader I ported from Go to Erlang. I know get why people praise its ability to destructure binary formats so well. It’s brilliant.

screenshot of two snippets of code. over a 100 lines of Go and about 40 in erlang, bascially offering the same functionality.

At first I could implement some parts of http://willowprotocol.org which has been haunting me like Casper the friendly ghost, after having met @gwil and @Aljoscha at p4p in Berlin earlier this year. It felt like a bit too tough as a mountain and I didn’t really know where to start. I wanted something more immediately useful instead of stating a model train that I don’t feel comfortable sharing with others.

So I instead picked up cable last week, Cabal’s new partial replication protocol. It’s shaping up quite nicely already for about a week of work. It decodes and verifies all the basic types, adding encoders now that I’m mostly done with the network and request / response handling. The way that processes and message passing forces you to isolate state feels really elegant and not as… “oppressive” as I assumed.

Repo is over here: https://git.sr.ht/~cryptix/caberl

Next big step is adding persistence, for which I will try to leverage sqlite, for now at least. Super stretch goal is having a basic UI written in elixir/phoenix before my new job starts in November. Let’s see where we end up. I’m already much further along then I guessed when I started.

I also gave a quick introduction to Cable if you haven’t heard or heard the time to look into it: https://m.youtube.com/watch?v=PQvXn6plVHY - It’s a 24minute video so it just touches on the high level concept without going into too much detail of what the encoding is like etc. Let me link the slides here as well. (I don’t think I can turn them into a blob in manyverse)

User has not chosen to be hosted publicly
@cryptix (yet another feed) %Dun+URcX7DHEUUbfgl8Zt79LRPiUp/AIN77rOqGaByM=.sha256

Oh no..! I think it picked the wrong picture..? 😔

@cryptix (yet another feed) %cZqr3aHoxZxnxFsXBCtnMJngI7vjE9Hy786wRPhIs5U=.sha256

G

@cryptix (yet another feed) %gWnlkJO0uTZ3g1nu2CnN5exIOj91kvu07j9aQ4gvCCk=.sha256

This is what I actually wanted to reference: https://social.coop/@cryptix/111232693032922876

(Shaky train makes me press at the worst of moments)

User has not chosen to be hosted publicly
@cryptix (yet another feed) %MADlfwU+A7IUafLM+3igpSt5nP+Dwc43jS4z2NLa4zQ=.sha256

I only worked with rebar(3) so far. Its config format does allow for comments, so there is a small win over package.json.. ;)

the eunit framework gets the job done, too and is bundled into rebar as well as giving you a shell with all your deps and your project code available.

I poked a bit in the sqlite driver so even FFI (called NFI in erlang land, I think) wasn’t as painful as I would have guessed.

So far its age didn’t leave anything to be desired, really and I’m gladly surprised by that, too.

I have yet to try elixir and its mix system. From what I’ve seen it should be possible to pull rebar packages into that as well.

@cryptix (yet another feed) %SvWs+J8Mbi1EORrC+crZNwTMNsuy3QdsLpHYZKhQD8Y=.sha256

@moid probably knows not about the warts then me. I think I’m still in the honeymoon phase.. 😅 but yea.. again, it wasn’t painful at least.

~~~

Thanks also for the bitcask suggestion. I actually took erlbutt as an inspiration and some reference for laying out the project.

I disregarded it mostly because I didn’t want to get bogged down in making a key-value layout and then writing a bunch of conversion code to juggle things into complex objects. I might revisit it later.

The sqlite driver definitely has seen better days in the last 10 years. The original maintainer isn’t around anymore and it was forked twice already… so there is that

User has not chosen to be hosted publicly
@aljoscha %1CEYUx9YXrUeQ9Q2s61Np+uaCI7tt4Mn0NoCXziEIDU=.sha256

@moid

@gwil is essentially working full-time on implementing (and documenting) willow. He has funding for converting the current earthstar codebase (typescript) to willow, which involves, well, implementing willow. We are waiting to hear back on a funding application for doing rusty willow things as well.

For me, it is primarily a research project, but one that I would really like to see used in the world. Also I'm slowly funneling some students toward the codebase.

We are not quite in the place for the big announcement on scuttlebutt™ yet, but we are slowly getting there. Ideally even before scuttlebutt has emptied completely =D

User has not chosen to be hosted publicly
Join Scuttlebutt now