148
hmmm (lemmy.world)
submitted 1 month ago by [email protected] to c/[email protected]
68
submitted 1 month ago by [email protected] to c/[email protected]
341
hmmm (lemmy.world)
submitted 1 month ago by [email protected] to c/[email protected]
4
submitted 2 months ago by [email protected] to c/[email protected]

I'm writing a fish script to process the output of music tagging programs (like operon). I use this for instance to list the filenames of all music tracks in a collection that are missing certain tags like a date of release or which have a CD number tag but no tracknumber tag.

Unfortunately the output I'm parsing may control control characters // escape sequences. This caused me quite a lot of headache during debugging.

Take the following string for instance: it will display as tracknumber (including the leading whitespace` in my terminal. The word itself only has 11 characters so naturally I tried to call string trim on it, but that doesn't actually alter it because on closer inspection the character sequence looks like this:

string_value= tracknumber
string_length=16
0:
:[
2:0
3:m
4:
5:t
6:r
7:a
8:c
9:k
10:n
11:u
12:m
13:b
14:e
15:r

As you can see it starts with a terminal escape sequence which is rendered as a whitespace.

Is there an easy way to strip any and all escape sequences from a variable? I used regular expression search and replace with some success, but that seems quite a brittle approach as I can't anticipate every single (edge) case and could also accidentally remove stuff I want to keep.

36
submitted 2 months ago by [email protected] to c/[email protected]
49
submitted 2 months ago by [email protected] to c/[email protected]

feedback appreciated

I tried different brushes and strokes on different crystals, ¿which ones look best you?

76
submitted 2 months ago by [email protected] to c/[email protected]

source: https://decolonialatlas.wordpress.com/2017/04/18/colorful-river-basin-maps/

It has more detailed maps for each continent too.

44
submitted 2 months ago by [email protected] to c/[email protected]

Trying to emulate the style of traditional landscape printing my grand parents had at their house. I guess those must have been painting with oil (I wouldn't know).

188
The Flower Woman (lemmy.world)
submitted 2 months ago by [email protected] to c/[email protected]
1
submitted 3 months ago by [email protected] to c/[email protected]

I often write multiple statements on the same logical line. For instance short loops that converts one image format to another.

Is there a way to bring up tab completions or history search for subsequent statements? After beginning a new command with ; && &or | I want to be able to make use of suggestions again.

340
submitted 3 months ago by [email protected] to c/[email protected]

Oh Harambe, ¿what did we do to you?

77
hmmm (lemmy.world)
submitted 3 months ago by [email protected] to c/[email protected]
[-] [email protected] 82 points 3 months ago* (last edited 3 months ago)

Please note that in Germany you get 2 votes in the federal election. 1st is for a candidate to directly represent your district, 2nd is for a party nation wide. The map only shows the election result for the 2nd vote.

Here's another map to show the party affiliation of winners of the 1st vote: 1000085819

Colors are the same, except blue. Blue represents CSU, essentially the Bavarian version of the CDU (Christian Democratic Union).

[-] [email protected] 51 points 4 months ago

According to the study 37% of participants verify information before sharing it on social media.

There you have it folks.

Disinformation campaigns don't need to be super convincing with the latest tech or elaborate fake outs, although it certainly helps. For the masses (ie election interference) it's easy enough to to establish narratives, vibes by users simply sharing headlines to fake or manipulative reports. The people that bother to deep check and cross reference sources you typically couldn't convince anyway. Sadly enough, most users never read beyond the head lines (75% this Facebook study estimates).

Think of your own feed: how many head lines // posts do you just scroll by w/out ever opening them? Even if you don't share actively it still can influence the your perception of the world today and shape your mood.

Social media is eating away at the fundamentals of Democracy 🫠, change my mind!

[-] [email protected] 105 points 4 months ago* (last edited 4 months ago)

Saw a policy expert say it's a mixture of 3 things really:

  1. Trump likes to blame outsiders for problems and this is well received by his loyal base and gives off strongman vibes
  2. long term plan to switch from income tax (scales the more you earn) to consumption taxes (the poorer you are the more you pay for for consumption, relatively speaking) which benefits the rich at the expense of the poor. this wealth transfer is easier to sell when the populace is focused on outsiders
  3. Trump doesn't understand basic economics

source: https://youtu.be/2I1L1fXaYDs

[-] [email protected] 81 points 4 months ago* (last edited 4 months ago)

There's so many parts and pieces that all failed to get to where we are today. Each time you reflect a moment and realize that we shouldn't be be here in the first place:

  • The FBI // justice department shouldn't be a tool of personal revenge.
  • But wait Trump/Musk shouldn't have become presidents to begin with.
  • Voters should be educated and well informed enough to simply not vote for an autocrat.
  • Merrick Garland should never have become attorney general and even so Biden should have pressured him hard to do his job.
  • Trump should have been impeached multiple times already.
  • But the democrats too should have had a better alternative candidate.
  • The democrats should have had a real primary contest.
  • Biden should have never announced to run for another term out of the blue.
  • And his handlers shouldn't have tried to hide his frailty for so long.
  • If only Donald Trump should have been sentenced for his many crimes.
  • And he shouldn't have had the backing of the Republican party for this long.
  • Arguably voters should have realized he's inept the first time around.
  • The media shouldn't have sensationalized him as much when he first ran as a publicity stunt

The list is not exhaustive and goes on and on...

And in the background there's all the systemic failures and problems that enabled this: terrible public education, ignoring a large chunk of the electorate for too long, citizens united, social media and outrage culture, rampant disinformation and propaganda disguised as news, the electoral college and de facto 2 party system, too few checks and balances being hard codified, obvious loop holes like presidential pardons, ...

Petty sure historians will analyze this for generations. If we will still live in a world where historians are allowed to about their work freely.

[-] [email protected] 53 points 8 months ago

Just ask the parents what (s)he likes.

[-] [email protected] 73 points 8 months ago

I initially wrote 'temptor' in the title but then double checked. Not today, Titivillus.

[-] [email protected] 65 points 9 months ago

Nice. I'm wondering how often this cycle has played out so far ...?

[-] [email protected] 159 points 9 months ago

It's well known that the judiciary at the time was very lenient towards right wing extremists. His time in jail was rather cozy and gave him time to develop and write down more of his ideological underpinnings. And come up with a more comprehensive plan for taking over.

That's why I find it very worrisome when people like Donald Trump get what amounts to a slap on the wrist for staging an insurrection. Not just that but they actually put him on the ballot again 😱. And this time the people propping him up in the background came up with an elaborate plan for claiming the election and then completely restructuring the executive authoritarian style (aka Project 2025).

[-] [email protected] 59 points 9 months ago

For gluten free products: the whole production chain needs to use different tools or be sealed off from the rest. You can generally use the same mill, kneader, oven, tray for barley, wheat, rye, etc without meticulous cleaning in between. But if you want it to be gluten free you now need to either do that expensive cleaning or more realistically have an entirely separate set of machinery and ensure it never gets in contact with your main line.

[-] [email protected] 56 points 1 year ago

After watching the original video I started putting some additional powder at the bottom of the loading tray every wash and it works great. Clean dishes ever since, no pre rinse necessary. Can recommend 👍.

[-] [email protected] 101 points 1 year ago

Let us hope that one day the US, or any democracy for that matter, will come together to implement ranked choice voting.

[-] [email protected] 76 points 1 year ago

Luckily steam presents visitors with both the all time score as well as an average of recent reviews. Quite fair to do this, as it can cut both ways.

view more: next ›

takeheart

0 post score
0 comment score
joined 2 years ago