Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
用中文寫 Perl.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
天風  
View profile   Translate to Translated (View Original)
(1 user)  More options Jan 22 2002, 3:13 am
Newsgroups: tw.bbs.comp.lang.perl
From: autri...@kkcity.com.tw (天風)
Date: 22 Jan 2002 08:06:15 GMT
Local: Tues, Jan 22 2002 3:06 am
Subject: 用中文寫 Perl.
剛花兩小時寫完
http://autrijus.org/Lingua-Sinica-PerlYuYan-0.01.tar.gz

所以我們可以用中文(文言文)寫 Perl 了! 請看:

#!/usr/local/bin/perl
use Lingua::Sinica::PerlYuYan;
用警兮用嚴。

印道
1..1
哉兮

印編曰雜申雜申矣
  又曰ok矣
    又曰1矣

亂曰
國無人莫我知兮  又何懷乎故都
既莫足與為美政兮 吾將從彭咸之所居

以上會印出
1..1
ok 1

也就是此模組的安裝測試程式 (t/1-basic.t).

詳情請看模組說明; 剛剛上 CPAN 了.

/Autrijus/
--
 [1;32m┌───── [33m◆ [37m程式設計樂園 [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  ┌ [m
 [1;32m│ [31m        CSZone.kkcity.com.tw         [32m│ [37m├┘┐├┘┐│      │    │  └┬┘ [m
 [1;32m└── [34m《 [0;37mFrom:210.85.11.134       [1;34m》 [32m──┘ [36m┘  ┘┘  ┘└─┘└┴┘  ┴    ┴ [m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
天風  
View profile   Translate to Translated (View Original)
 More options Jan 22 2002, 3:13 am
Newsgroups: tw.bbs.comp.lang.perl
From: autri...@kkcity.com.tw (天風)
Date: 22 Jan 2002 08:09:04 GMT
Local: Tues, Jan 22 2002 3:09 am
Subject: Re: 用中文寫 Perl.
※ 引述《autrijus (Autrijus Tang)》之銘言:

稍作解釋:

> 用警兮用嚴。

  use warnings; use strict;
> 印道
  print "
> 1..1
  1..1
> 哉兮
  ";
> 印編曰雜申雜申矣

  print sprintf '%s %s'
>   又曰ok矣
    ,'ok'
>     又曰1矣
      ,'1'
> 亂曰

  __END__

/Autrijus/
--
 [1;32m┌───── [33m◆ [37m程式設計樂園 [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  ┌ [m
 [1;32m│ [31m        CSZone.kkcity.com.tw         [32m│ [37m├┘┐├┘┐│      │    │  └┬┘ [m
 [1;32m└── [34m《 [0;37mFrom:210.85.11.134       [1;34m》 [32m──┘ [36m┘  ┘┘  ┘└─┘└┴┘  ┴    ┴ [m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ㄚ堡  
View profile   Translate to Translated (View Original)
 More options Jan 22 2002, 4:43 am
Newsgroups: tw.bbs.comp.lang.perl
From: hotd...@kkcity.com.tw (ㄚ堡)
Date: 22 Jan 2002 09:34:57 GMT
Local: Tues, Jan 22 2002 4:34 am
Subject: Re: 用中文寫 Perl.
................................
如果是這樣  可讀性雖然提升了.........
可是coding的時間大概會慢100倍吧

※ 引述《autri...@kkcity.com.tw (天風)》之銘言:

--
 [1;32m┌───── [33m◆ [37mKKCITY [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  ┌ [m
 [1;32m│ [31m         bbs.kkcity.com.tw           [32m│ [37m├┘┐├┘┐│      │    │  └┬┘ [m
 [1;32m└── [34m《 [0;37mFrom:61.58.69.94         [1;34m》 [32m──┘ [36m┘  ┘┘  ┘└─┘└┴┘  ┴    ┴ [m

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
天風  
View profile   Translate to Translated (View Original)
 More options Jan 22 2002, 5:23 am
Newsgroups: tw.bbs.comp.lang.perl
From: autri...@kkcity.com.tw (天風)
Date: 22 Jan 2002 10:13:39 GMT
Local: Tues, Jan 22 2002 5:13 am
Subject: Re: 用中文寫 Perl.
※ 引述《hotd...@kkcity.com.tw (ㄚ堡)》之銘言:

> 如果是這樣  可讀性雖然提升了.........
> 可是coding的時間大概會慢100倍吧

可以用 譯() 來把英文程式翻成中文.

又, 0.02 纔真的能用而不重複名稱, sorry.
http://autrijus.org/Lingua-Sinica-PerlYuYan-0.02.tar.gz

新的範例程式 (用 perldoc Lingua::Sinica::PerlYuYan 可以看到):

#!/usr/local/bin/perl
# The Sieve of Eratosthenes - 埃拉托斯芬篩法
use Lingua::Sinica::PerlYuYan;

用籌兮用嚴  井涸兮無礙。
印曰最高矣  又道數然哉。
截起吾純風  賦小入大合。
習予吾陣地  並二至純風。
當起段賦取  加陣地合始。
陣地賦篩始  繫繫此雜段。
終陣地兮印  正道次標哉。
輸空接段點  列終註泰來。

/Autrijus/
--
 [1;32m┌───── [33m◆ [37m程式設計樂園 [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  ┌ [m
 [1;32m│ [31m        CSZone.kkcity.com.tw         [32m│ [37m├┘┐├┘┐│      │    │  └┬┘ [m
 [1;32m└── [34m《 [0;37mFrom:210.85.11.134       [1;34m》 [32m──┘ [36m┘  ┘┘  ┘└─┘└┴┘  ┴    ┴ [m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
香港腳  
View profile   Translate to Translated (View Original)
 More options Jan 23 2002, 12:50 pm
Newsgroups: tw.bbs.comp.lang.perl
From: "香港腳" <crud_a...@yahoo.nospam.com>
Date: Thu, 24 Jan 2002 01:50:09 +0800
Local: Wed, Jan 23 2002 12:50 pm
Subject: Re: 用中文寫 Perl.
嘩哈, 傑作~

"天風" <autri...@kkcity.com.tw> 撰寫於郵
news:3kRi7d$ZH_@bbs.kkcity.com.tw...

> 剛花兩小時寫完

http://autrijus.org/Lingua-Sinica-PerlYu
Yan-0.01.tar.gz

設計樂園
 [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  
┌ [m
>  [1;32m│ [31m

CSZone.kkcity.com.tw
 [32m│ [37m├┘┐├┘┐│      │
│  └┬┘ [m

 [1;32m└── [34m《 [0;37mFrom:210.85.11.13
4       [1;34m》 [32m──┘ [36m┘
┘┘  ┘└─┘└┴┘  ┴    ┴ [m

---
Posted via news://freenews.netfront.net
Complaints to n...@netfront.net


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shadow  
View profile   Translate to Translated (View Original)
 More options Jan 23 2002, 8:16 pm
Newsgroups: tw.bbs.comp.lang.perl
From: shadow <sha...@ksts.seed.net.tw>
Date: Thu, 24 Jan 2002 09:20:49 -0800
Local: Thurs, Jan 24 2002 12:20 pm
Subject: Re: 用中文寫 Perl.

這真的很有趣,有空來給他用用看,希望有中文變數名稱,那就太幸福了,
我是說語法不變,變數名稱用中文:-)

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "用中文寫 Perl." by Alan,Cheng-Lung Sung
Alan,Cheng-Lung Sung  
View profile   Translate to Translated (View Original)
 More options Jan 23 2002, 8:43 pm
Newsgroups: tw.bbs.comp.lang.perl
From: Alan-S...@dra-spam-no-gon2.net (Alan,Cheng-Lung Sung)
Date: Thu, 24 Jan 2002 01:43:47 +0000 (UTC)
Local: Wed, Jan 23 2002 8:43 pm
Subject: Re: 用中文寫 Perl.

    你真是太強了...
--
                                             DragonII.Net @ Taiwan
                                                IASL, IIS, SINICA
                                             Cheng-Lung Sung 宋政隆
                                         E-Mail: <AlanS...@dragon2.net>    

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "用中文寫 Perl." by 如月林
如月林  
View profile   Translate to Translated (View Original)
 More options Jan 24 2002, 12:53 am
Newsgroups: tw.bbs.comp.lang.perl
From: kisar...@kkcity.com.tw (如月林)
Date: 24 Jan 2002 05:44:05 GMT
Local: Thurs, Jan 24 2002 12:44 am
Subject: Re: 用中文寫 Perl.

騷體的文言比較獒牙

要不要考慮用宋以後的文言?

這樣比較簡單易懂

※ 引述《autrijus (天風)》之銘言:

--
 [1;32m┌───── [33m◆ [37m程式設計樂園 [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  ┌ [m
 [1;32m│ [31m        CSZone.kkcity.com.tw         [32m│ [37m├┘┐├┘┐│      │    │  └┬┘ [m
 [1;32m└── [34m《 [0;37mFrom:203.204.186.208     [1;34m》 [32m──┘ [36m┘  ┘┘  ┘└─┘└┴┘  ┴    ┴ [m

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
天風  
View profile   Translate to Translated (View Original)
 More options Jan 24 2002, 2:43 am
Newsgroups: tw.bbs.comp.lang.perl
From: autri...@kkcity.com.tw (天風)
Date: 24 Jan 2002 07:32:40 GMT
Local: Thurs, Jan 24 2002 2:32 am
Subject: Re: 用中文寫 Perl.
※ 引述《autrijus (天風)》之銘言:

註疏一下...

> 用籌兮用嚴  井涸兮無礙。

use integer; use strict; # 涸; 無礙;

> 印曰最高矣  又道數然哉。

print '最高', "數:";

> 截起吾純風  賦小入大合。

chomp (my $z = <STDIN>);

> 習予吾陣地  並二至純風。

study unshift my @w, 2 .. $z;

> 當起段賦取  加陣地合始。

while ($/ = shift +@w) {;

> 陣地賦篩始  繫繫此雜段。

    @w = grep { ~~ $_ % $/

> 終陣地兮印  正道次標哉。

    } @w; print +"next :";

> 輸空接段點  列終註泰來。

    printf " ".$/."\n" } # 泰來

/Autrijus/
--
 [1;32m┌───── [33m◆ [37m程式設計樂園 [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  ┌ [m
 [1;32m│ [31m        CSZone.kkcity.com.tw         [32m│ [37m├┘┐├┘┐│      │    │  └┬┘ [m
 [1;32m└── [34m《 [0;37mFrom:163.15.59.4         [1;34m》 [32m──┘ [36m┘  ┘┘  ┘└─┘└┴┘  ┴    ┴ [m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
天風  
View profile   Translate to Translated (View Original)
 More options Jan 24 2002, 3:03 am
Newsgroups: tw.bbs.comp.lang.perl
From: autri...@kkcity.com.tw (天風)
Date: 24 Jan 2002 07:52:35 GMT
Local: Thurs, Jan 24 2002 2:52 am
Subject: Re: 用中文寫 Perl.
※ 引述《kisaraki (如月林)》之銘言:

> 騷體的文言比較獒牙
> 要不要考慮用宋以後的文言?

這裡的重點是每個關鍵字都用單一的字表達 (__END__ 等除外),
纔不會有 ambiguity.

當然, 謹慎選字的話, 每個關鍵字提兩個字的版本也可以.

> 這樣比較簡單易懂

請下載看 PerlYuYan.pm 最後的設定; 如果可以, 請自行翻譯後把字典寄給我,
我可以加上兩字詞的模式.

例如像這一行:

! @ # # $ % % ^ & * ( ) - = _ + + [ ] { } \ | ; : :
非陣井註純雜模析和乘起合減賦底加正內外始終參聯兮然標

可以改成

!   @
並非陣列

之類之類..

/Autrijus/
--
 [1;32m┌───── [33m◆ [37m程式設計樂園 [33m◆ [32m─────┐ [34m┐┌┐┐┌┐┌─┐┌┬┐┌┬┐┐  ┌ [m
 [1;32m│ [31m        CSZone.kkcity.com.tw         [32m│ [37m├┘┐├┘┐│      │    │  └┬┘ [m
 [1;32m└── [34m《 [0;37mFrom:163.15.59.4         [1;34m》 [32m──┘ [36m┘  ┘┘  ┘└─┘└┴┘  ┴    ┴ [m


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google