Sign in

Sarah Harris

@implausible17.bsky.social
364 followers 298 following 454 posts

Lives in Swindon UK, maths/stats nerd, paints murals, reads comics, grumbles fairly politely at ice hockey referees, watches a lot of sci fi and horror movies, has a big fat crush on Lee Pace.

PostsRepliesMedia
Sarah Harris @implausible17.bsky.social · 13/09/2026
This weekend's mural, not my usual style but I am pleased with how it turned out. This one is in Chippenham, Wiltshire. It's directly opposite a primary school so I painted a mama and baby squirrel, figured both the mums and the kids would like that.
191
Sarah Harris @implausible17.bsky.social · 31/08/2026
My contribution to the HUGE Wall Games street art and graffiti festival in Northampton this weekend - biggest in Europe with over 350 artists and writers! I was directly opposite the museum with its large shoe/boot collection, hence the big boots :) #wallgames
121
Sarah Harris @implausible17.bsky.social · 23/08/2026
Who is this stupid woman who wears a branded t shirt to promote her business in photos of a mural she has just painted, but has covered the logo in so much paint that nobody can read it?? That would be me :)
131
Sarah Harris @implausible17.bsky.social · 27/05/2026
Oof, I could have done with some of that icy dragon breath cooling me down while I was painting this one! Hottest May weekend in the UK in 82 years, apparently. Soooo sweaty!! :D Anyway - here you go - painted for a young dragon-obsessed lad's bedroom wall:
010
Sarah Harris @implausible17.bsky.social · 02/03/2026
A big mural (11 ft by just under 60 ft) that I finished yesterday for a local school. They wanted their four house trees, with roots as per their motto, and a mythical winged creature from each continent, as they have children from all over the world and wanted them all represented. Turned out nice!
130
Sarah Harris @implausible17.bsky.social · 19/01/2026
Photos to follow, but here is a quick vid of the mural I finished up this weekend for a local youth club, in Swindon UK. I had tremendous fun both designing this one & painting it. Drawing cute dragons is good for the soul :) The youth club opens in a couple of weeks, I hope the kiddos like it!
251
Sarah Harris @implausible17.bsky.social · 24/12/2025
A friend of mine (face obscured to protect the innocent) posted this this morning. I thought she was at a special, festive Bring Me The Horizon gig. I was so jealous! Until I realised that, no, she's in Bournemouth :)
010
Sarah Harris @implausible17.bsky.social · 24/12/2025
Well - I only got half way this year in #AdventOfCode :( It has been an insanely busy December and I just didn't have the time! I always say I will come back in January and finish it off, but I never do. Maybe when I retire :) Here's #AoCDay6 using #RStats Happy Christmas R-heads!
#Day 6 - Trash Compactor - Part 1

#load the puzzle input, transpose it, and setup the sums and products across all numeric columns
D6P1 <- read.table("D6input.txt", sep = "" , header = F , na.strings ="", stringsAsFactors= F) |> t()
D6P1 <- data.frame(D6P1) |> rename(pm = ncol(D6P1)) |> mutate(across(starts_with("X"), as.numeric)) 
numeric_cols <- D6P1[sapply(D6P1, is.numeric)]
D6P1$numericcolssum <- rowSums(numeric_cols)
D6P1$numericcolsprod <- apply(numeric_cols, 1, prod)
D6P1 <- D6P1 |> mutate(correctresult = if_else(pm == "+",numericcolssum, numericcolsprod))

print(paste("answer is",sum(D6P1$correctresult)))  #Part 2 - need to re-read in the data - the spaces matter now!

D6P2 <- data.frame(input = readLines("D6input.txt"), stringsAsFactors = FALSE)  
char_matrix <- str_split_fixed(D6P2$input, "", n = nchar(D6P2$input[1])) |> t() 

D6P2 <- as.data.frame(char_matrix) |> rename(pm = ncol(char_matrix)) |> mutate(across(starts_with("V"), as.numeric)) 
numeric_cols <- D6P2[sapply(D6P2, is.numeric)]
D6P2$numericcolssum <- rowSums(numeric_cols, na.rm = T)

D6P2 <- D6P2 |> filter(numericcolssum > 0) |>
  mutate(across(starts_with("V"), as.character)) |> 
  mutate(across(starts_with("V"), ~ replace_na(.,""))) |>
  mutate(newnum = as.numeric(do.call(paste0, across(starts_with("V"))))) |>  #paste the chars back together in the right order 
  mutate(indexno = ifelse(pm != " ", 1, NA), indexno = cumsum(replace_na(indexno, 0))) |> #give each set of numbers a URN
  mutate(pm = na_if(pm, " ")) |> fill(pm, .direction = "down")  #fill in the plus/mult symbols in the blank bits

additions <- D6P2 |> filter(pm == "+") |> group_by(indexno) |> summarise(result = sum(newnum)) |> ungroup()
mults <- D6P2 |> filter(pm == "*") |> group_by(indexno) |> summarise(result = prod(newnum)) |> ungroup()

print(paste("answer is",sum(additions$result)+sum(mults$result)))
120
Sarah Harris @implausible17.bsky.social · 23/12/2025
ah - and here is the tidy_ranges function:
#function to tidy up the ranges as they sometimes overlap:

tidy_ranges <- function(df) {
  result <- list()
  current <- df[1, ]
  for (i in 2:nrow(df)) {
    next_row <- df[i, ]
    if (next_row$fromnum <= current$tonum) {current$tonum <- max(current$tonum, next_row$tonum)}
    else {
      result <- append(result, list(current))
      current <- next_row }}
  result <- append(result, list(current))
  bind_rows(result) }
010
Sarah Harris @implausible17.bsky.social · 23/12/2025
Oops - I forgot to post #AdventOfCode day 5 #AoCDay5 #RStats I was a bit smug about this one because I solved it fairly quickly - and part 2 (which seemed to trip a lot of other people up) was an absolute doddle, because I'd already done most of the work in part 1 - pure luck really
# Day 5 - Cafeteria - Part 1

inputD5P1 <- data.frame(input = readLines("D5input.txt"), stringsAsFactors = FALSE)  #load data and split into 2 parts
blankrow <- which(inputD5P1$input == "")[1]
top <- inputD5P1 |> filter(row_number() < blankrow)
bottom <- inputD5P1 |> filter(row_number() > blankrow) |> 
  rename(candidate = 1) |> mutate(candidate = as.numeric(candidate)) |> arrange(candidate)

#split the top bit into from and to and tidy up the overlapping ranges:
top <- top |> separate(input, into = c("fromnum", "tonum"), sep = "-") |>
  mutate(fromnum = as.numeric(fromnum), tonum = as.numeric(tonum)) |> arrange(fromnum)
tidied_top <- tidy_ranges(top) |> arrange(fromnum)

#get rid of deffo spoiled items 
bottom <- bottom |> filter(candidate >= min(tidied_top$fromnum) & candidate <= max(tidied_top$tonum))

#now check through the ranges for each remaining candidate - find the first "from" that it is >= , and then mark as a match 
# if <= the to on that row - then when we have passed the "to" on a row, get rid

freshcounter <- 0
for (i in 1:nrow(bottom)) {
  candidate <- bottom[i,1]   
  tidied_top <- filter(tidied_top, tonum >= candidate)
  matchrow <- which(tidied_top$fromnum <= candidate)[1]
  if (!is.na(matchrow) && candidate <= tidied_top[matchrow,2]) {freshcounter <- freshcounter + 1}}

print(paste("answer is",freshcounter)) # Part 2 - glad I tidied up my ranges in part 1, makes this part easy peasy! :)

#re-create tidied_top and count how many in each range

tidied_top <- tidy_ranges(top) |> mutate(howmany = tonum - fromnum + 1)
print(paste("answer is",sum(tidied_top$howmany)))
130
Sarah Harris @implausible17.bsky.social · 20/12/2025
This year's #ArtVsArtist round up. These are some of the street art pieces (plus one canvas) I painted in 2025 just for fun. For my commissioned work (a little less technicolor! :) ) please see @murals_bysarah on insta. Happy christmas all, and all the best for 2026
041
Sarah Harris @implausible17.bsky.social · 18/12/2025
I was on an #AdventOfCode roll last night - completing both #Day4 and day5 (but I'll post day 5 tomorrow) For once I had an evening free of commitments to work or family - so I could attend to my commitment to the elves :) First matrix puzzle this year #AoCDay4 #RStats
# Day 4 - Printing Department - Part 1

D4mat <- do.call(rbind, strsplit(readLines("D4input.txt"), ""))  #load the data into a matrix 
matdim <- nrow(D4mat)

D4mat <- pad_matrix(D4mat)


# then just loop through every cell from [2,2] to [matdim+1,matdim+1] and count up the @s in all 8 directions
rollcount <- 0
for (i in 2:(matdim+1)) {
  for (j in 2:(matdim+1)) {
    if(D4mat[i,j] == "@") {
      neighbours <- sum(D4mat[i-1,j-1] == "@",D4mat[i-1,j] == "@", D4mat[i-1,j+1] == "@",
                        D4mat[i,j-1] == "@", F, D4mat[i,j+1] == "@",
                        D4mat[i+1,j-1] == "@",D4mat[i+1,j] == "@", D4mat[i+1,j+1] == "@")
      if(neighbours < 4) {rollcount <- rollcount + 1} }}}

print(paste("answer is",rollcount))  #function to pad the matrix out with full stops
pad_matrix <- function(mat, pad = ".", n = 1) {
  nr <- nrow(mat)
  nc <- ncol(mat)
  top_bottom <- matrix(pad, nrow = n, ncol = nc + 2 * n)
  side <- matrix(pad, nrow = nr, ncol = n)
  rbind(top_bottom, cbind(side, mat, side), top_bottom)
}#Part 2 - use the same padded matrix that was set up in part 1
#instead of just counting the reachable rolls, this time count them and also replace with a dot to 'remove' them.  
# keep passing through until no more rolls get removed.

rollcount <- 0

while (TRUE) { 
  removed <- 0
  for (i in 2:(matdim+1)) {
    for (j in 2:(matdim+1)) {
      if(D4mat[i,j] == "@") {
        neighbours <- sum(D4mat[i-1,j-1] == "@",D4mat[i-1,j] == "@", D4mat[i-1,j+1] == "@",
                          D4mat[i,j-1] == "@", F, D4mat[i,j+1] == "@",
                          D4mat[i+1,j-1] == "@",D4mat[i+1,j] == "@", D4mat[i+1,j+1] == "@")
        if(neighbours < 4) {
          rollcount <- rollcount + 1
          removed <- removed + 1
          D4mat[i,j] <- '.'}}}}
  if (removed == 0) break }

print(paste("answer is",rollcount))
060
Sarah Harris @implausible17.bsky.social · 16/12/2025
I'm so behind with these!! but it has been a busy month, sometimes the elves have to take a back seat, sorry elves #AdventOfCode day 3 - I basically used the exact same approach for parts 1 and 2, so here they both are #AoCDay3 #RStats
#Day 3 - Lobby - Part 1

inputD3P1 <- data.frame(input = readLines("D3input.txt"), stringsAsFactors = FALSE)

inputD3P1 <- inputD3P1 |>   rowwise() |>
  mutate(shorter_input = str_sub(input, end = -2),
         firstdigit = max(strsplit(shorter_input, "")[[1]]),
         firstdigitpos = which(strsplit(shorter_input, "")[[1]] == firstdigit)[1],
         remainder = str_sub(input, start = (firstdigitpos + 1)),
         seconddigit = max(strsplit(remainder, "")[[1]]),
         joltage = as.numeric(firstdigit)*10+as.numeric(seconddigit)) |> ungroup() 

print(paste("answer is",sum(inputD3P1$joltage)))#Part 2 - the same thing but twelve times instead of 2

inputD3P1 <- data.frame(input = readLines("D3input.txt"), stringsAsFactors = FALSE)

inputD3P1 <- inputD3P1 |>   rowwise() |>
  mutate(shorter_input = str_sub(input, end = -12),
         firstdigit = max(strsplit(shorter_input, "")[[1]]),
         firstdigitpos = which(strsplit(shorter_input, "")[[1]] == firstdigit)[1],
         remainder = str_sub(input, start = (firstdigitpos + 1), end = -11),
         seconddigit = max(strsplit(remainder, "")[[1]]),
         seconddigitpos = which(strsplit(remainder, "")[[1]] == seconddigit)[1],
         remainder2 = str_sub(input, start = (firstdigitpos+seconddigitpos + 1), end = - 10),
         thirddigit = max(strsplit(remainder2, "")[[1]]),
         thirddigitpos = which(strsplit(remainder2, "")[[1]] == thirddigit)[1],
         remainder3 = str_sub(input, start = (firstdigitpos+seconddigitpos +thirddigitpos + 1), end = -9),

      #and so on ......
         joltage = as.numeric(firstdigit)*100000000000+as.numeric(seconddigit)*10000000000+
as.numeric(thirddigit)*1000000000+as.numeric(fourthdigit)*100000000+
as.numeric(fifthdigit)*10000000+as.numeric(sixthdigit)*1000000+
 as.numeric(seventhdigit)*100000+as.numeric(eigthdigit)*10000+
           as.numeric(ninthdigit)*1000+as.numeric(tenthdigit)*100+
           as.numeric(eleventhdigit)*10+as.numeric(twelthdigit)) |> ungroup() 

print(paste("answer is",sum(inputD3P1$joltage)))
150
Sarah Harris @implausible17.bsky.social · 15/12/2025
Don't you just love it when a #AdventOfCode part 2 is easier than the part 1? Luckily I had this niggling feeling that I'd seen someone use a regex to identify repeating patterns in an old AoC puzzle a couple of years back, and clever past Sarah had made a note of it, go me! #AoCDay2Part2 #RStats
#Part 2 uses same input data frame already loaded in my part 1 solution

allpotentials <- data.frame(potentials = character())

for (i in 1:nrow(inputD2P1)) {
    j <- as.numeric(inputD2P1[i,1])
    k <- as.numeric(inputD2P1[i,2])
  for (n in j:k) { 
    p <- as.character(n)
    if (grepl("^(.+)\\1+$", p)) {allpotentials <- rbind(allpotentials,p) } } }

allpotentials <- allpotentials |> rename(potentials = 1) |> mutate(repeaters = as.numeric(potentials))

print(paste("answer is",sum(allpotentials$repeaters)))
120
Sarah Harris @implausible17.bsky.social · 14/12/2025
Merry Krampus Kristmas everyone! Painted today in Stroud, Gloucestershire.
A street art style mural of a cute Krampus against a festive, winter background.  Photo also features the artist.
130
Sarah Harris @implausible17.bsky.social · 06/12/2025
Had a ton of fun today in Cheltenham, painting this homage to one of my favourite movies of all time. The Wicker Man (1973)
230
Sarah Harris @implausible17.bsky.social · 05/12/2025
I was late to starting #AdventOfCode this year as I've been a bit busy - I didn't even realise that we only have 12 puzzles for 2025. Sob. Probably just as well as I am rusty as a rusty thing, and made a bit of a pig's ear of the second bit of this one!! Day 1 parts 1 and 2 #RStats #AoCDay1
060
Sarah Harris @implausible17.bsky.social · 04/12/2025
I've only got time for a Part 1 today - so here is #AdventOfCode day 2 part 1, using #RStats I am quite certain that there is a more elegant way of solving this one, but it worked first time and I have other shizz to do tonight, so it will have to suffice! #AoCDay2
#Day 2 "Gift Shop" - part 1

library(bit64)  # need this as some of the numbers in the main input are large

inputD2P1 <- readLines("D2_input.txt")

inputD2P1 <- strsplit(inputD2P1, ",")[[1]] |>
  lapply(function(x) as.integer64(strsplit(x, "-")[[1]])) |>
  do.call(what = rbind) |>
  as.data.frame() 

options(scipen = 999)
is_even <- function(x) x %% 2 == 0

kounter <- 0

for (i in 1:nrow(inputD2P1)) {
  x <- inputD2P1[i,1]
  y <- inputD2P1[i,2]
  z <- as.character(x)
  startlen = str_length(z)
  if(!is_even(startlen)) {
    z <- as.character(10^startlen)
    startlen <- startlen + 1 }
  half <-  substr(z,1,(startlen/2)) 
  trial <- as.numeric(paste0(half,half))
  while (TRUE) {
    if (trial >= x & trial <= y) {kounter <- kounter + as.numeric(trial)}
    if (trial <= y) { 
      half <- as.character(as.numeric(half) + 1)
      trial <- as.numeric(paste0(half,half))
    } else break }}


print(paste("answer is",kounter))
160
Sarah Harris @implausible17.bsky.social · 18/08/2025
I don't always remember to post my street art stuff on here, but I quite like how my Laika piece turned out. She sold for a good cause too, which is cool, I didn't think anyone would be able to fit an 8 ft tall painting in their house, but in the end 3 people had a little bidding war! :)
A painting of Laika, the first dog in space, on an 8 foot by 4 foot vertical board
150
Sarah Harris @implausible17.bsky.social · 11/06/2025
I just saw the author/comedian @callybeaton.bsky.social post that women our age weren't raised to say that we are proud of our work / what we do (I'm doing her a slight disservice as she is 2 years younger than me) But she's right, we should be able to. Here's some recent work I'm proud of:
Painted for Cheltenham Paint FestivalPainted for Swindon Paint FestHomage to Douglas Adams - painted for a college in WorcestershirePainted for Robins FC youth football team in Swindon
350
Sarah Harris @implausible17.bsky.social · 26/04/2025
Oh no, not again! I had fun painting this today at Norton College in Worcester, I'm hoping it will encourage some of the kids to give the books a read :) #HitchhikersGuide #42
141
Sarah Harris @implausible17.bsky.social · 21/04/2025
One of my birthday presents this year was this cool phrenology head. I've called him Dom because he kind of reminds me of Dominic Cummings :D
130
Sarah Harris @implausible17.bsky.social · 20/04/2025
Highlights from my birthday trip to London town yesterday (It's impossible to pick 4! Facebook got 80)
Leigh Bowery exhibition at the Tate ModernOperation Mincemeat at the Fortune TheatreTim Burton exhibition at the Design Museum - ack.ack!Fancy birthday dinner at the Stablehand
230
Sarah Harris @implausible17.bsky.social · 18/04/2025
Possibly my movie of the year so far. VERY glad I went in blind, as having watched the trailer since I got home, it would have spoilt so much. So avoid the trailers, peeps, and go see this banger! (stick around at the end too. mid creds AND post creds) #SinnersMovie
121
Sarah Harris @implausible17.bsky.social · 16/04/2025
Apparently we can upload videos here now? Here's a little ⚽️ themed bedroom wall makeover that I painted for a local football crazy kiddo last weekend: #NUFC #footballmural
1013412
Sarah Harris @implausible17.bsky.social · 08/04/2025
The #SixTheMusical pro shot was even better than I thought! Soooo hard not to sing along, but for the sake of the rest of the Cineworld audience, I controlled myself :)
020
Sarah Harris @implausible17.bsky.social · 19/03/2025
Last night: Descendents, Circle Jerks & Negative Approach in Bristol First time I've seen any of these bands since the mid 80s and they've still got it! The fact that they are all older than me but still have bundles of life and energy, gives me hope that maybe I ain't past it just yet :D
Milo from the Descendents, Bristol gig 18th March 2025Circle Jerks, Bristol gig 18th March 2025Negative Approach, Bristol gig 18th March 2025T-shirt from the gig
050
Sarah Harris @implausible17.bsky.social · 07/03/2025
I saw this one last weekend, it is super faded now compared to your photo, but still lovely, even if a little more pastel....
110
Sarah Harris @implausible17.bsky.social · 02/02/2025
The world is falling apart, but when you have a day out with friends with good tunes playing, lots of hugs, and we all get to paint our favourite kaiju, it seems a teeny bit less awful Tunnel Rats jam, Oxford My lil King Ghidorah and his derpy lil faces :)
My spray painted King Ghidorah painting, as part of the Tunnel Rats jam in Oxford, UK, organised by the MES crewMy spray painted King Ghidorah painting, as part of the Tunnel Rats jam in Oxford, UK, organised by the MES crewMy spray painted King Ghidorah painting, as part of the Tunnel Rats jam in Oxford, UK, organised by the MES crewMy spray painted King Ghidorah painting, as part of the Tunnel Rats jam in Oxford, UK, organised by the MES crew
191
Sarah Harris @implausible17.bsky.social · 28/01/2025
I rarely do visuals, I'm a number cruncher not a word cruncher, but I needed a few wordclouds with lots of custom stop words, so I thought rather than use an online tool, I'd code them up in #Rstats so it was easy to access all the data directly. Actually quite pleased with this output, go me!
output of the wordcloud function that I wrote in #Rstats that is rather pretty and I'm quite smug about it
030
Sarah Harris @implausible17.bsky.social · 23/01/2025
Google's AI overview being super useful and great at maths Hardly seems worth me travelling all the way to London for a show that lasts 25 minutes (including the interval)
Google's AI overview telling me that a 2.5 hour show that starts at 2.30pm, will be over before 3pm....
020
Sarah Harris @implausible17.bsky.social · 19/01/2025
Hmm. I might have already seen my worst film of 2025, and it's only half way through January. The practical effects were nicely done. But sadly I have very little else positive to say about it. Sorry! #wolfman
Poster for Wolfman movie 2025
130
Sarah Harris @implausible17.bsky.social · 19/01/2025
I still exist mainly on 90s grunge
120
Sarah Harris @implausible17.bsky.social · 17/01/2025
Twin Peaks is a masterpiece. I painted this just last year, pity it's no longer there (street art doesn't last long) as I would have gone back and added an RIP on there for DL. Eraserhead also brilliant. Enjoy! PS nice to meet you, and yes it's very pleasant here :)
Myself and a Twin Peaks mural I painted summer 2024 in Cheltenham UK
110
Sarah Harris @implausible17.bsky.social · 16/01/2025
25911
Sarah Harris @implausible17.bsky.social · 15/01/2025
Reeeeeeally, Duolingo?? :) In a section named "talk about Ireland", after some fairly innocuous bits about the Taoiseach and the President, and the GAA, we're straight into "the men work in the bog" :)
Irish language lesson from Duolingo, sentence to translate is "where are the bogs?"Irish language lesson from Duolingo, sentence to translate is "the men work in a bog"
030
Sarah Harris @implausible17.bsky.social · 04/01/2025
I can tell that last night was the coldest one yet this winter, as it's the first time my iPad didn't manage to charge up overnight. I shall have to dig out its special winter charging blanket (yes it actually has one, it's one of my son's old cot blankies) Does anyone else have this problem?
000
Sarah Harris @implausible17.bsky.social · 31/12/2024
I've seen out the year watching the last couple of episodes of the 12th and final season of Letterkenny. I've kind of been putting it off because I didn't want it to end! I sure am going to miss those hicks, skids and hockey players (and Glen and Tanis!) How am I now? Sad, and you? #letterkenny
230
Sarah Harris @implausible17.bsky.social · 30/12/2024
In all honesty, this one on its own is worth 9, it's brilliant
010
Sarah Harris @implausible17.bsky.social · 30/12/2024
It's that time of year again #ArtVsArtist 2024 These are mainly things I've painted over the last year for paint festivals or just for funsies (a bit more "me" than most of my commissioned mural work) Looking forward to getting back out there in 2025 in the springtime when the weather picks up
A 3x3 grid featuring 8 pieces of street art I've painted in 2024, and a photo of me in the middle.  
Subjects:
Top row L-R  Year of the Dragon, Twin Peaks, punk rock girls
Middle row L-R  Star Wars, me, an alien wearing Docs
Bottom row L-R  a cybercat, a UFO beaming up bunnies, a spooky forest scene with weird blue women and green moon faces
040
Sarah Harris @implausible17.bsky.social · 29/12/2024
Without downloading any new pics, what is your energy (or lack of) going into 2025?
Me knackered on a dusty carpet after painting a very detailed mural over a couple of loooong days Close up of dead me.  Least flattering photo ever :D
040
Sarah Harris @implausible17.bsky.social · 26/12/2024
Wasn't expecting this to make me cry so much that I now feel fully dehydrated. Maybe I just needed a good weep, and this gave me the excuse. The monkey thing works strangely well. #betterman 1/3
Movie poster for Better Man, the Robbie Williams biopic
100
Sarah Harris @implausible17.bsky.social · 24/12/2024
Wishing a big fat Happy Christmas to everyone I've had the pleasure of interacting with on here this year 🎄🎅🎁 I didn't have time this year to go out and paint a piece of Christmassy street art like I usually do 😢, so here are re-runs from the last 3 years to make up for my slacking:
041
Sarah Harris @implausible17.bsky.social · 23/12/2024
Share your favourite photo of yourself from 2024.... I mean, there are more flattering pics but I guess this one wins
240
Sarah Harris @implausible17.bsky.social · 23/12/2024
So impressed with everyone who is still going :) I got this far and then my life got insanely busy. I have a few hours spare tomorrow and I'd love to get at least one more star before Christmas. Which of the ones I've not done yet would you suggest I tackle?
100
Sarah Harris @implausible17.bsky.social · 23/12/2024
I've had a month off painting murals, as the last one I did took weeks and half killed me :D But I managed to fit one in this weekend. The client wanted a beach but just the damp sand ripples, no sea, no sky, no deckchairs, nothing but sand... had to be finished in one weekend so loooooong hours
A hand painted mural of rippled sandThe plain wall before the mural A picture of how I had to sketch the mural up on the wall by hand using a grid method, as the room was too narrow to use a projectorMe passed out exhausted in front of the completed mural :)
130
Sarah Harris @implausible17.bsky.social · 18/12/2024
Days 16, 17 and 18:
000
Sarah Harris @implausible17.bsky.social · 17/12/2024
#AdventOfCode Day 17 #RStats Still short on time but I thought this one looked like fun and not too difficult (part 1 at least :) ), so I gave it a quick go. This puts me on 30 stars, matching my personal best AoC from 2022 - so I have to get at least one more ⭐ this year for a new PB...
Screenshot of my setup code for AoC day 17 in RStats:

#day 17: Chronospatial Computer

D17 <- readLines("day17input.txt") |> as.data.frame() |> rename(unparsed = 1) |>
  filter(unparsed != '') |>
  mutate(valstring = if_else(row_number() <= 3 , substr(unparsed,13,nchar(unparsed)), substr(unparsed,10,nchar(unparsed)))) 

rA <- as.numeric(D17[1,2])
rB <- as.numeric(D17[2,2])
rC <- as.numeric(D17[3,2])

instructions <- as.numeric(unlist(str_split(D17[4,2],",")))
opcodes <- instructions[seq(1, length(instructions), 2)]
combos <- instructions[seq(2, length(instructions), 2)]

pos <- 1
the_output <- numeric()  

operate <- function(op,co) { 
  if(op != 1 & op != 3) {
  if(co == 4) co <- rA
  else if(co == 5) co <- rB
  else if(co == 6) co <- rC }
  if(op == 0) rA <<- floor(rA/(2^co))
  else if(op == 1) rB <<- bitwXor(rB,co)
  else if(op == 2) rB <<- ( co %% 8 )
  else if(op == 3 & rA != 0) pos <<- ifelse(co == 0,1,co/2)
  else if(op == 4 ) rB <<- bitwXor(rB,rC)
  else if(op == 5 ) {return (co %% 8)}
  else if(op == 6) rB <<- floor(rA/(2^co))
  else if(op == 7) rC <<- floor(rA/(2^co))
  {return (NA_real_)}
  }Screenshot of part 1 solution:

while (pos <= length(combos) + 1) {
  op <- opcodes[pos]
  co <- combos[pos]
  pos <- pos + 1
  if(is.na(op)) break
  out <- operate(op, co)
  if(!is.na(out)) the_output <- append(the_output,out)
 }
  
SolutionP1 <- paste(the_output, collapse = ",")
280
Sarah Harris @implausible17.bsky.social · 16/12/2024
I think the main takeaway that I'll actually use in my normal day to day R coding (which is very narrow-focussed and doesn't really overlap with AoC much if at all), is that we can now use |> instead of %>% :D Remember seeing this when it was first announced but my work are SO slow with updates!
000
Sarah Harris @implausible17.bsky.social · 15/12/2024
#AdventOfCode day 15 #RStats Thankfully, despite me being too tired/stupid to find the letter v on a keyboard 🤦‍♀️, part 1 turned out not to be too bad at all when it came to the coding bit, thanks Head Elf, I REALLY didn't want to be up till 2am like I was yesterday with D14p2 One ⭐ will do for now
screenshot of my RStats code for AoC d15 p1  - setup:

#Day 15: Warehouse Woes

#setup

D15 <- as.data.frame(readLines("day15input.txt")) |> rename(unparsed = 1)
splitat <- which(D15$unparsed == "")

wmap <- D15 |> filter(row_number() < splitat) #rows above the blank - the warehouse map 
wmap <- do.call(rbind, strsplit(wmap$unparsed,""))

dir <- D15[(splitat + 1):nrow(D15), ] #rows below the blank - the direction instructions
dir <- unlist(strsplit(dir,""))

robot <- which(wmap == "@", arr.ind = T)  #robot starting positionScreenshot of the rest of the code for part 1:

for (i in 1:length(dir)) {
  dirsym <- dir[i]      
  print(paste(i, dirsym))
  if(dirsym == "^") dircoord <- c(-1,0)
  else if(dirsym == "v") dircoord <- c(1,0)
  else if(dirsym == "<") dircoord <- c(0,-1)
  else if (dirsym == ">") dircoord <- c(0,1)
  else break
  nextup <- robot + dircoord  #find the next space he would like to move to  
  if(wmap[nextup] == "#") next     #we've hit a wall, do nothing
  else if (wmap[nextup] == ".") {   #there's a space there to move into, happy days 
    wmap[nextup] <- "@"      #swap the @ and the .
    wmap[robot] <- "."
    robot <- nextup }
  else if (wmap[nextup] == "O") {   #we've found a box
    keepgoing <- nextup 
    while (wmap[keepgoing] == "O") keepgoing <- keepgoing + dircoord   #see how many boxes there are
    if(wmap[keepgoing]=="#")  next   #if there's a wall after the boxes, do nothing
    else if(wmap[keepgoing]==".") {   #otherwise, move the boxes along with the robot bringing up the rear
      wmap[nextup] <- "@"
      wmap[robot] <- "."
      wmap[keepgoing] <- "O"
     robot <- nextup }
  }
 }

boxes <- as.data.frame(which(wmap == "O", arr.ind = T)) |> mutate(gps = (row - 1)*100 + (col-1)) #calc the GPS 

SolutionP1 <- sum(boxes$gps)
040