Vftdan Channel
25 subscribers
110 photos
2 videos
9 files
178 links
author: @vft_dan
Download Telegram
šŸ”ļøŽ chjara
"well we're getting further along, we're getting different errors" debuggingā„¢

Link to post
Is daisy-chaining of itertools.tees a good idea :blobcatthink:

#Python

Link to post
šŸ”ļøŽ Anton Chigurh :ve:
@ktemkin or die like a hero or live enough to become a service

Link to post
šŸ‘1
šŸ”ļøŽ SuperDicq


Link to post
ā¤3
šŸ”ļøŽ transcaffeine
OH: "If it walks like a duck and quacks like a duck, group theory says it's isomorphic to a duck!"

Link to post
ā¤2
šŸ”ļøŽ Xe :verified:
Malware is just software that does something the user doesn't want it to. A good example is Microsoft Windows.

Link to post
ā¤4
image.webp.enabled=false

Link to post
šŸ•Š2
šŸ”ļøŽ Vftdan
@piggo
OłO

Link to post
#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
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
TIL that you can view saved wifi passwords on Android using "share" feature

Link to post
šŸ‘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.
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 post
šŸ”„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...
B005
vftdan
Uh
My attempts at making music, I guess
šŸ”„4
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 tint2 panel), but was also sometimes drawing in Krita and trying to create some music.

Thanks to everyone again!
ā¤4
šŸ”ļøŽ Bichito :tlapkaHappy:
Home is where .ssh has my public key

Link to post
ā¤2
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 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