Profile for hikari

Header for hikari
Avatar for hikari
Display name
hikari ๐ŸŒŸ (fell out of the sky)
Username
@hikari@noyu.me
Role
admin

About hikari

Bio

from another world; magical girls on the internet, gpu programmers, musicians, sky enthusiasts, etc; EN/SV/DE/ๆ—ฅๆœฌ่ชž

Stats

Joined
Posts
16689
Followed by
1483
Following
198

Recent posts

i set a limit on how many concurrent requests nginx will proxy to GoToSocial, letโ€™s see if that saves my server from certain death the next time marcan replies to me lol

(i deleted the original post i made about this problem and it seems like it took the thread with it? iโ€™m very confusedโ€ฆ)

Open thread at this post
#import "Foundation/Foundation.h"

#include <objc/message.h>
#include <objc/runtime.h>

@interface Infinite: NSObject
@end

@implementation Infinite: NSObject
@end

int main(void)
{
    class_addMethod([Infinite self], @selector(loop), objc_msgSend, "@@:");
    [[Infinite new] loop];
    return 0;
}
Open thread at this post

rust question. a common pattern in code iโ€™ve written is:

assert!(foo % bar == 0);
let count = foo / bar;

is there a standard way to do that as a single operation?

one of the things i really like about rust is how it helps you avoid errors by combining an assertion of some assumption (e.g. โ€œfoo is not Noneโ€) with obtaining a value based on that assumption (e.g. getting the value inside the Some()). so in this case, itโ€™d be really nice if i could do something like foo.div_exact(bar).unwrap(). personally iโ€™d put it in the stdlibโ€ฆ

Open thread at this post