Skip to content

Instantly share code, notes, and snippets.

View johnpmayer's full-sized avatar

John P Mayer, Jr johnpmayer

View GitHub Profile
@johnpmayer
johnpmayer / gist:a4ecd00817ccd63ca626b9b9167e0c6b
Created October 14, 2020 15:03
Mac Local EcoServer (Manually Launched)
JohnMayer:Server johnmayer$ pwd
/Users/johnmayer/Library/Application Support/Steam/steamapps/common/Eco/Eco.app/Contents/Server
JohnMayer:Server johnmayer$ cat Configs/Network.eco
{
"PublicServer": false,
"Playtime": "",
"DiscordAddress": "",
"Password": "",
"Description": "",
"DetailedDescription": "",
Mono path[0] = '/Users/johnmayer/Library/Application Support/Steam/steamapps/common/Eco/Eco.app/Contents/Resources/Data/Managed'
Mono config path = '/Users/johnmayer/Library/Application Support/Steam/steamapps/common/Eco/Eco.app/Contents/MonoBleedingEdge/etc'
Initialize engine version: 2019.4.9f1 (50fe8a171dd9)
[Subsystems] Discovering subsystems at path /Users/johnmayer/Library/Application Support/Steam/steamapps/common/Eco/Eco.app/Contents/Resources/Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
2020-09-15 21:50:24.012 Eco[38316:7725564] Color LCD preferred device: AMD Radeon Pro 5300M (high power)
2020-09-15 21:50:24.012 Eco[38316:7725564] Metal devices available: 2
2020-09-15 21:50:24.012 Eco[38316:7725564] 0: AMD Radeon Pro 5300M (high power)
2020-09-15 21:50:24.012 Eco[38316:7725564] 1: Intel(R) UHD Graphics 630 (low power)
2020-09-15 21:50:24.012 Eco[38316:7725564] Using device AMD Radeon Pro 5300M (high power)
[22:27:58.317] [1] [ Info] [Eco] >>> START EcoServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[22:27:58.334] [1] [ Info] [Eco] [Eco Server 0.9.0.2 beta]
[22:27:58.389] [5] [ Info] [Eco] [Starting [PerformancePlugin]]...
[22:27:58.389] [5] [ Info] [Eco] [Starting [PerformancePlugin]]... [Finished in 0.3ms]
[22:27:58.389] [5] [ Info] [Eco] [Server Initialization]...
[22:27:58.784] [5] [ Info] [Eco] Starting LocalizationPlugin...
[22:27:58.784] [5] [ Info] [Eco] Starting LocalizationPlugin... Finished in 0.4ms
# Assumes the following are available
#
# jq
curl https://api.github.com/users/johnpmayer/keys
@johnpmayer
johnpmayer / main.rs
Last active August 29, 2015 14:05
Dining Philosophers - Can't seem to make it deadlock
extern crate sync;
use sync::Arc;
use sync::Mutex;
static N : uint = 5;
fn philosopher(seat : uint, vec : &Arc<Vec<Mutex<()>>>) {
let leftFork = seat;
let rightFork = (seat + 1) % N;
println!("Philosopher {} {} {}", seat, leftFork, rightFork);
@johnpmayer
johnpmayer / console
Last active December 20, 2015 17:39
Another vector library in Elm, which fails due to a suspected bug in the record type system?
[1 of 5] Compiling Vec2 ( Vec2.elm )
Type error on line 31:
{x = v.x, y = v.y}
Expected Type: a
Actual Type: {}
Type error on line 34:
@johnpmayer
johnpmayer / Loop.elm
Created June 9, 2013 21:50
Using the new foldp-like loop function
module Loop where
import Graphics.Input (checkbox)
-- compiler note, impossible to put a valid type signature here
-- check : Signal Element
-- power : Signal Bool
(check, power) = checkbox true
tick : Signal Time
@johnpmayer
johnpmayer / Loop.js
Last active December 16, 2015 16:39
A shot at an unsafe loop construct Native Elm library. Not necessarily intended to be part of the standard library.
Mayer.John.Native.Loop = function(elm) {
// Various boilerplate stuff
'use strict';
if (elm.Native.Loop) return elm.Native.Loop;
var Signal = Elm.Signal(elm);
// This is the unsafe loop construct
// loop : (b -> a) -> (Signal a -> Signal b) -> b -> Signal b
var loop = function(convert, transform, initial) {
@johnpmayer
johnpmayer / gist:5448143
Last active December 16, 2015 14:20
Use case of loop (I did not try to compile this code)
{-
- This is the loop function that I propose as an ehancement.
- I think it's better because the asychonous loopback signal
- is anonymous, rather than a top-level definition.
-}
loop : (b -> a) -> b -> (Signal a -> Signal b) -> Signal b
-- Here's how we're going to control our little demo
powerButton : Element
power : Signal Bool
@johnpmayer
johnpmayer / Bar.elm
Created April 22, 2013 03:25
Demo of how I'd like to be able to import type aliases
module Bar where
type A = { x : Int, y : Int }