There are two major versions of Python: Python 2 and Python 3. Python 3 was released in December 2008, and was designed to rectify certain fundamental flaws in the language. This fixing would unavoidably break backwards compatibility, which has slowed adoption by people which depend on legacy features and libraries. I myself have decided to switch […]
Iterators: Even if Cython has some support for operator overloading in C++, at version 0.19.1 that support is a bit sketchy and at times you will find some quirks. But the following code compiles: It can’t be None: this snippet comes from here, and apparently is a kind of annotation that forbids parameters having a […]
Parsing structured text from C++? This post shows how to use boost::xpressive to go from raw text to data that your program can handle.
List comprehensions in Python are kind of no-frills, yet extremely convenient: But beware, since they “just” add convenience, they are not very emphasized in introductory classes to the language, and they tend to fade away quickly from memory. What is even less known is that Python has comprehensions for dictionaries: and for sets: There are […]
Building things in Linux is easy, building them in Windows requires to patch a lot, as Windows tends to be messy with compilers and runtime libraries. I need a few packages in Windows for when I work from my laptop, and I think that it is a good idea to share the patches. They probably […]
Have you ever wondered why scientists don’t use databases, as in “relational databases”? Well, they actually do, but not as often as they could. Using a relational database is worth the effort in many cases, and in this post, I will be writing about how to use SQLite from C++ for scientific data.
Science is based on data. Even mathematicians, which at times seem to pull new knowledge out of thin air, use and produce data. So, exchanging data is a must. If the focus is in exchanging data, then you need people to understand your data. That’s something JSON is good for. It is a text format […]
Scientific programming tools are mostly open-source, and as such their natural environment is Linux. However, Linux might not be an option for you. For example, very few laptops come pre-installed with Linux, and chances are that even if you install it yourself you will be short-changed in driver support. I use Linux in my desktops […]
If you are really, really new to science, you might think that you are well-off with tools like Matlab and Mathematica. They are easy and handy for many tasks, but they are also expensive. Furthermore, doing science is about stretching limits, and it might well be that no single tool will magically solve all the […]
Just starting any research-oriented profession where you will need lots of wits, maths and statistics? Will you need to process some data? A lot of data? I envy you, because there is a lot of thrill in your path. You will need to become computer-savvy however, if you are not already. This entire blog is […]