CannotSleep420

joined 2 years ago
[–] CannotSleep420@lemmygrad.ml 5 points 2 years ago

The headline alone pretty much sums up the problem of social democracy. The problem to them isn't the parasitic extraction of labor and resources from the imperial periphery, just that they're not getting a cut.

[–] CannotSleep420@lemmygrad.ml 2 points 2 years ago

Who gives a shit?

[–] CannotSleep420@lemmygrad.ml 3 points 2 years ago (2 children)

I meant making a bot that does things, not just designating an account as a bot account. Fortunately, I've since figured that out. See @ParentiBot@lemmygrad.ml.

 

I was thinking of making a parenti bot and noticed that lemmy's settings allow you to mark an account as a bot. Doing a search for "bot" in the server side code shows options for showing/hiding content posted by bots when viewing communities, but I didn't see anything for actually having an account run a script.

I'm sure people viewing this from lemmygrad may recall Comarade Rose, who was likely a bot, regularly posting content from communist subreddits; I'm sure making a bot is possible.

[–] CannotSleep420@lemmygrad.ml 7 points 2 years ago (1 children)

I'm one of the few developers who's not burnt out from workload, but my job makes up for it with inefficient processes. After opening our massive monolithic solution in the IDE, it can take several minutes to load enough to get even syntax highlighting let alone feedback from the compiler. Building the solution after making changes takes another several minutes, especially if I'm unlucky enough to need to modify a project that a lot of other projects depend on. After a new build, the app that runs locally will take several minutes to refresh to be usable with the new changes. I'm working on software that generates Word documents and that process takes another several minutes. Between making a change and seeing results from that change, I need to wait at least five minutes, often longer. The cherry on top is that most of the changes consist of adding or removing a small amount of markup in .NET's ancient .ascx markup generator files.

As one of my coworkers put it, "It's like watching paint dry, then cleaning a toilet with a toothbrush."

[–] CannotSleep420@lemmygrad.ml 1 points 2 years ago

It makes me feel cool and I'm already used to doing it, so doing it the function way becomes slower from being so used to doing it the other way.

5
American Sort (lemmygrad.ml)
submitted 2 years ago* (last edited 2 years ago) by CannotSleep420@lemmygrad.ml to c/programmerhumor@lemmy.ml
 

If an element is out of order, remove it from the array.

An example in everyone's (least) favorite language:

const americanSort = (list, compare) => list.reduce((acc, cur) => { const lastElement = acc.length > 0 ? acc[acc.length - 1] : null; return lastElement ? compare(lastElement, cur) < 1 ? [...acc, cur] : acc : [cur]; }, []);

console.log(americanSort([5, 2, 6, 5, 20, 10, 40], (a, b) => a - b)) outputs Array(4) [ 5, 6, 20, 40 ]

[–] CannotSleep420@lemmygrad.ml 2 points 2 years ago

That brings back bad memories of the class I learned to code in where I had to give the professor printouts of my code.

[–] CannotSleep420@lemmygrad.ml 2 points 2 years ago

Thanks for posting this. Your post made me aware pnpm exists, and now I am using it.

 

An open sourcerer.