COMPUTING | CODING



BE MINUS MINUS

I will soon release a first version of b-- which could be called a "new programming language" but really it is just a program which enables writing C++ programs with a sweet Pythonic free syntax. Basically I love the way you can write and evolve codes in Python, they go in smoothly like gin, whereas C++ is more like moonshine, burning, awful aftertaste but it kicks. All I need for my research is some simple loops so I thought about writing b-- which is basically C++ but it has this Pythonic smoothness to it. Here is some preview:

#include<iostream> using namespace std int main() for int s=0 s<10 s++ if s*s<20 cout "s = " s endl int test = 1 char madman[] = "cout if for switch case default!!!" int c=0 while true if true break c=9 while test for int i=0 i<10 i++ cout "i = " i endl if i>5 for int j=0 j<i j++ cout " j = " j endl if i==8 goto get_me_out get_me_out: cout "i'm \"soo...\" out" endl cout "switch?" cin test switch test case 1 cout test; break case 2 cout test break default cout "say what?"




C++ ASSIGNMENTS

My programs written for the course on C++ Object Oriented Programming. Perhaps someone will find them useful.

    # ass1_bohr.cpp
    # ass2_millikan.cpp   ass2_millikan.dat
    # ass3_galaxy.cpp
    # ass4_complex.cpp
    # ass5_matrix.cpp
    # ass6_lorentz.cpp
    # ass7_circuit.cpp
    # ass8_complexH.h   ass8_complexC.cpp   ass8_complexM.cpp
        ass8_complexH_T.h   ass8_complexM_T.cpp
    # ass9_shapesH.h   ass9_shapesI.cpp   ass9_report.pdf
       
ass9_shapesMd.cpp   ass9_shapesMi.cpp

These programs were written for an introductory course on C++. Extremely basic stuff i.e. 80% of us probably won't need more than that.

    # week1_address.cpp
    # week1_hello_world.cpp
    # week1_interview.cpp
    # week2_emv.cpp
    # week2_pv.cpp
    # week3_eloop.cpp
    # week3_emvp.cpp
    # week3_pvloop.cpp
    # week4_krel.cpp
    # week4_van_der_waals.cpp
    # week5_bubble.cpp
    # week6_key_no_sub.cpp
    # week6_key_sort.cpp
    # week7_line_fit.cpp   xy_data_1.txt   xy_data_2.txt   xy_data_3.txt
    # week8_w_line_fit.cpp   xys_data_1.txt   xys_data_2.txt   xys_data_3.txt
    # week9_heap_sort_wo_pointers.cpp
    # week9_heap_sort.cpp   heap_sort_1.txt   heap_sort_2.txt   heap_sort_3.txt




QUICK EXAMPLES

The codes, output files and images listed below are supposed to serve as simple examples of the things which can be done in Python programming language. The 'weaving' of C++ code and multiprocessing are especially useful but still very easy to implement, as most things in Python.

   Chaotic Map:  code1  pic1

   Python & C++:  code1  out1

   Multiprocessing:  code1  out1

   VPython Ising Model:  pic1  pic2  pic3

   Repulsion Lattice:  code1  code2  pic1  pic2





COMPUTING | LINUX



ICEWM

I am planning to add a guide to IceWM, my favourite window manager, very fast and light yet useablly functional.




VOLUME GAIN 4000

In case some of the FLV files you downloaded with special Firefox plugins have been recorded with rubbish audio you can use the "-af volnorm" option for MPlayer to gain some volume without distorting the sound. The effects is usually pretty good.




RAM PARTITION

Obviously Linux community surprised me again with a possibility of creating partitions in the RAM memory of your computer. Needless to say, the access to files copied on such a partition is much faster than when compared to a hard drive (nanoseconds instead of milliseconds). There are two types of partition which can be created, tmpfs and ramfs, each with its own specific characteristic so it is worth looking them up on the net. Type one of the commands below to try it out.
mount -t tmpfs -o size=100m tmpfs /mnt/ram mount -t ramfs -o size=100m ramfs /mnt/ram
The directory /mnt/tmp needs to exist beforehand and the command will create a 100MB partition accessible through that directory. This size is fixed for tmpfs but can grow dynamically in ramfs, however, overloading may lead to a Johnny Mnemonic scenario. To ensure that the data is stored only in RAM and not on HDD you need to use ramfs since tmpfs can use SWAP partition.




Z-SHELL

I heard of Z-Shell (zsh) a long time ago but never tried it. Recently, I gave it a go and in the end, I switched to zsh permanently. To check if zsh if available on the system type chsh --list-shells in the terminal. If something like /bin/zsh will appear on the list then you can execute chsh -s /bin/zsh yourusername to change the default shell to zsh. Then you create .zshrc config file (equivalent to .bashrc for bash) as listed below. It is very simple but already enables the user to benefit from zsh features such as command arguments autocomplition or right prompt.
autoload -U compinit promptinit compinit promptinit zstyle ':completion:*' menu select zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always PROMPT="%/%# " RPROMPT="%T"
To check some of the nice features of zsh type yum se and press Tab, zsh should complete the command to yum search. There are many additional things you can put into your .zshrc, just look around on the net.




BSZCZESNY


PROFILE


RESEARCH


COMPUTING


   CODING


   LINUX




bszczesny


TWITTER


LINKEDIN


FACEBOOK




WWW


IOP COMPLEX


NONLIN. NEWS


PYTHON, SCIPY


FEDORA CORE


ICEWM . PRV.PL


BOOK


SC BERTUGLIA and F VIAO -
Nonlinearity, Chaos & Complexity


NF JOHNSON, P JEFFERIS... -
Financial Market Complexity


NG van KAMPEN - Stochastic
Processes in Physics...


MA NOWAK - Evolutionary
Dynamics, Exploring...


LE REICHL - A Modern
Course in Statistical Physics


SH STROGATZ - Nonlinear
Dynamics and Chaos


G de VRIES... - A Course
in Mathematical Biology




FILM


44 INCH CHEST


9, THE MOVIE


AMERICAN PSYCHO


APOCALYPTO


BEING JOHN MALKOVICH


BIG COMBO, THE


BLINDNESS


BOY IN THE STRIPED PYJAMAS...


CHOKE


CLOSER


CRASH (1996)


DANGEROUS LIAISONS


DETOUR


DOUBLE INDEMNITY


DR STRANGELOVE...


EARTHLINGS


ELEPHANT MAN, THE


EXORCIST, THE


FROST/NIXON


GOMORRA


GONE WITH THE WIND


GRAN TORINO


HANNIBAL


LET THE RIGHT ONE IN


MOON


MULHOLLAND DR.


NO COUNTRY FOR OLD MEN


PEACOCK


PULP FICTION


ROAD, THE


SAVAGE GRACE


SILENCE OF THE LAMBS, THE


SIN CITY


SINGLE MAN, A


SLEUTH


SPIRITED AWAY


SUNSET BLVD.


SWEET SMELL OF SUCCESS


THERE WILL BE BLOOD


WHERE THE WILD THINGS ARE


WHITE RIBBON, THE