`
huangyiiiiii
  • 浏览: 117596 次
  • 性别: Icon_minigender_1
最近访客 更多访客>>
社区版块
存档分类
最新评论

Recently...

阅读更多
最近——正在翻译 Text Process in Python 附录A:选择性的令人印象深刻的 python 简短回顾
这算是本老书了,可惜以往总是瞟一眼那短小的目录就感觉似乎都懂,没啥好看的,所以一直都没正眼瞧过它,最近偶然仔细看了几眼却惊喜地发现这竟是本不可多得的好书。
就说这篇附录吧,我发现它正是我一直在寻求的对 python 的超精简的但绝不失深度的介绍。更别说书中还有大量的高质量的(pythonic的) python 程序。
我想这篇附录最适合让已经有丰富的其他语言编程经验,甚至是有丰富的动态语言编程经验的兄弟来快速掌握 python 语言的精髓的了!

最近——惊现新的模版引擎 mako (http://www.makotemplates.org/) ,myghty 杀手啊!估计最吸引眼球是它那个 benchmark 了:

Mako: 0.90 ms Myghty: 5.25 ms
Cheetah: 0.70 ms Genshi: 12.53 ms
Django: 5.43 ms Kid: 19.12 ms

Cheetah above gets a speed boost from native C extensions, whereas Mako is pure Python.

恐怖啊!
genshi 刚成取代 kid 之势,看来 myghty 就快要被 mako 取代了,呵呵。
genshi/kid 的特点在于方便灵活的 xml 生成;mako/myghty 是用来生成任意形式的模版的,特点在于将 python 语言优雅地植入到模版中,并且将模版编译成 python 代码,获得极高的性能。
而这两组中的前者都超越了后者一大步!难道 genshi 和 mako 要平分(django以外的)模版世界了?拭目以待。
另外由于 mako 将模版查找的逻辑抽象到灵活的 TemplateLookup 里面 (窃以为是学习了 django 模版的思想),我想在要在 django 的基于 app 的架构中应用 mako 模版应该不是难事,有机会要尝试一下。
再另外 mako 模版还吸收了 django 模版中的 filter 的概念。

最近—— cherrypy3.0 发布了 ( http://cherrypy.org/wiki/WhatsNewIn30),大量的重构!
我感兴趣的变化首先是:"CherryPy 3 is much faster than CherryPy 2 (as much as three times faster in benchmarks)."
其次就是 web 服务器和逻辑服务器的完全分离了,说 cherrypy 的 web 服务器是目前最优秀的 wsgi服务器应该没有人会反对 ;-)
另外:"cherrypy.Application objects are now WSGI applications",也就是说 cherrypy 的 url dispatcher 直接处理的就是 wsgi 应用程序了,好处不言自明,呵呵。
另外,刚又发现了这篇文章 cherrypy 3 has fastest WSGI server yet.
aspen:一个基于 cherrypy wsgi server 的 web server,目的是方便各种风格的 web 应用程序以统一的方便的 pythonic 的方式进行部署。


直到最近——才发现原来 routes 已经支持了 REST 形式的 dispatch 了,跟 rails 还跟得挺紧,呵呵。还发现不少新特性:

# Sub-domain support built-in
# Conditional matching based on domain, cookies, HTTP method (RESTful), and more
# Easily extensible utilizing custom condition functions and route generation functions
分享到:
评论

相关推荐

    31 What happened to China Renaissance recently.docx

    31 What happened to China Renaissance recently.docx

    伦敦三一口语五级讲义-What_happened_to_you_recently.pdf

    伦敦三一口语五级讲义中的"What happened to you recently?"这一部分主要探讨的是关于使用现在完成时态来描述近期发生的事件或经历。现在完成时态是英语语法中的一个重要概念,它表示过去发生或已经完成的动作对现在...

    2022高一英语入学分班考试卷01pdf含解析

    题目中的 "It was only when I reread his poems recently...D. that I began to appreciate their beauty." 是典型的强调句型,强调 "when I reread his poems recently" 这个时间状语,所以 "that" 是正确选项。 ...

    magento用户使用手册.pdf

    Magento用户手册目录 第一章:Magento介绍...................................................................................................................4 Magento 的特色.................................

    “Cloud VR+”场景白皮书1

    3.1 Recently Cloudified Phase .................................................................................................. 10 3.2 Mid-Term Cloudified Phase .......................................

    【AIX】3004-314 Password was recently used and is not valid for reuse

    在AIX操作系统中,用户可能会遇到“3004-314 Password was recently used and is not valid for reuse”这一错误提示。该错误通常发生在用户试图更改密码时,如果所输入的新密码在过去一段时间内曾经被使用过,则...

    #GDC2018 Advances in the HDR Eco-System_GDC2018.pdf

    Session Description: HDR display devices have received much attention recently. However, most of the focus has been on TVs, making it difficult for production pipelines and PC gamers. With desktop HDR...

    Digging into WordPress.pdf

    9.3.1 Monitoring and Fixing Errors ...............................350 9.3.2 Alex King’s 404 Notifier Plugin .....................................................351 9.3.3 Broken Link Checker Plugin ....

    Lru.rar_Least Recently Used_page

    Least Recently Used(LRU)页面替换算法是操作系统内存管理中的一个重要策略,用于决定在物理内存不足时哪些进程的页面应该被换出到磁盘。这个算法基于一个假设:最近经常使用的页面在未来也更可能被频繁访问。因此...

    HW1.zip_Reinforcement_recently976_softmax _zip

    本资料包"HW1.zip_Reinforcement_recently976_softmax_zip"主要涉及到Softmax函数在强化学习中的应用,特别是与最近提出的强化学习算法相关的976种策略。 Softmax函数的数学表达式如下: \[ \text{Softmax}(z_i) =...

    Artificial Intelligence: A Modern Approach Third Edition

    classical book for AI. This is the latest edition which is published recently. Good quality! High readability!

    绅士下载工具 支持M3U8 Hitomi Downloader 3.8e.rar

    绅士下载工具 支持M3U8 Hitomi Downloader 3.8e.rar

    LRU(Least Recently Used, 最近最久未使用)算法。

    LRU(Least Recently Used,最近最久未使用)算法是一种常用的缓存淘汰策略。在计算机科学中,当有限的内存空间需要为新数据提供存储时,LRU算法会选择最近最久未使用的数据进行删除,以确保最新或最常用的数据能够...

    Multi-Label dimensionality Reduction

    Multi-Label dimensionality Reduction Multi-label learning concerns supervised learning problems in which each instance may be associated with multiple labels ...mining and machine learning recently.

Global site tag (gtag.js) - Google Analytics