[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pre-alpha scripting engine

From: Serbinenko Vladimir
Subject: Re: Pre-alpha scripting engine
Date: Thu, 20 Jan 2005 19:34:17 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Yoshinori K. Okuji wrote:

On Thursday 20 January 2005 18:10, Serbinenko Vladimir wrote:
The problem with guile is that it has no $ before variable which
makes it difficult to integrate with shell. I discovered that bash
and PHP can even coexist!!

As I said, Lisp is not good, because it is too difficult to use on the command-line interface. But I don't know if PHP is easy to use on it. I used PHP many years ago, but I forget it.

But I don't know bash very well so if I'm wrong please e-mail it. Now
I'm rewriting the parser for easier integrating(thanks Marco).

There are many differences. The critical point is that you cannot write this in PHP:

kernel /boot/vmlinuz root=/dev/hda1
Normally not but it's easy to extend it

This is not a valid expression in PHP. If you want to do the same in PHP, it could look like this:

kernel("/boot/vmlinuz", "root=/dev/hda1")

As I mentioned in the previous mail, I don't think it is a good idea to have multiple languages. So the important question here is if you want to use PHP on the command-line interface or not. I suspect that this is not feasible.

Imho multiple languages will just wasting of time. As a matter of fact my prevous letter was just some thoughts

If your intention is to make your scripting engine standard in GRUB, I'd recommend considering what you really want to do with a scripting language under GRUB. IIRC, you haven't described what your motivation is.

My motivation is an automatisation of booting e.g. run different commands depending on circumstances (time, system crash, wake-on-..., undoing booting preparation(hide,unhide,...))

I think the choice of a scripting language depends on what we really want to address. In other words, what do we want to define as the scope of a scripting language? Do we want to remove C code as much as possible, or, do we want to have a merely preprocessor? It is not a new idea to have a scripting language to make low-level functions (suppose Forth on Open Firmware), but I doubt if this is worth doing, because writing an interpreter can be more complex than writing device drivers.

I think that low-level scripting language will be an error but perhaps some easy scripts like running cmp with MBR and file parsing its output and pausing booting if difference detected


So I'm waiting for your decision about language. But after all now I think that bash will be good idea

Grub-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]