VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Pages: 1 [2] 3

Author Topic: Obscure Programming Languages Review (WAS: 'Libs from slackware repo's?')  (Read 8050 times)

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682
Re: Libs from slackware repo's?
« Reply #15 on: March 17, 2009, 02:52:33 am »

I just discovered it from looking for io @ google,  it seems that people involved in io is somewhat related to development of other new languages. 
For example, some people in #io are in #squeak, #smalltalk, #parrot, #perl6, etc.

You gotta love that :)

Btw, today is the parrot 1.0 release day.    I've tried some things with earlier git versions and perl6 seems a beast on its own.  If we can merge many programming languages all executing in the same parrot vm... well, let's see how it evolves and how community takes this parrot release.


Windozer

  • Vectorite
  • ***
  • Posts: 386
  • Have Vector Linux, Will Travel.
Obscure Programming Languages Review (WAS Re: Libs from slackware repo's?)
« Reply #16 on: March 21, 2009, 08:23:43 am »

Quote from: kidd
Btw, today is the parrot 1.0 release day.    I've tried some things with earlier git versions and perl6 seems a beast on its own.  If we can merge many programming languages all executing in the same parrot vm... well, let's see how it evolves and how community takes this parrot release.

Only read a bit recently about Parrot ... looks amazing... does it allow cross-language communication without bogging down the machine?  I mean, it seems odd to have, say, the Io VM running in the Parrot VM, which in turn might be running a Perl program - and then they share something.  At some point, isn't it more sensible just to write the application from scratch in one language that is robust enough to get the intended result? Then again, reusing code is a big advantage.  Or am I missing the Parrot boat here?

On the Io front: Kidd, Rodrigo mentioned above that you're working on compiling Io... do you plan to package it up for VL? (Please  :D)

- H

« Last Edit: March 21, 2009, 01:23:58 pm by Windozer »
Logged
483,617th Registered Linux Snoozer

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682
Re: Libs from slackware repo's?
« Reply #17 on: March 21, 2009, 10:44:25 am »

Hey windozer! weekend time == hacking time, right?  :D

Parrot is a vm and it's flexible enough to make (reasonably) easy to implement language interpreters in it.

I'm no expert at parrot affairs by any means, but I think:

It means that you won't have a python interpreter interacting with parrot vm but a python interpreter bundled into parrot, so it manages everything on its own.

The thing is every single language that parrot can understand will be internally translated to a parrot bytecode.  It's a kind of assembler for parrot , or java bytecode.  There is where parrot can merge code trees, calls, and objects.  When it's working, it will allow using cpan modules from python, or ruby libraries from perl.  It's not only being able to exec a function, but managing objects from different languages at the same time! I've seen some codes that already do that.  To be able to do this, parrot devs are doing super-extra effords to make parrot language agnostic, and not supposing anything about the languages that it's interpreting.  This way, every language can work as a self, and then be executed there, in that 'heterogenous' environment.

It's more or less what .net vm does for some (mostly static) languages, where .o files (compiled objects) have all info, and it links them all and make them run, but for dynamic languages, where mostly everything is decided at runtime.

To make it happen, parrot vm can do continuations (the most powerful of all control structures).


Exciting, isn't it?

As for Io package, we're having some troubles packaging it...the source package is totally caotic.  We'll see how it ends :/

Windozer

  • Vectorite
  • ***
  • Posts: 386
  • Have Vector Linux, Will Travel.
Obscure Programming Languages Review (WAS Re: Libs from slackware repo's?)
« Reply #18 on: March 21, 2009, 01:15:54 pm »

Quote from: kidd
weekend time == hacking time, right?  :D

Yes indeedy ... chop! chop!  8) ;D

Quote
[...] every single language that parrot can understand will be internally translated to a parrot bytecode.  [...] parrot devs are doing super-extra effords to make parrot language agnostic, and not supposing anything about the languages that it's interpreting.  This way, every language can work as a self [... and the] parrot vm can do continuations

Wonderful.  The downsides might be that parrot users have to wait for their respective languange to get an updated parrot interface when there's a major revision (to their favorite language).  And with state maintained (contiuations), the more languages and libraries you're using, the more resources will be gobbled up. Do you think parrot will be able to handle a large, real-world application suite?


Quote
.net vm [compared to] dynamic languages

Can parrot impliment .net ?  It (.net) was a real cluster at first, but now, it has serious libs, and has generally gotten better (unless you have to do middleware with it) - nicer especially when you can go from C# to boo... (Ah, yet another cool language!)

Quote
Exciting, isn't it?

Indeed - and thanks for bringing our attention to this.  You know, Kidd, we've been off the original topic so long that I took the liberty to rename this thread (or alt least my reply)

Quote
As for Io package, we're having some troubles packaging it...the source package is totally caotic.  We'll see how it ends :/

Oh, thanks, now I don't feel so bad - I tried to compile it from source - and got unexpected errors that I'm still hacking on.


ciao - and back to chopping  ;) - H
Logged
483,617th Registered Linux Snoozer

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682

Windozer++ for the thread renaming.

Keep in mind it's not as dynamic as smalltalk, where everything you *can* use must be loaded.  The more libs you use in your app the more resources it'll take, but that happens everywhere.  I've red somewhere that some benchmarks perform better in parrot than in its original interpreters.

To get a better idea of some ideas about parrot here's an Allison Randal's (parrot architect) talk about it: http://video.google.com/videoplay?docid=2900106024749292774 . She gives a fairly good intro to what's all about.

<speculate>Being compiled languages, if someone wrote the parser and all the structure, I suppose it could run .net code, but not code compiled in .net compiler. </speculate>

I have no experience in .net nor mono (linux and c++ and perl at $work), but I've heard that's getting better and better (with CLR and so)

push @todo , "boo";  # stack overflow is near

To compile and install io on your box , you can unpack it, cd to the main dir, and then  make vm; make install . then ldconfig -v .

I think that's all you need to have a basic io vm in your box.  Installing libs is a real PITA though.

PS: searching @ youtube I stumbled upon this error : http://puntoblogspot.blogspot.com/2009/03/we-have-some-trained-monkeys.html  . funny , eh?
« Last Edit: March 21, 2009, 02:20:45 pm by kidd »
Logged

Windozer

  • Vectorite
  • ***
  • Posts: 386
  • Have Vector Linux, Will Travel.

Quote from: kidd
ideas about parrot here's an Allison Randal's (parrot architect) http://video.google.com/videoplay?docid=2900106024749292774 . She gives a fairly good intro to what's all about.

Yes - although a bit droll of a speaker, she gives an excellent explanation of many essential elements to the subject at hand, including a good, high-level glimpse at programming oddities such as 'corountines' --- she calls them "vcr pause and replay subroutines" and an interesting discussion of stacks versus registers (the latter is what parrot uses). 

This video is highly recommendable for anyone interested in improving their understanding of programming languages.

> push @todo , "boo";  # stack overflow is near

 ;D ;D
Quote
[...] then ldconfig -v .

OH, thanks!  I forgot the '-v' ... no wonder it was weird... works now!.  newslot := chop chop

Quote
Installing libs is a real PITA though.

Keep us posted ... I'll try them too.

Quote
I stumbled upon this error : http://puntoblogspot.blogspot.com/2009/03/we-have-some-trained-monkeys.html  . funny , eh?

All I get in opera and seamonkey is an empty frame...  ???

Coders := Io (rocks)
« Last Edit: March 23, 2009, 05:44:01 pm by Windozer »
Logged
483,617th Registered Linux Snoozer

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682

I'm glad you liked the video.  I liked it very much too.

Broken link now fixed.

This weekend I've experimented with a couple of smalltalk web frameworks (seaside and Aida).  If I find some time, I'm gonna write something about my feelings wiht them.


See ya next weekend :p

Windozer

  • Vectorite
  • ***
  • Posts: 386
  • Have Vector Linux, Will Travel.

Quote from: kidd
See ya next weekend :p

Sometimes I hack during the week too  ::)

Quote
smalltalk web frameworks

Smalltalk is sooo cool ... I think I might pick it up again too...

Did you ever get editline (RE libedit Rodrigo mentions above) to work in Io?  My Io install seemed to go ok, but the lineedit features which our VL terminals have (Terminal 0.2.8.3 and urxvt) don't get picked up by the Io cli. Any ideas?

- H

PS ... that link was so funny that I posted in humor thread...


« Last Edit: March 23, 2009, 05:46:08 pm by Windozer »
Logged
483,617th Registered Linux Snoozer

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682

Installing libedit from the repos should work, but as I said we're still trying to 'get' what's Io tarball about :)

If it doesn't work for you, you can try to compile http://www.thrysoee.dk/editline/ on your own. 

Installing is pretty forward.  ./configure && make && make install .


Seeya

Windozer

  • Vectorite
  • ***
  • Posts: 386
  • Have Vector Linux, Will Travel.

Quote
Installing libedit from the repos should work,

Ahhh, well, I did have libedit in place from the repo before doing the Io compile - and the Io listserve archives mention that Io should spot libedit and install editline.  Maybe editline is an addon to compile separately? (I'm asking the listserve that now.)

Quote
try to compile http://www.thrysoee.dk/editline/ on your own. 

The lib is ok out of the repo, I think.

Quote
but as I said we're still trying to 'get' what's Io tarball about :)

Tar is already sticky enough stuff on its own  :P

You know, I tried that Io code you have above, but got an error that says the arg to getSlot(i) must be a sequence not a number, ditto the Io reference --- how'd you get that to work?  ???

thanks
- H
Logged
483,617th Registered Linux Snoozer

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682

You can try to break the expression down to little parts to see where it breaks.   For me, the code is working with a simple cut&paste. 
We may have differnent versions? ...
Code: [Select]
Number slotNames foreach(i,                             
     if(Number getSlot(i) type == "Block" ,
             (i .. "     ->  " .. Number getSlot(i) code)  println))

Number slotNames => That should return a list of sequences (strings), with all Number 'class' methods, attributes, blocks , functions, and whatever .-
foreach ...      => we iterate that list , asking for each one, if it's a block or not.
.......          => If it is , it means we have the code available, so let's show it


HTH

Windozer

  • Vectorite
  • ***
  • Posts: 386
  • Have Vector Linux, Will Travel.

Quote from: kidd
break the expression down to little parts to see where it breaks.   For me, the code is working with a simple cut&paste. 
We may have differnent versions? ...

Have a version that's only a few weeks old. Yes... originally did the cut and paste too, but it didn't like ' i ' in getSlot(i). Breaking it down into chunks did same. It treated ' i ' as type number, but Io expects type sequence in getSlot() --- which makes sense as the slot names (keys) are strings.

I'm probably not putting your code snippet into the right context.

> Number slotNames => That should return a list of sequences (strings)

So the " i " in 

>  if(Number getSlot(i) type == "Bock" ,

should be that list of sequences ?

Do you have a sample using getSlots in a different way?

thanks
- H
(PS, I'm looking at Ioke too --- pretty amazing ... down side is getting it installed isn't so simple.)
Logged
483,617th Registered Linux Snoozer

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682

getSlot takes a sequence (string), so if 'i' var is typed as a number, there
must be a problem with the foreach loop. 

I've just discovered that foreach can take 2 or 3 parameters, the 2 params
version being 'element' and 'code',   and the 3 param version being 'index',
'element', code.

'element' and 'index' are set for you and should be available during each iteration with the correct value.

Sample
Code: [Select]
Io> list(6,7,8,9) foreach(i,j , i println)
0
1
2
3
==> 3
Io> list(6,7,8,9) foreach(i,j , j println)
6
7
8
9
==> 9
Io> list(6,7,8,9) foreach(i, i println)
6
7
8
9

you could try to print i type inside the foreach loop like

Code: [Select]
Number getSlots foreach(i, i type println)
« Last Edit: March 28, 2009, 03:20:24 pm by kidd »
Logged

Windozer

  • Vectorite
  • ***
  • Posts: 386
  • Have Vector Linux, Will Travel.

Thanks Kidd, I'll noodle around with that a bit and report back...

switching language gears a second...

Do you happen to use active perl or strawberry on win?  If so, which do you prefer?

cheers
- H

Logged
483,617th Registered Linux Snoozer

kidd

  • Packager
  • Vectorian
  • ****
  • Posts: 682

I use linux at work too, so I haven't used windows in a while.

I used active perl some years ago, but I think strawberry perl is closer to the origina linux implementation.

Adam Kennedy (a great perl hacker) is doing some great stuff with strawberry perl lately. Don't know much more related to that though
Pages: 1 [2] 3