peberlein / wee Goto Github PK
View Code? Open in Web Editor NEWA small editor for Euphoria programming
License: MIT License
A small editor for Euphoria programming
License: MIT License
Since the updater supports https now, the manifest should be taken directly from github. The end of life announcement was posted on rawgit.com on Oct 8.
Hi,
Sorry to bother you again.
Since I've started learning Euphoria, +/- 2 weeks ago, the error message "sequence found inside character string" has appeared many times when I use puts or printf to output results.
As I'm new to the language I assumed I was probably making some beginner's mistake.
Then, I came across a pretty simple example that I tried both with ed (edx, to be more precise, which I've been using as a shell substitute) and I finally understood why I got so many error messages.
The script is as follows:
`sequence sent
sent = "In the sun."
printf(1, "%s\n", {sent})
--replace "I" with an "O"
sent[1] = "O"
--replace "sun." with "road."
sent = sent[1..7] & "road."
printf(1, "%s\n", {sent})`
When I ran it with with WEE I got the error message, when I ran it with ed everything worked fine.
So I comment the line "printf..." and added a line print(1, sent) on both editors.
What I get running with WEE is: {{79}, 110, 32, 116, 104, 101, 32, 114, 11, 97, 100, 46}
What I get running with ed is: {79, 110, 32, 116, 104, 101, 32, 114, 11, 97, 100, 46}
Also, if I I flatten sent on WEE script, the output is correct with no error mesages.
Shouldn't both editors output the same?
Thank you.
Windows platform. Reported via email by Phil D.
After entering some buggy code and running (which crashed - not a problem with your code)
the error handling went into a death spiral
C:\Euphoria\WEE-master\ui_win.e:423 in function ViewErrorProc()
argument out of range.
^^^ call-back from Windows
... called from C:\Euphoria\WEE-master\window.ew:1939 in function DialogBoxIndirectParam()
... called from C:\Euphoria\WEE-master\ui_win.e:476 in procedure ui_view_error()
... called from C:\Euphoria\WEE-master\wee.exw:1996 in procedure check_ex_err()
... called from C:\Euphoria\WEE-master\ui_win.e:1267 in function WndProc()
^^^ call-back from Windows
... called from C:\Euphoria\WEE-master\ui_win.e:1447 in function WndProc()
^^^ call-back from Windows
... called from C:\Euphoria\WEE-master\ui_win.e:1849 in procedure ui_main()
... called from C:\Euphoria\WEE-master\ui_win.e:1866
--> See ex.err
Press Enter...
Then after restarting wee kept crashing on startup as follows while attempting to show error.
C:\Euphoria\WEE-master\ui_win.e:1798 in procedure ui_main()
argument out of range.
... called from C:\Euphoria\WEE-master\ui_win.e:1866
--> See ex.err
C:>eui
Euphoria Interpreter v4.1.0 development
64-bit Windows, Using System Memory
Revision Date: 2015-02-02 14:18:53, Id: 6300:57179171dbed
ERROR: Must specify the file to be interpreted on the command line
C:>eui updater.ex
=== WEE Source Code Updater ===
This will overwrite any local changes to the source files.
Press a key to continue, or 'q' to quit.
-2
Failed to download manifest.json
Press any key to exit, then try updating again.
The manifest http://rawgit.com/peberlein/WEE/master/manifest.json
downloads fine in browser.
Windows platform. Reported by Phil D. via email:
The 2 problems (probably related) when using dual monitor with secondary monitor located above the primary monitor (may also apply when secondary monitor used to left of main monitor - not tested)
When closing wee if app is visible on upper second monitor (or partial straddling both monitors)
an unhandled vertical 'y position' restore value is saved.
Upon subsequently opening wee, the gui is off screen:
(have to use Alt-Space arrow down then wiggle the mouse to get it back)
I assume the 'y' value is unexpected by the program....looks like the maths used by windows bit-rolls-over binary 4-byte value, to make a 4-byte 2's complement negative number.
This is also evidenced in the crash (see picture and read following)
-- 1. Open or move GUI to second monitor (located above primary)
-- 2. Right-click on a tab in the wee UI
-- I partially fixed the crash by making y an atom in following:
-- ui_win.e dated Jan 7, 2016
-- crash happens at line 233 - a number returned was nearly 4gig
227: procedure rightclick_tab()
228: atom point
229: integer tab, x, y
230: point = allocate(12)
231: c_func(GetCursorPos, {point})
232: x = peek4u(point)
233: y = peek4u(point+4)
Value returned by GetCursorPos is too large:
4294966334
I guess this is why restoring the screen y-pos (when top of wee window is above top of primary monitor) also fails for similar reason probably
Could it also apply where secondary monitor is to LEFT of main monitor (i.e. affect x values) - would be neatly fixed if you could do both?
I have downloaded updater.ex and executed it as per your instructions and now have a set of wee related files. When I type in 'eui wee' as per your instructions it pops up a dialog box containing the message:
Houston, Wee've had a problem.
The editor crashed and is closing now.
I then get an pile of error messages to the console which are as follows:
.../EuGTK/GtkEngine.e:226 in function create()
subscript value 1 is out of bounds, reading from a sequence of length 0 - in subscript #1 of 'p1'
... called from .../ui_gtk.e:1225 in procedure ui_refresh_file_menu()
... called from .../ui_gtk.e:1498
--> See ex.err
However, if I compile the wee.exw file with euc and run the resulting wee executable then it compiles and then starts up OK.
I am running Debian Linux (testing/buster) on a 64 bit machine. My version of eui and euc are as per the following:
Euphoria to C Translator v4.1.0 development
64-bit Linux, Using System Memory
Revision Date: 2015-02-02 14:18:53, Id: 5861:57179171dbed
Euphoria Interpreter v4.1.0 development
64-bit Linux, Using System Memory
Revision Date: 2015-02-02 14:18:53, Id: 5861:57179171dbed
Am I doing something wrong ? Any assistance in this matter would be much appreciated.
type in foobar and then CNTRL+SPACE and you get a crash
Opinions: Really the editor ought to disallow you to edit the buffer of such a file and only allow Save As until saved to a file that can be modified.
add "find in files" functionality
I'm new to Euphoria, so I may be making some stupid mistake...
I open wee using "eui wee".
I write and save a simple loop:
for i = 1 to 10 do
? i
end for
But when I run the loop, a console flashes (appears and disappears instantaneously) and I cannot see the result.
On the other hand, I write the same loop on edx.ex oppened inside a console, esc to menu, press eui (run), the console comes over the editor and shows the result (i.e., prints a column of number 1 to 10). I hit esc and get back to the editor.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.