Return to “Scripting & Modding”

Post

Re: LTSL - The LT script language

#31
mcsven wrote:That said, is there anything other than arguments from authority on this issue? The reasoning you have presented so far has been mostly assertions about legibility and ease of debugging, yet these are surely countered simply by saying that I think the opposite. We're not much further forward.
I would pretend that a reasonable argument is the following: brackets, curly or normal, are handled pretty constantly by every editor or text-display system.
Spaces and tabs are not. Best example is this one:

Code: Select all

<- no space ( normal )
  <- two spaces { curly }
    <- four spaces [ square ]
I repeat without the "code" keyword:
<- no space ( normal )
<- two spaces { curly }
<- four spaces [ square ]

Indeed HTML is not displaying spaces correctly. It does however display all brackets consistently. And do not get me started on tab, that is sometimes N spaces (usually 3 or 4) and sometimes it's own character.

So why is this an issue? Because of code re-use. Even one person may have a file with indentation at 2 spaces and another with 3 spaces that he won't be able to combine into one with a simple copy-paste.
And what about taking examples from the web? Copy-pasting to and from an email? Sharing and re-using community code? This is made much more difficult by using inconsistent, invisible characters than by using consistent and visible brackets.

Now of course I can live with anything as I am already impressed by what Josh is giving us as toys. But I guess he makes our online-community life a bit less easy with this design choice... As opposed to saying any number of space and tab is considered "one space" (so indentation can be used for human readability ) and a special visible unique character like a parenthesis for scoping.

:monkey:
Image
Post

Re: LTSL - The LT script language

#32
Dinosawer wrote: :lol: Fair question. Don't know about other people (Don't they start with Java or C++ in schools usually?), but not in my case. For me it was Java->tiny bit of Python->C->C++->more Python when it came to learning, so it's not a "first learned" bias for me. :)
Huh, not for me. In our high school, during 10th grade, we would learn Python, and then a bit a Java, and from there, choose to go into more Java, or C/C++ for later years and collage. Not quite there yet, so I had to self-teach myself some Python and personally enjoy the indents as a way to separate blocks of code, resulting in less characters needed to make a program, and better readability for me, personally.

However, feel free to disagree. ;) Cheers!
Brian makes Art! Check out http://bk-creations.deviantart.com/ for more information! Suggestions are appreciated!

In Josh we trust.
Post

Re: LTSL - The LT script language

#33
CodeDecoded wrote:
Dinosawer wrote: :lol: Fair question. Don't know about other people (Don't they start with Java or C++ in schools usually?), but not in my case. For me it was Java->tiny bit of Python->C->C++->more Python when it came to learning, so it's not a "first learned" bias for me. :)
Huh, not for me. In our high school, during 10th grade, we would learn Python, and then a bit a Java, and from there, choose to go into more Java, or C/C++ for later years and collage. Not quite there yet, so I had to self-teach myself some Python and personally enjoy the indents as a way to separate blocks of code, resulting in less characters needed to make a program, and better readability for me, personally.

However, feel free to disagree. ;) Cheers!
I never learned programming in high school (the most advanced thing we did there was typing in Word :problem: ), and we started with Java in university. Mainly because they could put us together with the IT students, because we'll never use Java again in our studies, only Python and C++. :lol:
Warning: do not ask about physics unless you really want to know about physics.
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Image
Post

Re: LTSL - The LT script language

#37
Gazz wrote:Now when I learned programming, we didn't have indents and the only brackets were used in math.
It was line numbers all the way!
For those fearless souls who'd like to experience a little taste of what those days were like... you can, if you're using Windows (including up to Win 8).

Open up a DOS window, cd to a directory that contains a file you don't mind destroying, make sure that file has no more than eight characters in its filename and no more than three characters in its extension, and type "edlin" followed by that filename.

Enjoy. :twisted:
Post

Re: LTSL - The LT script language

#38
Flatfingers wrote: Open up a DOS window, cd to a directory that contains a file you don't mind destroying, make sure that file has no more than eight characters in its filename and no more than three characters in its extension, and type "edlin" followed by that filename.
Wikipedia wrote: ...it continues to be included in the 32-bit versions of current Microsoft operating systems
(emphasis added)

who still uses 32 bit versions?

i've abandoned 32 bit with winXP
Post

Re: LTSL - The LT script language

#42
I'm on Win 7, but I still have some very old games I still enjoy. When I moved from XP to 7, I didn't want to take the chance that going to 64-bit would cause some of them to stop working.

That's biting me in the posterior now as some games, such as EverQuest Next: Landmark and Watch Dogs are 64-bit only. I assume there will be more such games I can't play as time goes on, so I'll be forced to 64-bit whether I like it or not at some point. (I'm aware of the 4GB memory limit; it's not a pressing problem now, but it is another reason to upgrade eventually.)

OK, having said that, Josh mentioned something in his devlog today that's germane to the observations made about indentation as scoping control:
Josh Parnell wrote:I really do prefer the simplicity and readability of the LTSL system generator as compared to the equivalent c++ code. At the end of the day, they do the same thing, so it's not really something to get too hung up on.
Okey-doke. Having registered my objections, I move on.

Still plenty of unanswered questions. :)
Post

Re: LTSL - The LT script language

#43
Flatfingers wrote:
Gazz wrote:Now when I learned programming, we didn't have indents and the only brackets were used in math.
It was line numbers all the way!
For those fearless souls who'd like to experience a little taste of what those days were like... you can, if you're using Windows (including up to Win 8).

Open up a DOS window, cd to a directory that contains a file you don't mind destroying, make sure that file has no more than eight characters in its filename and no more than three characters in its extension, and type "edlin" followed by that filename.

Enjoy. :twisted:
For the love of God, I hope you never have to use Edlin. :wtf:


Ps.

10 print "I miss line numbers"
20 goto 10
"A sufficiently advanced technology is indistinguishable from magic."
- Arthur C. Clarke
Post

Re: LTSL - The LT script language

#44
I edited code before I ever got my hands on a PC.

EDLIN was a step up. :)

All these somewhat early editors pretty much used the same model though: you had to specify a line or range of lines as a target for your text changes. It was a nice new feature when an editor would automatically renumber your lines for you.

And WordStar... WordStar was like dying and going to Heaven. And being given ice cream. Really good ice cream.

Even if it could only show you a tiny bit of screen real estate, as a visual (WYSIWYG) editor WordStar made text editing unbelievably easier than trying to remember where something was, or reprinting a bunch of lines after every change. It also had the nice feature of early editors that, since screen real estate was extremely limited, you could tell its menus to get out of the way and just let you get on with bashing out text without nudging you in the side every five seconds to ask if you really wanted that comma there or not.

Which is why George R. R. Martin still uses it.

I much preferred BRIEF once it came along, though. It remains the best text editor I've ever used. Unfortunately it's no longer supported, which is why I still use the BRIEF-alike ZEUS for all my coding. It's clean, fast, customizable, modeless (unlike vi/vim/emacs), and -- unlike certain bloated word processors -- doesn't constantly elbow me when I'm trying to concentrate.

Online Now

Users browsing this forum: No registered users and 11 guests

cron