From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64611 Path: news.gmane.org!not-for-mail From: "Philipp A." Newsgroups: gmane.comp.tex.context Subject: Re: why lua? Date: Sat, 18 Dec 2010 01:50:29 +0100 Message-ID: References: <20101217232724.GA17742@aides> <4D0BF64D.1090406@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1570354189==" X-Trace: dough.gmane.org 1292633444 23404 80.91.229.12 (18 Dec 2010 00:50:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 18 Dec 2010 00:50:44 +0000 (UTC) Cc: Philipp Gesang To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 18 01:50:39 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTl0Q-0004s0-OW for gctc-ntg-context-518@m.gmane.org; Sat, 18 Dec 2010 01:50:38 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EFE38CA918; Sat, 18 Dec 2010 01:50:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RE3D6g6QTuVd; Sat, 18 Dec 2010 01:50:35 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1B63DCA915; Sat, 18 Dec 2010 01:50:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E8793CA915 for ; Sat, 18 Dec 2010 01:50:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZE-S5fCltFQ5 for ; Sat, 18 Dec 2010 01:50:31 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 70931CA8BF for ; Sat, 18 Dec 2010 01:50:31 +0100 (CET) Original-Received: from mail-wy0-f169.google.com (mail-wy0-f169.google.com [74.125.82.169]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBI0oUx5026960 for ; Sat, 18 Dec 2010 01:50:30 +0100 Original-Received: by wyj26 with SMTP id 26so1233265wyj.14 for ; Fri, 17 Dec 2010 16:50:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=n/4b8quCetk8HAYknNT2bHjVLVvgDlYkqobh5H1FPrM=; b=DE5mlTwdmixI3kM+9kjHXNczCTxDvmNq45vlOYdpTUm/+IbzN98casT/Hh63u7xKPr jBPScUCC8jsUI/ZeBh4dmfgANOJh3O+vt7nj8aQn8U9LdKzmDgw5HTiymAmYhy0CoIJr z1z9MwBCrO9W7U/LVgKJk9kgmnT1Y5dYp9O2E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=CrlVAY9dysVK2yqwdaoq1kA68yIn83+rPLqKZ+4KhkWqrpjsgMIJwpDvb+xwtpS+Y0 lhGfotU0NHavjzFfjIpQb40/DcFsdNQCr5v7IPmBQnVq1ZO5UaFRdZ1UC+gHclh1L+QE qZFqPpCKHjtyCUM0JTc2cL1iGDAiBgZs0WDrs= Original-Received: by 10.227.179.141 with SMTP id bq13mr950510wbb.149.1292633429903; Fri, 17 Dec 2010 16:50:29 -0800 (PST) Original-Received: by 10.227.72.201 with HTTP; Fri, 17 Dec 2010 16:50:29 -0800 (PST) In-Reply-To: <4D0BF64D.1090406@wxs.nl> X-Google-Sender-Auth: ZMx9kUhHpuEweEV9_aql_LvR6dE X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eDIoOuBf - 62206d8d6895 - 20101218 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:64611 Archived-At: --===============1570354189== Content-Type: multipart/alternative; boundary=00248c0ee65c6a0adc0497a4ac62 --00248c0ee65c6a0adc0497a4ac62 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hans, some of the things you said are a bit unclear to me: 2010/12/18 Hans Hagen > Ah .. the extending vs the embedding debate ... well, an argument could > have been that we don't want to extend python -) > see last paragraphs. I've only used Pascal, Modula2, Perl (after all that compiling and linking = I > loved the scripting aspect but the language ... well ...), Ruby (brought = me > back happy Modula memories but it got so huge and had incompatible update= s > but is still my second choice), but I feel quite happy with Lua now. > give python a try. i love it because it has the writability of perl without (de)referencing and funny symbols, and a class system like java/c++/=E2=80= =A6 (no prototyping and stuff) well, i just like it. and since i don=E2=80=99t know lua (well, that=E2=80= =99s not exactly true, but i can=E2=80=99t write a normal sized script without looking thing= s up), and tend to do things like i would do them in other languages i know. e.g.: how do you loop elegantly over table values? =E2=80=9Cfor k,v in pairs(t) d= o print(v) end=E2=80=9D creates a throwaway variable k, which doesn=E2=80=99t seem rig= ht. some things are totally counter-intuitive for me like tables beginning with index 1, an= d so on. so i guess it=E2=80=99s natural that i would like to use a scripting langua= ge i know and like, like python. Anyhow, I don't like languages that need religious arguments to become > popular. like=E2=80=A6 which one? i only know of the tabs vs. spaces and vim vs. ema= cs religious wars. i can=E2=80=99t remember of any languages being subdued to = that. or are you talking about lua having been invented at a catholic university and thus being a product of a sect somehow? Hans > what i want to show you is kross . kross is the project for bringing consistent scripting to KDE, and it is just awesome, since it allows you to write stuff in the scripting language of your choice. my dream for luatex/context would be a built-in lua interpreter (because lu= a is so fucking small) and optional modules for other, heavier, scripting languages (perl, ruby), which you don=E2=80=99t have to install. i don=E2= =80=99t care if python is embedded or extended, i just want to write \directpython{for num in [9,2,4,8]: ctx.print(num**3)} (or sth. like that) but don=E2=80=99t get me wrong, i love context and luatext, i just like oth= er languages better than lua (you weren=E2=80=99t content with latex and creat= ed context, so this shouldn=E2=80=99t be alien to you) --00248c0ee65c6a0adc0497a4ac62 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
hans, some of the things you said are a bit uncl= ear to me:

2010/12/18 Hans Hagen <pragma@wxs.nl>
Ah .. the extending vs the embedding debate ... well, an argument could hav= e been that we don't want to extend python -)

= see last paragraphs.

I've only used Pascal, Modula2, Perl (after all that compiling and link= ing I loved the scripting aspect but the language ... well ...), Ruby (brou= ght me back happy Modula memories but it got so huge and had incompatible u= pdates but is still my second choice), but I feel quite happy with Lua now.=

give python a try. i love it because it has the writa= bility of perl without (de)referencing and funny symbols, and a class syste= m like java/c++/=E2=80=A6 (no prototyping and stuff)

well, i just li= ke it. and since i don=E2=80=99t know lua (well, that=E2=80=99s not exactly= true, but i can=E2=80=99t write a normal sized script without looking thin= gs up), and tend to do things like i would do them in other languages i kno= w. e.g.: how do you loop elegantly over table values? =E2=80=9Cfor k,v in pairs(t) do print(v) end=E2=80=9D create= s a throwaway variable k, which doesn=E2=80=99t seem right. some things are= totally counter-intuitive for me like tables beginning with index 1, and s= o on.

so i guess it=E2=80=99s natural that i would like to use a scripting la= nguage i know and like, like python.

Anyhow, I don't like languages that need religious arguments to become = popular.

like=E2=80=A6 which one? i only know of the t= abs vs. spaces and vim vs. emacs religious wars. i can=E2=80=99t remember o= f any languages being subdued to that.

or are you talking about lua having been invented at a catholic univers= ity and thus being a product of a sect somehow?

Hans

what i want to show you is kross.
kross is the pro= ject for bringing consistent scripting to KDE, and it is just awesome, sinc= e it allows you to write stuff in the scripting language of your choice.
my dream for luatex/context would be a built-in lua interpreter (becaus= e lua is so fucking small) and optional modules for other, heavier, scripti= ng languages (perl, ruby), which you don=E2=80=99t have to install. i don= =E2=80=99t care if python is embedded or extended, i just want to write \di= rectpython{for num in [9,2,4,8]: ctx.print(num**3)} (or sth. like that)

but don=E2=80=99t get me wrong, i love context and luatext, i just like= other languages better than lua (you weren=E2=80=99t content with latex an= d created context, so this shouldn=E2=80=99t be alien to you)
--00248c0ee65c6a0adc0497a4ac62-- --===============1570354189== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1570354189==--