Search the forum using the power of Google

  • This topic has 207 replies, 30 voices, and was last updated 1 month ago by euain.
Viewing 40 posts - 1 through 40 (of 208 total)
  • Advent of Code
  • ebygomm
    Free Member

    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.

    Drac
    Full Member

    I concur.

    ebygomm
    Free Member

    I guess that’s a no then 🙂

    jimdubleyou
    Full Member

    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).

    jam-bo
    Full Member

    looked at problem 1, thought yeah I can do that and ate some chocolate. does that count?

    grum
    Free Member

    I concur.

    I think it’s a coded message.

    ebygomm
    Free Member

    Never seen this before, but just solved the first day with excel, is that cheating?

    No, you can use whatever language/program you like

    Drac
    Full Member

    I think it’s a coded message.

    In winter the red fox hunts the white hare.

    tomparkin
    Full Member

    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?

    tomparkin
    Full Member

    (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.

    grum
    Free Member

    In winter the red fox hunts the white hare.

    The sparrow farts gently in the autumn sun.

    ebygomm
    Free Member

    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.

    haloric
    Free Member

    I’m in, hopefully using ICI as that’s our language of choice at <work>, don’t @ me.

    Failing that, perl.

    tomparkin
    Full Member

    ICI as that’s our language of choice at <work>

    Another new one! Today is a proper school day 😀

    itsonlymelee
    Free Member

    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….

    haloric
    Free Member

    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.

    Klunk
    Free Member

    far to much reading involved for me.

    markoulini
    Full Member

    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.

    Cougar
    Full Member

    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.

    Superficial
    Free Member

    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&#8217; 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.

    jimdubleyou
    Full Member

    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.

    butcher
    Full Member

    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.

    Superficial
    Free Member

    Fair enough. I just thought it should be dead easy to scrape the website itself rather than having additional files saved on my PC.

    ebygomm
    Free Member

    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.

    ebygomm
    Free Member

    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

    jimdubleyou
    Full Member

    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…

    dudeofdoom
    Full Member

    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)

    thecaptain
    Free Member

    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….

    ebygomm
    Free Member

    FME is an ETL tool rather than a programming language, not sure if I’d made that clear 🙂

    StuF
    Full Member

    Lanternfish looks pretty straight forward…

    pt2 would be, except it starts blowing the array limit of javascript 🙂

    haloric
    Free Member

    Gah – not even started – tonights the night !

    jimmy
    Full Member

    Jeez, I’m stumped on day one. Powershelling it and I don’t think my code is wrong but I must be missing something.

    thecaptain
    Free Member

    That was one line of R code…

    tomparkin
    Full Member

    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!

    jimmy
    Full Member

    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

    Aidy
    Free Member

    Does it get interesting at any point?

    I’ve been running through last years, some have required a bit of thought.

    tomparkin
    Full Member

    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?

    Aidy
    Free Member

    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:

    jimmy
    Full Member

    Well, the same data & logic worked for D1P2, so truly stumped.

    haloric
    Free Member

    @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.

Viewing 40 posts - 1 through 40 (of 208 total)

You must be logged in to reply to this topic.

Search the forum using the power of Google

Thanks for popping by - why not stay a while?IT'S FREE

Sign up as a Singletrack Member and you can leave comments on stories, use the classified ads, and post in our forums, do quizzes and more.

Join us, join in, it’s free, and fun.