2

今天我正在练习“七周的七种语言”的 Io 示例。

示例代码:

futureResult := URL with("http://google.com/") @fetch
writeln("Do something immediately while fetch goes on in background...")

writeln("This will block until the result is available.")

writeln("fetched ", futureResult size, " bytes")

运行异常:

Io$ io future.io

  Exception: Object does not respond to 'URL'
  ---------
  Object URL                           future.io 1
  CLI doFile                           Z_CLI.io 140
  CLI run                              IoState_runCLI() 1

在 io 中直接运行 URL 出现以下错误:

~$ io
Io 20110905
Io> URL

  Exception: Object does not respond to 'URL'
  ---------
  Object URL                           Command Line 1

Io> 

我的环境是:

Ubuntu 14.04

4

1 回答 1

1

关注帖子,我做了以下工作:

$ sudo apt-get install libevent-dev
$ ./build.sh
$ ./build.sh install

网址错误已修复。但抛出以下错误:

在后台进行 fetch 时立即执行某些操作...这将阻塞,直到结果可用。获取的异常:错误不响应“大小” --------- 错误大小
future.io 6 错误大小 future.io 6 CLI doFile Z_CLI.io 140 CLI 运行
IoState_runCLI() 1

发布安装 Io 的帮助

于 2014-08-01T10:46:00.427 回答