Skip to content

Instantly share code, notes, and snippets.

View Capital-EX's full-sized avatar
🦖
Too busy stack shuffling

and Capital-EX

🦖
Too busy stack shuffling
View GitHub Profile
@Capital-EX
Capital-EX / game.txt
Created January 30, 2024 22:08
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[9,"b",2,"4",9,"b",10,"5",3,"4",6,"b",13,"5",42,"d",4,"5",10,"b",1,"5",1,"4",8,"b",5,"5",2,"4",8,"5",3,"b",10,"5",6,"b",8,"5",10,"b",1,"5",9,"b",7,"5",13,"b",12,"5",42,"d",3,"5",12,"b",1,"5",1,"4",7,"b",5,"5",1,"4",8,"5",5,"b",8,"5",7,"b",8,"5",10,"b",1,"5",13,"b",2,"5",17,"b",10,"5",40,"d",1,"5",16,"b",1,"5",2,"4",1,"5",3,"b",2,"5",3,"b",1,"5",1,"4",8,"5",5,"b",7,"5",8,"b",8,"5",10,"b",1,"5",14,"b",1,"5",18,"b",10,"5",33,"d",6,"5",17,"b",1,"5",2,"4",5,"5",5,"b",5,"5",3,"b",1,"5",5,"b",6,"5",8,"b",4,"5",4,"b",1,"5",10,"b",2,"5",32,"b",10,"5",31,"d",3,"b",4,"5",21,"b",1,"4",4,"5",14,"b",1,"5",3,"b",6,"5",9,"b",3,"5",16,"b",2,"5",14,"b",1,"5",6,"b",1,"5",10,"b",10,"5",30,"d",5,"b",3,"5",22,"b",1,"4",3,"5",14,"b",9,"5",10,"b",3,"5",15,"b",2,"5",15,"b",3,"5",10,"b",1,"5",3,"b",11,"5",30,"d",5,"b",3,"5",22,"b",4,"5",14,"b",7,"5",12,"b",3,"5",14,"b",3,"5",16,"b",1,"5",6,"b",1,"5",3,"b",16,"5",29,"d",1,"5",5,"b",3,"5",22,"b",5,"5",14,"b",1,"4",16,"b",3,"5",6,"b",1,"5",9,"
{deck}
version:1
card:0
size:[512,342]
name:"prototypes.deck"
{card:home}
{widgets}
prototype11:{"type":"contraption","size":[100,100],"pos":[151,118],"def":"prototype1","widgets":{"slider1":{"value":56},"slider2":{"value":3136}}}
inc:{"type":"button","size":[78,27],"pos":[266,153],"script":"home.0","text":"Incerment"}
#include <ObjFW/OFArray.h>
#include <ObjFW/OFData.h>
#include <ObjFW/OFMutableArray.h>
#import <ObjFW/OFObject.h>
#include <stddef.h>
#include <stdio.h>
#include <ObjFW/OFString.h>
#include <ObjFW/OFStream.h>
#import <ObjFW/OFStdIOStream.h>
#import <ObjFW/ObjFW.h>
Starting state:
(1) ..s                           | [ int - int - int ] swap 'x set apply 'x get
    Inferred Effect: [ ..s -- ..t ]

(2) ..s [ int - int - int ]       | swap 'x set apply 'x get
    Inferred Effect: [ ..s -- ..t ]

(3) ..s [ int - int - int ] x     | 'x set apply 'x get
    Inferred Effect: [ ..s x -- ..t ]
class Heap<E> {
elem: E;
subheaps: Heap<E>[];
constructor(elem: E = null, subheaps: Heap<E>[] = []) {
this.elem = elem;
this.subheaps = subheaps;
}
private setSize(size: number){ return this; }
import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
struct Red end
struct Yellow end
struct Green end
alias Color = Red | Yellow | Green
def take_red_green(xs : Array(Color)) : Array(Red | Green)
xs.select(Red | Green)
end
def expand_type(x : U, t : T.class) : U | T forall U, T
require 'utf8'
local textBox = {
new = function(self, id,text, x, y, wrap, align, font, fontSize)
local tb = {}
tb.remove = false
tb.id = id
tb.font = font or love.graphics.getFont()
tb.fontHeight = tb.font:getHeight()
tb.fontSize = fontSize
! Copyright (C) 2022 Capital Ex.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays fry io kernel math math.parser namespaces ranges
sequences sequences.deep syntax locals ;
IN: bresenham
<PRIVATE
: >x0,x1 ( p0 p1 -- x0 x1 )
func line_primitive_mesh(source_mesh: ArrayMesh) -> ArrayMesh:
# The first index is the vertex list of the mesh, the last index (-1) is the edges of the tris
# Edge data must exist for this function to work. Know to work fine with GLB files.
var vert_data = source_mesh.surface_get_arrays(0)
var verts = vert_data[0]
var edges = vert_data[-1]
var tris = PoolVector3Array()
# Reform the array so that PRIMITIVE_LINES correctly draws each tri of the mesh.
# The values A, B, C are the IDs of the vertext that make up some triangle