All posts by admin

5 visual storytelling tricks that make Alfonso Cuarón a master

Alfonso Cuarón is a master at weaving visual storytelling into the fabric of his films. His unique style combines striking imagery with compelling narratives, creating an immersive experience for viewers.

This distinctive approach has set him apart as one of the most innovative directors in the industry. Through his work, Cuarón continues to push the boundaries of filmmaking, inspiring both audiences and fellow creators alike.
https://www.newsbytesapp.com/news/entertainment/alfonso-cuaron-s-visual-storytelling-style-5-must-know-elements/story

Europe woos US researchers fleeing Trump’s visa restrictions, funding cuts

A recent surge in applications for a multimillion-euro program by the European Union’s top research council has highlighted a significant trend among researchers.

There has been a fivefold increase in US-based researchers eager to relocate their work to European institutions. This rising interest underscores Europe’s growing appeal as a hub for cutting-edge research and innovation.
https://www.newsbytesapp.com/news/business/europe-woos-us-researchers-with-millions-in-fresh-grants/story

‘The Crown’s guide to understanding royal image shifts

The Crown, a popular Netflix series, offers an intriguing look into the life of the British royal family.

The show delves deeply into the personal and public lives of the royals, exploring how they have been perceived by the public over the years. Through its detailed storytelling, The Crown provides viewers with a unique perspective on the challenges and complexities faced by the monarchy.
https://www.newsbytesapp.com/news/entertainment/how-the-crown-depicts-royal-public-perceptions/story

Meta will use your private AI chats to serve ads

Meta has announced new plans to utilize conversations with its AI chatbot for ad targeting purposes.

This means that interactions users have with the AI will be analyzed to deliver more personalized advertisements. The move aims to enhance ad relevance and improve user experience across Meta’s platforms.

However, this development also raises important questions about privacy and data security, as more personal information may be leveraged for advertising. Meta has yet to provide detailed information on how they will handle user data in this context.

As AI technology becomes increasingly integrated into social media, users and experts alike are closely watching how companies balance innovation with ethical considerations.
https://www.newsbytesapp.com/news/science/meta-will-use-ai-chat-interactions-to-target-ads/story

3 Things WWE can do to combat Andrade signing with AEW

Former WWE star Andrade made a shocking return to AEW on the sixth anniversary of the Dynamite episode.

His unexpected appearance caught fans by surprise, adding an exciting twist to the milestone event. Andrade’s return has sparked discussions across the wrestling community, signaling a potential new chapter in his career within AEW.
https://www.sportskeeda.com/wwe/3-things-wwe-can-combat-andrade-signing-aew

Pandit Chhannulal Mishra Dies At 89 In Mirzapur; Legendary Singer Had Asked Family Not To Place Him On Ventilator

Padma Vibhushan awardee and legendary semi-classical singer Pandit Chhannulal Mishra passed away in the early hours of Thursday, October 2. He breathed his last around 4:30 am at his residence in Mirzapur, Uttar Pradesh. He was 89 years old.

His final rites will be performed in Kashi, and preparations are underway to bring his mortal remains to Varanasi. According to several media reports, his younger daughter, Dr. Namrata Mishra, stated that Pandit Mishra’s health worsened late on Wednesday night. He was rushed to the hospital but was declared dead by doctors around 4:30 am.

His only son, tabla maestro Pandit Ramkumar Mishra, left Delhi for Varanasi by road, as he could not get a flight ticket immediately. He is expected to reach the city by Thursday evening.

Pandit Mishra, regarded as the last prominent semi-classical singer in the league of Girija Devi, had been battling multiple health issues over the past few months. On September 11, his condition deteriorated significantly. A 15-member medical team from Mirzapur Medical College began treating him at his residence in the Mahant Shiwala area.

His blood sugar levels had spiked, and his hemoglobin dropped to a dangerously low level. Despite intensive medical treatment, including blood transfusions at Ramakrishna Mission Hospital in Mirzapur, his health continued to decline.

On September 12, doctors confirmed his hemoglobin had dropped to 7.6, causing severe pain and other complications. He was later referred to Sir Sunderlal Hospital at Banaras Hindu University (BHU), where doctors initially suspected a heart attack. However, tests ruled this out.

Pandit Mishra was diagnosed with Acute Respiratory Distress Syndrome, a serious lung condition, and was placed on non-invasive ventilator support. He also suffered from Type-2 diabetes, high blood pressure, osteoarthritis, and prostate enlargement. Prolonged illness had caused bedsores that led to septicemia (blood infection).

Doctors at BHU advised his family on September 15 to take him home when his condition failed to improve. Pandit Mishra had earlier expressed that he did not want to be placed on a ventilator, and his family honored his wishes.

After 13 days of treatment at BHU, he was discharged on September 26 and taken back to Mirzapur in an ambulance by his daughter.

Pandit Chhannulal Mishra was a legendary Indian classical and semi-classical vocalist from the Banaras (Varanasi) gharana. He was celebrated for his command over khayal, thumri, dadra, chaiti, kajri, and bhajan singing.

Born in 1936 in Ballia district, Uttar Pradesh, he later settled in Varanasi. Pandit Mishra was known not only for his powerful and emotive renditions but also for preserving traditional Banarasi folk-based forms like Hori and Chaiti.

He performed extensively across India and abroad, enchanting audiences with his soulful music.

In recognition of his immense contribution to Indian classical music, he was conferred with some of the nation’s highest civilian honors, including the Padma Bhushan in 2010 and the prestigious Padma Vibhushan in 2019.

His legacy as a torchbearer of semi-classical music will continue to inspire generations to come.
https://www.freepressjournal.in/entertainment/pandit-chhannulal-mishra-dies-at-89-in-mirzapur-legendary-singer-had-asked-family-not-to-place-him-on-ventilator

Shanghai Masters boiled over with three stars involved in umpire rows

The Shanghai Masters has returned, with Jannik Sinner aiming to defend his title.

Last year’s tournament, however, was marred by numerous players arguing with umpires, casting a shadow over the competition.

As the event gets underway again, fans are eager to see if Sinner can maintain his championship form and if the matches will be free of controversy this time around.
https://www.mirror.co.uk/sport/tennis/shanghai-masters-daniil-medvedev-tiafoe-35991034

Something fishy about fried shark served in Indonesia’s free meals programme?

Over 6,000 students have reportedly come down with food poisoning since the launch of the nutritious lunch scheme in January. This initiative aims to cover more than 80 million children, pregnant women, and breastfeeding mothers by next year.

The cause of the food poisoning has been traced to contaminated fried tofu, chicken in soy sauce, and several fruit and vegetable dishes. However, administrators at a school in Ketapang attributed the outbreak to a dish of shark fillet with tomato sauce on the menu.

Critics have questioned the choice of shark meat, citing concerns over its potentially high mercury content and its suitability for feeding children. In response, authorities have issued a rebuttal.

Indonesia’s National Nutrition Agency Deputy Head, Nanik Deyang, explained that shark meat is a traditional part of the diet in that region, justifying its inclusion in the school meals.
https://www.scmp.com/week-asia/health-environment/article/3327576/fried-shark-served-indonesias-free-meals-programme-comes-biting-criticism?utm_source=rss_feed

The biggest semantic mess in Futhark

**Posted on September 26, 2025**

The original idea behind Futhark was that parallel programming (of certain problems) does not require a complicated language. Indeed, we believed that there was little need for the complexity to exceed that of the functional languages commonly taught to first-year students at universities. (The complexity of parallel algorithms is another matter.) Overall, I think Futhark has succeeded at that.

The meaning of a Futhark program is fairly easily determined using normal environment-based semantics; even tricky things like uniqueness types are mainly complicated in an operational sense, and to some extent in the type system, the meaning of a program (once it type checks) is obvious. This semantic simplicity is also evident in the implementation. While the compiler has lots of complicated optimizations and sophisticated transformations, the reference interpreter is largely straightforward and quite similar in structure to how a person studying programming languages would write their first tree-walking interpreter.

You will note that the above paragraph is full of words like *overall*, *largely*, and *fairly*. This is because there is one language feature that has proven a particularly fertile ground for edge cases and implementation bugs. That feature is **size types**.

In the following, I will explain why a seemingly simple type system feature has proven so surprisingly challenging.

### Size Parameters

To recap the basic idea, size types allow Futhark functions to impose constraints on the sizes of their parameters. A simple example is a definition of the dot product, which takes two arguments that must be vectors of the same size.

Here, *n* is a size parameter that is implicitly instantiated whenever the function `dotprod` is applied, based on the concrete arrays it is passed. This by itself is not so difficult. Sizes can easily be incorporated into a type checking algorithm by treating them as types of a different kind — the details do not matter, just take my word that it’s fine. (Writing blog posts is easier than writing academic papers.)

The main trouble arises when we introduce the ability to use sizes as term-level variables, like, for example, the definition of `length`.

When a size parameter is in scope, it can be used in expressions. Unsurprisingly, the value of a size parameter is the size of the corresponding dimension in some array. What is interesting is that we can access the size of `x` without actually mentioning `x` itself.

Intuitively, we can imagine that the concrete value of *n* is determined at run time by actually looking at `x` (say, by counting its elements), and for now this intuition holds.

But now let us consider what happens for a function that takes the number of columns of a matrix (the inner length):

“`futhark
cols (mat: [n][m]a) = m
“`

There are now two size parameters, *n* and *m*, and we retrieve the latter.

This case is a little more challenging when *n* is zero, as we cannot simply retrieve a row and look at it to determine *m* because there are no rows. Yet an expression such as

“`futhark
cols (replicate 0 (replicate 3 0))
“`

should still work (and evaluate to 3).

This means we need to extend our notion of how the values of size parameters are determined since it cannot be done by looking at the syntactic form of an array value and counting the elements (since `replicate 0 (replicate 3 0)` really is just written `[]`).

### Shape Annotation of Arrays

The solution is to extend our (conceptual and perhaps even concrete) array representation such that an array always carries a **shape** with it, in addition to its actual elements.

Then, intuitively, to determine the value of some size parameter, we still look for values (such as `x` above) that have that size somewhere and extract it from those values.

But now, perhaps unwittingly, we have picked a difficult fight.

The problem is that we sometimes have to create multidimensional arrays without having any example of an element! Yet we still somehow have to conjure up the right shape for the array.

As an example, consider the `map` function, of the following type:

“`futhark
val map [n] ‘a ‘b : (f: a -> b) -> (as: [n]a) -> [n]b
“`

The element type of the returned array is given by the return type of the function `(f)` we are mapping with. But if we are mapping over an empty array, then `f` may never be applied:

“`futhark
map (\(x: i32) -> [x, x, x]) []
“`

How, then, are we supposed to determine that the shape of this empty array is actually `[0][3]`?

When the array is constructed inside `map`, all that is known is that the outer size is *n* (which is known to be 0), and that the element type is some `b`, but we have no value of type `b` we can use to determine what the shape may be! We do have a function `a -> b`, but we also have no `a`; all we have is an array of type `[0]a`, which clearly does not have any elements inside of it.

### The Idea of Shapely Functions

One solution to this problem is due to Barry Jay and explained in the paper *A Semantics for Shape*.

The idea is that any **shapely function** can be evaluated normally (with a value, producing a value) or with a shape, producing a shape. A shapely function is therefore one where the shape of the result depends *only* on the shape of the input, which rules out functions such as filtering, where the result shape depends on the values as well.

This by itself is no problem to Futhark, as we only want to allow mapping with functions that have a predictable result to avoid irregular arrays.

Using this approach requires us to have two ways of applying a function: for **value** and for **shape**. This is a slight semantic complication, but perhaps we can live with it.

But we also have to get the input shape from somewhere, and in the case of `map`, all we know is that the input has type `a`.

### Using Instantiated Type Parameters

Things could be made to work if, whenever a function is invoked, we also receive the concrete shapes of values of type `a` (assuming this is possible, but because `a` is used for array elements, we know it must have a meaningful shape).

But if we do that, then why not just take the shape from `b` instead and avoid this entire business of shapely functions?

And indeed, this is the Futhark evaluation model. At any time, a polymorphic function can inquire about the concrete type that a type parameter has been instantiated with and extract a shape if necessary.

This can then be used to annotate any constructed arrays with their full shape.

Note that this is a model: the interpreter does it this way because the interpreter is intended to closely mirror the model, but the actual compiler does not, of course, do it literally this way, as type parameters do not exist at run time. It just has to do it in a way that produces the same result. (In practice, it does monomorphisation.)

### Troubles

We didn’t do it this way because it was easy. We did it because we thought it would be easy.

Sadly, it has turned out to not be easy.

The basic problem is that we now have an obligation to always know the full shape of any type at all times (except for those types that can never be used as array elements, but let us leave those aside for now).

This turns out to require machinery more intricate than standard environment-based evaluation.

The fundamental problem is pretty obvious: we need to also evaluate **types** along with expressions, just in case they are eventually used to construct an array, and types occur in various unexpected places.

For example, consider a module that defines some local binding `cnt` and a size-parameterised type that refers also to `cnt`:

“`futhark
module M = {
let cnt = 5
type C [n] = [n][n * cnt]i32
}
“`

The usual way definitions of polymorphic types such as `type C [n] = …` works is that they are added as type constructors to a type environment and then instantiated when used.

Now, `M.C [n]` by itself does not have a shape, since *n* is not yet known. At some point in the future, we may end up with an instantiation `M.C [k]` for some concrete *k*, and when that happens we can then compute the shape of the type, which will be `[k][k * M.cnt]`.

But there is no guarantee that `M.cnt` is actually in scope — it may be some hidden definition inside the module `M`, and even if it isn’t, it’s difficult to go from an expression `n * cnt` and give it a meaning in a different scope than it was originally defined in.

Since Futhark is a pure language, we could, as soon as we interpret the type definition of `C`, substitute the result of evaluating `cnt` into its right-hand side.

But this is also uncomfortable: it’s a syntactic operation, and while substitution-based semantics are fairly common in theoretical work, they are undesirable in implementations because they are quite inefficient. While the expression `n * cnt` is small, others may be large.

### Type Constructors as Closures

Our solution is that a type definition captures not just the right-hand side of the definition, but also its environment — that is, type constructors are **closures**.

When at some point in the future we finally instantiate `M.C` and have a `k` value for `n`, we extend the captured environment with a binding `n => k` and evaluate all the expressions in sizes.

This is a very strange implementation that took us quite a while to work out. If I had more experience implementing dependently typed languages, then perhaps I would not find it so weird, as it really just makes type constructors similar to functions, which they would be in a fully dependently typed language.

### Takeaway

Size types have proven to be a rich source of complexity in the design and implementation of Futhark, despite their initial simplicity.

Handling shapes, sizes, and type-level computations requires intricate machinery and careful design decisions.

However, these challenges are also what make Futhark powerful and expressive for parallel programming with precise size constraints.

Understanding these subtleties brings us closer to developing robust, efficient, and predictable parallel programs.

Thank you for reading!
https://futhark-lang.org/blog/2025-09-26-the-biggest-semantic-mess.html