1. (No Subject)

LOGOFF EUPHORIA


Angelfire for your free web-based e-mail. http://www.angelfire.com

new topic     » topic index » view message » categorize

2. (No Subject)

Here are some excellent interface design books people might find interesting and
useful:

* Interface Design: The Art of Developing Easy-to-Use Software,  (005.12/47).
Bickford, Peter (1997).
San Diego: Academic Press

* Secrets of Effective GUI Design.
Minasi, Mark (1994).
Alameda:  SYBEX Inc.

* Designing Visual Interfaces : Communication Oriented Techniques.
Mullet, Kevin; Sano, Darrall (1995).
Englewood Cliffs: Prentice Hall PTR

Also 'The Icon Book' (Details not known).

To RDS : Please trim the 'Recent' Contributions page, or at least categorise it
and split it into multiple pages, as it takes forever for Netscape (v2-v4) to
format.

To Dave Cuny: If you still have a copy of my LANG.E can you send it to me
please.

---
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

3. (No Subject)

[ Short Circuiting ]
If Euphoria finds an if containing all ands it may be able to short circuit
if it only calls internal functions.

[ Repartionong ]
There is a shareware/freeware program callled FIPS which will repartion and not
harm any of your data (Doesn't Format) but you need Defrag or Norton Speedy Disk
or a similar defragmantation program. <Comment Removed To Prevent Jinxing>

[ Linux ]
Red Hats is supposed to be a good Linux.

[ Hayes ]
Very Good. Looked at it for the first time. However you may wish to widen your
doors etc as it is very hard to position him right to open it.

[ WinMan ]
Like the Open Look, Highlight on over display, except it's annoying over the
title bars.

[ PP ]
Thanks for the version David.
---
Sincerely,
Mathew Hounsell
Mat.Hounsell at Mailexcite.Com




Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

4. (No Subject)

[ Types ]
Hawke wrote : "
        type byte(object x)
                return x>=0 and x<=255
        end type
would euphoria then make the declaration:
        byte LittleNumber
into an honest to goodness 'byte' and LittleNumber would then only consume *one
byte*?"

No! Little number would be an object. Even
        type byte(integer x)
                return x>=0 and x<=255
        end type
Still wouldn't be a byte as x is an integer ( a C long, a QWord, a 32bit Number
)
Besides on a 32bit machine the hardware likes 32bit numbers better.

Is the small penalty for built in types too much for cleaner code.
You should  *Never* have to *Guess* what your code is going to do.
I rarely use user defined types myself.

[ Constants ]
"Avoid Magic Numbers." This is a rule I have abided by and it is a rule that
helps me continually. A Constant is more of a way to improve readability and
maintance. Atom Constants are inlined anyway.

[ Case Sensitivity ]
I sort of agree with Jiri. You shouldn't be allowed to have Done, done, DONE as
different variables. But if you only have done you shouldn't be allowed to use
Done.

[ Comma Seperators and Currly Brakets ]
The comma is a good *clear* delimeter. {} were probablely chosen as the sequence
indicators as [] & () are used elsewhere and there are no other brackets on a std
keyboard.

[ Long Keywords ]
Euphorias keywords are perhaps a little to long. So change ed/ee to expand and
auto complete abbreviated ones.

[ The Future ? ]
Everything needs to evolve, even Euphoria. That is why robert is considering +=,
-=, /=, *= as they remove clutter.

A string type might be nice. Why include one?  Because a string is not logically
a sequence, you place only characters in them. I would have gone barmy if
everything was an object.  Most user interface use strings in some way and they
would optomise to be much smaller and faster than a sequence counter part.


[ Nate ]
You keep on sticking your foot in your mouth. If you don't have something to say
relating to programming, don't say it. Keep your views to yourself. It will make
life easier, as tact is a very necessary skill to have.

-----
Sincerely,
Mathew Hounsell
Mat.Hounsell at Mailexcite.Com


Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

5. Re: (No Subject)

Mathew Hounsell wrote:
> would euphoria then make the declaration:
>         byte LittleNumber
> into an honest to goodness 'byte' and
> LittleNumber would then only consume *one byte*?"
> No! Little number would be an object.
that's what i thought... would be very very nice, indeed,
if the interpreter would optimize, based on the range of
allowable values, 'types' declared by us into the smallest
possible machine size.  Of course, by smallest I mean
the smallest size that is the most efficient.

This premise leads to my next reply:(major snippage)
>Constants/Strings
>Atom Constants are inlined anyway.
>A string type might be nice. Why include one?
>Most user interface use strings in some way and
>they would optomise to be much smaller and faster
>than a sequence counter part.
I like the idea of an optimized string type, provided
you *cannot* insert a 'sequence' into it, but only
characters or sets of single dimension characters.
As it sits right now, and it's rather ludicrous, you
can insert a multidimensional sequence into a variable
that was declared:
   sequence Mary
   Mary = "Mary had a little lamb,"
Note: i used "" here, not {}.
Later on you can do (perhaps hard to catch) wild things
to that variable.
if you make this assignment:
   Mary = Mary & "whose fleece was white as snow;"
you get this result:
105,116,101,32,97,115,32,115,110,111,119,59}
looks good, right?
but what if you used (logically, to me, it should
be the same) the following instead:
   Mary = append(Mary,"whose fleece was white as snow;")
well you get the following:
 116,108,101,32,108,97,109,98,44,
 {119,104,111,115,101,32,102,108,101,101,99,
  101,32,119,97,115,32,119,104,105,116,101,32,
  97,115,32,115,110,111,119,59}
}
so now we've got this really bizarre 'string' within a
'string' thing going on here...
So, if strings become their own type, i vote emphatically
that this example of string/sequence manipulation
be illegal, most improper, taboo, verboten, ixnay,
and 'oh bad form ol chap'. [in that order :)]
in fact, i wouldn't mind one single bit if the next
update to euph made this illegal.  that is:
sequences and sequence constants defined with ""
not be allowed to grow in *dimension*, only single
dimensions of "infinite" length are allowed for
variables defined that way... you could of
course still have sequences of strings by
simply using your {} operators.
   sequence Poem
   Poem = {Mary,"whose fleece","was","white as"}
   (you get the idea)
perhaps, without actually making a 'new' builtin
type, the string optimizations could be placed into
effect directly upon any variable/constants defined
with the "" ????

>I would have gone "barmy" if everything was an object.
I can feel the love of that word flowing in this room!
;)

--Hawke'

new topic     » goto parent     » topic index » view message » categorize

6. (No Subject)

[ Declare Before You Call ]
I prefer Euphoria's Declare before you use approach to the declare anywhere (C's
prototypes don't count as good).
The way to code top down is to insert a new lower function before it is called.

[ Nate ]
Where are you from?

---
Sincerely,
Mathew Hounsell
Mat.Hounsell at Mailexcite.Com

Viva RDS. (Yes, I've been coding in C++ again.)


Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

7. (No Subject)

I posted some code yesterday to graphically display the results of rand(). Well
here is the tested code made into a nice little screen saver.
The code I sent yesterday should have used mode 18 not mode 19.
From watching the screen saver a whil you notice
the longer it has to just call rand(640) the more spread the data becomes.
Anyway just watch it for a while. Leave it running for at least 5 minutes to see
it make the picture interesting.

-----< Snip > -----
include graphics.e

sequence reps
         reps = repeat(0,640)
integer i, clr, until
object x

-- if graphics_mode(18) = 0 then -- 16 Colour
if graphics_mode(257) = 0 then -- 256 Colour

    --clr = rand(16) - 1 -- 16 Colour
    clr = rand(256) - 1 -- 256 Colour
    x = palette(clr,
            {rand(16),rand(16),rand(16)} * 4 - 1 )
    until = rand(432) + 48
    while get_key() = -1 do
        i = rand(640)
        reps[i] = reps[i] + 1
        if reps[i] = until + 1 then
            reps = repeat(0,640)
            reps[i] = 1
            --clr = rand(256) - 1 -- 16 Colour
            clr = rand(256) - 1 -- 256 Colour
            x = palette(clr,
                    {rand(16),rand(16),
                     rand(16)} * 4 - 1 )
            until = rand(432) + 48
        end if
        pixel(clr, {i-1,480-reps[i]} )
    end while
end if
----<End Snip>-----
-----
Sincerely,
Mathew Hounsell
Mat.Hounsell at Mailexcite.Com




Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

8. (No Subject)

Sorry,
I was wrong about ASCII 14 deleting a character in DOS32, my memory was of by 1
 and
off the track. ASCII 13 [ puts(1,13) ]  goes back to the begining of the line in
DOS32. I was trying to display the notes ASCII 14 then ASCII 13, on a new line,
 so
it looked like it was deleting, that's why I thought you could. Sorry Again.
 Where
I got 12 from is any bodies
guess.

If you want to task your program, I have an idea...

----snip----

--<untested code>
function get_input()
sequence keys, pos
integer key

        keys = {}
        while 1 do
                key = get_key()
                if key = -1 then
                        exit
                elsif key >= 32 and
                         key <= 255 then
                                puts(1,key)
                --elsif key = 10 or key = 13 then
                        --puts(1,key)
                        --In a game you may not
                        --want it to \n
                elsif key = 8 then
                        pos = get_position()
                        position(pos[1],pos[2]-1)
                        puts(1,0)
                        position(pos[1],pos[2]-1)
                end if
                keys = keys & key
        end if
        return keys
end function

-----end snip-----
This returns a list of all keys pressed.
You can then step through it to find special keys, etc and add the rest to your
 string.

Now if there is no keys in the buffer it doesn't waste time.
Wipes keys on screen.
Disadvantage: If you chew up CPU time doing other ops then you will probablely
find keys being 'missed', dropped out of the buffer before being read.

If your using WIN32, consider writing two apps to run at the same time, one
 invisible
one to control the world, and one to deal with the user and use DDE &/ shared
 memory,
a lot more complex. Remember to close the invisible one.

---
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com




Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

9. Re: (No Subject)

>Disadvantage: If you chew up CPU time doing other ops then you will
>probablely find keys being 'missed', dropped out of the buffer before
>being read.

Actually, no. There is a keyboard buffer that stores something like 13
characters. If you try to go beyond that limit, the computer starts
making annoying beeps. When you are using get_key() for input, any input
will be stored until used. (By calling any routine that takes a character
from the keyboard buffer.)

(Untested code)

integer k

while 1 do
    k = get_key()
    puts(1, k)
    for i = 1 to 10000 do end for   -- Pause for a little while,
                                    -- change this value to mean a couple
                                    -- seconds on your computer
    if k = 27 then exit end if      -- Exit on escape
end while

If you type stuff during the pause, the characters will pop out next time
it gets to get_key(). If you type more than 13 characters during the
delay, you'll get beeps (or if you store up more than 13 characters).

After the delay, if you have typed something. Don't type anything and
you'll see the other characters you typed pop up each time it gets back
to the puts() line.

Now, you just have to make sure to poll the keyboard enough times to keep
up with a good typist not going over the 13 character limit........


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

new topic     » goto parent     » topic index » view message » categorize

10. (No Subject)

[Old Dos Vers]
Falkon wrote : "With versions 6.2+ [of MS DOS] that shipped with Windows they le
ft
out a bunch of stuff.  I think this is the official list: APPEND, ASSIGN, BACKUP
,
COMP, DOSSHELL, EDLIN, EGA.SYS, FASTHELP, FASTOPEN, GRAFTABL, GRAPHICS, HELP, IN
TERLINK,
INTERSVR, JOIN, MEMCARD, MEMMAKER, MIRROR, MSAV, MSBACKUP, POWER, PRINT, PRINTER
.SYS,
QBASIC, RAMDRIVE.SYS, RECOVER, REPLACE, RESTORE, SHARE, SMARTMON, TREE, UNDELETE
,
UNFORMAT, and VSAFE."
I have DOS6.22 and no they didn't, I found most of it was included and that whic
h
wasn't used anymore was put in a subdirectory of my DOS directory. Some of it no
longer ran though, eg EDLIN had a version conflict, but some of it isn't needed.
I know at least a few things are definitely wrong as there mentioned in the manu
al.


[Decimals]
Lewis Townsend wrote: "I  was wondering how to print numbers with precision to l
ots
of decimal places, like a hundred or so. Is it possible to calculate pi to 100 o
r
more decimal places and print the result on the screen.  All I've been able to d
o
is 15 places and after that it is all zeros so I think it rounds it."
The number isn't rounded, that's alll there is. Computer hardware/software is li
mited
to a set number of digits in a floating point number, that's why you shouldn't r
elly
on atoms as they can be off somewhere down the line, but as Euphoria uses double
s
you don't have to worry about it too much. Try printing 2 / 3 to 15+ places, you
'lll
find a seven at the end. To go to anything more needs a complex software, which
should
probablely be written in Machine Code.

[Database]
I have an idea. Actually it's sort of Netscapes. A Cache. Write the data that ha
s
been changed to the cache, write it the file later. Only play with that data. Of
course it should indicate where the data is supposed to go. Also an offset list
of
each record might be useful, and only load a record as needed.

v



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

11. Re: (No Subject)

Greetings,

>The number isn't rounded, that's alll there is. Computer
hardware/software is li
>mited
>to a set number of digits in a floating point number, that's why you
shouldn't r
>elly
>on atoms as they can be off somewhere down the line, but as Euphoria
uses double
>s
>you don't have to worry about it too much. Try printing 2 / 3 to 15+
places, you
>'lll
>find a seven at the end. To go to anything more needs a complex
software, which
>should
>probablely be written in Machine Code.

Thanks for the info, I was kinda wondering if that wasn't the way it
was, infact, I doubt I'd ever need anything to more than 15 decimal
places for any reason other than curriosity.

Thanks,
Lewis Townsend
|\      ____ _     _     _ _    __
| \    | __/ ||   / |   // || / __ \
|  \   ||_   ||  //||  //  || ||__\|
|   \  | _|  || // || //   || \___ \
| |\ \ ||__  ||//  ||//    || |\__||
| | \ \|___\ |_/   |_/     || \____/
| |  \ \      _____    ________
| |   \ \     | __ \  | __  __ |
| |    \ \    ||__||  |/  ||  \|
| |     \ \   | __ /      ||
| |______\ \  ||  \\      ||
|___________\ ||  ||      ||
Keroltarr at hotmail.com

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

12. (No Subject)

[GUis]
Dave Cuny wrote : "Should I continue using the Classis Mac interface, or do peop
le prefer the Win32 look and feel?"
I liked the look of Copland or the 3D updates. I think a combo of the best of al
l guis would be good. <DUCK> I dislike the Macintosh GUI, I think it needs impro
vement.

[Acronyms]
Alan Tu wrote : "In the documentation, somewhere it implies that Euphoria is an
acronym."
Kendra Zerby suggested "Euphoria Utilizes Proper Handling Of Resources In Abunda
nce...", among others.
Recursive acronyms, I like it.

[Euphoria Evaluation]
To Alan Tu Euphoria is one of the best languages.
Irv wrote : "[Euphoria] might be useful for lots of little jobs - mainly because
 it is MUCH less likely to cause 'unexpected results' than C/C++"
To write a simple program in euphoria is easy. Writing the flexible ones, the ha
rd ones in other languages, is easy. The interpreter I wrote was easy as I didn'
t have to worry about memory allocation/deallocation line sizes, word sizes, etc
, etc, etc.

[Cleared Screens]
ST Qu Man "I am making a program that makes trivia games, when it's done, the la
st 3 lines are:
if graphics_mode(-1) then
end if
cursor(UNDERLINE_CURSOR)
abort(0) -- Not Necessary ( Porbablely not good style either.)
WHY WON"T IT CLEAR THE SCREEN? It just puts the DOS prompt at the currect cursor
 location.  Those last lines are in a procedure, does that matter? "
My guess is you were in you default mode. Try adding a clear_screen after the 'e
nd if'.
Irv suggested : "I think you could also put a clear_screen() right after the 'th
en'."
Unfortunately that will clear the screen if the change fails.
And reegarding your second question : No! Last lines execute like normal.
---
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com

Is it just me or is a 34K digest hard to wade through?
Not A Critism (NAC)



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

13. (No Subject)

[ Editors ]
Graeme wrote "Without wanting to detract from the excellent editor
contributions, am I the only one who uses ED.EX?"
I used a heavily modified EE (Ask Dave, It's really modified.) The Blue
background is the Best colour scheme, try any other colour and they wont be as
good, this is a well known design fact BTW.  You can change the colours under the
Options:Colour menu. Oh and Dave the last releases Graphics modes are very slow,
compare to what they were.

[ Long Command Lines Solution ]
Save the command arguments in a file, pass the file name as an argument, load
the file and use the arguments. Mc-Affee Virus Scan uses this mathod to allow you
to creat 'ini' files.

[ CDs]
CDAudio.E is the place to start for your CD programming. It doesn't have the
Sound Blaster package which you don't reallly need. Try finding both in the
archive.

[ Machine Language ]
Alan Tu wrote: "Is machine language that cumbersome?"
No using a computer is that complex. That and it's hard to optimise high level
languages. You want small use assembler.

[ I/O ]
On the topic of being the only one or a one of few, Who else doesn't use get()
and print() for file I/O?

[ Words Of Advise ]
Remember when using PKZIP telling it recurse into the sub-directories doesn't
tell it store the path info. I am goin to be spending months extracting months of
work back to where it came from, cause I forgot.

[Hardware Problems]
Has any one had this problem: Computer starts. Performs POST hangs while trying
to read from the Hard Drive. HDD light stays on, wont turn of unless you do a HDD
Auto Detect or a Hard Reboot.

I thought it fair that I point out not all viruses are created with bad
intentions. They might be created for:
a) creating anti-viral techniques
b) a computer security class
and c) the same reason people drive fast, eat fatty food, walk at night and do
all the other things were told we shouldn't, because we want to live our life.
And if you want a flame war send me your private eMail address.
---
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

14. Re: (No Subject)

At 01:12 AM 5/23/98 -0700, Mathew Hounsell wrote:
>
>[Hardware Problems]
>Has any one had this problem: Computer starts. Performs POST hangs while
trying to read from the Hard Drive. HDD light stays on, wont turn of unless
you do a HDD Auto Detect or a Hard Reboot.
>
Yes.
I had this happen - would boot sometimes (1 out of 3 or 4).
Pretty soon that became 1 out of 20.
Does yours ever start and run properly?

Anyway: here's what I did:
1. check all the cables (unplug 'em and plug back in, wipes the
    contacts, you know)
2. Boot from a known good/virus free dos disk, run scandisk.
3. get some refreshments and do a low-level format, fdisk,
    format, reload dos. Leave Win95 and other viruses out
    for now.
If all that fails, remember:
4. Hard disk drive guts make neat nerdish wall decorations
    for your room.

Irv

new topic     » goto parent     » topic index » view message » categorize

15. Re: (No Subject)

Mathew Hounsell wrote:
>

<snip>

> [Hardware Problems]
> Has any one had this problem: Computer starts. Performs POST hangs while
> trying to read from the Hard Drive. HDD light stays on, wont turn of unless you
> do a HDD Auto Detect or a Hard Reboot.

        plugging in the cable backards has a simular effect, I would
check that first.
>
> I thought it fair that I point out not all viruses are created with bad
> intentions. They might be created for:
> a) creating anti-viral techniques
> b) a computer security class
> and c) the same reason people drive fast, eat fatty food, walk at night and do
> all the other things were told we shouldn't, because we want to live our life.
> And if you want a flame war send me your private eMail address.

        There was at least one reasercher who was using viral style
code to automate some space saving tasks, such as deleting old temp
files, and background defragging of harddisk, etc, accross a small lan.
        Also if you have any interest in a-life and a.i. viral code
is very interesting. (I've even seen 'viral' code for a bat file, it
would check every bat file the current and sub directoris for itself,
then copy if not found.

        As A minor annectedote I read a while back about a guy whose
floppy quit working on him, so he replaced it with a new one, and it
didn't work so he replaced the controller card in his machine (I said
it was a while back), and still no floppy access. well about 4 cards
and 3 floppies later he discorvered the hardware equivelent of a virus.
seems there are/were a pair of components on flopies and controllers
such that if one was fried it would frie the maching component on the
the other device (card or floppy), so when he would replace one it would
blow, and then when he replaced the other......



> ---
> Sincerely,
> Mathew Hounsell
> Mat.Hounsell at mailexcite.com
>
> Free web-based email, Forever, From anywhere!
> http://www.mailexcite.com





                                Kasey
http:/www.geocities.com/Area51/Vault/7707
mailto:kaseyb at geocites.com

new topic     » goto parent     » topic index » view message » categorize

16. (No Subject)

[Speed Freaks]
Don't be too concerned when using length() in Euphoria, as Euphoria stores the
length of each sequence and all length does is retrieve it, so it's only a quick
peek into mem. That's part of the reason a sequence has 21 Bytes of overhead.

[HDD Problem]
Thanks to those willing to help.
I have a few minor problems to prevent me from doing what has been suggested.
1.) When I took my computer in for a service last time, I think that's when it
happened, someone silconed (Selly's Sealants) all my connections togethor. I have
been trying for a while to prise the silicon of my HDD connection to my I/O card
so I can remove the cable and try a new one, as I think it may be damaged, bent a
little too much.
2.) My HDD sits at the bottom of my case, under my CD Drive, and to pull out my
CD drive I have to remove my floppy drive and many other connections.
3.) What I think may be aggrivating the problem is a buch of unused powercords,
pressing on the cables, yet they are tied up with a plastic ring.
This is really annoying me as I just bought 16Mb RAM and now my HDD doesn't
work, I'm sure it is my Hard Drive as I had the problem before, then it went
away, when I fiddled a little, and now it's back.
Is there anyway to use a HDD except from the BIOS using only DOS 6.22?

-----
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com

Blessed is the person with a dowload speed in Kb a second.

(I usually have a speed less then 512b often less then a 256b.)



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

17. Re: (No Subject)

>[ I/O ]
>On the topic of being the only one or a one
>of few, Who else doesn't use get() and print()
>for file I/O?

I hardly ever use anything other than
getc() and puts(atom), unless I'm
building a text file.

>[Win98]
----------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

18. (No Subject)

[Virii]
     Moral issues aside, I'd have to say that Euphoria's not a good language
for creating virii, anyway.  Virii need to be in machine code in order to
'live' inside other programs.  They also need to be small to keep from
filling a hard drive as they reproduce.  I think most virii are under 2k
IIRC, and some are less than 100 bytes.
     It seems it would be great for self-altering programs, though...
Programs that grow and evolve by modifying their code and rewriting
themselves based on circumstances...  Of course, that would be the
interpreted source, not a binded program...though that might be possible
too...

[Euphoria compiler]
From:    Ralf Nieuwenhuijsen
>a binded version of TextGUI is smaller than the MSDOS Editor
[...]
>not the com file that comes wiht DOS, but the qbasic.exe or the
>editor found with Win95

Hmm...From my copy of Win95 and EE:
EDIT        COM        69,886
QBASIC   EXE       194,309
EE           EXE       289,842
But still, try comparing a text editor written in VB.  It doesn't tack the
interpreter on, instead it requires a run-time dll.  That adds 5-megabytes
for the latest version, I believe.  Plus it adds another file to keep track
of.

From:    lithex
>I've been programming for years on an Atari 1040 using a language called
>GFA Basic and I've been looking for a good language on a PC that was
>powerful, cheap, and easy to use.

     Incidentally, there's a German GFA-Basic for Windows...don't know if
it's related or not, but you might do a web search for it.

>So, it seems to me that the main advantage of a compiler is that it
>provides faster execution of the same source code, presumably because
>the interpreter overhead is eliminated

     I doubt that the interpreter overhead is eliminated in languages that
use run-time interpreters in a separate file.  If anything it seems there
would be a bit more overhead in finding and loading the interpreter file.
The speed doubling you see is probably because the program has already been
checked for syntax and 'tokenized' into a smaller faster form than raw
source.  Euphoria is generally faster than other interpreted languages even
running raw source.  And of course you can bind it to make a single EXE that
doesn't require any run-times.

[Speed Freaks]
From:    Mathew Hounsell
>Don't be too concerned when using length() in Euphoria, as Euphoria stores
the length >of each sequence and all length does is retrieve it, so it's
only a quick peek into mem

Hmm...something I've been wondering...  Since you can't use
     if ( s1 != {} ) then
to test for a null sequence, which of these methods is technically better?
     if ( length(s1) > 0 ) then
     if compare( s1, {} ) then
My guess would be length..

Falkon

new topic     » goto parent     » topic index » view message » categorize

19. (No Subject)

[ Getting a Time of the User ]
From the top of my head (Actual str_to_int isn't, it's one I know well) ...
I know this was solved, but I wrote it before I finished the digest, silly me.
-----<untested code>-----
function str_to_int(sequence str)
object val

        val = 0
        for t = 1 to length(str) by 1 do
                if str[t] >= '0' and str[t] <= '9' then
                        val = val * 10 + (str[t] - '0')
                else
                        val = str
                        exit
                end if
        end for
        return val
end function

function get_time_string()
sequence val

        val = {}
        while 1 do
                puts(1,"Please enter the time in 24 Hr format. eg 23:06\n")
                val = gets(0)
                if length(val) = 10 then
                        val = val[1..length(val)-1]
                end if
                if length(val) = 4 then
                        val = '0' and val
                end if
                if length(val) = 5 then
                        if val[3] = ':' then
                                exit
                        end if
                end if
        end while
        return val
end function

global function get_time()
sequence str, val
object tenp

        val = {0,0}
        while 1 do
                str = get_time_string()
                temp = str_to_int(str[1..2])
                if integer(temp) then
                        val[1] = temp           -- hours
                        temp = str_to_int(str[4..5])
                        if integer(temp) then
                                val[2] = temp           -- minutes
                        end if
                end if
        end while
        return val
end function
-----<end snip>-----

[ Concaternation (&) ]
Alan wrote "In Euphoria, can I combine two atoms of a sequence into one atom?"
Simplely: No. Rob defines the atom as the basic indivisable unit. Multiple atoms
are sequences so &ing always produces sequences.
Note this is a partial lie. You can use one atom as 3 bytes or 31 bits, if you
want.

[ Using print() and get() ]
Just kidding about being the only one. ; )

[ Euphoria Compiler ]
Martin wrote : "I'd be interested in the details. It seems to me that the engine
that produces the code for the interpreter to send to the CPU could be easily
modified to send the code to a file instead. Wouldn't that be a compiler?"
I think people miss the main reason why Euphoria can't be compiled: The
Sequence. It is a flexible dynamic data structure. Compiling a data structure
defined and manipulated as the program runs, in response to it running, is
impossible. Try writing the compiler that can do this:
s = append(s, s[v] & s[j..floor(length(s)/2) + x] )
or something even more abstract.

---
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

20. (No Subject)

[ Changing The Programs Own Code ]
Falkon wrote: "It seems it would be great for self-altering programs,
though...Programs that grow and evolve by modifying their code and rewriting
themselves based on circumstances...  Of course, that would be the interpreted
source, not a binded program...though that might be possible too..."
Brilliant Falkon. As Euphoria is bound to the interpreter, tacked on the end I
think. To create conditional compilations you could simplely bind your program
with the default settings and change it at will, creating patches would be easy
to. To RDS, maybe this is an expansion of bind too look into, patches.

[ Optimisation ]
Falkon wrote : "Since you can't use
        if ( s1 != {} ) then
to test for a null sequence, which of these methods is technically better?
        if ( length(s1) > 0 ) then
        if compare( s1, {} ) then
My guess would be length."
I think length would be more efficient.

[ command_line()   BUG!!! ]
Dave wrote : "You are guaranteed to get at least two sequences back from
command_line()"
Wrong. If you run EX or EXW then type in the file name command_line() contains
only the full path of the interpreter. I got caught by this as I couldn't
understood why the code crashed. RDS knows and intends to fix it in the next
release.

[ Disk Mag ]
To Stephen Spencer, May be some tutorials to help some one build different type
(eg Line, Date, Number) User input routine might be good, I may try and write it,
as people are always asking questions about it.

[ Slow Web Access ]
Try the Lynx web browser. Unfortunately it is probablely the redundant HTML
that's slowing loads down.

[ Bill of Rights ]
Terry Constant wrote : "It is not illegal, and never should be. The importance
of freedom of  expression, guaranteed in the Bill of Rights, is an overriding
concern, far more important than computer viruses. "
Not every country has a Bill of Right's.
Dear old Australia doesn't, in fact some of the rights we think we have we
don't, and for some strange reason the goverment didn't do anything with their
report that told them that. One bit of Australian trivia: Local Goverment
(Shires) are autonomous, you have basically no recourse unless it's illegal. This
is how our goverment seems to work.

[ Viruses ]
I have a HDD problem: BIOS does a quick check on HDD, before usually asking for
password, and hangs with HDD light on, but deactivating HDD and booting from a
floopy means the system works fine, except no HDD. Does that sound like a virus
anyone knows of. I really don't want to hae to format my drive if it's possible
to avoid, as I'll lose years of work.
---
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

21. Re: (No Subject)

Mathew Hounsell wrote:
>
> [ Bill of Rights ]
> Terry Constant wrote : "It is not illegal, and never should be. The importance
> of freedom of  expression, guaranteed in the Bill of Rights, is an overriding
> concern, far more important than computer viruses. "
> Not every country has a Bill of Right's.
> Dear old Australia doesn't, in fact some of the rights we think we have we
> don't, and for some strange reason the goverment didn't do anything with their
> report that told them that. One bit of Australian trivia: Local Goverment
> (Shires) are autonomous, you have basically no recourse unless it's illegal. This
> is how our goverment seems to work.
>

Mathew,
Thank you for your reply. I am aware of the differences. One thing I
would like to note. In the United States, the government did not provide
the Bill of Rights, "We the people" did. Indeed, the government cannot
provide the rights nor take them away. Only the people can. The people
are sovereign and not government. An important point is that people have
to struggle to establish rights at all times and in all circumstances.
In my original message I just wanted to let the person know that while I
oppose viruses, I support his "natural right" to expression, sharing of
ideas.
--
Terry Constant
constant at flash.net

new topic     » goto parent     » topic index » view message » categorize

22. Re: (No Subject)

> [ Euphoria Compiler ]
> Martin wrote : "I'd be interested in the details. It seems to me that the
> engine that produces the code for the interpreter to send to the CPU could be
> easily modified to send the code to a file ins
> ead. Wouldn't that be a compiler?"
> I think people miss the main reason why Euphoria can't be compiled: The
> Sequence. It is a flexible dynamic data structure. Compiling a data structure
> defined and manipulated as the program runs, in
> esponse to it running, is impossible. Try writing the compiler that can do
> this:
> s = append(s, s[v] & s[j..floor(length(s)/2) + x] )
> or something even more abstract.

No, it's not impossible; a compiler can be written that can do
anything the interpreter can. Moreover, even a straightforward
Euphoria compiler would provide a 2-3x increase in speed for most
programs. Error-checking would not be necessary in a compiler, as the
program could be debugged using the interpreter beforehand, and as
long as the programmer keeps his source code he could change it any
time.
Writing a compiler, though, is not a task to do from scratch; you
would need the source code for EX.EXE to do it.

Regards,

Michael Bolin

new topic     » goto parent     » topic index » view message » categorize

23. (No Subject)

The following function returns the path to the code / exe file of your programs
 if
you make sure all the program files are in specified directories relative to
 that
file, you will always find them, no matter which directory you currently in.

eg c:\apps\dos\makechar\makechar.exe
get_program_path returns "c:\apps\dos\makechar\"
It always returns a sequence.

notice the \ on the end, thats to make concaternating easy.
eg path & filename

eg sequence path
path = get_program_path()
load_video(path & "video\start.fli")

-----<snip>-----
global function get_program_path()
sequence cmd, val

    val = {}
    cmd = command_line()
    if length(cmd) >= 2 then
        for t = length(cmd) to 1 by -1 do
             if cmd[t] = '\\' then
                  val = {cmd[1..t],cmd[t+1..length(s)]}
                  exit
             end if
        end for
    end if
    return val[1]
end function

-----<end snip>-----

David Mosley wrote
> I can program in Liberty Basic
I got really hooked on programming using LB.

File Input Routines...
I use getc instead of gets as it doesn't forget the last line if there is no EOL
marker.
(Dave: EE does lose last line.)
-----<Untested Snip>-----
function load_file(sequence fname) -- for a single dim sequence
integer fn, char
object val

    val = -1 -- default return
    fn = open(fname,"r")
    if fn != -1 then
        val = {} -- make val a sequence
        while 1 do -- loop forever (Maniacal Laughter)
            char = getc() -- gets a character from file
            if char = -1 then -- is it end_of _file
                exit -- if yes leave
            else
                val = val & char -- if not the add it too end of return sequence

            end if
        end while
    end if
    return val -- And the result was ...
end function

function load_file(sequence fname) -- for a double dim sequnece based on lines
integer fn, char
sequence line
object val

    val = -1 -- default return
    fn = open(fname,"r")
    if fn != -1 then
        val = {} -- make val a sequence
        line = {}
        while 1 do -- loop forever (Maniacal Laughter)
            char = getc() -- gets a character from file
            if char = -1 then -- is it end_of _file
                exit  -- if yes leave loo[
                if length(line) then
                    val = append(val,line) -- if it's not a blank line at end of
file add it.
                end if
            elsif char = 10 or char = 13 then -- is it end of line
                val = append(val,line) -- add line, note doesn't add CR or LF
 (10
or 13)
            else
                line = line & char -- if not the add it too end of return
 sequence

            end if
        end while
    end if
    return val -- And the result was ...
end function

-----<end snip>-----

Christopher D. Hickman responded to my post:

>>        type description( sequence s )
>>                elements are integers
>>                length is 256
>>
>>                return 1
>>        end type

> What does this solve?

ERR : Unexpected sequence found in character string.
and similar errors.

>> structure my_struct_type
  >>     integer  member1,
>>     atom     member2,
>>     sequence member3,
>>     object   member4
>> end structure

as opposed to

>     complex menu_item ( sequence s)
>           format { menu_str, integer, string, integer }
>           return 1
>     end complex

A rose by any other name would smell as sweet...
It is asthetics. You have a C background. There is one prob with structure, a
 novice
to the language may think it is a C similar structure that could be passed to a
 DLL
etc.

> Structures in Euphoria aren't (or shouldn't be, I should say) about limiting
 anything,

> but giving the programmer a tool to work with sequences at a more abstract
 level...

> improving readability to allow faster implementation, better control, and less
time
> debugging.

Type is used to restrict the data type is euphoria, if you've decided you need a
sequence containg numbers and sequences you don't want the numbers being
 sequences,
it would save debugging type, and may even help with binding optimization.

Kasey Responded to everyone with...
> This sounds like somthing a good preprocessor could do. In fact most of the
 changes

> people want could probably be done with a preprocessor, which if
 customizeable,

> could let them EACH  have thier own personal flavor of Euphoria
Dave has one, but nobody wants too write one, I might if nobody objected...

> Anything... I want I'll find a way to do with Euporia
<Whineey Kids Voice> But it's easier if ROB does it... </WKV>
It's can also be faster and more efficient.

Irv wrote
> (On the other hand, what's the most used language?)
> (Hint: it starts with 'C', and has a thousand bells and whistles)
Well there's no accounting for taste.

---
Sincerely,
Mathew Hounsell
Mat.Hounsell at mailexcite.com

Ps I have a feeling the above line layout spacing got minced.




Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » goto parent     » topic index » view message » categorize

24. Re: (No Subject)

At 11:55 PM 4/26/98 -0700, Mathew Hounsell wrote:
>
>File Input Routines...
>I use getc instead of gets as it doesn't forget the last line if there is
no EOL
>marker.
>(Dave: EE does lose last line.)

This is close to being a *bug* in Euphoria, or at least a
real puzzle. I just tried this:

object s
atom fn
fn = open("TEST.TXT","r")
while 1 do
  s = gets(fn)
  if atom(s) then exit
  end if
  puts(1,s)
end while

It reads and prints all the lines in my test file, *including* the
last line which does NOT end in a linefeed or c/r. (I checked
it with a hex editor - in fact, made test files with 4 different
editors, plus the dos "copy con test.txt" command)
Lots of times, however, the same code _has_ dropped
the last line. Whazzup?
(I know about using getc in a loop, but why go to all
 that trouble? This is supposed to be a high level
 language.)

Irv

new topic     » goto parent     » topic index » view message » categorize

25. Re: (No Subject)

Irv Mullins writes:
> This is close to being a *bug* in Euphoria, or at least a
> real puzzle. I just tried this:
> object s
> atom fn
> fn = open("TEST.TXT","r")
> while 1 do
>  s = gets(fn)
>  if atom(s) then exit
>  end if
>  puts(1,s)
> end while
> It reads and prints all the lines in my test file, *including* the
> last line which does NOT end in a linefeed or c/r. (I checked
> it with a hex editor - in fact, made test files with 4 different
> editors, plus the dos "copy con test.txt" command)
> Lots of times, however, the same code _has_ dropped
> the last line. Whazzup?
> (I know about using getc in a loop, but why go to all
> that trouble? This is supposed to be a high level
> language.)

If you can give me an example where gets()
fails (drops the last line), I'd be happy to investigate.

gets() is supposed to return the whole line including '\n'
if there is one. The last line in a file might not have
a '\n', so gets() will return all the characters on that line,
but there won't be a '\n' on the end.

Some editors do funny things when the last line in
your file does not end with '\n'.  ed.ex will
add a '\n' to your line. ee.ex seems to
drop the last character on the line that's missing the \n.
Are you reading David? I tried:

junk.ex:
puts(1, "line1\nline2")   -- missing final \n

ex junk >junk.dat

ex ee junk.dat

and found the '2' in line2 was missing.

Regards,
     Rob Craig
     Rapid Deployment Software

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu