Introducing treesit-jump (https://github.com/dmille56/treesit-jump): a mode for jumping around code using emacs and treesitter.
This converts the YourFirstGame Godot tutorial to Haskell using godot-haskell library. Here is a link to the original tutorial: https://docs.godotengine.org/en/3.2/getting_started/step_by_step/your_first_game.html.
Here’s a link to the git repo containing the conversion: https://github.com/SpartanEngineer/godot3-dodge-haskell. It is mostly a 1-1 translation without relying too much on Haskell tricks. I won’t go over the specifics here since they’re already covered in the original tutorial. This uses version 3.2.1 of Godot.
In this post we will walk you through setting up a server for hosting Git repositories with NixOs and NixOps. We’ll write a configuration file for Nix that can be used to deploy to a server using NixOps. In this case we will deploy a virtual server using VirtualBox (this can be changed to deploy to a server hosted by a cloud provider if desired). You’ll need to have Nix, NixOps, & VirtualBox (you may need to configure VirtualBox correctly to work with NixOps) installed for this guide.
[Read more...]
Posted on September 25, 2017
In this post we will walk you through a basic Haskell setup utilizing Visual Studio Code (Code Editor / IDE). We will need to install Visual Studio Code, GHC (the Glasgow Haskell Compiler), Stack(Haskell build tool), Cabal (Haskell package manager / build tool), Haskero (Visual Studio plugin that enables Haskell support), and Intero (powers the IDE like features in Haskero).
[Read more...]
Posted on August 27, 2017
Now that we have finished writing our Shortest Path algorithm let’s write some code to test it so we can see it in action. To do this we will write a constructor for our DjikstrasAlgoExample class that makes a graph and prints out all of the shortest paths amongst the nodes.
[Read more...]
Posted on July 16, 2017
Now that the node class is finished we can get back to implementing Dijkstras Algorithm. First off we will need a class level variable to hold the nodes in the graph. We will declare this as a map between integers to nodes. The key of the map (integer) refers to the index of the node.
[Read more...]
Posted on June 18, 2017
Dijkstras algorithm is an algorithm used to find the shortest path between two nodes in a weighted graph. It works by first initializing a list of distances between each node and the initial node. Each distance is initially set to infinity. We also need a set of nodes to keep track of which nodes have been visited. It is initially empty, but later filled in as each node is visited. A priority queue (AKA min heap) is also needed for the implementation. After running the algorithm the shortest distance to each node in the graph will be contained in the distances list.
[Read more...]
Posted on June 11, 2017