grub-devel
[Top][All Lists]
Advanced

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

Re: Pre-alpha scripting engine


From: Yoshinori K. Okuji
Subject: Re: Pre-alpha scripting engine
Date: Thu, 20 Jan 2005 18:56:47 +0100
User-agent: KMail/1.7.1

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

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.

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.

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.

Okuji




reply via email to

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