Don't get that looped under your foot, you'll get dragged. We've been plowing this field right here, show them Sam. And now, lunch break, not just for humans, but for the horses. And one of the things I was talking about earlier in the barn, you know, what's changed in the world, a lot of things. Happiness has gone down for many people. I saw a survey talking about happiness, 80% of people hate their job. I think one of the things that's happened is people, it's easy to lose your sense of purpose. There's a good book you should read called The Paradox of Choice by Barry Schwartz. And he talks about, they're ready to go, boy, I'm pulling me right up. It talks about how when you have too many choices, you can't make any of them. So what happens is, you just are less happy. You're just like continually overanalyzing everything. I see that with people trying to become entrepreneurs, they hate their job, but they don't want to quit because they're like, what do I quit? Do I do this business, this business, this business? And so 100 years ago, when everybody lived, show them the farm all the way around here, whoa, you pretty much did what your parents did. And we look back at that and we think that's bad. And in some ways, I'm sure that made people unhappy. But it's kind of like one step forward, two steps backwards. We got a lot of choice now in the modern world. We live in big cities where you're continually, you're continually free fertilizer. It's a good thing about horses versus tractors. Tractors pollute, horses fertilize. By the way, I cut my pants, got caught on one of the horse pieces of equipment. Be careful out here.  Any night of the day, there's 50 things to do. There's 50 jobs to choose, there's 50 people to date, there's 50 people to make friends with. People basically go crazy. That's the long and short of it. You should read that book, like I said, Paradox of Choice by Barry Schwartz. Lots of free fertilizer. I'm probably going to put blueberries, blackberries on this hill. This is a south-facing hill, maybe apple trees, some late-blooming ones. You've got to put the late-blooming ones on the south face. So one of the things that I do now to get over this paradox of choice is I come and I got this ranch and I just get away from the city. I get into a routine, simple things. People ask what life's purpose is, and it depends who you ask. A lot of people will say legacy is one common answer, but legacy fades. All flesh is grass, the saying is, the flowers fade. Do you remember who your great-great-great-great-grandfather is? No. And even if you look at your DNA, it gets split in half. So your great-great-great-great-grandchildren are hardly related to you. You might be more related to your neighbor than you are to your great-great-great-great-great-great-great-great-grandchild. So legacy is an okay answer. It's an obvious answer that makes sense, family, things like that. Other people say, you know, maximizing what you have, that's a decent answer. Other people say leaving the earth better than you found it, all these things. I think that the answer sometimes is simpler than that. Like I said, the Native Americans lived here before all the settlers came. They used to just say, you know, what is man without the beast? What are humans without animals? And I think being connected to the land, animals, nature, the natural cycles, winter, spring, summer, fall, this is your purpose, you know? And that's hard to say because 90% of people live in big cities, but the world could change. The demographics should change. If people are asking me what would make them happier, I'm not saying this is an easy answer. For society, I'm just saying this is one answer that I've tested it on a lot of people from the city. If you have high anxiety, which is 30 to 40% of planet earth, you're overstimulated. You know? You got to get to where, like, when I'm here on the ranch, I'm not overstimulated. It's simple. Melt the cow in the morning, feed the horses, put hay, put straw down, plow, plant, you know, you get strong, you don't have to work on a farm, your hands get dirty, and you don't really think, like, what the purpose of life is. That book by Eckhart Tolle called The Power of Now, it's interesting. I never loved that book because people use the power of now to mean, they're really, people have taken it to mean, like, meditation and stuff like that. Which is fine. I'm not anti-meditation, but you can't meditate unless you're the Dalai Lama 10 hours a day. So it's not really a solution. I think what the power of now means is just not thinking about the future, not thinking about the past. Kind of like these horses. These horses are not thinking very far ahead. And horses are pretty happy, at least these ones are. Doc, Duke, you happy? Jerry, Jake, they're learning their names, actually, no. But they're just in the moment. So I think it's less about meditation, it's more about doing activities. It can be a garden if you live in a city. It can be taking care of animals, dogs are good, but you should have more than one species. I see people just get so into their dog, what they end up actually doing is called anthropomorphizing. They turn their dog into a human. You see people, they put like a L.A. Lakers jersey on their dog. They put socks and shoes. The dog hates it. It's almost, I guess people don't have kids anymore, so now they have dogs.  And dogs are happiest when they're out roaming, eating meat, scavenging, all that stuff. And so I think you need to have different animals, and you have different living things around you. And the more you have, the happier you are, unless they're mosquitoes or blood-sucking flies.  Different animals, not all things are lovely. But yeah, that's a simple answer to what the purpose of life is in many ways. People want more complex answers, because they're overthinking everything. We'll walk and talk.  Talk, dude. Horses can pretty much sleep standing up, so they want to go back to that barn. We're going into a different barn, snap, come on. Horses are hard-headed, like people. So try to find something that you enjoy, that simple. Try to find something that's a routine that you have to do every day. Getting in a rhythm is good. A lot of people have to do it the best, daily routine, kind of like our ranch life. You have some chores you do in the morning. Those are kind of repetitive things, but you don't have too much repetitive. Then you get burned out. Then you have some new progress, and you want to be doing things that you're not always thinking about other stuff. If you're always thinking about other stuff, the future, the past, it's not relaxing enough.  I've been testing my blood once every month or two for almost five years. No, sorry, three years. And it's crazy, cortisol levels of humans. People have them in the 20s, in the 30s, if you want them, you know, 10. I've got, sometimes when I come to a ranch, when I test my blood, they drop to like nine or eight. Now you don't want it too low, but cortisol is basically a fight-or-flight stress hormone. And there's a good book, Happiness Hypothesis, by Jonathan Haidt. He talks about doing studies on people as a scientist at NYU.  Even if you think you're zen life, it's not as zen as you think. Come on. Come on, boys. These are four males. I have female horses, but they're at my other place. So I'll open that gate right here. There's a green one. Let's see if they'll fit in there. Boom. Got to rid of this. Show them what the cattle guard is. This was here before I was here. I'm going to get rid of it. It's very annoying. Okay. I don't know if they can get in there. Let's us try. If we go... This will be something to try. We've got to go get two through. Don't cut yourself. Step. Come on. Gee, gee, gee. There you go. Look at that. All right. Can you close that? Step. These gates were not put in quite with these size horses in mind. They were put with little riding horses in mind. These are big boys. They're about... those two over there about 2,100 pounds probably. These eat about 50,000 calories a day each. So they don't go on the Weight Watcher's diet. I don't think you can get a... Can you get a Weight Watcher's diet, Sam? 50,000 calories? No. Oh, that's good. Let's see if we can make it through this little ring. So, find a simple purpose in life, I guess is what I'm trying to say. Don't overcomplicate it. Whoa. Friends, family, be healthy. Keep things simple.  If you get a hose, we're going to run a hose out to that field.  I have to tell myself that a lot. The simpler your life is, actually, believe it or not, the more money you make, too. When I get a business idea and it's too complicated, it never works out. When I just have simple business ideas, like I'm launching a new food brand where we ship you a box of meat, you know, pasture, rotationally grazed grass fed beef and chicken and all that stuff, it's just a simple idea. And those ideas are much more, I mean, any business idea can fail, but it's a lot less likely fail. Is it open all the way? So, make you more money, make you happier, make more time for better people. Like Sigma Freud said, you can't love everybody the same because if you love everybody the same, then you take away time from good people. You got to have simple life so you have time to remember the good people, the people that are your closest friends. They should spend more time with attention, too.


been asked to talk about user interfaces in Guile, how to build them and what you can use them for. So that's what I'm going to do. Can everybody hear me? We can't see all the slides. Well, does anyone know how to change so we can? Just change the resolution to 1024. How do you do that in Geeks? What have you done? It's GaborQ. OK. Terminal. We don't have it. OK, I don't know. These are just normal problems that you get when you're doing presentations. What works on your machine never works on an overhead projector. I suggest we go with it, actually. F11? What does F11 do? I think it's full screen. The windows full screen? Well, you can have half the screen like that. Is that better? Yeah. There you go. Yeah, OK. We'll run with it. So, what is a user interface? A user interface is the means by which the user and the computer interact.  The REPL, which is common for Guile users. And, of course, graphical user interfaces. What does a user expect from their interface? Normally, they want a means to give commands to the system. They've got to be able to tell the computer how to do something and when to do it. They want a means to determine the current state of the system. For example, in a shell, you type ls to see what files there are in the current directory. And a means to get hints about what commands might be appropriate for the current status. So, for example, in a shell, you have modern shells anyway. You've got tab completion, so you can hit the tab key and it will give you a list of possible ways to complete that command. When you're talking about graphical user interfaces, the users expect something somewhat more. A graphical user interface user, he normally wants instantaneous, not when I say instantaneous, what I mean is automatic updates without any perceptible delay. And that should happen without the user actually having to do anything. Whereas a shell user is quite happy to have to type ls again to see what files may have in the last five seconds appeared or deleted. Guru users don't like that. They want to see things when something changes, they want to see it automatically appear on their screen. They want automatic notifications of successes. In the shell, we don't normally like that. If something works after giving in a shell command, we expect it to silently return zero and get on with the next thing.  Guru users, however, prefer normally the ones I've seen, they prefer to see some kind of confirmation that that command worked. They want explicit and verbose notifications of failures. If something doesn't work, they want a very verbose pop-up or something to say that didn't work. Context-sensitive prompts, so they like to see that something... Well, if a command is not appropriate to be entered at that time, then that command should not be there. The button should be grayed out or not even there at all. That's something that you have to think about if you're writing a graphical interface is to only present what is appropriate for the current state. Confidence indicators, if there is a command that is going to take a long time, then they want some kind of indication that the machine is doing something and hasn't just sort of hung. So the exercise which I was charged with undertaking was to write a graphical installer for Geeks SD. We want an alternative to the shell or the REPL because currently on Geeks SD1 the described way in the manual is a number of shell commands to partition your disk, set up file systems, et cetera, et cetera, et cetera. Although many people are quite happy doing that, we think it would lower the barriers to entry if people who find those ways not so easy had an alternative means of doing it. That's what we want. We want to give Geeks SD a graphical installer so that you can install it from a bare machine. But we don't want to force that on people. We want to still give the traditional old timers a way of installing manually and I believe we should actually allow for a compromise if people like doing part of the job themselves they can do but for the other bits which are either too hard or too much of a hassle they can give that off to the program to do for them. So the acceptance criteria were that the installer should be written in Gael because everything else in Geeks is in Gael and Ludo wasn't going to make an exception for me. It should allow a complete installation from nothing, a machine with an empty disk, without having to use a shell or a REPL. But as I said, to allow experienced guys to use it if they want to. Right, it should be available in their own language and keymap.   And the same with the Germans, with the Q and the Z being swapped over. So we want to be able to provide a way to get their own language and their own keymap. It should work on an 80x25 terminal because some machines don't have anything bigger especially some of these little boxes that you see these days. And we want it to be intuitive as possible so that you don't really need anyone to tell you how to use it. More or less straightforward. So how does it work when you're setting up geeks? Well, the task you've got to do, you've got to partition the disk. You must have at least one partition. You've got to say where those partitions or where the file systems on those partitions should be mounted. You've got to tell them what kind of file system that you want. What parameters. Time zone is something that needs to be chosen for the system. The locale, the default locale, obviously each user can set their own one, but the system locale needs to be chosen. Packages, there might be some standard packages. Well, there will be some standard packages that should be available for the entire system as Ricardo said. Usually they're installed. Most packages are installed in the user profile so they don't affect all users. Services, which I think somebody else is talking about services later on so I won't go into too much detail about those, but they need to be chosen. You've got to generate the config. Normally you need a network because geeks is installed over the network. Then you've got to set the whole thing in motion. Those are the things you've got to do. A couple of constraints for this exercise. We cannot rely on any particular video drivers being available because all systems these days have different video systems. We cannot say this install is only going to work if you've got an SGI or an ATI or God knows what. You've got to use the lowest common denominator so that it'll be there when you've got pretty well a bare kernel. Of course we want to keep the installation images small as possible because it has to fit on a USB device. Although they're quite large these days they're not infinite. How does it look so far? That's really a shame that we can't get the entire... Why is it that these overhead projector systems never work? I don't know. How about that? That's more or less what it looks like. There's a menu on the main screen. I can demonstrate this to people who are interested afterwards but actually demonstrating it in real life now won't be... I don't think there'll be the time for that. There's a menu which you can do the steps individually. If a user doesn't want to do the steps individually they can choose the bottom one and it'll do everything and all its dependencies at once. That's the easy way for inexperienced people. But as I said we've got these commands here. That's keyboard for F10 so change the keyboard map. F9 to change the language. So if you want it in German or French or whatever you can or at least you will be when translators have done their job. And if you want a shell you can hit F1 and you will get out to a shell and when you hit exit, when you type exit in that shell you'll come back to where you left off. And those three hotkeys will be available throughout the whole process so you can do that at any time. And because we can't use a video driver we decided to use curses. You're probably familiar with curses. It's a GNU package and it provides an abstraction around the terminal capabilities. Each terminal in the world has a different way of being controlled and curses abstracts that out. So there is a common way to for example draw a box on the screen or move the cursor to position XY on the screen etc etc. It also has a couple of higher level libraries which I might talk about a little bit better but the main curses library is a CAPI. However, as I said earlier, this has got to be written in Gail. So fortunately there is a package called Gail in curses. I think that is Mike Graham here. There he is right at the back. He's the maintainer of Gail in curses. And that is what we've used. And just very briefly going into how those menus work in curses or Gail in curses. It has the means to display a menu like this. The user can move up and down and select items in the menu. If you were writing it in C that would be the interface. Well, you have to create an array of items. Populate that array with a name and description. Create the menu, do whatever you want with the menu and when you've finished it's your responsibility to free that menu and the lines that you can't see down here because of this system you've then got to free the items if you don't want it to leak memory. How do you do that in Gail in curses? Similar way, well how would you do it? Similar way, create a list of names, list of descriptions. Then in this case I've used a map and a lambda expression to create a list of items, each of which is a pair and then create your menu here. So in theory you can do that with Gail in curses and there was a similar thing for forms if you want to create a form entry system which I have done. My experience with them wasn't that successful unfortunately. I found that first of all the way in which the forms and menus in incurses are structured does not really lend themselves to scheme. I found that they were somewhat inflexible. The early versions were actually tended to crash every now and then especially when the garbage collector ran at inappropriate moments and I sent Mike there a few patches and it's got a lot better in recent releases. But I'm still not confident that all the bugs have been ironed out. There are, I have noticed occasions where it works most of the time but then when the garbage collector runs when you don't expect it then suddenly it crashes. And even if that system, those problems have been fixed as I say I don't really think that the interface lends itself to scheme programming. Oh and I'm not absolutely convinced that all the memory leaks have been ironed out. Perhaps we can talk afterwards Mike but yeah I don't mean to pour cold water on your efforts. But anyway either rightly or wrongly I decided not to use the forms and menus libraries of guile incurses. I wrote my own which did an equivalent thing. Small set of modules which did more or less the same written entirely in scheme but using the base curses. So I'm still using guile incurses. I'm just not using their forms and menus implementation. Okay thank you. Well that's an example of how it does it. As we're running out of time I'll skip that but I think that way is a lot easier than the previous way that I showed you. Human factors we have to consider in user interfaces. This was an early screenshot of something I sent out for testing. This form actually got a lot of negative feedback from the people I asked to test and I think the reason is obvious. There are too many controls on this screen. Some of them are not even appropriate. People didn't know what these buttons were going to do which is understandable. It doesn't say. In fact when you check actually runs FSCK, write will run MKFS to create the file system and no, recreate does that. Write would run, yeah, exactly. If you don't know what it's going to do then it's probably a poor design. So that's one lesson that we learned. Don't write your user interfaces too complicated and that's been in the new version. That's been changed quite considerably. Tech info. Yeah, we need to have a system to turn tech info into something that curses can display. Those of you who are familiar with Gile know that there is this existing function called techy fragment to S techy which converts things like, again we can't see this whole thing. The days of our lives with a bold in tech info into something more scheme friendly which is a start of a paragraph, the days of and in bold is hour and we're no longer bold here. That's existing in tech info, in Gile. I had to write a new procedure to actually turn this thing into something that curses will play nicely with and I can show you that later if you're interested.  Well, we've got a reasonably complete curses based installer. It has been sent out for first testing. Users have reported that it does work. They have been able to do a complete installation of Geeks SD without having to resort to a shell and I believe those people have used different hardware and different network systems etc etc. So it basically all works. Problems? Well as I said earlier, the problems that I find is that we are lacking on Gile bindings. Another problem I found is that we there is no current way that I've found to get the kernel to tell us when something has changed. I have to poll it and that is not a nice way of doing things. This is a brief procedure I wrote to get around the first problem, the lack of bindings. What I basically have to do is screen scrape commands. So run a command in a pipe and collect the output that comes on to standard out and then post process it. Also not nice but it does work. Here's how I do my polling for changes. I just use SIG alarm to poll every second. Again not nice but it works but what can one do without the infrastructure? What we don't have yet in the system is mouse support that I'm trying to work out. I'm actually finding that unfortunately where as it can work on a next term you don't have a next term when you boot up your machine. You've got a frame buffer terminal and I'm not sure if that can work with that. LVM, full disk encryption that's not supported as yet and neither is adding users. A lot of people said they want an option to add users. I normally consider that a post installation task but some people like to do it at the time of installation apparently. Here's some ideas that some people came up with and I'm still trying to work out whether they're good ideas or not. Tool tips so that if you hover the mouse over a button that you might get some text saying what it's going to do or you select that button without actually activating it. Switch to question time. Questions? And the new speaker should set up. Okay, so perhaps the new system can come. So, yeah. Okay, questions? Yes? If you had so much trouble with writing Gile end curses, why do you consider writing the end curses things in C and then expose the high level interface to Gile? Well, that's basically what Gile end curses does or tries to do. I didn't have that much trouble writing the menus in Gile. When I wrote my own libraries to do that I had a lot more trouble using the Gile end curses interface. That's the tool they don't.