G_S 38 Junior Poster in Training

Hello people. I'm looking for FP examples that are very simple (very few lines, one-liners are even better) and that totally look like sorcery to a traditional imperative programmer. Can you help me with that? I want to show some old school programmers who are friends of mine but keep saying that all programming is exactly the same and that every single language in existence is a botchered, downgraded version of C. They also say that once you learn how to think the C way you'll be able to program in every other single language because they are mostly the same.

I am just starting out in FP, so I could only come up with a tail-recursive factorial and it's got them near brain-explosion mode because they think there is only one possible type of recursion.

Any other cool weid-looking examples?

G_S 38 Junior Poster in Training

I'm having a similar problem. I think I read somewhere that constructors are not inherited. But I think you can call the parent's constructor using super (I think).

xHellghostx commented: Yes you are right.. I used the super and it worked just fine.. Thank you. +0
G_S 38 Junior Poster in Training

Turns out it doesn't even place links to itself anywhere. I just had it install in /opt/ActivePython/ and it didn't place anything outside that location. So no problem I have Python2.6, ActivePython 2.7, Python3.1, and ActivePython3.2.

Gribouillis commented: thanks to let the rest of us know +13
Lardmeister commented: great info +10
G_S 38 Junior Poster in Training

I know this is old, but just in case somebody sees this and finds it useful: the problem is definitely Virtual Box. It works properly in a real Windows installation.

G_S 38 Junior Poster in Training

Thank you very much everybody (forgot to thank and mark as solved, sory)

TrustyTony commented: Better late than never ;) +12
G_S 38 Junior Poster in Training

I think he means the cached files, not the downloaded ones.


And yes, you can't see Firefox's cached files as easily as you can see Internet Explorer's. But I found this, it could be useful: http://www.nirsoft.net/utils/mozilla_cache_viewer.html

G_S 38 Junior Poster in Training

I managed to do it. I installed tcl/tk 8.5 from source and in the default directories (/usr/local/lib), then I moved all these files to /usr/lib so that they ended up sitting next to their tcl/tk8.6 counterparts.

I then compiled python 3 normally with the make altinstall option to avoid overwriting the older python, and that did it.

I supposse that this is due to the mandriva devel packages, I suspect they somehow do not install everything that python needs to successfully build the tkinter modules, an this is why you go crazy trying to compile it and getting errors despite the fact that the required packages are there.

Hope this helps someone.

Gribouillis commented: Nice info for Mandrivers like me ! +3