Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership | k5 store

[P]
Leapfrogging Abstractions (Technology)

By Arkaein
Thu Mar 3rd, 2005 at 09:25:35 PM EST

Software

Since nearly the beginning of modern computing programmers have used what have traditionally been called high level languages to make the task of developing large applications a manageable task. As computers have grown in power the tasks which we attempt to accomplish with them have grown in proportion. Language development has progressed towards higher and higher levels of representation. Near the high end we have a fairly recent set of languages which are designed to run on virtual machines (VMs), allowing the hardware and even the operating system to be largely abstracted away.

But is this really a solid step forward in programming language progress, or is it an evolutionary dead end? I believe it may be the latter, and I would propose that the progress of software development might be better served by leapfrogging this stage towards the higher levels of abstraction that lie ahead, and which are already permeating areas just outside of mainstream application development.


The Language Continuum

The term higher level language (hereafter HLL) seems to cover a narrower landscape than it did in the past. While C might have once been considered a HLL most computer scientists nowadays would likely consider it a middle level language (MLL); significantly more expressive than assembly and featuring basic platform independence, but quite a bit closer to the bare metal than, say, Java. Java, C++, and C# would all be considered modern HLLs (some might quibble with the inclusion of C++ because some C++ programs are basically C with a few extra features, but I definitely consider the modern features of the language such as the Standard Template Library and full OOP support to be high level components). The exact continuum is not something that can be specified precisely, but in general the higher the level the fewer the lines of code needed to accomplish a task and the greater the set of standard libraries available to eliminate the tedium of reinventing well solved wheels.

Any complete system generally requires some software to be written at many levels. Device drivers and operating systems will require some assembly (a low level language, or LLL) and tend to be written mainly in MLLs like C, while modern applications tend to use C as a minimum with preference for HLLs. The trend at all levels is upward, as improvement in development tools such as compilers with fairly automatic optimizations have reduced or eliminated the need for human developers to dig into the nitty gritty details of a piece of code to ensure decent performance. In addition, hardware architectures have begun to grow past the levels of complexity at which humans can reliably outperform compilers at determining optimal implementations at the assembly code level.

Moving to higher levels typically trades off performance for reduced development and maintenance costs. With today's increasingly fast PCs, with the processor idle 99% of the time under the not-so-strenuous loads imposed by web browsing, email, and word processing that the best choice for many new applications would be one of the highest level languages available. Can we not do better than Java and C#, even today? What about the so called scripting languages, such as Python and Ruby? These languages are rarely considered for full-fledged applications, but is it really because they aren't up to the task?

The Level of Optimal Optimization

For high level application development it seems obvious that high level languages are desirable because they can reduce total project complexity, especially in terms of total lines of code written specifically for the given project. But many projects require some code to be written at lower levels as well. A 3D game engine that renders a million triangles every few seconds needs to squeeze every bit of performance out of the inner sections of rendering loops, and this might require a bit of hand tuned assembly inserted into what is already highly optimized C to achieve this performance. What's key is that modern compilers can optimize C or C++ code better than most programmers, and these tools should only continue to get better. Meanwhile, the skills of a typical programmer from generation to generation will stay fairly constant unless huge breakthroughs are made in educational techniques.

What does this all mean? I think it means that the Level of Optimal Optimization will rise near monotonically over time. That is to say, in maybe 15 years hand coded assembly routines may become obsolete (accessing architecture specific features not withstanding) because the compiler will produce more optimal code than a human could in 99.99% of cases. In maybe 30 years hand optimizations at the middle levels may similarly be obsoleted by advanced development tools. So how far can this be extended? Is there any reason why a future compiler could not turn a decently written Perl script into a chunk of object code that runs faster than hand tuned C? Possibly optimistic projections aside, if these trends continue eventually even modern HLLs may be obsoleted by the one-two punch of future languages and their super-compiler/optimizers.

Upping the Ante: Dynamic Typing

This question was posed above: "Are scripting languages up to the task of full scale application development?" The big knock on Python et al. in this domain is not so much that they are typically used for scripting (which I believe is a bit of a Red Herring), but that most are dynamically typed. While dynamic typing facilitates rapid development (making prototyping a solid niche for these languages), the thought is that scalability and long term maintainability will suffer. Strongly typed languages ensure that a basic error such as an assignment between incompatible variable types is caught at compile time, but with dynamic typing such bug discoveries will not occur until run time (when generally an exception is thrown). I believe that this run time verses compile time trade-off underlies the primary objection to dynamically typed languages for large application development.

My personal opinion is that this is flawed thinking. The errors caught by the compiler are generally the simplest errors because the compiler can only judge syntax. Logic errors (legal expressions that result in flawed program behavior) are usually much more work to find and debug, and are language agnostic. Such errors are best caught using solid software engineering principles, including modular design and unit testing. These principles also apply regardless of chosen language. Even if software bugs written in dynamic languages truly are more difficult to debug, I believe that the trade-off between ease of debugging and quickness of development, as well as reductions in total code size for dynamically typed languages must be weighed against this primary drawback before truly determining the best approach for any project.

Virtual Roadblocks

Using dynamically typed languages has the potential for full scale application development today. Just as assembly can be be used to optimize MLLs, MLLs can be used to write modules called from what could be called a general class of very high level languages (VHLLs). Even without the advanced compilers of the future, use of profiling to identify performance bottlenecks and replacement of only such bottlenecks with more efficient modules coded in C, C++ or Fortran can capture some of the best of all worlds between MLLs and VHLLs.

There's a problem with this picture though, and that is where do the VM-based languages fit? Java and C# being the most prominent examples, this class of language has no problem making use of lower level components through invocation of native methods, but it is a problem coming from the other direction, e.g. calling a Java method from Python. VHLLs provide higher levels of abstraction and reduced code complexity, but the cost of invoking a VM to run specific modules from a VHLL interpreter may be too costly to make it worthwhile in any sort of optimization strategy. It would be simply easier to cut the VM-based HLL out of the loop and create interpreter callable modules in MLLs, or at least HLLs such as C++ that are typically compiled to native code.

The VM roadblock issue is primarily historical/cultural and has little to do with the language itself. Rather it is an issue with the standard implementations of the language. There is no reason why Java cannot be compiled to native code. Simply replace the VM provided for each platform with standard libraries providing the necessary support. From the viewpoint of an application distributor or end user performing installation the difference is significant because the "write once run everywhere" condition is violated, but from pure coding and application usage standpoints the differences should be nil. What would be gained is the ability to seamlessly integrate Java or C# object code into applications written primarily in VHLLs, just as is already possible with C, C++, Fortran, etc. object code. Whether the VHLLs use a VM, an interpreter or native compilation is of no consequence as long as they themselves are at the top of the application hierarchy.

As a consequence I think that the VM strategy is a potential dead end, or at least a roadblock on the path of programming language progress. Developers looking to use the best application development tools of the near future may find themselves locked into a suboptimal level of abstraction today if a VM-based language is chosen as the foundation of a new project. Even if a decision is made to move up to a VHLL later on, existing projects may be stuck with no easy way to utilize their VM entrenched code base from the VHLL unless tools to produce native binaries from the VM-based HLL code become more common and as mature as their bytecode producing counterparts. My suggestion? Leapfrog the VM roadblock completely. The overlap between the VHLLs, with their rich libraries often rivaling those of the VM-based HLLs, and the performance benefits of the natively compiled MLLs and HLLs leave few gaps which need filling.

The Ultimate Goal: Programming the Holodeck

By this point you might be wondering where can this all lead? What is the logical conclusion of the chain of ever ascending levels of abstraction, processing power, and optimization capabilities? Star Trek: The Next Generation introduced us to the holodeck, in essence the ultimate virtual reality producing environment. What really fascinated me about the idea of the holodeck though was its incredible programmability. The user was in effect writing a new program each time he used the holodeck, though no esoteric programming code or extensive training was required. The language used was natural language, which while not as concise or succinct as Lisp, more than makes up for it in terms of sheer expressivity.

A typical usage scenario goes like this: the user would first describe the general setting (application) in just a few sentences. The computer would produce a prototype setting, presumably by calling upon an incredibly vast knowledge base containing huge sets of templates. This knowledge base is the logical (though extreme) extension of the increasingly featureful core libraries and APIs that are becoming standard parts of modern programming languages. This prototype will obviously be lacking in details the user might wish implemented, but would start with a reasonable set of default values in cases of uncertainty. After initial inspection of the prototype the user may specify progressively finer details until the application meets desired specifications. While such tuning could no doubt go on for hours in some cases, the program was typically usable in mere seconds and well customized within minutes, and it was all done interactively. Perhaps most importantly the tuning was done by the actual user, rather than by some programmer who could only hope to anticipate the actual needs of the actual user.

While the holodeck is sci-fi, it's characteristic of ultimate programmability should be the grand vision of programming language, development library and API designers. If a tool doesn't help someone finish a job more quickly, effectively, or cheaply compared to what's already available then it isn't a very worthwhile tool. The gap between modern languages and natural language processing is a great one, but it will only be achieved by pushing for higher and higher levels of abstraction. Lower level programmers will still be necessary, but their functions should be increasingly shielded from the end users and even the developers of end user applications to tackle problems of increasing complexity.

Final Thoughts

For now I'm doing most of my own development in C/C++, with some supplemental Python. Why not more Python and less C/C++? Partly it's portability issues, in the case of my current project (a fluid flow simulation visualizer) it's simply easier to output binaries with only a few common dependencies for the target machines than to generate Python that will incur additional dependencies simply for the appropriate Python-to-C bindings. Performance is also an issue, as fluid flow visual visualization can be fairly memory and CPU hungry.

My hope is that in the near future dependency issues at least will become nearly insignificant. If I cannot rely on the package "foo" being available on most machines (much less the additional Python bindings for package "foo"), it would be almost as good if I could be sure that an end user could easily or automatically acquire such dependencies as needed. My preferred OS makes such actions relatively easy, and a few other projects may provide their own solutions. Better optimizers for VHLLs will help my cause as well.

In any case, the VM-based languages are one step on the ladder of progress I'll probably be skipping over.



Copyright (C) 2005 Matt Heinzen. Redistribution allowed under the terms of the GNU Free Documentation License.

Sponsors
Voxel dot net
o Managed Servers
o Managed Clusters
o Virtual Hosting


www.johncompanies.com
www.johncompanies.com

Looking for a hosted server? We provide Dedicated, Managed and Virtual servers with unparalleled tech support and world-class network connections.

Starting as low as $15/month
o Linux and FreeBSD
o No set-up fees and no hidden costs
o Tier-one provider bandwidth connections

Login
Make a new account
Username:
Password:

Note: You must accept a cookie to log in.

Poll
Favorite Execution Style?
o Native binary 49%
o Virtual Machine 16%
o Interpreted 13%
o Emulated 1%
o Don't mess with Texas 19%

Votes: 61
Results | Other Polls

Related Links
o Java
o C++
o C#
o Standard Template Library
o Python
o Ruby
o Perl
o typing
o Fortran
o Lisp
o My preferred OS
o other
o projects
o Better optimizers for VHLLs
o GNU Free Documentation License
o More on Software
o Also by Arkaein


View: Display: Sort:
Leapfrogging Abstractions | 178 comments (137 topical, 41 editorial, 0 hidden)
website link (1.00 / 7) (#177)
by ginozhu on Wed Mar 16th, 2005 at 05:11:04 AM EST
(gino8283@126.com) http://www.clickmove.net

网页设计 网站建设 网站维护 网站推广 vi设计 ci设计 google推广 隆胸 整形 梅毒 性病 不孕不育 子宫肌瘤 宫颈炎 宫颈糜烂 妇科病 短信群发 铃声下载 包装机械 制药机械 塑料托盘 六合彩 管理咨询 彩票 试验设备 高低温试验箱 阀门 截止阀 节流阀 球阀 碟阀 离心泵 真空泵 油泵 流程泵 轴承 向心球轴承 推动球轴承 模具 塑料模具 冲压模具 五金模具 紧固件 密封件 链条 传送带 压缩机 电动机 伺服电机 工业风扇 条码机 喷码机 货架 购物车 锅炉 电动工具 玩具 毛绒玩具 展示柜 纺织机械 烘箱 高压开关 接触器 环保设备 食品机械 水处理设备 发电机组 注塑机 干燥设备 包装袋 pe膜 mba emba pmp ccie ccna 英语培训 计算机培训 erp crm scm 六西格玛 客户关系管理 供应链管理 市场调查 票务服务 机票预定 机床 车床 铣床 实验仪器 试验机 热电偶 温度计 压力表 计量器具 变压器 稳压器 整流器 继电器 电磁阀 电池 手机电池 充电器 万用表 二级管 三极管 柴油发电机 汽油发电机 节能灯 卤素灯 霓虹灯 钠灯 电源设备 光纤 电缆 有机颜料 无机颜料 塑料 工业气体 工程塑料 色母 无机盐 塑料薄膜 涂料助剂 添加剂 消毒水 合成橡胶 胶粘剂 食品添加剂 催化剂 广告礼品 琉璃工艺品 婚庆公司 工艺品 干洗 干洗机 连锁加盟 创业 箱包 笔记本 笔记本电脑 高尔夫 办公家具 家居装潢 装潢公司 橱柜 行李柜 鞋套机 咖啡机 涂料 防水涂料 瓷砖 地板 复合地板 防静电地板 消防设备 监控 监控设备 对讲机 防盗器材 隔热材料 劳保用品 视频会议 电话会议 cpu 主板 硬盘 ups 投影机 存储设备 服务器 路由器 交换机 工作站 音响 润滑油 成人用品 中央空调 宠物 写字楼 别墅 展览公司 留学 签证 移民 公司注册 家政服务 典当 外汇 铜版纸 新闻纸 标签纸 造纸设备 连接器 通讯电缆 vpn 可视电话 网桥 集团电话 解码器 gps 电话计费器 水晶头 集线器 不锈钢 冶炼设备 热轧钢板 冷轧钢板 制服 交通警示灯 路障 离合器 变速器 汽车音响 数字卫星接收器 频道转换器 摄录一体机 舞台灯具 气球 广告牌 三脚架

Best website link (1.00 / 6) (#176)
by ginozhu on Wed Mar 16th, 2005 at 05:10:19 AM EST
(gino8283@126.com) http://www.clickmove.net

http://www.18zo.com/wangyesheji 网页设计 http://www.18zo.com/wangzhanjianshe 网站建设 http://www.18zo.com/wangzhanweihu 网站维护 http://www.18zo.com/wangzhantuiguang 网站推广 http://www.18zo.com/visheji vi设计 http://www.18zo.com/cisheji ci设计 http://www.18zo.com/googletuiguang google推广 http://www.18zo.com/longxiong 隆胸 http://www.18zo.com/zhengxing 整形 http://www.18zo.com/meidu 梅毒 http://www.18zo.com/xingbing 性病 http://www.18zo.com/buyunbuyu 不孕不育 http://www.18zo.com/zigongjiliu 子宫肌瘤 http://www.18zo.com/gongjingyan 宫颈炎 http://www.18zo.com/gongjingmilan 宫颈糜烂 http://www.18zo.com/fukebing 妇科病 http://www.18zo.com/duanxinqunfa 短信群发 http://www.18zo.com/lingshengxiazai 铃声下载 http://www.18zo.com/baozhuangjixie 包装机械 http://www.18zo.com/zhiyaojixie 制药机械 http://www.18zo.com/suliaotuopan 塑料托盘 http://www.18zo.com/liuhecai 六合彩 http://www.18zo.com/guanlizixun 管理咨询 http://www.18zo.com/caipiao 彩票 http://www.18zo.com/shiyanshebei 试验设备 http://www.18zo.com/gaodiwenshiyanxiang 高低温试验箱 http://www.18zo.com/famen 阀门 http://www.18zo.com/jiezhifa 截止阀 http://www.18zo.com/jieliufa 节流阀 http://www.18zo.com/qiufa 球阀 http://www.18zo.com/diefa 碟阀 http://www.18zo.com/beng 泵 http://www.18zo.com/lixinbeng 离心泵 http://www.18zo.com/zhenkongbeng 真空泵 http://www.18zo.com/youbeng 油泵 http://www.18zo.com/liuchengben 流程泵 http://www.18zo.com/zhoucheng 轴承 http://www.18zo.com/xiangxinqiuzhoucheng 向心球轴承 http://www.18zo.com/tuidongqiuzhoucheng 推动球轴承 http://www.18zo.com/moju 模具 http://www.18zo.com/suliaomoju 塑料模具 http://www.18zo.com/chongyamoju 冲压模具 http://www.18zo.com/wujinmoju 五金模具 http://www.18zo.com/jinggujian 紧固件 http://www.18zo.com/mifengjian 密封件 http://www.18zo.com/liantiao 链条 http://www.18zo.com/chuansongdai 传送带 http://www.18zo.com/yasuoji 压缩机 http://www.18zo.com/diandongji 电动机 http://www.18zo.com/sifudianji 伺服电机 http://www.18zo.com/gongyefengshang 工业风扇 http://www.18zo.com/tiaomaji 条码机 http://www.18zo.com/pengmaji 喷码机 http://www.18zo.com/huojia 货架 http://www.18zo.com/gouwuche 购物车 http://www.18zo.com/guolu 锅炉 http://www.18zo.com/diandonggongju 电动工具 http://www.18zo.com/wanju 玩具 http://www.18zo.com/maorongwanju 毛绒玩具 http://www.18zo.com/zhanshigui 展示柜 http://www.18zo.com/fangzhijixie 纺织机械 http://www.18zo.com/hongxiang 烘箱 http://www.18zo.com/gaoyakaiguan 高压开关 http://www.18zo.com/jiechuqi 接触器 http://www.18zo.com/huanbaoshebei 环保设备 http://www.18zo.com/shipinjixie 食品机械 http://www.18zo.com/shuichulishebei 水处理设备 http://www.18zo.com/fadianjizu 发电机组 http://www.18zo.com/zusuji 注塑机 http://www.18zo.com/ganzhaoshebei 干燥设备 http://www.18zo.com/baozhuangdai 包装袋 http://www.18zo.com/pemo pe膜 http://www.18zo.com/mba mba http://www.18zo.com/emba emba http://www.18zo.com/pmp pmp http://www.18zo.com/ccie ccie http://www.18zo.com/ccna ccna http://www.18zo.com/yingyupeixun 英语培训 http://www.18zo.com/jisuanjipeixun 计算机培训 http://www.18zo.com/erp erp http://www.18zo.com/crm crm http://www.18zo.com/scm scm http://www.18zo.com/liuxigema 六西格玛 http://www.18zo.com/kehuguanxiguanli 客户关系管理 http://www.18zo.com/gongyinglianguanli 供应链管理 http://www.18zo.com/shichangdiaocha 市场调查 http://www.18zo.com/piaowufuwu 票务服务 http://www.18zo.com/jipiaoyuding 机票预定 http://www.18zo.com/jichuang 机床 http://www.18zo.com/chechuang 车床 http://www.18zo.com/xichuang 铣床 http://www.18zo.com/shiyanyiqi 实验仪器 http://www.18zo.com/shiyanji 试验机 http://www.18zo.com/redianou 热电偶 http://www.18zo.com/wenduji 温度计 http://www.18zo.com/yalibiao 压力表 http://www.18zo.com/jiliangqiju 计量器具 http://www.18zo.com/bianyaqi 变压器 http://www.18zo.com/wengyaqi 稳压器 http://www.18zo.com/zhengliuqi 整流器 http://www.18zo.com/jidianqi 继电器 http://www.18zo.com/diancifa 电磁阀 http://www.18zo.com/dianchi 电池 http://www.18zo.com/shoujidianchi 手机电池 http://www.18zo.com/chongdianqi 充电器 http://www.18zo.com/wanyongbiao 万用表 http://www.18zo.com/erjiguan 二级管 http://www.18zo.com/sanjiguan 三极管 http://www.18zo.com/chaiyoufadianji 柴油发电机 http://www.18zo.com/qiyoufadianji 汽油发电机 http://www.18zo.com/jienengdeng 节能灯 http://www.18zo.com/lusudeng 卤素灯 http://www.18zo.com/nihongdeng 霓虹灯 http://www.18zo.com/nadeng 钠灯 http://www.18zo.com/dianyuanshebei 电源设备 http://www.18zo.com/guangqian 光纤 http://www.18zo.com/dianlan 电缆 http://www.18zo.com/youjiyanliao 有机颜料 http://www.18zo.com/wujiyanliao 无机颜料 http://www.18zo.com/suliao 塑料 http://www.18zo.com/gongyeqiti 工业气体 http://www.18zo.com/gongchengsuliao 工程塑料 http://www.18zo.com/semu 色母 http://www.18zo.com/wujiyan 无机盐 http://www.18zo.com/suliaobomo 塑料薄膜 http://www.18zo.com/tuliaozuji 涂料助剂 http://www.18zo.com/tianjiaji 添加剂 http://www.18zo.com/xiaodushui 消毒水 http://www.18zo.com/hechengxiangjiao 合成橡胶 http://www.18zo.com/jiaonianji 胶粘剂 http://www.18zo.com/shipintianjiaji 食品添加剂 http://www.18zo.com/cuihuaji 催化剂 http://www.18zo.com/guanggaolipin 广告礼品 http://www.18zo.com/liuligongyipin 琉璃工艺品 http://www.18zo.com/hunqinggongsi 婚庆公司 http://www.18zo.com/gongyipin 工艺品 http://www.18zo.com/ganxi 干洗 http://www.18zo.com/ganxiji 干洗机 http://www.18zo.com/liansuojiameng 连锁加盟 http://www.18zo.com/chuangye 创业 http://www.18zo.com/xiangbao 箱包 http://www.18zo.com/bijiben 笔记本 http://www.18zo.com/bijibendiannao 笔记本电脑 http://www.18zo.com/gaoerfu 高尔夫 http://www.18zo.com/bangongjiaju 办公家具 http://www.18zo.com/jiajuzhuanghuan 家居装潢 http://www.18zo.com/zhuanghuanggongsi 装潢公司 http://www.18zo.com/chugui 橱柜 http://www.18zo.com/xingligui 行李柜 http://www.18zo.com/xietaoji 鞋套机 http://www.18zo.com/kafeiji 咖啡机 http://www.18zo.com/tuliao 涂料 http://www.18zo.com/fangshuituliao 防水涂料 http://www.18zo.com/cizhuang 瓷砖 http://www.18zo.com/diban 地板 http://www.18zo.com/fuhediban 复合地板 http://www.18zo.com/fangjingdiandiban 防静电地板 http://www.18zo.com/xiaofangshebei 消防设备 http://www.18zo.com/jiankong 监控 http://www.18zo.com/jiankongshebei 监控设备 http://www.18zo.com/duijiangji 对讲机 http://www.18zo.com/fangdaoqicai 防盗器材 http://www.18zo.com/gerecailiao 隔热材料 http://www.18zo.com/laobaoyongpin 劳保用品 http://www.18zo.com/shipinhuiyi 视频会议 http://www.18zo.com/dianhuahuiyi 电话会议 http://www.18zo.com/cpu cpu http://www.18zo.com/zhuban 主板 http://www.18zo.com/yingpan 硬盘 http://www.18zo.com/ups ups http://www.18zo.com/touyingji 投影机 http://www.18zo.com/cunchushebei 存储设备 http://www.18zo.com/fuwuqi 服务器 http://www.18zo.com/luyouqi 路由器 http://www.18zo.com/jiaohuanji 交换机 http://www.18zo.com/gongzuozhan 工作站 http://www.18zo.com/yinxiang 音响 http://www.18zo.com/lunhuayou 润滑油 http://www.18zo.com/chengrenyongpin 成人用品 http://www.18zo.com/zhongyangkongtiao 中央空调 http://www.18zo.com/chongwu 宠物 http://www.18zo.com/xiezilou 写字楼 http://www.18zo.com/biesu 别墅 http://www.18zo.com/zhanlangongsi 展览公司 http://www.18zo.com/liuxue 留学 http://www.18zo.com/qianzheng 签证 http://www.18zo.com/yiming 移民 http://www.18zo.com/gongsizhuce 公司注册 http://www.18zo.com/jiazhengfuwu 家政服务 http://www.18zo.com/diandang 典当 http://www.18zo.com/waihui 外汇 http://www.18zo.com/tongbanzhi 铜版纸 http://www.18zo.com/xinwenzhi 新闻纸 http://www.18zo.com/biaoqianzhi 标签纸 http://www.18zo.com/zaozhishebei 造纸设备 http://www.18zo.com/lianjieqi 连接器 http://www.18zo.com/tongxundianlan 通讯电缆 http://www.18zo.com/vpn vpn http://www.18zo.com/keshidianhua 可视电话 http://www.18zo.com/wangqiao 网桥 http://www.18zo.com/jituandianhua 集团电话 http://www.18zo.com/jiemaqi 解码器 http://www.18zo.com/gps gps http://www.18zo.com/dianhuajifeiqi 电话计费器 http://www.18zo.com/shuijingtou 水晶头 http://www.18zo.com/jixianqi 集线器 http://www.18zo.com/buxiugang 不锈钢 http://www.18zo.com/yelanshebei 冶炼设备 http://www.18zo.com/rezhagangban 热轧钢板 http://www.18zo.com/renzhagangban 冷轧钢板 http://www.18zo.com/zhifu 制服 http://www.18zo.com/jiaotongjingshideng 交通警示灯 http://www.18zo.com/luzhang 路障 http://www.18zo.com/liheqi 离合器 http://www.18zo.com/biansuqi 变速器 http://www.18zo.com/qicheyinxiang 汽车音响 http://www.18zo.com/shuziweixinjieshouqi 数字卫星接收器 http://www.18zo.com/pindaozhuanhuanqi 频道转换器 http://www.18zo.com/sheluyitiji 摄录一体机 http://www.18zo.com/wutaidengju 舞台灯具 http://www.18zo.com/qiqiu 气球 http://www.18zo.com/guanggaopai 广告牌 http://www.18zo.com/sanjiaojia 三脚架

I don't think the problem is inherent to VMs. (none / 1) (#156)
by Lisa Dawn on Mon Mar 7th, 2005 at 04:44:07 AM EST

I know a lot of sucky VMs, and I know a few that are great. Others are toys. Sometimes a VM is truly the best solution (op-based languages, funges), and makes portability an easier problem to solve.

I really don't see why you think that the VM is inherent to the problem. Consider: that VM is a collection of further abstraction. Not only that, it also serves to make a level and (hopefully) stable foundation. In truth, I think the VM can save us, the way you suspect that senseless* abstraction will do on its own. In fact, I think it can do even better.

Specifically, I have in mind the perl6 VM. The reason I suspect this is actually a good idea, instead of "YASVM" (S={Stupid, Sucky, Stack, etc.}) is that it was designed in parallel with the perl6 language, and with the express intention of being useful beyond a single source language. And this is the failing of most other common VMs, even the beloved z-machine. Consider: if you have multiple sources for a single target VM, and that is built, in turn, for multiple targets.

I don't want to say that this particular VM will solve computing's problems, but I think there is a clear advantage in this approach, and that it simply needs to be well-implemented and well-adopted to cause a revolution. Computing loses its centricity and if well-done, sharing between languages might be lubricated at the level of object code.

I've been hoping that this particular VM would enable me to inline C with my perl, etc. I haven't really followed closely enough, but I think it can be done, with some trickery at the pre-intermediate compilation stage. And to make even simpler use of objects from other languages. If those objects are in native bytecode, then there's no telling them apart anyway. (Well, there's heuristics, but why would you care at that point?)

I'm trying not to get my hopes up at this stage, but I think there's a lot of potential in this direction, whether or not it manifests itself at present.

*Forgive me, your description of it doesn't imbue any particular sense, other than "not VM."

Strange. (none / 0) (#151)
by Wolfbone on Sun Mar 6th, 2005 at 12:30:43 PM EST

"The language used was natural language, which while not as concise or succinct as Lisp, more than makes up for it in terms of sheer expressivity."

The only mention of Lisp in an article that really should have been full of references to the "programmable programming language", especially now that the AI winter seems to be over ;-)  and it rather gratuitously and perversely compares Lisp's expressivity to that of natural languages, as though Lisp exemplifies all the limitations the other languages have.

But it is well known that  exactly the opposite is true of Lisp; it makes other languages look like BASIC (line numbers included) and since no-one has yet written a compiler/interpreter for English or Russian, it would have been far more enlightening I think to compare the expressivity and abstractional power of Lisp to that of the other programming languages mentioned. At least with Lisp, a holodeck program wouldn't seem like a complete fantasy.

There were some good points and well made in the article but they do seem rather quaint from the point of view of a Lisper. BTW - a fluid flow simulation visualizer sounds just the sort of task Lush (lush.sf.net) is ideally suited to.
 

Strong Typing and VMs (3.00 / 4) (#126)
by hardburn on Fri Mar 4th, 2005 at 11:42:12 AM EST
(hardburn.NO@PROCESSED.runbox.com.MEAT)

What's key is that modern compilers can optimize C or C++ code better than most programmers, and these tools should only continue to get better.

C/C++ and the rest of the curly-brace languages do not have the semantics required for further optimization--what we have now is about as good as it gets. You'd have to redesign the langauge into something un-C-like to do any better. Which is fine.

The errors caught by the compiler are generally the simplest errors because the compiler can only judge syntax. Logic errors (legal expressions that result in flawed program behavior) are usually much more work to find and debug, and are language agnostic.

The secret is to design your language with better syntax that can then support better semantics. And no, C/Java/et al. are not strongly typed. Type theorists have been laughing at those languages for years.

Note that type theory comes out of formal logic, not CS. It's superiority was proven before Turing started playing with infinate paper tape.

I'll refer you to MJD's talk Strong Typing and Perl. He shows an O'Caml program where the type system saves him from an infinate loop bug. Think about that.

I'll also refer you to the LtU Strong Typing flamewar discussion.

Simply replace the VM provided for each platform with standard libraries providing the necessary support . . . What would be gained is the ability to seamlessly integrate Java or C# object code into applications written primarily in VHLLs, just as is already possible with C, C++, Fortran, etc. object code.

A good VM will help interoperability between languages, not hinder it. For instance, the Parrot VM (being designed for Perl6, but also targetting Python and Ruby) has the concept of a "Parrot Magic Cookie" (PMC). Essentially, these implement the details of how each language handles its variables. For instance, each language may do something different when you try to add a string to a number. The PMC lets each language transparently pass around its variables to other languages, but ensures the correct behavior for each language's specification.

Java's VM is designed specifically for Java, as is Python's reference VM. There is no theoretical reason you couldn't host another language on them (and there are some for Java), but it's not necessarily easy. Other VMs (like Parrot and the .NET runtime) are much better for that task.


----
while($story = K5::Story->new()) { $story->vote(-1) if($story->section() == $POLITICS); }


Static typing (2.00 / 3) (#121)
by jrincayc on Fri Mar 4th, 2005 at 10:28:15 AM EST
(jjc at honors dot montana dot education) http://www.honors.montana.edu/~jjc/

First point. Compiler found bugs can be fixed on average in less than a minute. Testing found bugs take longer. The reason is that for compiler found bugs, you generally know exactly where the bug is, sometimes to the specific character. Also, you don't have to think of the test. For most people, here is the order for time to fix bugs: compiler found, code review found, unit test found, system test found. So, most things that you do to move finding the bug earlier are better.

Second point. Not all statically typed languages require the programmer to specify the type. For example, Ocaml will infer the type from the use of the variable. For example given this definition:

let rec length list = match list with
| [] -> 0
| head :: tail -> 1 + length tail;;

Ocaml figured out that the type was: 'a list -> int = <fun>, which means length takes a list of arbitrary type, and returns an integer. So, the programmer does not need to specify types, but the errors are caught at compile time. So, if you are complaining about having to figure out the type, or having to explicitly state a function is generic, your complaint is not with static typing, but with the lack of type inference.



Won't work (none / 0) (#110)
by bugmaster on Fri Mar 4th, 2005 at 04:45:47 AM EST
(bugmaster(nospam)@earthlink.net)

typical usage scenario goes like this: the user would first describe the general setting (application) in just a few sentences. The computer would produce a prototype setting, presumably by calling upon an incredibly vast knowledge base containing huge sets of templates.
That won't work. ("That won't DO anything !" *) Essentially, what you're trying to do is build Strong AI by using a giant lookup table, maybe with some hard-coded rules. This has been tried before, and the consensus is that you'll need some sort of a learning mechanism; building AI by hardcoding a bunch of data is simply not an efficient enough process.

*10 geek points to whomever can spot the reference !

>|<*:=

Curse you, dynamic typing (none / 0) (#109)
by bugmaster on Fri Mar 4th, 2005 at 04:37:58 AM EST
(bugmaster(nospam)@earthlink.net)

You heard me. I hate dynamic typing, for the same reason that I hate global variables.

Debugging is really hard, regardless of what language you program in. That is because debugging is ultimately a battle between yourself and your own misconceptions -- a battle which no amount of technology can help you win (until we get Strong AI).

Thus, any feature that makes debugging even marginally easier is a good thing. This is why most compilers (as well as interpreters) report mundane syntax errors and abort, instead of guessing what the user might have meant.

Static typing is yet another mundane error which could be very costly in the long run. For example, consider the following code:

printSalary(name, salary)
This code calls a function that prints something; the function evidently has two arguments: name and salary. Simple, right ? But what if we look at the function definition, and see something like this (in pseudocode):
printSalary(salary, name) {
  printText(name);
  printText(": ");
  printMoney(salary);
}
Oops ! It looks like we switched the order of arguments to the function !

In a statically typed language, this program would not compile. The types of the function arguments would not match up to the variables you're passing in, and you'd get an error. But, in a dynamically typed language, this program will run just fine -- until you begin to wonder who this person "80000" is whose salary is $0. If your function call is embedded deep inside some other routine, and isn't called all that often, you may never find the error.

I am not making this example up -- I've seen it multiple times in actual production code, some of which was written by me. The situation gets even worse when you start getting into inheritance/polymorphism, or -- Turing forbid -- operator overloading.

Sure, dynamic typing makes it easier for you to write simple programs. Instead of writing "a=5", you have to write out "int a=5"... That's four extra characters, right there ! Wow, what a waste ! However, in reality this inefficiency is minimal compared to the hours and hours of frustration and pain that you'll get when you actually start debugging.

Soft typing should burn in Hell.
>|<*:=

Please remove (3.00 / 5) (#108)
by Thought Assassin on Fri Mar 4th, 2005 at 02:42:46 AM EST

I struggle to find a single line of this that isn't meaningless, factually incorrect, short-sighted or some combination of the three. Why write an article this long when you know so little about the topic? There have been sixty years of research in this field already, so it's laughable to think that you can come with anything useful to say without first accquainting yourself with what is already known. If you are interested, then start reading; it's a fascinating field.

To make a start on your education:

Java, C++ and C# are neither particularly high-level, nor even remotely modern languages.

Static type systems don't really introduce any overhead for rapidly writing small simple programs. Explicit typing where the programmer must name the type of each variable certainly introduces some overhead, but explicit typing has long been obsolete.

Scripting languages tend to gain their advantages for small simple programs by making basic functionality easily usable at the expense of usability for advanced language features and consistency between the two (and also by having convenient niche libraries). This is naturally a disadvantage for large programs, team programming, and maintenance.

Type systems pick up semantic errors, not syntactical ones (dynamically-typed programs still pick up syntax errors before running them!) The inexorable trend is towards finer and finer-grained typing which picks up more and more subtle errors in the programmer's logic. They also allow the compiler to know a lot more about what a piece of code does, and hence make a much better starting point for optimization.

As you say, modular design is the key to programming in-the-large, and the most rigorous definition of a module boundary/interface comes from the static type definition.

Calling into VMs is becoming easier and easier as they become both more language-agnostic and more foreign-call-aware.

Natural language is far too ambiguous to make a good programming language. Instead, your ultimate goal is to create an AI powerful enough to speak natural language well enough for specification refinement and write programs in a real programming language to match those specs.

Finally just a heads-up: your link to "optimizing Very High Level Languages" appears to point to an optimizer for Python instead. Better fix that up.

I have high HLLs talk to each other all the time. (none / 0) (#104)
by skyknight on Thu Mar 3rd, 2005 at 10:52:18 PM EST

There are these things called text and pipes. They are your friends. Sometimes I even use sockets.

It's not much fun at the top. I envy the common people, their hearty meals and Bruce Springsteen and voting. --SIGNOR SPAGHETTI
That's a great article (3.00 / 3) (#103)
by Big Sexxy Joe on Thu Mar 3rd, 2005 at 10:39:26 PM EST

I printed it out and sold it to my roomate for a dollar.  I modified the document extensively without noting my changes and would not allow him to view the source code despite his most ferverant requests.

Do something about it, bitch.

I'm like Jesus, only better.

You should realize that VMs are an old concept. (none / 0) (#96)
by lukme on Thu Mar 3rd, 2005 at 02:42:14 PM EST

Pascal, the language developed for teaching in the late 70's, origonally compiled to p-code which ran on an p-code interpeter.


-----------------------------------
I wonder as I wonder out under the sky
A few points.. (none / 0) (#83)
by tonyenkiducx on Thu Mar 3rd, 2005 at 05:28:21 AM EST
(Guess ^^^^ & ---=>) http://www.enkidu.cx/

I voted this -1, but I think you should look at re-doing it and submitting it again. It seems like you just sat down and wrote this without looking into the matter properly and getting some more opinions. A lot of what you talk about is well covered ground, and most of your points are just obvious to anyone who is into programming. If your not into programming, then the article wouldn't make a lot of sense.

I kind of see your point about VHLLs, but at the same time I dont think you can really draw such simple comparisons. Current VHLLs do provide much easier programming, but often at greatly reduced capacity. Which is kind of the point. Until the computer can extract the meaning of what we want, VHLs will remain in the realms of the poor quality game makers we see these days. Then your getting into AI and the realms of science fiction, as our limited applications of AI and our current level of computing power is nowhere near what would be needed.

Tony.
I see a planet where love is foremost, where war is none existant. A planet of peace, and a planet of understanding. I see a planet called utopia. And I see us invading that planet, because they'd never expect it
Language Consideration (none / 0) (#69)
by The Amazing Idiot on Wed Mar 2nd, 2005 at 11:14:14 PM EST

Have you taken into account Medium Independant Language Fluctations?

Sometimes, the way you say things, or a way a computer "infers" as in the case of the Holodeck, comes out to mean something totally different.

Good luck. +1

Your syntax makes me want to scratch my eyes out (none / 1) (#59)
by thelizman on Wed Mar 2nd, 2005 at 06:47:46 PM EST
(hammerattack.yahoo@com) http://www.andrewkrause.com

...actually, it makes me want to cut your fingers off so you can no longer type.
--

"Our language is sufficiently clumsy enough to allow us to believe foolish things." - George Orwell
On typing (none / 0) (#31)
by imrdkl on Wed Mar 2nd, 2005 at 01:21:08 PM EST

I find your discussion of language typing somewhat confusing. You compare dynamic typing with strong typing, but it seems to me that the only appropriate comparison to dynamic typing is static typing. Python is strongly-typed and dynamically typed.

well, perhaps I'm old school. (2.66 / 3) (#28)
by mpalczew on Wed Mar 2nd, 2005 at 12:51:56 PM EST
(mike at palczewski dot net) http://students.washington.edu/mpalczew

> With today's increasingly fast PCs, with the processor idle 99% of the time

The rate at which computers are getting faster has slowed down.  I have always believed that those spare cycles should be used to have the computer do more for you, and not be wasted.

I have always prefered strongly typed languages.  I believe that a strict framework within wich to program leaves less room for error and less worrying about the choices that the compiler makes.

I believe that we have already reached the point where at least for quite a few applications we have gotten close to all that we are going to get from compiler advances and it is the algorithms themselves that need to be optimized.  No compiler will ever be able to generally optimized algorithms.

> Is there any reason why a future compiler could not turn a decently written Perl script into a chunk of object code that runs faster than hand tuned C?

well, considering that the compiler(the way it works now anyway) needs to compile the perl script everytime it runs, it will necessarily be slower than a c executable.  Startup times will always be longer.  This is also the area where people care about.  I don't hear too many complaints about openoffice being slow when it's started, but plenty about waiting for openoffice to start.

I think your attitude towards software development is too developer centric.  There have been plenty of projects that chose a language not because it was the best tool for the job, but because the developers preferred programing in it.  An example is freenet, which is a total resource hog.  For a program that is supposed to run in the background it is horribly innefficient.  Alot of this has to do with the increased memory footprint and cpu utilization of the java vm.  In order to develop successfull software one has to make descisions primarily based on what makes the user experience the best.  Most projects with lasting appeal have been made this way.  Though there are some exceptions(mozilla).
-- Death to all Fanatics!

ooh (3.00 / 2) (#16)
by Cat Huggles on Wed Mar 2nd, 2005 at 10:27:33 AM EST

I want to program things like in the movies, by sticking 3D blocks together and stuff. I suppose Labview is kind of like this, but without the cool.

Holodeck and associated ideas (none / 0) (#14)
by whazat on Wed Mar 2nd, 2005 at 10:03:44 AM EST

How is the process you describe in programming the holodeck different from giving an order to a subservient human?

Imagine for instance that the system you are programming was a robot, you would want it to be able to follow instructions such as "Pick up a butter knife" and "Compose a sonnet in the style of Shakespeare". Something that could follow these instructions would seem to be a classical robot as in Asimov etc.

So what you are actually wanting is full intelligence in these systems. I have come across a star trek analogy for advanced computing (whilst ignoring the intelligence aspect) in the overview for Autonomic Computing. I find it vaguely annoying mainly because it is trying to solve the intelligence problem (with respect to general computing problems) with the same tools and approaches that have generally not been useful in solving the robotic intelligence problem.

The field of programming languages ... (3.00 / 4) (#12)
by Kalani on Wed Mar 2nd, 2005 at 09:36:23 AM EST
http://www.kalanithielen.com/

... is incredibly interesting.  You might talk about the possibilities of shoving language features into syntactic transformations (and the lambda calculus built purely on such a system).  You might talk about the different underlying semantic models of software: functional, declarative, stateful.  You could even talk about the interesting ways that these models are synthesized or extended, for example concurrent declarative programs present an interesting way of writing multi-threaded software (where threads transparently block waiting for unbound variables to be unified in other threads).

But instead you decided to talk vaguely about informal type systems (ie: "dynamic typing") and Star Trek.

:)

-----
"I have often made the hypothesis that ultimately physics will not require a mathematical statement; in the end the machinery will be revealed and the laws will turn out to be simple, like the checker board."
--Richard Feynman

why people like static compiled languages (3.00 / 8) (#6)
by speek on Wed Mar 2nd, 2005 at 07:26:19 AM EST

Because their IDE can help them navigate quickly through their code, do code completion and code help, and automatic refactorings. Advocates of dynamically typed languages always bring up Smalltalk at this point and say you can do the same with Smalltalk. Well, but the point is, you can't do it with Python or Ruby, Not even close. IDE's for these languages are little more than notepad with colors. That makes working on your 500,000 line python program a bit difficult.

--
al queda is kicking themsleves for not knowing about the levees

Leapfrogging Abstractions | 178 comments (137 topical, 41 editorial, 0 hidden)
View: Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest � 2000 - 2005 Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
If you can read this, you are sitting too close to your screen.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories! K5 Store by Jinx Hackwear Syndication Supported by NewsIsFree