Skip to Content
深入理解運算原理|從簡單的機器到無所不能的程式
book

深入理解運算原理|從簡單的機器到無所不能的程式

by Tom Stuart
November 2017
Beginner to intermediate
344 pages
7h 2m
Chinese
GoTop Information, Inc.
Content preview from 深入理解運算原理|從簡單的機器到無所不能的程式
第1章
夠用的 Ruby
這本書的程式碼是以 Ruby 所寫,那是一種以簡單、友善、有趣為其設計理念的程式語
言。選擇 Ruby 雖然是因為它的明確和彈性,但這本書並未使用 Ruby 的特殊功能,因
此如果有助於讓書中的概念更為清楚,你應該能將本書的範例程式碼轉換成你所偏好的
語言,尤其是其他諸如 Python 或者 JavaScript 之類的動態語言。
這些範例程式碼全都與 Ruby 2.0 Ruby 1.9 相容。在 Ruby 官方網站(
http://www.
ruby-lang.org/
)可以找到並下載其他版本的 Ruby 實作品。
讓我們來一趟 Ruby 語言的快速之旅,這趟旅程的重點是用在本書的功能,如果你還意
猶未盡,O
Reilly
The Ruby Programming Language
會是很好的起點(譯註:此書中
文版《Ruby 程式設計》是由碁峰出版)。
如果你已經瞭解 Ruby,大可放心的跳到第 2 章,並不會有所遺漏。
互動的 Ruby 殼層
互動的主控台(IRB)是 Ruby 最友善的功能,它讓我們輸入一段 Ruby 程式碼,即可
立即看到執行結果。這本書以大量的 IRB 執行我們編寫的程式碼,並探索這些程式碼
如何運作。
在你的開發機命令列輸入
irb
,就可以執行 IRB,當它準備好接收你提供的運算式,
IRB 就會顯示 >> 提示。輸入運算式並按下 Enter 之後,IRB 就會估算程式碼,並將結
果呈現在 => 提示旁邊:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JSON實務手冊

JSON實務手冊

Tom Marrs

Publisher Resources

ISBN: 9789864766000