Hacker Newsnew | past | comments | ask | show | jobs | submit | Ono-Sendai's commentslogin

When you have done enough C++ you don't need to fire up compiler explorer, you just use local variables to avoid aliasing pessimisations.

I also wrote about this a while ago: https://forwardscattering.org/post/51


I think this might not be a shortcoming of MSVC but rather a deliberate design decision. It seems likely that MSVC is failing to apply strict aliasing, but that it's deliberately avoiding it, probably for compatibility reasons with code that wasn't/isn't written to spec. And frankly it can be very onerous to write code that is 100% correct per the standard when dealing with e.g. memory-mapped files; I'm struggling to recall seeing a single case of this.

AFIK MSVC has never implemented TBAA by design.

TBAA = type-based alias analysis

I find this distasteful:

  cities  = %w[ London
              Oslo
              Paris
              Amsterdam
              Berlin ]
Do it properly with quotes you lazy people :)

EDIT: typical ruby (on rails) code: saves a few characters, breaks readily (Hint: consider "New Orleans")


Relative to what? Relative to modern OpenGL with good driver support, not much probably. The big win is due to the simplified API, which is helpful for application developers and also driver writers.


Substrata: https://substrata.info/

https://x.com/SubstrataVr

Open source metaverse. Just added rideable jetskis!

Written in C++ and OpenGL. Works on the web as well via Emscripten, WASM and WebGL.


Neat idea. What is the controller latency like when using a mobile phone?


The platform uses WebRTC for connections so in the best case scenario (direct peer-to-peer connection): somewhere between 2-10ms. When direct connection is not available, 20-100ms. In really bad network conditions with VPN's in use: 100-300ms. Though usually the latency is not really visible in the games even if there would be larger latency with some players :)


Substrata - an open-source metaverse

https://substrata.info/

In particular hardware-accelerated video playback, and adding Portals.


not sure why you are being downvoted. That 'explanation' of Rayleigh scattering is just wrong.


Because that explanation is expected to be wrong. This is a partially trained tiny model, Andrej shared that obviously incorrect explanation to emphasize that the model is not trustworthy or useful at that stage.


Downvoted for being obvious in context / missing the point and getting worked up about it. He even said it's like talking to a kindergartener.


I think you are confused about what 'simply connected' means. A 3x3 matrix can represent any rotation. Also from a given rotation there is a path through the space of rotations to any other rotation. It's just that some paths can't be smoothly mapped to some other paths.


SO(3) contains all of the orthogonal 3x3 matrices of determinant 1.

If you are dealing with rigid bodies rotated though the origin like with the product of linear translations you can avoid the problem. At least with an orthonormal basis R^3 with an orthogonal real valued 3x3 matrix real entries which, where the product of it with its transpose produces the identity matrix and with determinant 1

But as soon as you are dealing with balls, where the magnitude can be from the origin to the radius, you run into the issue that the antipodes are actually the same point, consider the north and south poles being the same point, that is what I am saying when the topology is not simply connected.

The rigid body rotation about the origin is just a special case.

Twist a belt twice and tape one end to the table and you can untwist it with just horizontal translation, twist it once (360deg) and you cannot.


The belt trick is about smoothly mapping paths through SO(3) to each other, not about if any point in SO(3) is reachable from any other point. I think you are confusing the notion of 'simple-connected' with just 'connected'.


No, the belt trick is about the fundamental group of SO(n) where n>2 is Z_2and the fact that a 4pi rotation is homotopic to the identity.

It is often introduced as RP^3 being isomorphic to SO(3) and as RP^3 is not simply being connected thus SO(3) cannot be.

They don’t explain why until students have the ability to deal with 4D 3-spheres being projected on 4D hyperplanes.

You can build an intuition with a 2-sphere being projected through the origin onto a 2d plane. This will demonstrate how the antipodes are not uniquely identified.

If you go from SU(2), which is the double cover of SO(3) you can use basic algebra to reduce it to a^2+b^2+c^2+d^2=1 where a,b, and c are your free variables and figure it out.

It works well without that complexity at lower levels because people are actually rotating the clopen set, which is only allowed to be the entire body or the empty set.

The 4pi symmetry applies to the topological properties of neurons and the plate trick in the real world because you are translating a portion or a property of the body and not the entire body.

Same thing on how they don’t introduce Tori topology when using Euler angles.

Pick up basically any topology or Lie algebra book targeted at first year grad students and the topic will be covered.

Bredon’s Topology and Geometry is one I personally like.


I should add that “connectedness” is a local property that has to be everywhere.

The antipode pairs don’t have unique identities they are identified together, but IIRC they are never close enough to break that local condition of connectivity.

You could use the unit circle and a line at x=2, connecting points of that line through the origin and see how that identification of two points on the unit circle happens with that one line.

That may help but it wouldn’t explain the issues with so(3) that results in a 720 deg rotation being equivalent to a 0 deg rotation.

It would explain the point at infinity concepts as the poles are indescribable with a line from X=2 through the origin.


Cool. If you want to try rendering some flame fractals, you can try our Fractal software Chaotica (https://www.chaoticafractals.com/) which was used to make the first image in the linked post (Vorpol Dawn By technochroma).

We didn't exactly use compute shaders for Chaotica, we used OpenCL instead, which is a more general GPGPU framework like CUDA.


Fractal creative method of choice >^•¥•^<


Honestly, this is such a good rewrite of Apophysis. Congrats to you all for bringing back some happy memories.


Oh hey Nick, fancy seeing you here :)


That's wild. My 9950X died for some reason, never overclocked.


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

Search: