95 points · by _448 · 3y ago · 53 comments
Think of it like how the expectation for apps is that there'll be a screenshot (or video!) on the homepage of the app doing its job — i.e. of the user experience of the app.
The first thing you should shove in my face, when I land on the home page of a programming language, is the user experience of writing code in the language. Which is to say: the syntax.
But also, if your language has a REPL, or an IDE, or a weird graphical virtual machine like Smalltalk, then that's part of the language's UX as well — so show that too! (And if you can, integrate the two together. Show me a cohesive example of what the syntax looks like inside the REPL/IDE.)
Language home-pages doing this right: https://www.ruby-lang.org/en/ , https://elixir-lang.org/ , https://www.python.org/ , https://www.haskell.org/ , https://nim-lang.org/
Language home-pages that get a B+, for putting the example on the homepage, but below the fold: https://go.dev/ , https://crystal-lang.org/
Everybody else (Rust, PHP, Java, Lua, etc.) gets an eyebrow raised in suspicion, because their home-pages feel like they're ashamed of what their syntax looks like :)
I think the worst way to do it would be to use 13px Times New Roman text with no syntax highlighting on a secondary page. But that's what Io went with [2].
This guy started furiously implementing it at the beginning of the year but stopped at the end of February. ( My guess is he's got a new job ).
There have been many attempts at implementing the language in a "more solid" base, ie. on top of "languages" that take care of garbage collection like JS, Go, Java/JVM.
I suspect a complete and community supported Graal implementation will be the ticket for Io. It would be an incredible dynamic language paired with an incredible strong and robust VM and ecosystem( think libraries, tools, manpower, etc. )
I really hoped I had the chops at language implementation to make this a reality, but after watching the development I'm waayy out of this league.
Found some other implementations under https://iolanguage.org/links.html. None claim to be complete or working, one link was dead :(
The semantics are equally beautiful and elegant.
It's just a cool language.
The main downside is that the semantics are so dynamic that it's virtually impossible to optimize.
Arguments are passed to methods as unevaluated syntax trees and a method can decide at runtime whether or not to evaluate the argument expression, or not, or introspect over it, or mutate it.
It's like every function is a macro but macros can also choose at runtime to selectively evaluate some of their arguments.
Early Lisp was able to bind an operator symbol two four kinds of procedures:
EXPR SUBR
FEXPR FSUBR
The left column is the exprs; the right subrs. The top row means "machine coded / intrinsic"; the F prefix on the bottom ones refers to interpreted mode: the F is of unclear origin. It might refer to "form" or "formula", conveying that those procedures are made of symbolic expressions, not machine code.The subrs are just functions: arguments are evaluated and passed to them.
The exprs operate on expressions: they receive expressions unevaluated, like in Io.
Roughly speaking EXPRs implement special operators that are built into Lisp, written in assembly language.
FEXPRS are defined by the program: they add new kinds of special operators, whose actions are interpreted; they decide at run time what to do with the argument expressions.
Loosely speaking, today's mainstream Lisp dialects still have the equivalent of EXPRs (special operators) as well as SUBRs (built-in/compiled functions) as well as possibly FSUBRS (uncompiled functions in some Lisp dialects that support interpretation). The FEXPR has disappeared; it is not found in e.g. Scheme or Common Lisp.
About macros, macros can evaluate things in their own runtime. In a compiled setting, the run-time of a macro is compile time. Macros don't make decisions in the run-time of the code they expanded; macros are gone at that point. All decisions have to be expressed as generated code which refers to information available at run-time in that environment.
That's a pretty compelling answer to why it doesn't need macros though. It's got the upgraded version built in.
I believe that is amenable to the same style of speculative compilation found in jit compilers for dynamic languages. The above reference to graalvm does seem a good idea in that context. I can't point to an existence proof though.
edit: someone is going to object to "upgraded macro", but nevertheless lisp macros are exactly the subset of fexpr that can be statically resolved at compile time, i.e. a subset of a more powerful facility.
http://web.archive.org/web/20080106163631/http://hackety.org...
"Io is just an incredibly hushed secret. (Perhaps because it is impossible to Google stuff about it.) Did you know that Io’s introspection and meta tricks put Ruby to serious shame? Where Ruby once schooled Java, Io has now pogoed."
[1] https://en.wikipedia.org/wiki/Why_the_lucky_stiff
I once saw _why perform/present at a Ruby event. The coolest and weirdest thing I've ever seen conference in over 25 years of being in this industry.
I had completely forgotten about it until this popped up on HN so thanks for that.
Some examples done right:
The others being Ruby, Erlang, Scala, Clojure, Haskell and Prolog.
https://iolanguage.org/about.html
So the language has been dead since 2008?
last commit merged to master Nov 2022. It's not exactly the most active project in existence but not dead either.