1. Re: EUPHORIA Digest - 20 Jun 1998 to 21 Jun 1998 (#1998-35)

At 12:00 AM 6/22/98 -0400, Automatic digest processor wrote:
>Date:    Sun, 21 Jun 1998 08:40:42 -0400
>From:    Irv <mountains at MINDSPRING.COM>
>Subject: Re: EUPHORIA Digest - 19 Jun 1998 to 20 Jun 1998 (#1998-34)
>
>At 05:03 PM 6/21/98 +0700, Andy Kurnia wrote:
>>If you can suggest me, *without paying,* how to get Euphoria to increase
>>the 300 line limit, I will stop complaining.
>
>Hmmmm...isn't RDS offering credits toward a free copy to people who write
>useful stuff? That would be one "free" way to avoid the 300 limit.
>All you need is 50 or 60 votes.

Does that offer apply to non-registered Euphoria programmers? I see no "no"
in %EUDIR%\DOC\WEB.DOC, but I see no "yes" either. Confirmations, RDS?

>On the other hand, I wrote my GUI database and game(s) without using
>a registered version. It isn't that hard; the Euphoria debugger and trace
>work just fine - better than most commercial compilers I have used.

GREAT! Teach me how you did that everytime. smile
(are you registered?)

>Date:    Sun, 21 Jun 1998 09:25:39 -0400
>From:    Alan Tu <ATU5713 at COMPUSERVE.COM>
--
>Date:    Sun, 21 Jun 1998 11:18:22 -0400
>From:    Irv <irv at ELLIJAY.COM>
--
>Date:    Mon, 22 Jun 1998 10:24:50 -0700
>From:    Monty King <boot_me at GEOCITIES.COM>
--
>Date:    Sun, 21 Jun 1998 15:49:23 -0300
>From:    Daniel Berstein <daber at PAIR.COM>
>Subject: Re: ex bloatware?

Thanks for your replies, but most of you did not understand as well as Rob
Craig did: "make a stripped down ex.exe for binding". smile

>Date:    Sun, 21 Jun 1998 16:23:06 -0400
>From:    Robert Craig <rds at EMAIL.MSN.COM>
>Subject: Re: ex bloatware?
>
>> make a stripped down ex.exe for binding.
>
>I once estimated I might save 20K or so by eliminating
>the debug/trace code in bound executables. I don't think
>it's worth it. It makes life more complicated for me and
>users. It means extra testing, extra possibilities of bugs
>etc. It would mean a larger EUPHOR20.ZIP file. I'd have
>to build and test at least 6
>different versions of Euphoria for each release:
>ex PD, ex Complete, ex Stripped Down, plus 3 more
>for Windows, and 3 more for any new platform. No thanks.

I would volunteer testing that.

You can do like probably you have done for complete/PD...

#ifndef STRIPPEDDOWN
void do_activate_trace(void) {
    open_editor();
    ...
}
#endif

    ...
    else if (command == ACTIVATE_TRACE)
#ifndef STRIPPEDDOWN
        do_activate_trace();
#else
        ;
#endif
    ...

>    * it's rather difficult to add to the current Euphoria parser

make an internal function
func(expected, {values})
that will evaluate values left to right, turning nonzero to 1, and once
expected (either 0 or 1) is found it does not evaluate more elements, and
immediately return that last 0-or-1 value.

&& is func(0, {values})
|| is func(1, {values})

>    * I don't really want to introduce 2 new keywords that
>      have almost the same meaning as AND and OR.
>      This is supposed to be a simple language.

but you do want to keep that badly colored trace viewer sad

>    * Euphoria  is not like C. Euphoria has boolean expressions
>      where the result can be an atom *or a sequence*, and you

&& and || are supposed to evaluate only atoms, and will bomb out with an
error message if anything inside is a sequence.

and and or are supposed to evaluate objects, be they atoms or sequences.

>      But what about:
>             x = 1 or expression

with:
x = 1 || expression
if expression is atom then if it is 0 then return 0 else return 1 else error

>Bottom line: I'm not planning to proceed with this.

sad

What about ?: ?

>but I haven't done it, because I think people more often
>want to read up to some delimitter, rather than simply

Why not allow changing that delimiter (not always \n, e.g. up to EOF)?

In perl you can say: undef $/;

>Date:    Sun, 21 Jun 1998 16:22:27 -0400
>From:    Arthur Adamson <euclid at ISOC.NET>
>Subject: Edom 2.02
>
>Disk-read time for -----get(...)                              :    3.03 Sec
>Disk-read time for edo_save(...)                              :     .65 Sec

get compared to edo_*save*???

>Date:    Sun, 21 Jun 1998 22:44:16 +0200
>From:    Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL>
>Subject: Re: EUPHORIA Digest - 19 Jun 1998 to 20 Jun 1998 (#1998-34)
>
>>poor guy like me. Registered users (including Ralf) please keep your mailer
>
>I'm not registered blink

You're NOT!? Surprising blink smile

>So I could write those large libraries with a unregistered version.

Great, Ralf, I need to learn from you (and Irv) how! smile

>2) Let a type function turn tracing on instead of return FALSE and make your
>program crash like with an '300 statements limit'

I don't understand this, Ralf, please explain.

>And off course I push Euphoria down every programmers throat that hasn't
>heard of it in newsgroups, colleges, teachers, etc. So I maybe a introduced
>a few new people to Euphoria blink

I do that too smile, but most people I introduced it to has either a Perl
background (in which case all of them rejects Euphoria, saying "Perl can
already do lots of things, why bother?", to which I must agree), or BASIC
(in which case they simply say, "what's this sequence thingy, I don't
understand at all!!! What should I do to 'DIM'? ..." and I couldn't explain
it that well). A side note: these BASIC believers do not have internet
access and do not subscribe to EUPHORIA list.

>Date:    Mon, 22 Jun 1998 10:04:21 +1200
>From:    "BABOR, JIRI" <J.Babor at GNS.CRI.NZ>
>Subject: Re: ex bloatware
>
>Robert Craig wrote:
>>    * if I change AND and OR to operate in the short-circuit
>>       manner, existing programs will break. I had no trouble
>>       finding at least 3 programs on the Euphoria Web site
>>       that would break if short-circuit were used (since function
>>       calls might be skipped).
>
>Small price to pay. Please, break them!  Jiri

Hmm, that would be rather cruel (especially if those are Ralf's programs,
is he 16 or 17 now, I forget), but I would really welcome a left-to-right
&&, left-to-right ||, and perhaps ?: that only evaluates the condition and
the selected operand.

Actually, &&, ||, and ?: canNOT be programmed in Euphoria easily.

However, if we had the short-circuit operators INSTEAD, I can write the
complete-evaluation operators easily...

for: x and y --> you use: (x * y) != 0
for: x or y ---> you use: ((x != 0) + (y != 0)) != 0
for: x ? y : z (evaluating all 3) --> use:
    function iif(integer cond, object ift, object iff)
        if cond then
            return ift
        end if
        return iff
    end function

>Date:    Sun, 21 Jun 1998 18:47:28 -0400
>From:    Robert B Pilkington <bpilkington at JUNO.COM>
>Subject: Re: ex bloatware
>
>Hmmm, a new keyword, "with short_circut", that would default to "without
>short_circut"?? Unless a "with short_circut" is encountered, the
>short_circuts are automatically off.

Agreed, except:
 1. that it's short_circuit -- ends with "cuit" not "cut" smile
 2. I don't think it would be easy for Rob to implement.
 3. that it'd be hard to determine if a particular expession is with or
    without short_circuit.

>As for the ~180k size with EX.EXE's bound programs, I think that for
>large programs, the size is very acceptable, but for a small program (say
>binding a modified BUZZ.EX for a friend), the size is a bit big. All that
>means is that I need to give my friend EX.EXE and shroud all my files to
>give him, and include .BAT files to execute the stuff.

Right, it is very acceptable for an IE clone but not a mailer. (Alan, do
you read this?)

I don't feel like sending ex.exe with a data file and a .bat file though,
it's unprofessional.

>Date:    Sun, 21 Jun 1998 21:51:15 -0400
>From:    Irv <irv at ELLIJAY.COM>
>Subject: Re: ex bloatware
>
>Borland's Turbo-- languages have had this ability to "short circuit" boolean
>evalsfor a long time. And I haven't used it, ever, as far as I can remember.

Note that in Borland, short-circuit IS THE DEFAULT.

As I have demonstrated above, cloning a complete evaluation would be easy
and won't cost too much out of the 300 statements.

One joke: if you have Borland or Turbo Pascal, try the following programs:

SHORT.PAS

{$B-}
function a : boolean; begin write('left'); a := true end;
function b : boolean; begin write(' to '); b := true end;
function c : boolean; begin write('right'); c := true end;
begin if a and b and c then writeln end.

COMPLETE.PAS

{$B+}
function a : boolean; begin write('left'); a := true end;
function b : boolean; begin write(' to '); b := true end;
function c : boolean; begin write('right'); c := true end;
begin if a and b and c then writeln end.

They not only differ in the compiler setting, but they also differ in
OUTPUT! Try it, it's a Borland (now Inprise)'s undocumented feature smile

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu