This profile is from a federated server and may be incomplete. Browse more on the original instance.

gamma,
@gamma@programming.dev avatar

Its incredibly common to be thrown by this. Like many memes, the original incarnations were to be taken at face value, but then a layer of irony got applied, and the ironic/self-deprecating variant became the norm.

gamma,
@gamma@programming.dev avatar

If you use EndeavourOS, know that you shouldn’t ask for support on the Arch forums, its a policy they have.

gamma,
@gamma@programming.dev avatar

Nope, confirmed different mobo.

gamma,
@gamma@programming.dev avatar

The upside of not changing the I/O is accessory compatibility.

gamma,
@gamma@programming.dev avatar

You know, in some systems that’s a crit success!

gamma,
@gamma@programming.dev avatar

I use the web version in Vivaldi, I’ve always had issues with video calls in Gecko.

gamma,
@gamma@programming.dev avatar

It varies. Reddit is/was the primary forum for a number of projects, and as each sub is community moderated, could be quite rich, even if the whole is “generally full of garbage”.

gamma,
@gamma@programming.dev avatar

Hard agree. I’ve played exclusively with one group, and we’ve only ever played with Into the Odd-style combat. It’s been plenty expressive for us.

gamma,
@gamma@programming.dev avatar

I get your point. Since a .tar.zst file can be handled natively by tar, using .tzst instead does make sense.

gamma,
@gamma@programming.dev avatar

16x10 means retro 4x3 games look much better.

Ask Lemmy: Traditional vs natural mouse scrolling; which do you use?

Despite being a heavy cell phone user for more than 25 years, it only recently occurred to me that vertical navigation on most phones is inverted when compared to traditional computers. You swipe down to navigate upward, and up to navigate downward. I recently spent time using a MacBook, which apparently defaults to this...

gamma,
@gamma@programming.dev avatar

Yep, my Sway config has


<span style="color:#323232;">input type:touchpad natural_scroll enabled
</span>
gamma,
@gamma@programming.dev avatar

I have it on Steam Deck since it can be launched with a CLI argument to force a 1280x800 window.

Vivaldi pretends to be Edge when visiting Bing to unlock GPT-4, and prefer that to Edge on my other devices. (Secondary to Firefox, ofc)

gamma,
@gamma@programming.dev avatar

That would make my shell unusable, since some plugins use ./source.

gamma,
@gamma@programming.dev avatar

(NOTE: A lot of my more interesting “aliases” are actually short functions, but I’m keeping myself to alias.)

Some of mine that I haven’t seen yet:


<span style="color:#323232;"># Simple python calculator
</span><span style="color:#323232;">alias pycalc='python3 -ic "
</span><span style="color:#323232;">from math import *nimport cmath as C
</span><span style="color:#323232;">try:
</span><span style="color:#323232;">    import numpy as np
</span><span style="color:#323232;">except:
</span><span style="color:#323232;">    pass
</span><span style="color:#323232;">i, j = 1j, 1j
</span><span style="color:#323232;">"'
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Defaults
</span><span style="color:#323232;">alias cp='cp --interactive --reflink=auto'
</span><span style="color:#323232;">alias gcc='gcc -fdiagnostics-color=auto'
</span><span style="color:#323232;"># Lemmy doesn't handle ampersands in codeblocks correctly
</span><span style="color:#323232;">alias rg='rg --max-columns=$((COLUMNS > 60 &amp;&amp; ! ZSH_SUBSHELL ? COLUMNS - 30 : 0))'
</span><span style="color:#323232;">alias rj='rg --json'
</span><span style="color:#323232;">alias rm='rm -s'
</span><span style="color:#323232;">alias rscp='rsync -azP --human-readable --info=flist0,progress2,stats1'
</span><span style="color:#323232;">alias rust-c='rustc --out-dir build -O'
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Shorter forms
</span><span style="color:#323232;">alias g=git
</span><span style="color:#323232;">alias v=$VISUAL
</span><span style="color:#323232;">alias py=python
</span><span style="color:#323232;">alias jfeu='journalctl --user -xfeu'
</span><span style="color:#323232;">alias sys='systemctl --user'
</span><span style="color:#323232;">alias Jfeu='journalctl -xfeu'
</span><span style="color:#323232;">alias Sys=systemctl
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Desktop stuff
</span><span style="color:#323232;">alias trash='gio trash'
</span><span style="color:#323232;">alias ud=udisksctl
</span><span style="color:#323232;">alias y=wl-copy
</span><span style="color:#323232;">alias Y='wl-copy -p'
</span><span style="color:#323232;">alias p=wl-paste
</span><span style="color:#323232;">alias P='wl-paste -p'
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Colorize with acolor/grc
</span><span style="color:#323232;">alias GRC='grc -es'
</span><span style="color:#323232;">alias LA='acol ls -lFAhb --color'
</span><span style="color:#323232;">alias LS='acol ls -lFhb --color'
</span><span style="color:#323232;">alias df='GRC df -hT'
</span><span style="color:#323232;">alias dig='GRC dig'
</span><span style="color:#323232;">alias docker='GRC docker'
</span><span style="color:#323232;">alias docker-machine='GRC docker-machine'
</span><span style="color:#323232;">alias env='acol env'
</span><span style="color:#323232;">alias lsblk='acol lsblk'
</span><span style="color:#323232;">alias lsmount='command mount | rg --color=never "^/" | acol -i -o mount'
</span><span style="color:#323232;">alias lspci='acol lspci'
</span><span style="color:#323232;">alias mount='acol mount'
</span><span style="color:#323232;">alias nmap='acol nmap'
</span><span style="color:#323232;">alias ping='GRC ping'
</span><span style="color:#323232;">alias ps='GRC ps --columns $COLUMNS'
</span><span style="color:#323232;">alias traceroute='GRC traceroute'
</span>
gamma,
@gamma@programming.dev avatar

I know; I’m not talking about ./. I put the slash outside the inline codeblock in the parent comment.

My shell is setup with a chdir hook to [[ -r. /.autoenv.zsh ]] &amp;&amp; . ./.autoenv.zsh.

(Edit: Jerboa is bugged with “&” in codeblocks, that should be a “&&”, not &amp;&amp;)

gamma,
@gamma@programming.dev avatar

features

  • mixed refresh rates
  • (not GNOME) mixed VRR/nonVRR
  • (not GNOME) Better mixed DPI?
  • (not yet, experimental in gamescope) HDR support
  • (not yet, experimental in KDE) persistence through compositor restart

It was the inability to add features like mixed refresh which caused Xorg devs to push for a new protocol. Otherwise it would be yet another series of janky patches to break assumptions made in a 40 year old protocol.

Other devs have been working on it. Valve’s contributions to wlroots, KDE, and gamescope can’t be understated.

gamma, (edited )
@gamma@programming.dev avatar

They are becoming more essential by the day. HDR and VRR is supported by just about every graphics card for the last 5 years, and displays which support both can be found for $200 or less. Valve had a reason to add HDR support to Gamescope/Steam Deck; it is a highly requested feature.


I will agree with you on one point: Xorg is not bad code. Xorg is an awesome project, and has developed and changed to the needs of users exceedingly well for decades. But X11 itself is tech debt. The first ten years of Wayland were spent paying that debt off (while simultaneously continuing Xorg development).

If the features aren’t what you need, then Wayland wasn’t built to support you today. But you might find yourself in 6 years looking at a gorgeous HDR display which works out-of-the-box on your favorite Linux distro thanks to Wayland.

gamma, (edited )
@gamma@programming.dev avatar

14 years later the need is slowly growing so the support is slowly growing

Yes! I agree wholeheartedly. Adoption has been slow because Wayland did not meet the needs of most people more than Xorg did. Cinnamon isn’t moving any time soon because the value-add isn’t enough for the average desktop user.

But…

build something that people need

People have needed HDR and VRR for years. HDR is essential for professionals in video and image editing. They needed Wayland years ago, and it was being built with them in mind, not just the average desktop user in 2012.

Not every feature is used by every user of that software. I used X-forwarding over SSH once, ever. It did not add any value to me. SSH forwarding adds no value to the average user either. But it is essential to someone.

gamma,
@gamma@programming.dev avatar

I was curious about what they’d say next. Their argument is “most users don’t need more than Xorg, so it’s ‘silly’ to expect investment in Wayland”.

I found some agreement in “as more people need Wayland features, investment will grow”, especially with the Valve and KDE/wlroots/gamescope. Also Automotive Grade Linux embracing libweston.

gamma, (edited )
@gamma@programming.dev avatar

Well, those requires D-Bus. The wlroots project decided early on to support non-dbus software stacks, so wlroots compositors expose Wayland protocol extensions which could either be used directly or wrapped by the xdg-desktop-portal-wlr daemon.*


*(Well… many wlroots devs argued that the ecosystem should have chosen WP extensions instead of dbus, but I think most relented when Pipewire entered the equation.)

gamma,
@gamma@programming.dev avatar

Valve should get on this for gamescope, imagine Steam Deck doing a system update without closing your game.

gamma,
@gamma@programming.dev avatar

zstd or leave

gamma,
@gamma@programming.dev avatar

It used to use project folders, but due to confusion/user error was changed in 3.0.

gamma,
@gamma@programming.dev avatar

Video files are just a bunch of zip files in a trenchcoat.

gamma,
@gamma@programming.dev avatar

Thought I’d check on the Linux source tree tar. zstd -19 vs lzma -9:


<span style="color:#323232;">❯ ls -lh
</span><span style="color:#323232;">total 1,6G
</span><span style="color:#323232;">-rw-r--r-- 1 pmo pmo 1,4G Sep 13 22:16 linux-6.6-rc1.tar
</span><span style="color:#323232;">-rw-r--r-- 1 pmo pmo 128M Sep 13 22:16 linux-6.6-rc1.tar.lzma
</span><span style="color:#323232;">-rw-r--r-- 1 pmo pmo 138M Sep 13 22:16 linux-6.6-rc1.tar.zst
</span>

About +8% compared to lzma. Decompression time though:


<span style="color:#323232;">zstd -d -k -T0 *.zst  0,68s user 0,46s system 162% cpu 0,700 total
</span><span style="color:#323232;">lzma -d -k -T0 *.lzma  4,75s user 0,51s system 99% cpu 5,274 total
</span>

Yeah, I’m going with zstd all the way.

gamma,
@gamma@programming.dev avatar

*Thank you engineers who happen to be working at Facebook

gamma,
@gamma@programming.dev avatar

awk for the modern age

gamma,
@gamma@programming.dev avatar

Comparing Arch’s base +base-devel is kinda unfiar, there’s only 54 packages total there.

gamma,
@gamma@programming.dev avatar

type -p is a shell builtin though, and one character shorter :)

Although you may prefer tool=$(command -v tool)

gamma,
@gamma@programming.dev avatar

I’ve heard that this is what is causing SteamOS 3.5 to take so long.

gamma,
@gamma@programming.dev avatar

Not all communities I want to follow made the transition. I’m still on Reddit for HFY, and some smaller game communities.

But Lemmy has replaced a sizable chunk of my Reddit usage, especially around more technical topics.

Signal is Flawed, Why XMPP is Amazing! (new animated video) (monero.town)

Some will curse me out for discussing decentralization and freedom. I am NOT saying the average person should be concerned with CIA spying. What I’m saying is that one should promote decentralized internet infrastructures that empower the individual over corrupt institutions, even though this threat model likely does not apply...

gamma,
@gamma@programming.dev avatar

It requires a phone number to log in. That already kills any hope for anonymity. I use it to message family and close friends, of which the fact that I’m messaging them is not surprising.

gamma,
@gamma@programming.dev avatar

I run my Nextcloud behind Tailscale, and Caddy handles theTailscale https certs.

Met a nice lady at the grocery store

Today at the grocery store a sweet older lady approached me and asked if I knew anything about computers. I said yes I do, and she produced a mouse saying that her son set up Linux mint for her and she was wondering if the mouse was compatible. It needed kernel version 2.6 or newer so I said that the mouse should work, guessing...

gamma,
@gamma@programming.dev avatar

My experience is still a good success rate there. Back in ~2015 my family got an USB WiFi card which needed an out-of-tree module, which the manufacturer had on Github, complete with DKMS instructions. It was upstreamed after about a year, though!

The only completely unsupported device I’ve had is my laptop’s fingerprint sensor.

gamma, (edited )
@gamma@programming.dev avatar

It’s interesting, the results here are way different than the Code Golf & Coding Challenges Stack Exchange. I would never expect Haskell to be that low. But after looking at code.golf, I realize it’s because I/O on CG&CC is more relaxed. Most Haskell submissions are functions which return the solution.

Sidenote: I like the CG&CC method, it’s semi-competitive, semi-cooperative.

  • all languages welcome
  • almost all users post “Try it Online”/“Attempt This Online” links
  • most users post explanations under their submissions
  • often people will post solutions beginning with “port of user1234’s excellent Foolang answer” when there’s a clever shortcut someone finds
  • or people will post their own solution with "here’s a solution which doesn’t use user1234’s algorithm"
  • or people will add comments to answers with minor improvements

IMO It’s geared towards what is the best part about code golf: teaching people about algorithm design and language design.

gamma,
@gamma@programming.dev avatar

I think this is a good default.

An impossible dream of mine would be to check a list of devices with haptic touchpads, and disable tap-to-click on those.

gamma, (edited )
@gamma@programming.dev avatar

Typically find “$HOME/docs”, but with a few caveats:

  • In Zsh or Fish, the quotes are unnecessary: find $HOME/docs
  • If I’m using anything potentially destructive: mv “${HOME:?}/bin” …
  • Of course, if it’s followed by a valid identifier character, I’ll add braces: “${basename}_$num.txt”
gamma,
@gamma@programming.dev avatar

This isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.

gamma,
@gamma@programming.dev avatar

This has never stuck with me, and I hadn’t thought about why until now. I have two reasons why I will always write ${x}_$y.z instead of ${x}_${y}.z:

  • Syntax highlighting and shellcheck have always caught the cases I need to add braces to prevent $x_ being expanded as ${x_}.
  • I write a lot of Zsh. In Zsh, braces are optional in way more cases. “$#array[3]” actually prints the length of the third item in array, rather than (Bash:) the number of positional parameters, then the string ‘array[3]’.
gamma,
@gamma@programming.dev avatar

in the OP

My reply is to a commenter who said they prefer “${HOME}/docs” over both options in the original image (“$HOME/docs” or “$HOME”/docs). Many people prefer to always include braces around the parameter name out of consistency, instead of only when they are required.

My comment explained why my habit is to only include braces when they are necessary.

gamma,
@gamma@programming.dev avatar

Yep, I’m finding about half of my Reddit usage satisfied. I’ve got all the technical talk I want, but no gaming or writing communities.

gamma,
@gamma@programming.dev avatar

I’m pretty sure both are possible in xkb. But you’ll have to learn how to get a custom xkb_keymap into your DE of choice. I only learned enough to do one mapping:


<span style="color:#323232;">xkb_keymap {
</span><span style="color:#323232;">	xkb_keycodes  { include "evdev+aliases(qwerty)" };
</span><span style="color:#323232;">	xkb_types     { include "complete" };
</span><span style="color:#323232;">	xkb_compat    { include "complete" };
</span><span style="color:#323232;">	xkb_symbols   {
</span><span style="color:#323232;">		include "pc+us+inet(evdev)"
</span><span style="color:#323232;">		key  {
</span><span style="color:#323232;">			type= "TWO_LEVEL",
</span><span style="color:#323232;">			symbols[Group1] = [  Multi_key,                Caps_Lock ],
</span><span style="color:#323232;">			actions[Group1] = [ NoAction(), LockMods(modifiers=Lock) ]
</span><span style="color:#323232;">		};
</span><span style="color:#323232;">		key  {[ Escape ]};
</span><span style="color:#323232;">	};
</span><span style="color:#323232;">	xkb_geometry  { include "pc(pc105)" };
</span><span style="color:#323232;">};
</span>

This remaps Capslock to Escape, Escape to Compose, and Shift+Escape to Capslock. Not what you want, but hopefully this will give you a starting point to playing/breaking xkb.

Another benefit of doing this with xkb: it’s now a separate codebase from X.org, and is used in every Wayland compositor I know of.

gamma,
@gamma@programming.dev avatar

I look forward to the day that Synapse is deprecated in favor of Dendrite or Conduit.

gamma,
@gamma@programming.dev avatar

My Linux review: 10/10, would recommend, but would not install for someone and let them use it for the next 5 years.

gamma,
@gamma@programming.dev avatar

Excuse me, OCI container, we’re a runtime-agnostic family here.

zsh or fish for an intermediate Linux user?

So I’ve been using Linux now for a while, and am looking to migrate my dev environment to vim and spend more time in the command line. I’m fairly comfortable with bash but by no means an expert. I’ve used zsh with some minor customization but just recently learned about fish. I’d love to hear people’s opinions.

gamma,
@gamma@programming.dev avatar

I learned Fish by helping someone else in a chat. There’s a lot of cool things, and I think it’s an excellent shell. Fish is an excellent choice for a shell.

Zsh is a much more featureful language (with globbing/subscript/PE flags, native floating point arithmetic, the whole man zshmodules), which doesn’t necessarily make it a better shell. But I like those features, and I find it to be a natural choice to write more complex programs which normally would be a code smell for Bash.

The plugin ecosystem for is much larger than Fish’s as well.

gamma,
@gamma@programming.dev avatar

With embedded terminal escapes? True evil indeed.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines