=== ANCHOR POEM ===
═════════════════════════════════──────────────────────────────────────────────────
┌──────────────────────┐
│ CW: Math │
└──────────────────────┘
@user-5 create an array of length 7 initialized to zero. then use a for loop
that loops 97 times and adds a random number between 1 and 20 to an array
index that iterates through the array each time through the for loop.
NOTE: be sure to also change the loop counter based on the random number too,
so you allocate exactly 97 points no matter what random number you get.
Oh and speaking of which if the loop counter
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════─────────────────────────────────────────────────┘
=== SIMILARITY RANKED ===
--- #1 messages/972 ---
═════════════════════════════════════════════════════════════════════════──────────
vibecoders write detailed instructions. "A for loop which iterates through all
of the elements" and not "a package manager that stores all of it's instants"
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════════════════════════════════─────────┘
--- #2 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 │
╘═════════╧╧════════════════════════════════════════───────────────────────────────────┘
--- #3 messages/412 ---
════════════════════════════════════════════════════───────────────────────────────
Coding superpower:
Start thread
While(true):
Run();
Then, whenever you want it to run something else, change the function pointer
that run() uses to call a function
At the end of the run() function, set the function pointer in the while loop
to the next one. That way you don't stack overflow from the recursion.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═════════════════════════════════════════════──────────────────────────────┘
--- #4 fediverse/4084 ---
═══════════════════════════════════════════════════════════────────────────────────
┌──────────────────────┐
│ CW: re: -mentioned │
└──────────────────────┘
@user-1074
the more you try, the more you have to calculate, which is a problem, because
endlessly recursive calculations create infinite loops, which frankly are
impossible to compute because they defy computation! Not good, not ideal, no
thank you, not for me, no thanks, not what I'd like.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════════════════───────────────────────┘
--- #5 fediverse/573 ---
═════════════════════════════════════════════──────────────────────────────────────
already spotted a bug. Should be for(1000 / MAX times) in the last example.
EDIT: Or, even better, increment that loop by +MAX instead of +1 each time
through.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #6 messages/110 ---
═════════════════════════════════════════════──────────────────────────────────────
The best way to program computers is to organize them according to their
relations. Like, when x increases by 4 then y increases by 2 - basically, a
math equation that you can continuously solve by calculating more and more
comprehensively and deeply.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #7 fediverse/2879 ---
══════════════════════════════════════════════════════─────────────────────────────
┌────────────────────────┐
│ CW: re: tech info-dump │
└────────────────────────┘
@user-1370
I love this a lot! I want to put function pointers in a "matrix architecture
array" and make them point to different functions at different points in the
program. I bet you could even point them at each other, so like if M and Y
then point at N, A, Y or something.
this is really cool I like stuff like this tomorrow I'll take pictures of
something similar I'm working on! I abandoned it tho hehe anyway remind me if
I forget!!
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═══════════════════════════════════════════════────────────────────────────┘
--- #8 fediverse/2363 ---
══════════════════════════════════════════════════════─────────────────────────────
Don't know what to do? Do anything at all, and odds are you'll either see an
opportunity to do something better or you'll have an idea.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═══════════════════════════════════════════════────────────────────────────┘
--- #9 fediverse/3760 ---
═════════════════════════════════════════════════════════──────────────────────────
DID YOU KNOW if you ask someone 15 times over the course of an activity
whether or not they're "having fun" then odds are they won't, in fact, have
very much fun
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════════════════─────────────────────────┘
--- #10 fediverse/6334 ---
╔════════════════════════════════════════════════════════════════════════════──────┐
║ a D&D rulebook can double as tarot if you need it. place one hand/bookmark │
║ at the start of a chapter, and the other at the end. flip to a page randomly, │
║ or randomly gain a percentage value from physical objects and then use that │
║ value to determine roughly where in the chapter you jump to. then, read words │
║ randomly, jumping back and forth, or try and divine some meaning from the │
║ words that are printed there. with D&D it's easy because you can say "ah I │
║ landed on the rogue section, that means this guy is probably pretty suave" │
║ (confirming your expectations) "hmmm, here's the rules for fatigue and │
║ drowning. maybe I need to take a break." (validating your unconscious │
║ decisionmaking) "oh neat, treasure!" (needs to explanation) but with other │
║ kinds of books it's usually better to pick the next-best word from the things │
║ your subconscious eyes can take in and process multi-laterally (you lost your │
║ audience, circle back) oh uh so if you wanna randomize it just put the words │
║ in the page in an array and pick one random. │
╟─────────┐ ┌───────────┤
║ similar │ chronological │ different │
╚═════════╧════════════════════════════════════════════════════════════╧════──────┘
--- #11 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 │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #12 fediverse/5979 ---
══════════════════════════════════════════════════════════════════════════─────────
whenever you call a function, just pass along the arguments that you don't
know what to do with yet. they'll surely be useful sometime. and, luckily, you
can always search for them from the past, and just insert a "store this value
in this random spot of memory and mark it as needed" then pass it along. used
something? think it's still useful? pass it along (suddenly, formulaic
stateless development, where everything is used until it's no longer needed,
then generated again in a cyclical time-loop cycle which echoes and
reverberates groundhog day but mostly a game-loop, which nobody will
understand unless you're a game dev. but now since I said game dev, anyone can
look it up, so like... not that one, but others like it.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═══════════════════════════════════════════════════════════════════────────┘
--- #13 fediverse/4470 ---
════════════════════════════════════════════════════════════───────────────────────
to be "rich" is to have more than another.
if you are happy, they are happiness poor.
if you have community, they are alone.
if you have serenity, they are chaotic.
I am rich in very little but fire in my soul.
I have enough in most cases, but I still struggle to pay rent.
I am warmed by the pearl my swirling darkness has coalesced into. It nourishes
me and keeps me aligned.
Never forget your purpose and your truth. It will not abandon you, so long as
you do so too.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═════════════════════════════════════════════════════──────────────────────┘
--- #14 fediverse/4628 ---
═════════════════════════════════════════════════════════════──────────────────────
user interface tips #18569235:
if a user is expected to click the same button multiple times in a row, for
example a "next" button in an image gallery, DO NOT move the interface from
below their mouse pointer and cause them to move their mouse in order to click
it again.
please don't : (
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════════════════════─────────────────────┘
--- #15 fediverse/898 ---
═══════════════════════════════════════════════────────────────────────────────────
┌──────────────────────┐
│ CW: scary │
└──────────────────────┘
if you set up a local LLM with the capability to explain basic coding syntax
and logic, then your parents computer suddenly becomes much more useful to the
nephew that's been forced to hide out there for a couple weeks until this all
blows over.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════───────────────────────────────────┘
--- #16 fediverse/572 ---
═════════════════════════════════════════════──────────────────────────────────────
Hi, I'm learning about semaphores right now and trying to explain them to a
friend. But I only sorta understand how they work - can anyone look at this
pseudocode and tell me if I'm on the right track?
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════─────────────────────────────────────┘
--- #17 fediverse/3226 ---
═══════════════════════════════════════════════════════────────────────────────────
if your man page is longer than a list of options and their usage and a
paragraph or twenty of how to use the software... then you need to abstract,
and break your code into multiple purpose-built applications.
do one thing, and do it right. alternatively, do one set of things, and do
them concisely.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════════════───────────────────────────┘
--- #18 fediverse/3680 ---
════════════════════════════════════════════════════════───────────────────────────
it's probably a good idea to write pseudocode, then real code, instead of
starting with real code, and bugfixing something incomplete and more difficult
to reason with.
unless you write real code easier than pseudocode. idk do what works for you.
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧═════════════════════════════════════════════════──────────────────────────┘
--- #19 fediverse/1934 ---
═════════════════════════════════════════════════════──────────────────────────────
@user-1109
do it in a random color each time! Here's my implementation for viewing txt
files colorfully:
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧══════════════════════════════════════════════─────────────────────────────┘
--- #20 fediverse/6120 ---
═══════════════════════════════════════════════════════════════════════════────────
┌──────────────────────┐
│ CW: AI-mentioned │
└──────────────────────┘
it's pretty easy to read an article or blog post, copy the text into a text
file, and forget about it.
you never know when you might want to use your computer's memories for
[entertainment during long dark nights, or for creating an AI buddy bot,
depending on how things go]
┌─────────┐ ┌───────────┐
│ similar │ chronological │ different │
╘═════════╧╧════════════════════════════════════════════════════════════════════───────┘
|