1. Issues installing Euphoria
- Posted by dcuny Nov 29, 2014
- 2651 views
Every now and then, I get the urge to try out Euphoria again. And then I try installing it, and my experience is terrible.
This isn't a commentary on Euphoria itself, but on the experience of trying to get Euphoria up and running on my machine (Windows 7, 64 bit).
First, I figured I'd first download the latest (4.1.0) version of Euphoria. That turns out to be a .zip file, with no installer. That's OK, I'll just get the prior version.
Hurrah... It installs fine, although 42 meg seems larger than I remember it. Oh, well. It wants a reboot, and I'm ready to try things out.
I test it out by clicking some demos. They're showing their age, with buzz program using long-abandoned phrases like pen computing, fax modem and RISC.
Time to try out an editor. Maybe ed is better than I remember.
file? prompts ed, which is not a good sign at all. I type in test.ex and press Enter, where I'm presented with a text-based editor that's at least 30 years past it's prime.
Hrm... No syntax coloring. I must have put in the wrong file extension. Thinking I can rename the file, I press ESC and see:
help clone quit save write new eui dos find replace lines mods ddd CR:
I really hate ed. What does ddd stand for, anyway? So I press h and get:
Seriously? I just installed the program. I have to set EUDIR manually? Fine, I'll check the documentation. But first, I try to Save the program, and...
Ooops, ed closes. Because ed is really, really horrible (sorry, Robert). I start to wonder why, if Euphoria were really that easy to code in, why hasn't someone hasn't made the default editor that Euphoria comes with much better than it currently is.
Ah, well... Time to check out how to set EUDIR. I bring up the documentation (nicely formatted, but a bit of a pain to navigate) and find:
No, not that one...
OK, so the documentation hasn't been updated in a while. Now, I understand why it's not up-to-date. But that's OK, the instructions should work with Windows 7, right?
Nope.
Nope.
Wow. Just freaking wow. At this point, I'm beyond ready to quit. But Googling finds a solution that doesn't suggest using the Control Panel at all. Instead, it suggests looking in Computer, Properties, Advances System Settings, the Advanced tab, and finally Environment Variables. (There's also a solution for Windows 8).
Now, if the Euphoria installer had set EUDIR in the first place, this could have been avoided. And since EuIDE knows how to set the WATCOM environment, this seems an odd omission. (That's a part of the story I've edited out).
All right, so now I can run my program in ed. There's a bug in the code, but it's pretty obvious. I fix it to:
print(1, "hello")
and get:
All right, I know what the problem is:
printf(1, "hello")
Success! So I Save it... ^#&%#@&%$^#%! Only in ed does Save mean Save and Close. Enough of this... I can't use Euphoria unless there's a decent editor, and ed isn't it. So I check out the list of editors for Euphoria - there are 27 listed, so it shouldn't be hard to find one, right?
Edita looks interesting, but the comments on the Euphoria site say it's deprecated.
EuIDE is slick, but... apparently needs to be used with Win32Lib. That's too bad, because it looks like it would be an awesome little editor. I try it for a bit, and then move on.
Scintilla for Euphoria looks promising, but I can't figure out how to make it work - the Scintilla binary isn't even included. After a while, I give up and move on.
The Notepad++ option looks promising (and simple), so I have a go at that. But the instructions are for an older version of NPP, and it fails to import the XML. So, no dice.
vim is a complete non-starter - I've never liked vi.
Crimson Editor and its replacement Emerald Editor are both abandoned projects.
Geany looks promising... The installation instructions aren't completely clear, but I have a go at it. The directions say I need to read the source code for the installation - never a good sign. Seriously?
The install program says:
-- Windows XP (and later) users should run Geany at least once -- before executing this program so that the "APPDATA" environment -- variable can be properly set. Users of other versions of -- Windows may have to set the path to the Geany configuration -- directory, manually.
I've got no clue what the "path to the Geany configuration directory" is, since I've never used Geany before. I give it a try, and run the install program, which gives me:
programs, EuGeany.ex and EuHelp.ex to c-code, and then we will compile and
link the files to make executable binary files which will be placed in the
directory /euphoria/bin/...
Translating, Compiling, Linking EuGeany.ex...
Build directory: build-916035\
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11 generating
Supplied directory ' C:\Euphoria' is not a valid EUDIR
...
See the bug? Yep, ' C:\Euphoria' has a leading space in it. Which is interesting, because EuIDE worked fine with the EUDIR being set wrong. I've been spending an awful lot of time at the command line to use Euphoria, which also isn't a good sign. I could "just click" the file - as long as I didn't mind not being able to see any error messages. (And no, install doesn't write to err.out, because there is no runtime error).
And then I notice that it's also trying to compile to C code, which means I need to have a C compiler installed and set up for this to work! I make the change from euc to bind. Ooops, make that eubind.
Hurrah... It works... Sort of. But there's still something misconfigured, because the error isn't showing up in Geany.
It's taken me over 4 hours to get to this point, and I haven't even got an editor working right yet.
Anyway, this isn't meant to complain about Euphoria as a language or denigrate the hard work done by the developers, but to give some idea what the user experience of trying to install and use Euphoria is like. I think any "Euphoria is dying" discussion that doesn't take the pain of installation into account is missing the boat.
- David
2. Re: Issues installing Euphoria
- Posted by jimcbrown (admin) Nov 29, 2014
- 2517 views
Every now and then, I get the urge to try out Euphoria again. And then I try installing it, and my experience is terrible.
This isn't a commentary on Euphoria itself, but on the experience of trying to get Euphoria up and running on my machine (Windows 7, 64 bit).
Thanks for taking the time. These reports are very valuable.
First, I figured I'd first download the latest (4.1.0) version of Euphoria. That turns out to be a .zip file, with no installer. That's OK, I'll just get the prior version.
That's because 4.1.0 hasn't been released yet... you probably downloaded an eubin (a pre-alpha bleeing edge release for fellow developers rather than end users). Someone did release a "beta" version somewhere though... but 4.1.0 isn't out yet, officially.
I test it out by clicking some demos. They're showing their age, with buzz program using long-abandoned phrases like pen computing, fax modem and RISC.
Yep. No arguments here. No one has found the time to really overhaul the demos. Mostly the only changes to the older ones are bug fixes.
Time to try out an editor. Maybe ed is better than I remember.
Fraid not. I don't think that editor has been touched in ages, although someone on the forum has an improved unofficial version: http://openeuphoria.org/forum/m/124118.wc http://openeuphoria.org/forum/m/123986.wc
file? prompts ed, which is not a good sign at all. I type in test.ex and press Enter, where I'm presented with a text-based editor that's at least 30 years past it's prime.
Hrm... No syntax coloring. I must have put in the wrong file extension. Thinking I can rename the file, I press ESC and see:
help clone quit save write new eui dos find replace lines mods ddd CR:
I really hate ed.
It's kinda like vi/vim and even nix-land style /bin/ed (an editor even more primitive and older than vi). Some people hate change and want to stick to the classics.
That said, there was some talk about moving ed.ex out of the bin directory, since it's no longer considered the official editor. (OpenEuphoria no longer has an official editor.)
What does ddd stand for, anyway?
A number. You type in a numeric (like 123 or 999) and it jumps to that line in the file.
Seriously? I just installed the program. I have to set EUDIR manually? Fine, I'll check the documentation.
EUDIR is deprecated (along with EUINC). They still work, but it's not recommended that they be used anymore.
So I press h and get:
The fact that ed.ex is still using EUDIR shows just how out of date it is. Even if this had been set up correctly, I doubt it would have worked. I don't think we have the old library.doc file anymore, so ed.ex would have failed to find the documentation anyways... even after EUDIR is set up correctly... because we no longer use EUDIR or library.doc ... ed.ex is just too out-of-date.
But first, I try to Save the program, and...
Ooops, ed closes. Because ed is really, really horrible (sorry, Robert). I start to wonder why, if Euphoria were really that easy to code in, why hasn't someone hasn't made the default editor that Euphoria comes with much better than it currently is.
Making a good editor is really hard. Also, a lot of users prefer full fledged IDEs to a basic coding editor, and that seems to be where the most of the effort has gone recently.
(A problem with making one of these the official IDE is that the IDEs written in Euphoria tend to be tied to a single toolkit (e.g. EuIDE and win32lib, as you pointed out), and we want generally don't want to play favorites among toolkits here.)
I don't think it makes sense to have an old, out of date editor as the official editor. I also don't know about having an official editor be a 3rd party one that's coded in something other than Euphoria... that pretty much leaves just Edita afaik.
Ah, well... Time to check out how to set EUDIR. I bring up the documentation (nicely formatted, but a bit of a pain to navigate) and find:
No, not that one...
OK, so the documentation hasn't been updated in a while. Now, I understand why it's not up-to-date.
Did you really understand why it's not up-to-date? Actually, considering how long EUDIR has been deprecated I'm very surprised to see that bit of documentation still survives. Do we really still need that bit?
If we do need it, then it definitely should be updated for newer windoze....but, do we?
Edita looks interesting, but the comments on the Euphoria site say it's deprecated.
I'm surprised to see that. I was under the impression that Pete Lomax was still maintaining this. Edita might be more geared to Phix (his own language, written from scratch but backwards compatible with RDS Euphoria), but it should work with OpenEuphoria.
There were a couple of bugs (e.g. http://openeuphoria.org/forum/m/123999.wc and http://openeuphoria.org/forum/m/123342.wc ) but Pete's probably already fixed those.
Geany looks promising... The installation instructions aren't completely clear, but I have a go at it. The directions say I need to read the source code for the installation - never a good sign. Seriously?
EuGeany is an unofficial editor helper (applet?) and the devs here don't support it. OTOH, the author of EuGeany is active on the forums and will probably see any recommendations/issues/bugfixes you post here.
Geany by itself is probably just fine. (I've never tried it, but apparently irv does: http://openeuphoria.org/forum/m/123386.wc ) Using EuGeany with Geany seems to require some extra configuration that must be done manually post install anyways (e.g. updating the relevant Geany config file to actually run EuGeany/EuHelp).
My understanding is that the only thing EuGeany does is provide a way to jump automatically to the line/column if an ex.err file is found. http://openeuphoria.org/forum/m/121178.wc EuHelp just provides GTK documentation (by loading a local web page into a web browser). http://openeuphoria.org/forum/121238.wc#121238
It does appear that some manual editing of the source code of EuGeany/EuHelp may be required before they'll even work.... (such as correcting the location of the ALT_HELPFILE...)
Also, I strongly dislike EuGeany's dependence on EUDIR....
Anyway, this isn't meant to complain about Euphoria as a language or denigrate the hard work done by the developers, but to give some idea what the user experience of trying to install and use Euphoria is like. I think any "Euphoria is dying" discussion that doesn't take the pain of installation into account is missing the boat.
- David
Agreed in full. I think some of your issues would not affect a brand new user to the language (who shouldn't even know about ed.ex), but bringing back former users into the fold and catering to their needs is something that should seriously be considered. Therefore, evenything you have brought up is completely relevant to us and should be addressed.
As is usual though, the biggest issue is finding devs with the time to work on this. We can't even push 4.1.0 out the door, and it's almost completely polished...
3. Re: Issues installing Euphoria
- Posted by GreenEuphorian Nov 29, 2014
- 2421 views
Welcome back, David.
4. Re: Issues installing Euphoria
- Posted by dcuny Nov 29, 2014
- 2420 views
Thanks for the detailed response.
If EUDIR is deprecated, there are a lot of programs that haven't gotten the news!
ed should either be revamped or removed from Euphoria. But I've always through that Euphoria needs a supported editor of some sort.
I spent a chunk of time in the last century writing a DOS editor for Euphoria called ee back when I thought the QBasic editor was the best thing since sliced bread. I'd hoped that it would replace ed, but I couldn't convince Robert. Since DOS support is gone, the code is pretty much worthless.
The expectations of a modern editor are a lot higher than when ed was written. For example, EuGeany will autocomplete wait_key() for me. But the code won't work, because include std/console.e is missing. IDEs like Eclipse will automatically suggest that they be added in.
To be honest, I could probably even use a text mode editor like ed if it worked really, really well... But it doesn't, and I think the time of text-based editors has come and gone.
- David
5. Re: Issues installing Euphoria
- Posted by dcuny Nov 29, 2014
- 2407 views
Welcome back, David.
Thanks!
- David
6. Re: Issues installing Euphoria
- Posted by jimcbrown (admin) Nov 29, 2014
- 2413 views
Thanks for the detailed response.
Thank you for writing your original post in the first place.
If EUDIR is deprecated, there are a lot of programs that haven't gotten the news!
Probably. This is definitely something that needs to be taken care of. It's just a lot of work.
ed should either be revamped or removed from Euphoria. But I've always through that Euphoria needs a supported editor of some sort.
I spent a chunk of time in the last century writing a DOS editor for Euphoria called ee back when I thought the QBasic editor was the best thing since sliced bread. I'd hoped that it would replace ed, but I couldn't convince Robert. Since DOS support is gone, the code is pretty much worthless.
Not so. irv wrote a version that worked on Linux/GNU. Virtually all of the "text graphics" routines that are used on nix also work for the console version of windoze, so it should take minimal effort to get ee.ex working there as well.
I quite liked ee.ex and would love to see it revived. (I'm not really an IDE person, myself...)
7. Re: Issues installing Euphoria
- Posted by dcuny Nov 29, 2014
- 2456 views
Not so. irv wrote a version that worked on Linux/GNU. Virtually all of the "text graphics" routines that are used on nix also work for the console version of windoze, so it should take minimal effort to get ee.ex working there as well.
I've been looking through the code again... I'm not sure about minimal. I remember working with a port and the mouse being a bit wonky.
From what I gather, there's no mouse support in the console. Is that correct?
If that's the case, navigation will require some rethinking.
I quite liked ee.ex and would love to see it revived. (I'm not really an IDE person, myself...)
Have you looked at the TypeScript editor? It's an on-line editor that has all the intellisense goodness of an IDE, but without a complex interface. There are a couple of features I really like about it. Choose the Raytracer code and play around with the editor. You'll notice that there UI stays out of the way. Press F1 for the menu palette, and Ctrl+Shift+O for a Find Symbol. The F3 search is pretty clean, too.
I suspect something like that could be implemented in a "pure" text editor. Grrr... Now you've got me thinking about it.
It's not that radically different from what ed is trying to be, it's just a heck of a lot nicer. Or maybe I should just edit the Save behavior in ed.
Again... There's no mouse in the Open Euphoria console mode, correct? And there doesn't see to be any way of getting underlined text - is that also the case?
- David
8. Re: Issues installing Euphoria
- Posted by irv Nov 30, 2014
- 2318 views
I don't know why it seems impossible to get rid of ed.ex.
If it worked right out of the box perfectly on all platforms, it would still smell like 1980.
Someone who hasn't programmed before is going to be turned off, and anyone who has, already has a favorite editor, and isn't going to change unless Euphoria can supply one which does everything their favorite does, plus the addition of support for Eu.
Even if by some miracle we had an editor that would do all of this, someone would complain that it wasn't written 100% in Eu.
And that wouldn't satisfy the people who want to type "make a game" and have a running program.
9. Re: Issues installing Euphoria
- Posted by dcuny Nov 30, 2014
- 2304 views
I don't know why it seems impossible to get rid of ed.ex.
You and me both.
Even if by some miracle we had an editor that would do all of this, someone would complain that it wasn't written 100% in Eu.
That flamewar is never going away. But I just want something that works well out of the box, and doesn't require any hassle to install.
ed could probably be turned into a decent editor, if only some of the basic stuff wasn't broken. Here's whats at the top of my list:
- Shift+Arrow key selection doesn't work.
- Cut and paste doesn't work. Or if it does, it uses different key bindings.
- Save closes.
- find is clunky.
- Pressing the wrong key gets you stuck up at the command line
Some of these are simple to change; others (like text selection) would require some serious reworking of ed.
Adding stuff like intellisense would be nice, but that basically requires writing a parser that can dynamically read the file you're editing. Handling legal code such as:
atom a=sin(12)+10 , b
is a bit tricky. And the scanner has to be able to recover from typos, or it won't be very useful.
And that wouldn't satisfy the people who want to type "make a game" and have a running program.
But this is even more basic than that. You don't need all the bells and whistles of an IDE - but there should be at least one editor on the Euphoria editor list that's easy to install and works. I didn't try them all, but every one that I did try was broken.
That's seriously messed up.
10. Re: Issues installing Euphoria
- Posted by ryanj Nov 30, 2014
- 2287 views
But this is even more basic than that. You don't need all the bells and whistles of an IDE - but there should be at least one editor on the Euphoria editor list that's easy to install and works. I didn't try them all, but every one that I did try was broken.
That's seriously messed up.
I'm working on an editor, RedyCode. And it is 100% Euphoria. As far as syntax highlighting and more advanced features, I will be working on those when I have time, after I release the first version of Redy. I am serious about making it a really nice text editor. I am open to any suggestions. What specific features do people want in a Euphoria IDE?
11. Re: Issues installing Euphoria
- Posted by system_X Nov 30, 2014
- 2254 views
I'm working on an editor, RedyCode. And it is 100% Euphoria. As far as syntax highlighting and more advanced features, I will be working on those when I have time, after I release the first version of Redy. I am serious about making it a really nice text editor. I am open to any suggestions. What specific features do people want in a Euphoria IDE?
Syntax highlighting, display how many lines total, what line and column the cursor is at. Search box, goto line # box. Those are the basics that would make me happy. Then in the future more advanced features such as tabs, sidebar with symbols, and a message window for terminal. I'll think of more, but those are what I see as important off the top of my head.
12. Re: Issues installing Euphoria
- Posted by PeteE Dec 01, 2014
- 2237 views
I have fond memories of using David's wonderful EE.ex as an Euphoria IDE, having grown up on QBasic. I also liked Borland's Turbo-Vision style editors of Turbo Pascal/C. I've been toying around with the idea of updating EE to work as a cross-platform OpenGL application by rendering the text into a bitmap and displaying that. I would also want modern features such as undo, jump to subroutine, and maybe intellisense (I like writing parsers.)
13. Re: Issues installing Euphoria
- Posted by dcuny Dec 01, 2014
- 2233 views
I would also want modern features such as undo, jump to subroutine, and maybe intellisense (I like writing parsers.)
Yeah, I can't resist either. That's why I've got the beginnings of a Euphoria parser intended for intellisense. It'll go through a file and gather various types of blocks (function, procedure, type) along with the parameter lists. It can pick up enums and constants as well. I haven't quite cracked variables, since handling comma delimited lists with assignments gets a bit tricky.
The thing is, the parser has to make sense of what you're writing... even if the code is incomplete or broken. Fun fun fun.
I'd also started on an editor, although there's a long way to go with it. At the moment it just displays text.
But... Really, it's a distraction from what I intended to be using Euphoria for, which is why I ultimately stopped using Euphoria in the first place. Sure, it's a great little language, but having to re-invent the wheel seems sort of pointless. "Pure" Euphoria is well and good, but for stuff like rock-solid editing, mouse support, huge undo/redo, there's no reason to reinvent the wheel.
Scintilla is an awesome little editor, and has hooks that make it really easy to add things like intellisense. I can't imagine anything I'd write that could compete with it.
In my mind, that's really the route to take.
- David
14. Re: Issues installing Euphoria
- Posted by dcuny Dec 01, 2014
- 2224 views
I'm working on an editor, RedyCode. And it is 100% Euphoria.
I believe there were quite a number of DOS GUI libraries for Euphoria at one point. Jiri Babor wrote one. I wrote one, too - draggable windows, drop-down menus, font handling, themeable widgets, on and on. I had way to much time on my hands, I guess.
The truth is that, although it's a fun project, there's not really a compelling reason for simply adopting an existing library into Euphoria and moving on. Sure, it's not in "pure" Euphoria, but where's the value in that? The goal is to provide a solid tool for people to get work done, not to showcase Euphoria.
Remember the Java "Metal" theme? Sun put a ton of work into it, and it never caught on. People expect applications to look native on their machines. That's one reason why most Java applications simply adopt an (emulated) native look and feel - and even then, it's still hard to get right.
If you want to write your own editor, or your own toolkit, or even your own operating system - go ahead.
But I think this "not invented here" attitude ends up making Euphoria difficult to adopt, because there are dozens of options available... It's just that many of them are broken or abandoned.
- David
15. Re: Issues installing Euphoria
- Posted by _tom (admin) Dec 01, 2014
- 2163 views
Thankyou, Mr. Cuny, for your contributions to the Euphoria Archive, it contains some really interesting programs you have written. Also, thankyou for your efforts in trying to improve Euphoria.
Classic ed editor
I'm revising the documentation and have reduced the footprint of ed.ex to simply saying it is a demo program.
I had a plan to wrap a tutorial around it as a programming exercise. Understanding ed.ex requires imagining a computer running at 0.008 GHz using 0.00064 GB of ram while looking at a green screen monitor. I did not spend time on this.
ee.ex editor
I like the ee.ex editor.
I tried to get Euphoria_Linux 2.5 working but got a "Error opening terminal: xterm. " message. Euphoria 3 dropped gpm mouse support making ee.ex less interesting. Another problem under Linux was keypresses are not input properly--but that can be fixed. The good news is that a Linux terminal is UTF-8 so the fancy window details can be rendered easily. No way to change the cursor; no easy way to get underlined text.
Without some kind of mouse support ee.ex doesn't make it as an "official" Euphoria editor--but I feel many would still like to see it revived. I don't understand why Linux mouse support was dropped and how to get it back.
I'm ready to swap ee.ex for ed.ex anytime.
OE4.1
I re-arranged the download page to keep people from downloading the beta version before they have OE4.0 installed.
Windows Installation
My understanding is the Microsoft Windows is very hard to use. More effort should be placed in warning people not to expect much from Windows systems.
I know, I'll have to revise the documentation for this Windows stuff--but I could use some help here.
Geany
Geany is at least multi-platform making it a reasonable starting point for a recommended editor. I'm hopeful that a smoother installation process will make Geany useful. I have not found another multi-platform editor; it doesn't have to be perfect, just a starting point.
GUI
What we need is to get the author of win32 or the author of wxBasic to make a fork of Euphoria with a GUI built-in. But, I can't wish the needed sleepless nights on anyone.
There was a Euphoria 2.5, named Bach, written by K. Boechert that has OOP and the IUP GUI built-in that was really interesting.
Thanks David
_tom
16. Re: Issues installing Euphoria
- Posted by BRyan Dec 01, 2014
- 2191 views
David I still use ee.ex everyday on ver 3.11 of euphoria using winxp and also on eu ver 4.x.x
17. Re: Issues installing Euphoria
- Posted by DerekParnell (admin) Dec 01, 2014
- 2127 views
Scintilla is an awesome little editor, and has hooks that make it really easy to add things like intellisense. I can't imagine anything I'd write that could compete with it.
In my mind, that's really the route to take.
Hi David, nice to hear from you again. I've missed your expertise.
Yes. Using Scintilla or similar is a lot better option.
The ed.ex program should be consigned to the demo area (and updated a bit, maybe).
18. Re: Issues installing Euphoria
- Posted by dcuny Dec 01, 2014
- 2136 views
David I still use ee.ex everyday on ver 3.11 of euphoria using winxp and also on eu ver 4.x.x
It's certainly usable. I've been using over the last couple of days myself. But I don't think it's a preferred solution.
19. Re: Issues installing Euphoria
- Posted by dcuny Dec 01, 2014
- 2174 views
Thankyou, Mr. Cuny, for your contributions to the Euphoria Archive, it contains some really interesting programs you have written.
Mr. Cuny... Now I feel old!
I had a plan to wrap a tutorial around it as a programming exercise. Understanding ed.ex requires imagining a computer running at 0.008 GHz using 0.00064 GB of ram while looking at a green screen monitor.
And ee was written with the expectation that you could poke directly into video memory, although it also has a nifty VGA and SVGA mode.
But those days are long gone, too.
I like the ee.ex editor.
Well, it was as close to the QBasic editor as I could get! I was pulled away from QBasic kicking and screaming.
Euphoria 3 dropped gpm mouse support making ee.ex less interesting.
In truth, a decent editor could be put together in console mode without mouse support. When coding, I tend to stick to the keyboard where possible. As long as intellisense is pretty seamless, and there's an easy way to navigate to routine (for example, hotkeys for Go to Definition and Go to Symbol), things are pretty simple. Again, I think the online TypeScript editor is a good example.
But... You could write the same sort of backend code into Scintilla and have an awesome cross-platform editor.
I re-arranged the download page to keep people from downloading the beta version before they have OE4.0 installed.
Thanks!
My understanding is the Microsoft Windows is very hard to use. More effort should be placed in warning people not to expect much from Windows systems.
I'm not sure how that relates to Euphoria.
I'm not sure what installer Euphoria uses, but Inno Setup, can create environment variables. There's no reason why the user should have to set it manually.
I'm hopeful that a smoother installation process will make Geany useful.
I agree - the installation was the sticking point.
I have not found another multi-platform editor; it doesn't have to be perfect, just a starting point.
Scintilla is multi-platform, and quite nice.
What we need is to get the author of win32 or the author of wxBasic to make a fork of Euphoria with a GUI built-in.
The issue here is maintaining the wrappers for the library. I basically had to write a routine that would extract the function prototypes from the wxWidgets HTML documentation, and another routine that created glue between wxBasic and wxWidgets. It was basically my own version of SWIG.
But there's also the question of releasing objects when they're done. wxBasic handles the reference counting under the hood (as does Euphoria).
Now, if you could find an existing project that already had a list of wrapper prototypes, things would be a lot easier! But there's another issue... wxWidgets is a huge library. And it's not usable unless there's some sort of intellisense to help.
When I first wrote wxBasic, I modeled it off the JavaScript library, with a var that could hold any type of data. But once I glued in wxWidgets, it because clear that I needed a type system, so intellisense could display the appropriate methods for objects.
You'll see the exact same thing in TypeScript, where types are added to the language for the IDE and safety... but ultimately discarded when the code is "compiled".
So it's more an existential sort of question of what happens to Euphoria when it merges into something like wxWidgets.
That having been said, what's the status of the wxWidgets for Euphoria? I thought I saw a comment in a thread saying the Scintilla wrapper was broken.
- David
20. Re: Issues installing Euphoria
- Posted by jimcbrown (admin) Dec 01, 2014
- 2136 views
Euphoria 3 dropped gpm mouse support making ee.ex less interesting.
Here's some more information on why that happened:
http://openeuphoria.org/forum/m/71995.wc
http://openeuphoria.org/forum/m/72565.wc
I'm not sure what installer Euphoria uses, but Inno Setup, can create environment variables. There's no reason why the user should have to set it manually.
InstallShield, with .iss files
The Euphoria installer does in fact set up environment variables for you (it adds Euphoria to the path, and if you are using the OpenWatcom installer it also sets up the WATCOM related environment variables).
what's the status of the wxWidgets for Euphoria?
wxEuphoria is actively maintained and supported by Greg...
http://openeuphoria.org/wiki/view/wxEuphoria.wc
http://wxeuphoria.sourceforge.net/docs/CHANGE_HISTORY.html
21. Re: Issues installing Euphoria
- Posted by dcuny Dec 01, 2014
- 2089 views
The Euphoria installer does in fact set up environment variables for you (it adds Euphoria to the path, and if you are using the OpenWatcom installer it also sets up the WATCOM related environment variables).
Ah, I wondered which installer had set that. Does it also set EUDIR? Even though people say it's deprecated, everything (including the wxEuphoria installer) seems to rely on it.
what's the status of the wxWidgets for Euphoria?
wxEuphoria is actively maintained and supported by Greg...
Cool! It doesn't look like there's a wrapper for the StyledTextControl, but I've only just skimmed the code.
I wonder how difficult it would be glue Euphoria into Scintilla...
- David
22. Re: Issues installing Euphoria
- Posted by jaygade Dec 01, 2014
- 2092 views
I don't know about "intellisense" or whatever (I use vim on Windows and Mac and OS X), but I think that installers suck. You don't always have administrative access to computers on which you want to install Euphoria, and it is sometimes convenient to just unzip it onto a USB drive.
An installer does not give you that option.
23. Re: Issues installing Euphoria
- Posted by jimcbrown (admin) Dec 01, 2014
- 2090 views
The Euphoria installer does in fact set up environment variables for you (it adds Euphoria to the path, and if you are using the OpenWatcom installer it also sets up the WATCOM related environment variables).
Ah, I wondered which installer had set that. Does it also set EUDIR? Even though people say it's deprecated, everything (including the wxEuphoria installer) seems to rely on it.
It does not. This was an explicit design decision made in 2008 to force people to move away from using EUDIR.
However, now that we have 6 years of experience with this situation, the time may be ripe to revisit this decision.
what's the status of the wxWidgets for Euphoria?
wxEuphoria is actively maintained and supported by Greg...
Cool! It doesn't look like there's a wrapper for the StyledTextControl, but I've only just skimmed the code.
I wonder how difficult it would be glue Euphoria into Scintilla...
- David
It's not wrapped yet: http://openeuphoria.org/forum/m/125390.wc
24. Re: Issues installing Euphoria
- Posted by jaygade Dec 01, 2014
- 2104 views
Speaking of, where has Matt been? I haven't seen him post in a long time.
He has always seemed to be the de facto leader.
25. Re: Issues installing Euphoria
- Posted by dcuny Dec 01, 2014
- 2077 views
It's not wrapped yet: http://openeuphoria.org/forum/m/125390.wc
Thanks.
All right, I've been digging through the wxEuphoria code, and it's starting to look familiar. Especially the Minesweeper and Freecell code...
This looks very competently put together. If I'm reading this correctly (and there's a good chance that I'm not), it appears that wrap.exw reads a bunch of hand-written .cpp files, and creates Euphoria wrappers. Is this correct?
If so, where do the .cpp files come from? Are they written by hand? Because that's a crazy amount of work for something that (I would hope) could be autogenerated.
- David
26. Re: Issues installing Euphoria
- Posted by ghaberek (admin) Dec 02, 2014
- 2036 views
All right, I've been digging through the wxEuphoria code, and it's starting to look familiar. Especially the Minesweeper and Freecell code...
This looks very competently put together. If I'm reading this correctly (and there's a good chance that I'm not), it appears that wrap.exw reads a bunch of hand-written .cpp files, and creates Euphoria wrappers. Is this correct?
If so, where do the .cpp files come from? Are they written by hand? Because that's a crazy amount of work for something that (I would hope) could be autogenerated.
You're gosh-darn-right it's a lot of work! All of that C++ code is hand-written, mostly by Matt and some by me. The wrap.exw utility certainly helps to prevent repeating all that work to wrap the code in Euphoria. Long ago (i.e. 2006), Matt had the library arranged quite differently, where the Euphoria code called directly into the wxWidgets library natively. Basically, it was pretending to be C++, but (IIRC) that got too complicated with different compilers and name mangling. You can actually browse that old code here.
I've gone through a few attempts now, over the past couple years, of trying to build an wrapper "script" around wxWidgets to automatically build wxEuphoria (from scratch!) using the Doxygen XML output. Doxygen support was officially added to wxWidgets with 2.9 and wxEuphoria as it is was built with only 2.8. So I believe it's quite possible at this stage. I've tried using plain Euphoria, a few user-submitted XML libraries, wxEuphoria XML classes, C++ with wxWidgets, and even Makefiles (to generate wrappers in batch).
I can go into more detail on my efforts if anyone is interested in helping.
-Greg
27. Re: Issues installing Euphoria
- Posted by K_D_R Dec 02, 2014
- 1997 views
Regarding ed.ex / edx.ex ...
I say abandon or deprecate the editor formerly known as ed.ex. I doubt that anyone else is using it besides me. The last version can be archived on the rds page.
Regarding Geany and EuGeany...
With EuGeany tried to add Euphoria support for the Geany editor, but it is evident that my ambitions have fallen far short of my abilities. I was thrilled when Irv Mullins rewrote "gneui.ex" and included it with his EuGTK package - it works like a charm. I may try to improve the EuHelp/EuGeany code, but it is unrealistic to expect me to write code on par with "real" programmers.
For EuHelp I wrote a little program that extracted keywords from the Euphoria html documentation files. Then, I added these keywords to ed.ex and Geany's syntax color support files and wrote a Geany Tag file. The tag file allowed Geany to autocomplete Euphoria keywords without having to load each specific library file into the editor. The EuHelp program simply passed the editors current "word" to a browser to display the matching help article for that particular keyword. My ragtag code worked pretty well for me, evidently not so well for others. I am sure a large number of programmers on this forum who could write a more robust utility program that accomplishes all this with much better form and functionality.
Good to see you back, David Cuny!
Regards,
28. Re: Issues installing Euphoria
- Posted by petelomax Dec 02, 2014
- 2012 views
Every now and then, I get the urge to try out Euphoria again. And then I try installing it, and my experience is terrible.
This isn't a commentary on Euphoria itself, but on the experience of trying to get Euphoria up and running on my machine (Windows 7, 64 bit).
Time to try out an editor. Maybe ed is better than I remember.
Edita looks interesting, but the comments on the Euphoria site say it's deprecated.
I'm surprised to see that. I was under the impression that Pete Lomax was still maintaining this. Edita might be more geared to Phix (his own language, written from scratch but backwards compatible with RDS Euphoria), but it should work with OpenEuphoria.
I'm surprised to see that too, and after unchecking "Forum" I couldn't find Edita and deprecated in the same sentence anywhere on this site. It is true that I have not shipped an update for quite a while, but the first two links on http://edita.is-great.org should still work and it should be fine on Windows 7 (flw), though I do remember the toobar was a bit squished. There is a new release in the pipeline, with that fixed, (Phix-based) intellisense, unicode support, improved help, and around 3 dozen petty bugfixes, but I'm not shipping that until the new version of Phix is ready, which may take some time. You are quite right that Edita runs (better) on Phix, but that's all bundled in with the download and it shouldn't be an issue if you want to edit/run OpenEuphoria code.
There were a couple of bugs (e.g. http://openeuphoria.org/forum/m/123999.wc and http://openeuphoria.org/forum/m/123342.wc ) but Pete's probably already fixed those.
For the first one, the new version has (will have) arwen/sizeof() renamed. I don't plan to do anything about the second one as a properly setup eu.cfg should be enough, which is an OpenEuphoria thing anyway.
Pete
PS Welcome back, Mr Cuny.
29. Re: Issues installing Euphoria
- Posted by dcuny Dec 02, 2014
- 1992 views
You're gosh-darn-right it's a lot of work! All of that C++ code is hand-written, mostly by Matt and some by me.
Hi, Greg.
For wxBasic, I followed the SWIG route of storing all the prototypes in a .i file, and wrote a program that would generate the C++ code directly from that. So adding a new library is mostly just a matter of putting the prototypes into a single file, and presto, all that manual work is done for you. For example:
ctor %wxWaveFromFile(const wxString& fileName, bool isResource = FALSE)
bool Create(const wxString& fileName, bool isResource = FALSE)
bool IsOk() const
bool Play(bool async = TRUE, bool looped = FALSE) const
No need to hand-code any of this - the processor reads through the file and spits out the C++ wrappers, as well as glue for wxBasic to connect to the wrappers.
As far as I can figure, you're only doing the second half - creating the "glue", but not auto-generating the wrapped methods.
Since you're smart, I can only assume that you did it the "hard" way for some other reason, but I don't know enough to guess what that reason might be.
Now, there are still places where hand-coding takes place, but there is a %{ ... %} directive that allows "raw" code to be passed in. For example, the GetNext for the wxDir had to be overwritten not to expect a string, so the code directive looks like this (and goes into the same .i file as the rest of the prototypes):
%{
// char *GetNext()
void wxDir_GetNext()
{
// allocate string to hold the result
wxString filename = wxString();
// call wxDir::GetNext
((wxDir *)wTheCall->self->ptr)->GetNext(&filename);
wWrapDerefArgs();
wStackPushChar( (char *)(filename.c_str()), W_TRUE );
}
%}
%method GetNext wxDir_GetNext()
In the above example, original prototype is commented out. The replacement code between the %{ and %} directives is passed through as "raw" C++ code, and the %method directive instructs the processor to use wxDir_GetNext() as the GetNext method.
This is pretty much a direct copy of how SWIG works, except for the %method directive.
Looking at the prototypes that wxBasic has for wxStyledTextCtrl (which are probably terribly out of date), there are about 340 methods, 26 custom events, 495 literals, and 44 methods in an associated wxStyledTextEvent class that have to be wrapped. That's a ton of work to do by hand, but the wxBasic wrapper generator does that "for free".
So I'm curious why you took a different route.
- David
30. Re: Issues installing Euphoria
- Posted by dcuny Dec 02, 2014
- 1938 views
For EuHelp I wrote a little program that extracted keywords from the Euphoria html documentation files.
I believe that ee did something along those lines as well.
But with a more modern editor, you want something that parses out the file that you're currently editing as well. The intellisense can auto-complete routines and variables for what you're currently working on, not just global stuff.
Because Euphoria isn't strongly typed, the intellisense can't do as much as other languages. If you've using a large library (like wxWidgets), I found a type system invaluable, because large libraries like that are just too massive to remember all the various methods.
Good to see you back, David Cuny!
I've always enjoyed the Euphoria community, but there are a lot of "Real Life" projects that eat up my time. To be honest, I've been at home with a cold for the last couple of days, which is why I've got a little time on my hands. I'm supposed to be working on a singing voice-synthesis program, and had been kicking around the idea of developing it in Euphoria, since I still don't really like working in C...
Anyway, it's nice to visit.
- David
31. Re: Issues installing Euphoria
- Posted by dcuny Dec 02, 2014
- 2001 views
I'm surprised to see that too, and after unchecking "Forum" I couldn't find Edita and deprecated in the same sentence anywhere on this site.
Argh! I see my mistake now. I went to the original Euphoria site and looked at the list. The top 5 items on the list are all tagged as "outdated", and I (wrongly) assumed that the list was sorted by most recent on top. Had I kept reading down, I'd have found a more recent, not outdated version.
So I went to http://edita.is-great.org to grab a copy, unzipped it and clicked edita.euw, and got the error:
error creating edita.edb
and at the console:
attempt to divide by 0
... called from C:\Users\dmdq\Desktop\eins035\src\eaedb.e:1286
--> See ex.err
Press Enter...
Remember, my goal here isn't really to complain about what's been built - I'm thrilled that people have kept working on Euphoria.
I'm just suggesting that the newbie experience could be made a lot smoother by making sure the install works right (setting EUDIR) and by including an solid editor. The truth is, at this point, ed is the only one that's really worked of the ones that I tried (excluding the Win32Lib editor, which I couldn't get to work as a "plain" editor.
PS Welcome back, Mr Cuny.
Thanks! (There's that "Mr." again! )
- David
32. Re: Issues installing Euphoria
- Posted by K_D_R Dec 02, 2014
- 1915 views
But with a more modern editor, you want something that parses out the file that you're currently editing as well. The intellisense can auto-complete routines and variables for what you're currently working on, not just global stuff.
Geany will auto-complete any word in the current document as well as any word in any document in an open window. Also, Geany has a pretty neat code snippet auto complete feature.
In my version of ed.ex, pressing Escape + h will present a top line scrolling pick list of keywords derived from the pattern of several letters typed in the editor. If there is only one word available, the word is automatically completed. Pressing Escape + h again will present any available html help article in a browser window. If no html help article is available, the word is passed to guru.ex. Come to think of it, even I should be able to add words from the current document to the pick list for auto completion, without too much trouble - that might be a fun little project.
I won't be holding my breath for an "intellisense" feature on any euphoria editor, but it would be a pleasant surprise.
Regards, Ken
33. Re: Issues installing Euphoria
- Posted by ghaberek (admin) Dec 02, 2014
- 1953 views
So I'm curious why you took a different route.
That was a design decision and/or moment of weakness by Matt. I am sure he had his reasons. He did write a lot of boiler-plate code to ease the burden and deal with some of the intricacies of wxWidgets. For instance, there's a NEW_CONTROL macro that quickly wraps the constructor of most controls in three lines of code, and get_string() to convert a Euphoria sequence to a wxString type.
SWIG may be a good option now, but I don't think it was several years ago. The wxWidgets developers have only recently been working to "fix" a lot of the macro- and ifdef-heavy codebase (some of which is necessary evil to create such a massively cross-platform library). A lot of their progress has been helped by dropping support for older compilers that required such hacky behavior.
I will try to give SWIG a whirl and see where I end up. I need something to give me some momentum in rebuilding wxEuphoria automatically so that we can bring it up to speed.
-Greg
34. Re: Issues installing Euphoria
- Posted by dcuny Dec 02, 2014
- 1917 views
I will try to give SWIG a whirl and see where I end up. I need something to give me some momentum in rebuilding wxEuphoria automatically so that we can bring it up to speed.
I should clarify - I modeled the wrapper generator that wxBasic uses on SWIG, but wrote my own version of the code generator.
I made a start at a SWIG-like code generator for wxEuphoria this afternoon. I can take a prototype like this:
and generate:
{
((wxScrollBar*)this_ptr)->SetScrollbar( position, thumbSize, range, pageSize, refresh );
}
The ?? indicates places where I haven't yet figured out how wxEuphoria casts the types. I haven't had time to figure out if a bool is cast as an int, or a bool.
Since the last parameter is optional (and my code knows that), I could have it generate a wrapper that expects the parameters passed in as a sequence and handles that automatically. I haven't had time to see how things like strings and arrays are handled yet.
My "SWIG" code actually a fairly clever, since it knows that an int * needs to be handled by sending it back as a sequence parameter, and so it automatically converts:
virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL ) const
into:
int x, y, descent, externalLeading;
seq1_ptr seq = NewS1( 4 );
((wxScrollBar*)this_ptr)->GetTextExtent( string, &x, &y, &descent, &externalLeading, font );
seq->base[2] = y;
seq->base[3] = descent;
seq->base[4] = externalLeading;
return MAKE_SEQ( seq );
}
But I need to know a few more things before it can generate wrappers for the wxStyledTextCtrl:
- How are events handled?
- How are the wxWidgets constants exposed to wxEuphoria?
- How are pointers to wxWidgets objects passed?
I can figure those out by poking around in the code, but if you could point them out to me, it would be helpful.
- David
35. Re: Issues installing Euphoria
- Posted by ghaberek (admin) Dec 02, 2014
- 1907 views
Well shucks, that looks great so far!
{
((wxScrollBar*)this_ptr)->SetScrollbar( position, thumbSize, range, pageSize, refresh );
}
The ?? indicates places where I haven't yet figured out how wxEuphoria casts the types. I haven't had time to figure out if a bool is cast as an int, or a bool.
You could just pass that through as C_BOOL. No casting required. Although currently it would probably be intptr_t and then cast to bool.
My "SWIG" code actually a fairly clever, since it knows that an int * needs to be handled by sending it back as a sequence parameter, and so it automatically converts:
virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL ) const
into:
int x, y, descent, externalLeading;
seq1_ptr seq = NewS1( 4 );
((wxScrollBar*)this_ptr)->GetTextExtent( string, &x, &y, &descent, &externalLeading, font );
seq->base[2] = y;
seq->base[3] = descent;
seq->base[4] = externalLeading;
return MAKE_SEQ( seq );
}
That would look something like this. You can use get_string() to return a wxString from an object. Just remember to dereference the object with wxDeRef().
object WXEUAPI get_text_extent( intptr_t this_ptr, object string, intptr_t font ) { int x, y, descent, externalLeading; seq1_ptr seq = NewS1( 4 ); ((wxScrollBar*)this_ptr)->GetTextExtent( get_string(string), &x, &y, &descent, &externalLeading, (wxFont*)font ); wxDeRef( string ); seq->base[1] = x; seq->base[2] = y; seq->base[3] = descent; seq->base[4] = externalLeading; return MAKE_SEQ( seq ); }
How are events handled?
Here's my understanding of the event flow. It's basically a single event handler that proxies the routine calls back into Euphoria.
- initialize() in wxeud.e (around line 7500) is called to start the process
- passes call-backs for the C++ code to call routines in Euphoria by proxy
- this then calls...
- initialize() in wxEuphoria.cpp (around line 715)
- creates EuApp instance and stores call-back pointers
- user code calls set_event_handler() in wxEuphoria.cpp (around line 220)
- establishes the "proper" parent for the event (quirky behavior for wxMenu)
- creates a wxEuClientData() object and adds the values to its list
- connects the generic EuEvent::Handler function to the event
- when an event is triggered, wxWidgets calls EuEvent::Handler in wxEuphoria.cpp (around line 140)
- gets the wxEuClientData object associated with the event handler
- builds a sequence to hold the event handler values
- calls EuApp::wxEuApp->proc() to call the Euphoria call-back
- some event handlers require calls to other functions to get more event data (e.g. mouse_event_position())
How are the wxWidgets constants exposed to wxEuphoria?
Static constants are just declared outright in wxeud.e, starting around line 2763 through line 4450. These are copied directly from wxWidgets include files.
The wxEVT_ values are a bit different. They are stored in a top-level int[] array in wxeu.cpp around line 290. Starting around line 2260 in wxeud.e, a function called next_event() peeks these values from memory. The corresponding wxEVT_ lines between wxeu.cpp and wxeud.e must be in the correct order for obvious reasons. I believe Matt had to do this differently because the wxEVT_ values are dynamically generated by macros.
How are pointers to wxWidgets objects passed?
The function box_int() in wxeu.h (and its macro BOX_INT()) returns a Euphoria integer where applicable or an atom (via NewDouble()). This BOX_INT() macro is quite ubiquitous in wxEuphoria to ensure values are passed correctly back to Euphoria. Conversely, when Euphoria objects are passed into wxEuphoria, the object pointers come in as intptr_t and are then cast directly to the appropriate class pointer (which it seems you've already discovered). The wxDeRef() macro decrements the ref count on atoms and sequences to keep Euphoria happy.
-Greg
36. Re: Issues installing Euphoria
- Posted by dcuny Dec 02, 2014
- 1888 views
Hi, Greg.
Thanks for the information! I'll see if I can get my SWIG to be reasonably useful.
In theory, it should be able to generate all the code you need (instead of only the C++ wrappers), but one thing at a time.
I don't actually have a working C compiler on my computer, because I'm in the process of moving from my old Vista box to a Windows 7 machine. So I'm not going to be able to test this, except by comparing the output to the existing wxEuphoria wrappers. But I think it'll be pretty close to what it need to be.
My hope is to be able to get this working well enough - and documented well enough - that it could be handed off to someone else (hint, hint) to maintain. But there's a ways to go with this first.
- David
37. Re: Issues installing Euphoria
- Posted by petelomax Dec 03, 2014
- 1929 views
So I went to http://edita.is-great.org to grab a copy, unzipped it and clicked edita.euw, and got the error:
error creating edita.edb
and at the console:
attempt to divide by 0
... called from C:\Users\dmdq\Desktop\eins035\src\eaedb.e:1286
--> See ex.err
Press Enter...
Ah, that one. I saw this several years ago, and to reproduce it renamed my login from Pete to PeteX, then changed it back, which is when the fun starts. What happens is that when it runs
"C:\\Users\\Pete\\Desktop\\eins035\\edita.exw" it tries to create
"C:\\Users\\PeteX\\Desktop\\eins035\\edita.edb".
I checked the registry and found no rogue instances of "PeteX" (if you discount ItemTypeText/ClearTypeText/CodeSnippetExtension) and besides, if it is a bug in Windows Authorisation/Identification/ActiveDirectory then any simple fix would no doubt be a glaring security hole. Mind you, in the exact same situation the current/internal/non-released version copes fine, no idea why. All I can really say is that version of Edita (0.3.5) will not run if installed on the Destktop or in fact anywhere in C:\Users. Sorry.
Remember, my goal here isn't really to complain about what's been built - I'm thrilled that people have kept working on Euphoria.
Of course. We need bug reports and complaints if we are ever to make anything better. My current project ought to improve these sort of installation issues quite a bit, but it ain't there yet and no doubt there will be plenty of things I will manage to completely miss, or even make worse!
Pete
38. Re: Issues installing Euphoria
- Posted by andi49 Dec 03, 2014
- 1865 views
Every now and then, I get the urge to try out Euphoria again. And then I try installing it, and my experience is terrible.
(...)
And then I notice that it's also trying to compile to C code, which means I need to have a C compiler installed and set up for this to work! I make the change from euc to bind. Ooops, make that eubind.
Hurrah... It works... Sort of. But there's still something misconfigured, because the error isn't showing up in Geany.
It's taken me over 4 hours to get to this point, and I haven't even got an editor working right yet.
Anyway, this isn't meant to complain about Euphoria as a language or denigrate the hard work done by the developers, but to give some idea what the user experience of trying to install and use Euphoria is like. I think any "Euphoria is dying" discussion that doesn't take the pain of installation into account is missing the boat.
- David
tinEWG offers a one-click setup since years (2012 i think). Okay, only for windows and it is real ugly.
But works out of the box if you install it to 'c:\'
I haven't updated it becouse there was no feedback. But the version online still does the job even on win8.1
A simple Editor (ctrl-s for Syntax) and showing a list of your procedures/functions.
And a very primitive Ide for placing controls and editing the program and binding it.
http://euphoria.indonesianet.de/
Andreas