u/snaps4015

▲ 43 r/teenagersbutcode+1 crossposts

So, I tried understanding numpy's internals by writing them in C, implemented runtime dimension declaration, stride based indexing, vectorization and all, then I had this weird desire to log the metadata of the arrays declared, did that, then I wanted to know the name of the pointer those were assigned to, at runtime and there started the stuff I am actually proud of... Using my lexical analyzer (which is a finite state machine) I had written earlier for my college assignment, tried doing that, there are 3 approaches i took, the latest one works pretty much in all the cases, obviously I can't do everything... I really think that getting the name of the variable at runtime is cooler than the whole numpy thing!

Here's the link to the repo

Do give it a look...

u/snaps4015 — 10 days ago