2008年3月18日 星期二

.Net 學習筆記 02 (Week 1/ 1 day)

之前另外一本的Teach yourself Visual C++ in 21 days,也是幫助我相當大的一本書。現在這本是Teach yourself .Net in 21 days.

想讀一讀,所以也不見得會每天拿來看吧…總之,當心情很悶很悶的時候,就會拿出來看一看…總是要在生活中找點樂子。


Week 1的章節目標,是了解.NET能幫你做什麼事情,還有他能做到事情是什麼。應該就是了解.NET是幹麻的意思吧。

DNA…& COM…
分散式網路架構… & …Component Object Model…

不是很懂…總之…COM在Maintain的時候很麻煩!?而.NET Framework解決了這樣的問題?

CLR→ Common Language Runtime
.NET Framework的核心,CLR。

用.NET Framework寫出來的又稱為managed code。CLR提供了managed execution environment給.NET。

講.NET跨平台和可以在各種處理器上執行的理由…JIT…

CLS…Common Language Specification
規範了怎麼樣的語言可以在Common Language Runtime下執行。如果符合CLS的話,則此程式保證可以跟其它的.NET合作。

using System;
[assembly: CLSCompliantAttribute(true)]
[CLSCompliantAttribute(true)]
public class Class1
{
public void x(UInt32 x){}
public static void Main( )
{
}

上面的程式沒辦法Compiler…因為Uint32並不是CLS的規格。
}
…後面越看越想睡…
最後說到,把這東西(VS .NET 2003)當工具,而不是程式語言。


.Net 學習筆記 01 (線上的資源)

線上的支援:
  • http://www.dotnet247.com This site is unreal. It's a summary site that catalogs all the .NET sites on the Web, including Microsoft. Just type in a topic or keyword you're interested in, and I can almost guarantee you that all the articles on the Web related to that topic will come up in its Google search engine.

  • http://www.123aspx.com This site is just like the dotnet247 site, except that it relates to ASP.NET-specific information. It's a hugely important resource to have at your fingertips when you need to get information fast.

  • http://msdn.microsoft.com The million-page developer heaven. This site has not only thousands of .NET samples and articles, but it also covers all technologies from Microsoft, not just .NET. This should be your browser's home page, just to see what's fun and new every day for developers using Microsoft technologies.

^^|||,我只知道上面這一個…ms的官方線上文件。要查資料時多多少少會用到…只是有時候覺得寫的不是很清楚。但算是相當齊全的網站了。
  • http://www.angrycoder.com This is not a sample Web site, but rather a .NET e-zine. It's not a site you'll go to every day, but you should check it out once a month to read some of the editorial pieces and personal anecdotes of other .NET developers. At a minimum, you'll get a good laugh reading some of the pieces, which is sometimes necessary when learning new technologies.

  • http://www.gotdotnet.com This is Microsoft's .NET community portal. It has message boards, code uploads, and tons of samples. The best thing about this site is the .NET QuickStart tutorials are online and working, so you always have a reference place to go if you need access to the QuickStarts.

  • http://www.asp.net— This is Microsoft's ASP.NET community Web site. This site has great links to other sites, great downloads for server controls for ASP.NET, and an extremely active message board. This is a good place to get ASP.NET questions answered.

  • www.windowsforms.net This is Microsoft's Windows Forms community site. I personally love Windows Forms because they provide a richer development environment for the applications than the browser does, and they can be run just like browser-based applications. So, make sure that you check out this site to get hard-core Windows Forms information.

下面的比較像是討論版,而不是線上的文件。
  • http://www.ineta.org The International .NET User Group Association was founded to help user groups around the world get the resources and information they need to spread the word about .NET. You can go to this site and search by country, region, and state to find a user group in your area.

  • http://www.fladotnet.net This is the user group I helped found in Florida. We have monthly meetings in Boca Raton, Miami, and Tampa, so if you're in Florida, you can go to the site and get info about the next meeting.

  • http://www.nonprofitways.net I helped found this organization, which enables developers to write applications for not-for-profit organizations. A lot of developers aren't using .NET at work, but they're involved with user groups and other online communities. So, a couple of friends and I decided that we could funnel some of that excitement and energy to give something back to the world. This started as something for our local user group to work on, but has grown into a worldwide community. If you want to write some .NET code in real-life applications, check out the site and get involved!


PC Wizard



應該是官方網站吧: Link
上面那張圖片是來自Link裡的圖片。

目前在上面的Link裡下載到的PC Wizard 2008,是個強大的硬體偵測軟體。可以讓你不用拆開主機,就能知道裡面裝的是哪一家的CPU、Ram、顯示卡…,相當的仔細,很好用。

2008年3月4日 星期二

閱讀筆記 Lua 5.0 Reference Manual (at 080304)

閱讀文件為:
Lua 5.0 Reference manual

page i

Abstract
略述Lua是個什麼樣的語言,總之就是很好用就是了…
並說這份文件是為了說明Lua的程式語言,和與C語言溝通的API。

1. Introduction
Lua很好用,有OOP,functional的特性。functional programming是說他都是function嗎?
Lua很powerful。他是個library,用clean C(符合ANSI C and C++的標準)寫成的。
原來他是個Library,真強大。

Lua沒有"main",他只是個embed在client的程式中,稱為embeded program或是host。
本機的程式可以讀寫Lua的變數或是呼叫Lua的function,也可以註冊function給Lua使用。
透過和C的合作,Lua可以做到很多事情。

2. The Language
主要是講什麼語法是valid的。
Non-terminals會用斜體表示。
Keywords會用粗體(Bold)表示。
terminals會用typewriter font表示。

2.1 Lexical convertions.
Identifiers跟C的差不多,只要開頭不是數字就行了。

(1)~(4)的例子其實都是同樣的字串。"[["和"]]"的用法,還有"\###",###為ASCII的數字。這些用法都有點意思。

"alo\n123\"" = '\97lo\10\04923"'
= [[alo
123"]]
= [[
alo
123"]]

comments是用--
--相當於C語言的//。
[[和]]則相當於/*和*/。可是[[和]]中允許有nested [[...]] pairs。沒用過,如果真的可以的話,這點到是和C不同。

2.2 Values and Types
有8種types。nil,boolean,number,string,function,userdoto,thread,和table。
nil,就是Null啦。
boolean是true和false。
number是real number(double-precision floating-point)。
string是char的arrary,可包含任何的8-bit char。
function…就function…副含式。Lua可呼叫C和Lua的function。
userdata…不是很懂這是什麼,後面會再說明吧。只是這個東西,Lua不能modify和store。只能靠C API來動他。
thread…執行緒?
table。實作了aoociative arrays。裡面的東西可以是各種型態的混合。
而且a.name跟a["name"]是一樣的。這跟STL的map好像啊。看起來很強大的樣子。
table還可以裝function,或是methods…總之table是個很好的賣點吧。這裡花了不少的篇幅在說table。

variables並不會存值,而是用references。Assignment,parameter passing和function return,都是操作reference。
這些操作都不會有任何的copy。(如a = c,在C裡是把c的值copy到a裡面。)

type這個function會回傳一個string來表示這個variable是什麼型態。

2.2.1 Coercion
主要是說,number和string在run time的時候,會做一些自動的型態轉換…看他們那時候的用途。
如果要明確的把number變string,則要參考string library(see $5.3)。
是為了方便吧…這在C裡不就是一個function…atol()或是sprintf()在做的事情嗎?算是提供方便吧…

2008年3月2日 星期日

Lua's about的閱讀筆記



英文網頁網址:Lua's about

What's in a name.

Lua在Portuguese的意義裡代表了Moon的意思。
他是個名詞。是月亮的名字也是一種語言的名字。
所以,請寫做"Lua",而不是"LUA"。
"LUA"看起來很醜而且像是縮寫,會帶來困惑。

What is Lua?
Lua是種強大,快速,而且embeddable的script的語言。

Lua是dynamically typed。
有automatic memory management,和incremental garbage collection。
跟php之類的有像,自己會分配記憶體,不用特別宣告。
而且自己會回收不用的記憶體。


Why choose Lua?
Lua is a proven, robust language。
在很多企業應用上(如Adobe's Photoshop Lightroom),或遊戲、embedded systems裡。
而且Lua己經有reference manual和不少談論它的書。
從1993年Lua出世己來,就己經被使用在真實的應用上。
Lua featured in HOPL III, the Third ACM SIGPLAN History of Programming Languages Conference, in June 2007.

Lua is fast
Several benchmarks show Lua as the fastest language in the realm of interpreted scripting languages.
節錄上面這一段覺得就相當有power了。

Lua is portable
Lua is distributed in a small package and builds out-of-the-box in all platforms that have an ANSI/ISO C compiler.
跟C的compiler有關。在Unix或Windows下都可以運作。

Lua is embeddable
Lua is powerfil(but simple)
Lua is small
上述這三項,就直接看過去吧。用過之後會比較能感受到這些特點吧。

Lua is free
這一項讓人振奮,他是免費的。為默默在底下做事的人們致上敬意。