You are browsing as a guest. Sign up (or log in) to start making projects!

My own Programming Editor

  • 6 Devlogs
  • 6 Total hours

You can write in BASIC language a simple code

Open comments for this post

1h 16m 23s logged

PolishingSeason

ran out of new features so I did what every developer does at this point —
stared at the editor until things started bothering me 🤣.

I refined the design and made it more colorful. then I noticed that scrolling
was never truly implemented. scroll_offset existed, was passed around, just
never actually updated anywhere 💀

int scroll_offset = 0; // was never changed. ever.

scrolling should work now. I sure hope so.

then I took a look at the menu and decided to rewrite it completely because I
didn’t like how you interacted with it. the new version has proper feedback
when saving or changing the filename and a quick confirmation if you really
want to quit or stay.

feel free to test it in the new pre-release:
github.com/MrLuki2727/OwnLanguage/releases/tag/v1.1

PolishingSeason

ran out of new features so I did what every developer does at this point —
stared at the editor until things started bothering me 🤣.

I refined the design and made it more colorful. then I noticed that scrolling
was never truly implemented. scroll_offset existed, was passed around, just
never actually updated anywhere 💀

int scroll_offset = 0; // was never changed. ever.

scrolling should work now. I sure hope so.

then I took a look at the menu and decided to rewrite it completely because I
didn’t like how you interacted with it. the new version has proper feedback
when saving or changing the filename and a quick confirmation if you really
want to quit or stay.

feel free to test it in the new pre-release:
github.com/MrLuki2727/OwnLanguage/releases/tag/v1.1

Replying to @_MrLuki

1
22
Open comments for this post

56m 52s logged

v1.0 shipped + a bunch of fixes


smarter file saving

Previously the editor always opened Code.lu - hardcoded, no way around it.
Now the last opened filename gets written to config.txt on save and read back
on startup. fgets pulls the name, strcspn strips the newline. (Revolutionary tech there 🔥🔥🔥)


cursor position after run / menu

After running a program or opening the menu the cursor was landing somewhere
random on screen. The fix: save x and y with getxy() before switching modes,
restore with gotoxy() after returning to the editor, then force a full redraw.
The cursor now comes back exactly where you left it. I thought this was implemented vom the start but it turns out it was not right 💀.


README

Added a proper README with a platform support table (Windows only) , step by step build instructions for CLion.
embedded screenshot, full language reference with examples, and a roadmap.


v1.0 release

First public release. Single OwnLanguage.exe, no installer, no
dependencies. The entire thing - editor, interpreter, syntax highlighting -
is all contained in one .exe

Tested on Windows 11. If it breaks on your machine that is between
you and Windows.

v1.0 shipped + a bunch of fixes


smarter file saving

Previously the editor always opened Code.lu - hardcoded, no way around it.
Now the last opened filename gets written to config.txt on save and read back
on startup. fgets pulls the name, strcspn strips the newline. (Revolutionary tech there 🔥🔥🔥)


cursor position after run / menu

After running a program or opening the menu the cursor was landing somewhere
random on screen. The fix: save x and y with getxy() before switching modes,
restore with gotoxy() after returning to the editor, then force a full redraw.
The cursor now comes back exactly where you left it. I thought this was implemented vom the start but it turns out it was not right 💀.


README

Added a proper README with a platform support table (Windows only) , step by step build instructions for CLion.
embedded screenshot, full language reference with examples, and a roadmap.


v1.0 release

First public release. Single OwnLanguage.exe, no installer, no
dependencies. The entire thing - editor, interpreter, syntax highlighting -
is all contained in one .exe

Tested on Windows 11. If it breaks on your machine that is between
you and Windows.

Replying to @_MrLuki

1
27
Open comments for this post

48m 17s logged

Syntax highlighting is here! Honestly thought this would take way longer than it did.

The approach is simple: walk through the string character by character, check
what type the next token is (keyword, variable, number, operator, bracket) and
set the color before printing. The actual characters are printed 1:1 — no
modification, no magic. 17 spaces in? 17 spaces out.

Color changes are handled by a prebuilt textColor(COLOUR) function that just
sets the console color before the next print. Clean and simple.

Known bugs I definitely know about and totally plan to fix (eventually):

– Can’t write mid-line because of a \0 at the start of the string 💀

– Pressing delete at the end of a line removes the entire line (is this a bug or a feature? I’m choosing to call it a feature for now)

Next up: fixing the actual bugs. Probably.

Syntax highlighting is here! Honestly thought this would take way longer than it did.

The approach is simple: walk through the string character by character, check
what type the next token is (keyword, variable, number, operator, bracket) and
set the color before printing. The actual characters are printed 1:1 — no
modification, no magic. 17 spaces in? 17 spaces out.

Color changes are handled by a prebuilt textColor(COLOUR) function that just
sets the console color before the next print. Clean and simple.

Known bugs I definitely know about and totally plan to fix (eventually):

– Can’t write mid-line because of a \0 at the start of the string 💀

– Pressing delete at the end of a line removes the entire line (is this a bug or a feature? I’m choosing to call it a feature for now)

Next up: fixing the actual bugs. Probably.

Replying to @_MrLuki

1
24
Open comments for this post

1h 0m 51s logged

Added ELSE and WHILE — the language is getting dangerous 💀🤣

ELSE was actually pretty simple: after an IF, just peek at the next line,
see if it says “ELSE”, skip the keyword and execute whatever comes after.
Done. Took longer to think about than to code.

WHILE was a different story. The trick: WHILE is basically just IF + GOTO
combined. If the condition is true, keep going. If false, hunt forward
through the program array for the matching ENDWHILE (counting nested WHILEs
so you don’t bail out too early). ENDWHILE does the reverse — searches
backwards for its WHILE and jumps back. No stack, no AST, just vibes and
array indexing.

Next up: syntax highlighting. The editor deserves to look as good as the
language runs.

Added ELSE and WHILE — the language is getting dangerous 💀🤣

ELSE was actually pretty simple: after an IF, just peek at the next line,
see if it says “ELSE”, skip the keyword and execute whatever comes after.
Done. Took longer to think about than to code.

WHILE was a different story. The trick: WHILE is basically just IF + GOTO
combined. If the condition is true, keep going. If false, hunt forward
through the program array for the matching ENDWHILE (counting nested WHILEs
so you don’t bail out too early). ENDWHILE does the reverse — searches
backwards for its WHILE and jumps back. No stack, no AST, just vibes and
array indexing.

Next up: syntax highlighting. The editor deserves to look as good as the
language runs.

Replying to @_MrLuki

1
25
Open comments for this post

1h 25m 13s logged

I completely rebuilt the drawing system for the editor, making it efficient enough for my next goal: syntax highlighting. Now only the line where code was changed gets refreshed, instead of redrawing the entire screen every keystroke. The whole refreshing should be working right know haven’t noticed any bugs. (yet 🤣)

I completely rebuilt the drawing system for the editor, making it efficient enough for my next goal: syntax highlighting. Now only the line where code was changed gets refreshed, instead of redrawing the entire screen every keystroke. The whole refreshing should be working right know haven’t noticed any bugs. (yet 🤣)

Replying to @_MrLuki

1
14
Open comments for this post

33m 53s logged

I started working on the editor yesterday. I was so focused on the code that I didn’t notice the whole logging system wasn’t working because I forgot to include the plugin. I just noticed and fixed the problem. Right now, I am mostly working on syntax highlighting (I don’t really know how to do that yet 💀), but in the last 30 minutes, I finished a basic menu to save, quit, and edit the filename.

The editor isn’t really based on the BASIC language. Instead, it’s a mix of commands from different languages that I found cool, which allowed me to create my own custom language mix. I have already finished a basic visual style for the editor (unfortunately, it still has some bugs 😂) as well as a simple syntax checker that somehow works. I also wrote a simple program with a print output, and everything seems to work perfectly.”

I started working on the editor yesterday. I was so focused on the code that I didn’t notice the whole logging system wasn’t working because I forgot to include the plugin. I just noticed and fixed the problem. Right now, I am mostly working on syntax highlighting (I don’t really know how to do that yet 💀), but in the last 30 minutes, I finished a basic menu to save, quit, and edit the filename.

The editor isn’t really based on the BASIC language. Instead, it’s a mix of commands from different languages that I found cool, which allowed me to create my own custom language mix. I have already finished a basic visual style for the editor (unfortunately, it still has some bugs 😂) as well as a simple syntax checker that somehow works. I also wrote a simple program with a print output, and everything seems to work perfectly.”

Replying to @_MrLuki

1
11

Followers

Loading…