Sign in

papierabreisser.bsky.social

@papierabreisser.bsky.social
54 followers 70 following 960 posts

No bell so loud, no clothing so bright, no helmet so hard to even out bad cycling infrastructure!

PostsRepliesMedia
papierabreisser.bsky.social @papierabreisser.bsky.social · 27/07/2026
At first I thought "Collab with Cory would be nice" - and then he did not just reference the works of @doctorow.pluralistic.net , but @nealstephenson.bsky.social as well? Make it happen, please! www.youtube.com/watch?v=vS6H...
youtube.com
The PROBLEM with Capitalism - Smarter Every Day 316
YouTube video by SmarterEveryDay
000
papierabreisser.bsky.social @papierabreisser.bsky.social · 06/03/2026
Mir ist klar, dass sich da jemand einen Scherz im Spendenaufruf #ImMärzGegenMerz von Staiy erlaubt, aber lustig ist es schon, wenn Charlotte Merz 200 Euro in den Topf wirft. Hat schon wer eine Spende der Töchter entdeckt? www.betterplace.org/de/fundraisi...
Banner des Spendenstands der Kampagne Im März gegen Merz von Streamer Staiy. Bei einem Spendenstand von 98.837,22 Euro ist die letzte Spende in Höhe von 200 Euro unter dem Namen Charlotte Merz gelistet
192
papierabreisser.bsky.social @papierabreisser.bsky.social · 16/12/2025
"Immerhin". Und zum Glück sind keine Menschen an Bord, denn wir wissen ja alle, die größte Gefahr geht für Insassen von PKW aus, im Gegensatz zu irgendwelchen Leuten ohne Blechhülle auf der Straße. Kritik gibt es erst hinter der Bezahlschranke im #SPON.
Artikel auf Spiegel Online zu leeren Robotaxi-Fahrten.

 Kein Sicherheitsfahrer, kein Passagier Tesla schickt Geisterautos durch Austin

Bislang hielten die Robotaxis von Tesla nicht, was Firmenchef Elon Musk versprach. Nun sind immerhin erste Testwagen auch ohne Aufpasser auf dem Beifahrersitz im US-Bundesstaat Texas unterwegs. 

Darunter ein Bild von einem leeren, aber fahrenden roten Tesla mit gelbem Robotaxi Schriftzug auf der Fahrertür.
020
papierabreisser.bsky.social @papierabreisser.bsky.social · 12/12/2025
One last time this year: a flowless solution to #AdventOfCode day 12. It is cheating a bit, as it does not flip and rotate but rather check the total space occupied by each packet. Will not work on the sample! Thanks, @was.tl! #AOC is fun each year and I learn something new each time. 🎄🎁
// My solution for day 12 to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/12/input (try F12 or CTRL+I in your browser)
// The number is the solution to the first part of the challenge.
// There is no second part to this days challenge, just have 23 stars total

const parseInput = input => input
    .trim()
    .split('\n\n')
    .reduce(([boxes, regions], block) => {
        const lines = block.split('\n')
        const hasX = +(lines[0].search('x') != -1)
        boxes = [[...boxes, lines.slice(1).join('').split('').filter(c => c == '#').length], boxes][hasX]
        regions = [regions, lines.reduce((reg, line) => [...reg, line.match(/\d+/g)?.map(Number)], regions)][hasX]
        return [boxes, regions]
    }, [[], []])

const part1 = input => {
    const [boxes, regions] = parseInput(input)
    return regions.reduce((total, region) => {
        const area = region[0] * region[1]
        const needed = region.slice(2).reduce((acc, cur, i) => acc + cur * boxes[i], 0)
        return total + +(area >= needed)
    }, 0)
}

console.time('Advent of Code Day 12 both parts flowless')
console.log(part1(document.body.innerText.trim()))
console.timeEnd('Advent of Code Day 12 both parts flowless')
040
papierabreisser.bsky.social @papierabreisser.bsky.social · 09/12/2025
After my hiatus yesterday I am now back in business with my #AOC #AdventOfCode day 9 solution to the flowless challenge. But it is slooooooow! Took about 40 Minutes to process my real input. My non-flowless solution with the same algo runs in 7 seconds.
Both parts of Advent of Code 2025 day 9 solved in 2390 seconds. The code is too big to fit the alt text, so no source today.
050
papierabreisser.bsky.social @papierabreisser.bsky.social · 07/12/2025
This is my solution to the #AOC #AdventOfCode day 7 flowless challenge, this time handling 4 cases in a recursion with memoization. It's astonishing how readable these still are. And how fast they perform despite changing vars each time, especially in the recursion.
// My solution for day 7 to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/7/input (try F12 or CTRL+I in your browser)
// The two numbers are the results for the first and second part for your personal input

const steps = count => [...(new Array(count)).keys()]

const memo = new Map()

const solve = (grid, timelines, row, col) => {
    const key = `${row},${col}`
    const val = memo.get(key)
        || (row == grid.length - 1) * (timelines + 1)
        || (grid[row][col] == '.') * solve(grid, timelines, row + 1, col)
        || solve(grid, timelines, row + 1, col - 1) + solve(grid, timelines, row + 1, col + 1)
    memo.set(key, val)
    return val
}

const part1 = input => steps(input.length)
    .slice(1)
    .reduce((total, row) => steps(input[row].length)
        .reduce((t, col) => {
            const above = +('S|'.includes(input[row - 1][col]))
            const splitter = +(input[row][col] == '^')
            input[row][col] = [input[row][col], '|'][above * !splitter]
            input[row][col - 1] = [input[row][col - 1], '|'][above * splitter]
            input[row][col + 1] = [input[row][col + 1], '|'][above * splitter]
            return above * splitter + t
        }, total), 0)

const part2 = input => solve(input, 0, 1, input[0].indexOf('S'))

const input = document.body.innerText.trim().split('\n').map(l => [...l])

console.time('Advent of Code day 7 flowless challenge both parts')
console.log([part1(input.map(r => r.map(c => c))), part2(input)])
console.timeEnd('Advent of Code day 7 flowless challenge both parts')
130
papierabreisser.bsky.social @papierabreisser.bsky.social · 06/12/2025
My solution to the #AOC #AdventOfCode day 6 flowless challenge. Had to refactor my transpose utility function to branchless style. Part 2 has a dirty re-use of the line argument just to skip creating another variable. I need to get better at consistent naming schemes...
// My solution for day 6 to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/6/input (try F12 or CTRL+I in your browser)
// The two numbers are the results for the first and second part for your personal input

const transpose = grid => grid.reduce((cols, row, r, arr) =>
    [ cols, row.map((_, c) => arr.map(l => l[c])) ][+(r == 0)] , [])

const part1 = input => {
    input = input.trim().split('\n').map(l => {
        l = l.trim().replace(/ +/g, ' ').split(' ')
        return [l, l.map(Number)][+(l[0].match(/\d+/) != null)]
    })
    const operations = input.pop()
    return transpose(input)
        .map((vals, i) => [
            vals.reduce((acc, cur) => acc * cur, 1),
            vals.reduce((acc, cur) => acc + cur, 0)
        ][+(operations[i] == '+')])
        .reduce((acc, cur) => acc + cur, 0)
}

const part2 = input => {
    input = transpose(input.trim().split('\n').map(l => l.split('')))
    input = input.map(l => l.map(c => [c, ' '][+(typeof c === 'undefined')])).reverse()
    return input.reduce(([total, block], line) => {
        const op = line.pop()
        const val = Number(line.join(''))
        block = [[...block, val], block][+(val == 0)]
        line = [
            0,
            block.reduce((a, v) => a + v, 0),
            block.reduce((a, v) => a * v, 1)
        ][' +*'.indexOf(op)]
        block = [ block, [], [] ][' +*'.indexOf(op)]
        return [total + line, block]
    }, [0, []])[0]
}

const db = document.body.innerText
console.time('Advent of Code day 6 flowless challenge both parts')
console.log([part1(db), part2(db)])
console.timeEnd('Advent of Code day 6 flowless challenge both parts')
020
papierabreisser.bsky.social @papierabreisser.bsky.social · 05/12/2025
Managed to solve #AOC #AdventOfCode 2025 day 5 under the restrictions of the flowless challenge again!
// My solution for day 5 to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/5/input (try F12 or CTRL+I in your browser)
// The two numbers are the results for the first and second part for your personal input

const parseInput = input => {
	const [ranges, ing] = input.trim().split('\n\n')
	return [
		ranges.split('\n').map(l => l.split('-').map(Number)),
		ing.split('\n').map(Number)
	]
}

const part1 = ([ranges, ings]) => ings.reduce((acc, ing) => acc + ranges.some(([l, h]) => ing >= l && ing <= h), 0)

const part2 = ([ranges]) => {
	ranges.sort((a, b) => a[0] - b[0])
	return ranges
		.reduce((comp, [l, h]) => {
			const found = +(comp.some(([s, e], i) => {
				const contained = +(s <= l && l < e && e > h)
				const extend = +(s <= l && l <= e && e <= h)
				comp[i][1] = [e, h][extend]
				return contained || extend
			}))
			return [[...comp, [l, h]], comp][found]
		}, [ranges[0]])
		.reduce((acc, [l, h]) => acc + h - l + 1, 0)
}

const db = parseInput(document.body.innerText)
console.time('Advent of Code day 5 flowless challenge both parts')
console.log([part1(db), part2(db)])
console.timeEnd('Advent of Code day 5 flowless challenge both parts')
020
papierabreisser.bsky.social @papierabreisser.bsky.social · 04/12/2025
Totally rad solution to the #AOC #AdventOfCode day 4 flowless challenge, featuring a recursive function handling 3 different cases with a single return statement 🤓 Even had to refactor my grid functions because they used a ternary operator that is forbidden in flowless.
// My solution for day 4 to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/4/input (try F12 or CTRL+I in your browser)
// The two numbers are the results for the first and second part for your personal input

const eightWayDeltas = [[-1, -1], [-1, 0], [-1, 1], [0, -1], [0, 1], [1, -1], [1, 0], [1, 1]]

const gridCells = grid => grid.reduce((cells, line, row) => [...cells, ...line.map((value, col) => { return {row, col, value} })], [])

const validCoordForGrid = (row, col, grid) => row >= 0 && row < grid.length && col >= 0 && col < grid[row].length

const getSurroundingGridCoords = (grid, row, col, deltas) =>
	deltas.flatMap(([r, c]) => Array(+(validCoordForGrid(row + r, col + c, grid))).fill([row + r, col + c]));

const getSurrounding = (grid, row, col, deltas) =>
	getSurroundingGridCoords(grid, row, col, deltas).reduce((tiles, [r, c]) => [...tiles, { tile: grid[r][c], row: r, col: c }], [])

const solve = (grid, total, isPart1) => {
	let changed = gridCells(grid)
		.filter(f => f.value == '@')
		.reduce((acc, {row, col}) => {
			const removable = +(getSurrounding(grid, row, col, eightWayDeltas).filter(f => f.tile == '@').length < 4)
			grid[row][col] = '@.'[removable * !isPart1]
			return acc + removable
		}, 0)
	return ((changed == 0) * total) || (isPart1 * changed) || solve(grid, total + changed, isPart1)
}

const input = document.body.innerText.trim().split('\n').map(l => l.split(''))

console.time('Advent of Code 2025 day 4 both parts')
console.log([
	solve(input.map(r => r.map(c => c)), 0, 1),
	solve(input.map(r => r.map(c => c)), 0, 0)
])
console.timeEnd('Advent of Code 2025 day 4 both parts')
020
papierabreisser.bsky.social @papierabreisser.bsky.social · 03/12/2025
My solution to the #flowlesschallenge for "Lobby" - Day 3 - Advent of Code 2025 #AdventOfCode #AOC
// My solution for day 3 to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/3/input (try F12 or CTRL+I in your browser)
// The two numbers are the results for the first and second part for your personal input

const best = (digits, row) => Number(
	(new Array(digits))
	.fill(0)
	.reduce(([res, pos, i]) => {
		const r = res + Math.max(...row.slice(pos + 1, row.length - digits + 1 + i))
		return [ r, pos + row.slice(pos + 1).indexOf(~~r[r.length - 1]) + 1, i + 1 ]
	}, ['', -1, 0])[0]
)

console.log(
	document.body.innerText
	.trim()
	.split('\n')
	.map(l => l.split('').map(Number))
	.reduce(([p1, p2], row) => [p1 + best(2, row), p2 + best(12, row)], [0, 0])
)
020
papierabreisser.bsky.social @papierabreisser.bsky.social · 02/12/2025
Upping the ante for #AdventOfCode by providing a solution for the flowless challenge on day 2:
// My solution for day 2 to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/2/input (try F12 or CTRL+I in your browser)
// The two numbers are the results for the first and second part for your personal input

console.log(
    document.body.innerText
    .split(',')
    .map(range => range.split('-').map(Number))
    .reduce(([p1, p2], [start, end]) => 
        (new Array(end - start))
        .fill(0)
        .reduce(([a, b, v]) => [
            a + /^(\d+)\1$/.test(v) * v,
            b + /^(\d+)\1+$/.test(v) * v,
            v + 1
        ], [p1, p2, start])
    , [0, 0])
    .slice(0, 2)
)
010
papierabreisser.bsky.social @papierabreisser.bsky.social · 02/12/2025
Upping the ante for #AdventOfCode by providing a solution for the flowless challenge on day 1:
// My solution to this challenge: https://www.reddit.com/r/adventofcode/comments/1p2ral9/flowless_challenge_2025/
// Purely functional and branchless programming
// Just paste this code into the developer console on https://adventofcode.com/2025/day/1/input (try F12 or CTRL+I in your browser)
// The two numbers are the results for the first and second part for your personal input

console.log(
    document.body.innerText
    .split('\n')
    .map(l => [(l[0] == 'R') * 2 - 1, ~~l.slice(1)])
    .reduce(([p1, p2, pos], [dir, val]) => {
        [pos, p2] = (new Array(val))
            .fill(0)
            .reduce(([p, z, d]) => {
                p = (p + d + 100) % 100
                z += p == 0
                return [p, z, d]
            }, [pos, p2, dir])
        p1 += pos == 0
        return [p1, p2, pos]
    }, [0, 0, 50])
    .slice(0, 2)
)
020
papierabreisser.bsky.social @papierabreisser.bsky.social · 15/04/2025
Möchte mir mal jemand kurz erklären, in wie weit Apple Geräte bislang als Maßstab für bezahlbar galten? Muss ich hier wirklich irgendwen an die Apple Tax erinnern? Oder den ach so beliebten Monitorständer für fast 1000 Euro? www.spiegel.de/wirtschaft/u...
spiegel.de
(S+) Apple und die Zölle: Wie Trump die iPhone-Erfolgsgeschichte ausradieren könnte
Der Aufstieg von Apple gilt als beispielloser Erfolg. Doch Trumps Zölle könnten iPhones bald unbezahlbar machen. Konzernchef Tim Cook versucht, das Schlimmste zu verhindern.
010
papierabreisser.bsky.social @papierabreisser.bsky.social · 23/02/2025
Wählen ist ein wenig wie Vorsorgeuntersuchungen. Der reine Tätigkeit an sich ist ganz OK, eine winzige Unannehmlichkeit. Aber direkt danach diese Ungewissheit, wie schlimm das Ergebnis wohl ausfallen wird, das ist echt beschissen. Durchhalten, hier kommt das Ergebnis zum Glück recht zügig!
010
papierabreisser.bsky.social @papierabreisser.bsky.social · 13/01/2025
Sieht das für Dich wie eine Steigerung der Erfahrungen aus der Demo-Tour nach Lützerath aus, @katjadiehl.bsky.social ? www.grundrechtekomitee.de/details/pres...
Auszug aus einem Artikel auf Grundrechtekomitee.de zu Polizeigewalt gegenüber Demonstrierenden in Riesa anlässlich des AfD Parteitages.

"In den frühen Morgenstunden ging es der Polizei zunächst sichtlich darum, die Protestierenden so lange wie möglich aus der Stadt und von der WT-Arena fernzuhalten. Nahezu alle Zufahrtsstraßen nach Riesa waren von Polizeiwagen versperrt, nur die Zufahrten über die B169 waren offen. Die bis zu 200 Busse mit Protestierenden aus dem gesamten Bundesgebiet sollten einzeln durch Kontrollstellen geleitet werden. Dies führte vorhersehbar zu massiven Verzögerungen und langen Staus. Diese Kontrollstellen stellten damit nicht nur eine Einschüchterung, sondern auch eine Behinderung des Zugangs zu Versammlungen dar und sind somit als klare Einschränkungen der Versammlungsfreiheit zu werten. Zudem kritisierte das Grundrechtekomitee bereits im Vorfeld die Unrechtmäßigkeit dieser Einschränkung auf Basis einer fehlenden Befugnisnorm."
020
papierabreisser.bsky.social @papierabreisser.bsky.social · 21/12/2024
Lasst uns Musk bei jedem neuen Amoklauf in Amerika an seinen "incompetent fool" Tweet erinnern! "Should resign immediately!" Und natürlich bei jedem weiteren Todesopfer durch einen ach so intelligenten Tesla. www.spiegel.de/panorama/jus...
spiegel.de
Anschlag in Magdeburg: Elon Musk fordert Olaf Scholz zum sofortigen Rücktritt auf
Die genauen Hintergründe zur Tat auf dem Magdeburger Weihnachtsmarkt sind noch unklar, doch Elon Musk nutzt sie umgehend für einen Frontalangriff auf den Kanzler. Dieser sei ein »unfähiger Idiot« und ...
010