Domain: iolanguage.com
Stories and comments across the archive that link to iolanguage.com.
Comments · 28
-
Re:Well that's it...
Maybe obscure innovation is for you? http://www.iolanguage.com/
-
Re:"Best"?
(There's (a best) (part (of LISP)))?!?
There is, and you just quoted it. The best part of LISP is that there's no bloody syntax; everything is clean, regular and simple. Of course this isn't true of Common LISP, but Common LISP isn't really LISP at all.
I have to admit I took a look at Io this morning, and thought, 'oh, no, not another language with bloody stupid syntax.'
-
Try Io
Io is a small, prototype-based programming language. The ideas in Io are mostly inspired by Smalltalk (all values are objects, all messages are dynamic), Self (prototype-based), NewtonScript (differential inheritance), Act1 (actors and futures for concurrency), LISP (code is a runtime inspectable/modifiable tree) and Lua (small, embeddable).
-
Re:Can I just point out
Javascript is half-assed, broken implementation of prototype OOP. Look at Io for a real implementation of the ideas developed by SELF.
-
Re:Verilog
JavaScript/EcmaScript -- has nothing to do with Java. Dynamic everything, closures, first-class functions -- most of the Lisp-y goodness, but you already know the C-like syntax.
*shudder* Arrgh.
Javascript is not a nice language. It has all the features you say... but most of them are broken.
Dynamic everything? Yup, it's got that. Except that its primary data structure, the Object (an associative array, basically) coerces all keys into strings. This means that if you try to use another object as a key, it gets coerced into something like "[Object:0x12345678]", and that string is actually what's used... with hilarious results if you actually want to use the keys as anything other than simple hashes. Yes, this happens with numeric keys in arrays, too. And since all the data storage classes share method and data namespaces, which means you can't combine named and numbered items in an array without running the risk of overwriting the array methods.
First-class functions and methods? Yup, it's got that... with some *really weird* semantics when it comes to 'this'. Basically, if I have a function foo(), I can call it in three ways: foo(), object.foo(), or new foo(). Each way, the function gets called. 'this' gets assigned differently in each one. In the first, the current value of 'this' gets propagated into foo(). In the second, foo()'s 'this' gets set to 'object'. Yes, this means that these two lines behave differently:
object.foo();
var f = object.foo; f();(The new foo() case is still pretty strange, but at least it's consistent with what you'd expect.)
C-like syntax? Yup, it's got that... but C-like syntax is entirely unsuited for a dynamic language like this, because a C-like syntax implies C-like semantics. Like var. var defines a local variable, right? No, it doesn't, it assigns a new value to the current object context. Which means the value remains valid after it looks like it's gone out of scope. Don't believe me? Open up Firefox's error console (in 'Tools') and try any of these lines:
var a=1; alert(a);
{ var a=2; } alert(a);
var a=3; { var a=4; } alert(a);(The answers are 1, 2 and 4.) If you're used to C, C++, Java, C#, D, or any of the other horde of Algol-based languages, Javascript *lies* to you.
The fact that Javascript has closures is its one redeeming feature, IMO.
The thing about optional semicolons is pretty horrible, too. Try writing a parser for it some time.
If you're interested in dynamic languages, of which Javascript is one, I'd strongly suggest checking out Lua; it's way faster than Javascript, it has all of its features implemented in rather more consistent ways, and is so tiny that one person can understand the entire language (library included) with ease. I do most of my programming in it these days.
(I agree with all your other language choices, BTW; although I'd add Forth to the list as an example of a radically different low-level procedural language, and I'd emphasise Smalltalk more. Smalltalk is a beautiful language. All the shiny new language features people are rediscovering today, Smalltalk had in 1980. Concurrency, dynamicism, polymorphism, extreme programming, closures... it had 'em all. And nobody noticed. It's a shame...)
Sometimes, these things are mutually exclusive -- how do you have a purely-functional, lazily-evaluated language, and also make it simple and imperative?
You might want to check out Io.
-
Re:software engineering != computer science
You know, everyone is always bad-mouthing Javascript, but there are only two other languages that even work similarly to it: SELF, which is a PITA to use, and io, which is a great language (and conforms better to the prototype paradigm invented by SELF). Javascript is a good bridge language between prototypes and classical OOP (as used in C++/Java/etc) that people can grasp a bit easier. Javascript also supports a number of features not supported by the big name languages, such as closures, first class functions, prototypes (obviously), and expando properties. Prototypes and expando properties add some interesting meta-programming aspects (though kind of b0rked due to the poor implementation of prototypes in Javascript).
Please, bad mouth the interpreters, which have mostly been junk (especially Microsoft's, which is abysmal), but not the language itself. -
Re:Easiness
Seconded, although for me the language wasn't Ruby, but Io. If you like Ruby's object purity, use Io. It's far more Ruby-like than Ruby in this respect.
-
Re:Performance, anyone?
> I still don't seem what advantage Ruby has over Lisp or Smalltalk.
IIRC Smalltalk doesn't have open classes and mixins (kind of multiple inheritance). These features can be abused leading to hyperspaghetti code (tangled in a couple more dimensions than regular spaghetti code) but they let people implement very elegant solutions. Over lisp... uhm... it helps with repeated stress syndrome on typing parentheses :)
It would be cool to see common lisp or io "on rails", though. -
Re:What is Perl 6?
If you want to learn something on the leading edge you might even want to consider learning Io No books for Io as yet, but it seems to be be generating buzz among the early adopters (the sort of folks who were using Ruby five years ago).
I've heard of Io before, but I find it hard to take a language seriously if it has its own UI toolkit. That for me implies a lack of abstraction, a philosophy of micromanagement, and--since there's already plenty of existing UI toolkits for which its a cinch to write bindings--a sentiment of Not Invented Here. Let the language be designed so that it steps out of the user's way on many fronts and encourages him to code with whatever already-available libraries might be available.
FWIW, if the OP wants to learn another language beside Perl 5 just in case he were tasked to maintain some outside project, I'd recommend Python. O'Reilly's Learning Python and Programming Python are dynamite books.
-
Re:What is Perl 6?
Probably a pretty good sign I should get off my ass and spend some time learning the language if I don't want to become obsolete to my employer.
I suspect your manager (if s/he is a typical manager) hasn't even heard of Perl 6.
Perl 6 is still vapor at this point. It's probably still a year or two away (and may be perpetually, unfortuneately). Yes, there are cool ideas there and you might want to be familiar with some of the highlevel concepts. But if you really want to study some new languages that will help your employment prospects you'd probably be better off learning Ruby at this point (that Rails stuff is really taking off). If you want to learn something on the leading edge you might even want to consider learning Io No books for Io as yet, but it seems to be be generating buzz among the early adopters (the sort of folks who were using Ruby five years ago). -
About 3 years too late
Ok, Perl6 does indeed look cool. Lots of interesting things there. Sure, you can apparently write Perl6 code today and run it on PUGS (a Haskell implementation of Perl 6; that's gotta be speedy, eh?). But as is mentioned in the article, Perl6 was announced at OSCON 2000; that's 5.5 years ago. It's now become the posterchild for vaporware in the open source world, hence this article to keep the faithful hopeful (and to keep'em from sneaking off to Ruby, Python or even Io). Really, it just looks like the purpose of the article is to say "yes, we're still here working on Perl 6. We're working hard, we really are. Please, don't lose hope. This is hard work. It'll be here one day and it'll be great", while a lot of Perl folks who yearned for something better have already moved on to Ruby or Python.
I really hope that Perl 6 arrives one day. I'm pretty deep into using Ruby these days having left Perl 5 behind long ago (the part of the article about what's wrong with Perl 5 was really superfluous; maybe it was intended to convince the remainingn Perl folks who are happy with 5 to check out 6), but I'll give Perl 6 a look when it arrives. The grammar support alone looks pretty awesome; it'd be great to have a viable lex/yacc alternative. In the meantime I want to learn some languages that have a bit more immediate promise like Io. It seems that maybe the plans for Perl 6 were just too ambitious. Yes, it's great to start with a clean slate and try to revolutionize, but often it's evolution that wins out. -
Re:LISP practical?
Paul Graham and company did a fine job on that language.
I sincerely hope you're not implying that Paul Graham (& co.) invented LISP...
I'm only 23 years old ... I think that makes Java a little more accessible to me than LISP.
Eh? I didn't know there was an age limit. "LISP: Adults Only. Contains content that is suitable only for persons aged 25 and older. Content rated by ESRB." :)
Or maybe you don't want to use any language older than you are, in which case may I recommend the Io programming language, invented in 2002?
(By the way, I'm 21, and I find languages like LISP, Smalltalk and ML fascinating.) -
Not limited to Python.
TFA is talking about the use of coroutines to avoid programming state machines. Coroutines are really very useful, as they allow code as simple as the following:
void Airplane::flyLooping() {
The code, which is supposed to make an airplane actor fly a looping maneuvre, is much simpler than the corresponding state machine code, which would consist of four states. I used this sort of programming in my hobby flightsim project Thunder&Lightning using this C++ implementation of coroutines. There is also Io, an embeddable language with a very small footprint which is easy to learn and nice to program with and which supports coroutines as well (actors in Io's terminology).
levelOut();
centerStick();
pullElevator();
while(!flyingUpsideDown())
yield();
while(flyingUpsideDown())
yield();
centerStick();
levelOut();
} -
Perls's popularity
Is it just me, or Perl has lost much of its old prestige ? Ruby, Python and other languages ( such as the most excellent io language have gained so much momentum and popularity, that Perl just doesn't seem to be getting much attention from the users nowadays.
Rightfully so, if I may say. -
Io
Consider the Io language:
"Io is small prototype-based programming language. The ideas in Io are mostly inspired by Smalltalk (all values are objects), Self, NewtonScript and Act1 (prototype-based differential inheritance, actors and futures for concurrency), LISP (code is a runtime inspectable/modifiable tree) and Lua (small, embeddable)."
Example of Io-code:
http://iolanguage.com/about/samplecode/
My personal experience is that it's extremely easy to write, transparent and very introspective. -
Road Not Taken
Given that, what would the community advise by way of a choice between Java and C#?
Neither. Having watched the video, I am most reminded of AudioPad. For that, "Most of the code is written in Python, except for the low-level tracking code, which is in C and C++." I've also used a demo inspired by that called Mix done in Io. UI experts want to be able to very quickly scale up from the low level of the device to the high level of the research. I would thus suggest you target C in an OO fashion, which will allow binding to all kinds of different higher-level languages.
-
Re:LuaThere's IO langauge too. Prototype based, very small, looks very interesting to play with.
Otherwise, I would recomment looking into Lisp or Haskell. There are nice books like Essentials of programming languages dealing with Lisp/Scheme and how to implement a new language with them. No previous experience of Lisp/Scheme is required for this book.
Another book which is more technical and performance oriented is Lisp In Small Pieces.
Good luck.
Regards, Tommy
-
A few ideas
First, there are two kinds of small languages:
1. small languages like lua, io, and scheme that are small in the built-in libraries and in the total distro. These three are great places to start- both are small, OOPish, allow higher-order programming by passing classes, objects, functions and methods as objects.
2. Then there are languages that are big in some ways, but small in syntax. Some of these are easier to extend than so-called "little languages." The reason is usually that their syntax is small, in an isolated place, easy to get at, and meant to be modified. The two best examples for this are Smalltalk and Lisp. Both of these languages satisfy your other requirements and really kick ass for extention. Unlike the above languages, the so-called little-languages, most Smalltalk and Lisp dialects have big, useful libraries. Unlike a big fat language like perl or C++, having a useful library doesn't mean that the language is a huge pain in the ass to extend.
Both Lisp and Smalltalk have a number of implementations. I am a big fan of Squeak Smalltalk, though systems like Little Smalltalk or even GNU Smalltalk maybe worth checking out.
A lot of people here have bad feelings about Lisp-like languages. It's a shame, since Scheme, ISLISP (OpenLisp is a great implementation) and Common Lisp are all *very* powerful languages. You can be quite productive with them once you get over the part about whining about parens. But Lisp may very well be the best option here, there is a long history of people writing custom-syntaxes and language extensions. Look up Common Lisp macros- power almost beyond comprehension, a lot of fun to play with, and with an elegance all its own.
There are examples of people writing a C-like syntaxes for various Scheme implementations. IIRC, Gambit-C (a Scheme to C compiler) comes with one. On Cliki, there are a bunch of other alternative Scheme syntaxes listed.
To, one of the big advantages to using a language in the second category is that syntax extension/modification is done in the language itself, rather than in C. With that comes the familiarity of the language you're creating and the other benefits you gain by using a high-level language like Smalltalk or Common Lisp.
Just some thoughts... -
Re: Yes, Io is cool
IO Desktop is a source package for the prototype-based language Io, and its web site is www.iolanguage.com, not www.iodesktop.com.
-
Missing Languages
Two languages missing are: Io [...], REXX [...], ficl [...].
You have provided great examples. I would add another two: Unlambda, bf and maybe also Ook. Furthermore, let us not forget about Assembly. Seriously, I strongly believe that if kids today had learned those languages and tried to understand how computers really work, we will have much less Flash/JavaScript/PHP/MySQL "elite" (or "leet," if you will) websites shamefully vulnerable to trivial cross-site scripting and SQL-injection exploits. The problem is that script kiddies today don't want to learn anything, be it REXX, Unlambda, IMCC, Perl 6 or even valid ANSI C for God's sake. We have to do something about it. I agree with you.
-
Nobody ever looks at Io or REXX...
Two languages missing are:
Io, which is an awesome, prototype-based scripting language that's super-easy to embed in C applications, and has an incredibly simple and consistent syntax.
REXX (Regina's just one implementation). REXX makes it incredibly easy to do system scripting, with powerful string-manipulation and I/O redirection.
Another one's ficl, which is basically an embedable Forth interpreter. (To all you young geeks out there - LEARN FORTH. You may never need to write a line of it ever in your life, but you'll learn a hell of a lot about how computers work. Trust me on this.) -
Other prototype languages w/older implementations
-
Check out Io
For those who are dissatisfied with current language offerings, I encourage you to check out Io at http://www.iolanguage.com/
.. It's small, simple and pretty well planned out. -
even better
-
Re:Try Objective-C maybe?
Hm, that seems to need the "www" in front of it, or it gives you the author's homepage. fixed link here.
-
Re:Try Objective-C maybe?
Objective C can be, well, Objectionable C sometimes. There's a nice little language called Io that's similar to Self or NewtonScript, that is developed primarily on OSX, and includes an Objective C FFI. This means you can develop the low-level bits in Objective C, then script messages to it in Io. I'm told it does work with GNUStep as well.
Io won't give you bug free software any more than ObjC will, but it will make writing software, bugs and all, a lot more fun :) -
Io, Groovy
-
Re:Misconception