Skip to content

Instantly share code, notes, and snippets.

View IGBC's full-sized avatar

SEGFAULT IGBC

View GitHub Profile

Sketches

Write Arduino style sketches in Python

About

Sketches allows users to write simple "sketches" in python for performing every day simple computation, without having to worry about much of the 'boilerplate' code that a typical python script requires. The name sketch is taken from the short C programs that the Arduino IDE complies and uploads to Arduino devices. Arduino sketches have a fixed format: a setup() function that is run once and a loop() function that is then run repeatedly forever. This format makes it easy to start writing simple programs to control the device.

@IGBC
IGBC / flut.c
Created May 27, 2017 13:55
basic flood program
/*
Send a message up to a newline to the server.
Read a reply up to a newline and print it to stdout.
Loop.
Usage:
./client [<server-address> [<port>]]
Default ip: localhost.
Default port: 12345
*/
@IGBC
IGBC / flut.c
Created May 27, 2017 13:55
basic flood program
/*
Send a message up to a newline to the server.
Read a reply up to a newline and print it to stdout.
Loop.
Usage:
./client [<server-address> [<port>]]
Default ip: localhost.
Default port: 12345
*/
fn draw(&self, printer: &Printer) {
// If the background is dirty draw a new background
if self.dirty {
for y in 0..printer.size.y {
printer.with_color(ColorStyle::background(), |printer| {
printer.print_hline((0,y), printer.size.x, " ");
});
}
// set background as clean, so we don't need to do this every frame
@IGBC
IGBC / GGEZ Tracking Issue.md
Created February 22, 2021 16:22
GGEZ Tracking Issue (MMDC)

As follows is a list of known bugs in GGEZ:

  • Key events have patchy support of non english keyboard layouts.
  • Resize events and Canvas::with_window_size() return the logical window size, this plays havoc with per pixel sensitive shaders
  • The filesystem module cannot load compressed zip files, why not? Compression has been important in game design since the dawn of graphics.
  • Chip-sets as new as Sandybridge don't support OpenGL3.2 (Windows 10) this is totally unacceptable for a 2D casual game engine, however is fixable but requires 3 things to make it work:
    1. Back end support for querying available versions before starting OpenGL
    2. Supporting overriding the default shader
    3. Setting the OpenGL version (already supported)
  • Using primusrun (Nvidia Prime for Linux) returns Error: WindowCreationError(NoAvailablePixelFormat), but works with optirun (Open Source alternative)
@IGBC
IGBC / Cargo.toml
Created April 13, 2021 12:02
Cheaty Quine in Rust
[package]
name = "quine"
version = "0.1.0"
edition = "2018"