
Senior Software Engineer @Musixmatch
Italia
Joined December 2010
- Tweets316
- Following430
- Followers169
- Likes5.7K
Alberto Nicoletti retweeted
.@MichaelArnaldi wrote that software development is dead. He's right about a lot of things. But he's missing something critical.
I wrote a response 👇 🧵
Alberto Nicoletti retweeted
Imagine if you could use any native library in both React Native & React Web in an instant, with great performance and even better DX 🚀
Soon, you won't need to imagine anymore, here at @callstackio we're cooking something big 👀
Coming soon™🤞
Alberto Nicoletti retweeted
After 2 months of hard work, I'm finally ready to announce Borumi, a video editor that let's you ideate, record and edit amazing videos, in a fraction of the time 🚀
TLDR: Link in the last post!
1/X
Alberto Nicoletti retweeted
remotion.dev now has one of those infamous company logo strips too!
Glad to have such high-esteemed brands as customers.
Alberto Nicoletti retweeted
"Estimating all projects is devilishly difficult, and estimating large projects is virtually impossible. Yet we insist that what hasn't worked for sixty years will definitely work on this next project, if we all just try a little harder. Delusional." world.hey.com/dhh/software-e…
Alberto Nicoletti retweeted
We are excited to announce that we are partnering with @Musixmatch to put Runway into the hands of millions of artists and musicians. Their upcoming feature, Lyrics to Video, will be powered by Gen-2 and enable artists to expand their creative vision with new AI tools.
Learn more: runwayml.com/blog/runway-par…
Alberto Nicoletti retweeted
🚨🚨🚨🚨
Apple will NOT remove PWA support on iOS
🥳🥳🥳🥳
👉This is an official statement form Apple that replaced today the previous excuses published around the removal.
We did it, folks!
Alberto Nicoletti retweeted
The Italian Ministry of Justice cites Rickrolling as a cybercrime, then provides a "source link" to what looks like a dictionary but is actually a video of Rick Astley's song
50% of me is "well played," 50% of me is "this is supposed to be serious"
Link: giustizia.it/giustizia/en/mg…
Cute little trick to create an infinite iterator over a list in OCaml.
Used over the list of (L | R) instructions in Advent of Code - Day 08 #adventofcode2023
4
127
Alberto Nicoletti retweeted
Folks!
Our Shader course is in the works, and we can't wait to share it with you.
It's a passion-driven project, and we're fully committed to ensuring you have an exceptional learning experience!
decodeshaders.dev/
Comments and RTs are appreciated. 🙏
#gamedev #shaders
Alberto Nicoletti retweeted
The Remotion repo reached 15000 commits!
Here are some tips to keep shipping to when the codebase gets big:
Alberto Nicoletti retweeted
Someone built a frontend to Reddit that looks like Outlook so you can browse it all day at work without worrying about who is looking over your shoulder.
I love the internet.
Alberto Nicoletti retweeted
In front of the Milan cathedral, where Silvio Berlusconi's state funeral is being held, his supporters chant 'Whoever doesn't jump is a communist', much to the emotion of the journalist on live television.
Via @ciropellegrino. June 14, 2023
Alberto Nicoletti retweeted
As a functional programmer interested in performance, I've long been troubled by the amount of garbage that functional programming generates.
Every time we want to apply a modification to a structure, we have to copy the structure (sharing as much substructure as possible), and apply the modification to the part we are changing.
Yet, the supermajority of times we copy a structure (for purposes of applying a modification), we do not utilize the old structure. We throw it away immediately, which results in garbage collection working overtime.
Why does functional programming insist on applying modifications through copying?
Well, partly, that's just because what it means to do "functional programming": functions always produce the same output from the same input, which implies no mutation.
More practically speaking, however, immutable data makes code maintenance easier. Like many techniques in FP, immutable data "inverts control".
In ordinary procedural programming, if you hand off some `Person` object to another function, it can choose to modify that, or not. As a result, callees have control. The caller loses control.
In functional programming, if you hand off a `Person` object to another function, it cannot do anything, except read its contents, and use its contents to produce a (deterministic) output.
Inversion of control supports local reasoning and local testing, which help improve code quality and provide developers confidence that changes are correct (because their impact is limited and the code is better understood). Moreover, immutable data is really a great fit for concurrent programming, because it works well with atomics and you don't have to worry (nearly as much) about races and clobbering.
Is there a way to have our cake and eat it, too? A way to achieve the effect of immutable data, but without the performance penalty?
In essence, what you want is something like this:
person.withAge(32).withName("John")
where you would execute these changes mutably, knowing that the previous 2 instances of Person would never be used.
As you can imagine, it's really hard to do this in practice in languages like Scala. Though there are places where you can make it happen.
In ZIO Chunk, there is a clever optimization that pre-allocates a mutable array and stores it inside a chunk. If you append, then the mutable array is filled with new values. From the outside, however, everything is purely functional: if you try to reuse an old chunk, and append a value to that, then the conflict will be detected, and a new mutable array allocated.
This is possible to do with appending an element (with some effort), because when you append an element, the old elements are still there, which allows the structure sharing necessary to maintain referential transparency.
More generally, can we use a sufficiently powerful static type system to "cheat" and reuse "old memory" for a copy, when we know the old version of the structure will never be used again?
The answer is a resounding yes, and it turns out, that Rust's support for affine types is exactly what you need to implement this optimization!
In Rust, you can have methods like `withAge` or `withName` consume the original value, preventing it from being used again:
fn withName(mut self, newName: String) -> Person {
self.name = newName;
self
}
This allows you to expose what is, for all intent and purposes, a purely functional API, but with zero copying: the old structure is reused for the modification, but with the type system guaranteeing it is impossible to reuse the old value (which is something that almost never happens anyway, in practice).
Now, it turns out that, immutable data is not the only way to obtain benefits of inversion of control. I'll talk more about that in a future post. For now, it's just really interesting to see that affine types let you do things which are impossible in functional programming languages!
Alberto Nicoletti retweeted
Zelda: TOTK is a fantastic example of building a game.
However, it's also a great game about building and making tools that we use to interact and interface with the world.
Let's delve into how Link is an unlikely hero of the principles of design and the secret of great UIs! 🧵


























