Re: FICL breakage...
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...
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...
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...
> 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...
On Wed, Sep 29, 1999 at 09:22:36PM -0400, Garrett Wollman wrote: > < said: > > > On Wed, Sep 29, 1999 at 04:17:50PM -0600, Warner Losh wrote: > >> FWIW, one mus have perl installed to build a kernel. > > > Is that desirable? Or do we need more awk? > > Um, yes. The reason we have Perl in the base system is so that > programs like this can be written -- in a way that (a) doesn't involve > a seventeen-pipeline shell script, and (b) is maintainable by people > whose names are not Aho, Weinberger, or Kernighan. > > -GAWollman > > PS: Yes, I know that awk is standardized. That doesn't make it any > clearer when the program is doing something other than iterating over > each line in an input file. That's pretty much all softcore.awk was doing though, from memory... 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. However, take care not to underestimate the awesome power of awk. When you come down to it, there's an awful lot of userland that (when you come down to it) does nothing more than interate over each line in an input file :) Joe Abley awk-deconstructionist To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FICL breakage...
< said: > On Wed, Sep 29, 1999 at 04:17:50PM -0600, Warner Losh wrote: >> FWIW, one mus have perl installed to build a kernel. > Is that desirable? Or do we need more awk? Um, yes. The reason we have Perl in the base system is so that programs like this can be written -- in a way that (a) doesn't involve a seventeen-pipeline shell script, and (b) is maintainable by people whose names are not Aho, Weinberger, or Kernighan. -GAWollman PS: Yes, I know that awk is standardized. That doesn't make it any clearer when the program is doing something other than iterating over each line in an input file. -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same [EMAIL PROTECTED] | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FICL breakage...
On Wed, Sep 29, 1999 at 04:17:50PM -0600, 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. Is that desirable? Or do we need more awk? This is _not_ a loaded question :) Joe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FICL breakage...
In message <[EMAIL PROTECTED]> Joe Abley writes: : > FWIW, one mus have perl installed to build a kernel. : : Is that desirable? Or do we need more awk? It simply is. It would be very hard, imho, to replace doug's perl scripts with awk ones. However, my knowledge of perl >> awk, so there maybe some awk tricks that would make it easier. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FICL breakage...
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. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: FICL breakage...
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
Re: FICL breakage...
Joe Abley wrote: > > 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 :) AFAIK, you the changes weren't made. Alas, FICL's author, John Sadler, has optimized the perl script. The main reason for using awk instead of perl was removing a world dependency on perl. It seems we are definitely committed to perl nowadays, so it might be better to just use the newer perl script. OTOH, if we are still perl-safe, I could send you the newer perl script, so you can adapt from that. Mike, what would you prefer? -- 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
Re: FICL breakage...
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
FICL breakage...
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"; } M To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message