Focused on getting people excited to learn and helping developers learn quickly.
Created: https://vimforvscode.com
@freeCodeCamp alum
Instructor @eggheadio
Really interesting read! When I heard exercism was going to automate solutions, I didn't realize this is what they meant. I thought there was an "easier" way. But it's really fascinating to read about AST parsing.
The way you broke everything down made it feel more approachable than I originally thought. Thanks for sharing this and putting in all the work for the JS/TS communities.
C# has a different approach for two-fer and Ruby is going to try it out for another solution where they don't do AST interpretation like I do, but do AST matching:
parse the AST for a lot of solutions
strip the Identifier names and rename them to be consistent e.g. a, b, c or input_arg_1, body_constant_1 (so that two solutions that are identical except for the name use are now actually identical). This is normalisation
match the incoming, normalised AST of the solution to the set of known solutions, and have a fixed output.
periodically collect everything that is not matched and add these to the analyser.
I think that is an easier approach, but not necessarily a better one. Especially in JavaScript where you have so many ways to write the same thing (this each way creating a new set of permutations).
The way you broke everything down made it feel more approachable than I originally thought.
Feel free to contribute! 💘
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Really interesting read! When I heard exercism was going to automate solutions, I didn't realize this is what they meant. I thought there was an "easier" way. But it's really fascinating to read about AST parsing.
The way you broke everything down made it feel more approachable than I originally thought. Thanks for sharing this and putting in all the work for the JS/TS communities.
C# has a different approach for
two-fer
and Ruby is going to try it out for another solution where they don't do AST interpretation like I do, but do AST matching:a
,b
,c
orinput_arg_1
,body_constant_1
(so that two solutions that are identical except for the name use are now actually identical). This is normalisationI think that is an easier approach, but not necessarily a better one. Especially in JavaScript where you have so many ways to write the same thing (this each way creating a new set of permutations).
Feel free to contribute! 💘