mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.8K
active users

#algorithms

9 posts9 participants2 posts today

Taught a bonus lecture for a course on Algorithms for NP-hard Problems today. Material won't be on the exam, so technically, this lecture was "just for fun".

Quite some pressure to make coming to class on Friday morning 8:45am worth it for a gang of 20-year-olds.

Students were a hoot. They were listening actively and participating. Great to meet them. Had a blast 🙂

Afterwards, some of them thanked me for the "really great lecture" 🥺

Ab-so-lute-ly exhausted now.

Apparently Reid Hoffmann in his new book Superagency (probably with ChatGPT) writes that: ”Personalisation increases freedom”

No. Freedom is the abundance of choices. Algorithmic personalisation is the withering of choices, a removal of agency. Freedom from thinking, if anything!

This is Orwellian doublethink, and from a big US Democratic Party donor, too.

open.spotify.com/episode/6wXDb
#AI #algorithms #neoliberalism #superagency #bookstodon

SpotifyThe Anti-Bookclub Tackles 'Superagency', 2025.03.03Mystery AI Hype Theater 3000 · Episode

UI Algorithms: A Tiny Undo Stack, by @julik:

blog.julik.nl/2025/03/a-tiny-u

Julik Tarkhanov · UI Algorithms: A Tiny Undo StackI’ve needed this before - a couple of times. Third time I figured I needed something small, nimble - yet complete. And - at the same time - wondering about how to do it in a very simple manner. I think it worked out great, so let’s dig in. Most UIs will have some form of undo functionality. Now, there are generally two forms of it: undo stacks and version histories. A “version history” is what Photoshop history gives you - the ability to “paint through” to a previous state of the system. You can add five paint strokes, and then reveal a stroke you have made 4 steps back. But most apps won’t need that. What you will need is an undo stack, which can be specced out as follows: An undoable action gets performed and gets pushed onto the stack. If undo is requested, the stack is popped and the rollback action gets applied for the popped action. If an action was undone, you can redo that action. If you have undone 2 actions, you can redo 2 actions. If you push an undoable action onto the stack in presence of actions that can be redone, they get discarded - there is no branching, remember? If you are curious how “the big guys” used to do it - check out the NSUndoManager documentation So, as I usually like to do, I want to understand the API that would be optimal. For this use case - drawing - I had the following workflow: When you draw a stroke the input points get added to currentStroke When you release the pen the currentStroke gets appended to strokes and reset for the next stroke. I wanted something like this: let addStroke = () => strokes.push(currentPaintStroke); let removeStroke = () => strokes.pop(); undoThing.push(addStroke, removeStroke); // then, on user action undoThing.undo(); // calls removeStroke() undoThing.redo(); // calls strokes.push(...) again The perils of stack pointers Simplest thing in the world. Now, if you look at most recommended (and some existing!) implementations of an undo stack, you will find they usually make use of a stack with a pointer. Like here and here - you would have a stack, usually represented as a JS array, and some kind of pointer or an index that you would use to index into it. And while it is workable and standard, it just didn’t jive with me well. See, using an index into an array usually makes JS code susceptible to two things, which bite me every single time: Indexing into a nonexistent index - hello undefined checks Mistakes in offsets when calling Array.slice and Array.splice. Oh, and confusing slice and splice, of course. The fact that Ruby and JS have different semantics for slice - one uses the index bounds, the other uses two offsets - doesn’t help things. And what happens if an API uses offsets into a vector? Exactly: confusion whether those offsets are inclusive or exclusive. Oh, and the offsets change after you mutate the array, which makes it even more painful. Could we not index? So what came to mind was this: we effectively have two stacks, not one. We have an undoStack (things that can be rolled back) and a redoStack - things that can be rolled forward. All the things we do with our undo-redo actions actually do not change the pointer - they move things from one stack to another. And rules change between these two stacks! We erase the redoable actions when we add a new undoable action, remember? So while an undoable stack will rarely get “nullified”, the redoable stack likely will be nullified frequently. Once this became clear, the implementation practically wrote itself: function createUndoStack() { let past = []; let future = []; return { push(doFn, undoFn) { doFn(); past.push({doFn, undoFn}); // Adding a new action wipes the redoable steps future.length = 0; }, undo() { let action = past.pop(); if (action) { action.undoFn(); future.unshift(action); } }, redo() { let action = future.shift(); if (action) { action.doFn(); past.push(action); } } }; } So instead of trying to save resources by having just one array (and miserably failing with off-by-one index errors), we can embrace dynamically sized arrays and just forget indices altogether. Neat! Let’s add a couple more methods to display our UI: get canUndo() { return past.length > 0; }, get canRedo() { return future.length > 0; } The call-by-sharing problem There is a catch with our implementation though. JS has rather interesting lexical scoping rules: what is defined in the scope of the definition of the function will be referenced from within the function. This means that when we start pulling a new currentStroke our undoFn closure will not use a copy of the currentStroke it was created with, but our current one. And our doFn and undoFn must satisfy an important guarantee: they must be idempotent. No matter what the state of the surrounding system is, appending the currentStroke should always append the stroke the redoFn was created for. If we do not take care of this, the following doFn: let doFn = () => strokes.push(currentStroke) is going to grab the currentStroke from the surrounding scope (whatever its value is) and append it to the strokes array. The currentStroke at that time may be just empty. To avoid this behavior, we want our doFn to use a cloned copy of the currentStroke - current at time of definition of doFn, and we want it to do so always. If your undoable action is some kind of delete (“pop”) you want the reverse for your undoFn - the undo function must push the deleted object back into the array, and not mutate it in any way. To create a deep copy of our currentStroke, modern JS offers us a feature called structuredClone(). We can use the ... rest parameters to package any arguments into one array, which we will then clone: push(doFn, undoFn, ...withArgumentsToClone) { const clonedArgs = structuredClone(withArgumentsToClone); const action = { doWithData() { doFn(...clonedArgs); }, undoWithData() { undoFn(...clonedArgs); }, }; action.doWithData(); // Adding a new action wipes the redoable steps past.push(action); future.length = 0; } and we’ll amend our functions accordingly. Instead of closuring over currentStroke we’ll make it an argument: let appendStroke = strokes.push.bind(strokes); undoStack.push(appendStroke, () => strokes.pop(), currentStroke); with the push() of our undoStack taking care of making a deep clone for us. Nice! The complete definition then becomes: function createUndoStack() { const past = []; const future = []; return { push(doFn, undoFn, ...withArgumentsToClone) { const clonedArgs = structuredClone(withArgumentsToClone); const action = { doWithData() { doFn(...clonedArgs); }, undoWithData() { undoFn(...clonedArgs); }, }; action.doWithData(); // Adding a new action wipes the redoable steps past.push(action); future.length = 0; }, undo() { let action = past.pop(); if (action) { action.undoWithData(); future.unshift(action); } }, redo() { let action = future.shift(); if (action) { action.doWithData(); past.push(action); } }, get undoAvailable() { return past.length > 0; }, get redoAvailable() { return future.length > 0; }, clear() { past.length = 0; future.length = 0; return true; } } } export {createUndoStack}; Robust, small, and no indexing errors. My jam.

Stateline: Cities lead bans on algorithmic rent hikes as states lag behind. “Minneapolis on Thursday has become the fourth U.S. city to ban algorithmic rental price-fixing software, joining San Francisco, Philadelphia and Berkeley, California, in a growing wave of legislation aimed to protect renters from rental price-gouging. While momentum builds at the city level — with Portland, Oregon; […]

https://rbfirehose.com/2025/04/01/stateline-cities-lead-bans-on-algorithmic-rent-hikes-as-states-lag-behind/

Scientific Reports: Online database of clinical algorithms with race and ethnicity. “Using database analysis primarily, we identified 42 risk calculators that use race and ethnicity as predictors, five laboratory test results with reference ranges that differed based on race and ethnicity, one therapy recommendation based on race and ethnicity, 15 medications with race- and ethnicity-based […]

https://rbfirehose.com/2025/03/31/scientific-reports-online-database-of-clinical-algorithms-with-race-and-ethnicity/

#algorithms #IsaacNewton

"Although enormously powerful — centuries later, Newton’s method is still crucial for solving present-day problems in logistics, finance, computer vision and even pure math — it also has a significant shortcoming. It doesn’t work well on all functions. So mathematicians have continued to study the technique, figuring out different ways to broaden its scope without sacrificing efficiency.

Last summer, three researchers announced the latest improvement to Newton’s method. Amir Ali Ahmadi of Princeton University, along with his former students Abraar Chaudhry and Jeffrey Zhang , extended Newton’s method to work efficiently on the broadest class of functions yet."

quantamagazine.org/three-hundr

Quanta Magazine · Three Hundred Years Later, a Tool from Isaac Newton Gets an Update | Quanta MagazineA simple, widely used mathematical technique can finally be applied to boundlessly complex problems.
Continued thread

“While Bambu’s touchscreen and #software does a wonderful job easing newcomers into #printing, #cutting, and #etching, and it’s got more cameras and #algorithms than ever before (including #LIDAR, timelapse, a new nozzle #camera and a bird’s eye camera too), I’m actually finding its basic #3DPrinting modes aren’t as reliable yet as other printers I’ve used.”

#Art / #automation / #Bambu <theverge.com/news/634294/bambu>

bambu-lab-h2d--331A1135
The Verge · The Bambu H2D isn’t just a bigger 3D printer — it’s a laser cutter, pen plotter, and Cricut competitor tooBy Sean Hollister
Continued thread

On top of banning all Recommender Systems on social media, we must change from being powerless users of Tech giant services into having democratic collective control of algorithms on all services we use!

Tech platform co-ops creating apps and services which users can democratically and collectively control 🙌

"We, the undersigned researchers, affirm the scientific consensus that artificial intelligence (AI) can exacerbate bias and discrimination in society, and that governments need to enact appropriate guardrails and governance in order to identify and mitigate these harms. [1]

Over the past decade, thousands of scientific studies have shown how biased AI systems can violate civil and human rights, even if their users and creators are well-intentioned. [2] When AI systems perpetuate discrimination, their errors make our societies less just and fair. Researchers have observed this same pattern across many fields, including computer science, the social sciences, law, and the humanities. Yet while scientists agree on the common problem of bias in AI, the solutions to this problem are an area of ongoing research, innovation, and policy.

These facts have been a basis for bipartisan and global policymaking for nearly a decade. [3] We urge policymakers to continue to develop public policy that is rooted in and builds on this scientific consensus, rather than discarding the bipartisan and global progress made thus far."

aibiasconsensus.org/

Scientific Consensus on AI BiasScientific Consensus on AI Bias

"The best way to think of the slop and spam that generative AI enables is as a brute force attack on the algorithms that control the internet and which govern how a large segment of the public interprets the nature of reality. It is not just that people making AI slop are spamming the internet, it’s that the intended “audience” of AI slop is social media and search algorithms, not human beings.

What this means, and what I have already seen on my own timelines, is that human-created content is getting almost entirely drowned out by AI-generated content because of the sheer amount of it. On top of the quantity of AI slop, because AI-generated content can be easily tailored to whatever is performing on a platform at any given moment, there is a near total collapse of the information ecosystem and thus of "reality" online. I no longer see almost anything real on my Instagram Reels anymore, and, as I have often reported, many users seem to have completely lost the ability to tell what is real and what is fake, or simply do not care anymore.

There is a dual problem with this: It not only floods the internet with shit, crowding out human-created content that real people spend time making, but the very nature of AI slop means it evolves faster than human-created content can, so any time an algorithm is tweaked, the AI spammers can find the weakness in that algorithm and exploit it."

404media.co/ai-slop-is-a-brute

404 Media · AI Slop Is a Brute Force Attack on the Algorithms That Control RealityGenerative AI spammers are brute forcing the internet, and it is working.