Skip to content

Instantly share code, notes, and snippets.

View lockie's full-sized avatar

Andrew Kravchuk lockie

View GitHub Profile
 * Package: dev-scheme/gerbil-0.16:0
 * Repository: src_prepare-overlay
 * Upstream: https://github.com/vyzo/gerbil
 * USE: abi_x86_64 amd64 elibc_glibc kernel_linux sqlite xml zlib
 * FEATURES: compressdebug preserve-libs sandbox splitdebug userpriv usersandbox
>>> Unpacking source...
>>> Unpacking gerbil-0.16.tar.gz to /var/tmp/portage/dev-scheme/gerbil-0.16/work
>>> Source unpacked in /var/tmp/portage/dev-scheme/gerbil-0.16/work
>>> Preparing source in /var/tmp/portage/dev-scheme/gerbil-0.16/work/gerbil-0.16/src ...
>>> Source prepared.
(ql:quickload :alexandria)
(defstruct test
(number (make-array 0 :element-type 'alexandria:array-index)
:type (simple-array alexandria:array-index (*))))
(print (make-test))
(proclaim
'(optimize (speed 3) (safety 0) (debug 0) (compilation-speed 0) (space 0)))
(ql:quickload (list :sdl2 :cl-liballegro))
(require :sdl2)
(require :cl-liballegro)
(princ 'liballegro)
(disassemble #'al:map-rgb)
# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( pypy{3,} python{2_7,3_{4,5,6,7,8,9,10,11}} )
inherit git-r3 python-any-r1 ninja-utils llvm
DESCRIPTION="A Common Lisp with LLVM back end and interoperation with C++"
@lockie
lockie / arrays-benchmark.lisp
Last active February 3, 2023 12:45
Common Lisp arrays benchmark; https://t.me/lisp_exile/13
(ql:quickload :trivial-benchmark)
(proclaim '(optimize (speed 3) (safety 0) (debug 0)
(compilation-speed 0) (space 0)))
(declaim (ftype (function (simple-vector) fixnum) sum-simple-vector))
(defun sum-simple-vector (v)
(loop
:with s :of-type fixnum := 0
:for x :of-type fixnum :across v
(use-modules (ice-9 threads)
(sdl2)
(sdl2 events)
(sdl2 rect)
(sdl2 render)
(sdl2 video))
(define window-width 640)
(define window-height 480)
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Terminess Powerline:pixelsize=24:antialias=true:autohint=true";
static int borderpx = 2;
@lockie
lockie / mwe.c
Last active September 8, 2022 13:41
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "curl/curl.h"
#define OUTPUTFILE "download"
#define URL "https://http2-server-push-demo.keksi.io"
static bool setup(CURL* hnd)
{
@lockie
lockie / client.c
Last active August 5, 2024 06:34
/* compilation: gcc -o client client.c -lssl -lcrypto */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/bio.h> /* BasicInput/Output streams */
#include <openssl/err.h> /* errors */
#include <openssl/ssl.h> /* core library */
#define BuffSize 1024