Skip to content

Instantly share code, notes, and snippets.

View Losiel's full-sized avatar
📄
Hello, %s

alonzon Losiel

📄
Hello, %s
View GitHub Profile
@Losiel
Losiel / BTW-CE.json
Created May 23, 2024 18:27
JSON file that allows TLauncher (or other cracked minecraft launchers) to play Better Than Wolves Community Edition
{
"id": "BTW-CE",
"inheritsFrom": "1.5.2",
"releaseTime": "2024-05-23T17:51:19Z",
"time": "2024-05-23T17:51:19Z",
"type": "release",
"mainClass": "net.fabricmc.loader.launch.knot.KnotClient",
"arguments": {
"game": ["--assetsDir", "${assets_root}"],
"jvm": ["-cp", "${classpath}", "-Djava.library.path=${natives_directory}"]
@Losiel
Losiel / document.org
Last active March 11, 2025 09:01
Progress has been stagnant

Progress has been stagnant

The way our editor presents code is not the way we read it. When we see a variable we usually go to their definition to know their type. Or when we receive an error message we have to find the line of code that contains it. This goes against the way our editor wants us to read code.

Why? Why am I forced to read code in such awkward way? I’m aware of the existence of things like “Jump to definition,” but those feel like hacks. It’s like if the editor is unwilling to admit their defeat and is just trying to make up excuses.

Our development environment just refuses to accept each human needs to read the code differently. For example, the maintainer of a large codebase isn’t going to read the code in the same way as someone trying to get started. The worst part is that development on our DEs has been practically non-existent, and one reason for this is because the progress on programming languages has been incredibly stagnant. These modern languages keep reinventing the wheel and en

@Losiel
Losiel / most-org-features.org
Last active March 11, 2025 09:01
Org document to test most Emacs themes... or to see most of org-mode features in action

Org-mode document to see a theme in action

Out of the box

Headings!!

Headings!!

Headings!!

Headings!!
Headings!!
Headings!!
@Losiel
Losiel / textadept-fennel.lua
Created May 21, 2023 13:40
Fennel support for TextAdept 12.0
-- Copyright 2006-2023 Mitchell. See LICENSE.
-- Fennel LPeg lexer.
-- Contributed by Momohime Honda.
-- Modified by Losiel to properly support folding.
local lexer = require('lexer')
local token, word_match = lexer.token, lexer.word_match
local P, S = lpeg.P, lpeg.S
local lex = lexer.new(...)
@Losiel
Losiel / randomfuncs.lua
Created February 9, 2022 14:19
Misc functions for Lua
-- a bunch of random functions for Lua
-- allows a string to explore a table
-- you pass it the string and the table you allow it to explore
-- it formats the string like "You have {points} points!" (equivalent to "You have " .. t.points .. " points!")
-- it also can explore tables inside the table, like "Hi {player.name}!"
-- or a numerical index "Hi {0}" "Hi {player.0}"
local function format(str, t)
return string.gsub(str, "{(.+)}", function(s)
local value = t
@Losiel
Losiel / synapse API types.ts
Last active October 26, 2021 21:39
Types for every function in the Synapse API
/* Debug */
type constant = number | boolean | undefined | string
type level = number | (() => any)
declare namespace debug {
function getconstants(fi: level): constant[];
function getconstant(fi: level, idx: number): constant;
}
/* File system */
declare function readfile(path: string): string; // it can sometimes error but apparently i cant seem to tell TypeScript that this function can error