programmer_humor

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

gravitas_deficiency, in Good luck web devs

Who hurt you

lynx, in Good luck web devs

How can you do fractional rotation? Does it only work with x11 or is it also supported in wayland?

AgnosticMammal,

I was looking into this earlier to try fixing a display that was being offset on an old tv screen. The display was going off the left side of the TV, causing a black bar on the right side.

I was trying xrandr, and fixed it somewhat by offsetting the display back, but somehow it did not fix the right side - it seemed as if the display had went under the black bar.

But yeah you can offset, stretch, skew and rotate with xrandr

Auzymundius,

Did you check the actual TV settings? Some of them let you adjust where picture is displayed iirc.

AgnosticMammal,

It only had two modes for the VGA source, 16:9 and 4:3. The 16:9 is the right ratio for the laptop but had the offset issue. The 4:3 makes it stretched out / squashed, but it doesn’t have the offset issue.

lynx, (edited )

The –rotate normal,inverted,left,right does not work, but you can use the transform option to achieve the same effect. To create the transformation matrix you can use something like: angrytools.com/css-generator/transform/

  • for translateXY enter half the screen resolution
  • don’t copy the generated code, it has the numbers in the wrong order just type out the matrix row wise.

The final command looks like this:

xrandr --output screen-1 --transform 0.87,-0.50,960,0.50,0.87,540,0,0,1

To restore the original use (type this in first, because if you screw up you might not be able to see anything anymore):

xrandr --output screen-1 --transform 1,0,0,0,1,0,0,0,1

I tested it on x11.

Vilian,

in wayland the compositor is king they can do mhatever they want with the screen

m.youtube.com/watch?v=ZBLLC5fOy98&list=PLb7YRKEhW…

backhdlp,
@backhdlp@lemmy.blahaj.zone avatar

Time to ask the wayfire devs to implement fractional screen rotation.

Chewy7324,

Rotating the display by a custom angle is possible through xrandr on X.org.

There’s no Wayland protocol for custom angle rotation, and I don’t expect anyone to create a protocol extension without a use-case.

My wild guess: Theoretically it should be possible for a compositor to support similar custom rotation, as applications simply draw to their surface (window), without knowing how and where it is displayed on the viewport (display).

But it might require quite a bit of work, depending on the project, so I don’t expect to ever see custom rotation on anything besides smaller/niche compositors.

[1] unix.stackexchange.com/…/rotate-a-display-by-cust…

grue,

There’s no Wayland protocol for custom angle rotation, and I don’t expect anyone to create a protocol extension without a use-case.

[gestures at thread] Does this not count??? 😁

Seriously, though: I suspect there might be non-novelty use-cases in mobile devices, especially things like smart watches. Those aren’t beyond the scope of Wayland in the long run, are they?

Zangoose,
@Zangoose@lemmy.world avatar

Ok I was joking with the images but now that I think about it this would likely be pretty useful to have on smart watches with circular displays.

E.g. having the watch face rotating to face towards the wearer would be a pretty neat concept. Definitely something I’d want a toggle for though.

barsoap,

Smart watches tend to be microcontroller class devices because even though you can fit something powerful in there, powering it and heat dissipation make it silly.

The usual embedded-type application for wayland that it’s even especially designed for is automotive: Things without window management but not particularly hardware-restrained. Also think public transit ticket machines, ATMs, such things. In that sense, from wayland’s perspective android is already desktop.

nintendiator,

There’s no Wayland protocol for custom angle rotation, and I don’t expect anyone to create a protocol extension without a use-case.

Puh-lease. It’s Wayland; the devs fully and honestly expect every app developer (eg.: calc, Libreoffice, notepad.exe) to implement custom angle rotation on their own.

corsicanguppy, in Release notes of an open source app. Someone is pretty mad at Canonical for Snap

Having worked with Unix and Linux for 29 years, some of it deep in os security, I strongly believe

  • canonical is good at hiding the fact they’re evil as hell
  • snap is a bag o shite

Cheers to this guy.

AVincentInSpace,

Canonical wants to be Microsoft so bad

criticalimpact, (edited ) in GitHub Desktop or Git CLI?

CLI
Though I will admit it took me a while to get there
git add -i is where the true magic begins

stepanzak,

TIL!

FiskFisk33,

git log --graph --oneline --all

hakunawazo,

Also part of the Cli magic is a pretty git log tree like that:
https://lemmy.world/pictrs/image/3302d15a-1370-4f02-bc0d-5ec00c0c20f6.png
stackoverflow.com/questions/1838873/…/34467298#34…

And a proper diff tool like vim:

git config --global diff.tool vimdiff git config --global difftool.prompt false

(Current diff could be closed with :qa. All diffs could be closed with :cq).

QuazarOmega, in Me and my new GitHub repository

Better to have tried and stopped than never to have started at all

hypnotic_nerd,
@hypnotic_nerd@programming.dev avatar

Exactly 💯

QuazarOmega,

Heck yeah, you always learn something after all!

spudwart, in what's the difference?
@spudwart@spudwart.com avatar

Grub and GrubHub

nxdefiant, (edited )

Using food as the analogy:

Food…Code

Kitchen…Dev Environment (IDE, PC, etc)

Serving…Deploying

ok good so far

When I’m done with code I’m not going to deploy yet I commit and store it on a branch in git.

When I’m done making food that I’m not going to serve yet, I store it in a fridge or pantry.

When I need external code, I grab it from GitHub. When I need ingredients, I grab them from the grocery store.

So I think Food Storage, is the closest analog to git. I have local storage (pantry, fridge) that I can use to store food I have acquired.

Which would mean the grocery store is the closest analogy, but not a restaurant. Or maybe a grocery store with a restaurant.

ryry1985, in isEven API

I love that it works and the ads are pretty good.

pomodoro_longbreak, in Not mocking cobol devs but yall are severely underpaid for keeping fintech alive
@pomodoro_longbreak@sh.itjust.works avatar

In Canada, the Ministry of Health pays colleges to teach kids COBOL and JCL. It’s a steady job, pension, good bennies. I know a handful of people who went that route, rather than the riskier private sector.

noobdoomguy8658,

Would you happen to know how that compares to saying “Fuck it” and going with a Java career for the relative predictability? I’m not asking for any particular reasons, just curious.

pomodoro_longbreak,
@pomodoro_longbreak@sh.itjust.works avatar

I know some Java folks, but my sampling is biased because I meet them where I work - places that predominantly use the younger languages. Actually, I happen to know that the MoH in particular (and probably lots of other institutions) wrap their COBOL/JCL in a lot of Java, so that most devs never need to dive into the “real backend” if they want to just stay at the Java level.

Java people seem like family people. But from what I’ve observed, their job doesn’t seem any different. You can work in javascript, or python, and still insist on clocking out at 16, 1700. But I only work at startups or seat of your pants kinds of places, so I know about what I hear. 🤷

Dukeofdummies, in Programmer tries to explain binary search to the police

I mean, in the era of VHS this won't work because ultimately you're fast forwarding and rewinding. So you're gonna watch it anyway. but in the digital era I thought this would be what any Police officer did?

Like... they're not even gonna spend 10 minutes on a theft?

funkless_eck,

my guy half of them don’t spend 10 minutes on a murder. There’s a reason it’s called detective fiction

Dukeofdummies,

I know but if they were smart they'd say they're gonna take an hour to do it, find the footage in 10 minutes and goof off another 50.

Pull a Scotty, then you're productive and lazy. It's just disappointing they can't even procrastinate properly. I feel bad.

SpaceNoodle,

if they were smart

I gotta stop you right there

Deceptichum,
@Deceptichum@kbin.social avatar

Like... they're not even gonna spend 10 minutes on a theft?

What and be responsible for paperwork?

Cops are the biggest bludges you’ll ever meet.

sneaky_hecker, in DO NOT MERGE
@sneaky_hecker@lemmy.world avatar

Even if it was merged I’d be more concerned how on earth you have infinite Firefox tabs open

lone_faerie,

It’s when you have more than 99 tabs open

DreadPotato,
@DreadPotato@sopuli.xyz avatar

What kind of psychopath has that many tabs open!?

CrypticCoffee,

I take personal offense to that. How do you not?

Kusimulkku,

I close all the tabs regularly. Bookmark for those that I need to save for longer than one session

DreadPotato, (edited )
@DreadPotato@sopuli.xyz avatar

I bookmark stuff I need at a later time, or will need again, and read the stuff I want to read now and close the tab when I’m done.

Daeraxa,

I got to that once, on mobile I’ve never worked out the rule for when FF opens a new tab vs opening a site in your current tab. They just kind of silently accumulate.

DreadPotato,
@DreadPotato@sopuli.xyz avatar

Yeah it’s a bit weird with FF, I just purge open tabs for unnecessary tabs daily.

loutr,
@loutr@sh.itjust.works avatar

There’s a setting to auto-close tabs after a certain amount of time.

DreadPotato,
@DreadPotato@sopuli.xyz avatar

I like to be in control of what gets closed and when, so nothing gets closed before I bookmark it if need it.

mexicancartel,

“Oh no! What if I need it later”

~ me, more than 99 times

leds,

Yeah that’s the problem I have, started while ago. It opens a new tab instead switching to existing tab.

poplargrove, (edited )

I keep tabs open as a sort of “read page later” list. I never seem to get to reading them though.

DreadPotato,
@DreadPotato@sopuli.xyz avatar

So do I, for a few days. If I haven’t read it by then, I’ll either bookmark for later or just close. I pretty much never have more than 10-15 active tabs ever.

ripcord,

As we know, scientists have not yet discovered any numbers past 99

aseriesoftubes, in “It’s not that hard”

Shut the fuck up, Lonny. You’re out of your element.

NounsAndWords, in Revisiting code I wrote last year

Considering last year was six days ago…I agree.

Illecors, in Good luck web devs

I remember seeing the video of this. The guy was doing it for shits and giggles, but it ended up looking great!

mexicancartel,

Can you link it?

Illecors,

No idea what it was, sorry. One of the youtube recommendations at the time.

pimeys, in GitHub Desktop or Git CLI?

Magit

akkajdh999,

fugitive

RePierre,

I was looking for someone to mention Magit. It just rocks!

h_a_r_u_k_i,
@h_a_r_u_k_i@programming.dev avatar

This + org-mode are enough for me to switch to Emacs.

felbane, (edited ) in Need a rust version too.

Rust: You declare the castle type as unsafe and then search for a crate with a rescue_princess function. You discover the princess you rescued is a femboy wolfkin named Pawws. You now have pubic lice and an inexplicable smug sense of superiority.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #