<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Lua programming language]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/book_sunwell</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; book_sunwell]]></copyright><item><title><![CDATA[有趣的Comet技术选择，论 Is node.js best for Comet?]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83773415</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83773415</guid><author>book_sunwell</author><pubDate>Fri, 03 Dec 2010 00:05:33 +0800</pubDate><description><![CDATA[http://sunxiunan.com/?p=1768

 

首先要声明，我对Comet技术只了解皮毛，下面的评论如果有错误欢迎各位看官指出。本文相关博客地址：http://amix.dk/blog/post/19577#Is-node-js-best-for-Comet

amix在这篇博客中谈论他们在Plurk中Comet技术选择的变迁。
 
说句题外话，他有另外一篇博客 ...]]></description><category></category></item><item><title><![CDATA[開放原始碼的回收與再利用]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83524145</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83524145</guid><author>book_sunwell</author><pubDate>Fri, 01 Jan 2010 21:08:45 +0800</pubDate><description><![CDATA[開放原始碼的回收與再利用
前文提到對Google
時代的程式員來說，能夠善用開放原始碼的資源，對程式撰寫的工作能夠在速度上起很大的作用。我覺得不妨就把這項活動稱為「開放原始碼的回收與再利用」吧。在這之前，得先界定一下reuse
（重複使用）與recycle
（回收）的差異。開放原始碼的專案很多，尤其對Java
社群的人來說，對於Jakarta Apache
上的專案相信都不陌生。這些專...]]></description><category></category></item><item><title><![CDATA[Google時代的程式撰寫]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83524144</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83524144</guid><author>book_sunwell</author><pubDate>Fri, 01 Jan 2010 20:29:13 +0800</pubDate><description><![CDATA[Google時代的程式撰寫
最近愈來愈覺得網路時代的程式撰寫工作變得極端的快速多了。原先想將這個題目訂為「網路時代的程式撰寫」，但稍加想想，似乎少了Google
這個威力無窮的搜尋引擎，這樣子的速度提昇又辦不到，故以此題為名。


 
Google
時
代的程式撰寫，在那些面向上能帶來速度的提昇呢？首先是學習的速度的提昇。過去我們接觸新的程式撰寫知識，除了同儕之間的交流外，最主要的...]]></description><category></category></item><item><title><![CDATA[閱讀他人的程式碼(6)閱讀的樂趣：透過程式碼認識作者 ]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83524142</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83524142</guid><author>book_sunwell</author><pubDate>Fri, 01 Jan 2010 20:27:29 +0800</pubDate><description><![CDATA[

閱讀他人的程式碼(6)閱讀的樂趣：透過程式碼認識作者






文/iThome
 (記者) 2008-04-08










&amp;lt;!--  NO MAIN PHOTO --&amp;gt;
即便每個人的寫作模式多半受到他人的影響，程式人通常還是會融合多種風格，而成為自己獨有的特色，如果你知道作者程式設計的偏好，閱讀他的程式碼就更得心應手。








...]]></description><category></category></item><item><title><![CDATA[閱讀他人的程式碼(5)找到程式入口，再由上而下抽絲剝繭 ]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83524141</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83524141</guid><author>book_sunwell</author><pubDate>Fri, 01 Jan 2010 20:24:29 +0800</pubDate><description><![CDATA[

閱讀他人的程式碼(5)找到程式入口，再由上而下抽絲剝繭






文/iThome
 (記者) 2008-04-02










&amp;lt;!--  NO MAIN PHOTO --&amp;gt;
根據需要決定展開的層數，或展開特定節點，並記錄樹狀結構，然後適度忽略不需要了解的細節─這是一個很重要的態度。因為你不會一次就需要所有的細節，閱讀都是有目的的，每次的閱讀也許都...]]></description><category></category></item><item><title><![CDATA[閱讀他人的程式碼 (4)望文生義，進而推敲組件的作用 ]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83524140</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83524140</guid><author>book_sunwell</author><pubDate>Fri, 01 Jan 2010 20:23:26 +0800</pubDate><description><![CDATA[ 




閱讀他人的程式碼 (4)望文生義，進而推敲組件的作用






文/iThome
 (記者) 2008-03-26










&amp;lt;!--  NO MAIN PHOTO --&amp;gt;
先建立系統的架構性認識，然後透過名稱及命名慣例，就可以推測出各組件的作用。例如：當Winamp嘗試著初始化一個Plug-In時，它會呼叫這個結構
中的init函式...]]></description><category></category></item><item><title><![CDATA[閱讀他人的程式碼]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83524139</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83524139</guid><author>book_sunwell</author><pubDate>Fri, 01 Jan 2010 20:22:05 +0800</pubDate><description><![CDATA[

閱讀他人的程式碼(1)─讀懂程式碼，使心法皆為我所用






文/iThome
 (記者) 2008-03-05










&amp;lt;!--  NO MAIN PHOTO --&amp;gt;
程式碼是別人寫的，只有原作者才真的了解程式碼的用途及涵義。許多程式人心裡都有一種不自覺的恐懼感，深怕被迫去碰觸其他人所寫的程式碼。但是，與其抗拒接收別人的程式碼，不如徹底了解相...]]></description><category></category></item><item><title><![CDATA[如何閱讀他人的程式碼]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83524138</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83524138</guid><author>book_sunwell</author><pubDate>Fri, 01 Jan 2010 20:16:36 +0800</pubDate><description><![CDATA[如何閱讀他人的程式碼

怎麼讀? 怎麼看別人的 Source code, 然後再去修改, 通常的回答, 大概是看 天份
.


	我的做法通常是 先搞清楚此程式的 輸入、輸出

, 再從 main()

 等開始位置開始追, 經過追蹤、測試

來找到要改的地方.


這一系列文章是作者(王建興)將他閱讀程式碼的心得 與 優點寫出來, 建議有空可以看看(文章下面內容, 是我...]]></description><category></category></item><item><title><![CDATA[lua string trim]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83522268</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83522268</guid><author>book_sunwell</author><pubDate>Sun, 27 Dec 2009 16:26:06 +0800</pubDate><description><![CDATA[
function trim(s)
  local from = s:match&quot;^%s*()&quot;
  return from &amp;gt; #s and &quot;&quot; or s:match(&quot;.*%S&quot;, from)
end]]></description><category></category></item><item><title><![CDATA[API design tips]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83521155</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83521155</guid><author>book_sunwell</author><pubDate>Thu, 24 Dec 2009 12:33:48 +0800</pubDate><description><![CDATA[
API Design Tips






&quot;It's very easy to create a bad API and rather difficult to create a good one.&quot;
- Michi Henning, API Design Matters, Communications of the ACM Vol. 52 No. 5

First thi...]]></description><category></category></item><item><title><![CDATA[进程间通讯demo]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83520752</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83520752</guid><author>book_sunwell</author><pubDate>Wed, 23 Dec 2009 14:56:15 +0800</pubDate><description><![CDATA[// 使用Memory Mapping file共享数据，使用一个Event作为并发控制。
// 仅为练习使用。





#define BUFFER_SIZE (100*1024)
#define BUFSIZE 1024

struct BufferStruct
{
    BOOL hasRead;
    TCHAR buf[512];
};

void ...]]></description><category></category></item><item><title><![CDATA[[msdn] Interprocess Communications]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83520578</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83520578</guid><author>book_sunwell</author><pubDate>Wed, 23 Dec 2009 08:35:08 +0800</pubDate><description><![CDATA[ 
The Windows operating system provides mechanisms for
facilitating communications and data sharing between applications.
Collectively, the activities enabled by these mechanisms are called interpr...]]></description><category></category></item><item><title><![CDATA[[MSDN] Named Pipe Server Using Overlapped I/O]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83520577</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83520577</guid><author>book_sunwell</author><pubDate>Wed, 23 Dec 2009 08:31:27 +0800</pubDate><description><![CDATA[ 
The following is an example of a
single-threaded pipe server that uses overlapped operations to service
simultaneous connections to multiple pipe clients. The pipe server creates a
fixed number ...]]></description><category></category></item><item><title><![CDATA[Lua 调用ClearTool获取某文件最新的注释内容]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83497854</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83497854</guid><author>book_sunwell</author><pubDate>Fri, 04 Dec 2009 10:19:50 +0800</pubDate><description><![CDATA[local cmdStr= [[cleartool describe -fmt &quot;%c&quot;  &quot;D:\DEV_FEATURE\wei\test1.cpp&quot;]]
local f = assert(io.popen(cmdStr))
local str = assert(f:read('*a'))
f:close()

print(str)]]></description><category></category></item><item><title><![CDATA[一个自动更新VC++项目版本号的Lua脚本]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83494782</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83494782</guid><author>book_sunwell</author><pubDate>Fri, 27 Nov 2009 08:36:23 +0800</pubDate><description><![CDATA[某个项目经常需要在改完代码之后修改版本号，大概有7、8个文件需要一个个改动然后check 
in。我发现这个操作有个特点就是所有的版本号都是一样的，而且需要修改的字符串非常有规律，就是类似查找1, 6, 0, 16替换成1, 6, 0, 
17这样，同时还有1,6,0,16替换成1,6,0,17（区别是逗号后面没有空格）。这种分析查找替换用Lua来做再简单不过了，故此写了这个脚本。
 
如...]]></description><category></category></item><item><title><![CDATA[How to create c extension for lua and pass complex structure step by step]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83493378</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83493378</guid><author>book_sunwell</author><pubDate>Tue, 24 Nov 2009 11:00:40 +0800</pubDate><description><![CDATA[Original link: http://sunxiunan.com/?p=1498


 
You could download the project from http://groups.google.com/group/lua5/web/luautil.rar


At first, create a windows dll application. The IDE I u...]]></description><category></category></item><item><title><![CDATA[Change Ugly code in our project]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83493168</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83493168</guid><author>book_sunwell</author><pubDate>Mon, 23 Nov 2009 17:48:19 +0800</pubDate><description><![CDATA[following code happens many times in our project:
 
                        xxxxxxx;

#if defined _ETHERNET
                        tmp1String = deviceKey.GetAddressAsString();
#else
          ...]]></description><category></category></item><item><title><![CDATA[Lua runtime code reading Lua运行期源代码分析阅读]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83491635</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83491635</guid><author>book_sunwell</author><pubDate>Thu, 19 Nov 2009 13:25:28 +0800</pubDate><description><![CDATA[http://sunxiunan.com/?p=1477



 
 

 
You could download the project for VC2008 in http://groups.google.com/group/lua5/web/lua_vc2008.rar

The project will use parameter like &quot;c:\test.lua&quot;,...]]></description><category></category></item><item><title><![CDATA[Google的Go编程语言使用初探]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83489049</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83489049</guid><author>book_sunwell</author><pubDate>Thu, 12 Nov 2009 19:00:46 +0800</pubDate><description><![CDATA[http://sunxiunan.com/?p=1463
 
Go编程语言是Google中一些大牛（尤其是有着plan9前科的大牛们）如Rob Pike，Ken Thomason这两位赫赫有名的程序高手、技术作家。
 
很多人认为Go编程语言有点像是C语言与Python的混血，在Golang主页上也清楚写着Go的祖先有C，有Pascal/Modula（也是C++的祖先）/Oberon，还有...]]></description><category></category></item><item><title><![CDATA[勿用屠龙来杀猪-论如何正确整合Lua与C++]]></title><link>https://blog.youkuaiyun.com/book_sunwell/article/details/83487466</link><guid>https://blog.youkuaiyun.com/book_sunwell/article/details/83487466</guid><author>book_sunwell</author><pubDate>Mon, 09 Nov 2009 12:41:04 +0800</pubDate><description><![CDATA[http://sunxiunan.com/?p=1447
 
经常有人问到关于Lua的问题是“Lua如何能使用C++的成员变量？”“Lua如何调用C++类的成员函数？”“C++的复杂数据结构（如数组）如何传递进入Lua让Lua可以使用？”
这些问题之频繁，几乎每天都可以看到。问题的起源也很简单，这些提问者大多是C++程序员，公司需要使用Lua，他们就想如何能够“完美无缝”整合C++和Lua。...]]></description><category></category></item></channel></rss>