[-] brian@programming.dev 2 points 8 months ago

why is common lisp so barebones? it's literally nothing but macros! WHERE'S THE SYNTAX

[-] brian@programming.dev 2 points 10 months ago

semicolons? quotes? use a formatter and don't think about it. I think js world has basically done this already.

const is simpler. why would I declare an array as let if I'm not reassigning? someone can look at it and know they don't have to think about reassignment of the reference, just normal mutation. ts has the further readonly to describe the other type of mutation, don't abuse let to mean that.

const arrow over named function? gets rid of all the legacy behaviors and apis. no arguments, consistent this, and no hoisting or accidental reassignment. the 2 places you should ever use named fn are generator or if you actually need this

[-] brian@programming.dev 2 points 11 months ago

depending on how much free space you have on your drive and the size of your home folder, the easiest way would just be to

  1. boot into some live image with gparted (basically any live image)
  2. use gparted to resize your root and add a new partition for /home
  3. copy the whole /home folder contents over to the new partition
  4. if you want your existing install to work: edit your fstab to mount the new partition as /home. the arch wiki should have good instructions for this, doesn't matter if you aren't using arch
[-] brian@programming.dev 2 points 1 year ago

c++ guarantees that calls to malloc are aligned https://en.cppreference.com/w/cpp/memory/c/malloc .

you can call malloc(1) ofc, but calling malloc_usable_size(malloc(1)) is giving me 24, so it at least allocated 24 bytes for my 1, plus any tracking overhead

yeah, as I said, in a stack frame. not surprised a compiler packed them into single bytes in the same frame (but I wouldn't be that surprised the other way either), but the system v abi guarantees at least 4 byte alignment of a stack frame on entering a fn, so if you stored a single bool it'll get 3+ extra bytes added on the next fn call.

computers align things. you normally don't have to think about it. Consider this a TIL moment.

[-] brian@programming.dev 2 points 1 year ago

sure, but if you have a single bool in a stack frame it's probably going to be more than a byte. on the heap definitely more than a byte

[-] brian@programming.dev 2 points 1 year ago

I mean, that sounds sorta like JWTs which are used commonly enough for this type of thing

[-] brian@programming.dev 2 points 1 year ago

why would you need to salt long random strings?

also if you salt them you have to have an id too so you can look up who's api key it is. otherwise you can just look up the key hash to get everything

[-] brian@programming.dev 2 points 1 year ago

things that store it as word size for alignment purposes (most common afaik), things that pack multiple books into one byte (normally only things like bool sequences/structs), etc

[-] brian@programming.dev 2 points 2 years ago

termux has some sort of gui support. I've never used it but that'd probably be your best bet

[-] brian@programming.dev 2 points 2 years ago

yeah that's weird, and I can't really tell why, but then that's a gnome problem not a Wayland problem. they're explicitly choosing to not support it.

I did find this though which seems to imply that it could be supported in mutter, but it'd take a fork if you wanted to implement it in gnome shell https://gitlab.gnome.org/GNOME/mutter/-/issues/973

anyway, there's choice. if you need these features use something that supports them

[-] brian@programming.dev 2 points 2 years ago

the one built in to plasma does, haven't tried any others

[-] brian@programming.dev 2 points 3 years ago

I haven't tried it since it was a separate version, but I didn't notice any issues at all

view more: ‹ prev next ›

brian

0 post score
0 comment score
joined 3 years ago