It is very interesting to see what are the most popular server side languages used for developing web sites. Performance, knowledge, requirements, cost, stability and reliability drive the popularity of server sides. The most popular server side selection on WebDeveloper.com (http://www.webdeveloper.com/forum/forumdisplay.php?f=18) is PHP based on threads and posts. Popularity doesnt always mean the best.
Personally I select J2EE and .Net over PHP. For large apps and/or work with web services they have better performance, frameworks and oop compared to the PHP and other scripting languages. Ruby and Python also belong in the mix. ColdFusion is tops among the scripting languages and is easy to learn like PHP. PHP is not on the best list but does have its good points and is great for beginners. I like CakePHP but it doesnt compare to J2EE MVC frameworks.
Java is king of the world for web development and I nominate J2EE as the best server side.
opifex
10-11-2009, 05:16 AM
Different strokes for different folks and of course the majority of the time the server side language is dictated by the server. PHP, Perl and Python are more portable and a LAMP server is generally more reliable and less expensive than a Window$ or Java Server (not all LAMP servers have Tomcat, JBoss and Mono installed).
NogDog
10-11-2009, 01:20 PM
It all depends on your criteria and how you prioritize them. You state that, "For large apps and/or work with web services they have better performance..." But, not every web site is a "large app" (for some arbitrary value of "large"), nor does every web app make use of web services. Other criteria may be portability concerns, price, what your staff (you) already know how to use, what legacy code needs to be used, etc., etc., and so forth.
So to my mind the "best" server side language is: "it depends."
svidgen
10-11-2009, 02:15 PM
Java is king of the world for web development and I nominate J2EE as the best server side.
I'm also curious as to what your performance indicators are--how you go about benchmarking difference server configurations.
Some things to consider:
Java must be bytecode-compiled to run. This theoretically offers an efficiency advantage over most language, while hindering ease of development.
PHP, Perl, and may other server-side languages are scripted; however, there are multiples packages and techniques to cache the compiled images. Installing APC for PHP, for example, can significantly increase the performance of a complex PHP application.
Performance is highly, if not primarily, dependent on the programmer, his/her knowledge of the language of choice, his/her knowledge of algorithms and data structures, and his/her willingless to apply that knowledge to optimize their code in general and for the target language.
The best-performing version of an app will almost always be a stand-alone hardware-specific multi-threaded compiled daemon. However, this option, while best performing, is the most difficult to develop from scratch.
When you're running the numerous benchmarks, which I'm confident you've take the time to run before making grandiose claims, please ensure that you've taken all these things into considering. Make sure you've created the test application in optimal Java, PHP, Perl, C, C++ and assembly. And please ensure that each optimal solution is tested with and without various byte-code caching solutions, where applicable.
I'm pretty confident that the optimal C solution will take the performance prize.
So, if I had to nominate a best for performance, it would have to be a combination of C/C++ and assembly. If I had to nominate a best for ease of development, it would be PHP. And if I had to nominate a best for ideal balance between performance and ease of development, it would again be PHP.
So, when would I use Java? Well, I probably wouldn't use it server-side for web applications, in general. I might use it if I were charged with the task of writing a highly portable daemon. Java might be a good choice in that case ... But, I might be just as inclined to use Perl or PHP in that case too. It would depend on what the daemon had to do ...
Mr Initial Man
10-15-2009, 02:37 AM
Personally I select J2EE and .Net over PHP.
I've used .NET. I find it abhorrent. Perhaps it's because of a poor professor, perhaps it's because I couldn't figure out how to get my image borders to behave.
I'll stick with PHP, unless I figure out how to use COBOL as a server-side language, then I'll use THAT. Just to be an [CENSORED]
svidgen
10-16-2009, 09:58 PM
unless I figure out how to use COBOL as a server-side language
I believe you can use just about any language you want server-side, as long as you can make it executable (or interpretable by an executable) in some fashion. You just need to use it like a CGI, I believe ... Could be wrong.
opifex
10-16-2009, 11:35 PM
I'll stick with PHP, unless I figure out how to use COBOL as a server-side language, then I'll use THAT. Just to be an [CENSORED]
You CAN run COBOL recompiled to .NET or via the JAVA Eclipse Framework and there are existing solutions to run COBOL on Apache via PHP (not production stable).
COBOL is not dead by any means. Hell, it's a year younger than I am! I started using COBOL in 1973 (yep, just a kid)... we kind of matured together.
My many thanks to Grace Hopper, the Mother of COBOL and the inventor of the term "bug" as applied to computers.
Mr Initial Man
10-17-2009, 12:10 AM
Well, seriously, all you need is for it to spit out some text for it to be a server-side program to be useable as a server-side language -- anything from PHP to COBOL to INTERCAL if you feel like driving yourself crazy.
opifex
10-17-2009, 01:15 AM
"Crazy?"
Insanity is in the mind of the beholder.... I've played this game since the beginning. Nothing is impossible... difficult... maybe, but NOT impossible. The majority of my life has dealt with the "digital world" and I m thoroughly convinced that NOTHING is impossible.
Even the folk that complain that their html pages won't render "the way they want them to" can solve that problem by writing their own DTD.... "never say never."
I've played this game too long... and I am never surprised by innovation, I welcome it.
Mr Initial Man
10-17-2009, 02:42 AM
When I said driving yourself crazy, I meant using INTERCAL as a server-side language. Have a read. (http://catb.org/~esr/intercal/stross.html)
EDIT: If it still makes sense, Read some more. :D (http://esolangs.org/wiki/INTERCAL)
Charles
10-17-2009, 07:49 AM
But Java is compiled and then interpreted--byte code is not machine code. Perl, compiled to machine code as it's interpreted. Perl often runs much faster than Java. And Java is yucky, you can't beat the simple elegance of Perl. But somehow I seem to always end up using PHP.
svidgen
10-17-2009, 10:13 AM
Perl, compiled to machine code as it's interpreted.
In a sense, that's true of all programming languages. Every line (or token) of JavaScript, Java, Ruby, PHP, etc. must eventually be translated in some respect to machine code before the indicated action/instruction is performed.
In the case of Perl (at least for Perl 5-ish), the "compiled image" is still just an interpreter and a dataset. Perl does not inherently convert your code into a stand-alone machine code image. The Perl code just gets converted into a somewhat optimized instruction tree that a Perl bytecode interpreter (optionally embedded into an "image") then interprets. (See Programming Perl 3rd ed. Chapter 18: "Compiling" (http://oreilly.com/catalog/pperl3/chapter/ch18.html)).
Perl often runs much faster than Java. And Java is yucky, you can't beat the simple elegance of Perl.
Unless things have changed drastically in the world of Perl since they've released my version of Programming Perl, Perl and Java both generate and execute bytecodes (aka opcodes). The difference is that Java apps must be precompiled into these bytecodes. While this may seem like a annoying step to some, it allows Java to avoid the overhead of optimization and compilation with every execution. Perl (mod_perl aside) runs optimization and bytecode generation with every execution of a script.
Java has been praised on numerous occasion for approaching machine-code-like speeds. As long ago as 6 years ago, geek-folk were recreating CPU and GPU-intensive games with Java. Oddly enough, the Java versions, in some cases, outperformed the compiled versions. Additionally, several years ago, I read about Java benchmarking nearly as well as equivalent machine code.
I can't say I've ever heard such praise of Perl. Moreso, the praises I hear for Perl are that its regular expression engine is exceptional for large chunks of text, that it's quick'n'easy to bang out simple command-line solutions , and that the community (CPAN) is wonderful.
But somehow I seem to always end up using PHP.
Me too.
PHP has [I]roughly the same processing pipeline as Perl (I think)--but it's prettier, it runs in a more sensible way as an Apache extension than mod_perl does, and it's really easy to turn on auto-opcode caching (installing something like APC (http://us3.php.net/manual/en/book.apc.php) is pretty easy). Oh, and it's a really simple language with an overload of built-in functions and easily installable additional functions for just about anything you'll ever need. So, you can spend less time writing the code and more time perfecting the algorithm, adhering to specs, making things look pretty, and so on.
Mr Initial Man
10-17-2009, 05:35 PM
To be honest, there are languages that I do not believe could be used as server-side languages, though.
svidgen
10-17-2009, 05:40 PM
To be honest, there are languages that I do not believe could be used as server-side languages, though.
I challenge you to challenge us with one!
Mr Initial Man
10-17-2009, 06:25 PM
I challenge you to challenge us with one!
With pleasure. Ladies and Gentlement, I show you the scripting language DragonSpeak (http://www.furcadia.com/beekins/masons/knowledgebase/dstheory1.html).
opifex
10-17-2009, 06:55 PM
With pleasure. Ladies and Gentlement, I show you the scripting language DragonSpeak (http://www.furcadia.com/beekins/masons/knowledgebase/dstheory1.html/).
well, there is a game... but where is the language??
Mr Initial Man
10-17-2009, 07:16 PM
well, there is a game... but where is the language??
Made a mistake with the URI It is: http://www.furcadia.com/beekins/masons/knowledgebase/dstheory1.html (Had a slash at the end)
svidgen
10-17-2009, 11:57 PM
With pleasure. Ladies and Gentlement, I show you the scripting language DragonSpeak.
Could you please show examples of the [necessary] qualities of a structural programming language (http://en.wikipedia.org/wiki/Structured_programming#Low-level_structure_Programming) in DragonSpeak, as well as provide a compiler or interpreter?
I mean, I could write an interpreter and probably generate a web page with a "DragonSpeak" script; but, if it doesn't qualify as a functional language as-is, it's not really a candidate for this challenge ... In either case, I'd need a much more detailed reference manual. The page you linked vaguely describes the language, but doesn't go into any real detail.
Mr Initial Man
10-18-2009, 02:20 AM
Okay, I'll admit I cheated.
DragonSpeak is a scripting language for an online game rather than a real programming language. But my point stands: It cannot be used as a server-side scripting language. :p
svidgen
10-18-2009, 09:41 AM
Okay, I'll admit I cheated.
DragonSpeak is a scripting language for an online game rather than a real programming language. But my point stands: It cannot be used as a server-side scripting language. :p
But, that's my point--if it's not a real programming language, it's not even in the realm of things that we would try to use as a server-side language. You wouldn't try to write a server-side program with an banana, because a banana isn't a programming language--it's a fruit. And while you could craft some sort of contraption to "read" the banana and generate pages, the banana is neither a programming language nor a program: it's a banana.
And, while I'm a little suspicious that DragonSpeak does not have all of the qualities of a real programming language, I'm confident that it can be used to generate dynamic content on the server side if you can even so much as provide a detailed manual and a virtual machine.
Mr Initial Man
10-18-2009, 12:09 PM
Well... I can give you a text list of all the commands. (The commands it generates automatically comes with documentation so that you know what it's doing.)
Dragonspeak is interesting; it's so primitive as to not really be a programming language, but it does work as a scripting language in its environment. Basically, it somehow straddles between, say, CSS and JavaScript for programming capability.
But it, unlike the banana, is meant to be used with a computer.
EDIT: Found a full list of commands: http://www.furcadia.com/beekins/guide/visualds.html
svidgen
10-18-2009, 02:23 PM
Dragonspeak is interesting; it's so primitive as to not really be a programming language, but it does work as a scripting language in its environment. Basically, it somehow straddles between, say, CSS and JavaScript for programming capability.
Well, JavaScript is a fully qualified programming language and could be used server-side. CSS is a stylesheet language--it's not really even candidate for comparison to a programming language (much like the banana). And while CSS (or a banana) could be used as data on the server-side, it is decidedly not a programming language.
In reviewing the command set you supplied, I think DragonSpeak may qualify as a structured programming language--although a very "hardware"-specific and odd one. And it could, to some extent, be compiled to run in a command-line (or even a graphical) environment as an executable, which means that it can be called by a web server without issue. As with any programming language, certain standards just need to be defined.
For example, in C, commands begin executing at the start of the main() loop, having initialized all of the preceding variables into known memory locations. This is not really inherent to the language; but an agreed upon standard to allow C to be compiled and run. The same sort of thing would need to be done when porting DragonSpeak.
For our purposes, it would make sense to use (0:0), when everything is starting up, as the entry point (like C's main() function). We then need to define which output is standard output, versus the error logger, and so on. I might choose (5:210), set entrytext to {...}. And, as with many programming languages, we'll define the end-of-program marker as the point at which we run out of commands.
So, the Hello World app in DragonSpeak, written in "command-line compatibility mode" would look like this:
(0:0) the program is loaded.
(5:210) print {Hello World} to standard out
Once compiled in CLI mode, the application would print Hello World and exit. This is all the functionality that is needed for an application to be called by Apache to produce a web page ...
If you are interested in using DragonSpeak to write your own web applications, I would make myself available for hire. I would be willing to write an interpreter in Perl or something, with support for the basic mathematical, memory, O/I, and control-flow functions. Though, I would not be able to ensure high performance without a significant monetary investment on your part.
... anyway. The point is that any structural programming language (and even things that don't really qualify) can be used as server-side languages. It's just a question of how much work and money you can afford to put into it. And, having a Hello World app for DragonSpeak is proof enough (for me) that it can be run server-side.
svidgen
10-18-2009, 02:29 PM
Actually, I think I would use (5:200), emit message {...} to whoever set off the trigger, as my print() equivalent. I think that makes more sense. So, Hello World becomes:
(0:0) the program is loaded.
(5:200) print {Hello World} to standard out
:)
Mr Initial Man
10-18-2009, 03:01 PM
Well, by that reasoning, you could make a program out of XHTML.
...
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Set Variables -->
<meta name="loop" content="99" />
<title>99 Bottles of Beer On The Wall</title>
</head>
<body>
<div class="function" id="First_Line">
<ul class="vars_passed">
<li><var>bottles_num</var></li>
</ul>
<div class="return"><samp><var>bottles_num</var> <span>bottles of beer on the wall</span></samp></div>
</div>
<div class="function" id="Second_Line">
<ul class="vars_passed">
<li><var>bottles_num</var></li>
</ul>
<div class="return"><samp><var>bottles_num</var> <span>bottles of beer</span></samp></div>
</div>
<ul class="loop">
<li class="conditions"><ul>
<li class="is_true"><code><var>loop</var> >= 1</code></li>
</ul></li>
<li class="actions"><ul>
<li class="output">
<p><a href="#First_Line" rel="loop" /></p>
<p><a href="#Second_Line" rel="loop" /></p>
<p><span>Take one down</span></p>
<p><span>Pass it around</span></p>
</li>
<li class="math"><code><var>loop</var> = <var>loop</var> - 1</code></li>
<li class="output">
<p><a href="#First_Line" rel="loop" /></p>
</li>
</ul></li>
</ul>
</body>
</html>
svidgen
10-18-2009, 03:18 PM
Well, XHTML isn't a programming language, and there are more appropriate ways it can be used to "direct" server-side operations. Once you add meaning to things, you're creating a whole new standard. And, you could argue that I did the same with DragonSpeak--but you'd be wrong: I've decided on one of several pre-existing possible entry points and decided which pre-existing output best corresponds with STDOUT.
So, you could model a language after XML/XHTML, like you've done. But, XML/XHTML isn't the programming language--it's just a syntax. The programming language you've "created" isn't XML/XHTML, but it adheres to XML and XHTML standards in addition to your new language's standards. So, you've got yourself a completely new standard, derived from or based on XHTML.
It's certainly an interesting snippet of code. You should write an interpreter or compiler for it :)
Mr Initial Man
10-18-2009, 03:23 PM
I see what you're saying. Certainly, this is probably proof that my brain's gone completely fwibble, but there is one thing XHTML and CSS have that's different from a banana: They're still computer languages (albeit not programming ones).
Bananas is what I've gone.
EDIT: Besides, we already have an XML-based language that can and is used as a server-side scripting language. What else DO you compare XSLT to?
By the way, DragonSpeak isn't hardware-specific, but software-specific. It's used in creating custom areas in a MMORPG.
svidgen
10-18-2009, 03:37 PM
Hehe. DragonSpeak actually kept me busy for awhile, sifting through some programming theory stuff, trying to determine whether it qualified.
I'll let you know if time and boredom find me and cause me to write a DragonSpeak interpreter.
... Oh, and I'll also let you know if I come up with a banana interpreter. Though, I'm not entirely sure a programming language for which the programs literally decay is such a good idea ...
Mr Initial Man
10-18-2009, 03:44 PM
Hmmmm... can I send you a program I wrote for it? Haven't played with it in a while, but it shows what it does.
opifex
10-18-2009, 03:46 PM
To me, it looks like DragonSpeak is only an interface to a higher language, maybe something akin to Logo (as an example) for creating the graphics in the game according to a timeline (action sequence). So I will hold that what has been shown is not really a "programming language" in itself, but only provides the variables to the actual program that is generating the game.
svidgen
10-18-2009, 03:47 PM
What does it do, exactly? And would you be sending source code, or an executable?
Mr Initial Man
10-18-2009, 03:52 PM
Source code.
What does it do...
In the online game Furcadia, you have a pseudo-3d area your avatar can move around in, like any graphical MMORPG. When you create the custom areas (called "dreams"), you have a program that allows you to place objects in the various areas. It works a bit like cut and paste in Paint.
Dragonspeak describes to the Furcadia Server what should happen when
An avatar arrives in an area
An avatar moves into a specific area
An avatar "picks up" an object
An avatar bumps an object
and so on. And Opifex has a very good description of what it actually is.
svidgen
10-18-2009, 03:54 PM
To me, it looks like DragonSpeak is only an interface to a higher language, maybe something akin to Logo (as an example) for creating the graphics in the game according to a timeline (action sequence). So I will hold that what has been shown is not really a "programming language" in itself, but only provides the variables to the actual program that is generating the game.
Though the same could be said of Java, JavaScript, Perl, PHP, or any scripted language or language that runs on a virtual machine. After reviewing the commands available in DragonSpeak, it seems to me that it contains all of the necessary qualities of a structured programming language--though some of them are a little convoluted. It's just a matter of translating concepts from their natural "hardware" (the game) to a different machine, virtual or otherwise. In that translation, some features of the language are likely to lose their meaning, of course ...
svidgen
10-18-2009, 03:57 PM
Source code.
You're more than welcome to send me source. But, perhaps I missed something--what language is this source code in, and what does it do? Is your code the paint-like app?
Mr Initial Man
10-18-2009, 04:00 PM
Oh, cripes, I just realized something... I'd have to send you the map along with it for my code to make a lick of sense, and you won't have the software to view the map without downloading Furcadia.
svidgen
10-18-2009, 04:04 PM
Oh, cripes, I just realized something... I'd have to send you the map along with it for my code to make a lick of sense, and you won't have the software to view the map without downloading Furcadia.
Ah. Then I think I'll pass.
Mr Initial Man
10-18-2009, 04:33 PM
I'll post a bit of actual DragonSpeak here, though.
(0:7) When somebody moves into position (#42,#155),
(5:200) emit message {The Knight's Tour: It is an old puzzle to place a knight on the chessboard and, moving it according to the rules of chess, landing on each square once and once only. This is the puzzle I set you. Should you require a hint, press on the switch, which will cause the show the legal moves of the knight, which squares you have landed on and have yet to land on. A warning: If you land on a tile twice, or make an illegal move, you must restart the tour! --Lord Burgundy} to the triggering furre.
(5:200) emit message {<b><u>Commands:</u></b> <b>!Quit</b> Quits puzzle (Dropping the knight on a blue tile resets the puzzle)} to the triggering furre.
Enter
(0:7) When somebody moves into position (#42,#152),
(1:13) and the triggering furre is facing northeast (up and right),
(3:2) at position (#42,#153) on the map,
(5:4) place object type #560.
(5:8) play sound 4 to the triggering furre.
(5:600) memorize that the PhoenixSpeak info {InPuzzle} about the triggering furre will now be #1.
(5:300) set variable #%Maze2Hint to the value #1.
Get Hint
(0:31) When a furre says {!Hint},
(1:81) and the triggering furre is within the diamond (#46,#136) - (#44,#153),
(3:3) within the diamond (#44,#139) - (#44,#153),
(5:2) change floor type #%KTLiteUnchanged to type #167.
(5:2) change floor type #%KTDarkUnchanged to type #174.
(5:2) change floor type #%KTLiteLegal to type #180.
(5:2) change floor type #%KTDarkLegal to type #188.
(5:200) emit message {The untouched tiles turn gray. The squares to which you can move legally turn red, allowing you to see where you may go, but those squares you have landed on remain unchanged.} to the triggering furre.
(5:200) emit message {<b>Elrich Matheson:</b> "This is all the help you will receive."} to the triggering furre.
(5:300) set variable #%KTLiteUnchanged to the value #167.
(5:300) set variable #%KTDarkUnchanged to the value #174.
(5:300) set variable #%KTLiteLegal to the value #180.
(5:300) set variable #%KTDarkLegal to the value #188.
(5:300) set variable #%Maze2Hint to the value #0.
Drop The Knight.
(0:18) When somebody drops object type #306,
(5:302) take variable #%KTMovesMade and add #1 to it.
(3:3) within the diamond (#44,#139) - (#44,#153),
(5:2) change floor type #%KTDarkLegal to type #%KTDarkUnchanged.
(5:2) change floor type #%KTLiteLegal to type #%KTLiteUnchanged.
Oops!
Illegal Move
(0:18) When somebody drops object type #306,
(1:17) and the triggering furre (moved from/is standing at) floor type #155,
(5:8) play sound #75 to the triggering furre.
(5:50) set countdown timer #320 to go off in #1 seconds.
(5:300) set variable #%KTLegalMove to the value #0.
(5:200) emit message {The Knight's Tour has been reset.} to the triggering furre.
(0:18) When somebody drops object type #306,
(1:117) and the triggering furre (didn't move from/isn't standing at) floor type #%KTDarkLegal,
(1:117) and the triggering furre (didn't move from/isn't standing at) floor type #%KTLiteLegal,
(1:117) and the triggering furre (didn't move from/isn't standing at) floor type #155,
(1:201) and variable #%KTMovesMade is greater than #1,
(5:8) play sound #75 to the triggering furre.
(5:50) set countdown timer #320 to go off in #1 seconds.
(5:300) set variable #%KTLegalMove to the value #0.
(5:200) emit message {That move is disallowed. Please restart the puzzle.} to the triggering furre.
Do Puzzle
(0:18) When somebody drops object type #306,
(1:81) and the triggering furre is within the diamond (#44,#139) - (#44,#153),
(3:5) where the triggering furre is at, not moving,
(5:2) change floor type #%KTDarkUnchanged to type #157.
(5:2) change floor type #%KTLiteUnchanged to type #171.
(5:2) change floor type #%KTDarkLegal to type #157.
(5:2) change floor type #%KTLiteLegal to type #171.
(3:60) #1 step(s) NE & #2 step(s) NW from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
(3:60) #2 step(s) NE & #1 step(s) NW from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
(3:61) #1 step(s) NE & #2 step(s) SE from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
(3:61) #2 step(s) NE & #1 step(s) SE from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
(3:62) #1 step(s) SW & #2 step(s) SE from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
(3:62) #2 step(s) SW & #1 step(s) SE from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
(3:63) #1 step(s) SW & #2 step(s) NW from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
(3:63) #2 step(s) SW & #1 step(s) NW from where the triggering furre (moved from/is standing),
(5:2) change floor type #%KTDarkUnchanged to type #%KTDarkLegal.
(5:2) change floor type #%KTLiteUnchanged to type #%KTLiteLegal.
Success!
(0:18) When somebody drops object type #306,
(1:81) and the triggering furre is within the diamond (#44,#139) - (#44,#153),
(1:200) and variable #%KTLegalMove is equal to #1,
(1:200) and variable #%KTMovesMade is equal to #64,
(5:200) emit message {Congratulations! You have completed The Knight's Tour!} to the triggering furre.
(5:76) place object type #0 in the triggering furre's paws.
(5:8) play sound #62 to the triggering furre.
(5:50) set countdown timer #320 to go off in #1 seconds.
(5:50) set countdown timer #321 to go off in #1 seconds.
(5:610) remember the PhoenixSpeak info {Mazes} about the triggering furre, and put it in variable #%MazeScores.
(5:301) copy the value of variable #%MazeScores into variable #%MazeScoresMod.
(5:308) divide variable #%MazeScoresMod by #4 and put the remainder in variable #%MazeScores2.
(3:3) within the diamond (#44,#139) - (#44,#153),
(5:5) change object type #306 to type #0.
Score
(0:18) When somebody drops object type #306,
(1:81) and the triggering furre is within the diamond (#44,#139) - (#44,#153),
(1:200) and variable #%KTLegalMove is equal to #1,
(1:200) and variable #%KTMovesMade is equal to #64,
(1:202) and variable #%MazeScores2 is less than #2,
(5:610) remember the PhoenixSpeak info {Solved} about the triggering furre, and put it in variable #%PSolved.
(5:610) remember the PhoenixSpeak info {Hints} about the triggering furre, and put it in variable #%HintPoints.
(5:302) take variable #%MazeScores and add #2 to it.
(5:302) take variable #%PSolved and add #1 to it.
(5:303) take variable #%HintPoints and add variable #%Maze2Hint to it.
(5:600) memorize that the PhoenixSpeak info {Mazes} about the triggering furre will now be #%MazeScores.
(5:600) memorize that the PhoenixSpeak info {Solved} about the triggering furre will now be #%PSolved.
(5:600) memorize that the PhoenixSpeak info {Hints} about the triggering furre will now be #%HintPoints.
Timers!
(0:50) When countdown timer #320 goes off,
(5:300) set variable #%KTLiteLegal to the value #500.
(5:300) set variable #%KTDarkLegal to the value #501.
(5:300) set variable #%KTLiteUnchanged to the value #502.
(5:300) set variable #%KTDarkUnchanged to the value #503.
(5:300) set variable #%KTMovesMade to the value #0.
(5:300) set variable #%KTLegalMove to the value #1.
(3:3) within the diamond(#46,#134) - (#44,#155),
(5:5) change object type #306 to type #0.
(5:77) place object type #0 in the paws of any furre present.
(3:2) at position (#46,#138) on the map,
(5:4) place object type #306.
(3:3) within the diamond (#44,#139) - (#44,#153),
(5:4) place object type #0.
(4:2) only where the floor is not type #157,
(4:2) only where the floor is not type #174,
(4:2) only where the floor is not type #188,
(4:2) only where the floor is not type #501,
(4:2) only where the floor is not type #503,
(5:1) set the floor to type #%KTLiteUnchanged.
(4:0) clear all filtering,
(4:2) only where the floor is not type #%KTLiteUnchanged,
(5:1) set the floor to type #%KTDarkUnchanged.
(0:50) When countdown timer #321 goes off,
(3:2) at position (#42,#153) on the map,
(5:4) place object type #556.
(5:9) play sound #3 to any furre present.
Quit Puzzle
(0:31) When a furre says {!Quit},
(1:81) and the triggering furre is within the diamond (#46,#134) - (#44,#155),
(5:76) place object type #0 in the triggering furre's paws.
(5:15) move the triggering furre to (#40,#156), or to someplace nearby if it's occupied.
(5:50) set countdown timer #320 to go off in #1 seconds.
(5:50) set countdown timer #321 to go off in #1 seconds.
(5:600) memorize that the PhoenixSpeak info {InPuzzle} about the triggering furre will now be #0.
(3:3) within the diamond (#44,#139) - (#44,#153),
(5:5) change object type #306 to type #0.
Leaves Puzzle
(0:7) When somebody moves into position (#40,#154),
(1:17) and the triggering furre (moved from/is standing at) floor type #143,
(5:600) memorize that the PhoenixSpeak info {InPuzzle} about the triggering furre will now be #0.
Mr Initial Man
10-18-2009, 04:34 PM
And the rest of the code:
Someone Leaves Dream
(0:10) When a furre leaves the dream,
(1:81) and the triggering furre is within the diamond (#46,#134) - (#44,#155),
(5:50) set countdown timer #320 to go off in #1 seconds.
(5:50) set countdown timer #321 to go off in #1 seconds.
Someone Idles
(0:72) When a furre remains motionless (doesn't turn, sit, stand or move) for #60 seconds,
(1:81) and the triggering furre is within the diamond (#46,#134) - (#44,#155),
(5:50) set countdown timer #320 to go off in #1 seconds.
(5:50) set countdown timer #321 to go off in #1 seconds.
svidgen
10-18-2009, 06:54 PM
Can't say that I looked through all of that. But, it's interesting stuff.
Mr Initial Man
10-18-2009, 08:49 PM
...Yeah, I should have posted the DS from the color-changing maze. It's a LOT shorter. But this basically asks you to do the Knight's Tour, an old chess puzzle.
Maybe what we're running into is the question if there's a computer language that cannot be used as a Server-Side language that can at all be considered a programming language. You said you could use DragonSpeak which is a very specific programming language. I know SQL can be used as a Server-Side language itself.
JavaServlet
10-18-2009, 09:28 PM
It is very interesting to see what are the most popular server side languages used for developing web sites. Performance, knowledge, requirements, cost, stability and reliability drive the popularity of server sides. The most popular server side selection on WebDeveloper.com (http://www.webdeveloper.com/forum/forumdisplay.php?f=18) is PHP based on threads and posts. Popularity doesnt always mean the best.
Personally I select J2EE and .Net over PHP. For large apps and/or work with web services they have better performance, frameworks and oop compared to the PHP and other scripting languages. Ruby and Python also belong in the mix. ColdFusion is tops among the scripting languages and is easy to learn like PHP. PHP is not on the best list but does have its good points and is great for beginners. I like CakePHP but it doesnt compare to J2EE MVC frameworks.
Java is king of the world for web development and I nominate J2EE as the best server side.
I agree J2EE is the best server side but there are many choices and each has its own advantages. I also like Ruby and it is picking up alot of momentum in the server side world.
Mr Initial Man
10-18-2009, 10:01 PM
All the Server sides seem to get better with time.
Then FORTRAN must be awesome.
opifex
10-18-2009, 10:12 PM
J2EE (Java Platform, Enterprise Edition) is a PLATFORM not a language! Can you handle Java without a platform pus a framework??? I like Java for its speed, but there are sufficient portability problems that need to be overcome. There are great solutions like Geronimo and JBoss, but when you need to rely on application servers and frameworks your code just might not survive unannounced "server updates" that do occur! This applies to other languages as well of course... an upgrade to PHP 5.3 can wreak havoc with code as can an unannounced upgrade to APACHE Server 2.0 (some of your .htaccess gets commented out!), but these can be remedied rather quickly... changes in frameworks and libraries (and Beans) without warning can kill you! SO... frameworks and app servers shouldn't be in the server side "language" mix. At least that's the way I see it.
opifex
10-18-2009, 10:22 PM
Then FORTRAN must be awesome.
FORTRAN and COBOL can be complied to run on APACHE and Windows .NET servers.... hmmm?
FORTRAN is awesome for its number crunching power.
svidgen
10-18-2009, 11:01 PM
... if there's a computer language that cannot be used as a Server-Side language that can at all be considered a programming language.
And of course, I submit that any structural programming language can be used server-side. I think the question we would need to ask is whether a structural programming language is truly a programming language if it is incapable of changing machine state, instruction pointer aside. I submit that a such a language is not truly a programming language. And, I believe that this is a well-known, well-accepted core property of a programming language.
Though, I think your best shot at finding a structural programming language that absolutely can not be used for server side scripting would be to create one. You just need to make sure that it is capable of executing statements in sequence (and therefor has [meaningful] statements to execute), can branch conditionally, and can iterate code until some aspect of the system state changes to or from some value.
I agree J2EE is the best server side but there are many choices and each has its own advantages.
Any justification?
... I think we can all agree at this point that DragonSpeak is the ideal server-side language.
svidgen
10-18-2009, 11:09 PM
I like Java for its speed ...
If you use a caching for PHP (which you should be), you'll probably see performance similar to Java's--probably higher. They both ultimately process bytecodes/opcodes. The different, of course, is that Java comes with the overhead of a much bulkier VM (I think), whereas the PHP "VM" seems to relate more closely with the hardware that it's running on (I think).
There's a tiny hint of speculation and assumption in my "analysis" though. Take it with a grain of salt.
EDIT: I would be very interested to see some empirical data though (well-controlled benchmarks). Though, Java would have to severely outperform opcode-cached PHP to convince me to convert. Something as forcefully OO as Java doesn't seem justifiable for general server-side web development. It seems more well justified for writing specialized daemons, perhaps. But, even then, I may be more inclined to write something in PHP ...
Mr Initial Man
10-18-2009, 11:11 PM
And of course, I submit that any structural programming language can be used server-side.
What are some programming languages that are NOT structural?
opifex
10-18-2009, 11:41 PM
... I think we can all agree at this point that DragonSpeak is the ideal server-side language.
And what about Lisp??? I have actually used it for dynamic pages does work just fine on APACHE with mod_lisp (or with mod_proxy and mod_rewrite for that matter). In all sincerity, I didn't uses PHP until after PHP 4 was available and DID use Lisp for dynamic pages. There are still a few examples available on-line (I think?) OK, it is the second oldest language after FORTRAN (and FORTRAN will out-perform anything for number crunching in a web environment), but it still works fine!
But I really do use PHP these days... it has developed into a really satisfactory language (except fot the buggy-ness of 5.3).:o
svidgen
10-19-2009, 12:17 AM
What are some programming languages that are NOT structural?
See http://en.wikipedia.org/wiki/Declarative_programming
Contrary to some of the content of the above wiki page, I would argue that a "programming" language that is not structural (or any that is not at least imperative) is not truly a programming language at all. However, some of the contributors to Wikipedia felt otherwise--even including things like HTML and CSS as programming language, whereas they are typically referred to as Markup languages (or really anything other than programming languages).
In light of a slightly more broad view of "programming languages" than I imagine most of us are accustomed to, let me clarify my initial statement on being able to run any programming language on the server side.
Any "programming" language which can perform I/O operations can be used as a server-side language. Non-structural languages and those that don't inherently perform I/O or manipulate memory (thus, allowing I/O) require some creativity when porting these languages to platforms which "must" collect output from a program. Of course, the inability to collect output from a program written in language X doesn't indicate that the program isn't "executing" in the sense that it is meant to; but, the sense that it is meant to "execute" isn't necessarily real "execution." That is, it may not be a language qualified to "make things happen."
To illustrate my point, a server-side CSS interpreter could be written; but what would it do exactly?
... is that sensible sounding? Or am I starting to sound wishy washy?
In all sincerity, I didn't uses PHP until after PHP 4 was available ...
I started on Perl. I switched to PHP after running a few benchmarks, which left Perl in the dust. I considered mod_perl--but I was on shared hosting and relying on a language with special requirement to perform well was out of the question. Languages with special requirements to perform on caliber with "everything else" still turn me off.
opifex
10-19-2009, 01:07 AM
including things like HTML and CSS as programming language
Have to agree.... html, xml, and xhtml are markup languages by definition and a style sheet (or template or DTD) is nothing more than a set of instructions interpreted by a browser.
I considered mod_perl--but I was on shared hosting and relying on a language with special requirement
But in those days most APACHE servers were running PHP from mod_php, still CGI. I used a lot of PERL and still do for some things (maybe just because I'm comfortable with it in some areas). I guess I changed over to PHP when I could actually accomplish the same things as I could in PERL and Lisp with less coding or at least with less trouble.
Java has its place and although I am far from a Java expert I can handle it without too much trouble on a case by case basis... usually a site remake where most of the existing coding can be recycled.
This was a pretty decent thread.
Mr Initial Man
10-19-2009, 01:38 AM
Would you agree that XSLT pokes its nose into being a programming language? Certainly makes more sense when you look at it that way.
opifex
10-19-2009, 02:01 AM
Extensible Stylesheet Language Transformations (XSLT) by definition is a language for transforming XML documents into other XML documents (to include xhtml and html documents). It serves NO other purpose and can be done sever side or client side (in modern browsers that are capable). It is a set of instructions that is interpreted and applied ti a document. Is it a language? Of course it is, but it isn't a "programming" language.
...and xslt always confuses me for some reason, that's why I stay away from it!
Mr Initial Man
10-19-2009, 03:34 AM
Extensible Stylesheet Language Transformations (XSLT) by definition is a language for transforming XML documents into other XML documents (to include xhtml and html documents). It serves NO other purpose and can be done sever side or client side (in modern browsers that are capable). It is a set of instructions that is interpreted and applied ti a document. Is it a language? Of course it is, but it isn't a "programming" language.
...and xslt always confuses me for some reason, that's why I stay away from it!
Here's an excerpt from an article in which I compared it to a programming language:
XSLT Is Not HTML Or CSS
While XSLT is a type of XML and XML is by definition a markup language, XSLT has little else in common with HTML. While XSLT is a styling language, it has a little else in common with CSS. Treating it like either HTML or CSS will result in confusion.
Instead, XSLT is more akin to programming languages, such as PHP or JavaScript ― particularly since both of those also have means of extracting data from an HTML or XML file.
It has decision-making structures:
the <if> element (for simple if statements),
and the <choose>, <when> and <otherwise> elements (for "if/else-if/else" statements).
It has a loop, created by the <for-each> element.
It has variables, created by the <variable> element. These are more like user-defined constants, since their values cannot be changed once those values are assigned.
It has subroutines, created by the <template> element, and subroutine calls created by the <apply-templates> element.
It accepts input in the form of an XML file that links to it,
It generates output in the form of a webpage.
Just don't expect to be able to make a game of Pong with it.
However, could it be compiled as a programming language without changing its meaning? I think it could, to be honest.
svidgen
10-19-2009, 10:12 AM
I don't know much about XSLT--but from that brief description, it sounds like it adheres to the requirements of a structured programming language. Though, having never used it, I cannot personally attest to that. And, of course, whether it is best described as a "structured/structural programming language" is another matter ...
Mr Initial Man
10-19-2009, 12:50 PM
I don't know much about XSLT--but from that brief description, it sounds like it adheres to the requirements of a structured programming language. Though, having never used it, I cannot personally attest to that. And, of course, whether it is best described as a "structured/structural programming language" is another matter ...
I don't quite come out and say "It is a programming language." However, it makes a lot more sense when you think about it that way.
Mr Initial Man
02-07-2010, 11:37 AM
Extensible Stylesheet Language Transformations (XSLT) by definition is a language for transforming XML documents into other XML documents (to include xhtml and html documents). It serves NO other purpose and can be done sever side or client side (in modern browsers that are capable). It is a set of instructions that is interpreted and applied ti a document. Is it a language? Of course it is, but it isn't a "programming" language.
...and xslt always confuses me for some reason, that's why I stay away from it!
To be honest, "Stylesheet" seems a bit misleading, since some think it's a hyped-up version of CSS. I've found little in common with the two.
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.