This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(21:55:30) WindowsBunnyIsTheFuzziest: durka42: Of course it isn't my fault | |
(21:55:47) WindowsBunnyIsTheFuzziest: durka42: winapi failing to build on linux is 99% of the time because your urst installation is borked | |
(21:55:59) WindowsBunnyIsTheFuzziest: s/urst/rust | |
(21:56:05) durka42: rust is the urst | |
(21:59:57) WindowsBunnyIsTheFuzziest: liverwurst | |
(22:00:40) misdreavus: Urist McCompiler cancels Build Dependency: Borked. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME := vm | |
CXX_SOURCES := $(wildcard *.cpp) | |
CXX_OBJECTS := $(CXX_SOURCES:.cpp=.o) | |
CXXFLAGS = -std=c++14 | |
LDFLAGS = -lm | |
.PHONY: debug | |
debug: CXXFLAGS += -O0 -Wall -g -DDEBUG | |
debug: $(NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base window config | |
set -g base-index 1 | |
# Prefix | |
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
# Automatic window rename | |
set-window-option -g automatic-rename on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cheryl where | |
import Control.Monad | |
-- helpers | |
getMonth :: Date -> Month | |
getDay :: Date -> Day | |
getMonth (month, _) = month | |
getDay (_, day) = day |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function table.clone(tab) | |
local clone = {} | |
for k, v in ipairs(tab) do | |
clone[k] = v | |
end | |
return clone | |
end | |
function table.map(tab, func) | |
local result = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Launch in 5 seconds.". | |
wait 3. | |
lock steering to up + R(0, 0, -90). | |
lock throttle to 1. | |
sas on. | |
wait 2. | |
print "Launch.". | |
stage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
integrate :: Double | |
-> (EntMap Body -> (Entity, Body) -> Vector2) | |
-> EntMap Body | |
-> EntMap Body | |
integrate dt forceComputer bodies = | |
IntMap.intersectionWith incrementBody increment bodies | |
where | |
increment = sum' $ zipWith scale [dt/6,dt/3,dt/3,dt/6] $ scanl derive (derive IntMap.empty 0) [dt/2, dt/2, dt] | |
sum' = foldr1 $ IntMap.intersectionWith dAdd | |
scale s = IntMap.map $ dScale s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Physics where | |
import qualified Data.Map.Strict as Map | |
import Data.Map.Strict (Map) | |
import Data.Vector.Class | |
import Data.Vector.V2 | |
type BoundingBox = (Double, Double, Double, Double) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RecordWildCards #-} | |
module Main where | |
import FRP.Helm | |
import qualified FRP.Helm.Keyboard as Keyboard | |
import qualified FRP.Helm.Window as Window | |
import Vector hiding (rotate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func force(p1 []float64, m1 float64, p2[]float64, mass2 float64) (fX, fY float64) { | |
const ( | |
X = 0 | |
Y = 1 | |
) | |
dx := p1[X] - p2[X] | |
dy := p1[Y] - p2[Y] | |
distSq := dx*dx + dy*dy | |
dist := math.Sqrt(distSq) |