Forum menu
Anyone else playing this year?
I'm attempting solutions using FME, but will resort to python within FME if a pure FME solution looks impossible.
I concur.
I guess that's a no then 🙂
Never seen this before, but just solved the first day with excel, is that cheating?
(There wasn't an RPGIV editor on replit.com, so I'm a bit stuffed otherwise).
looked at problem 1, thought yeah I can do that and ate some chocolate. does that count?
I concur.
I think it's a coded message.
Never seen this before, but just solved the first day with excel, is that cheating?
No, you can use whatever language/program you like
I think it’s a coded message.
In winter the red fox hunts the white hare.
looked at problem 1, thought yeah I can do that and ate some chocolate. does that count?
That reminds me of the old joke about the Engineer, Physicist and Mathematician.
They're all staying at a hotel overnight and by some freak chance a fire breaks out in each of their rooms.
The Engineer wakes up, sees the fire, quickly fills an ice-bucket with water, douses the flames and goes back to bed.
The Physicist wakes up, sees the fire, quickly fills and ice-bucket with water, quickly calculates the optimum angle and force to apply to the bucket given an assumed range and bucket mass, and neglecting the effects of air resistance as negligible; douses the flames, and goes back to bed.
The Mathematician wakes up, sees the fire, quickly determines that the problem is solvable, and goes back to bed.
Anyway. I had a go at Day 1. First time I've heard of FME: is it a natural fit for coding advent calendar problems?
(There wasn’t an RPGIV editor on replit.com, so I’m a bit stuffed otherwise).
It's also the first time I've come across RPGIV, too.
I desperately wanted it to be some kind of MMUD where you code by moving through ASCII-rendered dungeon rooms accumulating counters, fighting d-cache lookup misses, and vaulting NULL pointers, but sadly it's nothing like that at all.
Ignorance is bliss.
In winter the red fox hunts the white hare.
The sparrow farts gently in the autumn sun.
First time I’ve heard of FME: is it a natural fit for coding advent calendar problems?
Based on past years, I'd say some puzzles are simpler in FME but most are more difficult (possibly impossible). I think I managed 44 stars out of 50 last year using FME and had to resort to python for the final 6.
I'm in, hopefully using ICI as that's our language of choice at <work>, don't @ me.
Failing that, perl.
ICI as that’s our language of choice at <work>
Another new one! Today is a proper school day 😀
Ooh this looks like just the sort of distraction from real work I like!
Failing that, perl.
Now there's something I've not heard mentioned for a few years, other than when asked by a friend 'What on is earth is Perl for the web?' when looking at the 20+ year old text books my iMac sits on.
See if I can dust off some of that old knowledge....
Perl is my natural language of choice I guess, having used it for a few sites over the years but mostly backend processes these days. I can't remember the last time I bought a programming book, despite being addicted in my youth - probably something on WAP.
I just made a long list of all the languages I've used, and realised they are nearly all no longer used, , with the exception of c+variants and java/python, everything else back to algol/fortran is just about defunct. ICI is used ony at <work>, and almost no where else.
far to much reading involved for me.
Just done day 3, nothing more than excel and a bit of sorting. Got a feeling my basic excel knowledge is not going to be enough fairly soon.
It’s also the first time I’ve come across RPGIV, too.
I desperately wanted it to be some kind of MMUD
No use to me, I haven't played the first 3.
I'm trying to do it in R, since I'm trying to become more competent in that language. I'm getting frustrated!
Stupid n00b question, the URL for the data is 'https://adventofcode.com/2021/day/1/input' but R (and Matlab, which I also tried) seem to want a file to read. I tried bunging .html, .php and /index.html at the end of that address, but it didn't work. How can I scrape the website? I've already got the answer by copying / pasting into excel then loading that into R but that seemed like an immediate failure.
I’ve already got the answer by copying / pasting into excel then loading that into R but that seemed like an immediate failure.
Nah, get it into whatever file format however you want to.
I'm in. Using Ruby.
How can I scrape the website?
I'm just copying the data into a local txt file. Parse into an array. Job done.
Fair enough. I just thought it should be dead easy to scrape the website itself rather than having additional files saved on my PC.
I can just copy paste the data into my workspace but most of the python solutions I've seen use a local txt file as their input so I wouldn't worry about that. Puzzle inputs differ by user so you can't just simply scrape the website.
Part 2 of Day 3 is fairly hideous to do in FME but it's done.
Yesterday's puzzle was really nice and straightforward in FME, only required one change to get part 2. Today's part 2 required a complete rewrite. You win some you lose some
Part 2 of Day 3 is fairly hideous to do in FME but it’s done.
Because use I'm a dick, I tried doing it just with SQL. Got the wrong answer and I had give up to to do some actual work...
Just looked at the bingo and the vents one, both look equally tricky...
Lanternfish looks pretty straight forward...
Another new one! Today is a proper school day 😀
Indeedy,FME and ICI ,I’d heard of RPGiv thou.
Perl’s a singer 🙂
Got enough work related coding challenges, without digging up a Chrissy one 🙂
(Who thought page numbering could be so interesting)
Does it get interesting at any point? The first few were the sort of trivial processing that I waste most of my life doing as a pre-requisite to getting any useful work done....
FME is an ETL tool rather than a programming language, not sure if I'd made that clear 🙂
Lanternfish looks pretty straight forward…
pt2 would be, except it starts blowing the array limit of javascript 🙂
Gah - not even started - tonights the night !
Jeez, I'm stumped on day one. Powershelling it and I don't think my code is wrong but I must be missing something.
That was one line of R code...
Jeez, I’m stumped on day one. Powershelling it and I don’t think my code is wrong but I must be missing something.
Use the example as a test case: helps to debug when you know what the answer should be and why of course!
did it in excel (correctly) and it was 1 more than my original answer, 2 more than my afterthought answer. I'm still stumped to the logic. Something is back to front.
But it works on the example data.
#feelingthick
Does it get interesting at any point?
I've been running through last years, some have required a bit of thought.
did it in excel (correctly) and it was 1 more than my original answer, 2 more than my afterthought answer. I’m still stumped to the logic. Something is back to front.
But it works on the example data.
If the code is right could the data be wrong? Some copy/paste error or similarly frustrating PEBKAC?
did it in excel (correctly) and it was 1 more than my original answer
It is one of the two hard problems in computer science:
https://twitter.com/codinghorror/status/506010907021828096?lang=en-GB
Well, the same data & logic worked for D1P2, so truly stumped.
@jimmy - post code if you are stuck, probably something very simple.
I cocked my first few attempts up by not using strict in perl and mistyping a variable name - noob.
I was able to brute force a solution this morning before I stumbled on a cleverer way
this is much more interesting than the meeting I am in
got to day 3 part 2
d3p2 took some typing
@jimmy – post code if you are stuck, probably something very simple.
Thanks. The fact it works for D1P2 suggests there's some data nuance I've missed. But I'm onto D2P2 now. Just doing it because I miss scripting now absent from the day job.
Oh dear - I posted the wrong AoC STW code a few minutes ago - apologies if you joined and then get booted from our work leaderboard.
I have created a STW leaderboard, where we can all revel in our lack of effort.
Its the end of no-effort November, into born-to-be-mild December.
The correct code is, scouts honour checked it a few times now, 502307-275d7a99
Thanks
Ant