[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What do you miss most in Lua
- From: Miles Bader <miles@...>
- Date: Wed, 08 Feb 2012 13:16:54 +0900
Jay Carlson <nop@nop.com> writes:
> But computers are already pervasive in Japan and the Republic of
> Korea too, and the People's Republic of China is on its way--and the
> CJK written languages are difficult to handle in unextended Lua.
Wait... how are CJK "hard to handle in unextended Lua" ...?
$ cat > '短歌.lua' << EOF
> local lfs = require 'lfs'
>
> local tanka_dir = "短歌"
>
> function tanka ()
> for file in lfs.dir (os.getenv ("HOME").."/"..tanka_dir) do
> author = string.match (file, "^(.*)[.]txt$")
> if author then
> print ("歌人: "..author)
> for line in io.lines (tanka_dir.."/"..file) do
> print (" "..line)
> end
> end
> end
> end
> EOF
$ lua5.1
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> loadfile "短歌.lua" ()
> tanka ()
歌人: 俵万智
「寒いね」と話しかければ「寒いね」と答える人のいるあったかさ
hmm, seems OK to me...
-miles
--
Brain, n. An apparatus with which we think we think.
- References:
- Re: What do you miss most in Lua (was: Why isn't Lua more widely used?), sergei karhof
- Re: What do you miss most in Lua (was: Why isn't Lua more widely used?), Jay Carlson
- Re: What do you miss most in Lua, Miles Bader
- Re: What do you miss most in Lua, Jay Carlson
- Re: What do you miss most in Lua, Miles Bader
- Re: What do you miss most in Lua, HyperHacker
- Re: What do you miss most in Lua, Miles Bader
- Re: What do you miss most in Lua, Jay Carlson
- Re: What do you miss most in Lua, Vaughan McAlley
- Re: What do you miss most in Lua, Jay Carlson