#linux (5.4.0) doesn't seem to immediately close TCP connections after the PC wakes up after several hours. Is there any reason for it to work like this?
Link to post
Link to post
Vftdan Channel
src: https://youtube.com/watch?v=XRpHIa-2XCE&t=1205
Actually, one of the problems of me trying to find a good way to manage notes & tasks is that there is no devices with high availability (i. e. no rpi or any other home server) (well, android phone is always on, but no non-system processes are)
So I need p2p sync. Mb writing some kind of git wrapper can help.
Also I'd like it to be Turing-complete, self-modifying and running on timer, and I'd prefer not to run a text editor for it, so the core probably should be a standalone program (script?), and editor plugins primarily providing integrations and navigation.
#notetaking
So I need p2p sync. Mb writing some kind of git wrapper can help.
Also I'd like it to be Turing-complete, self-modifying and running on timer, and I'd prefer not to run a text editor for it, so the core probably should be a standalone program (script?), and editor plugins primarily providing integrations and navigation.
#notetaking
Vftdan Channel
Actually, one of the problems of me trying to find a good way to manage notes & tasks is that there is no devices with high availability (i. e. no rpi or any other home server) (well, android phone is always on, but no non-system processes are) So I need p2p…
I may look into
#notetaking
nb.sh — it's a single 26k-line (691KiB) bash script and it even seems to have plugin support.#notetaking
👍1
If you have to use the snap client for webinar.ru and it cannot find the camera, typing
snap connect webinar:camera
into shell seems to fix the problem.Snapcraft
Install MTS Link on Linux | Snap Store
Get the latest version of MTS Link for Linux - MTS Link
Forwarded from $USER@mastoposter/staging
meme {
usetemplate "MyChildWillX";
entries = [
{type = MyChildWillX::SATAN; text = "MY CHILD WILL pay for Wi-Fi mobile internet sharing"},
{type = MyChildWillX::JESUS; text = "echo 65 > /proc/sys/net/ipv4/ip_default_ttl"; font="monospace"},
];
}
Link to postMastodon.ml
Vftdan (@vftdan@mastodon.ml)
meme {
usetemplate "MyChildWillX";
entries = [
{type = MyChildWillX::SATAN; text = "MY CHILD WILL pay for Wi-Fi mobile internet sharing"},
{type = MyChildWillX::JESUS; text = "echo 65 > /proc/sys/net/ipv4/ip_default_ttl"; font="monospace"},
…
usetemplate "MyChildWillX";
entries = [
{type = MyChildWillX::SATAN; text = "MY CHILD WILL pay for Wi-Fi mobile internet sharing"},
{type = MyChildWillX::JESUS; text = "echo 65 > /proc/sys/net/ipv4/ip_default_ttl"; font="monospace"},
…
🔥2
Btw, I've completely forged this crossposted message, because Mastoposter didn't even have "
New status: " log entry for this post neither for the post nor for the boost activities...Why is
apt index so huge? And does apt update calculate deltas before downloading data?apt-daily.timer can cause almost 1GiB disk usage and idk how much internet data usage.Happy New Year!
I don't think I will write much this time. I didn't follow that much about what is going in the world. I just hope that things get better.
And I don't generally share my personal life online, but things are pretty fine for me.
My social circle didn't change considerably, but I didn't engage in anything big this time. I still was mostly communicating online with @hatkidchan. We sometimes played together (mostly Minecraft) either organised by @kiriharunya or on @EpicKitty's Epiccraft. And as usual, when I was being active in my free time, I was mostly learning or trying something programming-related (one of the things I've spend some time with were combinatorial parsers, but I was also doing other things: recently I've implemented task grouping for
Thanks to everyone again!
I don't think I will write much this time. I didn't follow that much about what is going in the world. I just hope that things get better.
And I don't generally share my personal life online, but things are pretty fine for me.
My social circle didn't change considerably, but I didn't engage in anything big this time. I still was mostly communicating online with @hatkidchan. We sometimes played together (mostly Minecraft) either organised by @kiriharunya or on @EpicKitty's Epiccraft. And as usual, when I was being active in my free time, I was mostly learning or trying something programming-related (one of the things I've spend some time with were combinatorial parsers, but I was also doing other things: recently I've implemented task grouping for
tint2 panel), but was also sometimes drawing in Krita and trying to create some music.Thanks to everyone again!
❤4
❤2
Sometimes I write collections of C macros of different levels of cursedness. Today I implemented slice types as anonymous structs:
#c
#define MIN(a, b) ((a) <= (b) ? (a) : (b))
#define MAX(a, b) ((a) >= (b) ? (a) : (b))
#define SLICE_T(T) struct {T *ptr; ssize_t len;}
#define SLICE_LIT(arr) {.ptr = (arr), .len = sizeof(arr) / sizeof(*(arr))}
#define SLICE_LIT_STR(str) {.ptr = (str), .len = sizeof(str) / sizeof(*(str)) - 1}
#define SLICE_CSTR(str) {.ptr = (str), .len = strlen(str)}
#define SINGLETON_SLICE(p) {.ptr = (p), .len = 1}
#define SLICE_ARG(T, name) ssize_t name##__len, T* name##__ptr
#define SMALL_SLICE_ARG(T, name) int name##__len, T* name##__ptr
#define SLICE_TO_ARG(slc) (slc).len, (slc).ptr
#define SMALL_SLICE_TO_ARG(slc) (int)MIN(INT_MAX, (slc).len), (slc).ptr
#define SLICE_FROM_ARG(arg) {.ptr = arg##__ptr, .len = arg##__len}
#define SLICE_ARG_TO_VAR(arg) SLICE_T(typeof(*arg##__ptr)) arg = SLICE_FROM_ARG(arg)
#define CHRSLC_FMTS "%.*s"
#define CHRSLC_FMTA SMALL_SLICE_TO_ARG
// If .len is zero, one cannot dereference .ptr !
#define _SUBSLICE_POSITIVE(slc, start, endlen) (typeof(slc)) {.ptr = ((slc).ptr ? (slc).ptr + (start) : NULL), .len = (start >= 0) ? MAX(0, MIN((endlen), (slc).len) - (start)) : 0}
#define SUBSLICE(slc, start, endlen) _SUBSLICE_POSITIVE(slc, (start) + ((start) >= 0 ? 0 : (slc).len), (endlen) + ((endlen > 0) ? 0 : (slc).len))
#define _SLICE_PTR_AT_POSITIVE(slc, i) (typeof((slc).ptr)) ((i) < 0 (i) >= (slc).len !(slc).ptr ? NULL : (slc).ptr + (i))
#define SLICE_PTR_AT(slc, i) _SLICE_PTR_AT_POSITIVE(slc, i >= 0 ? i : i + (slc).len)
#define _SLICE_SAFE_DEREF(ptr, domsg) (*((ptr) ? (ptr) : ((domsg), fflush(stderr), abort(), (typeof(ptr))NULL)))
#define SLICE_AT(slc, i) _SLICE_SAFE_DEREF(SLICE_PTR_AT(slc, i), fprintf(stderr, "Failed to access%s slice (%s) of length %zd at index (%s = %zd) at %s (%s:%d)\n", (slc).ptr ? "" : " a NULL", #slc, (slc).len, #i, (ssize_t)(i), func, FILE, LINE))
#define SLICE_FOR_INDICES(slc, i) for (ssize_t i = 0; i < (slc).len; ++i)
#define SLICE_CALLOC(T, size) {.ptr = (T*)calloc((size), sizeof(T)), .len = (size)}
// Should only be called for non-subsliced slices
#define SLICE_FREE(slc) do { if ((slc).ptr) free((slc).ptr); (slc).ptr = NULL; (slc).len = 0; } while(0)
// If SLICE_CALLOC was saved into a const SLICE_T
#define SLICE_FREE_DANGLE(slc) do { if ((slc).ptr) free((slc).ptr); } while(0)
#c
🐳1
Vftdan Channel
Sometimes I write collections of C macros of different levels of cursedness. Today I implemented slice types as anonymous structs: #define MIN(a, b) ((a) <= (b) ? (a) : (b)) #define MAX(a, b) ((a) >= (b) ? (a) : (b)) #define SLICE_T(T) struct {T *ptr; ssize_t…
Given that the types are anonymous, they have to be unpacked to be passed between functions:
void
print_slice_chars(SLICE_ARG(const char, s))
{
SLICE_ARG_TO_VAR(s);
while (s.len) {
printf("Character: %c\n", SLICE_AT(s, 0));
s = SUBSLICE(s, 1, 0);
}
}
I am trying to generate a ligature font. Can ttf file only define the look of ligatures that it has as the results of the GSUB table without influencing the look of the constituent codepoints in contexts that don't match the substitution rules? As I understand, the codepoints still need to be associated with some glyph IDs. Do I still need to define their metrics (hmtx), if the single-codepoint glyphs don't contain any strikes? Will rendering software understand that the font doesn't define the look of these characters, but only uses them in the GSUB table?
#OpenType #ttf #otf
Link to post
#OpenType #ttf #otf
Link to post
Vftdan Channel
World, if shebangs were allowed at the beginning of XML documents Link to post
Only saved by bash process substitution
👏1😨1
Vftdan Channel
World, if shebangs were allowed at the beginning of XML documents Link to post
I think, it should be possible to register
<?xml magic in binfmt_misc with a script that looks for <!--! at the beginning of the second line and exec s the rest of the line with the filename and arguments.