froggey / Mezzano

An operating system written in Common Lisp
MIT License
3.52k stars 188 forks source link

Commandline in Mezzano #194

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi all!

It would be possible to modulate apps on Mezzano-os? For example, is it possible to have a command line like apt-get to install some app? Something close to Ubuntu or Debian?

msiism commented 1 year ago

I've only tried Mezzano once and don't know much about it. But let me say, just for the record, that adopting a package management interface like Debian's apt-* is probably not the best idea.

ghost commented 1 year ago

Hi msiism! why... is probably not the best idea?

ghard commented 1 year ago

There is GUIX, which, I presume would be a better match.

msiism commented 1 year ago

Hi msiism! why... is probably not the best idea?

The apt-* command suite may work pretty well, most of the time. It does for me. That said, it's a pretty big and complex interface. Yet, some things remain quite cumbersome to get done with just the standard commands.

In Mezzano's case, it's probably wiser to design a package manager from scratch and try very hard to keep that design simple.

ebrasca commented 1 year ago

We already have one , it is Quicklisp!

avodonosov commented 1 year ago

As for Quicklisp, are these instructions valid? http://mezzanos.herokuapp.com/static/developers/quicklisp.html

You can can use most quicklisp programs on Mezzano

Here is an example of loading the cl-html5-parser on Mezzano

Copy your quicklisp directory and paste it into the MBuild/Mezzano directory Run (load "quicklisp/setup.lisp") in Mezzano's REPL Now you can load most quicklisp programs, like cl-html5-parser" (ql:quickload :cl-html5-parser)

ghost commented 1 year ago

Hi all!

  1. In Mezzano's case, it's probably wiser to design a package manager from scratch and try very hard to keep that design simple.

So msiism... there is unix-opts: "Unix-style command line options parser" - this lets you create the kind of command line I want. Also, Mezzano-os supports quicklisp and with unix-opts this would be possible.

  1. We already have one , it is Quicklisp!

So ebrasca... there is clpm/clpm: "CLPM is a project manager for Common Lisp. It can manage projects in both global and project specific contexts. It would be called a "package manager" in most other contexts, but the use of "package" unfortunately collides with the use of "package" in the Common Lisp spec as a namespace for symbols." In this sense I would like the compatibility of quicklisp, clpm and unix-opts in Mezzano-os?

froggey commented 1 year ago

I don't want a unix-style command line on mezzano, I'd much rather take inspiration from the lisp machine

ghost commented 1 year ago

Hi froggey! If you can clarify my doubts, I would be happy for the feedback.

I don't want a unix-style command line on mezzano, I'd much rather take inspiration from the lisp machine

But.... I would like to install Mezzano-os over the local network, I would find it easier to configure a file by command line... So...

  1. What do you think about it? about this specific case?
  2. How could I install Mezzano-os to several machines if not from the command line?
metayan commented 1 year ago

Mezzano is run directly on hardware ("bare metal") or in a virtual machine (QEMU/VirtualBox).

A virtual machine with Mezzano can be started from the command line.

If you wish to boot several machines with Mezzano over the local network, it should be possible to create an image that can be booted with for example TFTP. (I have been wanting to try this for quite a while and recently installed a TFTP server for this purpose.)

ghost commented 1 year ago

Hi metayan!

If you wish to boot several machines with Mezzano over the local network, it should be possible to create an image that can be booted with for example TFTP. (I have been wanting to try this for quite a while and recently installed a TFTP server for this purpose.)

So... I would find it easy if I had a command line to configure the Mezzano operating system them together with some local network package something like tftp. So... I like the idea of a lisp machine and the unix-like idea. Why can't we combine two wonderful things into one?

such that?

apt-get install "filepath\filename.lisp" or # apt-get from quicklisp/clpm
apt-get install "module" --applications or 
apt-get install "module" --net or
apt-get install "filename.lisp" or
apt-get install "filename" or
apt-get install "package or filepath or filename" --folder-name --Mezzano # --Mezzano is root/
lehitoskin commented 1 year ago

This is beginning to sound more like you're trying to administrate and install packages over the network via SSH rather than installing the system itself onto a networked device. Is your goal to simply install the OS or administrate it over the network?

ghost commented 1 year ago

Hi lehitoskin!

This is beginning to sound more like you're trying to administrate and install packages over the network via SSH rather than installing the system itself onto a networked device.Is your goal to simply install the OS or administrate it over the network?

So... would it be possible? But... how do I do this? administer and install packages over the network via SSH instead of installing the system itself on a network device?

ebrasca commented 1 year ago

You can use the REPL over swank , you can then load packages with QL. If you like SSH you may need to implement it or just SSH to the host machine and redirect it to Mezzano.

ghost commented 1 year ago

Hi ebrasca!

You can use the REPL over swank , you can then load packages with QL.

But... how can I do this? what is swank?

If you like SSH you may need to implement it or just SSH to the host machine and redirect it to Mezzano.

So... I would like to make this.... I was trying to use the trivial-ssh library which is written in common-lisp for this. For example...

(ssh:with-connection (conn "ip-address" (ssh:pass "username" "password")) ; Mezzano-os
  (ssh:with-command (conn iostream "ls -a")
    ;; Write or read to/from the iostream
    )
  (ssh:download-file conn #p"/remote/file" #p"/local/file") 
  (ssh:upload-file conn #p"/local/file" #p"/remote-file"))

But... So... Mezzano-os have ssh? or would I have to implement this?

ebrasca commented 1 year ago

trivial-ssh is build on libssh2 and we don't have that in Mezzano.

Here is swank: https://github.com/brown/swank-client

ghost commented 1 year ago

Hi. Is it possible with this? to install Mezzano-os on a local network?

ebrasca commented 1 year ago

If the machine or virtual machine you are running Mezzano on has a supported network device you cat do it.

ghost commented 1 year ago

Hi.

If the machine or virtual machine you are running Mezzano on has a supported network device you cat do it.

Does the README.md file talk about the supported network device? Because... I tried to find this information and couldn't.

ebrasca commented 1 year ago

All the supported drivers are in the driver directory. I am not aware of any documentation about drivers!

ghost commented 1 year ago

Hi all.

All the supported drivers are in the driver directory. I am not aware of any documentation about drivers!

So... I would find it interesting to add the architecture information supports x86 etc and also the supported driver in the README.md file... so... there is an open request or issue about adding this information to the readme.md file here: Can the supported platforms be added to the README?

Anyway, I would like to say thank you to everyone for your patience and relevant information. I think I know what needs to be done for what I need with Mezzano-os. So... all my questions have been answered, I will close this issue.