Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   auto indent code in RC (https://forums.graalonline.com/forums/showthread.php?t=78785)

Mark Sir Link 02-20-2008 12:00 AM

auto indent code in RC
 
on apply can we PLEASE auto indent the code.

zokemon 02-20-2008 12:12 AM

That's a horrible idea.
Somethings would get indented all wrong such as large arrays on multiple lines.

I always do all my indenting by hand.

Inverness 02-20-2008 01:20 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375797)
on apply can we PLEASE auto indent the code.

Do it by hand like very other (experienced) coder.

Coders have their own style and automatic formatting would ruin it.

cbk1994 02-20-2008 01:30 AM

Definitely do it by hand. That's how basically everyone does it, even most IDEs for professional programming languages don't do it.

Just /style weapon WEAPONLOL in RC if you want ...

DustyPorViva 02-20-2008 02:04 AM

Ya, I was about to say isn't there already a command to style a weapon?
I used to rely heavily on Graal's default styler in the editor, but I got used to doing it by hand in RC. It is a pain when you add in something and you have to go through a bunch of lines indenting them properly though.

Twinny 02-20-2008 02:05 AM

So hard to press tab :'(

There is also the /style command for lazy people.

Mark Sir Link 02-20-2008 02:21 AM

Quote:

Originally Posted by cbkbud (Post 1375807)
Definitely do it by hand. That's how basically everyone does it, even most IDEs for professional programming languages don't do it.

Just /style weapon WEAPONLOL in RC if you want ...

you'll have to show me these IDEs as most I've used do all indenting for you and even close off any brackets you open.

and I know about /style, the question is why is this necessary when the functionality exists and could be done automatically if players checked an option?

cbk1994 02-20-2008 02:38 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375818)
you'll have to show me these IDEs as most I've used do all indenting for you and even close off any brackets you open.

and I know about /style, the question is why is this necessary when the functionality exists and could be done automatically if players checked an option?

Because it is bad practice?

And I guess you need to look at more IDEs? Netbeans, Eclipse, fairly certain Visual Studio doesn't.

Graal does what any IDE does, which is keep you on the same indent. /style IS for lazy people, and it doesn't even work that well.

Mark Sir Link 02-20-2008 02:42 AM

Quote:

Originally Posted by cbkbud (Post 1375823)
Because it is bad practice?

And I guess you need to look at more IDEs? Netbeans, Eclipse, fairly certain Visual Studio doesn't.

Graal does what any IDE does, which is keep you on the same indent. /style IS for lazy people, and it doesn't even work that well.

Netbeans definitely does and closes any brackets you open, so again, what IDE does not auto indent.

Microsoft visual and eclipse also auto indent so you've lost me

Inverness 02-20-2008 02:46 AM

Stop whining because the editor doesn't do everything for you.

Adding auto-bracketing is waste of Stefan's time.

Mark Sir Link 02-20-2008 02:47 AM

Quote:

Originally Posted by Inverness (Post 1375825)
Stop whining because the editor doesn't do everything for you.

Adding auto-bracketing is waste of Stefan's time.

It already exists so again I don't see your point. It would just be nice if it's usage could be a little easier.

cbk1994 02-20-2008 02:51 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375824)
Netbeans definitely does and closes any brackets you open, so again, what IDE does not auto indent.

Microsoft visual and eclipse also auto indent so you've lost me

I'm sorry, I guess I just forgot that auto-indent, and auto-bracket are exactly the same thing.

Silly me. :rolleyes:

Mark Sir Link 02-20-2008 02:53 AM

if you want to argue semantics, we'll get to the base point that netbeans is a compiler for the mildly retarded. You brought netbeans up, putting you in that category.

Given it's a compiler that will make GUIs for you, it'd be a safe bet (actually, it's true) that it auto-indents.

That more satisfactory for you?

cbk1994 02-20-2008 03:44 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375829)
if you want to argue semantics, we'll get to the base point that netbeans is a compiler for the mildly retarded. You brought netbeans up, putting you in that category.

Really? So this means that whatever I mention, I am?
I believe that monkeys are bad. If you so much as mention the word 'monkey', I will consider you bad.
Quote:

Originally Posted by Mark Sir Link (Post 1375829)
Given it's a compiler that will make GUIs for you, it'd be a safe bet (actually, it's true) that it auto-indents.

Yes, if you change the settings so that it does this z.z
Quote:

Originally Posted by Mark Sir Link (Post 1375829)
That more satisfactory for you?

Nope, better luck next time.

Mark Sir Link 02-20-2008 03:49 AM

let's put all this aside

This forum is a place for suggestions. I made my suggestions

I'm therefore confused as to why some part of the playerbase has convinced themselves that they are responsible for implementing such suggestions.

Inverness 02-20-2008 04:00 AM

You make it sound like suggestions that many dislike will be implemented.

This forum is also for discussing suggestions, like what we're doing right now.

Mark Sir Link 02-20-2008 04:03 AM

Future Improvements (4 Viewing)
Let the ideas flow freely

I don't see anything about discussion, and being so adamant about not including a checkbox seems more like "whining" to me then what I suggested.

Inverness 02-20-2008 04:04 AM

Because people new to scripting should not rely on such a feature as having their entire code automatically formated on apply. You're even too lazy to use the /style command. Also you should realize Stefan is the only one who can update the external RC code and that would be a waste of time.

If you want it to bad ask Skyld to add it to the scripted RC, then people will never learn how to type readable code.

cbk1994 02-20-2008 04:10 AM

Quote:

Originally Posted by Inverness (Post 1375848)
Because people new to scripting should not rely on such a feature as having their entire code automatically formated on apply. You're even too lazy to use the /style command. Also you should realize Stefan is the only one who can update the external RC code and that would be a waste of time.

If you want it to bad ask Skyld to add it to the scripted RC, then people will never learn how to type readable code.

Well said.

Mark Sir Link 02-20-2008 04:10 AM

Quote:

Originally Posted by Inverness (Post 1375848)
Because people new to scripting should not rely on such a feature as having their entire code automatically formated on apply.

It'd be irresponsible to call me new to scripting, and again, I've yet to see a compiler that doesn't auto-indent.
Quote:

You're even too lazy to use the /style command. Also you should realize Stefan is the only one who can update the external RC code and that would be a waste of time.
yes god forbid someone not want to waste their time for something that could be implemented in a much better fashion then it currently is.

And oh ****, I already knew Stefan is the only one who could update the code because I would have A.) done it myself already or B.) asked for assistance from the general population in doing so rather than coming to the game's official forum and asking the staff to do so (I mean, it's kind of implied since it's Future improvements and the last time I checked, players != official staff).

Quote:

If you want it to bad ask Skyld to add it to the scripted RC, then people will never learn how to type readable code.
It's not that difficult to hit tab or space a few times but really, why do that when it's unnecessary? That's like saying why bother with matches, we have a flint and tender already. Or maybe, why bother with cars, horses were put on this planet already.

Inverness 02-20-2008 04:19 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375852)
It'd be irresponsible to call me new to scripting, and again, I've yet to see a compiler that doesn't auto-indent.

When I started learning Java I turned off the Auto-bracketing because it irritated me.
Quote:

Originally Posted by Mark Sir Link (Post 1375852)
asked for assistance from the general population in doing so rather than coming to the game's official forum and asking the staff to do so (I mean, it's kind of implied since it's Future improvements and the last time I checked, players != official staff).

Whats the point? Its already been made clear Stefan is the only one who can do it. Don't bother trying to convince other global staff to convince Stefan.
Quote:

Originally Posted by Mark Sir Link (Post 1375852)
It's not that difficult to hit tab or space a few times but really, why do that when it's unnecessary? That's like saying why bother with matches, we have a flint and tender already. Or maybe, why bother with cars, horses were put on this planet already.

The difference between a car and a horse is far greater than the difference between formatting your code properly by habit and having it done for you automatically.

After having made such a bad comparison I think you're just whining because you're too lazy to indent code yourself.

Mark Sir Link 02-20-2008 04:26 AM

Quote:

Originally Posted by Inverness (Post 1375857)
When I started learning Java I turned off the Auto-bracketing because it irritated me.

ok.
Quote:

Whats the point? Its already been made clear Stefan is the only one who can do it. Don't bother trying to convince other global staff to convince Stefan.
I don't see how I'm trying to convince them. Unless you know of another place where I can suggest things to Stefan, I'll continue to use this forum thanks.
Quote:

The difference between a car and a horse is far greater than the difference between formatting your code properly by habit and having it done for you automatically.
I don't think you get the point that he has already implemented it to some extent so there is no reason to not make it more user friendly/better just because people are able to manually indent.
Quote:

After having made such a bad comparison I think you're just whining because you're too lazy to indent code yourself.
again, you've missed the crux of the comparison.

Inverness 02-20-2008 04:37 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375860)
I don't think you get the point that he has already implemented it to some extent so there is no reason to not make it more user friendly/better just because people are able to manually indent.

Because he has more important things to do than add something that only takes seconds overall to do on your own.
Quote:

Originally Posted by Mark Sir Link (Post 1375860)
again, you've missed the crux of the comparison.

Probably, you actually compared the difference between cars and horses to this auto-indenting feature, thats distracting enough for me.

Auto-adding brackets and stuff is a nice little thing that I don't mind as long as its optional so I can turn it off.

But auto-formatting your whole code for you is something that is in no way needed and this is what I think you want. If I'm misunderstanding you then speak up.

I don't want people to be able to type the crappy (but functional) code into RC and have it work fine after hitting apply, that is promoting a BAD HABIT.

Mark Sir Link 02-20-2008 04:41 AM

Quote:

Originally Posted by Inverness (Post 1375866)
Because he has more important things to do than add something that only takes seconds overall to do on your own.Probably, you actually compared the difference between cars and horses to this auto-indenting feature, thats distracting enough for me.

Auto-adding brackets and stuff is a nice little thing that I don't mind as long as its optional so I can turn it off.

But auto-formatting your whole code for you is something that is in no way needed and this is what I think you want. If I'm misunderstanding you then speak up.

I don't want people to be able to type the crappy (but functional) code into RC and have it work fine after hitting apply, that is promoting a BAD HABIT.

How is auto-adding brackets any different then auto indenting? both are features of conveinence

I don't get how you're suggesting auto indentation will make bad code any better, all it is is adding a few spaces. You've only lead me to confusion now.

It's not like allowing auto indentation will make good code bad either.

So again, you've confused me entirely.

Programmer 02-20-2008 04:49 AM

This is a good idea, since I prefer to use auto-indent when I work with jEdit, primarily because I don't like to go and indent my own code. jEdit indents after every {, (, and [.

Inverness 02-20-2008 04:57 AM

I'm saying auto-formatting, like having your entire code compressed into one line and then being able to use auto-format to expand it into something that looks more readable. (i.e. /style)

If you just mean indenting after brackets and the like then thats not bad.

Mark Sir Link 02-20-2008 05:01 AM

Quote:

Originally Posted by Inverness (Post 1375876)
If you just mean indenting after brackets and the like then thats not bad.

exactly.

cbk1994 02-20-2008 05:05 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375878)
exactly.

Did you think about telling us this in the first place?

Mark Sir Link 02-20-2008 05:19 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375797)
on apply can we PLEASE auto indent the code.

..

cbk1994 02-20-2008 05:36 AM

Quote:

Originally Posted by Mark Sir Link (Post 1375885)
..

I thought you meant something entirely different.

Still, you should be doing it anyway.

Inverness 02-20-2008 06:38 AM

Not an apply, it should do it as you type x.x

Admins 02-20-2008 12:36 PM

It could be interesting to add a button like in the offline editor for "styling" the script (apply, /style, reload), may be Skyld could add that :) It could also be interesting to give options to /style instead of using the server-side style options.

Twinny 02-20-2008 12:57 PM

If it doesn't auto-indent as you type then screw it. I couldn't read what i just wrote if I didn't indent it x_x

cbk1994 02-20-2008 11:26 PM

Quote:

Originally Posted by Stefan (Post 1375899)
It could be interesting to add a button like in the offline editor for "styling" the script (apply, /style, reload), may be Skyld could add that :) It could also be interesting to give options to /style instead of using the server-side style options.

I suggested this right after scripted RC was released, and he said he would, but he has not yet.


All times are GMT +2. The time now is 02:13 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.