Re: FICL breakage...

1999-10-02 Thread Joe Abley

On Wed, Sep 29, 1999 at 11:05:49PM +1200, Joe Abley wrote:
 On Wed, Sep 29, 1999 at 12:02:09PM +0200, Mark Murray wrote:
  There is breakage in the new FICL. This fixes it...
  
  [awk diff]
 
 I remember a long time ago someone asked me to make some modifications
 to softcore.awk to compress the textual ficl keywords by eliminating
 double-spaces and newlines, and that kind of thing.

Modifications have been made; patch in kern/14087. It produces
identical output to the new softcore.pl for my test case of

  cat sys/boot/ficl/softwords/*.fr

People (more) familiar with ficl syntax might like to craft some
awkward constructs and check that I'm handling them legally.

Note that the script contains one gawk-ism (use of strftime() to
include a cosmetic "last update" comment in the generated
softcore.c). In my opinion, this should be eliminated -- it seems
like a needless GNUism to me.

gawk(1) says that the use of the character class [[:space:]] is
consistent with POSIX 1003.2 (and I have no reason to disbelieve
it). However, [[:space:]] also seems to be frequently misunderstood
by other common awks, so it might also be considered a candidate for
removal in the interests of portability. The alternative is a bit
messier, though, and not necessarily portable across different
locales.


Joe


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: FICL breakage...

1999-10-01 Thread Daniel C. Sobral

Warner Losh wrote:
 
 In message [EMAIL PROTECTED] "Daniel C. Sobral" writes:
 : OTOH, if we are still perl-safe, I could send you the newer perl
 : script, so you can adapt from that.
 
 FWIW, one mus have perl installed to build a kernel.

Yeah, but one must have world installed to build a kernel. Having
perl as part of TOOLS is the thing that sucks.

--
Daniel C. Sobral(8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Rule 69: Do unto other's code as you'd have it done unto yours


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: FICL breakage...

1999-09-30 Thread Jordan K. Hubbard

 Anyway, all good to know. There are almost certainly more perl
 speakers than awk speakers these days, so it probably makes sense
 to do these things in perl rather than awk.

I think that's sort of in the grey area.  There are also many Hardened
Traditionalists(tm) like myself who don't know perl and have no
interest in learning it because everything they ever need to do can be
handled by sh, awk and sed and they spent many years gaining that
level of proficiency with them.  We could color our ls and replace sh
with bash too, but sometimes there's value in retaining the simpler
traditions as you also go forward with the newer tools. :-)

- Jordan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: FICL breakage...

1999-09-30 Thread Oliver Fromme

Jordan K. Hubbard wrote in list.freebsd-current:
   Anyway, all good to know. There are almost certainly more perl
   speakers than awk speakers these days, so it probably makes sense
   to do these things in perl rather than awk.
  
  I think that's sort of in the grey area.  There are also many Hardened
  Traditionalists(tm) like myself who don't know perl and have no
  interest in learning it because everything they ever need to do can be
  handled by sh, awk and sed and they spent many years gaining that
  level of proficiency with them.  We could color our ls and replace sh
  with bash too, but sometimes there's value in retaining the simpler
  traditions as you also go forward with the newer tools. :-)

Not that anybody actually listens to me, but I have to say that
I completely agree with Jordan.  Knowing both perl and awk, I
like awk a _lot_ better.  It is definitely much easier to learn
and to use.  (You _have_ to learn it first, of course, but if
you already know C, you know 90% of awk.)  A lot of my scripts
begin with #!/usr/bin/awk -f  ;)

In fact, I learned perl first and did quite a lot of things
with it.  However, when I became more familiar with awk, the
deficiencies of perl became more and more obvious to me.  So I
started porting my old perl stuff:  to sh, to awk, to C, or
whatever seemed most appropriate.  (I still have some perl
scripts left, just because they work, and lack of time to
convert, or because someone else wrote them without too much
care, rendering them unreadable and unmaintainable -- a common
problem with perl.)

Just my 0.02 Euro...

Regards
   Oliver

PS:  If you need something ported to awk or written in awk,
just let me know.  :)

-- 
Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany
(Info: finger userinfo:[EMAIL PROTECTED])

"In jedem Stück Kohle wartet ein Diamant auf seine Geburt"
 (Terry Pratchett)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: FICL breakage...

1999-09-29 Thread Joe Abley

On Wed, Sep 29, 1999 at 12:02:09PM +0200, Mark Murray wrote:
 There is breakage in the new FICL. This fixes it...
 
 [awk diff]

I remember a long time ago someone asked me to make some modifications
to softcore.awk to compress the textual ficl keywords by eliminating
double-spaces and newlines, and that kind of thing.

I don't believe I ever got around to doing it at the time, but I'd
be more than happy to implement the changes now if (a) someone could
remind me what the compression logic should be, and (b) someone could
confirm that these changes haven't already been made :)

If I sound vague, it's because I am without a FreeBSD box right now,
and do not have an easy way to check the source tree.


Joe


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: FICL breakage...

1999-09-29 Thread Daniel C. Sobral

Mark Murray wrote:
 
 Hi
 
 There is breakage in the new FICL. This fixes it...
 
 diff -u -d -r1.2 softcore.awk
 --- softcore.awk1999/01/22 23:52:57 1.2
 +++ softcore.awk1999/09/29 09:47:30
 @@ -91,6 +91,6 @@
printf "\"quit \";\n";
printf "\n\nvoid ficlCompileSoftCore(FICL_VM *pVM)\n";
printf "{\n";
 -  printf "assert(ficlExec(pVM, softWords, -1) != VM_ERREXIT);\n";
 +  printf "assert(ficlExec(pVM, softWords) != VM_ERREXIT);\n";
printf "}\n";
  }

/me wonders how did this got to _not_ be committed.

Well, that's why I wanted some disk space to make a test compilation
of the changes I was about to commit...

--
Daniel C. Sobral(8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Rule 69: Do unto other's code as you'd have it do unto yours



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message