From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83812 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: problem with lua io.lines Date: Wed, 14 Aug 2013 17:12:20 +0200 Message-ID: <520B9E54.8010007@wxs.nl> References: <520B9BA8.8080302@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1376494121 9664 80.91.229.3 (14 Aug 2013 15:28:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Aug 2013 15:28:41 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 14 17:28:44 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V9d06-0007vb-0s for gctc-ntg-context-518@m.gmane.org; Wed, 14 Aug 2013 17:28:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5B8AE10234; Wed, 14 Aug 2013 17:27:45 +0200 (CEST) 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 cb6h4JE8R0II; Wed, 14 Aug 2013 17:27:34 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 3ED0710208; Wed, 14 Aug 2013 17:27:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 670A810208 for ; Wed, 14 Aug 2013 17:27:33 +0200 (CEST) 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 bfeKz6z1RzV4 for ; Wed, 14 Aug 2013 17:27:32 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 532F510206 for ; Wed, 14 Aug 2013 17:27:32 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (dsl-087-195-130-164.solcon.nl [87.195.130.164]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r7EFSQVZ003600 for ; Wed, 14 Aug 2013 17:28:26 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 1464-1713362 for ; Wed, 14 Aug 2013 17:12:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <520B9BA8.8080302@wxs.nl> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=87.195.130.164; country=NL; latitude=52.5000; longitude=5.7500; http://maps.google.com/maps?q=52.5000,5.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01KcDsqXy - 85304f179701 - 20130814 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:83812 Archived-At: On 8/14/2013 5:00 PM, Hans Hagen wrote: > On 8/14/2013 4:43 PM, Henning Hraban Ramm wrote: >> >> Am 2013-08-14 um 20:15 schrieb Wolfgang Schuster >> : >> >>>> Current beta MkIV seems to have a bug in the Lua function io.lines: btw, it's a lua issue, not related to luatex ... local myfile = "myfile.txt" for myline in io.lines(myfile) do logs.report("test 1",myline) end for myline in io.lines(myfile,3) do logs.report("test 2",myline) end for myline in io.lines(myfile,1) do logs.report("test 2",myline) end for myline in io.lines(myfile,0) do logs.report("test 2",myline) end for myline in io.lines(myfile,-1) do logs.report("test 2",myline) end the zero case loops and the last case gives a "memory allocation error: block too big" so these can be considered buglets in lua Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________