Mugshot

Daniel Ploug Hall

Software Developer

Location: Copenhagen, Denmark

Email: danielploug@hotmail.com

Phone: +45 60 15 26 04

I am a software developer who focuses on Parallel Computing, HPC, databases and data pipelines. I am passionate about computer simulations and love the mathematical beauty of numerical methods.


Professional interests: Algorithm design, High performance computing, Numerical methods, Parallel computing


Alternative Interest: Game design for roleplaying games


Completed projects

TTStatistics: A Statistical library - Python

Description

TTStatistics is a statistical library for boardgames, it currently includes Dicechancis which is a general statistical calculator for modelling dice mechanics. It allows the user to calculations exact probabilities on arbitrary subsets of a pool of arbitrary dice. It achieves this through a simple to use API that follows a functional paradigm (a primer of use). It does this while being equal or faster than rival libraries

The target audience are game designers of any rank.

Goals

  • To provide and easy to use interface, such that one can quickly test dice configurations and mechanics
  • Calculating complex dice operations should not take longer to complete than getting a cup of coffee.

Challenges

  • Finding an algorithm that allows one to effectively choose a subset of dice, from which operations are applied. To illustrate, imagine you roll 3d6 and get a sorted outcome set of [1,5,6]. You then want to sum the two highest outcomes, here 5 and 6. The problem here is that one needs to account for that one dice rolls 5 or less. Now expand this problem to any combination of possible dice and operations.

Reflection

The library is at the moment feature complete. The interface is for the most part intuitive and easy to use. However the custom operations needs a bit more workings. For while the algorithm can take an arbitrary input, there is currently no way to set an initial/default state, which means that the function passed down needs to be written awkwardly.

The performance on the selective algorithm is quite good when considering the competition. There are still however optimization than can be done, as when selecting a small subset it still runs through every combinations, and just selects the subset. It should be possible to calculate the missing combinations and only run through selecting up to N sub dice.

I am satisfied with where the library is at, however i am far from done with it and have quite a few ideas for improvement on all fronts.

Future ideas

  • Create a web app that allows someone to use the library without access to a python installation

  • Reimplement the library in C, and then extend python with it. Weather or Not the binding will be written through the Python API or by the library Pybind is not decided yet.

PyPreCore: Post-processing Dust simulation - Python

Description

This program was written for my thesis, which i worked on for a year doing covid lockdown. Its a post-processing dust particle simulation, for adding a layer of dust to already executed gas simulations. The background model was a prestellar core, which is a part of the creation of stars and planets.

Goals

  • To see if a post-processing simulation made sense to create.
  • To find new knowledge about the concentration of dust when the background model has correct radiative transfer.

Challenges

  • Interpolating within a Lagrangian mesh.
  • Interpolating within the time steps/snapshots of the background model.
  • Depositing particles into radial cells.
  • Creating a simulation from scratch.

Reflection

The challenges of interpolating between moving reference points were extremely fun and satisfying. Though there are quite a few things that could have been improved given time. Such as weighting the time interpolation based on the closeness to each background snapshot. Furthermore The program is trivially parallel, which could be a way to improve performance, which already isn't terrible.

The biggest problem with the project lies in its scope, as the motivation for working on it doing the Danish lockdown took quite a hit. Furthermore, the nature of the project and its focus point, made it quite hard to validate the data from actual measurements.

Work in progress

Python Function Prototypes - Python

Description

Pyprototypes is a module, which allows the user to define a prototype to enforce for an API. This can be useful if you are designing an API which takes a function a input. It currently can check the argument names for a function and their associated types.

Furthermore it has a fixture system similar to pytest, in which you can define functions that are automatically passed into the input function function if an argument name fits the fixture. Examples are provided here

Goals

  • To define an easy-to-use interface, such that prototypes can be created instantly and changed in response to the project's needs.
  • Allow the prototype to be dynamic, such that not every defined parameter is needed in the input function

Why?

The strength of Python is its flexibility (coming from its dynamic typing). However, sometimes a hard structure for typing is needed, such as functions passed as arguments into algorithms. This is needed for my project dicechanics, in which I want to define a hard interface for how the user should write their custom operations, while being able to give them feedback in case they make a mistake.

A web scraper - C C++

Description

The purpose of this project is to write a web scraper in C for the joy of writing a webscraper in C. It currenly uses cURL, libxml2 and googles robotstxt (which is where C++ comes in).

Challanges

Writing a webscraper has 4 base challenges

  1. Doing a request to a webpage (can be done with cURL)
  2. Respecting the sites Robots.txt (Can be done with Google's robotstxt)
  3. Parsing the HTML or API Output (Can be done with libxml2 for HTML, APIs are just cURL)
  4. Outputting the data somewhere (A PostgreSQL database can be used here with libpg)
However, webscraping is facing some challenges with point number 1, in that many websites have increased their botting security, and as such, web scraping has become more difficult. Here I wanna experiment with the curl-impersonate repository, as it can impersonate web browsers.

Current outlook

The project is going strong, I have completed point 1,3 and now 2. Nr. 2 involved writing some code, that could take the Url and separate it into its components. This was done by writing a finite state machine which handles each part. The code can be seen here.