123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|374|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> JSE -> Possible New Editor Test

Thu, 14 Aug 2025, 11:57
Jayenkai

Possible New Editor Test




I've spent the past few days trying to get this to work.
It's at a "kinda" stable condition, now.

Mostly written by ChatGPT with Google Gemini chipping in, between the three of us we finally managed to get this "kinda" working, but I'd love for you to try it out and let me know if it does in fact work for you!

Honestly, I had to redo from start multiple times.
I eventually decided to plan out most of the methodology myself, before giving that to ChatGPT, and have it follow my steps, because 95% of the time, the chatbots would "know how to do this, it's fine, everything is ok!" and then blammo, it knackers itself 10 minutes later..
So, no, I had to explain it from the start, guiding it from "let's start with a simple text area and a div, and then we'll scan each line, and then we'll make the text area transparent, and then we'll set the fonts the same and layer them over the top, and then we'll jump the scroll..", etc, etc. Bit by bit.

This was realistically the only way to get it to work, otherwise "it knew what to do" and spiralled out of control!
Ho-hum!!

Known Issues

Things like Tab and other such shortcuts that I've coded into JSE aren't yet enabled. Those will come once I wrap it all into JSE proper.
Strings are done via regex checks so currently " and ' will open and close identically. (eg, .. "It's .. will both open and close a string)

What to try

Copy+pasting to and from.
Editing.
Typing.
Generally navigating around the thing.
Does it work, is it smooth, is it fast, is it stable.

Essentially, a simple "This is nice, add it to JSE"
or...
Much More Importantly...
"This doesn't work for me, please don't do this."

You can test it here.
Please do, on as many devices as you can!

-=-=-
''Load, Next List!''
Thu, 14 Aug 2025, 20:35
Dan
I did a quick testing and found out that there are few annoyances.

Look at the top line in this video:


Play Video


This happens not every time, but often when you type something at the top line and press enter/return the line scrolls up and disappears, instead of staying in place.

Then there is more:
After i have recorded the video, i discovered that there is a slow down when typing text. (At least on my Laptop with win 10 and SrWare iron as browser)
ok looks like this one may be when you have a bit more lines written ... i have tried to reproduce it, looks like it needs to be >5000 lines to become noticeable.

The line numbers above 10000 are not shown properly. The edit field cuts them out.


The editor looks nice, so far. I guess the theme changer will not stay at that place, because sometime it is preventing the grabbing of the slider.
Fri, 15 Aug 2025, 02:17
Jayenkai
The line numbers will be smaller once I'm finished, that's a "style" issue, alongside the theme select. I'll tuck the theme select somewhere tidier, and the line numbers...
.. Do you guys use line numbers?
I think the only time I actually use them is when debugging in Javascript, and Javascript says "error at line xyz".. ... JSE's not exactly any good at throwing out errors!!
Having said that, having a little clickable area outside of the code means that I can use that space for doing folds and such, which was something I wanted to do to help alleviate the "All the code in a giant scrolling mass" issue.

The "Return isn't exact" thing is .. yeah, that's a bit weird, isn't it.
It also flickers and does odd things if you hit return at the start/inside a line of code. Like, for a fraction of a second it'll double up..
I think that might be down to how it's "double buffering" the displayed code.
I'll have to see if I can fix that, it's very ...
...
I think PlayMyCode had the very same issue back in the day. Yet again, I'm learning exactly why DD had these particular quirks!!

As for the slowdown, I believe that's the "FullRefresh" doing its job in the background.
The fullRefresh does exactly what it says on the tin, so that's over 5000 lines of code having to be highlighted, all in one great big go.

There's a simpler way to do that, which is only refreshing around the code in the display, instead of the whole code.. (See Blitz3D's IDE!! I'm learning all sorts, today!)

What I'd need to do for that, is to work out which lines are within the div's visible area.. Not 100% sure I can do that.
It'll probably need some caching of "line vs text character", and those cached points will still need a FullRefresh every so often, (and when copy+pasting, etc) but if I can trim down the amount of times it does that, we should be much faster.

Right, I'll pop all that into mind, and see what I can come up with during the day.
Let me know if there's any other issues. At all. No matter how "petty" they may seem!!

-=-=-
''Load, Next List!''
Fri, 15 Aug 2025, 02:33
cyangames
Mmm, imagine an inline help like back in qbasic

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Fri, 15 Aug 2025, 02:51
Jayenkai
You mean like a little popup or status bar thing, instead of it opening up the entire command list?
...
Hmm, JSE doesn't have a status bar..

-=-=-
''Load, Next List!''
Fri, 15 Aug 2025, 04:46
cyangames
Will sketch something up when i return home tonight It is of course, just an idea.

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Fri, 15 Aug 2025, 04:55
Jayenkai
I think I'll be doing the rest of this without the AI. I tried adding little requests this morning, but it's wrapped itself up in chaos, and even on my MacBook it was running at about 3fps!!!!
So..
Yeah, off we go, Jay.
Get your coding hat on!

-=-=-
''Load, Next List!''
Fri, 15 Aug 2025, 05:00
cyangames
Best of luck ❤️
Fri, 15 Aug 2025, 06:03
Dan
I can go without line numbers, as they aren't really needed. Just sometime, out of curiosity, i may look at the line numbers just to see how big the project is.
Fri, 15 Aug 2025, 09:56
Jayenkai
Might have to do a lot of rethinking, here. As I watch the battery deplete and wonder if it's "just the heat" or "just the chaos of the syntax highlighter"!!!

-=-=-
''Load, Next List!''
Fri, 15 Aug 2025, 12:41
Jayenkai
Today has been a lot of Ctrl+Z!