« first day (631 days earlier)      last day (2013 days later) » 

12:28 AM
https://tio.run/##fZLPSsQwEMbveYo5JuzKJtWj4oKPsXhI/yBKqaVdkGXpRWXR1YLgI4i4Ny8Wpcc@Sl6kO5NEF8RakqFNZ37zzUd0nu7FC51envV9fF6UZvVkVs8HEJj6Q4GE7p2iBP/OmI4vTpI0LQEzYcnN3duk23Alzf1rKPCLy8NQiElIoLoZEbOC4Yfh1nmeLhwvS66okpu6xTXlEbaypBYKncWASCEwgHm4BZc0ppyxWV9TbfUL7ausVH6MM2lhHj@1RX7JI@zTLHHjmYNVottElBJhym5U/PGH8CLJEz33wjGqEaJm6tSK@1HezAJ34mcz6xs63N@l8cxZIOwEVjaUiQdzNcX2NPN/Ng5ZW8518Q1yck39EkjEtTzwXcls1w/NHWjCWN9z9BjvgRKeqiQt9BTkFg

@arcfide on the subject of mazes
rand finds random adjacent cells, apply @'s the next n to the board , newboards, current cell, and current n are then returned, so that a repeat function can be applied incrementing n
how can this approach be made more APL-ish
note, there is no backtracking, and it doesn't complete the maze as I've run out of time at the moment
so please don't spoil anything
if possible. Please comment on what I've done thus far so i can extricate the relevant learnings all up in the heezy
bit.ly/2P8uGk4 here's a commented version if that helps
PLEASE: no spoilers. I have an idea for backtracking, but I just don't have time atm
 
12:49 AM
The set function seems extremely unnecessary to me, you should just put the set code into the start function.
Especially since that is quite literally what @ is supposed to do.
 
 
3 hours later…
3:56 AM
it does a maze
through recursive backtracking
gonna modify it for any size board
but I have a question
in the repeat function, how do I phrase the power so that it continues until (∧/⍣2)0=⍵
where ⍵ is the board?
I can't quite get that one
https://bit.ly/2AgcblK
actually this is a better encoding. I had other data in there for debugging
 
4:29 AM
https://bit.ly/2CRoDek
maze generator. call gen with an integer, it will create an n by n maze with random start and end points marked by the number 1 on the result
would love some feedback, this is probably horribly ineffecient, I'm going to try to refactor it, but I would love some thoughts, and an answer to the above power question
in the init function
 
5:05 AM
https://bit.ly/2CQG3HY
I redid the backtrack to read a bit better. less golfed but more clear what's happening
 
@nathanrogers If I understand what you want, you can do repeat⍣{∧/,0≠3⊃⍺}
 
I'll try it in the morning
one other thing I would like for this to do is to backtrack the numbers instead of incrementing, so that it continues n+1 from the node it backtracks to instead of the next highest n
I'll try it tomorrow
 
 
10 hours later…
3:22 PM
so that solution isn't working for me. @H.PWiz. I'm not really sure what else to try. regarding the ⍣ boolean
 
4:20 PM
@nathanrogers (⍵{⍵⌷⍺⍺})¨cells‽ What's wrong with ⍵[cells]?
 
4:58 PM
nothing I suppose :P
 
 
2 hours later…
6:48 PM
https://bit.ly/2S59yds

Here's a refactored version. thanks to adam things got a lot smaller and more sensible. I still amn't quite sure what the repeat⍣(??) expression needs to be. Any advice there would be great
was able to remove a branch in backtrack therefore simplifying the rest of the code, eliminating passing the next value by inner operand to apply. was able to remove insert also
I know backtrack can be further reduced by simply taking the first instance of the value from instead of hokey sorting etc. I'll keep hacking
 
7:14 PM
@nathanrogers little SE chat hack: prepend a long link with a newline (shift+enter) to be able to post it without the length limit affecting you (though markdown won't work)
 
@dzaima TIL
 
 
1 hour later…
8:22 PM
 
@dzaima behold Java in all its glory
 
@J.Sallé well I am doing incredibly horrible stuff, so I'm not surprised it doesn't work perfectly
I am literally replacing var with Float[][][] in the source with regex :p
I'm not gonna bother fixing that, I'll just add those explicit type arguments and deal with intelliJ not liking them
 
8:59 PM
@dzaima well yeah but blaming Java is so much more satisfying :p
 
9:35 PM
{(repeat⍣{∧/,0≠⊃⌽⍵})⍺ apply ⍵}
got the repeat function working
 
9:48 PM
I don't understand the function part of this though
I have only seen things like fn⍣(something) never fn⍣{something}
when @H.PWiz posted his yesterday I thought it was a typo
 
@nathanrogers f⍣g A₀ repeats application of f on A until Aₙ g Aₙ₊₁. And g must be a dyadic function returning a Boolean.
 

« first day (631 days earlier)      last day (2013 days later) »