Giter Club home page Giter Club logo

miscellany's Introduction

Miscellany

A miscellany of programs I've written that are too small to deserve repositories of their own. Most of these took under an hour to write.

Brainfuck.hs

This is an interpreter for the Brainfuck language, written in Haskell. I just wanted to see what writing something like this would be like.

Huffman.hs

This is a simple Huffman encoder/decoder that I wrote when I learned about Huffman encoding. It's not particularly useful. Also written in Haskell.

JsonReader.hs

This parses a JSON string. Don't use it, there are better libraries out there for this purpose. I wrote this because I felt like it.

SAT.hs

This is a simple SAT solver, written in Haskell. It takes lines from stdin, and parses and solves them. It's not very good, it's not fast and it doesn't handle incorrect input. I mostly wrote this so I could practice writing Pratt parsers.

XMoconk.hs

My desktop runs XMonad, and has a dzen2 bar to display window and workspace information, hardware monitors, and a clock. This is a problem, because XMonad only responds to X events, which means you can't set it to update the clock and hardware monitors at regular intervals. Most people in this situation resort to either switching to XMobar, or using two dzen2 bars side by side. I didn't like either of those options, so instead I wrote this program.

XMoconk takes a line from stdin, parses it into a space-separated list of ten integers, packs them into an X event and sends it, and repeats, forever. In my XMonad config, I have an event hook that intercepts these events and uses them to update the dzen2 bar. Then, I simply pipe Conky to XMoconk. Since Conky outputs new hardware data at regular intervals (in my case, once per second), XMonad will get regular X events from XMoconk, and will update the dzen2 instance accordingly.

XLogout.hs

I don't know if there's an easy way to logout of XMonad from a terminal. I couldn't find one, so I wrote this. When you run this program, it sends an X event. In my XMonad config, I have an event hook that intercepts this event and tells XMonad to logout.

miscellany's People

Contributors

darthfennec avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.