Jayjader

joined 2 years ago
MODERATOR OF
[–] Jayjader@jlai.lu 1 points 1 hour ago* (last edited 1 hour ago)

I dislike yaml as much as the next person, but you can always "just" write ~~Jason~~ JSON (lol autocorrect). Unless I'm misunderstanding your criticism?

[–] Jayjader@jlai.lu 3 points 3 hours ago

Plus, natural languages are not necessarily spoken nor heard; sign language is gestured (signed) and seen and many, mutually-incompatible sign languages have arisen over just the last few hundred years. Is this just me being pedantic or does Moro not address them at all in their book?

[–] Jayjader@jlai.lu 18 points 4 hours ago (5 children)

Forgejo has their own runner: https://forgejo.org/docs/latest/admin/actions/runner-installation/

I've used it on my personal machine, was very easy to setup and mostly compatible with GitHub actions out-of-the-box (including things like actions/checkout@v4).

[–] Jayjader@jlai.lu 1 points 1 day ago

I dunno if you're referencing The Fable of the Dragon Tyrant or if you just happened to have a similar train of thought as it's author.

[–] Jayjader@jlai.lu 2 points 1 day ago

big jug hot cheese

oooooh, where can I go to get scrombled? I always loved fondue....

[–] Jayjader@jlai.lu 8 points 1 day ago

Then there's kids like me, who would daydream about actually being a fae changeling.

It's not even as if my parents didn't love me, I was just a weird kid who was more comfortable being weird than fitting in.

[–] Jayjader@jlai.lu 9 points 1 day ago

A Europe of sovereign regions, sounds great. A Europe of multinational corporations that uses the free market to enact a race to the bottom of quality of life just to ensure greater profits, please no.

There's a reason many of the "far left" (read: actual socdem, not milquetoast neolib) political parties here are more wont to evoke leaving the EU, even those that despise Putin.

[–] Jayjader@jlai.lu 7 points 1 day ago (1 children)

I wonder when those people started using reddit. I started in 2012 and it already felt like a completely different (and generally worse) experience several times over before the great API fiasco.

[–] Jayjader@jlai.lu 10 points 1 day ago (4 children)

Screenshot of reddit comments. Some terms in users' comments have become links with a magnifying glass icon next to them.

Oh god, reddit is now turning comments into links to search for other comments and posts that include the same terms or phrases.

[–] Jayjader@jlai.lu 10 points 1 day ago

"Chatgpt, how can I turn this into another reason to complain about rust?"

[–] Jayjader@jlai.lu 2 points 1 day ago

(Browser-based) Javascript

I got lazy and lucky writing the first part; hard-coded the number of lines / operands and it worked on the first try! I didn't factor in the final block not being padded by spaces on both sides for part 2, and so needed to test on the example code – which has 3 lines of operands instead of the problem input's 4 lines, so I had to properly solve the problem across all possible amounts of lines of input 😩.

I am very jealous of all y'all who have a transpose function available in your language of choice.

Code

function part1(inputText) {
  const [firstArgs, secondArgs, thirdArgs, fourthArgs, operators] = inputText.trim().split('\n').map(line => line.trim().split(/\s+/));
  let totalSum = 0;
  for (let i = 0; i < firstArgs.length; i++) {
    if (operators[i] === '+') {
      totalSum += Number.parseInt(firstArgs[i], 10) + Number.parseInt(secondArgs[i], 10) + Number.parseInt(thirdArgs[i], 10) + Number.parseInt(fourthArgs[i], 10);
    } else if (operators[i] === '*') {
      totalSum += Number.parseInt(firstArgs[i], 10) * Number.parseInt(secondArgs[i], 10) * Number.parseInt(thirdArgs[i], 10) * Number.parseInt(fourthArgs[i], 10);
    }
  }
  return totalSum
}

{
  const start = performance.now();
  const result = part1(document.body.textContent);
  const end = performance.now();
  console.info({
    day: 6,
    part: 1,
    time: end - start,
    result
  })
}

function part2(inputText) {
  const lines = inputText.trimEnd().split('\n');
  const interBlockIndices = [];
  for (let i = 0; i < lines[0].length; i++) {
    let allEmpty = true;
    for (let j = 0; j < lines.length; j++) {
      if (lines[j][i] !== ' ') {
        allEmpty = false;
        break;
      }
    }
    if (allEmpty) {
      interBlockIndices.push(i);
    }
  }
  interBlockIndices.push(lines[0].length);

  let totalSum = 0;
  let blockStart = 0;
  for (const interBlockIndex of interBlockIndices) {
    // compute calculation of block [blockStart, interBlockIndex - 1]
    const operands = [];
    for (let i = interBlockIndex - 1; i >= blockStart; i--) {
      // parse operands
      let operand = 0;
      for (let j = 0; j < lines.length - 1; j++) {
        if (lines[j][i] !== ' ') {
          operand *= 10;
          operand += Number.parseInt(lines[j][i], 10);
        }
      }
      operands.push(operand)
    }
    if (lines.at(-1)[blockStart] === '+') {
      totalSum += operands.reduce((accu, next) => accu + next, 0);
    } else if (lines.at(-1)[blockStart] === '*') {
      totalSum += operands.reduce((accu, next) => accu * next, 1);
    }
    //  console.debug({ totalSum, operands, blockStart, interBlockIndex });
    blockStart = interBlockIndex + 1;
  }
  return totalSum;
}

{
  const example = `123 328  51 64 
 45 64  387 23 
  6 98  215 314
*   +   *   +  
`;
  const start = performance.now();
  const result = part2(document.body.textContent);
  //   const result = part2(example);
  const end = performance.now();
  console.info({
    day: 6,
    part: 2,
    time: end - start,
    result
  })
}

[–] Jayjader@jlai.lu 6 points 1 day ago (1 children)

Good ; free trade should not come at the expense of regulations on food quality nor worker protections. It's a shame this only happened in conjunction with farmers currently protesting a culling mandate, and not when the EU-Mercosur signing was initially planned/proposed.

 

Part 2 is basically running just the isolation rule from Conway's game of life until the world state stabilizes. I'm curious if anyone noticed this and used an existing cellular automata program or library to handle the computation.

 

Par for the course of my recent comment regarding theprimeagen.

 

It doesn't break the app, but it does make it a bit harder to tap those buttons.

I'm using a Motorola "Moto g 5G plus" in case that affects anything.

The bottom nav bar is fully on-screen when viewing feeds and posts.

 
 

cross-posted from: https://piefed.social/post/1139502

Bravo le syndicat et bravo aux travailleuses et travailleurs!

 

This blogpost is close to 3 weeks old and I haven't seen it anywhere on lemmy yet. Pretty decent writeup of not just why but also how to unionize effectively, catered to tech workers in the US.

 

"Strophes à la gloire du Quart-Monde de tous les temps" de Joseph Wresinski
Traduit en créole haïtien, mis en musique et interprété par Jean-François Gay


Si le terme de "Quart-Monde" ne vous parle pas, c'est Joseph Wresinski qui l'a choisi en vers la fin des années 60 pour désigner les personnes en situation de grande pauvreté, a travers le monde (notamment peu importe qu'elles se trouvent dans un des blocs USA/OTAN ou USSR, ou encore le Tiers-Monde, d’où le nom).

En 1966, avec ces premiers volontaires, sont rédigées les options de base de l'association : « Tout homme porte en lui une valeur inaliénable qui fait sa dignité d'homme ». Pour en finir avec les termes de « cas sociaux », « familles inadaptées », « familles problèmes », Joseph Wresinski propose un nom porteur d'espoir et de dignité, le « quart-monde », se calquant sur celui de « tiers-monde ». L'expression « quart monde » exprime désormais le rassemblement des pauvres et des non-pauvres engagés dans un même refus de la misère.

Son mouvement Aide à Toute Détresse est devenu ATD Quart Monde, et continue encore aujourd'hui le combat sous ce nom (sidenote: en 2009 iels ont decide de changer le sens de l'acronyme ATD, qui signifie désormais Agir Tous pour la Dignité).

https://fr.wikipedia.org/wiki/Quart-monde
https://fr.wikipedia.org/wiki/ATD_Quart_monde

La page anglophone de wikipedia sur le "Quart-Monde" renseigne d'autres utilisations du terme : https://en.wikipedia.org/wiki/Fourth_World

 

Daddy, what's a train?
Is it something i can ride?
Does it carry lots of grown up folks and little kids inside?
Is it bigger than our house?
...well how could I explain?
when my little boy and girl ask me,
Daddy, what's a train?

When I was just a boy,
and livin' by the track,
Us kids would gather up the coal, in big ol' gunny sacks
Then we heard the mornin' sound as the train pulled into view,
The engineer would smile and wave as she went rolling through

She blew so loud and clear, we had to cover up our ears
And we counted cars just as high as we could go
I can almost hear the steam, those big old drivers scream -
Sounds my little kids will never know.

Daddy, what's a train?
Is it something i can ride?
Does it carry lots of grown up folks and little kids inside?
Is it bigger than our house?
...well how could I explain?
when my little boy and girl ask me,
Daddy, what's a train?

I guess the times have changed, kids are different now -
Cause some don't even seem to know that milk come from a cow!
My little boy can tell the names of all the baseball stars,
I remember how I memorized the names on railroad cars...

The Wabash and the TP, Lackawanna, the IC,
The Nickel Plate and the good ol' Santa Fe.
Just names out of the past, I guess they're fading fast,
Every time I hear my little boy say -

Daddy, what's a train?
Is it something i can ride?
Does it carry lots of grown up folks and little kids inside?
Is it bigger than our house?
...well how could I explain?
when my little boy and girl ask me,
Daddy, what's a train?

We climbed into the car, drove down into town,
Right up to the depot house, but no one was around.
We searched the yard together, for something I could show,
But I knew there hadn't been a train for a dozen years or so.

All the things I did, when I was just a kid,
How far away those memories appear!
I guess it's plain to see they still mean a lot to me -
Because my ambition was to be an engineer.

Daddy, what's a train?
Is it something i can ride?
Does it carry lots of grown up folks and little kids inside?
Is it bigger than our house?
...well how could I explain?
when my little boy and girl ask me,
Daddy, what's a train?


Une de mes préférées de son album "all abord!", le dernier qu'il a fait avant de perdre la vie. Tout l'album est dédié a son amour des trains, souvent coloré par une tristesse sur leur disparition du paysage états-unien.

 

Article paru dans La Dépêche du 5 Mai 2025.

Surtout une confirmation du chad Jean Moulin vs le virgin Klaus Barbie, je trouve. C'est quand même époustouflant, si vrai, que Moulin a réussi a se donner la mort en s'ouvrant lui-même son crâne contre les murs de sa cellule.

~~J'éditerai dès que je suis devant un pc avec clavier l'alt-texte de l'image ainsi que je retranscriverai l'article en commentaire sous ce poste.~~ edits faits !

view more: next ›