{ "version": "https://jsonfeed.org/version/1.1", "title": "autumn's page", "language": "en", "home_page_url": "https://autumns.page", "feed_url": "https://autumns.page/feed/feed.json", "description": "a digital garden", "author": { "name": "autumn", "url": "https://autumns.page/contact.html" }, "items": [{ "id": "https://autumns.page/posts/2022/12/hyprland-compose/", "url": "https://autumns.page/posts/2022/12/hyprland-compose/", "title": "Using caps lock as compose key on Hyprland", "content_html": "
I've recently switched to the window manager Hyprland, and I'm\nabsolutely loving it so far! I still need to give it a couple finishing\ntouches, but here's my light mode theme so far:
\n\nI kept running into a problem getting my caps lock to work as a\ncompose key, though. I use the compose key a lot for inputting\nIPA symbols and stuff, so this was pretty annoying, coming from X, where I\nused to just use xmodmap to set the key to do what I wanted, and all the online\nresources pointed me to things like setxkbmap
and stuff, which should have\nworked, but all it did was make it work as both caps lock and compose, which\nobviously made it hard to input things.
Turns out all I had to do was put this in my .config/hypr/hyprland.conf
:
input {\n # ...\n kb_options = compose:caps\n # ...\n}\n
\net voila, I can use caps lock as my compose key. This took embarrassingly long\nto figure out, so I'm putting it on my blog in hopes that the next person\nsearching for this will be able to find this page and get it fixed right away\ninstead of having to mess around with installing waybind or kbct or whatever\nin a desperate attempt to get it to work like I did.
\nSorry for the lack of actual posts, I couldn't honestly care less about keeping\nan active blog. Hanas work is going good though!
\nAlso the date on this post is straight up wrong but I don't care to fix it.\nToo bad!
\n", "date_published": "2023-01-01T03:38:30Z", "summary": "literally why was it this hard", "tags": [ "hyprland", "tech" ] },{ "id": "https://autumns.page/posts/2021/09/imports/", "url": "https://autumns.page/posts/2021/09/imports/", "title": "The Importance of `import`s", "content_html": "I do a lot of web development. Out of all my projects that I care about,\nbasically all of them are on the web or in Javascript in some fashion. I wish\nthis wasn't really the case - mostly because low-level seems cool! - but I have\nsome points of friction with low-level languages that I wish I could easily solve.
\nI only really got around to trying out low-level through finding SerenityOS,\na very cool project. However, C++ (or C, honestly) is most definitely not the\nbest language for readability or understanding: let's try to dive into the code\nand try to figure out how Serenity works, for funsies! Firstly, we can clone\nand build. On my T440p, this takes about half an hour or so from source. This,\nto my knowledge, is largely building the toolchain itself, not the actual OS.
\nNot a huge problem, and this is probably not entirely solvable by a language, at\nleast not yet - compiling C and C++ is a popular problem, and lots of labor\nand capital are being poured into the problem, so beating them in compilation\nspeed is a non-starter. This isn't really what I want to get at, but I've just\nspent about a paragraph complaining about it, so it's got to be an issue I care\nabout.
\nNext, we run into the issue of C/C++ itself - header files. In Javascript, there\nare a few standards for importing code - my personal favorite is ESM, which looks\nlike this:
\n// in bar.js
export const foo = (s) => s + 5
// in baz.js
import { foo } from './bar.js'
const main = () => {
console.log(foo(3))
}
\nWhich is very understandable, to my brain! If I want to learn about what foo
is,\nI can go dive into bar.js
and quickly figure out where each symbol comes from.
Compare this to C or C++, which use a bodged system that boils down to "include\nthat file in this file and call it a day"[1]:
\n// in bar.c
#include \"bar.h\"
int foo(int x) {
return x + 5;
}
// in bar.h
#ifndef BAR_H_
#define BAR_H_
int foo(int x);
#endif
// in baz.c
#include \"bar.h\"
#include <stdio.h>
int main(int argc, char *argv[]) {
int baz = foo(3);
printf(\"%d\\n\", baz);
}
\n(I haven't actually tried to compile this. Don't yell at me if I've gotten\nsomething subtly wrong - actually, yell at C, since this should not\nbe something to easily get subtly wrong.)
\nThere are at least 3 levels of kludginess here:
\nThe last point is the one that makes it the hardest to understand things.\nYes, if I use a good IDE,[2] I can hover over the symbol or something and\njump to definition. But I shouldn't have to! If I open a big C project in nano,\nI have to search around externally, grepping for symbols and such to figure out\nwhere things come from or how the program flows. If I open a big Javascript or\nTypescript project in nano, I can get a much clearer picture of program flow\nand where functions are declared.
\nOne good piece of news in this space is that C++20 is introducing modules, which\nlooks really similar to Typescript:
\n// in foo.cc
export module Foo;
namespace Bar {
export int f() {
return 42;
}
}
// in main.cc
import Foo;
import std.core;
using namespace std;
int main() {
cout << Bar::f() << endl;
}
\nThis still suffers from the issue of "I have no clue what's now in scope", but\nit gets rid of header files, which are the much worse part of the problem.\nAdditionally, modules seem... very unsupported. I looked at GCC's page on the topic,\nand the state looks very unfinished so far.
\nI'd get more grumpy about random parts of programming languages that I don't like,\nbut this post would be a mile long and I wouldn't have finished it. So, in summary:\nstop making languages with bare imports, take a page from ES6's book (but not too\nmany, JS is still a bit of a nightmare), and overthrow C(++).
\nNot that Javscript is really that different, but there is at least some\nlevel of thought put in here. ↩︎
\n"Good" is very subjective here and sometimes very strange. I had to use\nmy university email to get a copy of CLion to even get symbols to start resolving,\nand even then, things were still strangely broken. I hear QTCreator works well\nwith Serenity, but why do I have to use a special IDE just to write the code?\nThis should not be a consideration - if I open a big C project in nano,\nI have to search around externally to figure out what's going on. If I open a\nbig JS/TS project in nano, I can generally get an idea of how the project works. ↩︎
\nHello, world! This is the first post I'm making on my own site, hosted on\nNeocities.
\nI wasn't there for the small web - not the web Berners-Lee knew, not the web\n90s kids knew, and just barely what it was in the earliest 10s - but I've seen\nglimpses into the past, before the homogenization and centralization of the web,\nand I'd much rather have a web like that than the one we have now.
\nThere are a lot of projects trying to approximate this, and we'll probably never\ntruly escape Big Tech (TM), as some might like to call it, at least until some\nsort of global revolution. Until then, I am perfectly happy to scratch out my\nown corner of the nascent indie web.
\nHopefully, I'll write more than I'm used to. A web without content is simply\ninfrastructure, and empty Debian servers are boring.
\n", "date_published": "2021-08-14T05:34:00Z", "summary": "My first post and an introduction", "tags": [ "introduction" ] } ] }