1. Version 2.1 alpha-test release now available!
Euphoria 2.1 alpha is now available from:
http://members.aol.com/FilesEu/
Here are the changes from version 2.0:
* We've made a number of changes to the packaging, pricing, and
registration incentives for the Euphoria product:
* The Single-Platform (DOS32-only) package, formerly $32,
has been discontinued.
* The Dual-Platform (DOS32+WIN32) package, formerly $53
has been reduced to $39 U.S., effective immediately.
Anyone who registered or upgraded, to Dual-Platform
*or Single-Platform*, since July 15, 1998 (6 months ago)
gets a free upgrade to 2.1. All other registered users pay
just $24.
* The printed manual has been discontinued. Instead, there is now
an official HTML version of the manual, included with the
Public Domain .ZIP file.
* All useful 3rd-party include files, such as Win32Lib.ew and many
others, will be "stamped" by RDS with a code number that makes
them free, just like the files in euphoria\include. They will not
add to your statement count, provided you do not significantly
modify them. This will also allow 3rd-party developers
to get better diagnostic information from their users.
* Binding, shrouding and profiling will now be part of the
Complete Edition only. These are features that beginners
do not require, but serious users might find valuable.
* Short-form assignment operators += -= *= /= &= have been added.
For example, instead of saying:
count = count + 1
You can now say:
count += 1
Instead of saying:
matrix[row][column] = matrix[row][column] * 5.0
You can say:
matrix[row][column] *= 5.0
Instead of saying:
test_scores[start..finish] = test_scores[start..finish] / 100
You can say:
test_scores[start..finish] /= 100
* Euphoria now uses "short-circuit" evaluation of "and" and "or"
expressions in if/elsif/while conditions. e.g. in an "and" condition:
if A and B then ...
the interpreter will skip the evaluation of expression B whenever
expression A is 0 (FALSE), since it knows that the overall result
must be FALSE. In an "or" condition:
while A or B do ...
the interpreter will skip the evaluation of expression B whenever
expression A is non-zero (TRUE), since it knows that the overall result
must be TRUE.
Euphoria code written prior to version 2.1 may no longer work correctly
if expression B contains a function with side-effects such as setting a
global variable, doing I/O etc. In practice this kind of code is very
rare, but just in case, a warning will now be issued if a function with
side-effects might be short-circuited.
By skipping the evaluation of B, short-circuit evaluation is typically
faster, and will allow you to write statements such as:
if atom(x) or length(x)=1 then ...
that would generate an error on older versions of Euphoria whenever x
was an atom, since length() is not defined for atoms.
See REFMAN.DOC for the details.
* Several new routines were added.
Built-in to ex.exe/exw.exe:
profile() - turns profiling on/off so you can focus your profile
and profile_time runs on particular events within your
program.
system_exec() - gives you the exit code from calling a .exe or .com
file, or another Euphoria program
equal() - compare any 2 Euphoria objects for equality.
equivalent to: compare(a,b) = 0 but more readable
Added to various include files:
walk_dir() - recursively goes through a directory and
subdirectories, calling a routine that you supply
reverse() - returns a sequence in reverse order
sprint() - returns the string representation of any Euphoria
object
arcsin() - inverse trig function
arccos() - inverse trig function
get_bytes() - returns the next n bytes from a file
prompt_number() - prompts the user to enter a number
prompt_string() - prompts the user to enter a string
instance() - WIN32: returns the instance handle of the program
the constant PI - 3.14159... was added to misc.e
* The main Euphoria documentation can now be viewed locally with a Web
browser. The plain-text files REFMAN.DOC and LIBRARY.DOC are still
available in the DOC subdirectory, but we now have REFMAN.HTM and
LIBRARY.HTM in the new HTML subdirectory. We have developed a tool
(written in Euphoria) that lets us easily maintain both an up-to-date
HTML version, and an up-to-date plain-text version of REFMAN and
LIBRARY.
The documentation has also been clarified and expanded in many places.
* WIN32: you can create an unlimited number of Euphoria call-back
routines, as long as each routine is a function with 0 to 8 parameters.
See PLATFORM.DOC. In version 2.0 you could only have one call-back
routine and it had to have 4 parameters.
* The "xor" keyword has been added to complement: and/or/not and
xor_bits() e.g.
if a xor b then...
"xor" works on sequences too. It's similar to "or".
* The dir(path) library routine now officially supports the use of
wildcards * and ? in the path that you supply. This feature was always
available, but wasn't documented until now. e.g.
info = dir("mydata\\*.d?t")
* OPTIMIZATION: subroutine call+return overhead was reduced by an
average of 30%. The speed-up occurs for all normal
function/procedure/type calls, user-defined type-checks,
call_proc/call_func calls using a routine id, and Windows call-backs.
Only recursive calls cost the same as before. Programs with a
reasonably-high frequency of calls can easily be 10% faster
overall because of this.
* OPTIMIZATION: Branch "straightening" has been implemented. The
compiler will optimize branches in the internal code such that a branch
from A->B where location B contains a branch to location C, will be
optimized to a direct branch from A->C. Even something like A->B->C->D
can be straightened to A->D. This often occurs in while-loops that
contain if-statements.
* OPTIMIZATION: In many cases, variable initialization checks are
now replaced by "no-ops" after the first check is performed. Euphoria
was already optimizing out many checks at compile-time.
* OPTIMIZATION: get() and value() are now much faster in most cases
thanks to Jiri Babor and some further optimizations by RDS.
The new v2.1 ex.exe with the new v2.1 get.e is:
1.45x faster reading a sequence of f.p. numbers from a file and
2.25x faster when reading sequence of integers from a file
* OPTIMIZATION: power(x,2) is converted internally to x*x which is faster
in all cases, especially when x is a large integer or a f.p. number.
* OPTIMIZATION: thanks to Jiri Babor, int_to_bits() is at least 15% faster
in most cases.
* OPTIMIZATION: Plotting a long sequence of pixels in 16-color graphics
modes is about 3% faster.
* OPTIMIZATION: draw_line() has been sped up by a few percent.
* Language War has had a major face-lift. It now runs in pixel-graphics
mode 18 (640 x 480 x 16 colors) instead of text mode. It also has
"fine-grain" parallelism, i.e. virtually anything can happen in parallel
with anything else. Multiple torpedos, phasors etc can be drawn on the
screen simultaneously, while ships are moving, commands are being
entered, things are exploding etc. Even the timing needed for the PC
speaker sound effects is handled by the task scheduler. There are no
time-delay "busy" loops executed during the game. The galaxy scan
now shows you a scaled picture of the whole galaxy, rather than just a
bunch of numbers.
* The default print format for atoms was changed from %g to %.10g
This format is used by print(), ?, the trace facility, and ex.err
dumps. This allows large integers -9,999,999,999 to +9,999,999,999
to be printed as integers, rather than as scientific notation. It also
provides about 10 digits of accuracy to be displayed on fractional
numbers, rather than just 6. Art Adamson and others made it clear that
more digits should be displayed.
* The state of all with/without settings is saved upon entering an
included file, and restored at the end of the included file.
An included file can change the settings, but they will be restored at
the end of the included file. e.g. warnings might be turned off just
within the included file (and any files it includes). As a result some
programs now display warnings where none were seen before.
* Warnings are now displayed *after* your program finishes execution,
so they won't be erased by clear_screen(), graphics_mode() etc.
Some programs now show warnings where none were seen before.
* The security of scrambled code and bound code has been improved
thanks to ideas contributed by Rusty Davis. When a bound program
starts executing, a quick integrity check will be made to detect any
corruption or tampering. It's still ok to add data to the end of a bound
.exe file, as long as your last line is "abort(x)".
* The ed editor now lets you view and edit beyond column 80.
* ed has a new command: Esc m (modifications). It will show the
differences between the original file on disk and the current edit
buffer. This can be very useful when you've forgotten what changes
you've made, and you are wondering if it's safe to save them.
* The trace window now provides an upper case Q command which
lets the program run to completion, ignoring any trace(1) commands.
Lower case q lets it run to the next trace(1).
* safe.e (debug version of machine.e) has been enhanced. It will now
automatically catch additional cases where data is illegally written just
before, or just after, the boundaries of an allocated block of memory.
This can be particularly useful in WIN32 where Windows might overwrite
one of your under-sized blocks. Without a tool such as safe.e, this type
of bug could take hours or even days to track down.
* The euphoria\tutorial directory was created to hold several small
tutorial programs.
* The limit on the number of open files was raised to 25 from 15.
Three of these files are 0,1,2: standard-input, standard-output
and standard-error, so you can now have up to 22 of your own files
open simultaneously. (As far as we know, no one ever exceeded the
old limit, but it seemed wise to raise it.)
* When the user simply types "ex" or "exw" and is prompted for the
name of the Euphoria .ex or .exw file to run, command_line() will now
be updated to include the filename as the second command-line
argument, just as if the user had originally typed: ex filename
Thanks to Mathew Hounsell for suggesting this.
* mset.ex now saves pictures in .bmp format. Previously it was using a
non-standard, compressed format.
* lines.ex (lines.bat) now reports non-blank/non-comment lines as well.
This is *not* the same as the "statement count" used by Euphoria for
the diagnostic limit, but it's usually within +/- 10%, assuming you write
one statement per line.
* numeric literals greater than 1e308 (roughly) are now set to +/- "inf".
They used to cause a compile-time error.
A bunch of fairly minor bugs were fixed. They are listed in
RELNOTES.DOC in EUPHOR21.ZIP.
Regards,
Rob Craig
Rapid Deployment Software
http://members.aol.com/FilesEu/
2. Re: Version 2.1 alpha-test release now available!
Hooray and many thanks, Rob!
There are lots of nice improvements.
Irv
3. Re: Version 2.1 alpha-test release now available!
Wow, sounds great, there isn't anything I *don't* like....except:
> prompt_number() - prompts the user to enter a number
>
> prompt_string() - prompts the user to enter a string
>
It seems to me, almost cheating... the first real, useful thing I wrote was an
.e file that did the same thing. I dunno, maybe it's just me, but it doesn't
really seem Euphoria-ish.
Anyways, great job, Robert,
Greg
--
Greg Phillips
i.shoot at rednecks.com
http://euphoria.server101.com
--
Useless fact of the day:
In most advertisments, including newspapers, the time displayed on a watch is
10:10.
4. Re: Version 2.1 alpha-test release now available!
Just one idea...
>
> the constant PI - 3.14159... was added to misc.e
>
How about making it a function where PI(x) would return a number with x
positions of significance **after** the decimal, truncated -- not rounded
ie: PI(4) returns {3.1415} ].
PI() alone would return the largest available value for this and all future
versions of Euphoria.
?
5. Re: Version 2.1 alpha-test release now available!
- Posted by Greg Phillips <i.shoot at REDNECKS.COM>
Jan 15, 1999
-
Last edited Jan 16, 1999
Quality wrote:
> Just one idea...
>
> >
> > the constant PI - 3.14159... was added to misc.e
> >
>
> How about making it a function where PI(x) would return a number with x
> positions of significance **after** the decimal, truncated -- not rounded
> ie: PI(4) returns {3.1415} ].
>
> PI() alone would return the largest available value for this and all future
> versions of Euphoria.
>
> ?
Odd you should mention that, I *just* wrote a function that does that....and
allows the choice between truncation and rounding Pi.... ie: PI(4,0) is
3.1415, while PI(3,1) is 3.142
if anyone's interested, I'll post the source
Greg
--
Greg Phillips
i.shoot at rednecks.com
http://euphoria.server101.com
--
Useless fact of the day:
In most advertisments, including newspapers, the time displayed on a watch is
10:10.
6. Re: Version 2.1 alpha-test release now available!
On Fri, 15 Jan 1999 10:41:12 -0800, Greg Phillips <phillipb at DIRECT.CA> wrote:
>Wow, sounds great, there isn't anything I *don't* like....except:
>
>> prompt_number() - prompts the user to enter a number
>>
>> prompt_string() - prompts the user to enter a string
>>
>
> It seems to me, almost cheating... the first real, useful thing I wrote was an
>.e file that did the same thing. I dunno, maybe it's just me, but it doesn't
>really seem Euphoria-ish.
>
>Anyways, great job, Robert,
>
>Greg
I was hoping for something along the lines of:
vrbl = scanf("Enter coordinates - X:%d /t Y:%d")
or
vrbl = scanf("Name: %s\n Age: %d\n SSN:%3d-%2d-%4d")
which would display (and allow you to enter)
Name: John Doh
Age: 23
SSN: 222-34-4556
Irv
7. Re: Version 2.1 alpha-test release now available!
>
>Euphoria 2.1 alpha is now available from:
> http://members.aol.com/FilesEu/
Great; I look forward to having a go with it, three things, before final
release -
1) Bind - Is really useful to pass .EXE files on to others who don't use
Euphoria and are loathe to install the interpretor because of the usual
prejudices about a non-familiar language. Whilst I can see the
commercial sense in restricting the use of Bind to registered users, I
feel this is a retrograde step.
2) Can we add "$" as a valid [non-first] character for identifiers
please - Now that *must* be easy as the character isn't used for any
other specific purpose in the language !
3) Can we allow "//" as well as "--" ( and perhaps even ";" ) to
indicate the start of comments; this would help me ( at least ) when
swapping and changing between languages ( Java = //, JavaScript = //, C
= //, C++ = //, Euphoria = -- ).
Other than that, keep up the good work.
8. Re: Version 2.1 alpha-test release now available!
On Mon, 18 Jan 1999 14:38:55 -0000, Bown, John <John.Bown at UK.ORIGIN-IT.COM>
wrote:
>>
>>Euphoria 2.1 alpha is now available from:
>> http://members.aol.com/FilesEu/
>
>Great; I look forward to having a go with it, three things, before final
>release -
>
>1) Bind - Is really useful to pass .EXE files on to others who don't use
>Euphoria and are loathe to install the interpretor because of the usual
>prejudices about a non-familiar language. Whilst I can see the
>commercial sense in restricting the use of Bind to registered users, I
>feel this is a retrograde step.
>
I agree and disagree here.
I agree for the same reasons BUT,
I disagree because installation isn't required. You can simply
distribute ex.exe and all the standard include files plus whatever
include files you have decided to use in one ZIP file. All being
extracted into one directory and everything would work just fine.
Euphoria only requires ex.exe or exw.exe and the include files. It
doesn't need all the documents and demos. The documents and demos
are just bloat to help Euphoria programmers program in Euphoria.
>
>2) Can we add "$" as a valid [non-first] character for identifiers
>please - Now that *must* be easy as the character isn't used for any
>other specific purpose in the language !
>
This could be handy in places. Like helping to determine a sequence
from atoms or integers. One could simply decide that THEY would always
end there sequences with '$' and end all integers with _ then they would
have their own easy to read syntax. It would help in readabilty. Past
that, I see it as a waste.
>
>3) Can we allow "//" as well as "--" ( and perhaps even ";" ) to
>indicate the start of comments; this would help me ( at least ) when
>swapping and changing between languages ( Java = //, JavaScript = //, C
>= //, C++ = //, Euphoria = -- ).
>
>Other than that, keep up the good work.
';' Hmm, I don't see using ';' as a comment starter. I do see
using it as an OPTIONAL statement ender. It would conform to the
standard put forth by C, PERL, PASCAL and several other languages.
Again, I suggest it only as an OPTIONAL statement ender. IE: the same
way JavaScript uses it. JavaScript doesn't require it but it does
ignore it just as if it were white space. In other words, It doesn't
break the code.
'//' Let see...., I am trying to imagine where this might be a
trouble maker for current code. NOPE, Can't think of any. Seems
feasible. Just as //* *// seems. Umm. actually //* *// is a
bad idea because of the way the editors have been designed to color
syntax. But using just '//' like Javascript does seems fine to me.
I don't see how it should break anything. JUST good reason to update
some nice editors. But it wouldn't be required.
I do see one complexity to the implementation of '//' and/or ';'.
It would again takeway some of the simplicity and readability of
Euphoria. Haven't you ever been bothered by a language having multiple
methods of commenting out text? My most common method of commenting
an entire block of valid code is by using the ever so ugly.
if 0 then
block_of_valid_code()
end if
Believe me It truly puts a damper on readability.
Lucius L. Hilley III
PS: I lost my HardDrive. [6.4Gig, *BOOM*]
9. Re: Version 2.1 alpha-test release now available!
>>1) Bind - Is really useful to pass .EXE files on to others who don't use
> I disagree because installation isn't required. You can simply
>distribute ex.exe and all the standard include files plus whatever
Fair point.
>
>>2) Can we add "$" as a valid [non-first] character for identifiers
> This could be handy in places. Like helping to determine a sequence
>from atoms or integers. One could simply decide that THEY would always
>end there sequences with '$' and end all integers with _ then they would
>have their own easy to read syntax. It would help in readabilty. Past
>that, I see it as a waste.
My sentiments exactly; would like the choice to use them
>
>>
>>3) Can we allow "//" as well as "--" ( and perhaps even ";" ) to
>
> ';' Hmm, I don't see using ';' as a comment starter.
Okay, retract that - old Assembler habits die hard
>I do see one complexity to the implementation of '//' and/or ';'.
>It would again takeway some of the simplicity and readability of
>Euphoria.
Don't think it would trash simplicity or readability - many other
languages use // okay ... I'd advocate deprecating -- in docs but keep
for backwards compatability.
>
10. Re: Version 2.1 alpha-test release now available!
On Mon, 18 Jan 1999 15:59:48 -0000, Bown, John <John.Bown at UK.ORIGIN-IT.COM>
wrote:
>>>3) Can we allow "//" as well as "--" ( and perhaps even ";" ) to
>>
>> ';' Hmm, I don't see using ';' as a comment starter.
>
>Okay, retract that - old Assembler habits die hard
>
Thanks for reminding me of the ONLY place I had ever seen ';'
used for commenting. I knew I had seen it somewhere but couldn't
recall.
Lucius L. Hilley III
I really miss my 6.4Gig Western Digital. [*CRASH*] :(
11. Re: Version 2.1 alpha-test release now available!
>
>Euphoria 2.1 alpha is now available from:
> http://members.aol.com/FilesEu/
>
One very small (?) request ...
Could you create an INDEX.HTM file which appears during install in
either C:\EUPHORIA or C:\EUPHORIA\HTML with links to the other HTML
pages ?
Many thanks in anticipation.
12. Re: Version 2.1 alpha-test release now available!
Hello all,
This is my first foray onto the list, having discovered Euphoria only
about 10 days ago. I'm very impressed with what I've seen so far and
hope to use this list to help me learn much more about Rob's creation.
I'm a Euphoria newbie but I've been programming since 1961. I've used
C, Asm, Fortran, Forth, Lisp, Pascal and I've recently been studying
Java, and Perl. From what I've learned so far, Euphoria beats them all
for my purposes.
I retired from programming for bosses a couple years ago. Now I do it
for my own enjoyment and to experiment with things that I never had time
to do when I was working for a living.
Below is my 2 cents worth on a couple of items.
Don Groves
-------------------------------------------------------------------------
At 14:38 1/18/99 -0000, Bown, John wrote:
>
>Great; I look forward to having a go with it, three things, before final
>release -
>
>1) Bind - Is really useful to pass .EXE files on to others who don't use
>Euphoria and are loathe to install the interpretor because of the usual
>prejudices about a non-familiar language. Whilst I can see the
>commercial sense in restricting the use of Bind to registered users, I
>feel this is a retrograde step.
I'll have to disagree with this one. The PD version is available to anyone
to experiment with and learn the language. I think that when one reaches
the stage of distributing programs to 3rd parties, it's time to register.
Seems like a tremendous bargain to me at $39.
>2) Can we add "$" as a valid [non-first] character for identifiers
>please - Now that *must* be easy as the character isn't used for any
>other specific purpose in the language !
But then $ wouldn't be available to Rob for use in adding features to
the language. Some day, he will likely add function references and the
most common way is to prefix the function name with some special char.
Let's not use up the special chars for non-essential things.
>3) Can we allow "//" as well as "--" ( and perhaps even ";" ) to
>indicate the start of comments; this would help me ( at least ) when
>swapping and changing between languages ( Java = //, JavaScript = //, C
>= //, C++ = //, Euphoria = -- ).
One of the prime virtues of Euphoria (IMHO) is simplicity. Having only
one syntax for the various parts of the langauage is part of that simplicity.
I like --. It's less intrusive looking than //.
13. Re: Version 2.1 alpha-test release now available!
- Posted by Alan Tu <ATU5713 at COMPUSERVE.COM>
Jan 18, 1999
-
Last edited Jan 19, 1999
Don Groves,
Are you going to be a programming dean of the list? Your comments are ve=
ry
inciteful, and I generally agree. I call you a dean because you started =
in
1961, twenty years before I was even born.
Welcome.
Alan
=
14. Re: Version 2.1 alpha-test release now available!
- Posted by Don Groves <groves at ACM.ORG>
Jan 18, 1999
-
Last edited Jan 19, 1999
At 19:10 1/18/99 -0500, Alan Tu wrote:
>Don Groves,
>
>Are you going to be a programming dean of the list? Your comments are very
>inciteful, and I generally agree. I call you a dean because you started in
>1961, twenty years before I was even born.
>
>Welcome.
>
>Alan
Thanks for the welcome, Alan. I don't know about being a 'dean',
you young guys can probably outcode me easily. I'll just try to
help out however I can.
--
Don Groves
15. Re: Version 2.1 alpha-test release now available!
- Posted by Quality <quality at ANNEX.COM>
Jan 19, 1999
-
Last edited Jan 20, 1999
From: Bown, John <John.Bown at UK.ORIGIN-IT.COM>
>3) Can we allow "//" as well as "--" ( and perhaps even ";" ) to
>indicate the start of comments; this would help me ( at least ) when
>swapping and changing between languages ( Java = //, JavaScript = //, C
>= //, C++ = //, Euphoria = -- ).
John... if you want your editor to see the comments, why not simply code:
any_euphoria_statement -- // my comments here
??
16. Re: Version 2.1 alpha-test release now available!
>
>>3) Can we allow "//" as well as "--" ( and perhaps even ";" ) to
>>indicate the start of comments; this would help me ( at least ) when
>>swapping and changing between languages ( Java = //, JavaScript = //, C
>>= //, C++ = //, Euphoria = -- ).
>
>John... if you want your editor to see the comments, why not simply code:
>
> any_euphoria_statement -- // my comments here
>
Aaaaaaaaarrrrrrrrrrgggggggggghhhhhhhhhh !
It's a fair 'comment' I suppose
The main reason is not because of
the editor I'm using, just that '--' is completely off-key to '//' which
has become the de-facto comment delimiter in recent years.
17. Re: Version 2.1 alpha-test release now available!
I had been using the 2.0 version, but just switched to the 2.1 because I am
having a bit of a problem with some code, and thought I could get around
the 300 line limit with the include file stamping.
However,
I tried to run a program and the machine.e include gives me errors with the
unary operators. (+=, *=)... once I change these the stamp in no longer
valid and I am back to where I started. :(
BTW - I have a bit of code that lets you launch a Win32 app without flashing
the console window... let me clean it up a bit and I will surely share it.
Just about a week into Euphoria, and it is fun. Even if you dont know
the propers of the code, it is terribly simple to read and figure out!
My experience is in Pascal, Modula/2 (ok, so they are about the same thing!),
BASIC and 6502 assembly (can you say Commodore 64?).