Pi-greco - Chudnovsky :: C

While being a big fan of Python I am also in the continuous pursuit of better performance. Like it or not, but when seeking for better performance in many cases you have to put away high level framework/programming-languages and go back to basic; many times basic means good old C. After having developed some different Python scripts to calculate the Pi-greco up to a given number of digits (later I will post the most advanced version I came up with) I decided it was time to make a step forward and write it in C. …

Posted on

Execution time :: C & Win

Once in a while I happen to have to know how much time a certain function needs to be executed. While many programming languages have built in functions (time in Python, System.nanoTime() in Java and so on) to get this information, C doesn’t appear to have one. There is timec.h but it appears to be quite inaccurate, so if extremely high accuracy is needed we have to rely on something else; the downside is that these much more reliable libraries are not platform independent. …

Posted on

Nerd gonna nerd

Today officially started my summer holiday, 5 days ago I had my last exam at university and now finally I’ve the time to do all the things I can’t find the time to do the rest of the year. The majority of the people on earth awaits the summer holiday to completely stop doing what they do the entire year, pack things up and go away from home for as much as they can. …

Posted on

Major upgrade

OK, not exactly an upgrade, but still an improvement over my precedent configuration. You have to know that I used for a long time – years – a dual monitor configuration, something like 6 months ago one of the two monitors went nut and I had to replace it. Obviously it was already discontinued by some time so I had to replace both my monitors, I decided to buy a single Dell U2412M (here is the post I wrote). …

Posted on

My daily dose of anti-apple

Today I had the bad luck to have to deal with a damn Macbook Pro on which I need to install a retarded software (IBM Rational Software Architect). Despite RSA becoming one of the worst piece of crapware I’ve ever seen this time it wasn’t the problem. The Macbook was one of the latest model, a 13″ one equipped with a Core i5 Sandy Bridge CPU and an awesome a certain amount of GB 5400 RPM hard disk drive…everything sold at the fair price of 1200 or so €. …

Posted on

Clausify :: Prolog

For the same exam in which I had to do the LISP project I also had to write a Clausify program in Prolog. Long story short: the goal was to translate a well formed form (WFF or FBF in italian) of a first order logic language in a conjunctive normal form (CNF). congiunzione(and). disgiunzione(or). negazione(not). implicazione(implies). esiste(exist). per_ogni(every). fbf2cnf(FBF, CNFFBF):- atomic(FBF), CNFFBF = FBF, !. fbf2cnf(FBF, CNFFBF):- FBF =.. [X|ListaArgs], semplifica([X|ListaArgs], [], CNFFBF_3_p), semplifica_2(CNFFBF_3_p, [], CNFFBF_4_p), controlla_lista(CNFFBF_4_p, [], CNFFBF_2_p), CNFFBF_2_p =. …

Posted on

My new love: Python

Past Friday’s afternoon, around 3 pm, I was at university, specifically I was in one of the libraries and I was reading a book titled Concurrency; it’s about engineering concurrent systems using the modelling software LTSA and then write the actual program in Java. While reading I was also talking with two friends of mine about a problem another friend found on a book; to make a long story short, the problem was about balancing a predefined non-balanced random function. …

Posted on

AMD and LN2

Yesterday’s afternoon and today I had a LN2 trip with two AMD setup. I was aiming to break the 7 GHz wall with the trusty Phenom II 955 B.E. and improve my precedent results on socket 939 with the Opteron 148. I failed in reaching 7 GHz with the 955, tho I managed to improve just a little bit my Super-pi 1M score…still not satisfied with it but it is better than nothing. …

Posted on