This presentation gave an overview about Chinese information process progress on GNU/Linux. It covered input/output/printing mechanism for GNU/Linux. Also, some localized open source projects were introduced.
中文输入法介绍、发展及困难
A Talk in Gnome Asia 2012 and Hong Kong Open Source Conference 2013
Gnome Asia 2012 : http://www.youtube.com/watch?v=W_Y0u5XukD8
HKOSC 2013 : http://www.youtube.com/watch?v=wKKrEuZyYRI
PIME - 用 Python 和 JavaScript 快速開發 Windows 的中文輸入法Jen Yee Hong
?
Open source 的中文輸入 framework 在Linux下選擇很多,但在 Windows 上則相對缺乏, 尤其 Windows 8 之後,新 TSF 架構實做相當困難,Metro mode 又多了許多限制, 使得很多開發者空有設計輸入法的構想,卻無法落實到很多人使用的 Windows 系統上。PIME 為一個能在 Windows 上用 python 和 JavaScript 開發中文輸入法的架構,底層採用 C++ 開發的 LibIME (取自新酷音輸入 Windows 版),幫助有志於改善中文輸入環境的朋友, 在不了解太多細節,也不用會 C++ 的狀況下,也能用標準 web 技術設計新的輸入法。
This document discusses several CPU high-efficiency programming techniques, including pipeline processing, superscalar execution, out-of-order execution, branch prediction, caching, and multi-core processing. It then provides examples of optimizing code for Intel processors using techniques like reducing branch prediction misses, taking advantage of out-of-order execution and avoiding long dependency chains, using bit operations instead of comparisons, and leveraging parallel execution across processor cores.
SystemTap is a dynamic tracing tool for Linux systems. It allows users to easily gather information about the running Linux system by defining probe points in a script. The script is compiled into a kernel module which can then be loaded to monitor the specified probe points. Some examples of useful probe points include functions, system calls, and kernel statements. SystemTap scripts can be used to trace execution, profile performance, monitor kernel functions and debug problems by printing at probe points. It provides a safe way to observe a live system without needing to recompile the kernel.
This document provides an overview of understanding computer networks. It discusses network card models and bandwidth, latency of gigabit network cards, new trends in network cards, important performance metrics, Linux network protocol stacks, tuning the protocol stack, interrupt balancing, network bonding, observing network behavior with tools like ksysguard, wireshark, iptraf, socktop, the cost of network system calls, issues caused by insufficient memory in the protocol stack, packet dropping observation and analysis, and the ethtool utility.
Go 語言入門介紹,底下是大綱:
* Go 語言誕生
* Go 語言優勢
* Go 語言選擇
* 誰在用 Go 語言
最後會提到 goroutine 及 channel 這兩大特性。如果對 Go 語言有興趣,可以參考線上課程
https://www.udemy.com/golang-fight/?couponCode=GOLANG-INTRO
中文输入法介绍、发展及困难
A Talk in Gnome Asia 2012 and Hong Kong Open Source Conference 2013
Gnome Asia 2012 : http://www.youtube.com/watch?v=W_Y0u5XukD8
HKOSC 2013 : http://www.youtube.com/watch?v=wKKrEuZyYRI
PIME - 用 Python 和 JavaScript 快速開發 Windows 的中文輸入法Jen Yee Hong
?
Open source 的中文輸入 framework 在Linux下選擇很多,但在 Windows 上則相對缺乏, 尤其 Windows 8 之後,新 TSF 架構實做相當困難,Metro mode 又多了許多限制, 使得很多開發者空有設計輸入法的構想,卻無法落實到很多人使用的 Windows 系統上。PIME 為一個能在 Windows 上用 python 和 JavaScript 開發中文輸入法的架構,底層採用 C++ 開發的 LibIME (取自新酷音輸入 Windows 版),幫助有志於改善中文輸入環境的朋友, 在不了解太多細節,也不用會 C++ 的狀況下,也能用標準 web 技術設計新的輸入法。
This document discusses several CPU high-efficiency programming techniques, including pipeline processing, superscalar execution, out-of-order execution, branch prediction, caching, and multi-core processing. It then provides examples of optimizing code for Intel processors using techniques like reducing branch prediction misses, taking advantage of out-of-order execution and avoiding long dependency chains, using bit operations instead of comparisons, and leveraging parallel execution across processor cores.
SystemTap is a dynamic tracing tool for Linux systems. It allows users to easily gather information about the running Linux system by defining probe points in a script. The script is compiled into a kernel module which can then be loaded to monitor the specified probe points. Some examples of useful probe points include functions, system calls, and kernel statements. SystemTap scripts can be used to trace execution, profile performance, monitor kernel functions and debug problems by printing at probe points. It provides a safe way to observe a live system without needing to recompile the kernel.
This document provides an overview of understanding computer networks. It discusses network card models and bandwidth, latency of gigabit network cards, new trends in network cards, important performance metrics, Linux network protocol stacks, tuning the protocol stack, interrupt balancing, network bonding, observing network behavior with tools like ksysguard, wireshark, iptraf, socktop, the cost of network system calls, issues caused by insufficient memory in the protocol stack, packet dropping observation and analysis, and the ethtool utility.
Go 語言入門介紹,底下是大綱:
* Go 語言誕生
* Go 語言優勢
* Go 語言選擇
* 誰在用 Go 語言
最後會提到 goroutine 及 channel 這兩大特性。如果對 Go 語言有興趣,可以參考線上課程
https://www.udemy.com/golang-fight/?couponCode=GOLANG-INTRO
This document discusses CPUs and provides information about their architecture and performance. It begins with an overview and outlines topics like measurement, utilization, chipset architecture, cache hierarchy, and components inside CPUs. Examples are given of Intel Xeon and Sandy Bridge CPUs. Performance numbers are listed for operations like L1/L2 cache references and network/disk data transfers. Tools for investigating hardware topology and benchmarking micro-level performance are also introduced.
The document discusses IO subsystem architecture in Linux. It contains 3 layers: block layer, DM layer and request queue/elevator. The block layer handles generic block IO requests and completion events. The DM layer consists of components like LVM2 and EVMS. The request queue schedules requests using algorithms like deadline and anticipatory. It also contains probes and tracepoints to monitor IO events.
This document discusses various IO devices and measurement tools. It describes the chipset, SATA/SAS disks, SSDs, PCIe flash cards, RAID cards, and NVRAM cards. It provides example specifications and performance numbers for these devices. Tools discussed for measuring IO include fio, iostat, iotop, pidstat, hwconfig, and lsblk. The document considers how IO depth impacts device performance and questions the purpose of RAID cards and ensuring data integrity with PCIe cards.
1. Go Lang 介绍
Go 编程语言是 Google 中一些大牛(尤其是有着 plan9 前科的大牛们)如 Rob Pike , Ken
Thomason 这两位赫赫有名的程序高手、技术作于 2007 年 9 月开始建造。
Pike 指出,Go 代码的编译基本上可以达到 C 语言的速度,几乎可以在瞬间完成,“就像是
在使用交互式语言”。 现有的语言都没有针对多核心处理器进行优化,为了解决此类编程问
题,Google 工程师们开发了 Go 语言。从源文件的 copyright 可以看到,很多基础代码来自
plan9.
Go 已在 Google 公司内部测试过,但仍处于试验阶段。Google 开放 Go 的代码,希望籍此帮
助 Go 语言的发展。首席软件工程师 Rob Pike 说:我们开发 Go,是因为近 10 年左右开发程
序之难让我们有点沮丧。 Google 两年前开始开发 Go,1 年前开始有一只团队专职于此。目前
只支持 unix 平台, windows 平台的支持由于资源的原因,需要更多的参与者来移植。
Go 的定位 是系统编程,比如 Web 服务器、存储系统和数据库等,但也欢迎在其它方面的
应用。
Go 语言的官方吉祥物如下:
我看好 Go 的原因是: 这个语言不是凭空或者实验室设计的,而是填补过去
10 年在系统编程软件方面的不足。作为系统软件的编写者,经常会深深的感觉到目前常见
语言的面对大规模的网络应用,在不断涌现的多核心硬件前的无奈 , 纠缠在多线程和各种锁
中间, 不停的制造各种各样的轮子, 低效的排错。 Go 拥有的这些现代特性都是系统用户
2. 梦迷以求的,经过作者全面的考虑,适当的取舍,即结合了动态语言的弹性,又有了静态
语言的安全性和高性能。
目前这个 GO 社区非常活跃,邮件列表里每天都有几百个讨论,加上有 Google 的强力支持,
个人认为非常有前途。
那么 GO 能解决什么问题:
1. 硬件很快 软件开发很慢。
2. 依赖很麻烦。
3. c++ java 太笨拙。
4. 并行和 gc
5. 多核心机器的出现,未来几年 128 核心的机器都很常见。
大部分的系统语言并不是设计来解决这些问题的 ,而且新涌现的大多数库并没有改善这些问
题,相反加剧了。
GO 结合了动态语言的开发效率和静态编译型语言的安全性和运行效率,支持网络和多核
编程,带给我们快速, 安全, 并发, 快乐。
Go 有着非常高的效率。 实际上 golang.org 就是用 gdoc 架设的。同时语言效能评测网站()
Go 和其他语言的对比,也充分说明了 Go 的效率和 c 语言很接近。
GO 的设计目标:
1。 系统编程语言。
2. 快速编译和执行。
3. 类型安全性和内存使用安全。
4. 很好的支持并发计算。
5. 高效,低延迟的垃圾回收算法。
指导原则:
1. 减少 bookkeeping。
2. 更少的关键词,减少无谓的输入。无符号表设计使得语法分析,调试等大幅简单。
3. 保持概念正交
4. 保持简单。
3. 5. 减少类型,无类型层次,避免啰嗦。
语言特性:
清 晰 , 精 确 的 语 法 语 法 : 大 多 数 从 c 继 承 , 包 机 制 Pascal/Modula/Oberon family
(declarations, packages),并发从(CSP)那里借鉴。
大写符号导出符号。
函数或者块开始注释是文档,用于 gdoc 处理。
改进的 If, case 复合语句,允许在条件前,执行语句。 Case 不支持自动 fall throught,
必须显示说明。 Case 支持多个判断。
轻量的类型系统
没有隐式的转换
强类型,显式类型转化
指针运算 slice 代替 提供安全性
通用类型:interface{}
内置数组和字典
支持面向对象编程,但是不支持层次继承。
融合多种语言的特性,各个社区的人都会熟悉,特别是 c, lua, python 社区的用户非常容易
上手。
运行期: c 和汇编实现内存的分配和收集,栈管理,轻量级协程,通讯管道,切片, Map
以及反射等等基础设施。
Gc:目前是用经典的简单的 Mark And sweep 算法, 未来会采用更高效,低延迟的算法。
库实现:
1. 完全用 Go 语言实现, 不依赖其他系统库
2. 从接口库如 xml, asn1,jonson, IO 库,压缩,加密库等等,比较齐全,极大的方便了用
户。
支持 unicode. 值得一提的是 Go 的 “hello 世界”,很好的展示了对 unicode 支持。
模块:
Package 管理。一个 package 可以分散在多个文件里,就好比在一个文件效果一样。
扩展:
Cgo 支持 c 和 go 编程混合,使得 GO 的扩展非常容易,让 Cgo 来做参数和类型的转换,
直接连接用户的 c 函数。
Range : for 语句支持通用的迭代,支持数组,字典,通讯管道。 特别是通讯管道结合