Hello again.
I am starting today an article for arXiv about Go and Go-HEP. I thought structuring my thoughts a bit (in the form of a blog post) would help fluidify the process.
(HEP) Software is painful In my introduction talk(s) about Go and Go-HEP, such as here, I usually talk about software being painful. HENP software is no exception. It is painful.
As a C++/Python developer and former software architect of one of the four LHC experiments, I can tell you from vivid experience that software is painful to develop.
[Read More]
Simple Monte Carlo with Gonum and Go-HEP
Today, we’ll investigate the Monte Carlo method. Wikipedia, the ultimate source of truth in the (known) universe has this to say about Monte Carlo:
Monte Carlo methods (or Monte Carlo experiments) are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. (…) Monte Carlo methods are mainly used in three distinct problem classes: optimization, numerical integration, and generating draws from a probability distribution.
[Read More]
L3 LEP data
Still working our way through this tutorial based on C++ and MINUIT:
http://www.desy.de/~rosem/flc_statistics/data/04_parameters_estimation-C.pdf
Now, we tackle the L3 LEP data. L3 was an experiment at the Large Electron Positron collider, at CERN, near Geneva. Until 2000, it recorded the decay products of e+e- collisions at center of mass energies up to 208 GeV.
An example is the muon pair production:
$$e^+ e^- \rightarrow \mu^+\mu^-$$
Both muons are mainly detected and reconstructed from the tracking system.
[Read More]
Introduction to Minimization with Gonum
Switching gears a bit with regard to last week, let’s investigate how to perform minimization with Gonum.
In High Energy Physics, there is a program to calculate numerically:
a function minimum of \(F(a)\) of parameters \(a_i\) (with up to 50 parameters), the covariance matrix of these parameters the (asymmetric or parabolic) errors of the parameters from \(F_{min}+\Delta\) for arbitrary \(\Delta\) the contours of parameter pairs \(a_i, a_j\). This program is called MINUIT and was originally written by Fred JAMES in FORTRAN.
[Read More]
Introduction to Statistics With Gonum
Starting a bit of a new series (hopefully with more posts than with the interpreter ones) about using Gonum to apply statistics.
This first post is really just a copy-paste of this one:
https://mubaris.com/2017-09-09/introduction-to-statistics-using-numpy
but using Go and Gonum instead of Python and numpy.
Go & Gonum Gonum is “a set of packages designed to make writing numeric and scientific algorithms productive, performant and scalable."
Before being able to use Gonum, we need to install Go.
[Read More]
Introduction to the pygo virtual machine
In the last episode, I have showed a rather important limitation of the tiny-interp interpreter:
def cond(): x = 3 if x < 5: return "yes" else: return "no" Control flow and function calls were not handled, as a result tiny-interp could not interpret the above code fragment.
In the following, I’ll ditch tiny-interp and switch to the “real” pygo interpreter.
Real Python bytecode People having read the AOSA article know that the structure of the bytecode of the tiny-interp interpreter instruction set is in fact very similar to the one of the real python bytecode.
[Read More]
A tiny python-like interpreter
Last episode saw me slowly building up towards setting the case for a pygo interpreter: a python interpreter in Go.
Still following the Python interpreter written in Python blueprints, let me first do (yet another!) little detour: let me build a tiny (python-like) interpreter.
A Tiny Interpreter This tiny interpreter will understand three instructions:
LOAD_VALUE ADD_TWO_VALUES PRINT_ANSWER As stated before, my interpreter doesn’t care about lexing, parsing nor compiling.
[Read More]
Starting a Go interpreter
In this series of posts, I’ll try to explain how one can write an interpreter in Go and for Go. If, like me, you lack a bit in terms of interpreters know-how, you should be in for a treat.
Introduction Go is starting to get traction in the science and data science communities. And, why not? Go is fast to compile and run, is statically typed and thus presents a nice “edit/compile/run” development cycle.
[Read More]
My first post
Content
This is the first of many-many posts.
sub-content
package main
func main() {
println("hello")
}