Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Perplx
Jun 26, 2004


Best viewed on Orgasma Plasma
Lipstick Apathy
I’m fixing a Perl script at work and I want to rewrite it in ansible so bad

Adbot
ADBOT LOVES YOU

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

fresh_cheese posted:

yea but its gross

who gives a poo poo. if i think i can write something in bash faster than i could write it in a more robust language, i'm going to write it in bash

if it needs arrays it needs arrays

FlapYoJacks
Feb 12, 2009

BobHoward posted:

you're writing shell scripts serious enough to version control, ci/cd, and lint

deep shame

vagrant. not my choice.

outhole surfer
Mar 18, 2003

bash has arrays

poo poo, bash has associative arrays

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

outhole surfer posted:

bash has arrays

poo poo, bash has associative arrays

yeah and they work perfectly fine. the syntax even mostly makes sense

who gives a poo poo that it's bash

fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE
yea, build it slowly and itll be less likely youll rm -rf / somepath/oshitwtf

i also substitute ls for rm while developing the loop and then cmd history edit in the rm for the real run

outhole surfer
Mar 18, 2003

i usually debug with echo prefixes

fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE

Beeftweeter posted:

yeah and they work perfectly fine. the syntax even mostly makes sense

who gives a poo poo that it's bash

i have done worse in bash. i wrote a firstboot personalization cloud init thing in bash, and it worked fine

dont overengineer poo poo. it only needs what it needs.

im just sayin where my limits are, now.

to be honest tho, my python looks a lot like my bash

lovely

fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE

outhole surfer posted:

i usually debug with echo prefixes

gently caress i debugged a nova compute driver with a shitton of printf()

no shame

mycophobia
May 7, 2008
is there some other way to debug besides writing print("got here") in random spots

matti
Mar 31, 2019

Beeftweeter posted:

yeah and they work perfectly fine. the syntax even mostly makes sense

who gives a poo poo that it's bash

do you like perl i like perl

outhole surfer
Mar 18, 2003

mycophobia posted:

is there some other way to debug besides writing print("got here") in random spots

in bash it's more like


$ for i in $(gen-shitshow); do echo deal-with-shitshow $i; done

deal-with-shitshow dumb_colleague
deal-with-shitshow sales_sold_something_we_havent_built_yet
deal-with-shitshow ran_out_of_fucks
deal-with-shitshow us_east_1

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

matti posted:

do you like perl i like perl

i don't really know perl. i've edited scripts and muddled my way through with documentation but i've never actually written anything substantial myself

matti
Mar 31, 2019

i think you would like it

fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE

matti posted:

do you like perl i like perl

i find perl terrifying

regex doesnt bother me

its the 30 different ways to do the same thing that bothers me

dowloading crap from cpan and running it as root also seems like a bad idea

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

matti posted:

i think you would like it

probably, i just haven't had a reason to pick it up i guess. it wasn't all that hard to edit so i guess i could probably learn it relatively quickly

Progressive JPEG
Feb 19, 2003

Amethyst posted:

my 2018 dell xps 13 is dying. is anyone running ubuntu on a 2024 xps 13? Preferably jammy

i have an xps 13, it's got only got 2 usb ports and you're supposed to be using one of them to charge the laptop with

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN
iirc the 2024 xps has a dedicated bing ai button too lol

Progressive JPEG
Feb 19, 2003

oh and the 2nd port is where your usbc yubikey goes

fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE

Beeftweeter posted:

iirc the 2024 xps has a dedicated bing ai button too lol

what the sam hill?

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

fresh_cheese posted:

what the sam hill?



capacitive f-keys too

Shaggar
Apr 26, 2006
they guy who made the good XPSes left Dell and they turned bad pretty much immediately

fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE
goddammit redmond

you can remap it to something useful like a “paste rickroll url” or similar, right ?

Progressive JPEG
Feb 19, 2003

i assume it's just Super_R with new branding

Progressive JPEG
Feb 19, 2003

anyway the xps13 i've got is from 2021 or 2022 or thereabouts so it doesn't have that

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

fresh_cheese posted:

goddammit redmond

you can remap it to something useful like a “paste rickroll url” or similar, right ?

nope the article specifies that you can't. lol https://arstechnica.com/gadgets/2024/01/the-dell-xps-laptop-as-we-know-and-love-it-is-no-more/

fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE
burn it all

pseudorandom name
May 6, 2007

Progressive JPEG posted:

i assume it's just Super_R with new branding

I assume it generates Windows-C

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

Beeftweeter posted:

probably, i just haven't had a reason to pick it up i guess. it wasn't all that hard to edit so i guess i could probably learn it relatively quickly

that's how perl sucks its victims in, yes

spankmeister
Jun 15, 2008






BlankSystemDaemon posted:

That's a toast I'll drink to; I was actually thinking about having a finger of Bushmmills.
What're you having?

i was killing off the heel of a bottle of Loch Lomond 12 Inchmurrin, which is their fruity style. Loch Lomond is an interesting distillery, they have a couple of different and unique stills that allow them to make various styles of whisky (light, heavy, smokey, fruity, etc.) all in house. I liked the Inchmurrin but I think I prefer the "regular" Loch Lomond. Still, not a bad whisky.

shackleford
Sep 4, 2006

Beeftweeter posted:



capacitive f-keys too

wtf is going on to the right of the backspace key

corona familiar
Aug 13, 2021

shackleford posted:

wtf is going on to the right of the backspace key



gotta upgrade to the more premium trim

FlapYoJacks
Feb 12, 2009

mycophobia posted:

is there some other way to debug besides writing print("got here") in random spots

set -x

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

shackleford posted:

wtf is going on to the right of the backspace key

i think its a fingerprint reader. the one on my chromebook doesn't look that stupid but it does just look like a key, not infrared filtered looking like the touchid sensor on macbooks. and it's in the same spot

Soricidus
Oct 21, 2010
freedom-hating statist shill

fresh_cheese posted:

i find perl terrifying

regex doesnt bother me

its the 30 different ways to do the same thing that bothers me

if you think Perl is scary, never try to format a string in python, the number of different ways to do it might scar you for life

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:

Beeftweeter posted:

that reminds me

you could have just done

for disk in $(ls /dev/disk/by-id); do disk=${disk%-part*}; smartctl -a /dev/disk/by-id/${disk##*/} >$disk; done

(i guess?)

e: yeah i actually tried it now, i had the variables reversed

Far too complicated for the kind of one-liner I do late into the day. Also, using ls in the for is a hanging offense where I live.

Truga
May 4, 2014
Lipstick Apathy
yeah don't use ls in scripts what the hell

re:perl, i don't like perl because i only "use" it when i have to fix a script that's been working fine since 1994, because some dumbass idiot changed an api workflow or some poo poo

otoh, i like perl because a script that's been working since 1994 still works exactly the same in tyool 2024 on the latest perl version, unlike almost every modern script language. there's no version dependecy hell, you install perl and it runs your script from 30 years ago

Cybernetic Vermin
Apr 18, 2005

not about to write any perl, but it is basically perfect for the purpose of zero-friction drop-in for the likes of bash and awk, only way more competently done (e.g. certainly more hygienic about random string interpolation than bash), and if there's some detail of a unix'ish environment you need to deal with perl will almost certainly be at least as competent as any alternative at it.

that said the world had been better had tcl just won out as the scripting/tooling/configuration format.

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

Cybernetic Vermin posted:

that said the world had been better had tcl just won out as the scripting/tooling/configuration format.

every time i have to write tcl (which i sometimes do, because it did kinda win in certain niches), i have to google for information about how to do poo poo. all this ever seems to find is mailing list arguments between tcl graybeards which got copied into a wiki article and called "documentation". not really the language's fault but trying to suss the truth out of that pile of noise is an extremely irritating way to try to learn how to write tcl, lol

also tcl somehow manages to be less straightforward than perl. idk, maybe my brain is broke, but i just don't get tcl or see why anyone would want to use it. my go-to plang is python3 because even though it sucks, the magnitude of its suckage is mostly less than perl

Adbot
ADBOT LOVES YOU

BlankSystemDaemon
Mar 13, 2009




spankmeister posted:

i was killing off the heel of a bottle of Loch Lomond 12 Inchmurrin, which is their fruity style. Loch Lomond is an interesting distillery, they have a couple of different and unique stills that allow them to make various styles of whisky (light, heavy, smokey, fruity, etc.) all in house. I liked the Inchmurrin but I think I prefer the "regular" Loch Lomond. Still, not a bad whisky.
Huh, that sounds interesting - their light variant might something to keep an eye out for, I think.

I'm a pretty basic bitch when it comes to whisky; I almost always prefer whiskey, because I generally find it more drinkable without needing it to be on the rocks - and if you have to have rocks in, why even drink it?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply