=== ANCHOR POEM ===
══════════════════════════════════════════════─────────────────────────────────────
@user-501
also it's only undefined behavior because the order of the bits aren't
defined, so if you do bitfield "pointer arithmetic" then you're screwed if you
try and be portable with it. However if you're just using bitfields as
compressed data storage then you can safely access integer.a integer.b
integer.c etc safely and easily. The compiler doesn't care what order they're
in if you don't write logic that requires them to be in a certain order
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═══════════════════════════════════════────────────────────────────────────┘
=== SIMILARITY RANKED ===
--- #1 fediverse/633 ---
═════════════════════════════════════════════──────────────────────────────────────
@user-192
the neat thing about BASH is that it's the glue that holds all your other code
together. Write libraries in C and call them with BASH - accomplish broader
tasks that are easier to co-create. That's why I like it - it's not the most
important, but it's quite beneficial I think _^
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #2 fediverse/3800 ---
═════════════════════════════════════════════════════════──────────────────────────
@user-1352
You're absolutely right, the compiler knows better than me! Certainly the
compiler doesn't know best, but certainly the compiler knows better than me.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════════════════─────────────────────────┘
--- #3 messages/129 ---
═════════════════════════════════════════════──────────────────────────────────────
So you're telling me the speed difference between Python and C is due not to
the logic that the programmer uses, but rather the optimization capabilities
of the compiler?
(An interpreter includes a compiler, it just runs it in a loop rather than a
single pass)
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #4 fediverse/282 ---
════════════════════════════════════════════───────────────────────────────────────
@user-209
I think you're right. Every letter in the variable name is another byte the OS
has to keep track of, which was a bigger problem in the past than it is today
(when it's been made irrelevant)
it's interesting how habits persist though the conditions that caused them
have faded. like a personal reflection of the environment you learned in.
"A a = new a();" is much more concise and (crucially) you can fit more words
to the right.
"a + b = c; c -= 2; f_z.write(c); f_z.close();" could conceivably be written
on a single line if you have short variable names. and when you only have so
many lines...
glad we're not constrained by those things anymore. the skeletal code that we
look at daily is much clearer - scope is more important, and so it makes sense
to encourage a coding style that illustrates it. however I can't help but
think block formatting like this could be useful in some situations, such as
when you'd normally be compelled to write a function for an operation that
runs once or more.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═════════════════════════════════════──────────────────────────────────────┘
--- #5 fediverse/702 ---
═════════════════════════════════════════════──────────────────────────────────────
Branches cause cache misses which are slow when done on repeat.
Better to structure your code to avoid them, if possible, for example by using
an array of function pointers instead of switch statements.
unrelated, but once the data is cached from memory, operations like bit
shifting and arithmetic are essentially free. The slowest part of the process
is moving data from RAM to cache so that the CPU can use it.
That being said, CPUs and compilers are VERY good at optimizing that type of
thing these days.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #6 fediverse/1034 ---
═══════════════════════════════════════════════────────────────────────────────────
@user-192
be careful, recursion can cause stack overflows.
better to run function pointers from a loop. That way you can operate as long
as necessary. Just make sure you don't get in an infinite loop...
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════───────────────────────────────────┘
--- #7 fediverse/707 ---
══════════════════════════════════════════════─────────────────────────────────────
@user-524
Sometimes when I feel overwhelmed with all the boilerplate I just start coding
and making stuff. Doesn't matter if it works, doesn't matter if it says /*
FIXME */ all over the place, doesn't matter if it includes header files that
don't exist yet, as long as you're hacking out the mechanics of whatever
operations you need to perform then you can figure the rest of that stuff out
later. The creative urge doesn't last forever, which is why projects get
abandoned, but with discipline you can keep bringing yourself back to fix all
the /* FIXME */'s and the compiler errors.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═══════════════════════════════════════────────────────────────────────────┘
--- #8 fediverse/5179 ---
═══════════════════════════════════════════════════════════════════────────────────
why don't corporations let you write code in whatever language you want? it's
trivial to run a compiler or interpreter inside of another program.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════════════════════════───────────────┘
--- #9 fediverse/1810 ---
═════════════════════════════════════════════════════──────────────────────────────
some people hear words like "datastructures" and "object-oriented programming"
and think they're made up terms that don't mean anything important.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════════════─────────────────────────────┘
--- #10 fediverse/1941 ---
═════════════════════════════════════════════════════──────────────────────────────
@user-579
I've never actually used xbps-src, I usually just compile it using the same
tooling that the people who made the program use. If your project doesn't have
a make file then it's probably not ready for distribution yet. That's like,
the first thing I write! Though I don't use make, I just use BASH and chain
together compiler commands and whatnot
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════════════─────────────────────────────┘
--- #11 fediverse/247 ---
═══════════════════════════════════════════────────────────────────────────────────
@user-195 parallel is when two programs run simultaneously, like two parallel
lines (threads) that never touch.
concurrent is when the two lines are split up into chunks and the program
switches between them - like this: -----_----
enter alternate universe
parallel is when two programs operate on the same axis - usually time - and
never interfere with each other. the OS will switch between them as
appropriate to make sure they never intersect. Sorta like this: -----_----
concurrent is when two programs are executed simultaneously, primarily
constituting computation correlated with collective contents of coordinated
collaboration between contextually related coroutines.
It's simple, even a beginner could figure it out.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════───────────────────────────────────────┘
--- #12 fediverse/617 ---
═════════════════════════════════════════════──────────────────────────────────────
So much of computing is just... handling the quirks of hardware and presenting
it to the user (programmer) in a way that is sane and makes sense, instead of
the arcane and [nebulous/confabulous/incomprehensible] way that physical
nature demands our absurdly potentialized computational endeavors be.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #13 fediverse/6438 ---
══════════════════════════════════════════════════════════════════════════════─────
why would you gatekeep content by keeping us from easily using LLMs some
people aren't technical and still need to write computer programs because
that's how you enlighten a people is empower them with new tools
"I've never heard of that programming language, but luckily I can fit all of
it's documentation in my context window."
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═══════════════════════════════════════════════════════════════════════────┘
--- #14 fediverse/3154 ---
═══════════════════════════════════════════════════════────────────────────────────
┌───────────────────────────┐
│ CW: re: cursing-mentioned │
└───────────────────────────┘
@user-1461
yes... I like tree shapes, you have to address them differently. Lots of
pointers, in my experience, which can be kinda fun.
I also like large heaps / soups of data that points to one-another. Structs
thrown in a pile with pointers to each other. It's great! So long as those
pointers can also point back, and you can properly trace how data flows
through the system... That's the hard part, I think.
trees though... You can start by just saving a "next / previous" with one or
both being arrays of pointers to the next or previous entries. Note: plural,
entries. That's the fun part - non-linear trees teehee
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════════════───────────────────────────┘
--- #15 fediverse/1246 ---
═══════════════════════════════════════════════────────────────────────────────────
@user-883
hehe if I don't understand how it works it's difficult for me to use things.
My Linux friends get so exasperated with me because I'm like "cool script
gimme like 2 days to figure it out" and they're like "bro just use these
flags" and I'm like "no"
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════───────────────────────────────────┘
--- #16 messages/1170 ---
════════════════════════════════════════════════════════════════════════════════───
look, it's easy enough to solve bitrot. Just store three copies of the file
and synchronize them everytime you open them. Like, an in-software raid array,
except with less expense because a .png is what, 2mb? great, now they're 6mb.
Nobody will notice except people who really should be buying more hard drives.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═════════════════════════════════════════════════════════════════════════──┘
--- #17 fediverse/1614 ---
════════════════════════════════════════════════════───────────────────────────────
wondering if anyone's ever made a computer that could only run programs
written in interpreted languages. Like, no binaries allowed. Would probably be
slower, but if my iphone is good enough for NASA to get to the moon then odds
are it's good enough for me.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═════════════════════════════════════════════──────────────────────────────┘
--- #18 fediverse/4218 ---
═══════════════════════════════════════════════════════════────────────────────────
there are plenty of pieces of linux that are insecure in some way. Including
x11, if I remember correctly. It is purely convention to not abuse these
insecurities, and whenever you use someone else's binary software you trust
that they won't betray you in some way.
pre-built binaries are privacy violations and should be illegal. They are
security threats because the model they're built upon is necessarily insecure.
Computers will never be completely secure because of how they are built, and
so we should use locally compiled software and interpreted scripts.
Unless they're too long, or impossible to read. Who reads EULAs these days? At
least those are written in english.
maybe computers aren't worth it. Maybe computers will solve all our problems.
Who can say, maybe you should ask an oracle like me
though do remember that anything you hear can and will be used against you,
monkey's paw style. So maybe, like... don't? unless you're into magic or
schizophrenia or something
I wnt 2 be cute and tch cpus
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════════════════───────────────────────┘
--- #19 fediverse/5689 ---
═══════════════════════════════════════════════════════════════════════────────────
why don't we make large arrays of vram that are slightly slower because
they're farther on the circuit-board from their host and their reception at
the processing section has to be gated such that they all enter to be
processed at once.
like that one infinite scrolling XKCD cartoon where the things move from one
screen to the other simultaneously assembly line style.
[fail safes. https://xkcd.com/2916/#xt=7&yt=35 ]
if we all feel like we're doing nothing, we'll all grow tired of it and decide
to do some prevailing. gosh I wish I wasn't so useless is code for
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════════════════════════════───────────┘
--- #20 fediverse/653 ---
═════════════════════════════════════════════──────────────────────────────────────
there's a difference between designing software and using software. Some
things can be made, and then saved for another day when their implementations
may be accomplished more ethically. It's okay to say "let's leave this as
'okay' and work on the next thing we've chosen."
Check out this piece of C code I wrote last night:
it doesn't compile, it's not finished, but I wrote it as-is
[pretend like it was called "main.c" instead of "main.txt" - had to change it
because mastodon thinks it's an invalid file]
[actually .txt didn't work, try .png]
[hmmm it realized it wasn't a valid png file, okay try screenshotting the
code, there's only 300 lines]
[sure glad there's only 300 lines]
[too bad it won't let you send .zip]
[won't let me name it main.png, presumably because they already have a
failed-verified version on their machine. will rename to main-src.png instead]
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
|