Jump to content
Banner by ~ Ice Princess Silky

Splashee

User
  • Posts

    15,544
  • Joined

  • Last visited

Blog Comments posted by Splashee

  1. I have been through a lot of the same things, except the boyfriend being bullies instead. The bullies at my high school, together with other uncontrollable life events, together with puberty (or the lack of it), and something just snapped.
    I usually get my panic attacks only once a year now, around the first hot days. I am fast enough to respond to it if I know it is a panic attack, but if it has been a long time, I might have forget and then it becomes a very difficult race to get the composure back. It isn’t easy. The medication that helped me when I was in high school had other side effects that weren’t helping my life, so I had to just remember how the medication blocked those impulses and manually try to block them. Easier said than done.
    Also my school nurse immediately detected that it was a panic attack. And that was in 1995. I was home from school for a year. I had to redo that school year, use medication that I first thought was placebo but as soon as I stopped using it, the panic attacks were there again, so it was obviously working. Eventually I was sent to a different school that dealt with troubled teens and family issues. From there, I could focus on myself (since everyone had their own drama to attend to) and not having to deal with my past. Sadly, I had to go back to my past again when that school was done. By then, the bullies were gone and my younger childhood friends had taken over, so it was all fun. This is also when the Internet become a thing, and that has become my modern life.

  2. 4 hours ago, Brony Number 42 said:

    I think you are incorrect. The above will be true if I have no food or no drink. So I am allowed to have one as long as I don't have the other.

    I am currently programming C so I had a chance to put this logic into test, but just so you know, C doesn't have booleans like C++ or JavaScript, so this is the test code:

    	signed int food = 1;
    	signed int drink = 1;
    	signed int result = (!food || !drink);

    Result became 0 after running this.

    And now, for the compiled (unoptimized) code (intel x86 assembler):
     

    												signed int food = 1;
    01011AAE  mov         dword ptr [food],1  
    												signed int drink = 1;
    01011AB5  mov         dword ptr [drink],1  
    												signed int result = (!food || !drink);
    01011ABC  cmp         dword ptr [food],0  
    01011AC0  je          1011AD4  
    01011AC2  cmp         dword ptr [drink],0  
    01011AC6  je          1011AD4  
    
    01011AC8  mov         dword ptr [temp],0  
    01011AD2  jmp         1011ADE  
    
    01011AD4  mov         dword ptr [temp],1  
    
    01011ADE  mov         eax,dword ptr [temp]  
    01011AE4  mov         dword ptr [result],eax  
    

    I just find it interesting to see how C compiles the logic into smaller components (very unoptimized because the use of a temporary variable).

     

    result will be 1 (true) for all combinations of 'them' (you are making me say 'food and drink' which will probably trigger your grammar correction :awwthanks:), except when both of them are set to 1 (true), in which case result will be 0 (false).

     

    • Brohoof 1
  3. 1 minute ago, Brony Number 42 said:

    I think you are incorrect. The above will be true if I have no food or no drink. So I am allowed to have one as long as I don't have the other.

    I’ll have to actually test this one when I get to my PC.

    It is one of the most difficult to understand, hence why I never program using the ! operator.

    • Brohoof 1
  4. Going back to JavaScript again since the rules are well documented, we have the so called short-circuit evaluation:
     

    Quote

    The logical OR expression is evaluated left to right, it is tested for possible "short-circuit" evaluation using the following rule:

    (some truthy expression) || expr is short-circuit evaluated to the truthy expression.

    Short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place). This happens because the value of the operator is already determined after the evaluation of the first operand.


    And then, not to forget the operator precedence:

    Quote

    The following expressions might seem equivalent, but they are not, because the && operator is executed before the ||operator:

    true || false && false; // returns true, because && is executed first
    (true || false) && false; // returns false, because grouping has the highest precedence


    I am not a true JavaScript person, but I do like rules, so these are quite fascinating to me! C/C++ may work differently here.

    if (!food || drink); // Won’t allow food as long as drink

    if (!food || !drink); // Won’t allow any

    if (!(food || drink)); // Won’t allow any

    • Brohoof 1
  5. On another point, it is quite difficult to get logic right. I don't blame people for taking shortcuts in their grammar. As a programmer, I have made quite a lot of mistakes on logic, the latest one was a JavaScript if-statement which caught me off guard since I thought it was going to yield something similar to my C++ programming, but it turned out I needed to be very specific with the and and or for that case. In C++ you get warnings if something you type is ambiguous, but JavaScript, it just lets you silently fail in disbelief until you find the issue.

    • Brohoof 1
  6. Makes me think of logic gates. People’s way of understanding others even when not spelled out correctly logically, is quite amazing.

    I read the A or B and C or D like a Dot Product, which I am usually very good at using parentheses with (when I don’t have to, since multiplication come before addition in priority). We like to group things together to make things easier and faster to write, and in the end, we do understand each other, kinda.

    • Brohoof 1
  7. Oh no ChatGPT noooooo :ButtercupLaugh:

    Quote

    This makes calculations involving angles more cumbersome, as conversion factors are required to convert between degrees and radians.

    We are basically talking about programming languages here and the input parameter is in radians, so obviously the conversion is more cumbersome when it is mandatory in the first place. Stay radians all the way, and it is easier, except it isn't. That's why programmers always convert using PI as a constant. We all say "90 degrees field of view" when programming 3D perspective projection, and not Half PI.
    It forces the programmer to specify an approximation of PI for every input to a trigonometric function, even if it expects values in the range of PI to -PI, where PI is unknown because of implementation. While (on the other hand) saying 90 degrees is exactly and always 90 degrees.

     

    Quote

    Another advantage of radians is that they simplify many mathematical formulas involving trigonometric functions, such as sine, cosine, and tangent. In fact, many trigonometric identities and formulas are most naturally expressed in terms of radians.

    Again, because of programming languages taking radians as parameters.

     

    Quote

    I can add to this that, for example, when using radians you can assume that sin x ≈ tan x ≈ x for small x.

    Why is radians better than degrees? The summery of ChatGPT says that it is better because it is preferred by a specific group of people (mathematicians), and that's why it is better. It is not the answer I was hoping an AI would come up with. Yes, but math is not about being close to, but to give exact results. For very small values, everything is close to 0 anyways.

     

    I love ChatGPT though! Make it speak in lolcat next time :ticking:

    • Brohoof 2
  8. Happy PI day! :Tempest:

     

    Radians are stupid is all I can say :yeahno:

     

    Spoiler

    Please @Silly Druid ask ChatGPT why radians are better than degrees.

     

    Internet is so full of texts like this:
    Why use radians:

    1. Pi is great
    2. Radians make it possible to relate a linear measure and an angle measure.

    While I still see a unit of Pi to be highly unstable since it is an irrational number constant. Doing a linear arithmetic operation would lead to extreme precision loss the further you wrap around the circle, not to say 2Pi is horrible already.

     

    • Brohoof 2
  9. In the analog world, like old TVs and Telephones, information was broadcasted or sent as an electronic waveform, usually not recordable, had loss of information, but had room for almost infinite information (like with real numbers).
    In the digital domain, the loss of information is not an option. The moment you choose to lose bits, you are emulating analog data using digital bits, and there is information loss. JPEG is a typical proof of this, where a lot of information is lost in favor of saving storage space, but because the frequency domain is easily for us humans to reconstruct in our minds, missing information is acceptable here, so it is the winning method of storing data. That means that the brain in us humans are keeping the necessary lost information so it doesn’t have to be stored as bits. Does the 3 cards example work without the human brain? Try it with some animal that doesn’t understand cards or colors the same way humans do.

    I have a 300 MB hard drive that can store this and that much information, but I also have a brain that remember new constructed information from that data on the hard drive. Our brain has the buffer to calculate the loss of information, which is addition of bits required to store information. We can reduce information by using already calculated information.

    The example with the cards need to be completely separated from the human factor of remembering information like a buffer or RAM cache in a computer.

    I do have a fair collection of old telephones where there are 3 toggle buttons for special functions. They need to be “toggle” to work, since the toggle action is the state that needs to be remembered. Newer telephones had no mechanical toggle in their buttons, and the information is directly lost after a press, unless the toggle of the state is stored somewhere else (in this case, in a relay or cross switch, or a modern computer’s RAM).

    The information of the lost bit is stored somewhere else.

    • Brohoof 1
  10. Different ways to store information in binary using a fixed amount of digits for constant information:

    001 = black, black, red
    010 = black, red, black
    100 = red, black, black

    Another:

    01 = black, black, red
    10 = black, red, black
    11 = red, black, black

    Yet another:

    00 = black, black, red
    01 = black, red, black
    10 = red, black, black

    Having information less than a bit rounds up a bit unless exact number of bits can be represented, so ceil(log2(3))

    • Brohoof 1
  11. Certainly one bit is the smallest bit of information that can be stored/shared, however, photons are the smallest possible packets of electromagnetic energy, and I don't get the plural of "photons" and "packets", so I would say the smallest bit of information is a bit that can contain packets of information.

    I have written compression algorithms before, and I know that the parity situation of a bit can be used as information, as in, if one bit doesn't exist, it can mean that more bits exists, otherwise, that bit is the only bit. So one bit controls more than one bit of information.

     

    EDIT: Just to not confuse, one bit is the existence of electricity, while a non-bit or a '0' in this case, is "nothing". So "nothing" in this case becomes information because it was "nothing".

    In the very end, I would say that one bit position is the information, and not the bit itself.

    • Brohoof 1
  12. 2 minutes ago, RDDash said:

    Is the value of S

    So S in this case is ∞?

    There are many ways to reach ∞, but like with the divide by 0 situation (on the positive side of the number line), 1/0 = ∞ and 2/0 = ∞, so 1=2.

     

    5 minutes ago, RDDash said:

    So that would mean that 1 is the same as -8S

    I didn't see a sign switch. Addition and multiplication cannot change the sign of a number.

    I am probably missing the point here. It is too complex for me.

    • Brohoof 1
  13. On 3/7/2023 at 12:00 PM, Silly Druid said:

    the growth from 84 to 482

    Yes, I have noticed that. Same with all the different curve data. I have to try to find as much info as possible to try to solve what they were trying to do. I am quite sure it has to do with 3D perspective, making things farther away get smaller quicker (larger values in this case means the curve bends quicker, acting like you see it father away in the distance, maybe)

     

    15 hours ago, RDDash said:

    It's just another way for the mathematicians to lie to others and still be correct.

    I so want to agree with this (in general about mathematicians).

    • Brohoof 2
  14. @Silly Druid Kinda off topic but still, if I gave you a list of number in sequence, like these:

    7
    6
    7
    7
    7
    7
    8
    8
    9
    10
    11
    13
    14
    18
    22
    30
    46
    84
    482

    Would you be able to find a close match making a quadratic function graph?

    These values are used to create a bend/curve in an old racing game, and the way the numbers were generated are unknown. The 7 to 6 to 7 looks like a rounding to integer situation, meaning the original numbers were real numbers. The steps between them don't need to be exact, but the curve they generate have a particular look when transformed into a pseudo 3D view.

×
×
  • Create New...