Skip to content

Instantly share code, notes, and snippets.

View Slabity's full-sized avatar

Slabity Slabity

View GitHub Profile
#######
LanguageClient 0.1.119
#######
13:01:58 INFO main src/vim.rs:92 => None {"jsonrpc":"2.0","method":"eval","params":["[!!get(g:, 'LanguageClient_autoStart', 1), get(g:, 'LanguageClient_serverCommands', {}), get(g:, 'LanguageClient_selectionUI', v:null), get(g:, 'LanguageClient_trace', v:null), expand(get(g:, 'LanguageClient_settingsPath', '.vim/settings.json')), !!get(g:, 'LanguageClient_loadSettings', 1), get(g:, 'LanguageClient_rootMarkers', v:null), get(g:, 'LanguageClient_changeThrottle', v:null), get(g:, 'LanguageClient_waitOutputTimeout', v:null), !!get(g:, 'LanguageClient_diagnosticsEnable', 1), get(g:, 'LanguageClient_diagnosticsList', 'Quickfix'), get(g:, 'LanguageClient_diagnosticsDisplay', {}), get(g:, 'LanguageClient_windowLogMessageLevel', 'Warning'), get(g:, 'LanguageClient_hoverPreview', 'Auto'), get(g:, 'LanguageClient_completionPreferTextEdit', 0), has('nvim')]"],"id":4}
13:01:58 INFO reader-main src/vim.rs:380 <= None {"id": 4, "jsonrpc": "2.0", "result": [1, {"c": ["/nix/store/2scjiq
@Slabity
Slabity / main.rs
Created February 13, 2019 17:04
Simple rendy example
extern crate winit;
extern crate rendy;
type Backend = rendy::vulkan::Backend;
type Config = rendy::factory::Config;
type Factory = rendy::factory::Factory<Backend>;
type GraphBuilder = rendy::graph::GraphBuilder<Backend, ()>;
type PresentNode = rendy::graph::present::PresentNode<Backend>;
error[E0308]: mismatched types
--> resource/src/resources.rs:66:76
|
66 | device.bind_buffer_memory(block.memory(), block.range().start, buf)
| ^^^
| |
| expected mutable reference, found associated type
| help: consider mutably borrowing here: `&mut buf`
|
= note: expected type `&mut <B as gfx_hal::Backend>::Buffer`
[package]
name = "relm-testing"
version = "0.1.0"
authors = ["Tyler Slabinski <tslabinski@slabity.net>"]
edition = "2018"
[dependencies]
relm = { git = "https://github.com/antoyo/relm" }
gtk = { git = "https://github.com/gtk-rs/gtk" }
self: super:
{
Fabric = super.python2Packages.Fabric.overridePythonAttrs (oldAttrs: rec {
pname = "fabric";
version = "1.14.1";
src = super.python2Packages.fetchPypi {
inherit pname version;
sha256 = "93684ceaac92e0b78faae551297e29c48370cede12ff0f853cdebf67d4b87068";
};
{config, pkgs, ...}:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
];
nixpkgs.overlays = [
(self: super: { inherit (super.pkgsi686Linux) grub2_efi; })
];
$ kwin_wayland --xwayland "plasmashell -p org.kde.plasma.phone"
No backend specified through command line argument, trying auto resolution
OpenGL vendor string: X.Org
OpenGL renderer string: Radeon RX 580 Series (POLARIS10, DRM 3.27.0, 5.0.3, LLVM 7.0.1)
OpenGL version string: 4.5 (Compatibility Profile) Mesa 18.3.4
OpenGL shading language version string: 4.50
Driver: Unknown
GPU class: Unknown
OpenGL version: 4.5
GLSL version: 4.50
$ QT_QPA_PLATFORM=wayland dbus-run-session kwin_wayland --xwayland "plasmashell -p org.kde.plasma.desktop"
No backend specified through command line argument, trying auto resolution
OpenGL vendor string: X.Org
OpenGL renderer string: Radeon RX 580 Series (POLARIS10, DRM 3.27.0, 5.0.3, LLVM 7.0.1)
OpenGL version string: 4.5 (Compatibility Profile) Mesa 18.3.4
OpenGL shading language version string: 4.50
Driver: Unknown
GPU class: Unknown
OpenGL version: 4.5
GLSL version: 4.50
// map_ptr! macro takes an &Option<&mut &mut [T]> and returns the raw pointer
// map_len! macro takes an &Option<&mut &mut [T]> and returns the length
// map_shrink! macro takes an &Option<&mut &mut [T]> and dynamically shrinks it
// This function will fill the passed in buffers with data from an FFI function.
pub fn load_buffers(buffer_a: Option<&mut &mut [u32]>, buffer_b: Option<&mut &mut [u64]>) {
let mut ffi_buffer_holder = Buffer {
ptr_a: map_ptr!(&buffer_a),
ptr_b: map_ptr!(&buffer_b),
len_a: map_len!(&buffer_a),
GetResources
Connectors: [connector::Handle(31)]
Encoders: [encoder::Handle(32)]
CRTCS: [crtc::Handle(30)]
Framebuffers: []
Planes: [plane::Handle(28), plane::Handle(29)]
CreateFramebuffer 1024 768
DumbBuffer { size: (1024, 768), length: 3145728, format: ARGB8888, pitch: 4096, handle: buffer::Handle(1) }
framebuffer::Handle(71)
GetResources