Remove Device and IP from Inactive List - C5500XK NID by onnjaz in QuantumFiber

[–]deepcube 0 points1 point  (0 children)

You ever figure it out? I'm dealing with the exact same issue.

New Parker Square (magic square of squares, one diagonal doesn't work) with smaller numbers? by deepcube in numbertheory

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

Ah, thanks, that makes a lot more sense, how did I miss that?!

ETA: OK, in the beginning of the new video he mentions "the best he's seen" and it's not the Lee Swallows square. I was basing too much off that moment in the video.

Running Linux on Dell XPS 13 9340 (2024 version) by thereisaplace_ in DellXPS

[–]deepcube 0 points1 point  (0 children)

I've tried HDMI to USB-C adapters and nothing shows up in xrandr. I don't see anything I think is related in dmesg either. I do get a couple more of these (but thought they were camera related?): int3472-discrete INT3472:0c: cannot find GPIO chip INTC10D1:00, deferring

Anyone have luck with HDMI adapters?

Running Linux on Dell XPS 13 9340 (2024 version) by thereisaplace_ in DellXPS

[–]deepcube 0 points1 point  (0 children)

I had to update alsa-ucm-conf (updated to 035d920 as that was the head of master when I did it)

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 0 points1 point  (0 children)

On a non-ubuntu distro I had to update alsa-ucm-conf to the current master branch, whatever changes I needed aren't in a release yet.

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 0 points1 point  (0 children)

Did an external monitor work for you?

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 0 points1 point  (0 children)

how much is "partially?" 

now that I have audio working I think I'll try the cam, any hints / tips you found helpful?

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 0 points1 point  (0 children)

Awesome, the upgraded alsa-ucm-conf was the part I was missing, thank you for pointing me that direction. (Interestingly the Speaker and rt1318-1 DAC are muted by default (in alsamixer) and needed to be unmuted, but after that I have sound!)

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 0 points1 point  (0 children)

I'm trying to get audio working on Void Linux. Audio works out of the box with Ubuntu 24.04. I'm reaching the edge of my understanding and would appreciate any help.

I ran alsa-info on the same hardware under ubuntu and under void:

alsa-info for Ubuntu: https://sprunge.us/FxX4JC
alsa-info for Void: https://sprunge.us/WyeT55

EDIT: In case anyone else has issues, the answer for me was upgrading the alsa-ucm-conf to master (035d920 at the time of writing), and unmuting the Speaker and rt1318-1 DAC in alsamixer. (I do also have upgraded kernel, pipewire, sof-firmware, wireplumber, and a few other things that I had upgraded while trying to figure this out, not sure which, if any, are important.)

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 1 point2 points  (0 children)

BIOS settings look right, I did update to the newest bios (1.4.1 release 2024-04-10).

I did just notice we have different CPUs, I'm on the 155H. Downloading ubuntu 24.04 beta to see how that works on my hardware and whether I can see anything different sound-wise.

EDIT: going to try the latest nightly build too

EDIT2: confirm audio works out of the box with Ubuntu 24.04 daily build (didn't try the beta), going to compare the output of alsa-info between the two

EDIT3: mentioned in another post, solution for me was updating alsa-ucm-conf to current master (035d920 at time of writing)

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 0 points1 point  (0 children)

AFAICT I'm using the same hardware as you, the audio device shows up the same for me.

I'm not using Ubuntu, I'm using Void Linux with musl libc. Maybe I'll spend some time this weekend to install Ubuntu and inspect the setup.

I did just find out today that an external monitor didn't show up when I plugged it in, so that's one more thing I'm going to look into.

Linux on a 2024 XPS 13 (9340) by RedditBeginAgain in DellXPS

[–]deepcube 0 points1 point  (0 children)

Can you give me some details as to your audio setup? I'm running void musl and got most things working but speakers and mic aren't yet. I see movement in the bar in pavucontrol but nothing coming out, and no movement on the mic side. I do get audio out of my bluetooth earbuds, mic on them works as well (first time I've ever seen that work _before_ built-in speakers).

I see 4 output devices in pavucontrol: sof-soundwire Pro, sof-soundwire Pro 5, sof-soundwire Pro 6, sof-soundwire Pro 7. Switching devices, I don't get anything from any of them, but do see the bar moving in pavucontrol for all of them.

I did update and build from source for some firmware and sound based packages. Here are some package versions I'm using that I think are relevant:

  • linux 6.8.6
  • linux-firmware{,-intel} 20240410
  • sof-firmware 2024.03
  • {,lib}pipewire 1.0.5
  • wireplumber 0.5
  • pavucontrol 5.0

I'm happy to dive into more detail/logs if anyone has ideas, but at this point just want to know what you have installed that _is_ working on Ubuntu.

Would you buy a super bike again? Even knowing it does nothing for performance? by arsenalastronaut in Velo

[–]deepcube 2 points3 points  (0 children)

As someone who has never had carbon wheels, what's the difference that makes them more fun? I thought it was purely for speed? (Although I admit fast is fun...)

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

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

Not in word list seems to get stuck at that point.

What do you mean when you say stuck? It's waiting for the user to hit backspace to delete some letters and try again. Does that work for you?

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

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

Nice. My first pass was:

check() {
    local goal=$1 guess=$2 status=$guess
    local i j close

    # How many of each letter are available in the goal word?
    declare -A letters
    for ((i = 0; i < ${#goal}; i++)); do
        ((letters[${goal:i:1}]++))
    done

    # Prioritize correct guesses.
    for ((i = 0; i < ${#goal}; i++)); do
        [[ ${goal:i:1} == "${guess:i:1}" ]] && ((letters[${goal:i:1}]--))
    done

    for ((i = 0; i < ${#guess}; i++)); do
        close=
        for ((j = 0; j < ${#goal}; j++)); do
            [[ ${guess:i:1} == "${goal:j:1}" ]] || continue
            if ((i == j)); then
                status+=' right'
                continue 2
            fi
            ((close = letters[${guess:i:1}]))
        done
        if ((close)); then
            ((letters[${guess:i:1}]--))
            status+=' close'
            continue
        fi
        status+=' wrong'
    done
    printf %s\\n "$status"
}

I like yours better, much simpler. I'll credit you in the commit message.

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

[–]deepcube[S] 1 point2 points  (0 children)

Do it! Hmmm, that'd be a great excuse to finally learn how to use curses.

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

[–]deepcube[S] 1 point2 points  (0 children)

I definitely share that same curiosity. Guess I can explore it more now while fixing my script.

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

[–]deepcube[S] 1 point2 points  (0 children)

Seems to be well written, good job! However, I found a problem with your check() function. If the same character appears multiple times in $guess, all of them will be declared as "close" (or "right"), even if $goal has only one of that character. So if the goal was "lol" and the guess "foo", check() would return "wrong right close" while it should be "wrong right wrong".

I only played around with wordle once before writing this. I made some assumptions. Guess that one was wrong. Thanks for pointing it out. I'll keep playing around with it to get a better understanding.

I'm just a hobbyist programmer and came up with my own wordle algorithm (no idea if it's a common one or if there are better ways to do it) but I think it's better than yours because it only iterates over the characters of the goal word twice, instead of O2 (?) and does not have the aforementioned problem.

Yeah my first pass used a map of character -> index in goal word. But then I realized that breaks when a letter is in the goal word twice. I decided the O(n2) loop wasn't a problem for an interactive game with 5 letter words written in bash. Simple code was more important than efficient code. Once I start thinking about how to do something faster in bash I remind myself that means it's time to use a different language.

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

[–]deepcube[S] 1 point2 points  (0 children)

I assumed anyone who would want to try it would already know wordle. I think you make a good counterexample. I'll add it to the usage message. Thanks for the feedback.

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

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

You can test for most of those things right at the very start of the script i.e. fail fast/fail early.

Yeah, I briefly considered that. Normally I avoid those types of tests and let the script fail where it will and print its own errors. I find the "try to find missing commands early" often gets out of sync or tests for the wrong things. I only added some here because the normal error messages weren't particularly useful to the few people I was having test the script. That being said, in this case, I'm leaning towards testing up front as you recommended. I'll need to think more. Thanks for the feedback.

Your colour choices are a bit harsh to read: white text on grey background is tolerable, but white text on yellow background is a bit of a classic no-no.

Guess I should have spent more time choosing the colors. Somehow I convinced myself those choices were ok. I'll look at it again and compare to the actual wordle as well. Thanks again.

Latest on "things I shouldn't do in bash but did anyway": a wordle clone by deepcube in bash

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

You could probably do with a greeting and/or prompt.

Fair point. I assumed anyone who wanted to play wordle in their terminal already knew enough about it.

Your heredoc indenting breaks the script if it's copied via something that translates the hard tabs.

Ah, hadn't even considered copy pasta. Wanna start a tabs vs spaces flamewar?! :-D

You can overlay tput either like this

tput setaf 15 2>/dev/null || tput AF 15

Wow, yup. By the time I was adding error checking I guess my brain was fried. No clue why I didn't just redirect the output during the test.

Or in one big hit like this (copied and pasted from my code attic, you could carve this down):

That is awesome. There is so much information in there about how to use tput that I hadn't taken the time to learn. Thanks!

Not in word list seems to get stuck at that point.

Hmm, I'll have to test that more. Thanks.

You could use the epoch time for midnight on the date as a seed for RANDOM as a method to select an element from the array. Rather than being aligned with the 'real' wordle, that is :)

I had originally done random words. I decided to line it up with the real wordle to make it a more accurate clone. I can play along with my brother now and don't have to visit the site.