DEV Community

Jonathan Apodaca
Jonathan Apodaca

Posted on

What I Learned this Week (March 30, 2018)

Directed Graphs: Connected Components

I started researching algorithms for finding Connected Components in a Directed Graph, for the purpose of being able to more efficiently add visibility into large dependency graphs (particularly in a database; e.g., job J uses table T to produce T'...). This information could be used to develop more time-efficient schedules that produce data at my institution. Having an idea how I would find "islands" in our dependency graph, I decided to research it and try to learn something about Graph Theory.

Further reading for me: Strongly Connected Components is a method to determine areas in a graph that are more strongly connected than others. This seems pretty cool. I wish I had a practical use for it!

Relearn: DAG: Topological Sort

Regarding the above problem, I implemented a topological sort of our dependency graph to find all of the jobs that can run in parallel to make our scheduling more efficient. Finally: I used something from a class in my job! It is always satisfying using something that used to be homework.

libclang

Apparently, you can leverage C frontend built for LLVM via the libclang library. See this post for more details. Utilizing this, you can parse C++, traverse the AST--Great stuff.

There are even nodejs bindings.

RPython

If you are wanting to produce a VM that supports interpreting and a Just-in-Time compilation, RPython is pretty amazing. This article is a very interesting read.

TLDR; RPython is a VM generator: it consists of a language (a subset of Python) and a tool that analyzes (interpreter code + hints) and produces a (C-based) VM (interpreter + JIT) for you.

Shibboleth

Recently I was brought on as a resource on a project in my department that requires integration with the Single Sign-On service Shibboleth. Fun-fact: Shibboleth is mentioned in the Bible (Judges 12:6) as a way that the ancient Israelites enforced border-control during a time of hostility amongst their own clans.

Shibboleth as a product is highly configurable, and a semi-complex beast. While I have previous experience with setting it up, it seems there is always something else to learn about it. Most of my learning on this front has been spent in frustration whilst attempting to make it work in an equally complex, load-balanced environment.

Top comments (0)