home *** CD-ROM | disk | FTP | other *** search
-
- Now that you have read README.DOC and INSTALL.DOC, and you have installed
- Euphoria, here are some things you can try:
-
- * Run each of the demo programs in the demo directory. You just type ex
- followed by the name of the .ex file to execute. e.g.
-
- ex buzz
-
- will run the file buzz.ex. (Depending on your graphics card you may have to
- edit a line in some of the .ex files to select a different graphics mode.
- Most demos will try to use SVGA modes).
-
- You can also double-click on the .ex files from Windows. You will have
- to associate .ex files with ex.exe. A few of the demos are really intended
- to be run from the command line, but most will look ok from Windows.
-
- * Play the language wars game (demo\langwar\lw.ex). Start at the
- novice level. It will take you a while to get used to the commands and
- the directions. Can you defeat C++?
-
- * Generate some beautiful Mandelbrot pictures (demo\mset.ex). Zoom in on the
- interesting parts. Each picture is saved in a file so you don't have to
- start from scratch each time.
-
- * Try to win at 3D TicTacToe. It can be done.
-
- * Use the Euphoria editor, ed, to edit a .e or .ex file. Notice the
- use of colors. What happens if you delete a character from a keyword?
- What happens when you add an extra level of brackets to an expression?
- Use Esc q Enter to quit the editor - Esc h Enter for help.
-
- * Try the benchmarks in demo\bench. Do you get the same ratios as we did
- in comparison with QBasic? If you have a C/C++ compiler, how much faster
- can you get these benchmarks to run? We bet you'll be surprised,
- especially when you consider that Euphoria runs the benchmarks with
- subscript checking and a host of other run-time checks.
-
- * Read the manual in doc\refman.doc. The simple expressive power of Euphoria
- makes this manual much shorter than a C/C++ manual. C/C++ packages
- require thousands of pages of documentation. WATCOM C/C++ has 57 different
- routines for memory allocation, and 67 different routines for manipulating
- strings and blocks of memory. How many of these routines does Euphoria need?
- Answer: zero. In Euphoria, memory allocation happens automatically and
- strings are manipulated just like any other sequences.
-
- * Try running a Euphoria program with tracing turned on. Add:
- with trace
- trace(1)
- at the beginning of any .ex file.
-
- * Try running a Euphoria program with profiling turned on. You need
- to say "with profile" at the start and "profile" at the end, after
- execution. The result will be in ex.pro. Language Wars is interesting.
-
- * Try the learn.ex program in demo\learn. You may have trouble with this
- until you know more about Euphoria.
-
- * Take a look at the programs in bin: walkdir, grep, lines, eprint, freq etc.
- These should be run from a command line.
-
- * Try modifying some of the demo programs.
-
- First some simple modifications (takes less than a minute):
-
- What if there were 100 C++ ships in Language Wars? What if sb.ex had to
- move 1000 tiny balls instead of 50 big ones? Change some parameters in
- polygon.ex. Can you get prettier pictures to appear? Add some funny
- phrases to buzz.ex.
-
- Then, some slightly harder ones (takes a few minutes):
-
- Define a new function of x and y in plot3d.ex. Modify walkdir.ex to print
- a list of all files on your hard disk that meet some criteria, e.g. size
- is 0; year is greater than 1993.
-
- Then some challenging ones (takes an hour or more):
-
- Add your own customized new command to the editor. Set up your own
- customized database by defining the fields in mydata.ex.
-
- Then some really challenging research problems!
-
- Add SVGA graphics to Language Wars. Try to write a smarter 3D TicTacToe
- algorithm. Develop a faster sorting algorithm than any in allsorts.ex.
- Implement a faster Mandelbrot algorithm.
-
- * Try writing your own program in Euphoria. A program can be as simple as:
-
- ? 2+2
-
- Remember that after any error you can simply type "ed" to jump into
- the editor at the offending file and line.
-
- You can immediately run a program that you are editing by typing
- Esc e Enter in the editor. When the program is finished, hit Enter to
- return to the editor.
-
- Once you get used to it, you'll be developing programs much faster in
- Euphoria than you could in BASIC, Fortran, Pascal, C/C++ or any other
- language that we are aware of.
-
-