News for hackers. Stuff that matters.
Re:Show HN: Maze Generation Visualization by tromp on Saturday July 09, 2022 @07:20AM (#32033951)
Or compile

    char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C);
    --            E;             J[              E]             =T
    [E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("\n|"
    )    ,   A    =              39              ,C             --
    )    ;   Z    ||    printf   (M   ))M[Z]=Z[A-(E   =A[J-Z])&&!C
    &    A   ==             T[                                  A]
    |6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}
with -fwritable-strings -Wno-implicit-function-declaration and watch a maze of the input height being generated on the fly.
Re:Show HN: Maze Generation Visualization by tetris11 on Thursday July 14, 2022 @01:50PM (#32099295)
> gcc: error: unrecognized command-line option ‘-fwritable-strings’; did you mean ‘-Wwrite-strings’?

this doesn't work with gcc 4

> GCC no longer accepts the -fwritable-strings option. Use named character arrays when you need a writable string.

https://gcc.gnu.org/gcc-4.0/changes.html

Re:Show HN: Maze Generation Visualization by tromp on Saturday July 16, 2022 @07:41AM (#32117106)
Clang still accepts -fwritable-strings.

For gcc, writable strings can be avoided by making the top line one character longer:

    char M[3],A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf("%d",&C);
Re:Show HN: Maze Generation Visualization by mysterydip on Saturday July 09, 2022 @07:23AM (#32033963)
Really neat. There was a maze generation algorithm in BASIC when I was younger that created the maze one row at a time. I couldn't wrap my head around how it was possible to make a maze like that. Searched for it recently and found Eller's algorithm: https://weblog.jamisbuck.org/2010/12/29/maze-generation-elle...
Re:Show HN: Maze Generation Visualization by xabi on Saturday July 09, 2022 @04:42AM (#32033151)
My three different versions I did long time ago in Perl: https://github.com/xa-bi/mazes
Re:Show HN: Maze Generation Visualization by pkstn on Saturday July 09, 2022 @04:53AM (#32033194)
Cool!
Re:Show HN: Maze Generation Visualization by johnfarrelldev on Saturday July 09, 2022 @07:21AM (#32033954)
If you're into maxes and coding you should check out: http://www.mazesforprogrammers.com/
Re:Show HN: Maze Generation Visualization by loupol on Saturday July 09, 2022 @09:31AM (#32034910)
Also the blog from the book author, with visualizations and separate blog posts for several different maze generation algorithms: http://weblog.jamisbuck.org/2011/2/7/maze-generation-algorit...
Re:Show HN: Maze Generation Visualization by tartoran on Saturday July 09, 2022 @09:56AM (#32035118)
For whoever has kids, krazy dad makes some easy to print maze booklets with mazes to be solved. There’s a lot of other goodies on that site as well.

https://krazydad.com/mazes/index.php?fmt=EZ

Re:Show HN: Maze Generation Visualization by manimino on Saturday July 09, 2022 @10:35AM (#32035477)
Here's a Python one, with a UI, cli, and a lovely 3blue1brown visualization in the readme.

https://github.com/will2dye4/labyrinth

Re:Show HN: Maze Generation Visualization by jhallenworld on Saturday July 09, 2022 @08:22AM (#32034377)
How about in Atari 800 BASIC with sound...

https://www.youtube.com/watch?v=Yf_OPNQA1-4

Re:Show HN: Maze Generation Visualization by tartoran on Saturday July 09, 2022 @09:54AM (#32035103)
This is really cool. Reminds me of my early days dabbling in basic
Re:Show HN: Maze Generation Visualization by pkstn on Saturday July 09, 2022 @11:10AM (#32035758)
Haha, a mazing!
Re:Show HN: Maze Generation Visualization by _the_inflator on Saturday July 09, 2022 @04:28AM (#32033091)
I could watch this for hours. :)
Re:Show HN: Maze Generation Visualization by pkstn on Saturday July 09, 2022 @05:27AM (#32033356)
Haha, me too :D
Re:Show HN: Maze Generation Visualization by lakomen on Saturday July 09, 2022 @02:22PM (#32037896)
That was a-mazing SCNR
Re:Show HN: Maze Generation Visualization by simon_000666 on Saturday July 09, 2022 @07:52AM (#32034162)
this is great, just printed out two for my kids to do, that'll keep them quiet for a bit.
Re:Show HN: Maze Generation Visualization by tartoran on Saturday July 09, 2022 @09:51AM (#32035073)
If you want more quiet time from your kids print out some mazes from crazy dad, they have different levels of difficulty and come in bundles.

https://krazydad.com/mazes/index.php?fmt=EZ