Skip to content

Instantly share code, notes, and snippets.

View privet-kitty's full-sized avatar

Hugo Sansaqua privet-kitty

View GitHub Profile
@privet-kitty
privet-kitty / kennington.csv
Last active May 8, 2022 04:42
CSV data of netlib LP problems, edited based on Thorsten Koch, The final NETLIB-LP results
name nz size optimal
CRE-A 14987 96 0.23595407060971607914108674680625E+8
CRE-B 256095 128 0.23129639886832364609512881638847E+8
CRE-C 13244 160 0.25275116140880216542103232084057E+8
CRE-D 242646 96 0.2445496976454924819803581786941E+8
KEN-07 8404 96 -0.679520443381687E+9
KEN-11 49058 96 -0.6972382262519971E+10
KEN-13 97246 96 -0.10257394789482432E+11
KEN-18 358171 96 -0.5221702528739681E+11
OSA-07 143694 96 0.53572251729935104299116808137737E+6
(sb-c::defknown modular* ((unsigned-byte 64) (unsigned-byte 64)) (unsigned-byte 64)
(sb-c::movable sb-c::foldable sb-c::flushable sb-c::commutative)
:overwrite-fndb-silently t)
;; same as fast-*/unsigned=>unsigned
(sb-c::define-vop (fast-mult sb-vm::fast-safe-arith-op)
(:translate modular*)
(:args (x :scs (sb-vm::unsigned-reg) :target eax)
(y :scs (sb-vm::unsigned-reg sb-vm::unsigned-stack)))
(:arg-types sb-vm::unsigned-num sb-vm::unsigned-num)
@privet-kitty
privet-kitty / storage-class.md
Last active February 20, 2021 22:48
storage class (SBCL 2.0.1 x86-64)
name storage base size operand alt. SCs const. SCs save
descriptor-reg registers 1 qword control-stack constant, immediate t
any-reg registers 1 qword control-stack immediate t
signed-reg registers 1 qword signed-stack immediate t
constant constant 1 qword nil
fp-single-zero immediate-constant 1 nil nil
fp-double-zero immediate-constant 1 nil nil
fp-complex-single-zero immediate-constant 1 nil nil
fp-complex-double-zero immediate-constant 1 nil nil
@privet-kitty
privet-kitty / 1-primitive-types.md
Last active February 20, 2021 22:48
primitive type (SBCL 2.0.1 x86-64)
Name Storage classes Type
t descriptor-reg t
positive-fixnum any-reg, signed-reg, unsigned-reg (unsigned-byte 62)
unsigned-byte-63 signed-reg, unsigned-reg, descriptor-reg (unsigned-byte 63)
unsigned-byte-64 unsigned-reg, descriptor-reg (unsigned-byte 64)
fixnum any-reg, signed-reg (signed-byte 63)
signed-byte-64 signed-reg, descriptor-reg (signed-byte 64)
character character-reg, any-reg character
function descriptor-reg function
@privet-kitty
privet-kitty / faslize.sh
Last active October 29, 2022 16:59
faslize
#!/usr/bin/env bash
# Copyright 2020 Hugo Sansaqua
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
begin 664 Main.lisp
M(R$O=7-R+VQO8V%L+V)I;B]S8F-L("TM<V-R:7!T"B,@1D%33`H@(&-O;7!I
M;&5D(&9R;VT@(FAE;&QO+FQI<W`B"B`@=7-I;F<@4T)#3"!V97)S:6]N(#$N
M,2XQ-`K_!@```%@X-BTV-$X`````````!@```#$N,2XQ-#(````H.D=%3D-'
M0R`Z4T(M4$%#2T%'12U,3T-+4R`Z4T(M5$A214%$(#I30BU53DE#3T1%*4P&
M1@```$\```!2````30```$$```!4````!:(/2````&4```!L````;````&\`
M```L````(````'<```!O````<@```&P```!D````(0```'X````E`````0,!
M.`($([1T8>$`````!`0K`0````````"-``$#`B0`(YQT8>$`````HA<O````
M:````&\```!M````90```"\```!U````8@```'4```!N````=````'4````O
M````:````&4```!L````;````&\````N````;````&D```!S````<`````$#
@privet-kitty
privet-kitty / binary_heap.cc
Last active August 20, 2019 06:39
Priority queue with binary heap
/*
* Priority queue with binary heap
*/
#include <iostream>
#include <vector>
#include <utility>
#include <cstdint>
using std::vector; using std::swap;
Below is the descending list of the first 1000 primes smaller than 2^31 and the largest primitive roots modulo them.
prime generator
2147483647 2147483634
2147483629 2147483627
2147483587 2147483583
2147483579 2147483576
2147483563 2147483550
2147483549 2147483546
2147483543 2147483541
@privet-kitty
privet-kitty / LICENSE
Last active October 29, 2021 22:44
All my gists are released under MIT license unless otherwise noted.
Copyright (c) 2018-2021 Hugo Sansaqua
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@privet-kitty
privet-kitty / foo.asd
Last active February 10, 2019 00:06
Private system on ASDF
;; -*- mode: lisp -*-
(defpackage :foo.asdf
(:use :cl :asdf :uiop)
(:export #:hideable-system))
(in-package :foo.asdf)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass hideable-system (system)
((private :initform nil :initarg :private :reader private-p))