Choice of programming language

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Choice of programming language // Archive: Tech Forum

1  |  

Post by Alien // Mar 16, 2007, 12:37pm

Alien
Total Posts: 1231
pic
I need some advice on programming. I need to come up with a way to help reduce the manual workload involved in processing large-ish [for a plain text file anyway] text files. Whilst this isn't related to tS, it does relate to something which, if I manage it, might help to reduce the time taken to do it, meaning there'll be more time for tS. ;)


What I want to know is, which language from the 1s available free from MS as part of Visual Studio Express (http://msdn.microsoft.com/vstudio/express/) would be best for me to try & learn. As I said, I want to be processing text files, both stuff based purely on the contents within a single file, as well as modifying that file based on the contents of another file. It would probably make it easier for me if the language supported Regular Expressions, as I'm used to using them in MailWasher & Proxomitron filters, as well as for find & replace rules in PSPad. From what I can tell, it comes down to a choice between VB, VC#, VC++, and VJ#.


I'm just about to start looking through the feature tours for each of them, but would very much appreciate any ideas or suggestions.


BTW, I know someone said a while back that jscript in tS can do REs, & I think the VJ# might be sort-of the same thing, but I think VC# can do them as well, so is it just between those 2, or is VC++ a candidate as well? [IIRC, VB can't do REs]

Post by jamesmc // Mar 16, 2007, 1:32pm

jamesmc
Total Posts: 2566
VB is the easiest.

Not sure about VJ never tried it. It is just another subset of the JAVA language set and similar to what as I understand tS7 works with. Any java language is pretty good to know.


C# is extremely versatile and can handle just about anything your throw at it.


C++ is the grand daddy is not much harder than C# to learn, both have a learning curve though.


The problem with any of these from MS is wrapping your mind around the NET base. With the interface it is much easier, but practice and practice and practice.


However, if it's just for text and you don't need it do anything else, VJ might be the ticket.

Post by ProfessorKhaos // Mar 16, 2007, 1:40pm

ProfessorKhaos
Total Posts: 622
pic
One scripting language I've found incredibly valuable from a interpreted language point of view is tcl-tk. It's syntax is a tad bit different but not too difficult to get used to.


Product is available for free and it's not terribly difficult to create GUI interfaces using scripted code alone.


http://www.tcl.tk/software/tcltk/


Another advantage is that it's VERY multiplatform and can be supported on PC, MAC, Unix, and Linux machines.


It's often used as a "glue language" and a GUI interface language for other command scripts. It's variables are essentially strings but it has support for arrays, lists, splitting by characters, advanced math functions, etc.


It can read in the contents of an entire file very rapidly and is a pretty good choice for parsing.


I use it frequently and I love it. It does quite well with strings. While not as fast as compiled code, it is reasonably fast for most applications. Also, you can get a few different plugins in case you want to make graphs, access databases, etc.


You might give it a try. The price is certainly right. Free.


You can also run commands in it's interpreter to try things out when you're troubleshooting and such.



In reality, tcl-tk is kinda 2 related packages. tcl is the scripting part. tk is the GUI display part. If you want to run tcl only you execute 'tclsh' (tcl shell). If you want to run tcl-tk, you execute 'wish'.


Very nice for simple quick projects.


Dunno how multiplatform Perl is, but that could be another alternative. There actually is a version of Perl-tk as well that supports many of the same GUI creation features.

Post by Jack Edwards // Mar 23, 2007, 2:17pm

Jack Edwards
Total Posts: 4062
pic
Pearl isn't bad for parsing large text files either.

http://en.wikipedia.org/wiki/Perl

Whupps, didn't see that you already mentioned that Prof.

-Jack.

Post by weaveribm // Mar 23, 2007, 2:34pm

weaveribm
Total Posts: 592
processing text files

Yes Perl is extremely useful for parsing text files but it's an absolute nightmare to program (or possibly understand in my case all those leaning toothpicks strewth) even for tiny applications. Very poor GUI :) I do know a bloke who's a genius at that if you're stuck

VB is excellent and is now subsumed into Net something or other. You should look at VB it's very nice if you already understand/know BASIC or can apply logic as I'm sure you can. Very good for building small applets to analyse bitmaps, things like that in your own Windows-based (scroll bars, double-clicks, buttons) GUI. BBC BASIC then :) Text's a doddle

Peter

Post by frootee // Mar 23, 2007, 7:01pm

frootee
Total Posts: 2667
pic
One I have heard of that is probably Not very useful for your applications is

Lisp. A standing joke is that L-I-S-P stands for, Lots of InSignificant Parentheses. :cool:


Frootee

Post by ProfessorKhaos // Mar 24, 2007, 4:46am

ProfessorKhaos
Total Posts: 622
pic
Theoretically, LISP is a good AI language. Know it's deeply embedded in emacs in the unix world. The folks I know who swear by it are the kind of folks that pride themselves on using command lines rather than gui's though so take it with a grain of salt.


Perl is not too terrible and if text processing is your game it's very powerful for relatively little code.


VB is pretty standard and you'd likely get a lot of knowledgeable folks to help you here on the forums.


Don't underestimate the value of the scripting you can use inside VBscript control and jscript control bricks on tS7.11. You can use them as quick utility tools by dragging them to the LE, typing in a few params, hitting the "execute" button (or what ever you named it) and it could process your text for you. Then you just delete the brick from the LE when you're done with it. Nothing says it has to be limited to functions that affect trueSpace objects themselves.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn