# get code (blogs) — RSS Amplifier

Recent posts from the 1 feeds in the RSS Amplifier directory that cover get code.

Page: <https://rssamplifier.com/topics/get-code/blogs>  
Feed: <https://rssamplifier.com/topics/get-code/blogs.md>

---

## [2025 Advent of Code Day 12 Part 1](https://adamcrussell.livejournal.com/67457.html)

_2025-12-13 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. :- dynamic ( shape / 2 ). read\_line\_codes ( Stream , Codes ):- get\_code ( Stream , C ), ( C == - 1 -\> Codes = end\_of\_file ; C == 10 -\> Codes = \[\] ; read\_line\_codes ( Stream , Cs ), Codes = \[ C | Cs \] ). read\_all\_lines ( Stream , Lines ):- read\_line\_codes ( Stream , Line ), ( Line == end\_of\_file -\> Lines = \[\] ; Lines = \[ Line | Rest \],…

## [2025 Advent of Code Day 11 Part 2](https://adamcrussell.livejournal.com/67142.html)

_2025-12-11 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. :- dynamic (\[ connected / 2 , memoized\_paths / 3 \]). check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ),…

## [2025 Advent of Code Day 11 Part 1](https://adamcrussell.livejournal.com/67024.html)

_2025-12-11 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. :- dynamic (\[ connected / 2 , memoized\_paths / 2 \]). check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ),…

## [2025 Advent of Code Day 10 Part 2](https://adamcrussell.livejournal.com/66810.html)

_2025-12-11 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code ( Stream , Char ), check\_and\_read ( Char , Chars ,…

## [2025 Advent of Code Day 10 Part 1](https://adamcrussell.livejournal.com/66354.html)

_2025-12-11 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code ( Stream , Char ), check\_and\_read ( Char , Chars ,…

## [2025 Advent of Code Day 9 Part 2](https://adamcrussell.livejournal.com/66092.html)

_2025-12-10 · adamcrussell_

Perl. Developed and tested with Perl 5.40.0. use v5 .40 ; my @input ; open DATA, q/data/ ; while ( \<DATA\> ){ chomp ; push @input , \[ split /,/ , $\_ \]; } close (DATA); my %seen ; my @x\_coordinates = sort { $a \<=\> $b } grep { ! $seen { $\_ } ++ } map { $\_ -\> \[ 0 \] } @input ; %seen = (); my @y\_coordinates = sort { $a \<=\> $b } grep { ! $seen { $\_ } ++ } map { $\_ -\> \[ 1 \] } @input ; my %coordinates\_x ;…

## [2025 Advent of Code Day 9 Part 1](https://adamcrussell.livejournal.com/65799.html)

_2025-12-10 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code (…

## [2025 Advent of Code Day 8 Part 2](https://adamcrussell.livejournal.com/65767.html)

_2025-12-09 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0 and SWI-Prolog 9.2.9. :- dynamic ( connected / 2 ). check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L…

## [2025 Advent of Code Day 8 Part 1](https://adamcrussell.livejournal.com/65392.html)

_2025-12-09 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0 and SWI-Prolog 9.2.9. :- dynamic ( connected / 2 ). check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L…

## [2025 Advent of Code Day 7 Part 2](https://adamcrussell.livejournal.com/65105.html)

_2025-12-08 · adamcrussell_

Perl. Developed and tested with Perl 5.40.0. use v5 .40 ; no warnings q/recursion/ ; my @grid ; open DATA, q/data/ ; while ( \<DATA\> ){ chomp ; push @grid , \[ split // , $\_ \]; } close (DATA); my $count = 1 ; my $line = shift @grid ; my @beam = ( 1 , ( grep { $line -\> \[ $\_ \] eq q/S/ } 0 .. @ { $line } - 1 )\[ 0 \]); my $splits = advance( $beam \[ 0 \], $beam \[ 1 \], \\ @grid ); $count = 1 + $splits ; say…

## [Retro Grid Dungeon Crawler (Sponsored)](https://crawlproof.com/a/xhu6su3o62Bo)

_2025-12-08 · **Sponsored**_

Retro grid movement with first-person combat, loot and skill-tree progression.

## [2025 Advent of Code Day 7 Part 1](https://adamcrussell.livejournal.com/64926.html)

_2025-12-08 · adamcrussell_

Perl. Developed and tested with Perl 5.40.0. use v5 .40 ; my @grid ; open DATA, q/data/ ; while ( \<DATA\> ){ chomp ; push @grid , \[ split // , $\_ \]; } close (DATA); my $line = shift @grid ; my @beams = (\[ 0 , ( grep { $line -\> \[ $\_ \] eq q/S/ } 0 .. @ { $line } - 1 )\[ 0 \]\]); my $splits = 0 ; { $line = shift @grid ; my ( $s , $b ) = advance( \\ @beams , $line ); $splits += $s ; @beams = @ { $b }; redo…

## [2025 Advent of Code Day 6 Part 2](https://adamcrussell.livejournal.com/64711.html)

_2025-12-07 · adamcrussell_

Perl. Developed and tested with Perl 5.40.0. use v5 .40 ; my @grid ; open DATA, q/data/ ; while ( \<DATA\> ){ chop ; push @grid , $\_ ; } close (DATA); my $format = build\_unpack\_format( @grid ); @grid = (); open DATA, q/data/ ; while ( \<DATA\> ){ chop ; my @fields = unpack $format , $\_ ; push @grid , \[ @fields \]; } close (DATA); my @operations = map { m/(\[\\+\\\*\])/ ; $1 } @ { pop @grid }; my @columns ;…

## [2025 Advent of Code Day 6 Part 1](https://adamcrussell.livejournal.com/64482.html)

_2025-12-06 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code (…

## [2025 Advent of Code Day 5 Part 2](https://adamcrussell.livejournal.com/64222.html)

_2025-12-05 · adamcrussell_

Prolog. Developed and tested with SWI-Prolog 9.2.9. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code (…

## [2025 Advent of Code Day 5 Part 1](https://adamcrussell.livejournal.com/63769.html)

_2025-12-05 · adamcrussell_

Prolog. Developed and tested with SWI-Prolog 9.2.9. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code (…

## [2025 Advent of Code Day 4 Part 2](https://adamcrussell.livejournal.com/63621.html)

_2025-12-04 · adamcrussell_

Perl. Developed and tested with Perl 5.42.0. use v5 .42 ; my @grid ; open DATA, q/data/ ; while ( \<DATA\> ){ chomp ; push @grid , \[ split // , $\_ \]; } my @forklift\_accessible ; { my @accessible = (); for my $i ( 0 .. @grid - 1 ){ my $row = $grid \[ $i \]; for my $j ( 0 .. @ { $row } - 1 ){ if ( $row -\> \[ $j \] eq q/@/ ){ push @accessible , \[ $i , $j \] if is\_accessible( $i , $j , \\ @grid ); } } } push…

## [2025 Advent of Code Day 4 Part 1](https://adamcrussell.livejournal.com/63445.html)

_2025-12-04 · adamcrussell_

Perl. Developed and tested with Perl 5.42.0. use v5 .42 ; my @grid ; open DATA, q/data/ ; while ( \<DATA\> ){ chomp ; push @grid , \[ split // , $\_ \]; } my $forklift\_accessible = 0 ; for my $i ( 0 .. @grid - 1 ){ my $row = $grid \[ $i \]; for my $j ( 0 .. @ { $row } - 1 ){ if ( $row -\> \[ $j \] eq q/@/ ){ $forklift\_accessible += is\_accessible( $i , $j , \\ @grid ); } } } say $forklift\_accessible ; sub…

## [2025 Advent of Code Day 3 Part 2](https://adamcrussell.livejournal.com/63044.html)

_2025-12-03 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code (…

## [2025 Advent of Code Day 3 Part 1](https://adamcrussell.livejournal.com/62795.html)

_2025-12-03 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code (…

## [2025 Advent of Code Day 2 Part 2](https://adamcrussell.livejournal.com/62577.html)

_2025-12-02 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( 44 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+…

## [Know before it drops (Sponsored)](https://crawlproof.com/a/d8le8jzXc76Z)

_2025-12-02 · **Sponsored**_

Follow a show, artist, genre or rocket and get notified before release

## [2025 Advent of Code Day 2 Part 1](https://adamcrussell.livejournal.com/62344.html)

_2025-12-02 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( 44 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+…

## [2025 Advent of Code Day 1 Part 1](https://adamcrussell.livejournal.com/61781.html)

_2025-12-01 · adamcrussell_

Prolog. Developed and tested with GNU Prolog 1.5.0. check\_and\_read ( 10 , \[\] , \_ ):- !. check\_and\_read ( end\_of\_file , \[\], \_ ):- !. check\_and\_read ( Char , \[ Char | Chars \], Stream ):- get\_code ( Stream , NextChar ), check\_and\_read ( NextChar , Chars , Stream ). read\_data ( Stream , \[\]):- at\_end\_of\_stream ( Stream ). read\_data ( Stream , \[ X | L \]):- \\+ at\_end\_of\_stream ( Stream ), get\_code (…

## [I have a new achievement! Blog's Birthday](https://adamcrussell.livejournal.com/61525.html)

_2025-07-20 · adamcrussell_

We're together for 7 years now! Thank you!

## [nuweb Source for TWC 327 (Prolog)](https://adamcrussell.livejournal.com/61344.html)

_2025-07-01 · adamcrussell_

See http://www.rabbitfarm.com/cgi-bin/blosxom/prolog/2025/06/29 \\documentclass { article } \\usepackage { color } \\definecolor { linkcolor }{ rgb }{ 0, 0, 0.7 } \\usepackage { amsmath } \\usepackage \[backref, raiselinks, pdfhighlight=/O, pagebackref, hyperfigures, breaklinks, colorlinks, pdfpagemode=UseNone, pdfstartview=FitBH, linkcolor= { linkcolor } , anchorcolor= { linkcolor } , citecolor= {…

