Bobby
Junior Poster
Welly welly welly well
Posts: 14
|
Post by Bobby on Dec 7, 2010 23:21:02 GMT
Languages with poor documentation and too small of communities for the resources to amount to anything. I've been doing some with the Io language recently. Great language, its concurrency support is bar none, but the documentation is virtually nonexistent.
|
|
xcessive
Epic Poster
.[M:5000]
Posts: 526
|
Post by xcessive on Dec 8, 2010 1:32:07 GMT
Languages with poor documentation and too small of communities for the resources to amount to anything. I've been doing some with the Io language recently. Great language, its concurrency support is bar none, but the documentation is virtually nonexistent. I Googled Io. It looks interesting, and a bit like SmallTalk. The C++ integration is intriguing and I saw mention of using it via CGI..................................?
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Dec 8, 2010 3:55:53 GMT
I've never heard of lo!
|
|
|
Post by hbk on Dec 8, 2010 11:12:05 GMT
Then look it up.
|
|
Bobby
Junior Poster
Welly welly welly well
Posts: 14
|
Post by Bobby on Dec 8, 2010 15:35:27 GMT
Languages with poor documentation and too small of communities for the resources to amount to anything. I've been doing some with the Io language recently. Great language, its concurrency support is bar none, but the documentation is virtually nonexistent. I Googled Io. It looks interesting, and a bit like SmallTalk. The C++ integration is intriguing and I saw mention of using it via CGI..................................? Io has a lot of similarities with SmallTalk and Lisp. Like SmallTalk and Ruby, everything in Io is an object. Io is a prototype OOP language, which means you never actually write any classes. Rather, when creating new objects you're always cloning something else. At the most generic level it's going to be Object. And like SmallTalk, Io uses a messaging system which can be chained. For example: #!/usr/bin/env io
Mother := Object clone do ( genes ::= "Her genes" )
Father := Object clone do ( genes ::= "His genes" )
Child := Mother Father clone do ( genes ::= "Their genes" )
baby := Child clone baby genes println That example demonstrates multiple inheritance (Child inherits both Mother and Father). It also shows how the message chaining works at the end. The println method is being called "in context" of genes, which is called in context of the baby object. Io has decent bindings to C++. Which makes sense though because Io is very small without any addons. Functionality such as large numbers (BigNum), sockets, threading, etc. doesn't exist by default. You need to install that functionality through addons. And all of these addons, which are typically included by default in many languages, use very similar bindings to what you would use to extend Io as an application-specific scripting engine. In that regard it's similar to Lua. As for the CGI- Io supports it through an addon. Right now though there is no Apache DSO to handle Io. Thus its efficiency is quite sub par. But you can still tell Apache to treat .io files as a CGI script ( AddHandler cgi-script .io). Using the CGI addon#!/usr/local/bin/io
cgi := CGI clone
cgi header ("Content-type", "text/html") cgi sendHeaders
# GET if (cgi getParameters size > 0) then ( cgi getParameters foreach (k, v, cgi write (k .. " => " .. v .. "<br />") ) )
# POST if (cgi postParameters size > 0) then ( cgi postParameters foreach (k, v, cgi write (k .. " => " .. v .. "<br />") ) ) Without CGI addon#!/usr/local/bin/io
writeln ("Content-type: text/html\n\n")
# GET parameters envs := System getEnvironmentVariable ("QUERY_STRING") split ("&") if (envs size > 0) then ( envs foreach (v, param := v split ("=") writeln (param at (0) .. " => " .. param at (1) .. "<br />") ) )
# POST parameters post := File standardInput readLines if (post size > 0) then ( post foreach (v, param := v split ("=") writeln (param at (0) .. " => " .. param at (1) .. "<br />") ) ) Functionally, both of the above are identical. The CGI addon obviously offers much cleaner code. It also handles parsing HTML entities for you. In the second example the string "Hello!" would display as "Hello%21" because of the exclamation mark. But all in all, the differences are minimal and you could get by without using the CGI addon if you so desired.
|
|
xcessive
Epic Poster
.[M:5000]
Posts: 526
|
Post by xcessive on Dec 9, 2010 1:01:01 GMT
I Googled Io. It looks interesting, and a bit like SmallTalk. The C++ integration is intriguing and I saw mention of using it via CGI..................................? Io has a lot of similarities with SmallTalk and Lisp. Like SmallTalk and Ruby, everything in Io is an object. Io is a prototype OOP language, which means you never actually write any classes. Rather, when creating new objects you're always cloning something else. At the most generic level it's going to be Object. And like SmallTalk, Io uses a messaging system which can be chained. For example: #!/usr/bin/env io
Mother := Object clone do ( genes ::= "Her genes" )
Father := Object clone do ( genes ::= "His genes" )
Child := Mother Father clone do ( genes ::= "Their genes" )
baby := Child clone baby genes println That example demonstrates multiple inheritance (Child inherits both Mother and Father). It also shows how the message chaining works at the end. The println method is being called "in context" of genes, which is called in context of the baby object. Io has decent bindings to C++. Which makes sense though because Io is very small without any addons. Functionality such as large numbers (BigNum), sockets, threading, etc. doesn't exist by default. You need to install that functionality through addons. And all of these addons, which are typically included by default in many languages, use very similar bindings to what you would use to extend Io as an application-specific scripting engine. In that regard it's similar to Lua. As for the CGI- Io supports it through an addon. Right now though there is no Apache DSO to handle Io. Thus its efficiency is quite sub par. But you can still tell Apache to treat .io files as a CGI script ( AddHandler cgi-script .io). Using the CGI addon#!/usr/local/bin/io
cgi := CGI clone
cgi header ("Content-type", "text/html") cgi sendHeaders
# GET if (cgi getParameters size > 0) then ( cgi getParameters foreach (k, v, cgi write (k .. " => " .. v .. "<br />") ) )
# POST if (cgi postParameters size > 0) then ( cgi postParameters foreach (k, v, cgi write (k .. " => " .. v .. "<br />") ) ) Without CGI addon#!/usr/local/bin/io
writeln ("Content-type: text/html\n\n")
# GET parameters envs := System getEnvironmentVariable ("QUERY_STRING") split ("&") if (envs size > 0) then ( envs foreach (v, param := v split ("=") writeln (param at (0) .. " => " .. param at (1) .. "<br />") ) )
# POST parameters post := File standardInput readLines if (post size > 0) then ( post foreach (v, param := v split ("=") writeln (param at (0) .. " => " .. param at (1) .. "<br />") ) ) Functionally, both of the above are identical. The CGI addon obviously offers much cleaner code. It also handles parsing HTML entities for you. In the second example the string "Hello!" would display as "Hello%21" because of the exclamation mark. But all in all, the differences are minimal and you could get by without using the CGI addon if you so desired. Looks like an intriguing language although the lack of DSO is a bummer. Still I am interested in learning this, although as you said there is poor documentation. It could be really useful as it binds well to C++ and I've been looking for an alternative to Lua. Where would I start?
|
|
Bobby
Junior Poster
Welly welly welly well
Posts: 14
|
Post by Bobby on Dec 9, 2010 2:39:23 GMT
Looks like an intriguing language although the lack of DSO is a bummer. Still I am interested in learning this, although as you said there is poor documentation. It could be really useful as it binds well to C++ and I've been looking for an alternative to Lua. Where would I start? www.iolanguage.com/There is no Windows binary, so you'll need to build from the source if that's what you use. The guide and reference on the site are decent. But they're not comprehensive. Certainly not what I'd expect to see for a programming language.
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Dec 9, 2010 5:05:24 GMT
I hate when things don't work right. (the first time)
|
|
xcessive
Epic Poster
.[M:5000]
Posts: 526
|
Post by xcessive on Dec 9, 2010 10:19:53 GMT
I hate when things don't work right. (the first time) Then maybe coding isn't for you. Things never work the first time.
|
|
|
Post by hbk on Dec 9, 2010 10:39:29 GMT
I hate when things don't work right. (the first time) But that is what makes it fun, unless it happens too many times then it's frustrating.
|
|
prads
Elite Poster
[M:0]
It's a shame that PI isn't an integer :(
Posts: 361
|
Post by prads on Dec 9, 2010 12:46:59 GMT
If it happens too many times, you seriously need to reconsider your design.
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Dec 10, 2010 5:55:20 GMT
I hate when things don't work right. (the first time) Then maybe coding isn't for you. Things never work the first time. Some things do work the first time..... ;D
|
|
John Wankel
Elite Poster
Coding for you one step at a time[M:0]
Posts: 399
|
Post by John Wankel on Dec 10, 2010 18:33:03 GMT
I hate when things don't work right. (the first time) But that is what makes it fun, unless it happens too many times then it's frustrating. Yeah, things not working is part of coding.
|
|
edenwax
VIP
v5 Beta Tester[M:5000]
Posts: 1,266
|
Post by edenwax on Dec 10, 2010 18:34:56 GMT
xD Debugging sucks, yes. Especially when something isnt working and you find its just a small mistyped variable or symbol.. But it's just a part of coding.
|
|
John Wankel
Elite Poster
Coding for you one step at a time[M:0]
Posts: 399
|
Post by John Wankel on Dec 10, 2010 19:22:43 GMT
It's annoying in JS when you start your code like this: <script> <!-- And end it with </script> And it doesn't work as you left //--> out by mistake
|
|
Jordan
Elite Poster
[M:5000]
Posts: 286
|
Post by Jordan on Dec 12, 2010 1:29:33 GMT
I find logical errors to be the most annoying since they are the hardest to debug and locate. Once you've done a good amount of coding, syntactic problems disappear for you unless you are learning a new language, but even then it's usually not hard to figure out what you are doing wrong. When you have a logical error in your code there's a good chance that you won't have any idea as to where you messed up.
|
|