Jump to content




Nevardon Editor [0.5.4]

lua utility computer

  • You cannot reply to this topic
38 replies to this topic

#21 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 06 March 2015 - 09:54 PM

Here's a bug. Open up something read-only and try to save, and it will error. You need to check for this before attempting to save, or save in a pcall.
Also exit's t is missing on a turtle & GUI elements are off centered--HOWEVER, you have made it work with a turtle, so there's that... but it won't work on a pocket computer(GUI elements are missing). I'd also recommend removing the top bar, as it just takes up space.

Also, since you haven't gotten error checking done, if you don't already know, to figure out if it has errors, load it as a string. If there's a second variable passed, it errored, and that's its error. Do NOT call it, just load it.

And: This does not auto-indent. For example if I press TAB then ENTER, it will not have the same indentation as the previous. This makes this unusable.

Edited by Geforce Fan, 06 March 2015 - 10:08 PM.


#22 Quintuple Agent

  • Members
  • 107 posts
  • LocationThis page

Posted 06 March 2015 - 10:12 PM

View PostGeforce Fan, on 06 March 2015 - 09:54 PM, said:

Here's a bug. Open up something read-only and try to save, and it will error. You need to check for this before attempting to save, or save in a pcall.
Also exit's t is missing on a turtle & GUI elements are off centered--HOWEVER, you have made it work with a turtle, so there's that... but it won't work on a pocket computer(GUI elements are missing). I'd also recommend removing the top bar, as it just takes up space.

Also, since you haven't gotten error checking done, if you don't already know, to figure out if it has errors, load it as a string. If there's a second variable passed, it errored, and that's its error. Do NOT call it, just load it.

And: This does not auto-indent. For example if I press TAB then ENTER, it will not have the same indentation as the previous. This makes this unusable.

The top bar was just there as a test until I have tabs added, I will probably just add a setting to toggle the top bar.
Also yah, I complete forgot about rom, thanks.

As for error checking, That is already in the script, Ctrl+E. It just does not update automatically because I was worried about that slowing the script

Edit: I will auto-indenting when I get a chance. (Also I will add when hitting tab on a highlighted section, it will indent all lines in the selection)

Another Edit: All fixed!

Edited by Quintuple Agent, 06 March 2015 - 11:13 PM.


#23 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 10 March 2015 - 12:57 AM

Do you mind if I modify & distribute this in my OS? It wouldn't work well natively, as administrators could not grant this app permission to read&write files that apps do not have sufficient privileges to.
I really love this editor now that there is auto-indentation. The fact that you can highlight things in it is absolutely fantastic.

I've found a a bit of a bug. Wherever you check for fs.isReadOnly, you look for it returning TRUE specifically. If it returns, for say, a string, the program simply crashes. A fix for this is:
if fs.isReadOnly(file) then
  blah()
end
And:
I noticed you're bypassing the window API. For an editor, it's probably not good practice to do this. It can always be optional, though!
Other than that, I love this. Keep up the good work!

Edited by Geforce Fan, 10 March 2015 - 01:45 AM.


#24 Quintuple Agent

  • Members
  • 107 posts
  • LocationThis page

Posted 10 March 2015 - 01:23 AM

View PostGeforce Fan, on 10 March 2015 - 12:57 AM, said:

Do you mind if I modify & distribute this in my OS? It wouldn't work well natively, as administrators could not grant this app permission to read&write files that apps do not have sufficient privileges to.
I really love this editor now that there is auto-indentation. The fact that you can highlight things in it is absolutely fantastic.
You may,
I just ask that you leave my name it :)
Also, keep in mind, I have said that this is not fully done, so I will be adding more features in the future. But if you wish to add it in as is, go ahead.

#25 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 10 March 2015 - 01:46 AM

View PostQuintuple Agent, on 10 March 2015 - 01:23 AM, said:

View PostGeforce Fan, on 10 March 2015 - 12:57 AM, said:

I've found a a bit of a bug. Wherever you check for fs.isReadOnly, you look for it returning TRUE specifically. If it returns, for say, a string, the program simply crashes. A fix for this is:
if fs.isReadOnly(file) then
  blah()
end
edit: that was actually a bug on my end, and I'd assumed you'd done something. I didn't look because the code is 3,000 lines.
Sorry.
And:
I noticed you're bypassing the window API. For an editor, it's probably not good practice to do this. It can always be optional, though!
Other than that, I love this. Keep up the good work!
Shoulda refreshed. This is what I added.
Also: I got included in that little ending Easter egg?!?!?!?
SOMEONE NOTICED ME!?!?!
Posted Image
By the way, I saw something...not-english in the easter eggs. Is your native language not english?
It would explain some of the UIs. For example, which something does not exist, it presents you with "ok" or "create"
ok means that you understand, not that you give something permission. A better thing to say would be "Cancel" which means to stop doing something before its started.
Also: If you run: nevardon file it does nothing. You should check for args, and if there are args, open that file.

Edited by Geforce Fan, 10 March 2015 - 02:57 AM.


#26 GopherAtl

  • Members
  • 888 posts

Posted 10 March 2015 - 02:23 AM

from the tone of your original post, and your chosen name, I didn't think you'd be working so actively on this after you originally posted it, I see I was wrong. You've made some nice improvements! A couple of things I've noticed, though: you don't support delete, home, and end; keyboard jockeys tend to use these quite a lot, so they're sorely missed. Your block comment support still has some odd issues, too; it doesn't seem to recognize --]] as ending a block comment, which it should, as it's a common idiom in lua to temporarily disable code by surrounding it with --[[ and --]], so you can easily re-enable it just by adding a - to the --[[, making it not a block comment anymore.

Anyway, great work so far, keep it up!

#27 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 10 March 2015 - 02:47 AM

View PostGopherAtl, on 10 March 2015 - 02:23 AM, said:

from the tone of your original post, and your chosen name, I didn't think you'd be working so actively on this after you originally posted it, I see I was wrong. You've made some nice improvements! A couple of things I've noticed, though: you don't support delete, home, and end; keyboard jockeys tend to use these quite a lot, so they're sorely missed. Your block comment support still has some odd issues, too; it doesn't seem to recognize --]] as ending a block comment, which it should, as it's a common idiom in lua to temporarily disable code by surrounding it with --[[ and --]], so you can easily re-enable it just by adding a - to the --[[, making it not a block comment anymore.

Anyway, great work so far, keep it up!
He's nevardon improving it!

#28 Quintuple Agent

  • Members
  • 107 posts
  • LocationThis page

Posted 10 March 2015 - 03:29 AM

View PostGeforce Fan, on 10 March 2015 - 01:46 AM, said:

By the way, I saw something...not-english in the easter eggs. Is your native language not english?
It would explain some of the UIs. For example, which something does not exist, it presents you with "ok" or "create"
ok means that you understand, not that you give something permission. A better thing to say would be "Cancel" which means to stop doing something before its started.
Also: If you run: nevardon file it does nothing. You should check for args, and if there are args, open that file.
No, English is my native language, #25 is Latin, I thew "I have no idea how to speak latin" though google translate and #50 is Lorem Ipsum
As for the UI's, They looked fine to me, however I think I did do a complete re-haul on the popup system at the time and I got done around 2AM or something, so that might be it <_<
And I will try to get launch args working.

Also, readonly, I thought it only returned a Boolean, or are you talking about something else? If you are talking about the if statement around it, I have not changed it in a while. It has always created the readonly popup if the file is readonly.

View PostGopherAtl, on 10 March 2015 - 02:23 AM, said:

I've noticed, though: you don't support delete, home, and end; keyboard jockeys tend to use these quite a lot, so they're sorely missed. Your block comment support still has some odd issues, too; it doesn't seem to recognize --]] as ending a block comment, which it should, as it's a common idiom in lua to temporarily disable code by surrounding it with --[[ and --]], so you can easily re-enable it just by adding a - to the --[[, making it not a block comment anymore.
I will add the delete, home, and end asap.
As for the --]] I do that sometimes too, however I usually do ]]--, but I did notice a glitch where --]] would treat it as a comment line so that ]] would not close the comment block.

View PostGeforce Fan, on 10 March 2015 - 02:47 AM, said:

He's nevardon improving it!
I was thinking if I ever did get done with all I wanted to get done on this, Nevardon would mean never done being improved instead of just going to never be done. :P

#29 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 10 March 2015 - 10:06 PM

My tipp:

use
term.redirect(term.native())
in the beging.

Believe it helps.

I use it all the time

#30 GopherAtl

  • Members
  • 888 posts

Posted 10 March 2015 - 10:20 PM

View PostCreator, on 10 March 2015 - 10:06 PM, said:

My tipp:

use
term.redirect(term.native())
in the beging.

Believe it helps.

I use it all the time
if you mean for performance issues, yes, it helps, but you need to be aware in doing so you're breaking compatibility with multishell on advanced computers, and also compatibility with most multitasking OSs.

#31 Quintuple Agent

  • Members
  • 107 posts
  • LocationThis page

Posted 10 March 2015 - 10:53 PM

View PostCreator, on 10 March 2015 - 10:06 PM, said:

My tipp:

use
term.redirect(term.native())
in the beging.

Believe it helps.

I use it all the time


I already had the redirect in the code before, however since some were saying it might be needed if they use it in their os, it would break it, I added a setting to turn that on/off. If you look in the settings you will see bypass window API.

#32 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 10 March 2015 - 10:55 PM

View PostQuintuple Agent, on 10 March 2015 - 10:53 PM, said:

View PostCreator, on 10 March 2015 - 10:06 PM, said:

My tipp:

use
term.redirect(term.native())
in the beging.

Believe it helps.

I use it all the time


I already had the redirect in the code before, however since some were saying it might be needed if they use it in their os, it would break it, I added a setting to turn that on/off. If you look in the settings you will see bypass window API.
Wow, this is like... PROFESSIONAL *O*
:D

#33 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 11 March 2015 - 09:04 PM

View PostGopherAtl, on 10 March 2015 - 10:20 PM, said:

View PostCreator, on 10 March 2015 - 10:06 PM, said:

My tipp:

use
term.redirect(term.native())
in the beging.

Believe it helps.

I use it all the time
if you mean for performance issues, yes, it helps, but you need to be aware in doing so you're breaking compatibility with multishell on advanced computers, and also compatibility with most multitasking OSs.
I don't think a lot of multitasking OSes use the Window API. Honestly, the window API is terrible in terms of sand boxing, considering you can evade it, and it's honorably inefficient.
But, since we're stuck with it, we shouldn't be circumventing it without adding an option to support it.

#34 GopherAtl

  • Members
  • 888 posts

Posted 11 March 2015 - 09:16 PM

View PostGeforce Fan, on 11 March 2015 - 09:04 PM, said:

View PostGopherAtl, on 10 March 2015 - 10:20 PM, said:

if you mean for performance issues, yes, it helps, but you need to be aware in doing so you're breaking compatibility with multishell on advanced computers, and also compatibility with most multitasking OSs.
I don't think a lot of multitasking OSes use the Window API. Honestly, the window API is terrible in terms of sand boxing, considering you can evade it, and it's honorably inefficient.
But, since we're stuck with it, we shouldn't be circumventing it without adding an option to support it.

the point is redirecting to native bypasses any redirection, not just the window api specifically. And any multitasking OS pretty much by definition use redirects for programs, otherwise it can't switch between them without throwing out whatever each one has drawn to the screen, because term has no functions to read what is currently on the screen.

Edited by GopherAtl, 11 March 2015 - 09:16 PM.


#35 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 11 March 2015 - 11:30 PM

Bit of an odd bug, if you type exactly:
osStuff.dirColor
This crashes.

View PostGopherAtl, on 11 March 2015 - 09:16 PM, said:

snip
Well-sandboxed OSes should overwrite term.native to the be the buffer the app is currently using.

Edited by Geforce Fan, 11 March 2015 - 11:31 PM.


#36 GopherAtl

  • Members
  • 888 posts

Posted 11 March 2015 - 11:37 PM

true, because the whole point of sandboxing is not to trust programs you're running to be well-behaved. But a well-behaved programs that's not an operating system should not be redirecting to term.native() in the first place.

#37 Quintuple Agent

  • Members
  • 107 posts
  • LocationThis page

Posted 12 March 2015 - 12:03 AM

View PostGeforce Fan, on 11 March 2015 - 11:30 PM, said:

Bit of an odd bug, if you type exactly:
osStuff.dirColor
This crashes.
Would be nice if you posted the error that followed, however I think I know the problem.
I take it that you have something in _G as osStuff and if that is the case then the next update I put out will fix it.
Edit: Update is out, problem is fixed

Edited by Quintuple Agent, 12 March 2015 - 12:27 AM.


#38 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 12 March 2015 - 02:36 AM

View PostGopherAtl, on 11 March 2015 - 11:37 PM, said:

true, because the whole point of sandboxing is not to trust programs you're running to be well-behaved. But a well-behaved programs that's not an operating system should not be redirecting to term.native() in the first place.
Some games will run so slow that you can practically watch the pixels update, but circumvent the window API, and they run butter smooth.
A program editor, however, I think will be fine even with the laggy Window API.
---
You should add an auto-updater, or an updater arg. Probably do something like edit, and if they pass "--update" then update it. Otherwise, do everything normally.
Congrats(shame) on becoming a Necromancer! Good for you!
:P
Another bug report:
Steps to recreate:
mkdir a
cd a
../nevardon t
What I would expect to happen: Nevardon would edit the file "t" in the directory "a" ("a/t")

What happened:
Nevardon edits the file "t" in the root directory("/t")

Tip for fixing:
"shell.dir()" will get the current directory you're in. Combine this with the arguement for the file to open, and it'd become "a/t"


---


Another bug report:
I'm unable to delete a file after editing it.

What I would expect to happen: after I edit a file in nevardon, if I delete it, it will be gone.

What happened:
delete told me access denied.

Tip for fixing:
After opening a file, make sure you call file.close(), that tells fs you're done with that file.

Edited by Geforce Fan, 28 March 2015 - 06:49 PM.


#39 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 29 March 2015 - 09:39 PM

I don't think op noticed my additional bug report, so bump.
Also, another bug report.

What I did: I hit END

What I would expect to happen: Nevardon would take me to the end of the line

What happened: Nevardon took me to the end of the entire file

This is annoying to keyboard jockeys, perhaps ctrl+end could take you to the end of the program, and end would take you to the end of the line? Same for home, too.

Edited by Geforce Fan, 29 March 2015 - 09:42 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users