Cannot start the "HelloWorld" program.

69 views
Skip to first unread message

Hans Schüren

unread,
Aug 22, 2015, 5:00:23 PM8/22/15
to inferno-os

I have installed the Inferno Folder under Win XP   C:/inferno.

Now i follow the steps from the book "Inferno Programming with Limbo" from Phillip Marbell.

Go into the directory Inferno/NT/386/bin  and starting  emu.exe.

Now iam typing "wm/logon".

There is the error message : 
; wm/logon
logon: must run under a window manager
wmlib: no draw context
;

ok. that does not work.

Now i try  wm/wm.  And the IDE is starting.

In the book i see that i have to add a new user.

Also there is the information that the user has to be in the "usr" folder.

A folder has to be created with my name and the contents of lib/keyring/charon/ etc.

There is the information that in theese folders all user information is enclosed.

The directories have to been made with the command  "mkdir".

ok. But how are they made ? From a shell. From a acme.

There are no exact instructions and examples how to make the directories from Inferno.

That is strange at this point.

I suppose to get clear instructions to make a new user . step by step.

There i see in Figure 1.7 in the book an picture instruction from the shell with an example how Mr. Marbell is creating anew user.

I decide to follow theese instruction too.

Type the following  :

% cd / keydb
% lc
countersigned keys             signed
% changelogin pip
sh: changelogin: ' ./changelogin' file does not exist
% changelogin
% changelogin: './changelogin' file does not exist

Now i am frustated , because that is not functioning.

There are no other descriptions elsewhere. Not in "Descent into Limbo" or other.


I am not nuts.

I realised that in limbo a programm is structured in modules.
A program consists of two files one .m  and one .b.
They are working together and the result is the independent .dis file.
The files have to be in the "usr" folder where all other user informations are enclosed.
So far so right.


I go on  "Files" in the IDE menue and see the message :

plumb: can't read /usr/Hans Schueren/lib/plumbing: '/usr/Hans Schueren' does not exist
plumb: can't read /usr/Hans Schueren/lib/plumbing: '/usr/Hans Schueren' does not exist
ftree: can't start plumber: init
ftree: no plumber

Thats reasonable because i dont have created a new user.  How should i do that ?


ok.  Now i have decided only to start the "Hello World" program.   Only start and see
      Nothing more.


See the Hello world instructions on page 26.   2.2 Hello World.

I type the code in the inferno shell :

% #File : helloworld.m
% HelloWorld : module
sh: HelloWorld:  ' ./HelloWorld' file does not exist
%

Wow. A good example.  Whats that ?
I am not nuts.
If i want to write a programm is there made as file automatic , together with the coding and debugging ?
Or do i have to make the files first. Optional work.
Why is that not described step by step anywhere ?

I decide to take the "A descent into limbo"  Hello world code.  Site 3

Type in the shell :

% implement Hello ;
sh: implement:  './implement' file does not exist
%

Oh my good.  What is that for a nonsense ?


Not possible to start the "Hello World" minimal program.


The question is :

If i want to write a program , how to make the  .m and  .b  files ?

How can i create a new user.


What are the steps ?


There is only programming code described where the .m  and .b files alredy exist.

But the are not there.

That makes no sense.

Normally i am making a code in the shell and THEN  save that code a a file.


















Pete

unread,
Aug 22, 2015, 8:35:47 PM8/22/15
to infer...@googlegroups.com
On 2015年08月22日 14:00, Hans Schüren wrote:
>
> I have installed the Inferno Folder under Win XP C:/inferno.
>
> Now i follow the steps from the book "Inferno Programming with Limbo" from
> Phillip Marbell.
>
> Go into the directory Inferno/NT/386/bin and starting emu.exe.
>
> Now iam typing "wm/logon".
>
> There is the error message :
> ; wm/logon
> logon: must run under a window manager
> wmlib: no draw context
> ;
>
> ok. that does not work.

The way to do that is 'wm/wm wm/logon'.

> Now i try wm/wm. And the IDE is starting.
>
> In the book i see that i have to add a new user.
>
> Also there is the information that the user has to be in the "usr" folder.
>
> A folder has to be created with my name and the contents of
> lib/keyring/charon/ etc.

Once you're in the window manager, you can pop up a shell and just copy
/usr/inferno to /usr/$your_username. That's all it actually takes to
create a user, until you want to do authentication across machines.

> ok. But how are they made ? From a shell. From a acme.

You can do that from a shell. You can even do it from the host OS by
just going into usr/ inside the Inferno tree and doing a direct copy.

> There i see in Figure 1.7 in the book an picture instruction from the shell
> with an example how Mr. Marbell is creating anew user.
>
> I decide to follow theese instruction too.
>
> Type the following :
>
> % cd / keydb
> % lc
> countersigned keys signed
> % changelogin pip
> sh: changelogin: ' ./changelogin' file does not exist
> % changelogin
> % changelogin: './changelogin' file does not exist
>
> Now i am frustated , because that is not functioning.

You have to run it as auth/changelogin, and you've got to have the key
server running. But for just running "Hello, World!", that's not
necessary until you want to set up a network.

> There are no other descriptions elsewhere. Not in "Descent into Limbo" or
> other.

Well, those are about the Limbo programming language, so they just have
a bit of cursory information.

You can read some more about setting it up if you like here:
http://www.ueber.net/who/mjl/inferno/getting-started.html . That covers
everything, starting from the beginning, and all the way through "Hello,
World!". It should explain all the paths in the OS.

> A program consists of two files one .m and one .b.
> They are working together and the result is the independent .dis file.

You don't strictly need the .m for a standalone program, but it doesn't
hurt.

> The files have to be in the "usr" folder where all other user informations
> are enclosed.

Those you can actually put anywhere, but you probably want to work from
your home directory, which is /usr/$your_username.

> I go on "Files" in the IDE menue and see the message :
>
> plumb: can't read /usr/Hans Schueren/lib/plumbing: '/usr/Hans Schueren'
> does not exist
> plumb: can't read /usr/Hans Schueren/lib/plumbing: '/usr/Hans Schueren'
> does not exist
> ftree: can't start plumber: init
> ftree: no plumber

Right; your username in this case is 'Hans Schueren', and there is no
home directory named that yet. Also, Inferno doesn't do well with
spaces in filenames. Luckily, there are no "special" users in this OS,
so you can type any name you like in the prompt that wm/logon gives you.
Try copying the files in 'inferno' to 'hans' and logging in as 'hans'.
You can also just log in as 'inferno' if you have trouble with that,
since it acts as the template for the other home directories.

> See the Hello world instructions on page 26. 2.2 Hello World.
>
> I type the code in the inferno shell :
>
> % #File : helloworld.m
> % HelloWorld : module
> sh: HelloWorld: ' ./HelloWorld' file does not exist
> %
>
> Wow. A good example. Whats that ?
> I am not nuts.

You can't type Limbo code directly into the shell.

> If i want to write a programm is there made as file automatic , together
> with the coding and debugging ?
> Or do i have to make the files first. Optional work.

Yep, you have to make a file, then compile the code. There's a simple
editor that ships with the OS; it's in the menu under 'Edit', which even
has some syntax highlighting if you like that. You can also use Acme,
which is usually the preferred editor, but it has a somewhat higher
learning curve.

> I decide to take the "A descent into limbo" Hello world code. Site 3
>
> Type in the shell :
>
> % implement Hello ;
> sh: implement: './implement' file does not exist
> %
>
> Oh my good. What is that for a nonsense ?

Well, if you try to type it into the shell, it'll look for a program
called 'implement', which is why the shell is saying that a file called
implement doesn't exist.

> Not possible to start the "Hello World" minimal program.
>
>
> The question is :
>
> If i want to write a program , how to make the .m and .b files ?
>
> How can i create a new user.
>
>
> What are the steps ?

Hopefully that should answer the questions.
Reply all
Reply to author
Forward
0 new messages