Skip to content

Instantly share code, notes, and snippets.

@archaeron
archaeron / libglutin-errors
Created March 31, 2020 22:35
libglutin-errors
[Glutin] Could not create headless context NoAvailablePixelFormat
[Glutin] OpenGL Headless Context: ContextBuilder { gl_attr: GlAttributes { sharing: None, version: Latest, profile: None, debug: true, robustness: TryRobustNoResetNotification, vsync: false }, pf_reqs: PixelFormatRequirements { hardware_accelerated: Some(true), color_bits: Some(24), float_color_buffer: false, alpha_bits: Some(8), depth_bits: Some(8), stencil_bits: Some(8), double_buffer: Some(true), multisampling: None, stereoscopy: false, srgb: true, release_behavior: Flush, x11_visual_xid: None } }
[Glutin] Primary monitor: MonitorHandle { inner: Wayland(MonitorHandle { name: Some("0x313d (AUO)"), native_identifier: 37, size: PhysicalSize { width: 1920, height: 1080 }, position: PhysicalPosition { x: 0, y: 0 }, scale_factor: 1 }) }
[Glutin] Could not create headless context NoAvailablePixelFormat
[Glutin] OpenGL Headless Context: ContextBuilder { gl_attr: GlAttributes { sharing: None, version: Latest, profile: None, debug: true, robustness: T
@archaeron
archaeron / glxinfo
Created March 31, 2020 22:27
GLX Info
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
apt install clang python-dev libzmq-dev libcrypt-dev
pip install pyzmq
pip install jupyter
@archaeron
archaeron / via vgrant.log
Last active July 24, 2018 13:29
Building stack2nix - 9aef6210dd8385a449847711797840f69a40c88a
> nix run nixpkgs.vagrant nixpkgs.virtualbox 0 < 15:28:02
> ./scripts/vagrant.sh
+++ dirname ./scripts/vagrant.sh
++ cd ./scripts
++ pwd
+ DIR=/home/nico/Documents/stack2nix/scripts
+ cd /home/nico/Documents/stack2nix/scripts/..
+ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
@archaeron
archaeron / README.md
Last active July 24, 2018 13:17
stack2nix
  1. stack2nix . > nix/stack.nix
  2. nix-shell default.nix -A api
@archaeron
archaeron / default.nix
Created March 5, 2018 13:19
Ocaml Nix
with import <nixpkgs> {};
let
ocamlPackages = pkgs.recurseIntoAttrs pkgs.ocamlPackages_4_03;
ocamlVersion = (builtins.parseDrvName ocamlPackages.ocaml.name).version;
findlibSiteLib = "${ocamlPackages.findlib}/lib/ocaml/${ocamlVersion}/site-lib";
ocamlInit = pkgs.writeText "ocamlinit" ''
let () =
try Topdirs.dir_directory "${findlibSiteLib}"
with Not_found -> ()
@archaeron
archaeron / keybase.md
Created October 6, 2017 12:48
keybase.md

Keybase proof

I hereby claim:

  • I am archaeron on github.
  • I am archaeron (https://keybase.io/archaeron) on keybase.
  • I have a public key ASCMJritEyCIwn247mMKQGggmI1uINWwo7qI8QMYtHCFUgo

To claim this, I am signing this object:

@archaeron
archaeron / test.idr
Last active December 21, 2015 11:07
Crashing Idris ide-mode
module Test
a
@archaeron
archaeron / gist:6229708
Last active December 21, 2015 01:39
Functors and Monoids
class Monoid
mempty: ->
throw new Error "mempty not implemented"
mappend: ->
throw new Error "mappend not implemented"
mconcat: ->
throw new Error "mconcat not implemented"
class Option extends Monoid
mempty: ->
@archaeron
archaeron / gist:5928233
Created July 4, 2013 14:27
map over list with options
let optionize f =
function
| None -> None
| Some(x) -> Some(f x)
let newListMap f list = List.map (optionize f) list
let listWithNull = [Some 0; Some 6; Some 3; None; Some 34; None; Some 1]
let square x = x*x