this gist exists as a placeholder I can pin onto my profile to hide the "Popular repositories" section. what's popular is not always what's good! direct your attention to my website instead :3
I've since moved the tutorial over to my website. Clarified some of the wording, added exercises at the end, added links to useful resources.
For historical reasons, I'm keeping the original text here. But if you've just stumbled upon this tutorial for the first time, you may want to check out the revised version!
https://riki.house/programming/lua/classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MIT License | |
-- | |
-- Copyright (c) 2021 liquidev | |
-- | |
-- 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local syntax = require "core.syntax" | |
local patterns = {} | |
local symbols = { | |
["nil"] = "literal", | |
["true"] = "literal", | |
["false"] = "literal", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <alsa/asoundlib.h> | |
#include <math.h> | |
#include <unistd.h> | |
#include <xdo.h> | |
#define LOG(...) do { \ | |
fprintf(stderr, __VA_ARGS__); \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <alsa/asoundlib.h> | |
#define LOG(...) do { \ | |
fprintf(stderr, __VA_ARGS__); \ | |
fflush(stderr); \ | |
} while (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import os | |
import parseopt | |
import random | |
import strutils | |
import rapid/gfx | |
import rapid/res/textures | |
import rapid/res/images | |
import rapid/gfx/fxsurface |
- WM: i3-gaps
- Wallpaper
- Font
- Compositor: compton-tryone
- Bar: polybar
- Terminal: alacritty
- rofi: default, looks good enough but I might customize at some point
Config files and scripts below.
NewerOlder