Exploring Some Lesser-Known Scripting Languages 60
Nerval's Lobster writes: Scripting languages are used in everything from games and Web pages to operating-system shells and general applications, as well as standalone scripts. While many of these scripting languages are common and open to modification, there are some interesting, open-source ones that are worth a look, even if they don't have the substantial audience of some of the popular ones. Wren, Candle, Fancy, Pikt, and PPL all show what a single developer can do if they set out with enough motivation to create open-source scripting languages. The results often prove surprisingly powerful.
DICE disclaimer (Score:1)
Why does the first paragraph have to contain the word JOB??
Re: (Score:2)
Opportunity, though friendlier to the ear, takes longer to type.
The best part? (Score:4, Funny)
The little bit at the bottom of the page that says "Related Jobs: Could not get related jobs".
Oooh is this free "Promote Your Language Day?" (Score:4, Interesting)
http://chaiscript.com/ [chaiscript.com]
Been working on it for over 5 years now. Stable and easy to use scripting for your C++ application.
Re:Oooh is this free "Promote Your Language Day?" (Score:4, Interesting)
Chaiscript looks interesting - something like what I would have probably designed for a language if I was writing one from scratch. I'm currently using Lua for my game engine, but integrating the raw C API with C++ requires a lot of ugly boilerplate code.
A question while you're here - one of the most useful features of Lua for game development (at least for me) is the support for co-routines. Each lua script (or "chunk") can have it's own stack, and can therefore suspend execution and resume later. This allows a script to sleep for a specified period of time, for example, giving the appearance of being threaded without actually requiring each script to execute on a real thread - which would be far too much overhead.
This enables me to write simple Lua scripts like:
DoSomething()
Sleep(5)
DoSomethingElse()
Is there a way to do something similar in Chaiscript? Note: it takes a bunch of external C++ code to be able to pull this off in Lua as well, so doing it via external code is fine.
Re: (Score:1)
Hmm... each function call has its own stack, but individual scripts do not. The scripting engine itself is quite self contained (no singletons of any kind), so you could instantiate multiple engines, but that would get heavy handed...
I'll think about it and see what the possibilities are.
I've created this discourse topic to discuss the options http://discourse.chaiscript.co... [chaiscript.com] feel free to chime in.
Re: (Score:2)
Who supports it (Score:5, Interesting)
What shot it down? My boss telling me "we have a thousand engineers world-wide who know perl, and you 6 will be the Python experts. You really wanna support a thousand engineers learning Python over the next 5 years?"
Re: (Score:2)
Re: (Score:1)
It's rational to make decisions based on what is currently known. It's hard to predict future popularity of tools. Merit alone won't tell you what clicks with the masses.
Re: (Score:3)
Re: (Score:2)
Re:Who supports it (Score:5, Interesting)
I switched from Perl to Python immediately after I discovered Python. Ironically, I first heard of Python when it was offhandedly mentioned in the book "Advanced Perl Programming." In Perl, I had developed the habit of writing a comment for nearly every line of code - much as most assembly programmers do. Python had similar semantics but much better syntax. It practically documents itself if you do it right. I never did figure out Perl's object syntax (bless, 'em), but objects are easy in Python.
When I first learned Python, there were lots of Perl books on the shelf in the tech section of any large bookstore, and just a couple of Python books. As a Python fan, I was hoping it would catch on, and couldn't figure out why it wasn't taking the world by storm. Perl was the dominant player in CGI at that time, which made it a big thing. Over the years, I kept taking my little bookshelf polls every now and then, and the ratio changed. Turns out it just took awhile. Now, there are very few Perl books and lots of Python books.
Thank you, Python. Oh, and thank you, Perl 6.
Re:Who supports it (Score:4, Interesting)
As a Python fan, I was hoping it would catch on, and couldn't figure out why it wasn't taking the world by storm. Perl was the dominant player in CGI at that time, which made it a big thing. Over the years, I kept taking my little bookshelf polls every now and then, and the ratio changed. Turns out it just took awhile. Now, there are very few Perl books and lots of Python books.
I think the problem was that the world didn't migrate from Perl CGI to a better CGI language; it went from CGI to PHP/Coldfusion/ASP, and python wasn't really relevant there. It wasn't until the flaws in those sort of systems became apparent, and OO, MVC frameworks like Django, Web2py, Pylons, etc, came into their own that python started appealing to the masses.
Re: (Score:1)
Python had similar semantics but much better syntax. It practically documents itself if you do it right.
True for almost any programming language including Perl.
Re: (Score:2)
I'm not sure I $_ what you mean.
Re: (Score:2)
Plus a million points for referring to the "underscore is understood" mnemonic.
[applause.gif]
Re: (Score:2)
Re: (Score:2)
$_ = 'Dagnabb';
'$_it! I guess that proves the old adage that "you can write Perl in any language"';
Re: (Score:2)
Yup. Before Python Pascal was thought of as the language that was extremely readable; it was nearly like programming in pseudo code (hah, it was actually that a cleaner version of Pascal was used in several textbooks on algorithms). However, years ago when I had to port Pascal to Perl (no, I am not making this up) I came upon hundreds of lines of very hard to read code. After some careful study I discovered that someone had coded bubble sort (in a very weird, long winded way) with a separate piece of code t
Re: (Score:2)
Sure you can write readable and maintainable Perl.
But most people don't.
The same is true of PHP. It can be organized and elegant, but I've yet to have to maintain a single PHP or Perl application that didn't take longer to figure out than it would have to just rewrite the damned thing from scratch.
Even Erlang is subject to "experts" using obscure syntax and constructs to save a couple of lines, sacrificing readability and maintainability.
The problem is rarely the language; the problem is "develope
Re: (Score:2)
using obscure syntax and constructs to save a couple of lines, sacrificing readability and maintainability.
But that's one of the paradoxes. Saving a couple of lines reduces eye clutter. What's obscure to you may be obvious to an expert in that language. Shorter is usually better.
What makes Perl difficult to read is the same thing that brought Perl to prominence, the regular expressions. People went nuts for regular expressions, and overused them. The Camel book warns readers about that. People are used to skimming through code quickly, because so much of it really is boilerplate. But you can't quickly s
Re: (Score:2)
Sure you can write readable and maintainable Perl.
But most people don't.
the problem is "developers" that have never had to maintain someone else's code often enough to understand the value of readability and maintainability.
The same is true of Python (and most other languages for that matter).
Re: (Score:2)
Re: (Score:2)
As someone who has written in at least a dozen languages, I do not understand arguments that "python is easier to read" at all. The way python wants to use indentation to indicate blocks of code is much more difficult to read for anything of modest complexity. With standard tab widths it wastes too much screen space, and with smaller tab widths it becomes impossible to follow moderately complex code. There's a reason why almost every other language on the planet has some sort of block delimiters.
Also, py
Re: (Score:3)
The way python wants to use indentation to indicate blocks of code is much more difficult to read for anything of modest complexity.
At the abstract level, I understand why people have trouble with the idea that whitespace is significant in Python (I'm one of them). But after using it for a few years now, I've realized that if you don't indent your code the same way in Python as you would in any other language anyway, you're almost certainly doing something wrong.
Re: (Score:2)
At the abstract level, I understand why people have trouble with the idea that whitespace is significant in Python (I'm one of them). But after using it for a few years now, I've realized that if you don't indent your code the same way in Python as you would in any other language anyway, you're almost certainly doing something wrong.
Yes -- if your code in C etc is not indented for human readability, then it is open to misinterpretation. This is true.
On a conceptual level, Python's whitespace is a mess, though, because it breaks code encapsulation. Consider this:
In C, each block knows nothing about its nesting level. It is a block: it knows its namespace, and it knows its contents. It does not need to know anything more than this, so we don't tell it anything more than this.
With sematic whitespace, however, the level of nesting of block
Re: (Score:2)
LOL ... that pretty much sums up my first exposure to Python in the late 90s.
Our product had libraries written in C, and we had some limited support for Tcl/Tk (hey, it was 97 or something like that).
One of the guys in professional services proceeded to start writing a whole bunch of stuff in Python and created his own interface to our C stuff. We told him we didn't support Python, and told him the limitations of the library.
He kept writing stuff in Python, and ignored the limitations of our library. We k
Re: (Score:2)
Instant R.Y.O. language? (Score:3)
How about a "language" that makes it easy to generate a language how I personally want it so that I'm not stuck with somebody else's goofy preferences:
http://www.c2.com/cgi/wiki?Ins... [c2.com]
Re: (Score:3)
Re: (Score:3)
If you had a language-generator as you suggest, then you could automatically convert the source code to match the preferred language of each user on checkout. It would be easy.
C++ (Score:4, Informative)
my favorite (Score:2)
.bat
Maybe that's why I'm depressed.
Comment removed (Score:3)
Could not get related jobs. (Score:1)
REBOL (Score:1)
Is now open source under the Apache 2.0 license. If you haven't tried it, you should.
There are many examples available here: www.rebol.net/cookbook/
It took me a couple of minutes to come up with a one line script that would test a group of webservers and if any were down, email an alert message to a list of people.
Pretty nifty.