Jump to content

FragmentedCurve

Senior Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by FragmentedCurve

  1. 12 minutes ago, dimreepr said:

    I'm pretty sure that if you remove a latched on tick, it's a dead tick.

     

    Did you, smoke some wicked weed or eat a red and white mushroom?

    It wasn't latched.

    And no... I don't smoke anything...

    33 minutes ago, geordief said:

    Exactly.

    I'm not here for ethics (despite my avatar).

  2. While browsing around "Amateur Science" topics, I was reminded of an experiment I did a while ago. Whenever I'd go hiking with friends, especially one particular friend, I'd come out of the woods and he'd never have a single tick on him. I often wondered if ticks somehow choose a preferred host. 

    So, one day after hiking, we took the tick that was on me and did a small experiment. We sat between two to three feet apart on a wood floor and placed the tick in the center of us. We would then wait to see who the tick would walk to. After he within a couple inches of our body, we would change our positions and orientation and put the tick in the center again. The result was 10 out of 11 times the tick walked to me.

  3. fun_list3 = [lambda e: e + i for i in range(5)]

    The variable i is outside the scope of the lambda function. Let's rewrite the above to make this clearer.

    fun_list3 = []
    for i in range(5):
        fun_list3.append(lambda e: e + i)

    This will produce the same list you wrote but is more explicit about what's going on. The variable i in your lambda function is referencing the i variable from the for loop. It's not doing what you think, which is inserting the value of i over each iteration. The i in your lambda function and the i in the for loop are pointing to the same place in memory. You can see this by doing the following:

    Python 3.8.5 (default, Sep  5 2020, 10:50:12)
    [GCC 10.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> fun_list3 = []
    >>> for i in range(5):
    ...     fun_list3.append(lambda e: e + i)
    ...
    >>> print([f(10) for f in fun_list3])
    [14, 14, 14, 14, 14]
    >>> i = 555
    >>> print([f(10) for f in fun_list3])
    [565, 565, 565, 565, 565]
    >>>
    

     

    You can do what Sensei said above, but that will introduce an optional argument for each of the lambda functions in the list. For example,

    Python 3.8.5 (default, Sep  5 2020, 10:50:12)
    [GCC 10.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> fun_list3 = [lambda e,f=i: e+f for i in range(5)]
    >>> print([f(10) for f in fun_list3])
    [10, 11, 12, 13, 14]
    >>> print([f(10, 555) for f in fun_list3])
    [565, 565, 565, 565, 565]
    >>>
    

     

    I personally would do the following which is have a lambda function that takes i as its argument and  returns another lambda function.

     

    fun_list3 = [(lambda f: lambda e: e + f)(i) for i in range(5)]

     

    Python 3.8.5 (default, Sep  5 2020, 10:50:12)
    [GCC 10.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> fun_list3 = [(lambda f: lambda e: e + f)(i) for i in range(5)]
    >>> print([f(10) for f in fun_list3])
    [10, 11, 12, 13, 14]
    >>> print([f(10, 555) for f in fun_list3])
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<stdin>", line 1, in <listcomp>
    TypeError: <lambda>() takes 1 positional argument but 2 were given
    >>>
    

     

  4. As Strange pointed out, understanding the concepts of algorithms, data structures, and design patterns is far more important than learning a specific language. However, I'd like to append the following to that. I'm assuming you want to learn how to program because of some curiosity drive deep down and not purely for filling out a job application. Whatever kind of software has caught your passion at the moment, look at what the developers use to build it. For example, if you're daydreaming about building kernels and bootloaders, look at what languages and tools the developers of Linux, FreeBSD, or Windows use. Are you dreaming up websites? Look at what the developers of stackoverflow or reddit use. Whatever it is, you can use that as a starting point.

  5. On 5/20/2019 at 6:12 AM, studiot said:

    Fragmented curve we are geeting further and further away from your original intention.

    My apologies, but that is the price you pay for posting in a fundamnetal science part of the forum rather than applied (engineering).

    No apologies are needed. These are exactly the kind of discussions I was hoping to stimulate. Given that I am more rusty than Carrock, I feel like I don't have a lot to contribute. I'm reviewing material and trying to answer my own questions before coming back here and naively pushing them onto you.

     

    On 5/20/2019 at 6:12 AM, studiot said:

    Yes we can cool the air, and since in removing some heat, that heat has to go somewhere some of it could be converted to electricity.

    But whether your idea is viable is an engineering question, not a fundamental science question.

    Fundamental science in the guise of thermodynamics tell us that we need to spend energy to remove some heat from the air. 

    I have a heat pump which does just this, but it is run by electricity. At this time of year the heat I get out is equivalent to a little over 3 times the electrical energy I use in the machinery.

    But the heat I get out comes out in the form of hot water not electricity.

    It is theoretically to use this hot water to drive an electrical generator, but I would get significantly less electrical energy that the heat energy I use.
    And I want the hot water.

    I know it wouldn't produce a lot of electrical energy. Also,  electrical energy isn't a requirement either. The reason I mentioned electrical energy is because its probably the most useful form of energy for practical purposes. But the end result doesn't matter much as long as its somewhat more useful than the input (the hot air). The point behind my post was about structuring a material that would be able to excite an electron on a chlorophyll-like molecule by only the kinetic energy of gaseous particles alone.

    I just realized why I'm having trouble communicating my response. There's really two parts to my inquiry. The first part is about constructing such a material. The second part is what are the effects of such a material on the temperature of a gaseous body. The thoughts about air conditioning were just the catalyst for thinking about the chemistry and physics of this situation.

    I attached a poorly drawn conceptual diagram. So the green particles hit A at the same time causing enough energy to be transferred to B and excite B's electron. Which laws of nature stop A from successfully exciting B's electron?

    On 5/20/2019 at 6:12 AM, studiot said:

    There is no such thing as a free lunch in this universe. 

    I hope I did not come across a someone looking to convert heat with 100% efficiency or worse (someone looking for free energy).

    airthread.png

  6. 1 hour ago, studiot said:

    John is quite right what you propose would breach the Laws of Thermodynamics.

    Additionally light energy is not the same as heat energy, which is why there is not an equivalent heat to chemical energy converter, as there are light to heat converters and light to chemical (potential) energy convertors.

    Thermodynamically energy comes in various grades or a heirarchy with heat energy the bottom of the heap.

    The use of energy requires converting energy from a higher form to a lower form and all forms eventually end up as heat.

    These facts are embodied in the zeroth and second laws of thermo.

     

     

    Okay, thank you.

  7. I am not a chemist nor a chemistry major. My background is in mathematics and CS. However, when I was majoring in mathematics, I enjoyed chemistry very much and spent a lot of time studying it on the side. Years later I find economics pulling me far away from anything that gave me meaning. Because of this, I've recently been returning to things that gave me a reason to wake up in the morning. The point of me saying all this is to warn you my rhetoric and understanding may be crude when it comes to chemistry.

    Back in college, when I was taking an inorganic chemistry course, I was daydreaming about gases and air conditioners and wondered why we spend energy to remove energy from the air. Couldn't we convert the kinetic energy in the air to cool down a room? I discussed this with the professor but she didn't have a lot to say about it. Then, I was thinking about chlorophyll and how specific parts of the light spectrum will hit it causing the electron (from the Mg atom I think) to become excited, converting that energy into chemical energy. Why can't a molecule do this for the kinetic energy in the air? From a user point of view, there would be a material on the wall, and the more material that is uncovered and exposed to the air, the more heat in the air would be converted into electrical energy. So the temperature of a room would be controlled by how much of the material is exposed.

    Extending the crux of the idea a little, maybe the material would consist of layers. So the top layer would be an amplifier, to hit the chlorophyll-like molecule with enough force to excite the electrical energy. So, if 3 gaseous particles hit an amplifying molecule on the top layer, it redirects the impact from all three into a single point. The end goal of the material is to convert the heat in the air to electrical energy and store it somewhere else.

    Besides the material not existing, is this absurd? Is there any merit in this line of thought? What are your thoughts?

  8. Testing

     

    [math]\sum_{i=1}^{n} i = \frac{n(n + 1)}{2}[/math]

     

    This is inline [math]f(x) = x^{2}[/math].

     

    The LaTex isn't rendered when previewing a post.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.