Chais

joined 2 years ago
[–] Chais@sh.itjust.works 10 points 1 week ago

People want to travel to the USA still? Bizarre.

[–] Chais@sh.itjust.works 1 points 2 weeks ago (1 children)

The reason I compare them to autocomplete is that they're token predictors, just like autocomplete.
They take your prompt and predict the first word of the answer. Then they take the result and predict the next word. Repeat until a minimum length is reached and the answer seems complete. Yes, they're a tad smarter than autocorrect, but they understand just as little of the text they produce. The text will be mostly grammatically correct, but they don't understand it. Much like a compiler can tell you if your code is syntactically correct, but can't judge the logic.

[–] Chais@sh.itjust.works 0 points 2 weeks ago

Getting an explanation is one thing, getting a complete solution is another. Even if you then verify with a more suited tool. It's still not your solution and you didn't fully understand it.

[–] Chais@sh.itjust.works 12 points 2 weeks ago* (last edited 2 weeks ago) (6 children)

Or, and hear me out on this, you could actually learn and understand it yourself! You know? The thing you go to university for?
What would you say if, say, it came to light that an engineer had outsourced the statical analysis of a bridge to some half baked autocomplete? I'd lose any trust in that bridge and respect for that engineer and would hope they're stripped of their title and held personally responsible.

These things currently are worse than useless, by sometimes being right. It gives people the wrong impression that you can actually rely on them.

Edit: just came across this MIT study regarding the cognitive impact of using LLMs: https://arxiv.org/abs/2506.08872

[–] Chais@sh.itjust.works 5 points 3 weeks ago (1 children)

Wouldn't that be a great use case for a QR-code?

[–] Chais@sh.itjust.works 2 points 3 weeks ago

Well, Wile E. Coyote, no? Road Runner just runs away.

[–] Chais@sh.itjust.works 1 points 1 month ago

Yes, most times gamescope isn't required. Thing is, sometimes it is and not having the option is an inconvenience in the best case and makes games unplayable in the worst case.

[–] Chais@sh.itjust.works 3 points 1 month ago (4 children)

My partner is currently running PopOS. They somehow managed to combine the chronically outdated Ubuntu packages with a rather counterintuitive UI.
Updates frequently fail, commonly used packages like gamescope aren't available, overall wouldn't recommend.

[–] Chais@sh.itjust.works 3 points 1 month ago (1 children)

Had it on my Fairphone 4 for a while, but was put off by the very iOS look-and-feel. Ditched it on favour of Lineage.

[–] Chais@sh.itjust.works 2 points 1 month ago

I moved to Qobuz for that reason. Much better payout for the artists.

[–] Chais@sh.itjust.works 2 points 1 month ago (1 children)

I get that. But that doesn't mean you can demand someone else investing a lot of time in what is commonly unpaid work.

[–] Chais@sh.itjust.works 4 points 1 month ago (3 children)

Well, you're free to patch support for your ancient OS back in. But you can't expect someone else to do it for free.

12
Stuck on day 6, part 2 (sh.itjust.works)
submitted 7 months ago* (last edited 7 months ago) by Chais@sh.itjust.works to c/advent_of_code@programming.dev
 

I'm not looking for a solution or even code, just a hint. Here's what I currently do:

  1. Add the current position and heading to the recorded path
  2. Check if turning right would lead back onto the recorded path in the same direction we walked it before
  3. Check if the next field is obstructed
    1. If so, turn right
    2. Repeat until no longer blocked
  4. Update current position

This approach works fine for the unit test, but yields a result too low for the puzzle input. I tried adding recursion to the party check, but even 20 levels of recursion didn't sufficiently increase the amount of options found, suggesting I'm missing a mechanism to identify them.

Any clues?

Current state of affairs:

from math import sumprod
from operator import add
from pathlib import Path


def parse_input(input: str) -> list[list[int]]:
    return input.strip().splitlines()


def find_guard(world: list[list[int]]) -> tuple[int]:
    for y, line in enumerate(world):
        x = line.find("^")
        if x > -1:
            return (y, x)
    return (-1, -1)  # No guard


def turn(heading: tuple[int]) -> tuple[int]:
    mat = [(0, 1), (-1, 0)]
    return tuple([sumprod(col, heading) for col in mat])


def step(pos: tuple[int], heading: tuple[int]) -> tuple[int]:
    return tuple(map(add, pos, heading))


def is_blocked(world: list[list[str]], guard: tuple[int], heading: tuple[int]) -> bool:
    pos = step(guard, heading)
    try:
        return world[pos[0]][pos[1]] == "#"
    except IndexError:
        return False


def cast_ray(
    world: list[list[int]], start: tuple[int], heading: tuple[int]
) -> list[tuple[int]]:
    pos = step(start, heading)
    ray = []
    try:
        while world[pos[0]][pos[1]] != "#":
            ray.append(pos)
            pos = step(pos, heading)
    except IndexError:
        # Left the world
        ...
    return ray


def part_one(input: str) -> int:
    world = parse_input(input)
    guard = find_guard(world)
    heading = (-1, 0)
    while (
        guard[0] >= 0
        and guard[0] < len(world)
        and guard[1] >= 0
        and guard[1] < len(world[guard[0]])
    ):
        while is_blocked(world, guard, heading):
            heading = turn(heading)
        world[guard[0]] = f"{world[guard[0]][:guard[1]]}X{world[guard[0]][guard[1]+1:]}"
        guard = tuple(map(add, guard, heading))
    return sum([line.count("X") for line in world])


def part_two(input: str) -> int:
    world = parse_input(input)
    guard = find_guard(world)
    heading = (-1, 0)
    path = {}
    options = 0
    while (
        guard[0] >= 0
        and guard[0] < len(world)
        and guard[1] >= 0
        and guard[1] < len(world[guard[0]])
    ):
        path.setdefault(guard, []).append(heading)
        turned = turn(heading)
        if turned in path.get(guard, []) or turned in [
            d
            for p in set(cast_ray(world, guard, turned)).intersection(set(path.keys()))
            for d in path[p]
        ]:
            # Crossing previous path and turning would cause us to retrace our steps
            # or turning would lead us back into our previous path
            options += 1
        while is_blocked(world, guard, heading):
            heading = turned
        world[guard[0]] = f"{world[guard[0]][:guard[1]]}X{world[guard[0]][guard[1]+1:]}"
        guard = tuple(map(add, guard, heading))
    return options


if __name__ == "__main__":
    input = Path("input").read_text("utf-8")
    print(part_one(input))
    print(part_two(input))
 

Fermented with black cardamom and garlic (which I'm just noticing I forgot to put on the label 🤷) and puréed with mango and pear.
Added a little rice vinegar and salt to balance the fruit.
It's a little spicier than Sriracha, but not at all unpleasant. Nicely sweet and spicy. You can taste it with a spoon without regretting it.

 

I'm trying to get networkd to connect to a wireguard endpoint, specifically ProtonVPN, in case it matters. I just can't get it to connect. Has anyone had success with that? Specifically without using wg-quick.

 

Auf der Tastatur sitzen drückt Knöpfe. Knöpfe gedrückt halten macht warm. Happy Kitty.

 

By that I mean randomly generated playlists. Based on either one or multiple tags, songs or artists. Finite or infinite.

Ideally it would allow combining local sources with remote ones for discovering new music. Thinking along the lines of audioscrobbler, Bandcamp and SoundCloud. Maybe one could even hook into Spotify's API, of they allow that.

Does something like this exist? I'm currently running Navidrome and while it's pretty and functional, it's very much a classic Mediaplayer, that just happens to be a website.

18
submitted 2 years ago* (last edited 2 years ago) by Chais@sh.itjust.works to c/liftoff@lemmy.world
 

When the screen blanks liftoff simply resets to the default view. As a result it forgets:

  • The feed you were scrolling through
  • ~~The position in the feed~~
  • The post/comment you were writing

Makes it annoying to write even moderately long posts/comments because you constantly have to be on the lookout for the screensaver or disable it. And how you don't get distracted when authoring a post/comment.

Seeing this on Android 13 and liftoff 0.10.9

 

Embedded image being ![](url).
Scrolling down is no issue but scrolling up leads to the view position jumping back down, as soon as the images starts entering the frame. The only way I found to scroll back up is scrolling really fast. Maybe so the image fully enters the view from one draw to the next.

 

I'm currently running Iodé and an considering switching to Ubuntu phone, but ultimately I'd like to give PostmarketOS a shot. Can the Ubuntu phone support translate to faster development for PostmarketOS?

4
submitted 2 years ago* (last edited 2 years ago) by Chais@sh.itjust.works to c/jerboa@lemmy.ml
 

Title. The language of a post or comment is never displayed, nor can it be defined when writing posts or comments.
This leads to posts/comments with the language set to "undetermined" which leads to them appearing to users that didn't select the actual language.

Edit: Additionally some communities seem to have started disallowing "undetermined" as a post/comment language, leading to Jerboa users being unable to post/comment. I've encountered !foodporn@lemmy.world so far.

3
submitted 2 years ago* (last edited 2 years ago) by Chais@sh.itjust.works to c/main@feddit.de
 

Einige englischsprachige User jammern, dass sie so viele deutschsprachige Posts sehen und infolgedessen die jeweiligen communities komplett blockieren.
Vor diesem Hintergrund stellt sich mir die Frage, ob das nicht automatisch lösbar ist.
Lemmy erlaubt Usern einzustellen, welche Sprachen sie sprechen und merkt an, dass das Abwählen von "undefined" dazu führen kann, dass man kaum mehr Posts sieht. Gleichzeitig habe ich aber beim Posting keine Möglichkeit gesehen die Sprache anzugeben. Die Tatsache, dass ich beispielsweise keine russischen, koreanischen oder sonstige fremdsprachliche Posts außerhalb der von mir angegebenen Sprachen sehe, legt aber nahe dass eine Kennzeichnung existiert.
Passiert das auf Instanzebene? Und falls ja, sollte feddit.de sich einfach als Deutsch markieren, so nicht bereits geschehen?

view more: next ›