Hacker News new | past | comments | ask | show | jobs | submit login
The Io Language (iolanguage.org)
168 points by snwy on Dec 22, 2021 | hide | past | favorite | 56 comments



The Io language is elegant both to program in and in the way the design is built up from simple parts. In fact it was my first introduction to dynamic typing after many years programming in C++, C#, and (various) BASIC(s).

Io allows you to write only and exactly what you meant with the least amount of non-essential complexity of any dynamically typed language I know. The lazy evaluation also allows you to take full advantage of code is data / data is code. That sounds like LISP, but whereas there the primitive is the list, in Io the primitive is the message.

My experience trying to write a larger project (a game, never finished) in Io was that it allowed me to make enormous progress initially, but suddenly reached a point in size of the project where the lack of static checking was (IMO) impeding my progress more than the elegance of the language was helping it.

(I also realized at that point I needed to re-implement some things in C++ for performance reasons, not because of Io per se but just because some things needed to be on the "native" side of the fence because things they touched also were.)

When I reached this point in the project, I found there was no clear path to translating what I'd developed into a static language (C++) because many of the ideas and systems I'd created in Io simply couldn't be expressed in C++ - or they made no sense there.

For example I'd created an embedded DSL (something Io excels at) for a data definition of the game objects. When I tried mindlessly converting these Io prototypes into C++ classes, they not only became too verbose they also lost all of the semantics of prototypical inheritance where "take a copy of another thing and tweak it" was my means of building up game objects by incremental refinement.


Io was fantastic as a personal learning vehicle, over ten years ago. I did have a game project that used it, right in the lull where Lua’s FFI was still a little rough and JS did not quite break out of the browser.

Its simplicity also made it great to write an interpreter for, including GC. However, nowadays the focus shifted to JIT, mostly via LLVM, which leaves such free-form languages unable to compete on performance, without significant effort.

I do fondly remember the endless explorative chats with Steve Dekorte and the other language geeks on IRC!


I also fondly remember those times.


Me too.


could you explain what does "free-form languages" mean? wiki tells me C/C++ is "free form"


I think "dynamic and introspective" would have been more precise, as opposed to "free form" grammars.


> When I reached this point in the project, I found there was no clear path to translating what I'd developed into a static language (C++) because many of the ideas and systems I'd created in Io simply couldn't be expressed in C++ - or they made no sense there.

I’ve had a very similar experience with Haskell.


Some past threads. Hard to search for. Others?

The Io Language - https://news.ycombinator.com/item?id=22796409 - April 2020 (24 comments)

Io Programming Language (new website design) - https://news.ycombinator.com/item?id=10605310 - Nov 2015 (73 comments)

Io language - https://news.ycombinator.com/item?id=8867575 - Jan 2015 (40 comments)

Io language - https://news.ycombinator.com/item?id=2624097 - June 2011 (35 comments)

The Io Language - https://news.ycombinator.com/item?id=1538835 - July 2010 (39 comments)

Io language - https://news.ycombinator.com/item?id=750830 - Aug 2009 (4 comments)


I tried Io during my undergraduate coursework. The language was my introduction to prototypical OOP. Compared to class-based OOP, I found prototypes conceptually simpler and my program architecture less rigid. They naturally lend themselves to an "organic" approach of modeling.

I later learned JavaScript and was extremely disappointed by its lackluster handling of prototypes. What's unfortunate is most programmers don't have experience with prototypes outside of JavaScript and I'm sorry to say its poor implementation of them has left a bad impression on the engineering mindshare. This ultimately culminated with ES6 introducing classes to replace what should have been the conceptually simpler and more flexible system.

Io is worth exploring, even if it's just out of curiosity. I'd especially recommend it to anyone whose only experience with prototypes is JavaScript.


Classes are just syntactic sugar on top of prototypes though. Were there categories of things you could easily express in Io that you could not express in JS?


Prototypical OOP and class-based OOP are both concepts, but it's the implementation of those concepts that distinguishes languages. Prototypes in Io are simply better implemented as a concept compared to JavaScript. Even something as minute as Io's "new slot" operator is a quality of life improvement. Then there are larger differences like multiple inheritance.


> Prototypes in Io are simply better implemented as a concept compared to JavaScript.

Of course it is: javascript is prototypal out of practical convenience, namely that whipping up a prototypal object system was much easier to implement over a few weeks than a full-blown class-based one. It was never a philosophical / design intention, and thus the prototypal object system:

1. was never really good in the first place

2. was never significantly improved for convenience, some inroads were made in ES5, then promptly ignored thereafter

JS developers never came from or were interested in prototypal inheritance and that's doubly understandable from javascript being their first introduction to it (even after the ES5 improvements, and accounting for proprietary extensions like `__proto__`, it remained garbage), few will be motivated into looking up a Self environment to try it out after that, odds are much higher they'll jigger a frankenclass system and try to forget about prototypes entirely.

Talking about Self, and Io, and prototypes, having never really used either in anger I was surprised (and a bit dismayed) that Io's prototypes are a list thereof, that seems so much less sensible and pretty and flexible than Self's parent slots it just killed any interest I had in Io immediately.

And Io makes the same vocabulary mistake Javascript does (to the extent that I always assumed Io grew from an exploration of Javascript leaning more on prototypes, rather than growing from the original): while Self's OO is called prototypes-based, prototypes do not actually have much relevance to the runtime system: a prototype is the object you clone (shallowly), the objects you link to (via parent slots) are called / classified as mixins or traits depending whether they themselves have parents[0].

That is, Self's `copy` on clonables (as opposed to oddballs) is equivalent to Javascript's `Object.assign`, not `Object.create`, or IO's `clone` (an other name I find awful since it doesn't clone anything).

PS: "prototypal OO", not prototypical

[0] https://handbook.selflanguage.org/4.5/roots.html


First read about Io in the fantastic book, Seven Languages in Seven Weeks.


Same. In fact, I picked up that book as a PHP and JS developer, and ended up becoming fascinated with Haskell by the end of it. For the past several years now, I've been earning 100% of my living from writing Haskell.

I enjoyed the Io chapter, and JavaScript's prototypal inheritance made more sense to me after working through that chapter's exercises.


Congrats on the switch to Haskell. I see a similar path when I'm finally tired of big production web apps. I want to work on some wonky functional system at some point.

Curious what sort of work you do!


I work at Supercede. We write a big production web app for the reinsurance industry with Yesod and Servant, and a bit of Elm.

We're hiring[0] also (and our team has grown a bit since that last post).

[0]: https://news.ycombinator.com/item?id=28722397


Last week tried to compile and run Io on the GraalVM but was stopped by a com.oracle.truffle.api.dsl.UnsupportedSpecializationException: Unexpected values provided for LLVMNeNodeGen#1: [false, 0], [Boolean,Integer] error.

coming from:

  at <llvm> CHash_at_(Unknown)
        at <llvm> IoState_symbolWithUArray_copy_(../../../../Desktop/io/libs/iovm/source/IoState_symbols.c:44:1123)
        at <llvm> IoState_symbolWithCString_length_(../../../../Desktop/io/libs/iovm/source/IoState_symbols.c:75:2141)
        at <llvm> IoState_symbolWithCString_(../../../../Desktop/io/libs/iovm/source/IoState_symbols.c:79:2268)
        at <llvm> IoState_retainedSymbol(../../../../Desktop/io/libs/iovm/source/IoState.c:245:8336)
        at <llvm> IoState_setupQuickAccessSymbols(../../../../Desktop/io/libs/iovm/source/IoState.c:251:8564)
        at <llvm> IoState_new_atAddress(../../../../Desktop/io/libs/iovm/source/IoState.c:106:2910)
        at <llvm> IoState_new(../../../../Desktop/io/libs/iovm/source/IoState.c:240:8195)
        at <llvm> main(../../../../Desktop/io/tools/source/main.c:37:599)
        at org.graalvm.polyglot.Value.execute(Value.java:839)

Waiting for the day when I can embed Io on Java projects.

It's a great dynamic language but suffers the same problems every other language with a small user-base suffers.


If you post this as a issue on github, I'll see if we can fix it.


Hi Steve,

I've opened the issue: https://github.com/IoLanguage/io/issues/460

My very uninformed feeling is it might have to do with some C "trickery" too advanced for GraalVM.

Thank you for your work and time.


Thanks Pedro. Looks like it might just need some explicit type conversions.


Hey Steve!

Io is a beautiful language that I got interested in about the time I was learning Ruby (2004 perhaps).

Also, for a few years, your pages were the top sources of information on Objective C!

Thanks for all the work!


You're welcome! So glad to hear you enjoyed these projects.


I first remember looking at Io because of this _why post:

https://viewsourcecode.org/why/hackety.org/2008/01/05/ioHasA...


You might like _why's language project, Potion: http://perl11.github.io/potion/index.html


is he still active? always enjoyed his output. i see some erlang and elixir influences in potion...

wait, are YOU still active? ;) (I believe I was once a registered user of your app that, uh, downloaded a ton of movie clips into a… catalogue of sorts… you know the one…)

There’s a lot of older tech that deserves more love because it’s still great despite losing that new-language smell (I’m sure `io` fits that bill!). I’ve been messing around with the “es” shell and scripting language after getting frustrated with /(ba|c|z)?sh/ (bourne-lineage shells) quirks for the umpteenth time and finally discovering the “rc” family of shells (ok so was plan9 from the future or something? Because it had waaay more good ideas than it is credited for…)

I forked it but now I kinda want to slap a real test suite on it (ready for contributors…) and rebrand it as something new, maybe name it “holysh” since that was my joyful exclamation after reading the es docs and paper…


"wait, are YOU still active?" -> The last several years, I've been working on no/low code client side JS frameworks, but it's not quite ready for a compelling demo yet...


_why not, I'm maintaining it now.

The MOP from IO is beautiful.


IO felt more Ruby than Ruby. I wonder why it never picked up any mainstream usage.


same! i remember _why being a fan of the language, which got me to check it out, though ultimately it didn't offer enough over ruby to get me to really invest in learning it.


I started using Io in 2008 (I believe). In 2009 I registered "iolanguage.org" and created a website for the language. It had a code example right at the front page:

  foo := Object clone do (
    run := method(one, two,
      writeln(one .. " is soooo " .. two)
    )
  ) run("steve dekorte", "drunk")
 
  "but it's just a lie" println
Sorry Steve, I was young (and probably drunk myself) :).

I handed over the domain in 2011 or 2012, can't remember. Good times back then :).


Thanks for getting that domain :)


Curious. Is anyone using it in production?


syntax is ok, but last time i check, it's slow af XD


That may be the least googleable language name I've ever seen.


See also: https://www.mcmillen.dev/language_checklist.html

[ ] The name of your language makes it impossible to find on Google


That's a great list!

WHen I search on a different web search engine for "c" with my default web search engine that says it respects privacy, I start getting results for the C language about 5 items down from the top -- Pretty Good. When I search on said search engine, the C language Wikipedia article comes up first -- Excellent. Said engine also auto-fills programming language when I start to type that after io. My "respectful" web search engine doesn't auto-fill quite as quickly. If my new and extremely poorly named programming language is popular enough, the web search engines are able to figure it out.

io is the 5th result even on https://search.marginalia.nu/


> io is the 5th result even on https://search.marginalia.nu/

To be fair, it is quite heavily biased toward the tech sphere. I try to make it balanced, but even so, not a single result about the poor woman who caught the eye of Zeus.


it is quite heavily biased toward the tech sphere

This is why I use your search engine. Thank you


"io" is a significantly less common word than "go"


Yes, but searching stuff like "go programming" or "go standard library" or "go web framework" will get you what you want.

The problem with io is that it already means something in a programing context, so adding extra programming related keywords won't help to disambiguate the search.


It’s worth noting that the language has been around for almost 20 years now! Search engine relevance was virtually nonexistent when it was named.


Google is from 1997. Io is from 2002. Google grew to number one almost immediately because it was so much better than the previous emgines. Of course we still had reference books around but Javadoc, which generates HTML, was included in the very first Java release from 1995.


And of course there is at least one other language by that name[1], though very much a toy and designed by someone who didn't really know what they were doing.

[1]: https://dercuano.github.io/notes/raph-io.html


I think it beats even Chef (a DSL, not a standalone language, but still). When you google for that you get a mix of automation documentation and links to Gordon Ramsey. But io?? The planet? The Italian pronoun? Good lord.

EDIT: thankfully, on a Mac with Homebrew, you can just 'brew install io'.


I'll throw `Nix` in there. I always get things about unix or linux. For a while when I would search "nix package manager" the top result would be something like "congress manages to nix stimulus package". Go should similarly be hard to search for, but I just use "golang" and it gets it right every time.


I've taken to using "nixos" even when I don't mean the full OS.


Usually that gives me things about nixos. E.g., when I'm trying to figure out how to install vscode plugins via nix package manager, I specifically don't want the nixos recipe because I'm not using nixos.


I took a programming language concepts class and we had to write an essay about some uncommon language and what made it interesting. I chose Io and it was a pain for sure.


i think it's older than the domain name, which gave it a little open window of acceptable googleability.


Practically looks like it's not bad you can get it at #1 on query "IO Programming Language"


history: created in 2002, actively developed until 2008

So it's old and dead? What's the point in posting this on HN?


The most interesting things I've ever come across are old and dead technologies. Better question is why wouldn't this be posted to HN?


In the sense that HackerNews, the non-startup promo part, is neither a "breaking news" site nor a vocational school. It's a social link posting website for things that interest hackers.

Whether the language is "old" or "dead" has absolutely no bearing to whether it's interesting, inspirational, worthy of study, and so on. Not to mention that hackers should know CS history too.


It piqued someone’s curiosity.


It’s a fun and different language. I enjoyed playing with it from the Seven Languages book.


I contributed to it in 2015




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: