Skip to content

Instantly share code, notes, and snippets.

View lf94's full-sized avatar
🏔️
Archived

49fl lf94

🏔️
Archived
  • Internet
View GitHub Profile
@lf94
lf94 / ps2-lights-opening.c
Created August 4, 2023 15:24
PS2 OSDSYS opening sequence lights circles
static void
DrawLights(void)
{
int l, i, j, k;
vif1SetZWrite(0);
vif1SetZTest(0);
vif1SetTexture(&textures[TEXID_CRBL]);
for(l = 0; l < 4; l++) {
GitHub changed the world of open-source.
In the beginning it brought together the disconnected programmers who always wanted to work on something with other like-minded people.
In the present it's no longer the foreground. Businesses and professionals connect and the profiles become a bragging ground.
The GH PR system is stretched to its limits. During the early days this was ok: PRs were few and far between. It worked.
I've changed, and so has GitHub. As I grow older I care more about my impact and personal data responsibility. I care about FOSS work being used for profit.
@lf94
lf94 / adafruit_gfx.html
Created August 17, 2021 22:03
Adafruit GFX API in JS
<canvas id="canvas" width="800" height="600"></canvas>
<script>
const canvas = document.getElementById("canvas");
const context = canvas.getContext('2d');
const rgbs = {};
// color is in 565 format
function toRGB(color) {
const rgb = rgbs[color];
// P = (1−t)2P1 + 2(1−t)tP2 + t2P3
function bezier3(points, segments) = let (
s = 1 / segments
) [
for(t = 0; t <= 1 + s; t = t + s)
pow((1 - t), 2) * points[0]
+ 2 * (1 - t) * t * points[1]
+ pow(t, 2) * points[2]
];
RE: WHEN WILL WEB BROWSERS BE COMPLETE?
2020-10-31 02:46PM
A follow-up.
There has been some great conversation around the opinion piece. Having read all
200+ comments on YCombinator and Gist GitHub, I think it's most productive to
respond to them all in this follow-up piece.
The piece will be structured by looking at what I think are the most relevant
critiques and comments, followed by adding context to others' comments, and
WHEN WILL BROWSERS BE COMPLETE?
A short exploration into the end game of web browsers.
This article may seem to be about bashing Google but it isn't. It's just about
reflecting on the current state and how much longer we should see ourselves
here.
So what is the Web? Well we can agree the Web is a conglomerate of standards
proposed by the W3C. So what do those standards define?
Theorem andb_eq_orb :
forall (b c : bool),
(andb b c = orb b c) ->
b = c.
Proof.
intros b c.
destruct b eqn:Eb.
- destruct c eqn:Ec.
+ reflexivity.
@lf94
lf94 / z-strings.adoc
Created June 5, 2020 16:09
z-strings

"Strings" form a group

By the end of this, we will have defined insert, delete, find and replace operations.

Talking about polymorphism with someone in the context of JS, the following example came up:


.intel_syntax noprefix
.include "std.macro"
.include "curl.const"
.section .data
curl: .quad 0
.section .rodata
url_google: .asciz "http://google.com"
@lf94
lf94 / fib.s
Last active March 29, 2020 20:42
.intel_syntax noprefix
.include "std.macro"
.section .text
fib: op1 = rdi; op2 = rsi; iterations = rcx
xadd op2, op1
loop fib
ret