Fridtjof Siebert's Avatar

Fridtjof Siebert

@fridis.bsky.social

࿋🚴🏃🐕‍🦺🐈🎏🥨🥐🥝🇪🇺 Designing the Fuzion programming language and implementing related tools (http://fuzion-lang.dev). SW safety&security, static code analysis, compilers, FP&OOP. Radical cyclist, distance runner, resisting car centric culture.

217 Followers  |  617 Following  |  99 Posts  |  Joined: 22.11.2023  |  2.0857

Latest posts by fridis.bsky.social on Bluesky

Post image

Ich blicke auf diese Nachricht mit gemischten Gefühlen. Weniger Angst ist gut. Aber wenn wir uns dafür einreden, die Klimakrise sei kein zentrales Problem mehr, dann wird es gefährlich. Die Klimakrise bleibt die entscheidende Herausforderung unserer Zeit – ob wir hinschauen oder nicht.

11.02.2026 10:00 — 👍 21    🔁 8    💬 2    📌 0
A musician playing a guitar in sugarcane that is somehow in the middle of a football field

A musician playing a guitar in sugarcane that is somehow in the middle of a football field

First shot: sugarcane

The backbone of Puerto Rico's agricultural economy since colonial times

Still used to make rum of course!

09.02.2026 02:33 — 👍 3620    🔁 633    💬 34    📌 286
Post image

On my way to fosdem.org!

30.01.2026 16:52 — 👍 0    🔁 0    💬 1    📌 0
Preview
Kritis-Gesetz: "Sechs Minus, das ist Arbeitsverweigerung" Für die Änderungen am Gesetz für den Schutz Kritischer Infrastruktur hat IT-Sicherheitsexperte und Sprecher der Arbeitsgemeinschaft kritischer Infrastruktur, Manuel Atug, kein gutes Wort übrig. Die di...

Experte fällt vernichtendes Urteil: Kritis-Gesetz: "Sechs Minus, das ist Arbeitsverweigerung"

"Für die Änderungen am Gesetz für den Schutz Kritischer Infrastruktur hat IT-Sicherheitsexperte und Sprecher der AG KRITIS , Manuel Atug, kein gutes Wort übrig..."
www.n-tv.de/mediathek/vi...

29.01.2026 19:57 — 👍 364    🔁 168    💬 17    📌 11
"Vielleicht sollte man seinen Blick mal darauf richten, was geschafft wurde: Dass Deutschland als einziges großes Land in Europa nicht dicht gemacht hat, dass es sich human gezeigt hat, dass es den vielen Mitarbeitern in Behörden und Verwaltungen gelungen ist, die große Zahl an Flüchtlingen zu versorgen. Dass es hier immer noch zehntausende Bürger gibt, die helfen, in ihrer Freizeit. Wenn man schon stolz sein will auf Deutschland, dann doch vielleicht einmal darauf."

Anja Reschke

"Vielleicht sollte man seinen Blick mal darauf richten, was geschafft wurde: Dass Deutschland als einziges großes Land in Europa nicht dicht gemacht hat, dass es sich human gezeigt hat, dass es den vielen Mitarbeitern in Behörden und Verwaltungen gelungen ist, die große Zahl an Flüchtlingen zu versorgen. Dass es hier immer noch zehntausende Bürger gibt, die helfen, in ihrer Freizeit. Wenn man schon stolz sein will auf Deutschland, dann doch vielleicht einmal darauf." Anja Reschke

#wemeze_retro

28.01.2026 08:50 — 👍 558    🔁 163    💬 9    📌 4
Die EU hat beim Zoll-Deal versprochen, aus den USA für 750 Mrd. US$ Öl und Gas zu kaufen. Die nächste Erpressung ist hier schon vorprogrammiert. Wir müssen jetzt erneuerbare Energien deutlich schneller ausbauen, um endlich unabhängig zu werden.

Die EU hat beim Zoll-Deal versprochen, aus den USA für 750 Mrd. US$ Öl und Gas zu kaufen. Die nächste Erpressung ist hier schon vorprogrammiert. Wir müssen jetzt erneuerbare Energien deutlich schneller ausbauen, um endlich unabhängig zu werden.

#Europa hat weniger als 2 % der weltweiten Öl- & Gasvorkommen 🌍⛽ und macht sich trotzdem von den #USA abhängig.
Ein fataler Fehler ❌. Statt neuer Erpressbarkeit brauchen wir Tempo bei der #Energiewende ⚡:
Solar, Wind, #EAutos & #Wärmepumpen sichern unsere Freiheit! 🌱💪

19.01.2026 16:21 — 👍 303    🔁 103    💬 10    📌 3

The Fuzion January news are out.

Improvements include new syntax for anonymous inner features and a number of performance enhancements and code cleanup.

All the details: fuzion-lang.dev/news/news_058

19.01.2026 16:17 — 👍 0    🔁 1    💬 0    📌 0
Die Grafik zeigt die Entwicklung der Flüssiggasimporte (LNG) aus verschiedenen Ländern in die EU. Der Anteil der USA ist von rund 25% in 2021 auf 60% in 2025 gestiegen.

Die Grafik zeigt die Entwicklung der Flüssiggasimporte (LNG) aus verschiedenen Ländern in die EU. Der Anteil der USA ist von rund 25% in 2021 auf 60% in 2025 gestiegen.

Trumps Zoll-Drohungen zeigen: Die von der Leyen-Zusage für 750 Mrd. Dollar zusätzlich fossile Energie in den USA zu kaufen, war ein irrer Fehler. Eine weitere Erpressbarkeit ist entstanden. Wir müssen uns von fossilem Gas & Öl befreien. Wärmepumpe und grünen Wasserstoff verbreiten statt ausbremsen!

18.01.2026 08:28 — 👍 882    🔁 388    💬 30    📌 28

🏃‍♂️ Announcing OpenPace - federated fitness tracking

Think Strava, but:
✅ Federates with Mastodon/Fediverse
✅ Self-hosted
✅ Your data forever
✅ Apache licensed

Post your run → friends on Mastodon can cheer you on

Building in the open with Java + Quarkus + Vert.x

open-pace.com

18.01.2026 08:51 — 👍 18    🔁 11    💬 1    📌 0
Warum diese neue Kreuzung scheitern wird
YouTube video by Stadt Land Rad Warum diese neue Kreuzung scheitern wird

Karlsruhe vergibt wieder eine Chance, den Radverkehr klar vom Autoverkehr zu trennen und dadurch sicherer zu machen.

Ein Radweg ist dann sicher, wenn wir unsere Kinder ohne Bedenken auf ihm fahren lassen würden.

Diese Planung ist eher nur für Kampfradler.
www.youtube.com/watch?v=wPfY...

17.01.2026 17:37 — 👍 0    🔁 0    💬 0    📌 0
Preview
Anti-Zukunftskurs der DIHK stoppen! Die DIHK verbreitet in ihren Pressemeldungen irreführende Informationen über angeblich zu hohe Kosten der Energiewende: "Energiewende oder Energiewende-Politik kostet 5,4 Billionen Euro" heißt es dort...

Meine GmbH ist Pflichtmitglied in der #IHK. Die Forderung der #DIHK, dass Deutschland den #Klimaschutz aufgibt und das Ziel der #Klimaneutralität bis 2045 abschafft, TEILE ICH AUSDRÜCKLICH NICHT!

Unterzeichne wie ich jetzt die #WeAct-Petition, um dem DIHK-Präsidenten klar zu machen: SO NICHT!

16.01.2026 14:58 — 👍 48    🔁 27    💬 0    📌 1
dec12 =>

  input := io.stdin.read_string.trim.split "\n\n" .as_array
  grids := input[6].split "\n" .map (.split ": ")
  areas := grids.map (g->g[0].split "x" .map (.parse_i32.val))
  pcnts := grids.map (g->g[1].split " " .map (.parse_i32.val))

  part1 =>
    # just stupidly count if the number of #s would fit, ignoreing the
    # actual shapes.  Does not work in general, but for the given input:

    # present reduced to number of #s
    presents := array 6 (i->input[i].codepoints.count ="#")

    a2 := areas.map (.product)                # areas reduced to size
    p2 := pcnts.map (.zip presents (*) .sum)  # total count of #s

    # sum up presents * counts and check if fits into areas
    a2.zip p2 (>=)
      .count id

  part2 =>
    "Merry Christmas"

  say "$part1:$part2"

dec12 => input := io.stdin.read_string.trim.split "\n\n" .as_array grids := input[6].split "\n" .map (.split ": ") areas := grids.map (g->g[0].split "x" .map (.parse_i32.val)) pcnts := grids.map (g->g[1].split " " .map (.parse_i32.val)) part1 => # just stupidly count if the number of #s would fit, ignoreing the # actual shapes. Does not work in general, but for the given input: # present reduced to number of #s presents := array 6 (i->input[i].codepoints.count ="#") a2 := areas.map (.product) # areas reduced to size p2 := pcnts.map (.zip presents (*) .sum) # total count of #s # sum up presents * counts and check if fits into areas a2.zip p2 (>=) .count id part2 => "Merry Christmas" say "$part1:$part2"

#AdventOfCode Dec 12's puzzle in @fuzionlang.bsky.social: First thought this is impossible and put it aside, but the input data is so simple that there is no need to check actual present arrangements as long as the total size fits.

The sources on github: github.com/fridis/fuzio...

23.12.2025 03:23 — 👍 1    🔁 1    💬 0    📌 0

The Fuzion December news are out. Next to many incremental improvements on the Fuzion language, libraries and tools, work has started on a new tool for runtime scheduler monitoring called feeze.

All the details: fuzion-lang.dev/news/news_057

17.12.2025 14:16 — 👍 0    🔁 1    💬 0    📌 0

Germans remember what the ‘Altmaier Knick’. 2012 this politician feared that renewables could become ‘too successful’.
Loss of 75K jobs in solar industry-annual solar construction from over 8K megawatts to under 2K.

To this day, we have never regained the leading position we once had in this field.

16.12.2025 20:24 — 👍 86    🔁 25    💬 2    📌 0
dec11 =>

  input := io.stdin.read_string.trim.split "\n" .map (.split ": " .as_tuple)
  nums := container.hash_map (input.map (.0)) 0..input.count-1
  num(name) => nums[name].or_else -1
  succs := input.map (.1.split " " .map dec11.this.num) .as_array

  dac := num "dac"
  fft := num "fft"

  cnts(n,d,f,b u64) is  # counts (n)one, (d)ac, (f)ft, (b)oth

  count(n i32) cnts : memoize => keep n _->
    if n < 0 then cnts 1 0 0 0
    else
      r := succs[n].map count
                   .fold1 a,b->(cnts a.n+b.n a.d+b.d a.f+b.f a.b+b.b)
      if      n=dac then cnts 0 r.n+r.d 0       r.d+r.f+r.b
      else if n=fft then cnts 0 0       r.n+r.f r.d+r.f+r.b
                    else r

  part1 => count (num "you") .n
  part2 => count (num "svr") .b

  say "$part1:$part2"

dec11 => input := io.stdin.read_string.trim.split "\n" .map (.split ": " .as_tuple) nums := container.hash_map (input.map (.0)) 0..input.count-1 num(name) => nums[name].or_else -1 succs := input.map (.1.split " " .map dec11.this.num) .as_array dac := num "dac" fft := num "fft" cnts(n,d,f,b u64) is # counts (n)one, (d)ac, (f)ft, (b)oth count(n i32) cnts : memoize => keep n _-> if n < 0 then cnts 1 0 0 0 else r := succs[n].map count .fold1 a,b->(cnts a.n+b.n a.d+b.d a.f+b.f a.b+b.b) if n=dac then cnts 0 r.n+r.d 0 r.d+r.f+r.b else if n=fft then cnts 0 0 r.n+r.f r.d+r.f+r.b else r part1 => count (num "you") .n part2 => count (num "svr") .b say "$part1:$part2"

#AdventOfCode Dec 11's puzzle in @fuzionlang.bsky.social: I first did not expect simple counting of paths to be sufficient, but with memoization, that worked fine.

The sources on github: github.com/fridis/fuzio...

15.12.2025 15:52 — 👍 0    🔁 1    💬 0    📌 0
Preview
fuzion_aoc/2025/10/part2.fz at main · fridis/fuzion_aoc Advent of Code solutions using Fuzion. Contribute to fridis/fuzion_aoc development by creating an account on GitHub.

...using recursion as follows: Reduce the problem to part 1 by looking only at odd joltages, and then recursing with the remaining joltages halved.
Just a few lines of code that work nicely.
The sources on github: github.com/fridis/fuzio...

15.12.2025 11:05 — 👍 0    🔁 0    💬 0    📌 0
dec10 =>

  input := io.stdin.read_string.trim.split "\n"
             .map (.split " ") .map data .as_array

  data(s) is
    lights := s[0].replace "[" ""
                  .replace "]" ""
                  .codepoints.foldf (0,1) e,c->(e.0|(c="#"?e.1:0),2*e.1)
                  .0
    buttons := (s.drop 1 .take s.count-2).map (.replace "(" ""
                                               .replace ")" ""
                                               .split ","
                                               .map c->1<<c.parse_i32.val
                                               .fold1 (|))
                                         .as_array
    joltage := s.last.val.replace "\{" ""
                         .replace "\}" ""
                         .split ","
                         .map (.parse_i32.val)

    try(l,n) =>
      l=lights || n!=0 && (buttons ∃ b->try l^b n-1)

    p2 =>
      # solution proposed by u/tenthmascot at
      # https://www.reddit.com/r/adventofcode/comments/1pk87hl/2025_day_10_part_2_bifurcate_your_way_to_victory/
      solve(j) : memoize => keep "$s/$j" _->
        if j ∀ =0 then 0                                    # all 0, nothing more to do
        else
          l := j.indexed.map ||>i,jo->jo%2<<i .fold1 (|)    # desired lights = odd joltages
          (0..(2**buttons.length-1)).map m->                # for all button combinations
              pr := buttons.zip (m :: (/2)) b,mb->mb%2*b    # pressed buttons
              if l = pr.fold1 (^) then                      # resulting lights ok?
                j2 := j.indexed.map ||>i,jo->(jo - (pr.map b->(b>>i)%2 .sum))/2
                m.ones_count + 2 * solve j2                 # recurse with halved joltage
              else 1000000
            .min.val
      solve joltage

  part1 =>
    input.map d->((0..).drop_while n->(!d.try 0 n))[0]
         .sum

  part2 =>
    input.map (.p2)
         .sum

  say "$part1:$part2"

dec10 => input := io.stdin.read_string.trim.split "\n" .map (.split " ") .map data .as_array data(s) is lights := s[0].replace "[" "" .replace "]" "" .codepoints.foldf (0,1) e,c->(e.0|(c="#"?e.1:0),2*e.1) .0 buttons := (s.drop 1 .take s.count-2).map (.replace "(" "" .replace ")" "" .split "," .map c->1<<c.parse_i32.val .fold1 (|)) .as_array joltage := s.last.val.replace "\{" "" .replace "\}" "" .split "," .map (.parse_i32.val) try(l,n) => l=lights || n!=0 && (buttons ∃ b->try l^b n-1) p2 => # solution proposed by u/tenthmascot at # https://www.reddit.com/r/adventofcode/comments/1pk87hl/2025_day_10_part_2_bifurcate_your_way_to_victory/ solve(j) : memoize => keep "$s/$j" _-> if j ∀ =0 then 0 # all 0, nothing more to do else l := j.indexed.map ||>i,jo->jo%2<<i .fold1 (|) # desired lights = odd joltages (0..(2**buttons.length-1)).map m-> # for all button combinations pr := buttons.zip (m :: (/2)) b,mb->mb%2*b # pressed buttons if l = pr.fold1 (^) then # resulting lights ok? j2 := j.indexed.map ||>i,jo->(jo - (pr.map b->(b>>i)%2 .sum))/2 m.ones_count + 2 * solve j2 # recurse with halved joltage else 1000000 .min.val solve joltage part1 => input.map d->((0..).drop_while n->(!d.try 0 n))[0] .sum part2 => input.map (.p2) .sum say "$part1:$part2"

Five days late with my #AdventOfCode solution in @fuzionlang.bsky.social. After part 1 was super easy, I struggled with the shear amount of work for solving the underspecified system of linear algebra equations in part 2.

But then I found www.reddit.com/r/adventofco..., a very nice idea...

1/2

15.12.2025 11:05 — 👍 0    🔁 1    💬 2    📌 0

Poste immer so, dass du nicht in die USA einreisen darfst✊️

11.12.2025 00:11 — 👍 574    🔁 109    💬 34    📌 3
Preview
fuzion_aoc/2025/09/part2.fz at main · fridis/fuzion_aoc Advent of Code solutions using Fuzion. Contribute to fridis/fuzion_aoc development by creating an account on GitHub.

Decided not to do this by finding intersections with the outline, but instead drawing a filled polygon and then testing if the rectangle lies inside. To avoid a huge canvas to draw on, first compress coordinates to used subset.

The sources: github.com/fridis/fuzio...

09.12.2025 19:03 — 👍 1    🔁 0    💬 0    📌 0
dec9 =>

  input := io.stdin.read_string.trim.split "\n"
             .map (.split "," .map (.parse_i64.val) .as_tuple) .as_array

  # area or rectangle with corners a and b
  rect(a,b) => ((|a.0-b.0|)+1)*((|a.1-b.1|)+1)

  part1 =>
    input.combine input rect
         .max

  part2 =>
    xs := input.map (.0) .unique .sort   # all used x coordinates
    ys := input.map (.1) .unique .sort   # all used y coordinates
    x(v) => xs.find_key v .val.as_i64    # compress x to index in xs
    y(v) => ys.find_key v .val.as_i64    # compress y to index in ys

    m : mutate is
    m ! ()->
      floor := m.env.new_array2 xs.length.as_i64 ys.length.as_i64 "."

      # put outline tiles
      (input ++ [input[0]])
        .map_pairs p,q->
          px := x p.0; py := y p.1
          qx := x q.0; qy := y q.1
          _ := for xi := px, xi+(qx-px).sign.as_i64
                   yi := py, yi+(qy-py).sign.as_i64
               while xi!=qx || yi!=qy do
                 if floor[xi,yi]="." then floor[xi,yi] := "X"
        .for_each ignore   # enforce side-effect

      # clear outside area
      floor.indices1.for_each y->
        clear(x) => if floor[x,y]="." then floor[x,y] := " "; true
                                      else false
        _ := floor.indices0        .take_while clear .count
        _ := floor.indices0.reverse.take_while clear .count

      # try all rectangles
      input.combine input a,b->
             xr := [x a.0, x b.0].sort.as_tuple ||> (..) # range of x coord.
             yr := [y a.1, y b.1].sort.as_tuple ||> (..) # range of y coord.
             if xr.combine yr floor[] ∀ !=" " then rect a b
                                              else 0
           .max

  say "$part1:$part2"

dec9 => input := io.stdin.read_string.trim.split "\n" .map (.split "," .map (.parse_i64.val) .as_tuple) .as_array # area or rectangle with corners a and b rect(a,b) => ((|a.0-b.0|)+1)*((|a.1-b.1|)+1) part1 => input.combine input rect .max part2 => xs := input.map (.0) .unique .sort # all used x coordinates ys := input.map (.1) .unique .sort # all used y coordinates x(v) => xs.find_key v .val.as_i64 # compress x to index in xs y(v) => ys.find_key v .val.as_i64 # compress y to index in ys m : mutate is m ! ()-> floor := m.env.new_array2 xs.length.as_i64 ys.length.as_i64 "." # put outline tiles (input ++ [input[0]]) .map_pairs p,q-> px := x p.0; py := y p.1 qx := x q.0; qy := y q.1 _ := for xi := px, xi+(qx-px).sign.as_i64 yi := py, yi+(qy-py).sign.as_i64 while xi!=qx || yi!=qy do if floor[xi,yi]="." then floor[xi,yi] := "X" .for_each ignore # enforce side-effect # clear outside area floor.indices1.for_each y-> clear(x) => if floor[x,y]="." then floor[x,y] := " "; true else false _ := floor.indices0 .take_while clear .count _ := floor.indices0.reverse.take_while clear .count # try all rectangles input.combine input a,b-> xr := [x a.0, x b.0].sort.as_tuple ||> (..) # range of x coord. yr := [y a.1, y b.1].sort.as_tuple ||> (..) # range of y coord. if xr.combine yr floor[] ∀ !=" " then rect a b else 0 .max say "$part1:$part2"

Today's @adventofcode.bsky.social in @fuzionlang.bsky.social started with a simple part 1: two lines after input preprocessing and defining a helper feature to calculate the area of a rectangle.

Part 2 is more tricky, requires checking if a rectangle is contained in a concave polygon. 1/2

09.12.2025 19:03 — 👍 0    🔁 1    💬 1    📌 0
dec8 =>

  input := io.stdin.read_string.trim.split "\n"
             .map (.split "," .map (.parse_i64.val) .as_array) .as_array
  n := input.length
  m := envir.args[1].parse_i32.val

  pairs := (0..n-1).flat_map (i -> (i+1..n-1).map (pair i))
                   .sort

  # get circuit id of junction box i
  #
  # cs[i] is >0 if i is identifying box, value is size of circuit,
  #          <0 if identifiying box is at i+cs[i]
  circuit(cs, i) =>
    if cs[i]<0 then circuit cs i+cs[i]
               else i

  # pair of junction box i and j,  ordered by straight-line distance
  pair(i,j) : property.orderable is

    # straight-line distance between i and j
    dist := input[i].zip input[j] (-) .map **2 .sum

    # order
    public redef type.lteq(a,b pair.this) bool => a.dist <= b.dist

    # connect this pair for given circuit cs, return resulting circuit
    connect(cs) =>
      ab := (circuit cs i, circuit cs j)
      a := ab ||> min
      b := ab ||> max
      if a=b then cs
             else array n x->
                    if      x=a              then cs[a] + cs[b]
                    else if circuit cs x = b then a-x
                                             else cs[x]

  part1 =>
    join(c,cs) i32 =>
      if c = m then cs.sort.reverse.take 3 .product
               else join c+1 (pairs[c].connect cs)
    join 0 (array n _->1)

  part2 =>
    join(c,cs) =>
      p := pairs[c]
      cs0 := p.connect cs
      if cs0[0]=n then input[p.i][0]*input[p.j][0]
                  else join c+1 cs0
    join 0 (array n _->1)

  say "$part1:$part2"

dec8 => input := io.stdin.read_string.trim.split "\n" .map (.split "," .map (.parse_i64.val) .as_array) .as_array n := input.length m := envir.args[1].parse_i32.val pairs := (0..n-1).flat_map (i -> (i+1..n-1).map (pair i)) .sort # get circuit id of junction box i # # cs[i] is >0 if i is identifying box, value is size of circuit, # <0 if identifiying box is at i+cs[i] circuit(cs, i) => if cs[i]<0 then circuit cs i+cs[i] else i # pair of junction box i and j, ordered by straight-line distance pair(i,j) : property.orderable is # straight-line distance between i and j dist := input[i].zip input[j] (-) .map **2 .sum # order public redef type.lteq(a,b pair.this) bool => a.dist <= b.dist # connect this pair for given circuit cs, return resulting circuit connect(cs) => ab := (circuit cs i, circuit cs j) a := ab ||> min b := ab ||> max if a=b then cs else array n x-> if x=a then cs[a] + cs[b] else if circuit cs x = b then a-x else cs[x] part1 => join(c,cs) i32 => if c = m then cs.sort.reverse.take 3 .product else join c+1 (pairs[c].connect cs) join 0 (array n _->1) part2 => join(c,cs) => p := pairs[c] cs0 := p.connect cs if cs0[0]=n then input[p.i][0]*input[p.j][0] else join c+1 cs0 join 0 (array n _->1) say "$part1:$part2"

@adventofcode.bsky.social getting more challenging: Today's solution in @fuzionlang.bsky.social declares an orderable feature `pair`, cuircuits are equivalence classes identified by the first box.

And reading comprehension: www.reddit.com/r/adventofco...

The sources: github.com/fridis/fuzio...

08.12.2025 16:23 — 👍 0    🔁 1    💬 0    📌 0
dec7 =>

  input := io.stdin.read_string.trim.split "\n" 
             .map (.codepoints.as_array) .as_array
  w := input[0].count

  part1 =>
    input.foldf (0,array w _->false) e,l->e||>c,a->
        a2 := array w x->
          (l[x]="S"         ||
           l[x]="." && a[x] ||
           x>0   && l[x-1]="^" && a[x-1] ||
           x<w-1 && l[x+1]="^" && a[x+1])
        c2 := c + a.indices.count (x -> l[x]="^" && a[x])
        (c2,a2)
      .0

  part2 =>
    input.foldf (array w _->(i64 0)) a,l->
        array w x->
          (if      l[x]="." then a[x]
           else if l[x]="S" then 1
                            else 0
           + if x>0   && l[x-1]="^" then a[x-1] else 0
           + if x+1<w && l[x+1]="^" then a[x+1] else 0)
      .sum

  say "$part1:$part2"

dec7 => input := io.stdin.read_string.trim.split "\n" .map (.codepoints.as_array) .as_array w := input[0].count part1 => input.foldf (0,array w _->false) e,l->e||>c,a-> a2 := array w x-> (l[x]="S" || l[x]="." && a[x] || x>0 && l[x-1]="^" && a[x-1] || x<w-1 && l[x+1]="^" && a[x+1]) c2 := c + a.indices.count (x -> l[x]="^" && a[x]) (c2,a2) .0 part2 => input.foldf (array w _->(i64 0)) a,l-> array w x-> (if l[x]="." then a[x] else if l[x]="S" then 1 else 0 + if x>0 && l[x-1]="^" then a[x-1] else 0 + if x+1<w && l[x+1]="^" then a[x+1] else 0) .sum say "$part1:$part2"

Yesterday's @adventofcode.bsky.social solution in @fuzionlang.bsky.social: arrays used instead of lists to avoid quadratic performance. part2 was simpler than part1...

The sources on github: github.com/fridis/fuzio...

08.12.2025 08:37 — 👍 2    🔁 1    💬 0    📌 0
dec6 =>

  input := io.stdin.read_string.trim.split "\n" .as_array
  h := input.length-1

  part1 =>
    a := input.map (.split " " .filter !="" .as_array) .as_array
    a[0].indices.map x->
                  op := a[h][x]
                  (0..h-1).map y->a[y][x].parse_i64.val
                          .fold1 (if op="*" then * else +)
                .sum

  part2 =>
    w := input.map (.trim.byte_length) .max.val
    i := input.map_to_array (.codepoints.as_array)
    next(c) =>
      if c<w && (0..h ∃ y->i[y][c]!=" ") then next c+1
                                         else c+1
    (0 :: next).take_while <=w
               .map c->
                 op := i[h][c]
                 (c..(next c)-2).map x->
                                  (0..h-1).foldf "" e,y->e+i[y][x]
                                          .trim.parse_i64.val
                                .fold1 (op="*" ? * : +)
               .sum

  say "$part1:$part2"

dec6 => input := io.stdin.read_string.trim.split "\n" .as_array h := input.length-1 part1 => a := input.map (.split " " .filter !="" .as_array) .as_array a[0].indices.map x-> op := a[h][x] (0..h-1).map y->a[y][x].parse_i64.val .fold1 (if op="*" then * else +) .sum part2 => w := input.map (.trim.byte_length) .max.val i := input.map_to_array (.codepoints.as_array) next(c) => if c<w && (0..h ∃ y->i[y][c]!=" ") then next c+1 else c+1 (0 :: next).take_while <=w .map c-> op := i[h][c] (c..(next c)-2).map x-> (0..h-1).foldf "" e,y->e+i[y][x] .trim.parse_i64.val .fold1 (op="*" ? * : +) .sum say "$part1:$part2"

St. Nicolas' @adventofcode.bsky.social in @fuzionlang.bsky.social required tricky transposing in part 2.

Surprise for me: partial application of operators usually requires '('/')', not here: 'fold1 (if op="*" then * else +)' or even 'fold1 (op="*" ? + : *)'.

sources: github.com/fridis/fuzio...

06.12.2025 17:40 — 👍 0    🔁 1    💬 0    📌 0
dec5 =>

  fr,id := io.stdin.read_string.trim.split "\n\n" .as_tuples.first.val
  fresh := fr.split "\n" .map (.split "-" .map (.parse_i64.val) .as_tuple)
  ids   := id.split "\n" .map (.parse_i64.val)

  none := fresh.take 0

  part1 =>
    ids.count i->
      fresh ∃ ||> a,b -> a<=i<=b

  separate(a,b) => a.1+1 < b.0 || b.1+1 < a.0
  join(a,b) => (min a.0 b.0, max a.1 b.1)

  part2 =>
    fresh.foldf none l,n->                  # create list of disjoint ranges, adding one range n at a time
        h, t := l.foldf (n, none) r,f->     # for each range f we found so far
          if separate r.0 f then (r.0, [f] ++ r.1)  # r.0 and f separate, so keep both
                            else (join r.0 f, r.1)  # else join r.0 and f
        [h] ++ t
      .map (||> a,b -> b-a+1)
      .sum

  say "$part1:$part2"

dec5 => fr,id := io.stdin.read_string.trim.split "\n\n" .as_tuples.first.val fresh := fr.split "\n" .map (.split "-" .map (.parse_i64.val) .as_tuple) ids := id.split "\n" .map (.parse_i64.val) none := fresh.take 0 part1 => ids.count i-> fresh ∃ ||> a,b -> a<=i<=b separate(a,b) => a.1+1 < b.0 || b.1+1 < a.0 join(a,b) => (min a.0 b.0, max a.1 b.1) part2 => fresh.foldf none l,n-> # create list of disjoint ranges, adding one range n at a time h, t := l.foldf (n, none) r,f-> # for each range f we found so far if separate r.0 f then (r.0, [f] ++ r.1) # r.0 and f separate, so keep both else (join r.0 f, r.1) # else join r.0 and f [h] ++ t .map (||> a,b -> b-a+1) .sum say "$part1:$part2"

Today's @adventofcode.bsky.social solution in @fuzionlang.bsky.social: Instead of testing all the ways two ranges can overlap, just checking if they are completely separate and joining them if not helped a lot. And there is an existential operator ∃!
The source: github.com/fridis/fuzio...

05.12.2025 22:39 — 👍 0    🔁 1    💬 0    📌 0
dec4 =>

  input := io.stdin.read_string.trim.split "\n"
             .map (l -> l.codepoints.map ="@" .as_array)
             .as_array

  w := input[0].length
  h := input.length
  a := array2 w+2 h+2 x,y->
    1 <= y <= h && 1 <= x <= w && input[y-1][x-1]

  # array2 of bool with directly inaccessible rolls in array2 `o`
  inaccessible1(o) =>
   array2 w+2 h+2 x,y->
    if o[x,y] then ((x-1 .. x+1).pairs (y-1 .. y+1)
                                .count ||>xx,yy->o[xx,yy])>4
              else false

  # count of recursively inaccessible rolls
  inaccessible(o) =>
    i := inaccessible1 o
    co := o.count id
    ci := i.count id
    co = ci ? ci : inaccessible i

  part1 =>
    i := inaccessible1 a
    a.index_pairs.count ||>x,y->
       a[x,y] && !i[x,y]

  part2 =>
    a.count id - inaccessible a

  say "$part1:$part2"

dec4 => input := io.stdin.read_string.trim.split "\n" .map (l -> l.codepoints.map ="@" .as_array) .as_array w := input[0].length h := input.length a := array2 w+2 h+2 x,y-> 1 <= y <= h && 1 <= x <= w && input[y-1][x-1] # array2 of bool with directly inaccessible rolls in array2 `o` inaccessible1(o) => array2 w+2 h+2 x,y-> if o[x,y] then ((x-1 .. x+1).pairs (y-1 .. y+1) .count ||>xx,yy->o[xx,yy])>4 else false # count of recursively inaccessible rolls inaccessible(o) => i := inaccessible1 o co := o.count id ci := i.count id co = ci ? ci : inaccessible i part1 => i := inaccessible1 a a.index_pairs.count ||>x,y-> a[x,y] && !i[x,y] part2 => a.count id - inaccessible a say "$part1:$part2"

Finally an @adventofcode.bsky.social solution in @fuzionlang.bsky.social on the same day: Using an array2 2 slots wider and higher helps avoid many special cases. A bit cryptic, but convenient: ||>x,y->... defines a lambda on a tuple and destructures the tuple.

Source: github.com/fridis/fuzio...

04.12.2025 13:57 — 👍 1    🔁 1    💬 0    📌 0
dec3 =>

  input := io.stdin.read_string.trim.split "\n"
             .map (.codepoints.map (.parse_i64.val))

  joltage(n,v,l) =>
    if n=0 then
      v
    else
      d := l.take (l.count-n+1) .max.val
      joltage n-1 v*10+d (l.drop_while !=d .drop 1)

  part1 =>
    input.map (joltage 2 (i64 0))
         .sum

  part2 =>
    input.map (joltage 12 (i64 0))
         .sum

  say "$part1:$part2"

dec3 => input := io.stdin.read_string.trim.split "\n" .map (.codepoints.map (.parse_i64.val)) joltage(n,v,l) => if n=0 then v else d := l.take (l.count-n+1) .max.val joltage n-1 v*10+d (l.drop_while !=d .drop 1) part1 => input.map (joltage 2 (i64 0)) .sum part2 => input.map (joltage 12 (i64 0)) .sum say "$part1:$part2"

Catching up with this year's @adventofcode.bsky.social, here is a fairly concise solution for yesterday's challenge using @fuzionlang.bsky.social: A recursive function joltage(n,v,l) did the trick for length n, current result v and remaining list l.

The sources: github.com/fridis/fuzio...

04.12.2025 10:46 — 👍 1    🔁 2    💬 0    📌 0
dec2 =>

  input := io.stdin.read_string
             .split "\n"
             .first.val
             .split ","
             .flat_map (.split "-"
                        .map (.parse_i64.val)
                        .as_tuples)

  ten := i64 10
  i64.strlen => ($val).byte_length.as_i64

  part1 =>
    input.flat_map ||>a,b->
        sl := (a.strlen+1) / 2
        f := ten**sl
        (max f/10 a/f ..
         min f-1  b/f    ).map hi->
            v := hi * (f+1)
            if a <= v <= b then v
                           else 0
      .sum

  part2 =>
    input.flat_map ||>a,b->
        (i64 2 .. b.strlen).flat_map sn->         # eg.       4
          sl := (a.strlen+sn-1) / sn              #           2
          f0 := ten**sl                           #         100
          f1 := f0**(sn-1)                        #     1000000
          ff := (f1 :: (/f0)).take_while >0 .sum  #     1010101
          (max f0/10 a/f1 ..
           min f0-1  b/f1    ).map hi->
            v := hi * ff                          #    34343434
            if a <= v <= b then v
                           else 0
      .unique
      .sum

  say "$part1:$part2"

dec2 => input := io.stdin.read_string .split "\n" .first.val .split "," .flat_map (.split "-" .map (.parse_i64.val) .as_tuples) ten := i64 10 i64.strlen => ($val).byte_length.as_i64 part1 => input.flat_map ||>a,b-> sl := (a.strlen+1) / 2 f := ten**sl (max f/10 a/f .. min f-1 b/f ).map hi-> v := hi * (f+1) if a <= v <= b then v else 0 .sum part2 => input.flat_map ||>a,b-> (i64 2 .. b.strlen).flat_map sn-> # eg. 4 sl := (a.strlen+sn-1) / sn # 2 f0 := ten**sl # 100 f1 := f0**(sn-1) # 1000000 ff := (f1 :: (/f0)).take_while >0 .sum # 1010101 (max f0/10 a/f1 .. min f0-1 b/f1 ).map hi-> v := hi * ff # 34343434 if a <= v <= b then v else 0 .unique .sum say "$part1:$part2"

Still lagging behind with Dec 2's @adventofcode.bsky.social in @fuzionlang.bsky.social: very useful was Sequence's unique feature to remove repeated ids.

Source: github.com/fridis/fuzio...

03.12.2025 18:03 — 👍 0    🔁 1    💬 0    📌 0
dec1 =>

  input := io.stdin.read_string
             .replace "R" "+"
             .replace "L" "-"
             .split "\n"
             .filter !=""
             .map (.parse_i32.val)

  part1 =>
    input.foldf (50,0) e,x->
            n := (e.0 + x) % 100
            c := e.1 + if n=0 then 1 else 0
            (n,c)
         .1

  part2 =>
    input.foldf (50,0) e,x->
            (1 .. (|x|)).foldf e r,_->
              n := (r.0 + x.sign) % 100
              c := r.1 + if n=0 then 1 else 0
              (n,c)
         .1

  say "$part1:$part2"

dec1 => input := io.stdin.read_string .replace "R" "+" .replace "L" "-" .split "\n" .filter !="" .map (.parse_i32.val) part1 => input.foldf (50,0) e,x-> n := (e.0 + x) % 100 c := e.1 + if n=0 then 1 else 0 (n,c) .1 part2 => input.foldf (50,0) e,x-> (1 .. (|x|)).foldf e r,_-> n := (r.0 + x.sign) % 100 c := r.1 + if n=0 then 1 else 0 (n,c) .1 say "$part1:$part2"

A little late to the show for Dec 1's @adventofcode.bsky.social in @fuzionlang.bsky.social: Went for a simple, fully functional solution using 2 nested folds that perform single clicks of the dial, optimizing this resulted in uglier code with too many cases.
Source: github.com/fridis/fuzio...

03.12.2025 11:48 — 👍 1    🔁 1    💬 0    📌 0
Ein weißer symbolisierter Elefant mit einer Träne aus dem Auge auf schwarzen Gtund und darunter der Text:" Gedenkfahrt Samstag 31.Januar 2026, Staatsanwaltschaft Pforzheim Lindenstr. 3 Nähe Bahnhof

Ein weißer symbolisierter Elefant mit einer Träne aus dem Auge auf schwarzen Gtund und darunter der Text:" Gedenkfahrt Samstag 31.Januar 2026, Staatsanwaltschaft Pforzheim Lindenstr. 3 Nähe Bahnhof

Es wird wieder einen Zubringer aus Stuttgart geben! Save the date!

21.11.2025 20:00 — 👍 33    🔁 20    💬 1    📌 0
Preview
Fuzion Language Portal Fuzion is a computer programming language with a focus on productivity, performance and correctness.

The Fuzion November news are out.

Our base library profits a lot from the work on the fuzion webserver fzweb: added functionilty, better usability and performance!

For the Fuzion language, type-safe variadic functions are an major addition.

All the details: fuzion-lang.dev/news/news_056

13.11.2025 16:16 — 👍 0    🔁 1    💬 0    📌 0

@fridis is following 19 prominent accounts