Here we'll write some comments
Under the subheadline we have more comments, and finally some code:
main :: IO ()
main = putStrLn "blarg!"That was the main.
I hereby claim:
To claim this, I am signing this object:
| -- | The `ag` search process. | |
| agSearchProcess :: Maybe FilePath -> CreateProcess | |
| agSearchProcess mdir = ag { std_out = CreatePipe | |
| , std_err = CreatePipe | |
| , cwd = mdir | |
| } | |
| where ag = proc "ag" ["--noheading", "TODO"] | |
| main :: IO () |
The idea is to host haskell implementations of popular console/arcade titles as a blog series. The end goal being to ignite interest in writing games with haskell and possibly hosting a haskell game jam at some point in the future. For launch it would be nice to have 3-4 games already written.
Getting this off the ground is going to take a long time as my (schell's) free time is pretty limited ATM, so don't worry if you feel like committing to this is too much. You can commit any amount of time and write your game slowly as I figure out the details.
| -- It would be nice to introduce more layout options. Something like annotated text | |
| -- in iOS/UIKit. | |
| -- | This is how Sandy uses cairo/pango. | |
| -- https://github.com/isovector/sequoia/blob/master/src/Game/Sequoia.hs#L262-L284 | |
| renderElement :: Engine -> Element -> Cairo.Render () | |
| renderElement _ (TextElement (Text { textColor = (Color r g b a), .. })) = do | |
| Cairo.save | |
| layout <- Pango.createLayout textUTF8 |
| {-# LANGUAGE AllowAmbiguousTypes #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| module Lib | |
| ( someFunc | |
| ) where |
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default | |
| ;; Base distribution to use. This is a layer contained in the directory |
| #[macro_export] | |
| macro_rules! syntax_for { | |
| ( $x:expr ) => { | |
| impl From<$x> for Expression<$x> { | |
| fn from(v: $x) -> Expression<$x> { | |
| Expression::from_term(Term::new(v, 1.0)) | |
| } | |
| } | |
| impl Add<f64> for $x { |
| #! /bin/bash | |
| # requires curl and jq on PATH: https://stedolan.github.io/jq/ | |
| # create a new release | |
| # user: user's name | |
| # repo: the repo's name | |
| # token: github api user token | |
| # tag: name of the tag pushed | |
| create_release() { | |
| user=$1 |
This is the decscription of a task that requires some EE skills.
The task in question is to create and test (by breadboarding) a circuit that uses a [small, through-hole photointerrupter][sensor] that can be reliably read by a raspberry pi GPIO input pin (3.3v). The purpose of the circuit is to detect when an object (like a sheet of paper) passes through the photointerrupter by reading a boolean on/off signal. The circuit should be prioritized for low-power use and polling speed, if possible.