Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

iolanguage · Io

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 8213 - 8242 of 13333   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#8213 From: Nicholas Seckar <nseckar@...>
Date: Mon Jan 30, 2006 7:22 pm
Subject: Re: [Io] Regex question
nseckar
Send Email Send Email
 
On 28-Jan-06, at 6:11 PM, Nathan Winther wrote:

> Has anyone got multiline regular expressions to work?

Seems like a bug. I'll take a look later today.

#8214 From: "dennisf486" <dennisf486@...>
Date: Sat Feb 4, 2006 4:22 am
Subject: Why not write an operating system in Io?
dennisf486
Send Email Send Email
 
Hi.  I'm new to the Io community here so I hope I'm not committing a
faux pas by posting to the mailing list about a project I want to do
*with* Io rather than a question about the Io project.  I think you
guys would probably get a real kick out of the idea of having an
operating system written in Io rather than running Io on a host OS -
don't you deserve to have the whole machine to yourself? - but if
you'd rather I moved this discussion elsewhere, let me know.

I've been building a homebrew computer based on a 68K chip, and also I
do a lot of homemade robots based on a variety of embedded controller
technologies.  I've been looking for a language / virtual machine
combination that would allow me to write a minimalist operating system
for robot projects or embedded control systems.  So I searched for a
pure, object oriented, minimalist language.  I was going to write one
myself but then I found Io.  It's small, pure, object oriented, and
doesn't require a huge virtual machine.  Just what I need for a
virtual machine based robot/embedded controller OS.

Most people these days think of a virtual machine as something that
runs on top of the operating system, but in fact a virtual machine
makes a wonderful back-end for an operating system.  You can use the
language interpreter or virtual machine to emulate any part of the
hardware which the operating system needs but which your computer of
choice does not have.  You can also use the object-orientedness of the
language to protect data and modularize the OS, making it more elegant
and more robust.  Finally, you can even write the operating system in
such a way that the OS could be seamlessly integrated into loaded
programs, so that your operating system routines are as easy to access
as parts of your own program.

This is not a new idea.  Smalltalk (as far as I have been able to tell
from reading about it; I'm not old enough to have been there) was
intended as a comprehensive whole-computer environment, and although
none of the literature I have read actually calls it an "operating
system" per se, I think by todays standards it did a lot of what we
consider to be the job of an operating system.  Case in point:  the
Apple operating system's user interface was inspired by the Smalltalk
environment.

What is different about what this operating system would be is that it
would carry Io's minimalist philosophy into the design of the
operating system written in Io.  For one thing, I have prototyped some
code in C# which allows you to write a component based system in such
a way that all messages between subsystems are sent to connection
points in the kernel before they go to the destination objects.  What
that means is that the sender of the message is isolated from the
receiver.   If you remove the receiver you don't get a null reference
exception because the connection point is still there (because the
kernel is always there).  The messages are simply dropped on the
floor.  That means that you can dynamically add and remove components
(such as a file system or window manager), or even hook in two
different components to the same place, without the rest of the
components even knowing that anything has changed.  That way you could
easily strip down the operating system to be as small as you needed
it, or plug in features to run different hardware.  By running every
subsystem in this sort of "sandbox", operating system failures are
limited to the component and can't spread to other subsystems, so if
any part crashes the kernel can simply destroy and reconstruct that
object instead of rebooting.  Microsoft found that 90% of their OS
crashes (especially blue screens) came from device driver code.
Knowing that, don't you wish that your desktop operating system ran
each device driver in a sandbox?

Some people are doing some very interesting work on an operating
system called Singularity which uses C# to do some things similar to
what I just described.  I don't know how they implemented it in
Singularity so I've developed my own ways to do it.  Io, however,
might make a much better platform than C# for embedded computers, and
besides, it would be a helluva lot of fun.

So, why not write an operating system in Io?

#8215 From: "Samuel A. Falvo II" <sam.falvo@...>
Date: Sat Feb 4, 2006 7:09 am
Subject: Re: [Io] Why not write an operating system in Io?
falvosa
Send Email Send Email
 
On 2/3/06, dennisf486 <dennisf486@...> wrote:
> *with* Io rather than a question about the Io project.  I think you
> guys would probably get a real kick out of the idea of having an
> operating system written in Io rather than running Io on a host OS -

There is a project called ioL4, which is Io ported to the L4
microkernel.  However, it is woefully out of date.

--
Samuel A. Falvo II

#8216 From: Jonas Eschenburg <indyjo@...>
Date: Sat Feb 4, 2006 12:36 pm
Subject: Re: [Io] Making Io stackless
jonas_eschen...
Send Email Send Email
 
Hi,

more than a week has passed without any significant attention. I guess
this is not due to lack of interest, but to poor wording and a lack of
understanding on my side. In the meantime, I've had a look a what the
Stackless Python people had to go through. Here is a link to the
discussion that started the project:

http://mail.python.org/pipermail/python-dev/1999-May/000089.html

Also, I have taken a look at what exactly causes recursion in Io's
implementation. Basically, whenever some C implementation of an Io
function calls IoMessage_locals_valueArgAt_( ) or one of its children,
the argument message is evaluated recursively. This is, of course, a
consequence of Io's on-demand argument evaluation and there is nothing
wrong with it. Yet, I'd guess that more than 90% of Io's methods don't
depend on on-demand evaluation of messages. We would reduce a lot of
recursion by pre-evaluating arguments passed to those methods.

Recently, Massimiliano Gubinelli asked for continuations in Io.
Continuations, from what I have gathered, are a kind of bookmark in the
program flow, to which you can jump at will. While having the bad taste
of goto sticking to them, they seem to be a good base for higher-level
program flow mechanisms. Stackless Python used continuations in its
first versions to build coroutines and other abstractions.

With regard to the 10% of functions that require on-demand evaluation,
my idea is that they could be implemented using continuation passing
style in a non-recursive fashion.

Jonas


Jonas Eschenburg schrieb:
> Hi,
>
> while I was working on the Windows implementation of coroutines, it
> occurred to me that maybe we are making things more difficult than they
> need to be. Instead of creating a new C stack for every coroutine, why
> not implement a program stack as an Io primitive?
>
> This would provide some major benefits:
>
>     * Total platform independence, no ugly setjmp/longjmp or fibers code
>     * Io actors/coroutines could be made persistent
>     * Much more conservative C stack usage
>     * Stack overflow problems due to fixed size C stack in coroutines solved
>
> Io already handles message sequences without recursion on the C stack in
> IoObject_locals_perform_. The problem is control structures like "if",
> "while", "for" etc., whose C implementations use recursion. Could they
> be reimplemented in a non-recursive way, using only stack operations?
> Then, there is "yield" which would simply switch the current (Io) stack
> to that of the next scheduled coroutine.
>
> Do you like the idea?
> Do you think it's feasible?
> I know there is Stackless Python, does anybody have experiences with it?
>
> Jonas
>
>
> PS: In case you're interested, my main motivation is to eventually be
> able to save the state of my game (http//tnlgame.net) using Io's
> persistence system.
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

#8217 From: "semmerlbemmerl" <adolf_mathias@...>
Date: Sun Feb 5, 2006 10:40 pm
Subject: cond
semmerlbemmerl
Send Email Send Email
 
Hi everybody,

the 1.0beta made some things different, so I decided to try to write a
conditional analogous to the if example I found somewhere on the
webpage, and which doesn't work since 1.0b. So, here goes my attempt
at cond:

cond:=method(
   call do(
     i:=0; args:=message arguments; s:=args size-1
     while(i<s,
           if(sender doMessage(args at(i)),
              return(sender doMessage(args at(i+1))))
           i=i+2)
     return(if(i==s, sender doMessage(args at(i)), nil))
   )
)

it evaluates, starting with i=0, arg i, and returns the evaluation of
i+1 when arg i evaluated to true. When the number of elements is odd
and none of the even-numbered args was true, the evaluation of the
last argument is returned.

I realize that this is not very spectacular, but since I'm rather new
to IO and couldn't find working examples of this kind, I thought I'd
post it. Any thoughts or comments?

Dolfi

#8218 From: "d_peschel" <dpeschel@...>
Date: Mon Feb 6, 2006 2:49 am
Subject: 2006-01-27 release -- Working OS X distribution?
d_peschel
Send Email Send Email
 
The features of Io are very promising, but I downloaded it hoping to learn
the language by using Propulsion (or some other debugger or introspection
utility).  I also wanted to see the graphics and GUI features.

Downloading the IoFull-2006-01-27 distribution and running "make" and
"sudo make install" in the IoFull-2006-01-27 directory was easy,
but it simply installs the binaries.  I don't know the difference between
them.  Trying to run scripts gets an error about autoImportResources or
something else.  Does anyone have a recent "cookbook" procedure?

Other posts mention autoImportResources and mention that the sample apps
don't really work, so I know other people are having the same problem.
Would it be better to create a minimal source distribution of things that
have been tested recently, and merge the old code into the new distribution
as it is updated?  Then the distribution would at least deliver what it
promises.  I thought of keeping the old code in an "outdated" directory,
but the "good archive" scheme would also offer reduced download size and
quicker configuration, which the "outdated" scheme would not.

Thanks,

-- Derek

#8219 From: Jason Grossman <Jason.Grossman@...>
Date: Mon Feb 6, 2006 4:53 am
Subject: Re: [Io] 2006-01-27 release -- Working OS X distribution?
jas0ngr0ssman
Send Email Send Email
 
On 06/02/2006, at 1:49 pm, d_peschel wrote:

> Would it be better to create a minimal source distribution of
> things that
> have been tested recently, and merge the old code into the new
> distribution
> as it is updated?  Then the distribution would at least deliver
> what it
> promises.  I thought of keeping the old code in an "outdated"
> directory,
> but the "good archive" scheme would also offer reduced download
> size and
> quicker configuration, which the "outdated" scheme would not.

I think this is a great idea.

How to implement it?  Maybe individuals should sign up to their
favourite example code to (try to) make sure that it works with each
release.  Then the "good archive" could consist only of the examples
which had someone signed up to them.  I volunteer to do this for
IoWiki, for starters.

Jason

#8220 From: Stacy Curl <stacy.curl@...>
Date: Mon Feb 6, 2006 6:44 am
Subject: Re: [Io] Making Io stackless
stacycurl
Send Email Send Email
 
I hope that Io will not loose the capability to perform lazy evaluation of arguments,
Using this feature it is possible to define language syntax on a per invocation basis,
which provides the wonderful capability to incrementally migrate to a domain specific
language.

sql(Select * from foo where blah)

sql = method(
  //obtain texttual form of argument and interpret as SQL.
)

I don't know of any other language which allows an embedded DSL to have
so few restrictions on syntax. Without lazy evaluation this would be impossible
as the arguments would have to be interpreted in the context of the caller.

On 04/02/06, Jonas Eschenburg <indyjo@...> wrote:
 

...We would reduce a lot of
recursion by pre-evaluating arguments passed to those methods.


#8221 From: Nicholas Seckar <nseckar@...>
Date: Mon Feb 6, 2006 6:55 am
Subject: Re: [Io] Making Io stackless
nseckar
Send Email Send Email
 
On 6-Feb-06, at 1:44 AM, Stacy Curl wrote:

> I hope that Io will not loose the capability to perform lazy
> evaluation of arguments,

I don't think you need to worry about that happening. :-)

#8222 From: Jon Kleiser <jon.kleiser@...>
Date: Mon Feb 6, 2006 9:06 am
Subject: darcs repo: How to submit?
jon_kleiser
Send Email Send Email
 
Quite a few times I've tried to submit patches to the darcs repo, but
I've got no indication that they really made it through, or have been
accepted. I have followed the instructions on the Downloads page,
except that I've done a "darcs record" before I did the "darcs send".
The send even finished with these promising lines:

Thu Feb  2 16:49:17 CET 2006  jon.kleiser@...
    * launchPath fix, absolute/relative (trying one more time)
Shall I send this patch? (1/1) [ynWvpxqadjk], or ? for help: y
Successfully sent patch bundle to: steve@....

I strongly urge someone who really knows how to do it the right way,
to give a detailed description.
I'm using Mac OS X 10.4.4.

/Jon

#8223 From: SainTiss <saintiss@...>
Date: Mon Feb 6, 2006 3:58 pm
Subject: very strange behaviour when overriding clone
saintiss@...
Send Email Send Email
 
Hi all,

I'm getting some VERY weird behaviour here: the following code should
obviously result in the objects with name="a" and name="b" being the two
elements in the _allClones list.

However, if you run the program, you will see the object with name="a"
is there twice, and the other one is not there.

Even more strange, the second time WList append is called (upon cloning
b), the argument which is passed in the caller (i.e. nObject) is NOT the
same as the argument the callee gets passed (i.e. elVal). Apparently,
something goes wrong during this call:
     call message setArguments(newArgs)

somehow, this makes sure for the second call elVal keeps the same value
it had in the first call.

Note that if I comment out the setArguments call, and use
super(append(elVal)) instead, things work as expected.

Is there any logical explanation for this?

Thanks,

Hans




Object cloneOld := Object getSlot("clone") clone

WList := List cloneOld do (
   append := method (elVal,
     newArgs := List cloneOld
     writeln("arg: ", elVal)
     m := Message cloneOld setCachedResult(elVal)
     newArgs append(m)
     call message setArguments(newArgs)
     resend
//     super(append(elVal))
   )
)

Object clone := method(
     nObject := self cloneOld
     self hasSlot("_allClones") ifTrue (
       writeln("appending to allClones: ", self, nObject)
       self _allClones append(nObject)
     )
     nObject _allClones := WList cloneOld
     return nObject
)

A := Object clone do (
   name := "A"
)

a := A clone do (
   name := "a"
)
b := A clone do (
   name := "b"
)

writeln("RESULTING _allClones LIST:")
A _allClones foreach(c,
   writeln(c)
)


--
People are promoted up to their level of incompetence
   -- Peter's Principle

Hans Schippers
Research Assistant of the Research Foundation - Flanders (FWO -
Vlaanderen) http://www.win.ua.ac.be/~hschipp/
Formal Techniques in Software Engineering (FoTS)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen - Belgium
Phone: +32 3 265 38 71
Fax: +32 3 265 37 77

#8224 From: Steve Dekorte <steve@...>
Date: Mon Feb 6, 2006 7:30 pm
Subject: Re: [Io] very strange behaviour when overriding clone
stevedekorte
Send Email Send Email
 
On 06-Feb-06, at AM 07:58, SainTiss wrote:
> Object cloneOld := Object getSlot("clone") clone

Why are you cloning the clone method?

-- Steve

#8225 From: SainTiss <saintiss@...>
Date: Mon Feb 6, 2006 8:23 pm
Subject: Re: [Io] very strange behaviour when overriding clone
saintiss@...
Send Email Send Email
 
Ok, that's probably not really necessary... This code stems down from some
things I've been trying before, and then I modified clone more severely,
which is why I wanted to have the original in case I didn't want my
modifications for some objects.

But would that have any influence?

Thanks,

Hans

On Monday 06 February 2006 20:30, Steve Dekorte wrote:
> On 06-Feb-06, at AM 07:58, SainTiss wrote:
> > Object cloneOld := Object getSlot("clone") clone
>
> Why are you cloning the clone method?
>
> -- Steve
>
>
>
>
> Yahoo! Groups Links
>
>
>

--
If we cannot live so as to be happy, let us at least live so as to deserve it
  -- Immanuel Hermann Fichte

People are promoted up to their level of incompetence
  -- Peter's Principle

Ark Linux - Linux for the Masses (http://arklinux.org)

Hans Schippers
Aspirant FWO - Vlaanderen
Formal Techniques in Software Engineering (FoTS)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen - Belgium
Phone: +32 3 265 38 71
Fax: +32 3 265 37 77

#8226 From: Jeremy Tregunna <jtregunna@...>
Date: Mon Feb 6, 2006 8:57 pm
Subject: Re: [Io] cond
jtregunna_io
Send Email Send Email
 
Just because... here's my version of cond (it's most certainly not the one that most people would find intuitive, but it's sufficiently different from the other version posted here, and doesn't depend on an equal number of arguments):

cond := method(
  call message arguments foreach(m,
    amsg := m attached clone
    fmsg := m clone setAttached(nil) setNext(nil)
    if (fmsg doInContext(self),
      res := call sender doMessage(amsg)
      res
    )
  )
)

cond(
  true block("true" println),
  false block("false" println),
  nil block("nil" println),
  42 block("42" println)
)

On 5-Feb-06, at 5:40 PM, semmerlbemmerl wrote:

Hi everybody,

the 1.0beta made some things different, so I decided to try to write a
conditional analogous to the if example I found somewhere on the
webpage, and which doesn't work since 1.0b. So, here goes my attempt
at cond:

cond:=method(
  call do(
    i:=0; args:=message arguments; s:=args size-1
    while(i<s,
          if(sender doMessage(args at(i)),
             return(sender doMessage(args at(i+1))))
          i=i+2)
    return(if(i==s, sender doMessage(args at(i)), nil))
  )
)

it evaluates, starting with i=0, arg i, and returns the evaluation of
i+1 when arg i evaluated to true. When the number of elements is odd
and none of the even-numbered args was true, the evaluation of the
last argument is returned.

I realize that this is not very spectacular, but since I'm rather new
to IO and couldn't find working examples of this kind, I thought I'd
post it. Any thoughts or comments?

Dolfi









YAHOO! GROUPS LINKS




!DSPAM:43e6d30c118711995110417!


--

Jeremy Tregunna

jtregunna@...


"If you round off the fractions, embedded systems consume 100% of the worldwide production of microprocessors." -- Jim Turley




#8227 From: Jeremy Tregunna <jtregunna@...>
Date: Mon Feb 6, 2006 9:17 pm
Subject: Re: [Io] cond
jtregunna_io
Send Email Send Email
 
One correction:

On 6-Feb-06, at 3:57 PM, Jeremy Tregunna wrote:

Just because... here's my version of cond (it's most certainly not the one that most people would find intuitive, but it's sufficiently different from the other version posted here, and doesn't depend on an equal number of arguments):

cond := method(
  call message arguments foreach(m,
    amsg := m attached clone
    fmsg := m clone setAttached(nil) setNext(nil)
    if (fmsg doInContext(self),
      res := call sender doMessage(amsg)

This:
      res
Becomes this:
      return res
    )
  )
)

cond(
  true block("true" println),
  false block("false" println),
  nil block("nil" println),
  42 block("42" println)
)

On 5-Feb-06, at 5:40 PM, semmerlbemmerl wrote:

Hi everybody,

the 1.0beta made some things different, so I decided to try to write a
conditional analogous to the if example I found somewhere on the
webpage, and which doesn't work since 1.0b. So, here goes my attempt
at cond:

cond:=method(
  call do(
    i:=0; args:=message arguments; s:=args size-1
    while(i<s,
          if(sender doMessage(args at(i)),
             return(sender doMessage(args at(i+1))))
          i=i+2)
    return(if(i==s, sender doMessage(args at(i)), nil))
  )
)

it evaluates, starting with i=0, arg i, and returns the evaluation of
i+1 when arg i evaluated to true. When the number of elements is odd
and none of the even-numbered args was true, the evaluation of the
last argument is returned.

I realize that this is not very spectacular, but since I'm rather new
to IO and couldn't find working examples of this kind, I thought I'd
post it. Any thoughts or comments?

Dolfi









YAHOO! GROUPS LINKS






--
Jeremy Tregunna

"If you round off the fractions, embedded systems consume 100% of the worldwide production of microprocessors." -- Jim Turley




SPONSORED LINKS
Basic programming language Computer programming languages Programming languages
Java programming language


YAHOO! GROUPS LINKS




!DSPAM:43e7b878161472713820200!


--

Jeremy Tregunna

jtregunna@...


"If you round off the fractions, embedded systems consume 100% of the worldwide production of microprocessors." -- Jim Turley




#8228 From: SainTiss <saintiss@...>
Date: Tue Feb 7, 2006 8:42 am
Subject: Re: [Io] very strange behaviour when overriding clone
saintiss@...
Send Email Send Email
 
I stand corrected.

It IS necessary at least in a few places of course. Inside the new clone
method, I want to call the old method first, then do some extra stuff.
So in order to be able to call the old method, I had to back it up
first.

I know it would be possible to use a different object, like
SpecialObject and then call resend, but I specifically wanted to change
clone behaviour without any other Objects having to know about it.

Thanks,

Hans


On Mon, 6 Feb 2006 21:23:29 +0100
SainTiss <saintiss@...> wrote:

> Ok, that's probably not really necessary... This code stems down from
> some  things I've been trying before, and then I modified clone more
> severely,  which is why I wanted to have the original in case I didn't
> want my  modifications for some objects.
>
> But would that have any influence?
>
> Thanks,
>
> Hans
>
> On Monday 06 February 2006 20:30, Steve Dekorte wrote:
> > On 06-Feb-06, at AM 07:58, SainTiss wrote:
> > > Object cloneOld := Object getSlot("clone") clone
> >
> > Why are you cloning the clone method?
> >
> > -- Steve
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
>
> --
> If we cannot live so as to be happy, let us at least live so as to
> deserve it
>  -- Immanuel Hermann Fichte
>
> People are promoted up to their level of incompetence
>  -- Peter's Principle
>
> Ark Linux - Linux for the Masses (http://arklinux.org)
>
> Hans Schippers
> Aspirant FWO - Vlaanderen
> Formal Techniques in Software Engineering (FoTS)
> University of Antwerp
> Middelheimlaan 1
> 2020 Antwerpen - Belgium
> Phone: +32 3 265 38 71
> Fax: +32 3 265 37 77


--
People are promoted up to their level of incompetence
   -- Peter's Principle

Hans Schippers
Research Assistant of the Research Foundation - Flanders (FWO -
Vlaanderen)
http://www.win.ua.ac.be/~hschipp/
Formal Techniques in Software Engineering (FoTS)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen - Belgium
Phone: +32 3 265 38 71
Fax: +32 3 265 37 77

#8229 From: Zachary Zolton <zachary.zolton@...>
Date: Tue Feb 7, 2006 1:07 pm
Subject: windows & io
zachary.zolton@...
Send Email Send Email
 
hey all,

i'm new here to io, so excuse my newbieness...  i'm really impressed
with this language's potential and (lack of) syntax; all the extra
code i have to write at work to handle types in C# makes me appreciate
io's type system!

(anyway, now to my question...)  does anyone have the latest release
built on windows?  i tried building with mingw/msys and didn't get
thru compiling everything.  i searched the group and found someone
else had posted the same earlier.

i found an exe for the vm online - and have really enjoyed playing
with it - but no one seems to have the libs/bindings in a pre-built
package.  ya know, that really helps us windows people!


thanks,

zach z

#8230 From: Jared Nuzzolillo <onceuponapriori@...>
Date: Tue Feb 7, 2006 7:08 pm
Subject: Re: [Io] windows & io
onceuponapriori
Send Email Send Email
 
Ditto! My build keeps dying...

On 2/7/06, Zachary Zolton <zachary.zolton@...> wrote:
hey all,
i found an exe for the vm online - and have really enjoyed playing
with it - but no one seems to have the libs/bindings in a pre-built
package.  ya know, that really helps us windows people!

thanks,
zach z


#8231 From: Zachary Zolton <zachary.zolton@...>
Date: Tue Feb 7, 2006 7:13 pm
Subject: Re: [Io] windows & io
zachary_zolton
Send Email Send Email
 
which compiler/environ are you using?

i wonder if it builds using vc++ 2005... tho i highly doubt it!

#8232 From: Nicholas Seckar <nseckar@...>
Date: Tue Feb 7, 2006 5:04 pm
Subject: Re: [Io] very strange behaviour when overriding clone
nseckar
Send Email Send Email
 

On 7-Feb-06, at 3:42 AM, SainTiss wrote:

So in order to be able to call the old method, I had to back it up

first.


Have you not seen super?

Io> a := Object clone do(x := method(1))
Io> b := a clone do(x := method(super(x) + 1))
Io> b x
==> 2
Io> a x
==> 1


#8233 From: Jared Nuzzolillo <onceuponapriori@...>
Date: Tue Feb 7, 2006 8:42 pm
Subject: Re: [Io] windows & io
onceuponapriori
Send Email Send Email
 
cygwin

On 2/7/06, Zachary Zolton <zachary.zolton@...> wrote:
which compiler/environ are you using?

i wonder if it builds using vc++ 2005... tho i highly doubt it!


SPONSORED LINKS
Basic programming language Computer programming languages Programming languages
Java programming language


YAHOO! GROUPS LINKS





#8234 From: Alwin Blok <alwinblok@...>
Date: Tue Feb 7, 2006 9:05 pm
Subject: [IoLanguage] := and setLazySlot
alwinblok
Send Email Send Email
 
Hello,

Is it possible to implement := style behavior in io?

I'm trying to implement a lazy setSlot method:

Object linkSlot := method(
	 mess := call message arguments at(0)
	 slot := call sender doMessage(mess)
	 send := call sender
	 mess := call message arguments at(1)
	 self setSlot(slot, block(send doMessage(mess)))
)


I'd like to be able to use

Object slotname <- some code

..instead of
Object linkSlot("slotname" some code)

but I cant figure out how to do this without using 'forward'

Thanks,
-Alwin

#8235 From: Quag <quaggy@...>
Date: Tue Feb 7, 2006 10:37 pm
Subject: Re: [Io] [IoLanguage] := and setLazySlot
quagath
Send Email Send Email
 
Hi Alwin,

I think you are asking how to create new operators like := and =. With
the current parser (implemented in C) this is difficult. I've written
a (slow) parser in Io which is in the current distribution somewhere.
It should be easy enough to modify that to create new := and = like
operators...

The simple answer is you can't create new := and = like operators at the moment.

Jonathan.

On 2/8/06, Alwin Blok <alwinblok@...> wrote:
> Hello,
>
> Is it possible to implement := style behavior in io?
>
> I'm trying to implement a lazy setSlot method:
>
> Object linkSlot := method(
>         mess := call message arguments at(0)
>         slot := call sender doMessage(mess)
>         send := call sender
>         mess := call message arguments at(1)
>         self setSlot(slot, block(send doMessage(mess)))
> )
>
>
> I'd like to be able to use
>
> Object slotname <- some code
>
> ..instead of
> Object linkSlot("slotname" some code)
>
> but I cant figure out how to do this without using 'forward'
>
> Thanks,
> -Alwin
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

#8236 From: SainTiss <saintiss@...>
Date: Wed Feb 8, 2006 8:33 am
Subject: Re: [Io] very strange behaviour when overriding clone
saintiss@...
Send Email Send Email
 
On Tue, 7 Feb 2006 12:04:03 -0500
Nicholas Seckar <nseckar@...> wrote:

>
> On 7-Feb-06, at 3:42 AM, SainTiss wrote:
>
> > So in order to be able to call the old method, I had to back it up
> > first.
>
> Have you not seen super?

Of course, but I wanted to modify Object itself, not clone it first.

By the way, the cause of the problem has been identified in the mean
time: the "call message setArguments" call permanently modifies the
message tree. That means the next time
self _allClones append(nObject)
is called, nObject is not seen as the argument anymore, but rather the
argument has been replaced by the cached value of elVal.

Cheers,

Hans

--
People are promoted up to their level of incompetence
   -- Peter's Principle

Hans Schippers
Research Assistant of the Research Foundation - Flanders (FWO -
Vlaanderen)
http://www.win.ua.ac.be/~hschipp/
Formal Techniques in Software Engineering (FoTS)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen - Belgium
Phone: +32 3 265 38 71
Fax: +32 3 265 37 77

#8237 From: Alwin Blok <alwinblok@...>
Date: Wed Feb 8, 2006 5:17 pm
Subject: Re: [Io] [IoLanguage] := and setLazySlot
alwinblok
Send Email Send Email
 
Op 7 feb 2006, om 23:37 heeft Quag het volgende geschreven:

> Hi Alwin,
>
> I think you are asking how to create new operators like := and =. With
> the current parser (implemented in C) this is difficult. I've written
> a (slow) parser in Io which is in the current distribution somewhere.
> It should be easy enough to modify that to create new := and = like
> operators...
>
> The simple answer is you can't create new := and = like operators
> at the moment.
>
> Jonathan.

hmm, ok..
so will it be possible in the future to do something like this?
I see 'Parser in Io' planned for 1.0.
Does this mean io will be parsed (by default) using Io itself, or is
it optional ?

-Alwin

#8238 From: Steve Dekorte <steve@...>
Date: Wed Feb 8, 2006 6:11 pm
Subject: Re: [Io] [IoLanguage] := and setLazySlot
stevedekorte
Send Email Send Email
 
On 08-Feb-06, at AM 09:17, Alwin Blok wrote:
> hmm, ok..
> so will it be possible in the future to do something like this?
> I see 'Parser in Io' planned for 1.0.
> Does this mean io will be parsed (by default) using Io itself, or is
> it optional ?

Yes, though it will be lexed in C.

-- Steve

#8239 From: Derek Peschel <dpeschel@...>
Date: Wed Feb 8, 2006 9:29 pm
Subject: Re: 2006-01-27 release -- Working OS X distribution?
d_peschel
Send Email Send Email
 
In gmane.comp.lang.io, Jason Grossman wrote:
>I think this is a great idea.

Thanks, and I will do what I can myself.  But it doesn't answer my other
question about how to get the sample apps to work.

-- Derek

#8240 From: dpeschel@...
Date: Wed Feb 8, 2006 9:44 pm
Subject: Status of Io parser? Parsing without execution?
d_peschel
Send Email Send Email
 
From skimming old messages here, I gather there has been at least one
attempt to add a lexer/parser written in Io to the one in C.  Is that
up to date?

If so, can it read a file and return the parse tree (or forest, I'm not
sure what you get) without evaluating anything?  Does it have a method
to search the tree (or forest) for certain patterns?

My goal is to statically analyze a group of files and determine the order
they must be loaded in.  I'm assuming that calls to "clone" that can be
found by analyzing the text are the only constraint on the load order.

Since the continuation-line proposal has not been decided yet, and all
message chains currently start on a new line, and "clone" usually comes
after an assignment operator, I _could_ write the analyzer in awk, but
using Io itself is much more elegant.

Thanks,

-- Derek

#8241 From: Steve Dekorte <steve@...>
Date: Wed Feb 8, 2006 9:57 pm
Subject: Re: [Io] Status of Io parser? Parsing without execution?
stevedekorte
Send Email Send Email
 
On 08-Feb-06, at PM 01:44, dpeschel@... wrote:
> My goal is to statically analyze a group of files and determine the
> order
> they must be loaded in.  I'm assuming that calls to "clone" that can be
> found by analyzing the text are the only constraint on the load order.

Have you considered using the Importer? If you make your file and proto
names the same, it "just works".

-- Steve

#8242 From: Quag <quaggy@...>
Date: Thu Feb 9, 2006 4:27 am
Subject: Re: [Io] Status of Io parser? Parsing without execution?
quagath
Send Email Send Email
 
Hi Derek,

On 2/9/06, dpeschel@... <dpeschel@...> wrote:

> If so, can it read a file and return the parse tree (or forest, I'm not
> sure what you get) without evaluating anything?  Does it have a method
> to search the tree (or forest) for certain patterns?

Try,

   File clone setPath("theFile.io") contents asMessage

To give you a "parse tree".

Check out http://pipapo.org/iowiki/PasteBin/MessageMatch for a message
pattern matcher.

Jonathan.

Messages 8213 - 8242 of 13333   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help