March 15, 2012
"so" <so@so.so> wrote in message news:pwaqudgwudpbcfibihhg@forum.dlang.org...
> On Thursday, 15 March 2012 at 19:35:15 UTC, Nick Sabalausky wrote:
>
>> As for other langauges:
>>
>> Lua is currently *king* for game scripting. It's used all over the gaming
>> industry because it's fast and integrates with C very easily. Personally,
>> I
>> don't like it because it *is* a dynamic langauge. But if you're looking
>> for
>> a dynamic language, well, then there's that.
>
> Not just because i am looking for, how would you code a customizable ui (wow ui for example) without an interpreter? You got no other options AFAIK when it comes to customizable stuff.
>

Anything an interpreter can do, a compiler can do. And dynamic typing doesn't have anything to do with interpreted vs compiled anyway.


March 15, 2012
"H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote in message news:mailman.709.1331842273.4860.digitalmars-d@puremagic.com...
> On Thu, Mar 15, 2012 at 09:15:34PM +0200, Manu wrote:
>> On 15 March 2012 20:59, so <so@so.so> wrote:
> [...]
>> > On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote:
> [...]
>> >> I just talked about D because D rox, but if you are doing it for education, Lisp is a good choice because it is fairly unique.
>> >>
>> >
>> > I'd love to use D but it is not an option is it? At least for the things i am after, say game scripting.
>>
>>
>> I dunno, that sounds like a pretty interesting idea to me! :)
>
> It certainly is, though it does bring up the problem of what to do if the game scripting is editable at runtime. Does that mean we'll need to bundle a D compiler with the game? Doesn't seem practical.
>

Why not?


March 15, 2012
On 3/15/12 3:12 PM, Nick Sabalausky wrote:
> Anything an interpreter can do, a compiler can do. And dynamic typing
> doesn't have anything to do with interpreted vs compiled anyway.

Generating and running code during runtime is often easier in interpreted environments.

Andrei

March 15, 2012
On Thursday, 15 March 2012 at 14:55:20 UTC, H. S. Teoh wrote:

> Bash?? Are you serious?!

It is terrible as a programming language, I will give you that. But in terms of something useful to learn, it has been. But I would say if it is going to take up more than a screen (terminal size) then I'll be using D.
March 15, 2012
On Thu, Mar 15, 2012 at 03:24:24PM -0400, Nick Sabalausky wrote: [...]
> - If you can stomach the indent-scoping, Python is very well-regarded and has a lot of fancy advanced features.

I used to despise Python's indent-scoping too, though since then I've had some opportunity to use Python for build scripts (google for SCons), and I have to say that it certainly has its own kind of beauty to it. You never have to worry about closing blocks in if statements and the like, for example, and you never have subtle bugs like:

	auto func(bool x) {
		int y=0;
		if (x)
			y = 1;
			writeln("x is true");

		return y;
	}

But I certainly sympathize with the WAT sentiment when one first learns that Python has indent scoping. :-)


[...]
> - If you're looking for the most painful dynamic experince imaginable, ActionScript2 should be at the top of your list. Make sure to use all-Adobe tools, and the newest versions of each, so the whole experience will be *truly* unbearable.

Shouldn't that be ActionScript3?

(And no, I would not touch any of this stuff with a 10-foot pole.)


> I admit though, I'm not very familiar with the extent of the metaprogramming abilities of any of those languages.
[...]

I can't say I'm familiar with all the languages you listed either, but in my limited experience, I find that D's metaprogramming capabilities outright beats every other language I know by a loooong shot.

C++ seems to come farther than most other languages, but its horrible template syntax is just ... unpalatable. I mean, before C++11, even something as straightforward as vector<vector<int>> is a syntax error. How ridiculous is that?!  Nevermind the dubious wisdom of using <> for template arguments in the first place (try, e.g., a template with bool arguments that you want to instantiate with expressions that have comparison operators).  Sure, C++ templates are Turing-complete. They're also Turing tarpits for anything except the most trivial uses.

D templates + CTFE rox the sox off C++ any day.

(P.S. From what I heard, Lisp trumps D in metaprogramming abilities, but I don't know Lisp so I can't comment on that.)


T

-- 
Windows 95 was a joke, and Windows 98 was the punchline.
March 15, 2012
On Thu, Mar 15, 2012 at 04:13:42PM -0400, Nick Sabalausky wrote:
> "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote in message news:mailman.709.1331842273.4860.digitalmars-d@puremagic.com...
> > On Thu, Mar 15, 2012 at 09:15:34PM +0200, Manu wrote:
> >> On 15 March 2012 20:59, so <so@so.so> wrote:
> > [...]
> >> > On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote:
> > [...]
> >> >> I just talked about D because D rox, but if you are doing it for education, Lisp is a good choice because it is fairly unique.
> >> >>
> >> >
> >> > I'd love to use D but it is not an option is it? At least for the things i am after, say game scripting.
> >>
> >>
> >> I dunno, that sounds like a pretty interesting idea to me! :)
> >
> > It certainly is, though it does bring up the problem of what to do if the game scripting is editable at runtime. Does that mean we'll need to bundle a D compiler with the game? Doesn't seem practical.
> >
> 
> Why not?
[...]

So your game will have to ship with dmd and optlink bundled?


T

-- 
"The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again."
March 15, 2012
On 16 March 2012 09:38, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> (P.S. From what I heard, Lisp trumps D in metaprogramming abilities, but I don't know Lisp so I can't comment on that.)

Greenspun's Tenth Law states that any time a programming language adds a new feature, it moves closer to becoming a poorly-made Lisp.

While this is obviously slight hyperbole, Lisp is ridiculous in how you can pretty much just add new features to language using the language itself. The syntax is weird, but I guess its just one of those "You just get used to it" things.

For example, CLOS is the Common Lisp Object System, and provides OO in Lisp. It is written /in/ Lisp. It supports all of the traditional polymorphism and encapsulation and all that, but also provides support for extending objects by defining before and after methods, fine grained control of how parent functions get called, all sorts of things like that.

And while people talk about Lisp's macros, they often don't even realise that Lisp's macros are actually just one part of set of tools for generic programming and language extension.

The only thing that drove me off Lisp is how different the development process is to regular programming. It uses image-based development, rather than source-based, and I still don't get how that's supposed to work. Some things are fairly esoteric, things like cons lists, car and cdr, I don't really get it, and the mental hurdle is ridiculous.

On top of that, there is surprisingly little newbie-friendly documentation on it. There are tutorials and all that, but most focus on the language, not the development process. It gets really hard to figure out what to do when the interpreter is giving you some strange message and asking you a question that you don't understand.

Well that's my experience with Lisp.

--
James Miller
March 15, 2012
On Thu, 15 Mar 2012 03:09:37 -0400, so <so@so.so> wrote:

> Hello,
>
> Not related to D but this is a community which i can find at least a few objective person. I want to invest some "quality" time on a dynamic language but i am not sure which one. Would you please suggest one?
>
> To give you an idea what i am after:
> Of all one-liners i have heard only one gets me.
> "The programmable programming language". Is it true? If so Lisp will be my first choice.

This may be a throw-away suggestion, because I've never used it (I don't know the quality/stability of it), but Jarrett Billingsly used to be a very active part of the D community, and he had a dynamic language kind of like D called miniD.  It's now called croc.

http://jfbillingsley.com/croc/wiki

It's actually written in D (I think in D1).

-Steve
March 15, 2012
Ruby, hands down.

- Strong OO language. I believe it was partially based on smalltalk.
- The Object model is very well done, every thing is a first-class object.
- Meta-programming is easy to do
- has good support in IDEs like eclipse and RubyMine
- the gem library is huge and comprehensive - might be very close to CPAN
and Python's.
- concise, simple language with little in the way of "grammar bling" (but
check out
http://chris-schmitz.com/ruby-question-marks-and-exclamation-points/  )
- some good frameworks/tools/utilities out there like Ruby on Rails, Rake,
scons, rdoc, etc
- good community support (rubyforge.org)
- some oddball, niche things out there too
     - JRuby to write GUI applications. Runs on the JVM and has access to
the JDK classes like Swing, AWT, etc.
     - Ruby over JRuby on Android
http://gonegoogling.com/2010/08/30/get-ready-to-ditch-java-creating-android-applications-with-ruby-using-ruboto/

Downside: the name. "ruby" means something to the outside world, expect google to bring you to jewelry stores, restaurants and Pokemon sites.

John


March 15, 2012
On 16 March 2012 04:28, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:
> Relevant insight: http://existentialtype.wordpress.com/2011/03/19/dynamic-languages-are-static-languages/
>
> Andrei

That was a cool article. The comments are amusing, all the people not really understanding the point.

"e.g. if you change some type in your Haskell code, you have to fix every use of that type before you can test anything. Surely you’ve found that annoying?”, *cough*Type Inference*cough*.

Even D has type inference through auto.

--
James Miller