• 5 Posts
  • 918 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle




  • So… public shopping post Covid? So many people act “feral” now.

    I wish this amalgamation of various shoppers was pure fiction and not almost the norm now.

    What do you mean my snarling uncontrolled dog can’t urinate in the cart at the checkout line? And where’s that cashier? Why do I have to wait? Don’t they know I have to get back before Olsteen’s special service comes on? These kids are so lazy… why doesn’t anybody do their jobs anymore!?!



  • I see a lot of good answers here but let’s try it from another angle.

    How do we get randomness from a function or formula?

    For starters let’s setup a few simple rules.

    Every time our random function is called we’ll

    • Take the last output from a variable we call LAST_RESULT
    • If there’s no value in LAST_RESULT we’ll assume the value is 1
    • We run a set of calculations storing the value in a variable we call X
    • We store the result of these calculations in LAST_RESULT
    • We return this new “random” number.

    So let’s call it.

    > Random()
    Since LAST_RESULT is undefined SET LAST_RESULT to the value of 1
    Set X to the result of this calculation 
       (LAST_RESULT+1) * 3
    

    X is now 6

    Set X to the result of this calculation
       (X + 7) / 2
    

    X is now 7

    Set X to the result of this calculation (rounding to the nearest whole number)
       X/LAST_RESULT
    

    X is now 7

    Set LAST_RESULT to the value of X
    

    LAST_RESULT is now 7

    Return the value of X as the result 
    

    Result is 7

    Ok. So let’s call it again

     > Random()
    Set X to the result of this calculation 
       (LAST_RESULT+1) * 3
    

    X is now 24

    Set X to the result of this calculation
       (X + 7) / 2
    

    X is now 16

    Set X to the result of this calculation (rounding to the nearest whole number)
       X/LAST_RESULT
    

    X is now 2

    Set LAST_RESULT to the value of X
    

    LAST_RESULT is now 2

    Return the value of X as the result
    

    Result is 2

    And if we call it again we get seemingly random results

    Random() Result is 4

    Random() Result is 3

    But the next time you run it you’ll get the same results in the same order. 7, then 2 then 4 then 3

    So what you need is something to “seed” the random number calculation.

    Something like

    SetRandomSeed Set LAST_RESULT to the current second of the day

    Then when you call Random after this it starts with that as the prior results and gives seemingly random results.

    Of course my calculations are rough and probably fail/repeat after so many calls but it gives you an idea of how this works.

    So the trick is to get noise for the seed. That could be the number of non leap seconds since 00:00:00 UTC on Thursday, 1 January 1970 (Unix epoch)

    Or the temperature reading of a CPU chip.

    Maybe it’s the ratio of red vs yellow from a camera feed looking at lava lamps.

    Or the current users average typing speed.

    An additional note. Many of those would not be “cryptographically” secure for encryption because they can easily be determined by a third party. We all experience the same “Unix epoch” within a few milliseconds if our system clocks are properly set for example. Or monitored from afar and reproduced (hacked webcam shows they had just typed the following letters in the previous 27 seconds that we know the “algorithm” uses, etc.


  • I thought I’d add that it looks like it’s overextruded. So much that the filament is being “pushed” out and curling back around the nozzle.

    It could be the e steps, flow rate, etc but it could also be that your Z offset needs to be adjusted back away a smidge.

    That could be part of the inconsistent print since the tool head movement over one section of the bed vs another may be affected by the layer below based on how the filament curled there.

    If you want to do a deep dive into adjusting/calibrating the Ender I did write up a bit here (although that post does relate to Klipper and I mention settings/adjustments for Klipper it starts purely with the physical printer itself and builds on it)

    https://lemmy.world/comment/7904011






  • It has to be fixed in a tangible medium.

    In this case they’re not “fixing” their words and the final art is the created expression. Yet in this case their created expression wasn’t created by them but the program.

    In this case their combination is the palette and paint but the program “interpreted” and so fixed it.

    For example you can’t copyright a simple and common saying. Nor something factual like a phone book. Likewise you can’t copyright recipes. There has to be a “creative” component by a human. And courts have ruled that AI generated content doesn’t meet that threshold.

    That’s not to say that creating the right prompt isn’t an “art” (as in skill and technique) and there is a lot of work in getting them to work right. Likewise there’s a lot of work in compiling recipes, organizing them, etc. but even then only the “design” part of the arrangement of the facts, and excluding the factual content, can be copyrighted.





  • Roll for intelligence… 16. The progress of the one hit BEG killing spell is 33%

    <many turns later>

    Roll for intelligence… 3. The progress of the one hit BEG killing spell is 96%. That’s the only action you can take on your turn. You better hope the party can stop the army from hitting the power source of this spell before it finishes.

    Roll for intelligence… 5. Since that would be more than 100 the progress of the spell rolls back to 91%.