Author Topic: Advent of Code  (Read 115176 times)

tonycollinet

  • No Longer a western province of Númenor
Re: Advent of Code
« Reply #850 on: 02 December, 2020, 08:27:53 pm »
Well this is rather fun. Not done any coding outside of simple VBA for years (about 20), and I'm trying this as a vehicle for learning python.

Day one:
(click to show/hide)


***************
And day 2: (for day two, I learned to read the input data from a text file into a list rather than declaring the data in the list)
(click to show/hide)

tonycollinet

  • No Longer a western province of Númenor
Re: Advent of Code
« Reply #851 on: 02 December, 2020, 08:38:58 pm »
Some ugly / semi-minimalist perl:-

(click to show/hide)

(I know it can be code golfed to a lot less than that, but that's about as minimalist as I'd go before it starts to become a puzzle rather than recognisable code.)

Call that recognisable? Let me give you a layman's  ;D ;D ;D :) ::-) ::-) ::-) ;D ;D ;D :facepalm:

Re: Advent of Code
« Reply #852 on: 03 December, 2020, 11:15:27 am »
(click to show/hide)

Still waiting for the first nasty one.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #853 on: 03 December, 2020, 04:57:01 pm »
Yes.  The introduction is quite gentle this year.
Clever enough to know I'm not clever enough.

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #854 on: 03 December, 2020, 06:16:09 pm »
Day 3 done  :)

I've been putting my amateur JS code efforts here:
http://www.pinniped.plus.com/AoC/index.htm

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #855 on: 03 December, 2020, 06:31:50 pm »
Today's lesson is arrays and the modulo operator...

Could you put hints in a Spoiler, please?

tonycollinet

  • No Longer a western province of Númenor
Re: Advent of Code
« Reply #856 on: 03 December, 2020, 08:14:22 pm »
Day 3 done  :)

I've been putting my amateur JS code efforts here:
http://www.pinniped.plus.com/AoC/index.htm

There is no source to view (firefox)

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #857 on: 03 December, 2020, 08:17:53 pm »
Day 3 done  :)

I've been putting my amateur JS code efforts here:
http://www.pinniped.plus.com/AoC/index.htm

There is no source to view (firefox)

Ctrl-u or right-click > View source

tonycollinet

  • No Longer a western province of Númenor
Re: Advent of Code
« Reply #858 on: 03 December, 2020, 11:18:38 pm »
Ahhhhh - of course  ;D

Re: Advent of Code
« Reply #859 on: 04 December, 2020, 11:00:06 am »
Today's lesson is arrays and the modulo operator...

Could you put hints in a Spoiler, please?

Ah, ok, sorry, will do.

(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: Advent of Code
« Reply #860 on: 04 December, 2020, 11:41:23 am »
Found day 4 a bit boring to be honest.
Reading arbitrary rules and writing validation code is a bit too much like actual work... :-\

Ben T

Re: Advent of Code
« Reply #861 on: 04 December, 2020, 11:43:37 am »
(click to show/hide)

Quote
(click to show/hide)

Re: Advent of Code
« Reply #862 on: 04 December, 2020, 02:01:51 pm »
Still sticking with Google Sheets until they force me to stop.

Day 3:
https://docs.google.com/spreadsheets/d/1­7_5yPJ8oNENFlRtqBnbCOLqE50RDK5QlLC_3p1v8­Csg/edit

Day 4:
https://docs.google.com/spreadsheets/d/1Gj7tgbzQUkiwS5_wJ62lvNfRNmbqBpAjdYLCAD1ulQw/edit

Re: Advent of Code
« Reply #863 on: 04 December, 2020, 04:35:52 pm »
Day04 has me scratching my head.  My VBA (with interfaces and code injection!!)  works OK with the test  data but fails on the real stuff < mumble mumble mumble go read the question again again again again>
Clever enough to know I'm not clever enough.

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #864 on: 04 December, 2020, 04:45:42 pm »

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #865 on: 04 December, 2020, 04:50:12 pm »
Still sticking with Google Sheets until they force me to stop.

Do you have a link to your Day 1 solution?

Re: Advent of Code
« Reply #866 on: 04 December, 2020, 04:57:11 pm »
"Yes please" said Squirrel "biscuits are our favourite things."

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #867 on: 04 December, 2020, 05:12:17 pm »

vorsprung

  • Opposites Attract
    • Audaxing
Re: Advent of Code
« Reply #868 on: 04 December, 2020, 10:08:26 pm »
I spent all day writing 4 unit tests for a react state filter

So excuse me if ICBA

tonycollinet

  • No Longer a western province of Númenor
Re: Advent of Code
« Reply #869 on: 05 December, 2020, 12:06:51 am »
Found day 4 a bit boring to be honest.
Reading arbitrary rules and writing validation code is a bit too much like actual work... :-\

This

Though I am using it as an excuse to learn

(click to show/hide)

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #870 on: 05 December, 2020, 12:19:57 am »
Found day 4 a bit boring to be honest.
Reading arbitrary rules and writing validation code is a bit too much like actual work... :-\

I learnt more about how JSON works  :)

Ben T

Re: Advent of Code
« Reply #871 on: 05 December, 2020, 11:15:21 am »
(click to show/hide)

Re: Advent of Code
« Reply #872 on: 05 December, 2020, 11:57:08 am »
(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #873 on: 05 December, 2020, 01:17:49 pm »

Ben T

Re: Advent of Code
« Reply #874 on: 05 December, 2020, 02:59:39 pm »
(click to show/hide)


(click to show/hide)