Text

I ran 1.5 miles at a pretty aggressive pace today! I’ve been running every day for a while now, and it’s pretty wonderful. I started with an easy half mile, and slowly built up to 1.5 miles. Once I build up to a daily 5k, I’m hoping to start working on my pace.

I’ve been settling into a routine that I’m very happy with. I get up around 9, work for around 5 hours, take a nap, work out, do a bunch of chores, and then do whatever for the rest of the day. One of the benefits of this routine is that I can eat while I work and after exercise, but still fast for 8 hours at the end of my day.

Tags: journal
Video

I’ve been using this keyboard for about a month, and this video blew my mind. He uses both thumbs!

Link
Tags: coding haskell
Photo
johnmaynardkanyes:

First four series of a sawtooth wave.

johnmaynardkanyes:

First four series of a sawtooth wave.

(via vrgtms)

Text

https://github.com/riccieri/rust-project_euler/tree/master/

Text

Back Injury

I strained my back about 6 months ago, and it’s never really healed. Sometimes it doesn’t bother for a while, but it always comes back. Basically, it hurts to bend over, sometimes it hurts to run, and I can’t do heavy deadlifts or deep squats without re-straining it.

I did a bunch of research, and I learned:

  • Core strength helps a lot.
  • Lack of hamstring flexibility causes a lot of back strain.
  • Being overweight is really bad for my back.
  • Sitting in the same position for long periods is bad.
  • Having poor posture is bad.
  • Sleeping on your stomach is bad.

So! for the time being, I’m going to replace my daily lifting routine with:

  • 3x5 slow/light deadlifts
  • 3 sets of sit-ups
  • hamstring stretching.
Photo
napszemuvegbe:

:D:D:D!!!

napszemuvegbe:

:D:D:D!!!

(via vrgtms)

Link
Link
Tags: coding css hacks
Text
$ ddate
Today is Sweetmorn, the 53rd day of Discord in the YOLD 3180
Text
GHCJS and JQuery! This is a lot nicer, but I had to install ghcjs-jquery manually. I also had to manually add the jQuery url into the generated index.html file. Now I just need React bindings! Here’s what I need to get set up before I can use this for the front-end of my habits tracker: React bindings, Bindings for some routing library, SafeCopy for serialization/deserialization, and Binary XHR Requests.
{-# LANGUAGE UnicodeSyntax, OverloadedStrings #-}

import Data.Time.Calendar() -- Imports a ‘Show’ instance for Day.
import Data.Time.Clock (getCurrentTime, utctDay)
import Data.Functor ((<$>))
import Data.Text as Text
import JavaScript.JQuery

main ∷ IO ()
main = do
	today ← utctDay <$> getCurrentTime
	let date = Text.pack(show today)
	body ← select "body"
	h1 ← select "<h1>" >>= setText "Hello World!"
	p ← select "<p>" >>= setText (Text.concat ["Today is ", date, "."])
	_ ← appendJQuery h1 body >>=
		appendJQuery p
	return ()
Text
Hello world with GHCJS. It’s pretty not-nice at this point.
{-# LANGUAGE UnicodeSyntax #-}

import Data.Time.Calendar() -- Show instance for Day.
import Data.Time.Clock (getCurrentTime, utctDay)
import Data.Functor
import GHCJS.DOM as DOM
import GHCJS.DOM.Document as DOM
import GHCJS.DOM.HTMLElement as DOM
import GHCJS.DOM.Types as DOM

main = do
  Just doc ← DOM.currentDocument
  Just body ← documentGetBody doc
  today ← utctDay <$> getCurrentTime
  let hw = "

Hello World! (" ++ show today ++ ")

" htmlElementSetInnerHTML body hw
Text
Reading a file into a string literal at compile time with Template Haskell:
{-# LANGUAGE TemplateHaskell #-}

import Data.Functor
import Language.Haskell.TH

indexHTML :: String
indexHTML = $(runQ $ (LitE . StringL) <$> (runIO $ readFile "./index.html"))

main :: IO ()
main = putStrLn indexHTML
Text

I got ghc7.8 and GHCJS to compile!!! Wooooo! It took me a very long time. Linode kept choking on builds since it’s only got 1GB of ram, but apparently they just upgraded all the $20 instances to 2GB, so just had to tell linode.com to migrate my instance.

Text

My diet has been decent this week. All days except today were either at maintenance or at a significant deficit. My sleeping cycle is improving, and I’ve been lifting and stretching fairly consistently. I’ve mostly been good this week!

I’ve been struggling to focus because of fatigue, and my diet adherence needs to improve further. This coming week, I’d like to

  • get up by 9 every day.
  • average less than 2000 calories per day.
  • do at least 4 hours of focused coding every day.
  • power clean 5x155.
  • Go to a meetup (if there’s one available).
  • Be in bed by midnight every day.