* Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
@ 2015-02-23 0:10 Akira Kakuto
2015-02-23 5:32 ` Jaroslav Hajtmar
0 siblings, 1 reply; 11+ messages in thread
From: Akira Kakuto @ 2015-02-23 0:10 UTC (permalink / raw)
To: ntg-context
> The point is that Pablo Rodriguez use Fedora 20, which comes with Lua-5.2.2.
I think TeX Live 2014 uses Lua-5.2.3 on all platforms.
I don't know differences between 5.2.2 and 5.2.3.
Current windows version of standalone ConTeXt also uses 5.2.3.
Best,
Akira
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-23 0:10 Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7) Akira Kakuto
@ 2015-02-23 5:32 ` Jaroslav Hajtmar
0 siblings, 0 replies; 11+ messages in thread
From: Jaroslav Hajtmar @ 2015-02-23 5:32 UTC (permalink / raw)
To: ntg-context
Akira, thanx for reply.
Jaroslav
Dne 23.2.2015 v 1:10 Akira Kakuto napsal(a):
>> The point is that Pablo Rodriguez use Fedora 20, which comes with
>> Lua-5.2.2.
>
> I think TeX Live 2014 uses Lua-5.2.3 on all platforms.
> I don't know differences between 5.2.2 and 5.2.3.
> Current windows version of standalone ConTeXt also uses 5.2.3.
>
> Best,
> Akira
>
> ___________________________________________________________________________________
>
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-24 13:13 ` Jaroslav Hajtmar
@ 2015-02-24 13:46 ` Hans Hagen
0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2015-02-24 13:46 UTC (permalink / raw)
To: hajtmar, mailing list for ConTeXt users
On 2/24/2015 2:13 PM, Jaroslav Hajtmar wrote:
> This library is loaded automatically? Or as a module?
always present
> local mycsvsplitter = utilities.parsers.rfc4180splitter()
local mycsvsplitter = utilities.parsers.rfc4180splitter {
separator = ";"
quote = '"',
}
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-23 8:49 ` Hans Hagen
2015-02-23 9:25 ` Jaroslav Hajtmar
@ 2015-02-24 13:13 ` Jaroslav Hajtmar
2015-02-24 13:46 ` Hans Hagen
1 sibling, 1 reply; 11+ messages in thread
From: Jaroslav Hajtmar @ 2015-02-24 13:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Hans.
One more I ask You about this thing. When I have other separator - for
example ";" then c.txt data file is:
first,second,third,fourth
"1";"2";"3";"4"
"a";"b";"c";"d"
"foo";"bar""baz";"boogie";"xyzzy"
I was unable to figure out how to set the separator (and others default
values too) so as to replace the default value in the library util-prs.lua
Is there anything as utilities.parsers.rfc4180splitter.separator=";"???
This library is loaded automatically? Or as a module?
Thanks Jaroslav Hajtmar
Here is minimal example for Your correction:
\starttext
\startluacode
local mycsvsplitter = utilities.parsers.rfc4180splitter()
utilities.parsers.rfc4180splitter.separator=";"
local crap = io.loaddata("c.txt")
local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
context.starttabulate { "|l|r|" }
for i=1,#list do
local l = list[i]
context.NC() context(l[1])
context.NC() context(l[3])
context.NC()
context.NR()
end
context.stoptabulate()
\stopluacode
\stoptext
Dne 23.2.2015 v 9:49 Hans Hagen napsal(a):
> On 2/22/2015 9:42 PM, Pablo Rodriguez wrote:
>> On 02/22/2015 07:44 PM, Hans Hagen wrote:
>>> [...]
>>> for pablo: there are csv scanners built in context
>>
>> Hans,
>>
>> I don’t really need this at home, but I’m interested in this.
>
> in addition to the previous mail, t.txt is:
>
> first,second,third,fourth
> "1","2","3","4"
> "a","b","c","d"
> "foo","bar""baz","boogie","xyzzy"
>
> the code is in util-prs.lua (where all kind of parsing code lives)
>
> if you want to use that kind of code outside context you can do
> something like this:
>
> lua mtxlibs.lua --selfmerge foo.lua
>
> and then in your script load foo.lua
>
> this makes it possible to use the same set of helpers in context as
> well outside it (alternatively you can just use luatex as lua engine
> and mtxrun as script runner which is what we mostly do); this means
> that the context distribution provides all kind of means to set up
> workflows
>
>> I guess you mean m-database.mkiv. But I don’t have a clue on how to
>> handle it.
>>
>> I mean, how to ignore the first line and how to make commands from the
>> so-called cells (A2, B5...; to use them in document combination) reading
>> an external file.
>>
>> Many thanks for your help,
>>
>> Pablo
>>
>
>
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-23 8:49 ` Hans Hagen
@ 2015-02-23 9:25 ` Jaroslav Hajtmar
2015-02-24 13:13 ` Jaroslav Hajtmar
1 sibling, 0 replies; 11+ messages in thread
From: Jaroslav Hajtmar @ 2015-02-23 9:25 UTC (permalink / raw)
To: ntg-context
Thanks for showing options in last mails. This is for me very
interesting news, and certainly it will be very useful and inspirative
for me.
Jaroslav Hajtmar
Dne 23.2.2015 v 9:49 Hans Hagen napsal(a):
> in addition to the previous mail, t.txt is:
>
> first,second,third,fourth
> "1","2","3","4"
> "a","b","c","d"
> "foo","bar""baz","boogie","xyzzy"
>
> the code is in util-prs.lua (where all kind of parsing code lives)
>
> if you want to use that kind of code outside context you can do
> something like this:
>
> lua mtxlibs.lua --selfmerge foo.lua
>
> and then in your script load foo.lua
>
> this makes it possible to use the same set of helpers in context as
> well outside it (alternatively you can just use luatex as lua engine
> and mtxrun as script runner which is what we mostly do); this means
> that the context distribution provides all kind of means to set up
> workflows
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-22 20:42 ` Pablo Rodriguez
2015-02-23 8:36 ` Hans Hagen
@ 2015-02-23 8:49 ` Hans Hagen
2015-02-23 9:25 ` Jaroslav Hajtmar
2015-02-24 13:13 ` Jaroslav Hajtmar
1 sibling, 2 replies; 11+ messages in thread
From: Hans Hagen @ 2015-02-23 8:49 UTC (permalink / raw)
To: ntg-context
On 2/22/2015 9:42 PM, Pablo Rodriguez wrote:
> On 02/22/2015 07:44 PM, Hans Hagen wrote:
>> [...]
>> for pablo: there are csv scanners built in context
>
> Hans,
>
> I don’t really need this at home, but I’m interested in this.
in addition to the previous mail, t.txt is:
first,second,third,fourth
"1","2","3","4"
"a","b","c","d"
"foo","bar""baz","boogie","xyzzy"
the code is in util-prs.lua (where all kind of parsing code lives)
if you want to use that kind of code outside context you can do
something like this:
lua mtxlibs.lua --selfmerge foo.lua
and then in your script load foo.lua
this makes it possible to use the same set of helpers in context as well
outside it (alternatively you can just use luatex as lua engine and
mtxrun as script runner which is what we mostly do); this means that the
context distribution provides all kind of means to set up workflows
> I guess you mean m-database.mkiv. But I don’t have a clue on how to
> handle it.
>
> I mean, how to ignore the first line and how to make commands from the
> so-called cells (A2, B5...; to use them in document combination) reading
> an external file.
>
> Many thanks for your help,
>
> Pablo
>
--
-----------------------------------------------------------------
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-22 20:42 ` Pablo Rodriguez
@ 2015-02-23 8:36 ` Hans Hagen
2015-02-23 8:49 ` Hans Hagen
1 sibling, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2015-02-23 8:36 UTC (permalink / raw)
To: ntg-context
On 2/22/2015 9:42 PM, Pablo Rodriguez wrote:
> On 02/22/2015 07:44 PM, Hans Hagen wrote:
>> [...]
>> for pablo: there are csv scanners built in context
>
> Hans,
>
> I don’t really need this at home, but I’m interested in this.
there are several variants, here is one:
\starttext
\startluacode
local mycsvsplitter = utilities.parsers.rfc4180splitter()
local crap = io.loaddata("c.txt")
local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
context.starttabulate { "|l|r|" }
for i=1,#list do
local l = list[i]
context.NC() context(l[1])
context.NC() context(l[3])
context.NC()
context.NR()
end
context.stoptabulate()
\stopluacode
\stoptext
> I guess you mean m-database.mkiv. But I don’t have a clue on how to
> handle it.
>
> I mean, how to ignore the first line and how to make commands from the
> so-called cells (A2, B5...; to use them in document combination) reading
> an external file.
>
> Many thanks for your help,
>
> Pablo
>
--
-----------------------------------------------------------------
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-22 18:44 ` Hans Hagen
2015-02-22 19:40 ` Jaroslav Hajtmar
@ 2015-02-22 20:42 ` Pablo Rodriguez
2015-02-23 8:36 ` Hans Hagen
2015-02-23 8:49 ` Hans Hagen
1 sibling, 2 replies; 11+ messages in thread
From: Pablo Rodriguez @ 2015-02-22 20:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 02/22/2015 07:44 PM, Hans Hagen wrote:
> [...]
> for pablo: there are csv scanners built in context
Hans,
I don’t really need this at home, but I’m interested in this.
I guess you mean m-database.mkiv. But I don’t have a clue on how to
handle it.
I mean, how to ignore the first line and how to make commands from the
so-called cells (A2, B5...; to use them in document combination) reading
an external file.
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-22 18:44 ` Hans Hagen
@ 2015-02-22 19:40 ` Jaroslav Hajtmar
2015-02-22 20:42 ` Pablo Rodriguez
1 sibling, 0 replies; 11+ messages in thread
From: Jaroslav Hajtmar @ 2015-02-22 19:40 UTC (permalink / raw)
To: ntg-context
Hans, thanks for the reply. You write about the embedded CSV scanner. I
was looking at contextgarden and on the Internet too, but I did not
found any information about this.
Can you, please, about built-in scanner CSV say more (link, minimal
example etc.)? This thing interests me very much...
Thanks
Jaroslav Hajtmar
Dne 22.2.2015 v 19:44 Hans Hagen napsal(a):
> On 2/22/2015 7:36 PM, Jaroslav Hajtmar wrote:
>> Hi ConTeXist...
>> How can I find out what version of Lua uses ConTeXt TeXlive 2014
>> respectively what version of Lua uses Standalone ConTeXt?
>> The point is that Pablo Rodriguez use Fedora 20, which comes with
>> Lua-5.2.2. Pablo tested last version of my module ScanCSV and his
>> current version of standalone ConTeXt gained mistake, while I compiled
>> (with the same current version of Standalone under Win7) the same source
>> code without error ....
>>
>> Error message from log file is:
>>
>> t-scancsv-2015-02-19.lua:81: assertion failed!
>> stack traceback:
>> [C]: in function 'assert'
>> t-scancsv-2015-02-19.lua:81: in function 'ParseCSVLine'
>> t-scancsv-2015-02-19.lua:123: in function 'parsecsvdata'
>> t-scancsv-2015-02-19.lua:180: in function 'opencsvfile'
>> [\directlua]:1: in main chunk
>
> _VERSION
>
> for pablo: there are csv scanners built in context
>
> -----------------------------------------------------------------
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
2015-02-22 18:36 Jaroslav Hajtmar
@ 2015-02-22 18:44 ` Hans Hagen
2015-02-22 19:40 ` Jaroslav Hajtmar
2015-02-22 20:42 ` Pablo Rodriguez
0 siblings, 2 replies; 11+ messages in thread
From: Hans Hagen @ 2015-02-22 18:44 UTC (permalink / raw)
To: ntg-context
On 2/22/2015 7:36 PM, Jaroslav Hajtmar wrote:
> Hi ConTeXist...
> How can I find out what version of Lua uses ConTeXt TeXlive 2014
> respectively what version of Lua uses Standalone ConTeXt?
> The point is that Pablo Rodriguez use Fedora 20, which comes with
> Lua-5.2.2. Pablo tested last version of my module ScanCSV and his
> current version of standalone ConTeXt gained mistake, while I compiled
> (with the same current version of Standalone under Win7) the same source
> code without error ....
>
> Error message from log file is:
>
> t-scancsv-2015-02-19.lua:81: assertion failed!
> stack traceback:
> [C]: in function 'assert'
> t-scancsv-2015-02-19.lua:81: in function 'ParseCSVLine'
> t-scancsv-2015-02-19.lua:123: in function 'parsecsvdata'
> t-scancsv-2015-02-19.lua:180: in function 'opencsvfile'
> [\directlua]:1: in main chunk
_VERSION
for pablo: there are csv scanners built in context
-----------------------------------------------------------------
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
* Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)
@ 2015-02-22 18:36 Jaroslav Hajtmar
2015-02-22 18:44 ` Hans Hagen
0 siblings, 1 reply; 11+ messages in thread
From: Jaroslav Hajtmar @ 2015-02-22 18:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi ConTeXist...
How can I find out what version of Lua uses ConTeXt TeXlive 2014
respectively what version of Lua uses Standalone ConTeXt?
The point is that Pablo Rodriguez use Fedora 20, which comes with
Lua-5.2.2. Pablo tested last version of my module ScanCSV and his
current version of standalone ConTeXt gained mistake, while I compiled
(with the same current version of Standalone under Win7) the same source
code without error ....
Error message from log file is:
t-scancsv-2015-02-19.lua:81: assertion failed!
stack traceback:
[C]: in function 'assert'
t-scancsv-2015-02-19.lua:81: in function 'ParseCSVLine'
t-scancsv-2015-02-19.lua:123: in function 'parsecsvdata'
t-scancsv-2015-02-19.lua:180: in function 'opencsvfile'
[\directlua]:1: in main chunk
Thanx
Jaroslav Hajtmar
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-02-24 13:46 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 0:10 Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7) Akira Kakuto
2015-02-23 5:32 ` Jaroslav Hajtmar
-- strict thread matches above, loose matches on Subject: below --
2015-02-22 18:36 Jaroslav Hajtmar
2015-02-22 18:44 ` Hans Hagen
2015-02-22 19:40 ` Jaroslav Hajtmar
2015-02-22 20:42 ` Pablo Rodriguez
2015-02-23 8:36 ` Hans Hagen
2015-02-23 8:49 ` Hans Hagen
2015-02-23 9:25 ` Jaroslav Hajtmar
2015-02-24 13:13 ` Jaroslav Hajtmar
2015-02-24 13:46 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).