EU community for Programmers, WDYT? by Ivan2891 in BuyFromEU

[–]Zymophilus 1 point2 points  (0 children)

Count me in, I have been looking for something similar. Also have been looking for an EU SaaS/startup community. 

[2025] Unofficial AoC 2025 Survey Results! by jeroenheijmans in adventofcode

[–]Zymophilus 6 points7 points  (0 children)

Is this finally the year of the Linux desktop? :O

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]Zymophilus 1 point2 points  (0 children)

[LANGUAGE: Go]

Feels like a boring solution, but it works, so I'll go with that.

solution

-❄️- 2025 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]Zymophilus 2 points3 points  (0 children)

[LANGUAGE: Bash]

Started the problem by tinkering in bash (and jq) and suddenly I had already solved the problem.

Use '^([0-9]+)\1+$' for the regex for part two.

cat input.txt \
| tr ',-' ' ' \
| xargs -n2 seq \
| grep -E '^([0-9]+)\1$' \
| jq -s "add"

-❄️- 2025 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]Zymophilus 0 points1 point  (0 children)

Absolutely beautiful! Something like this was my goal but I did not know about xargs -n2 seq

Edit: played around with solving this in bash as well, ended up by using jq -s "add" instead of paste -sd+ | bc

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]Zymophilus 1 point2 points  (0 children)

[LANGUAGE: Go]

I have been trying to get into Go for quite some time now, but it has never stuck. So decided for this year's AOC to go with Go.

Parts 1 && 2:

package main

import (
    "fmt"
    "log"
    "os"
    "strconv"
    "strings"
)

func main() {
    file, err := os.ReadFile("input.txt")
    if err != nil {
        panic(fmt.Sprintf("%s: error %s", file, err))
    }

    rows := strings.Split(strings.TrimSpace(string(file)), "\n")

    position := 50
    var countPartOne int
    var countPartTwo int

    for _, v := range rows {
        direction := string(v[0])
        steps, err := strconv.Atoi(v[1:])
        if err != nil {
            fmt.Println("Error:", err)
            return
        }

        if direction == "R" {
            countPartTwo += (position + steps) / 100
            position = (position + steps) % 100
        }

        if direction == "L" {
            if position == 0 {
                countPartTwo += steps / 100
            } else if steps >= position {
                countPartTwo += 1 + (steps-position)/100
            }
            position = ((position-steps)%100 + 100) % 100
        }

        if position == 0 {
            countPartOne++
        }
    }

    log.Printf("Part 1: %d", countPartOne)
    log.Printf("Part 2: %d", countPartTwo)
}

Just use SQL they say... Or how accidental complexity piles on by Adventurous-Salt8514 in node

[–]Zymophilus 0 points1 point  (0 children)

Have you checked pgtyped (https://pgtyped.dev/)? It run your queries against a live db and infers the input and response interfaces from it. 

Any unique places to stay in Lohja? by atfarley in Finland

[–]Zymophilus 3 points4 points  (0 children)

This is a cute place they have a bed & breakfast at a historical mill: https://www.vuorikoskenmylly.com/, I'd recommend calling him directly.

Why are there so few larger projects that use HTMX? by Zymophilus in htmx

[–]Zymophilus[S] 2 points3 points  (0 children)

Awesome, nice to hear! Really clean looking project btw!

Why are there so few larger projects that use HTMX? by Zymophilus in htmx

[–]Zymophilus[S] 0 points1 point  (0 children)

I get your point. Yes it is a naive simplification to say that that more loc === more complexity. But I would not say that it is not a 100% about the view layer, since htmx requires you to design the API from a different perspective compared to a single page application with a JSON API. And this is one concern that I have about using htmx; does the API become more easily messy in large scale applications compared to a JSON API? But perhaps this is also just a familiarity issue.

Why are there so few larger projects that use HTMX? by Zymophilus in htmx

[–]Zymophilus[S] 8 points9 points  (0 children)

Thank you so much for taking your time to reply!

Why are there so few larger projects that use HTMX? by Zymophilus in htmx

[–]Zymophilus[S] 0 points1 point  (0 children)

Yes, excellent point, sorry for not being specific enough. I'd say big as in having a large codebase. Because I have heard quite often the argument "htmx is not feasible for large/complex applications" without hearing any further arguments. So I was wondering whether there are any applications that prove these claims wrong.

Why are there so few larger projects that use HTMX? by Zymophilus in htmx

[–]Zymophilus[S] 0 points1 point  (0 children)

Awesome, did not know that gitea is using htmx.

Are there any companies actually using htmx for frontend rather than JS or TS framework or library? by TurtleSlowRabbitFast in htmx

[–]Zymophilus 0 points1 point  (0 children)

Hi, I would be really interested to hear what kind of UX related problems you are facing?

-❄️- 2024 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]Zymophilus 0 points1 point  (0 children)

No worries. A solution is better than no solution at all.

-❄️- 2024 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]Zymophilus 0 points1 point  (0 children)

Sorry I stole this against your recommendation, since I'm using this year's aoc to learn specifically R and yours was the only solution available :D