Hacker Newsnew | past | comments | ask | show | jobs | submit | Extigy's commentslogin

One of my favourite features of Fortran is in its array implementation. You can index arrays however you like.

Do you like your initial value to be at index 1? Cool. Prefer to index arrays from 0 instead? Sure, go ahead.

How about an array with indexing symmetric around zero?

    double precision :: arr(-100:100)
Beautiful!


Pascal derived languages also enjoy this capability.

Your example across most of them is something like:

    type 
        precision = array [-100..100] of double;


Arrays are actually not part of Fortran’s type system; neither are pointers. These are attributes of variables and components, instead.

And the language has some nasty pitfalls for users (and some nonportable cases due to bugs in some compilers) with non-default lower bounds. A simple assignment statement like A=B might change the bounds of A, but A=(B) and A(:)=B cannot. It’s best to avoid non-default lower bounds in general.


As described on the linked article....


I wrote it.


Great, it isn't as if I pay attention to the nicknames and the authors of the articles, and your reply was formulated in a way that came for as if was someone replying to me without having read the article, hence why I replied like that.

Interesting article.


That section is recommended but not required for a conforming implementation:

> 9. Recommended operations

> Clause 5 completely specifies the operations required for all supported arithmetic formats. This clause specifies additional operations, recommended for all supported arithmetic formats.

Hyperbolic tan is in the list of recommended functions, and yet: https://github.com/numpy/numpy/issues/9187


>That section is recommended but not required for a conforming implementation:

Who cares? The C standard for math.h requires these functions to be present as specified. They are specified to round correctly, the C standard specifies them to be present as specified, therefore the C standard specifies them as present and correctly rounded. I literally quoted the relevant sections, there are no conforming C specification which give different results.

>Hyperbolic tan is in the list of recommended functions, and yet: https://github.com/numpy/numpy/issues/9187

Any evidence whatsoever that this is caused by two differing implementations of tanh, which BOTH conform to the IEEE 754 standard?

Everyone is free to write their own tanh, it is totally irrelevant what numpy gives, unless there are calls to two standard confirming tanh function which for the same datatype produce different results.


> The C standard for math.h requires these functions to be present as specified. They are specified to round correctly, the C standard specifies them to be present as specified, therefore the C standard specifies them as present and correctly rounded. I literally quoted the relevant sections, there are no conforming C specification which give different results.

Forgive me, but I cannot see that in the document sections you point out. The closest I can see is F.10-3, on page 517, but my reading of that is that it only applies to the Special cases (i.e values in Section 9.2.1), not the full domain.

In fact, my reading of F.10-10 (page 518) suggests that a conforming implementation does not even have to honor the rounding mode.



Since this is using fetch/XHR under the hood, I guess requests from the browser are restricted only to same-origin URLs or servers responding with permissive CORS headers?


Correct! The examples we used were making requests to httpbin.org, but I also was able to query GitHub's API :)

`data = urllib3.request("GET", "https://api.github.com").json()`


Perhaps Illumos is particularly well suited for a Hypervisor/Cloud platform due to work upstreamed by Joyent originally for SmartOS?


I love my lava lamp. I use it as the light for my bedside table.

I’m too young to have seen the craze the first time around, but for me they are the ultimate nostalgia object. You see, lava lamps take me back to being a young child visiting The Gadget Shop with my father. He knew I liked the place, so every time we travelled into the city centre together we’d visit. The place was small, but packed full with the sounds and flashing colours of the gadgets within.

The central island would always have a sales assistant behind it demonstrating this or that. A miniature blimp, effortlessly floating above us. A skilled performance with light-up juggling balls or advanced yo-yo tricks. A remote control car, driven and flipped onto its back to return the way it came. I vividly remember the tickling feeling brushing my hand over the tips of a fibre optic lamp on display, with its twinkling light at the end of each fibre.

All around the outside of the shop were wall to ceiling shelves, full of trinkets protected with panes of glass. Plasma globes flickering and buzzing with mysterious electrical power. A row of chrome perpetual motion toys each moving slowly and gracefully, dancing its own dance. Glow in the dark decorations illuminating with their curious green-white light. The rhythmic click-clack-click sound of a Newtons Cradle ticking away the seconds on a shelf somewhere.

And, of course, the rows and rows of lava lamps on display. A multitude of different colours of bulb, liquid and lava. Some had glitter inside, rather than wax, but to me they just weren’t the same. I could have sat and watched the spheres of lava split and recombine together for hours. But alas, it was time to go home.

I still live in the same city. I would love to share the same memory with my own children one day, but The Gadget Shop is unfortunately no more. It seemed to dissapear around the late 90s. What I loved about the place was how analogue and tactile everything was. Any item could be removed from the shelf and interacted with. In my memory, there were no digital gadgets there at all. Though, I could have simply forgotten about them.

There are similar shops around now, but they don’t spark that same joy in my soul. Sure, they have the odd remote control car or mini toy drone on display… but the torrent of lights, colours and sound is gone. Replaced by rows of boxed collectible plastic figurines or, what feels to me, like branded tat.

Sometimes I wonder if perhaps it’s not the gadgets that have changed, but instead I have just grown up. Whenever this happens, I stop and watch my lava lamp for a little while. Without fail, it always invokes the same sense of wonder I felt as a child in The Gadget Shop, and takes me back to my fond memories of the time spent there with my father.


I love this comment. I'm only 25 but had similar experience with shops around the city with lava lamps, those things really fascinated me when i was little. And your comment was beautiful it reminded me about those feelings


Thanks for that beautiful comment. It unlocked some jumbled memories of my own childhood.


> Sometimes I wonder if perhaps it’s not the gadgets that have changed, but instead I have just grown up. Whenever this happens, I stop and watch my lava lamp for a little while. Without fail, it always invokes the same sense of wonder I felt as a child in The Gadget Shop, and takes me back to my fond memories of the time spent there with my father.

When I feel the corporate enshittification becoming overwhelming, I use Dungeon Master IIGS, Bards Tale IIGS (and other pixelly classics) for this. Felt like magic growing up with all the exploration and secrets to uncover.


There’s a non-paywall version on arXiv: https://arxiv.org/abs/2308.09083

The paper you mention is indeed cited.


"A series of these units may be built on an integrated circuit with each using a space of less than 0.1 square microns, with the potential to produce a significant power density."

Huh. Is this for real? Most of the discussion assumes an ideal diode. Real diodes have diode drop. All this is powered by very small fluctuations, right. They'd have to overcome the diode drop.

(There is a real component called an "ideal diode", which is a power MOSFET with control circuitry to turn it on when the voltage is higher in the forward direction. MOSFETs have ON resistances in millohms, which is better than diodes can do. Often used with solar powered battery chargers, large DC-DC converters, etc. Not sure that applies here.)


It can happen, the Pólya conjecture is the usual example which holds until n = 906150257.

Another fun one I just found is the statement “n^17 + 9 and (n + 1)^17 + 9 are relatively prime”. The first counterexample is at n=8424432925592889329288197322308900672459420460792433.


How does one even find something like this? Let alone prove that this is the first counterexample. That number looks to be in the order of the age of the universe in millionths of a quectosecond!!


You can’t have a post about SDF without linking to iq’s incredible articles [1].

See also “Rendering Worlds with Two Triangles” [2], which is such a wonderful title for describing these techniques.

[1] https://iquilezles.org/articles/

[2] https://iquilezles.org/articles/nvscene2008/rwwtt.pdf


Thanks Dang! Appreciate all the work you put in!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: