1. Wee editor 0.36

Here's what's new in WEE:

  • Middle mouse button click to close tabs
  • Mouse wheel to change tabs
  • Ctrl+Tab or Shift+Ctrl+Tab to change tabs
  • Select terminal emulator (GTK version)
  • Select interpreter dialog
  • Indentation is auto-detected, per-tab
  • Indent options dialog
  • Window icon while interpreted
new topic     » topic index » view message » categorize

2. Re: Wee editor 0.36

Tried compiling wee (Mint17.1 64bit)

When I run the app I get

Fatal run-time error: 
routine 'Hide' is not visible 
 
 
Fatal run-time error: 
A machine-level exception occurred during execution of your program (signal -14 

When bound (using Wee itself) the app works nicely.

When interpreted Wee is looking very good.

Now for a wild idea. Can Wee run as a GTK application on Windows? The idea would be to place the gtk files in c:\gtk, and then use the GTK interface.

I got gtk working (after patching the engine) on windows using the www.tarnyko.net/dl/gtk.htm bundle for windows.

_tom

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

3. Re: Wee editor 0.36

Looks like the crash is a bug in the translator with routine_id when used as a default argument. I shamelessly lifted Greg's nifty callback function from that other thread:

function callback(sequence name, atom rid = routine_id(name)) 
    if rid = -1 then 
        crash("routine '"&name&"' is not visible") 
    end if 
    return call_back(rid) 
end function 

The crash goes away if you change this line in ui_gtk.e:

connect(helpwin, "delete-event", callback("Hide")) 

to:

connect(helpwin, "delete-event", call_back(routine_id("Hide"))) 

I'll let the experts figure it out.

On the wild idea of supporting GTK on Windows, I could probably add it, but what is the reason for it? I personally prefer native controls.

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

4. Re: Wee editor 0.36

Strange. That trick has been working quite well for me with IUP.

What happens if you change your callback function to look like this?

function callback(sequence name, atom rid = routine_id(name), atom cb = call_back(rid)) 
    if rid = -1 or cb = 0 then 
        crash("routine '"&name&"' is not visible") 
    end if 
    return cb 
end function 

-Greg

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

5. Re: Wee editor 0.36

_tom said...

Fatal run-time error: 
A machine-level exception occurred during execution of your program (signal -14 

There's that random signal value and lack of a right parenthesis problem again. That's really strange. getlost

-Greg

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

6. Re: Wee editor 0.36

_tom said...

Tried compiling wee (Mint17.1 64bit)

I compile it with no error on Mint 17.2 64-bit with my outdated All-in-One 4.1 version.

Same on Windows 10 64-bit still with my outdated All-in-One 32-bit version (memstruct-based).

Jean-Marc

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

7. Re: Wee editor 0.36

You can download the improved international AIO installer (works with Computers that are not in the french locale).

http://www.rapideuphoria.com/install_aio2.tgz

Installs February 2, version of Euphoria 4.1.

SD Pringle

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

8. Re: Wee editor 0.36

Tom,

are you using binaries you downloaded via http://openeuphoria.org/eubins or binaries you compiled yourself?

Shawn

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

9. Re: Wee editor 0.36

SDPringle said...

Tom,

are you using binaries you downloaded via http://openeuphoria.org/eubins or binaries you compiled yourself?

Shawn

I have four partitions each with some form of Linux Mint on them.


On a 64 bit partition (the one I first couldn't compile on) I tried to compile oE from today's copy from the SCM. This fails.


Next partition

The current 32 bit install has a oE4.1.0 (2015-02-02) which could be a 4.1beta downloaded using a link from "downloads."

On a 32 bit partition, same SCM copy, I compiled oE to version 4.0.6. Success.

This version fails to compile hello_world.ex program.

Build directory: build-276293/ 
Translating code, pass: 1 2 3  generating 
Compiling with GCC 
Compiling  14% init-.c 
init-.c:1:30: fatal error: include/euphoria.h: No such file or directory 
 #include "include/euphoria.h" 
                              ^ 
compilation terminated. 
Couldn't compile file 'init-.c' 
Status: 1 Command: gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/usr/local/euphoria-4.1.0 -ffast-math init-.c 

Could this could be from Duro's AIO install from a previous experiment?

After moving binaries around I can run the oE4.0.6 interpreter, but I can also create this message:

 $ euc --help 
option '-arch': Unrecognised 
Try '--help' for more information. 

I must conclude that this is all my fault. Ignore me until I wipe my harddrive clean.

_tom

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

10. Re: Wee editor 0.36

PeteE said...

On the wild idea of supporting GTK on Windows, I could probably add it, but what is the reason for it? I personally prefer native controls.

Just curious. Just wondering if changing a simple ifdef lets Wee become a GTK app on Windows.

A small suggestion for Wee. In the menus change "translate" to "compile." The semantics is, while you invoke a translator, the effect you get is a compilation. A novice will understand "compile" while translating is more abstract. Notice name euc (not eut).

Enjoying every improvement in Wee,

_tom

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

11. Re: Wee editor 0.36

_tom said...
PeteE said...

On the wild idea of supporting GTK on Windows, I could probably add it, but what is the reason for it? I personally prefer native controls.

Just curious. Just wondering if changing a simple ifdef lets Wee become a GTK app on Windows.

Not quite. I'd also need to figure out how and build scintillaGTK32.dll and scintillaGTK64.dll, then upload those to the repo. The updater and Wee both use the platform ifdef defines to determine which dlls to download and use, and would need a new define for GTK_WIN and always pass it to eui and euc, etc.

_tom said...

A small suggestion for Wee. In the menus change "translate" to "compile." The semantics is, while you invoke a translator, the effect you get is a compilation. A novice will understand "compile" while translating is more abstract. Notice name euc (not eut).

I'm not so sure. The documentation refers to it as the Euphoria to C Translator or just Translator and doesn't put emphasis on the compilation step after the translation to C has happened. Perhaps euc is a just a shortened Euphoria to C.

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

12. Re: Wee editor 0.36

_tom said...

Tried compiling wee (Mint17.1 64bit)

When I run the app I get

Fatal run-time error: 
routine 'Hide' is not visible 
 
 
Fatal run-time error: 
A machine-level exception occurred during execution of your program (signal -14 

I discovered this is due to using forward-referencing routine_id as a default argument. Ticket created.

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

13. Re: Wee editor 0.36

PeteE said...

I'm not so sure. The documentation refers to it as the Euphoria to C Translator or just Translator and doesn't put emphasis on the compilation step after the translation to C has happened. Perhaps euc is a just a shortened Euphoria to C.

Don't believe the documentation. At least until I have changed it. (The world need more humor.)

The "Eu to C" is a worthy observation.

In RDS3.1 it is definitely called "Euphoria to C translator" or "Translator." It was also named ecu. It only produced a C file which you then had to compile.

In oE4 it is euc and still "Euphoria to C Translator." But, the default result is a compiled app and not a translated C file unless you use the -keep flag.

I like the flow of eui (euphoria interpreter) so it goes with euc (euphoria compiler) as a matching set. Much easier to understand what is going on. Much simpler to remember.

I have also seen references that if a "translator" does enough processing it can be elevated to "compiler."

Now, in a Wee editor (if targeting simple minded programmers like me) Translate is not doing a "translate" job--it Compiles (no option there to even produce a translated product).

I can spin the documentation either way. But, "compiler" make the most sense to me at the moment.

_tom

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

14. Re: Wee editor 0.36

Fair enough. I'll change it to Translate and Compile for the next release.

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

15. Re: Wee editor 0.36

Wee 0.36 is absolutely fantastic!

I did find that xfce4-terminal uses -x as the execute command, just like gnome-terminal. So I edited line 796 in ui_gtk.e to:

if equal(text, "gnome-terminal") or equal(text, "xfce4-terminal") then 

Also, I noticed in this version that it is very simple to add/edit hotkeys. For example...

 createmenuitem("Translate", "RunStart") 
-- to: 
 createmenuitem("Translate", "RunStart", "F9") 
-- thats all there is to it!  WOW! 

Also, I like Wee 0.36's ability to automatically determine if the program needs to run in a terminal emulator. No need to select "run in terminal" or start the editor in a terminal, if you are editing a "console" program.

I'll say this again. WEE is the best thing that has happened to the euphoria programming language in many, many moons!

Your work is deeply appreciated!

Ken Rhodes

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

16. Re: Wee editor 0.36

Crashes on mint 17 and ubuntu when set interpreter is selected, because get_interpreters func returns an empty sequence.

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

17. Re: Wee editor 0.36

Also, run in terminal fails with mate-terminal since cmd needs quotes: mate-terminal -e "eui /home/irv/test0.ex"

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

18. Re: Wee editor 0.36

irv said...

Crashes on mint 17 and ubuntu when set interpreter is selected, because get_interpreters func returns an empty sequence.

For what it is worth there is No crash on my Ubuntu 15.10 system when set_interpreter is selected.

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

19. Re: Wee editor 0.36

irv said...

Also, run in terminal fails with mate-terminal since cmd needs quotes: mate-terminal -e "eui /home/irv/test0.ex"

Several console programs will not function correctly if the terminal emulator does not have the capability to hold the terminal open when command exits, like the gnome-terminal. Even the gnome-terminal won't run the demo program "where.ex" correctly.

Perhaps the Set Terminal Emulator routine should have an argument field for each terminal which the user can edit and which can be saved to Wee.conf file.

Also, I think having a menu option to run a preferred terminal emulator is nice to have:

-- file: ui_gtk.e 
 
-- in routine add(runmenu, { 
--after: 
createmenuitem("Set Terminal Emulator...", "RunSetTerminal"), 
-- insert: 
createmenuitem("Run Terminal Emulator", "RunStart"), 
-- 
-- in function RunStart(atom ctl) 
-- after: 
elsif equal(lbl, "Translate") then 
	system(cmd & get_eu_bin("euc") & ' ' & quote_spaces(file_name)) 
-- insert: 
-- compress the translated executable,  
-- if upx is found in PATH 
	if absolute_path(locate_file("upx")) then 
	    cmd = filebase(file_name) 
	    system("upx " & cmd) 
	end if 
 
elsif equal(lbl, "Run Terminal Emulator") then 
	    cmd = terminal_program[1..length(terminal_program)-2] 
        system(cmd) 

Oh, on my system while Translating/Compiling the process is reported in a terminal emulator window and the editor screen turns to a dark shade and cannot be used until compilation is complete. I actually prefer being able to monitor the process. But I suppose some folks would prefer to have translation/compilation done in the background which would allow them to move on to other tasks.

Regards, Ken Rhodes

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

20. Re: Wee editor 0.36

Irv, thanks for the bug reports. Fixed.

Hi Ken, thanks for the feedback. I've added some things to the run menu: a Run In Background option that keeps the editor from going gray while running things. Also the Test Run after Bind/Shroud/Translate option you wanted a while back is there now too. Also Run Terminal Emulator, since, hey, why not. The set terminal dialog is a combo box entry so you can edit the terminal command as well as choose from a list. Try "xterm -hold -e" to keep the window open until you close it manually.

Edit: Decided to add an option Wait for Keypress after Run in Terminal.

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

21. Re: Wee editor 0.36

PeteE said...

Irv, thanks for the bug reports. Fixed.

Hi Ken, thanks for the feedback. I've added some things to the run menu: a Run In Background option that keeps the editor from going gray while running things. Also the Test Run after Bind/Shroud/Translate option you wanted a while back is there now too. Also Run Terminal Emulator, since, hey, why not. The set terminal dialog is a combo box entry so you can edit the terminal command as well as choose from a list. Try "xterm -hold -e" to keep the window open until you close it manually.

Edit: Decided to add an option Wait for Keypress after Run in Terminal.

Golly Gee! Christmas has come early this year!

Thanks again for all the nifty features.

Oh, I noticed that the tutorial has a typo error:

--   Go to start of document         Control Home 
--   Go to end of document           Control End 
--   Go to start of line             Control Home > Home 
--   Go to end of line               Control End  > End 

Ken

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

Search



Quick Links

User menu

Not signed in.

Misc Menu