~ Archive for computer science ~

How to install Alpine on mac OS 10.9 in 2015?

ø

It can be done, my mac has OSX 10.9.5 and it has xcode installed and I use iterm.
This is what I remember of the process, hopefully this information is mostly accurate.

I went to the Alpine website: http://www.washington.edu/alpine/acquire…
and got alpine/alpine.tar.Z
Alpine 2.00

In that folder under doc, under tech-notes, I found a file installation memo.
in terminal at the command line, I moved to the folder directory and I typed
./configure and then make. And I got a fatal error

I found an email on the “alpine-info” iist with my error
fatal error: ‘pam/pam_appl.h’ file not found
and a suggestion
Edit the file imap/Makefile and look for the line the starts with oxp:
delete the part that says -DMAC_OSX_KLUDGE=1, so leave the line as
EXTRACFLAGS=”$(EXTRACFLAGS)” \

Thad fixed my problem. I ran make and it gave a lot of warnings but no fatal error.

I found a note that instead of copying the binaries manually, you may use
make install
to install them. that worked. Awesome.

then I followed this thread:
 https://kmandla.wordpress.com/2009/02/12…

Start Alpine, and go to the configurations page with M-S-C. Page down until you see “Enable Incoming Folders Collection.” Press return to select it, then E to exit and Q to quit. Restart alpine.

Press L for the folder list. Highlight “Incoming-Folders” and press return. Press A for a new folder.

When asked for the name of the server to contain the added folder, enter this for a GMail account.
 imap.gmail.com

At the “Folder on ‘imap.gmail.com/ssl/use…’ to add:” prompt, enter “Inbox”.

For the “Nickname for folder ‘Inbox’:”, enter whatever you want to call the folder locally. I called mine  ACCOUNT_NAME at gmail.com

When you press return you’ll be prompted for your password, or given an warning screen about certificates and asked for permission to continue. Enter yes, or your password or both, as needed.

But then following other recommendations, I edited my alpine config as follow
user domain:
smtp server: “smtp.gmail.com/user=username@gmail.com/ssl/novalidate-cert”
Inbox path: “pop.gmail.com/POP3/SSL/novalidate-cert/user=username@gmail.com”

I modified read message folder so Alpine would save the emails when I had read them – otherwise they disappeared from my Alpine inbox.

enable incoming folders collection is set
I changed customized header
and I selected don’t rename don’t delete so Alpine would not ask me to move my messages to a folder every month.

at the terminal I ran touch so Alpine would remember Password
Now if you want that your password should be saved on your computer (dont worry its totally safe) , then open the terminal and if you are in your home directory then give the following command

touch .pine-passfile

When I tried to read email from gmail the connection failed. It turns out that gmail default setting would not allow for Alpine to read the email, and there was a message with instructions on how to change this security setting.
After that I was able to read emails from Alpine and save them on my mac.

I think there is a setting that deletes email from gmail as Alpine accesses them. I have not set it to that yet.

That’s about it I think. I hope this may help someone else, or at least give a sense of what is involved.

The one problem is that emails disappeared from the inbox if I did not save them before going to another box, sentbox etc. But since all the emails stayed on the gmail server and could be accessed there, they are not completely lost.

The other option is to use imap

 imap.gmail.com}Inbox

What happens then is that gmail and the local inbox look exactly the same, same read or unread messages. But when I go to save I get a message has shrunk on every file.

 

Approaching technology with a human touch

ø

I am taking a course on web programming. I am happy to report that I found a learning wizard as a TA in this course as well.
What is the difference between empty and is_null. Let me show you, I will create an empty string and a null string and we will find out together. Hands on. Brilliant. Well, to me it is brilliant. It works and I love that learning style. New year resolution. Make good use of this sandbox approach myself.

What I would like to report on is the difference between automatic machine response to a technical problem, and a vastly different response with a human touch.

The project starts with a menu. We are to type all the menu items, prices etc in a text file. I won’t be caught dead spending that much time with data entry if there is another way. So I find an html version of the menu, and spend much time learning to parse the file and retrieving the information. I acquired some technical skills, and most of the information is in the computer. Great!?

Then I meet the fellow with the human touch. He looks at the menu not as a pattern of words to be entered in a text file, but as a pattern of symbols mediating between a user and a vendor. He actually looks at the page to see what it says — Ok, I can’t eat pizzas, so I was not open to that type of inquiry, eating pizza would make me sick — Pizzas have a number of options. To my data parser, those options are all to be treated the same. But to my fellow humanist, a 2-way and a 3-way combo means something very different. It requires refering to the previous lines to determine what topping could be added. Extra cheese cannot be ordered by itself, it adds itself to another order.

To further his understanding, he goes to the pizzaria, inquires about different orders, checks out how up to date our menus are, meets the owners, orders a sub. Back at home he finds an on line order site for that same pizzaria and further thinks through the complexity of representing foods that can be ordered through this computarized interface.

This encounter blew my mind for two reasons. One it showed me another kind of wizardry involved in learning. And for another it showed me how completly blind to the meaning of what I am working on I can be when I am working with a computer language.

Learning Wizard

ø

I have recently had the occasion of watching a learning wizard. I can’t remember when I had an occasion to watch someone learn. Typically, the courses I have taken have been with people who knew the material they were teaching. And on my first work project, we were finding our mistakes by the smell of burned electronics, seriously clamping down on creative interactive learning.

What struck me with this wizard is his ability to isolate an aspect of a problem, embed it in a simple model, and play with it, just act on the new model in different ways and observe the outcome until he has something approaching what is wanted.

What struck me equally was my resistance to this approach even though I could see it worked brillantly to learn maya 3D. My path to learning is motivation, goal. As I watch a ball swing on the screen, I want the color to change just when the two balls hit each other. I have a hard time separating my wanting the color to change from the circumstance in which the color is to change. To actually achieve my goal, I have to let go of it, and just learn how to change colors, the different ways color can change, link color to time, to a geometry, … and only after some practice of this kind can I go back to the embedded problem.

Where there is resistance, I suppose there is fear. Fear of loosing that motivation, that “I want” which propels me to come back again and again at the difficulty until -finally – it gives way. Fear apparently blocks the curiosity/surprise/exploratory way to knowledge. It craves a road map, a vision, a path on which to focus. When exploration -except in the safe confine of a tutorial – is associated with timelessness, unknown, aimlessness.

Indeed, exploration by itself cannot lead very far. Playing with simple models can only create simple animations. An abstract animation might be created with a sequence of random playful variations. But for some kind of narrative creation to occur, a combination of simple steps must be composed in a meaningful structured way.

The successful learning experience runs back and forth between the idea, the concept, the feel of a particular animation and the accidental findings of playful exploration. The mind must constantly seek and let go, never completely loosing track of the direction it is headed in, and yet constantly discarding ways which seem to dead-end. For Maya is not a logically constructed structure, it has its logic, but what it does and does not do was built in by the interaction of many programmers/users. Unlike mountain paths which must lead from some spot to some other spot, a particular path taken in Maya does not necessarily follow through over the pass to the nirvana thought after. Seeking many ways until one leads you over the pass is the way of learning in Maya, and maybe the way of learning in general.

Human distributed intelligence

5

I sat by the river and watched some ducks approach a white cup floating on the river. Quickly they recognized the item as “non food” and continued. There head was raised giving the impression of purpose, of attention, of relaxed readiness for action.

I wonder if human’s lives are just as driven or pre-programmed as that of animals. People indulde in drives, in food, in sex, in drugs, in power, they indulge in counter-drives, anorexia,…. Civilians get killed, soldiers get maimed, rich people strut their wealth or bullie others, fearful people cower down.

Social organisations work peacefully or not, it depends, on what, who knows. For a while now, people have created beyond their means, chiefs, kings, emperors cohersing people into great buildings, delirious tombs…

And yet beyond this individual madness, beyond this social mallability, a quality has moved forth, survived, recurred, the passing of knowledge. However indiosyncratically this knowledge was acquired, passed on, distributed, there are people out there who know about something, some of that knowledge gets lost, like the knowledge of the medicinal value of plants, or of the plants themselves. Others are aquired in their stead. Take computer technology. Out there there is someone who knows how to use this or that. This knowledge is there because someone somewhere became motivated to learn, humans with their uncomprehensible motivational complexity are acquiring and holding on to bits of information which permeate their world.

I wonder if there is a speed of transmission at which humans will start vibrating in this web of information and become part of an active acting distributed intelligence. Already we have seen the crudest of manifestations, flash visits, terrorist coordination… What if the world of information became so fascinating that people would voluntarily devote themselves to their informational life… millions of people deciding together on this or that action, millions of other collecting information, millions of others processing pain signals.. and together this human distributed intelligence engulfing the lives of humans.

Except it could not reproduce. So how different is that from a rainbow. Perhaps human intelligence is empty. Empty of permanence that is. If that is the case, perhaps it is ok to relax, to look at all I have to learn with a little distance, and to remind myself, it is empty, empty, empty. Lets stop and see what else needs to be done.

The joys of cocoa and Objective C programming

7

In earlier blogs, I must have complained about the lack of apple support because figuring out how to talk to a USB device seemed so hard. But now I think it is amazing that I was able to use some apple code without any understanding of the structure of the code, and talk to my data both synchronously and asynchronously in USB mode. (I did not tackle the HID side of the story yet).

This is not the first time I have “lifted” some piece of code, assembler code, C functions, etc, because that code does the job, without worrying too much about how I could write that bit of code myself.

But this time, I backed off from the light stone project and I am taking the time to learn Cocoa and Objective C. Ail Ail Ail. MAMA MIA! This is not at all like learning a programming language. It is like learning a high level language like Matlab, Sas, except that it is NOT user friendly, it is programmer friendly, maybe. I have been trying to figure out why learning this “language” blocks me.

A simple example from chapter 14 from Hillegass’s book. This example is supposed to dazzle us with the ease with which we can create a graphic window and draw on it. This ease is achieved by having all the work of creating windows all done for us by functions already written by apple.

But unlike a program like Matlab which hides the bells and whistles from beginners, Cocoa requires you to grab 20 different threads and weave them together. For someone like me who functions on understanding and not on memory, this is very taxing. Not unlike a cooking recipee, except you don’t choose where the ingredients are kept. grab a project from the “File” menu, create a new class from the class menu on “main menu.nib” then grab an icon from “cocoa containers” and drag it on “window”, find the “info” option on the “tools” menu on the “interface builder” … On and on! And I am supposed to remember all this for all the different kinds of interface??? Yak.

The other thing that blocks me is the arbitrariness of the code which is nicely swept under the carpet in the book. Page 224 instructs us to enter the code

– (void)drawRect:(NSRect)rect

{
NSRect bounds = [self bounds];

[[NSColor redColor] set];

[NSBezierPath fillRect:bounds];

}

Voila, no explanation as to what this code does, how it is structured, why this particular code.

The miracle tool on the mac is AppKiDo 0.94. In the kindom of the blind, it is the stick that may just save you from axphyxiation and death from despair.

Type in the method “bounds”, and you find it belongs to NSview. It returns the windows size and coordinates.

type in the method “redColor”, and you find it is a class method which belongs to NSVview.
it is a class method because it is not applied on an instance.
OK so you have an RGB code, what does “set” do? Too many possibilities, better to go to the window, click on NSObject, click on NSColor look under all classes methods and all instances methods, and there is “set”, under instance methods. So apparently redColor applies to a class, but returns an instance, and so “set” is and instance method that says use this color for future drawing. Clear as Mud this beautiful code, no?

NSBezierPath is a class, so fillRect is a class method. it fills the rectangle with the above color. Note that NSArray is another class under NSobject. Now with NSArray, you created an instance of the class with alloc and init, before you used it. Why in this case, we would act on a class to draw in a window instance. Well that is the arbitrariness I am talking about.

At the level of the programmers, it is all very clear and beautiful and grammatical, and built with simple rules all developers can use to build these beautiful programs the user craves for her/his new Mac OSX platform. But at the level of the beginning user, it is all a medley of contradictory invocations best learned by memory. How can such a language replace basic C? YAK.

Log in