Diego A. Casas
banner
diegocasas.net
Diego A. Casas
@diegocasas.net
Fluid Mechanics, Waves, Programming. Ph.D. Student @ UFPR, Brazil.

diegocasas.net
I've been programming for more than 10 years and never seen someone swapping values like method 2. I'm genuinely asking, why would a sane person need to do it that way? An extremely memory-constrained system?

# Method 1
temp = a
a = b
b = temp

# Method 2
a = a + b
b = a - b
a = a - b
September 30, 2025 at 11:01 AM
Why do Brazilian programmers learn the idiotic and foreign Python language when they have the better and beautiful Lua language, created in Rio de Janeiro? They should be proud of it!
September 14, 2025 at 6:42 PM
The Lua programming language, simple, beautiful Brazilian language developed at the Pontifical Catholic University of Rio de Janeiro. Currently, mostly used as an embedded scripting language for videogames. I learned it in detail in just two days and deeply customized my Textadept editor with it.
September 14, 2025 at 6:38 PM
Last week I learned of Textadept editor. Very fast, simple to use, and amazingly extensible with the Lua programming language. I tried several times with Emacs editor, but, even though I like Lisp, I find its API too old and difficult to learn.
September 14, 2025 at 6:30 PM
Reposted by Diego A. Casas
AGU stands with federal scientists. Read more on fromtheprow.agu.org/standing-tog...
February 14, 2025 at 6:01 PM
TIL that in chemistry there are several ways of counting the atoms of a molecule for its formula. Yes... counting, not just order and grouping (e.g., empirical vs. structured formulas). There seem to be at least two ways of counting: usual and unusual (?).

diegocasas.net/blog/looking...
Looking for the Formula of Sodium Laureth Sulfate
In October 2024, I did a simple laboratory experiment. It consisted of simulating waves in an acrylic tank filled with water. Waves were generated by an axial fan blowing air towards the tank. I measu...
diegocasas.net
February 12, 2025 at 7:15 PM
In my thesis, I show an example of an irregular wave field. In the first draft, I used a photo of Lake Monroe, USA, by Dawn McDonald on Unsplash (left). However, during my vacation in Colombia, I took a photo in Gaira Bay (right). In the second draft, I decided to change the photo to the one I took.
February 11, 2025 at 3:11 AM
Today, a fellow PhD student said that they regret not training in programming at the beginning of their PhD. Programming proves to be an essential skill for those doing MSc or PhD in #STEM. In my case, it allows me to do virtually any analysis or visualization. I can't recommend it enough.
February 11, 2025 at 2:47 AM
New post on how to compute the ocean wave spectrum using Wolfram Language (a.k.a. Mathematica) 🌊
Wave Spectrum in Wolfram Language
Surface waves in water bodies are usually described with the wave spectrum. This spectrum is erroneously referred to as a wave energy spectrum, but it is really a variance density spectrum. It describ...
diegocasas.net
February 2, 2025 at 5:24 PM