News for hackers. Stuff that matters.

torbencarstens

Re:How Many Hobbits? A Demographic Analysis of Middle Earth on Thursday December 07, 2023 @10:20PM (#38565053)
This is not quite true, while you're correct that there is no third gate, the Greenway (as pictured in the upper left corner of the 3 picture illustration you're referring to) is not the road which is shown in the "close-up" (lower center picture) of Bree which goes "To Deadman Dike".

The illustrations are taken from "The Atlas of Middle-Earth" and the road which goes diagonally north-west from the prancing pony towards the greenway (Old North Road) is described as follows in "The Atlas of Middle-Earth" (pg. 124; At the Prancing Pony):

> A drawing shows a lane which curves north from the Great [East] Road, one branch climbing to the crest of the hill, while another leads through a small opening in the hedge for a shorter route to Combe and Archet.

The "North Gate" shown on the picture is the "small opening through the hedge". I'd say it was probably marked as a "Gate" here since Bree is surrounded by a Dike/Hedge and should simply illustrate that you can't simply cross on a "normal" road here.

The drawing which is being referred to here appears in `The Return of The Shadow` (History of Middle-Earth Book 6) as `Plan of Bree` in Chapter `XX The Third Phase (2): At the Sign of the Prancing Pony`

The drawing "Plan of Bree" by Tolkien can also be seen on pg 45 (Illustration 25) in "The Art of The Lord of the Rings"

Re:Advent of Code 2023 is nigh on Friday December 01, 2023 @12:10PM (#38489214)
Another option when using regex would be to use the lookahead[0] operator (as long as supported, which is the case for the python re module)

  (?=(one|two|three|[...]))
would return `["two", "one"]` for the input string `twone` since the lookahead operator doesn't consume the next character.

[0] https://www.regular-expressions.info/lookaround.html