Skip to content

Instantly share code, notes, and snippets.

View fogus's full-sized avatar
💭
attempting to learn how to better learn

Fogus fogus

💭
attempting to learn how to better learn
View GitHub Profile

Clojure 1.12.0-alpha10

Clojure 1.12.0-alpha10 is now available! Please read the release notes below.

Clojure is a hosted language and fully embraces that host including the Java Virtual Machine, the JDK (Java Development Kit), and interop with Java APIs. Over the last decade, all of these have seen significant evolution and Java APIs are increasingly using recent Java features like streams, functional interfaces, and lambdas.

Clojure 1.12.0-alpha10 delivers significant enhancements to Java interop focusing on two main areas:

/* PROG1.C */
/* Simple Hashing LZ77 Sliding Dictionary Compression Program */
/* By Rich Geldreich, Jr. October, 1993 */
/* Originally compiled with QuickC v2.5 in the small model. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* set this to 1 for a greedy encoder */
top games
Go
Hearts
Shogi
Haggis
Wabash Cannonball
Bridge
Uptown
Baseball Highlights 2045
ls
test$__STAR_.class
test$__STAR__STAR_.class
test$_main.class
test$loading__6798__auto____138.class
test__init.class
test$_init.class
test$fn__140.class
test.class
@fogus
fogus / 0 - UNIX Fifth Edition
Created July 20, 2011 00:15
UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c
main(argc, argv)
int argc;
char *argv[];
{
int i;
argc--;
for(i=1; i<=argc; i++)
printf("%s%c", argv[i], i==argc? '\n': ' ');
}
@fogus
fogus / verbose_proxy.c
Created January 17, 2024 21:56 — forked from lelanthran/verbose_proxy.c
A small program to proxy and record all traffic to a server.
/* ********************************************************
* Copyright ©2024 Rundata Systems. All rights reserved.
* This project is licensed under the GPLv3 License. You
* can find a copy of this license at:
* https://www.gnu.org/licenses/gpl-3.0.en.html
*
* More detail (1m read):
* https://www.rundata.co.za/rundata/products/verbose_proxy
*
* Example usage (3m video):
Hothouse by Aldiss
Other Days, Other Eyes by Shaw
City by Simak
Star of the Unborn by Werfel
Farewell Earth's Bliss by Compton
The Genocides by Disch
A Case of Conscience by Blish
Guernica Nights by Malzberg
We Who Are About To... by Russ
Solaris by Lem
import java.io.*;
/**
* Class for performing LZ77 compression/decompression using text IO
*
* @author Mark Hall
* @version 1.0
*/
public class LZ77T {
public static final int DEFAULT_BUFF_SIZE = 1024;
@fogus
fogus / fp.dot
Created May 2, 2012 13:34
early influence graph of fp languages -- this is not meant to be a complete time line. I'm mostly concerned with the root and inner nodes.
digraph G {
ranksep=1.0;
ratio=0.6;
APL [color=Blue, shape=box];
Simula [color=Blue, shape=box];
LISP [color=Blue, shape=box];
ALGOL [color=Blue, shape=box];
Planner [color=Blue, shape=box];
ACTOR [shape=hexagon];
// Copyright (C) 2023 dasshiva
#include <stdlib.h>
// Compiles on GCC 11.4.0 ubuntu idk about other systems
// Abusing macros to make C look a tiny bit better (maybe worse for some)
#define class(x, contents) typedef struct x x; struct x contents; // declare a class x
#define var(ty, name) ty name; // declare a variable
#define func(ty, x, ...) ty (*##x) (__VA_ARGS__); // declare a member function maybe static or non-static
#define static_func_def(ty, x, ...) ty x (__VA_ARGS__) // declare a static function
#define func_defnp(class, ty, x) ty x (class* self) // define a non-static function taking no parameters