Loading ...
Sorry, an error occurred while loading the content.

[Q] split a message on multiples lines

Expand Messages
  • Mildred
    Hi, I just discovered Io, and I found it great, it s just the language I ve been waiting for. I just have little questions : Apparently, the end of line is
    Message 1 of 4 , Nov 17, 2006
    View Source
    • 0 Attachment
      Hi,

      I just discovered Io, and I found it great, it's just the language I've
      been waiting for. I just have little questions :

      Apparently, the end of line is seen as a separator like the semicolon.
      Why ? I understand that putting semicolons at end of each line can be
      very painful but doesn't this rule create problems when you want to
      split long messages across multiples lines ?
      Is it even possible ?

      And another tiny question, I came from the lua world and I like very
      much the portability of the lua code. I know lua can be run almost
      everywhere ... even on small embedded devices. Because of the C source
      and the wery small footprint.
      Even if I don't need it (yet) I want to know if Io is as small and
      portable.

      Thanks
      --
      Mildred <xmpp:mildred@...> <http://mildred632.free.fr/>
      Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
      Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]
    • Steve Dekorte
      ... That s why word processors have line wrapping. ;-) Here s one trick: unsplit: 123 sin cos println split: 123 sin( ) cos println Maybe we should make used
      Message 2 of 4 , Nov 17, 2006
      View Source
      • 0 Attachment
        On 17 Nov 2006, at 11:48 am, Mildred wrote:
        > Apparently, the end of line is seen as a separator like the semicolon.
        > Why ? I understand that putting semicolons at end of each line can be
        > very painful but doesn't this rule create problems when you want to
        > split long messages across multiples lines ?
        > Is it even possible ?

        That's why word processors have line wrapping. ;-)

        Here's one trick:

        unsplit:

        123 sin cos println

        split:

        123 sin(
        ) cos println

        Maybe we should make \ used for line wrapping (this could actually be
        implemented in Io).

        > And another tiny question, I came from the lua world and I like very
        > much the portability of the lua code. I know lua can be run almost
        > everywhere ... even on small embedded devices. Because of the C source
        > and the wery small footprint.
        > Even if I don't need it (yet) I want to know if Io is as small and
        > portable.

        Yes, though you may have to add a coro entry for your processor if
        it's not on an OS that supports the ucontext or fiber APIs.

        - Steve
      • Jeremy Tregunna
        ... Io is nowhere near as light on memory as lua is. Infact, Io is about as heavy on memory as an equivalent program written in Python and Ruby *combined*.
        Message 3 of 4 , Nov 17, 2006
        View Source
        • 0 Attachment
          On 06-11-17, at 14:48, Mildred wrote:

          > Hi,
          >
          > And another tiny question, I came from the lua world and I like very
          > much the portability of the lua code. I know lua can be run almost
          > everywhere ... even on small embedded devices. Because of the C source
          > and the wery small footprint.
          > Even if I don't need it (yet) I want to know if Io is as small and
          > portable.

          Io is nowhere near as light on memory as lua is. Infact, Io is about
          as heavy on memory as an equivalent program written in Python and
          Ruby *combined*. While this may sound bad, for most embedded devices,
          it's not an issue except if you're trying to stuff Io into NOR --
          then good luck.

          That said, I am working on a dialect of Io which is much lighter, and
          in fact, targeted towards small memory devices; but it's nowhere near
          usable at the moment (still working out the concurrency model). In
          any event, it'll be about as light as lua, if not a little lighter
          (early estimates, take with a grain of salt).

          >
          > Thanks
          > --
          > Mildred <xmpp:mildred@...> <http://mildred632.free.fr/>
          > Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/
          > gpg_key>
          > Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          > !DSPAM:455e2e04954941604914933!
          >


          --
          Jeremy Tregunna
          jtregunna@...
        • Brian L.
          ... I remember we were doing some memory-utilization profiling of Io over irc sometime in July and concluded that most of the weight (and startup time) was in
          Message 4 of 4 , Nov 17, 2006
          View Source
          • 0 Attachment

            That said, I am working on a dialect of Io which is much lighter, and
            in fact, targeted towards small memory devices; but it's nowhere near
            usable at the moment (still working out the concurrency model). In
            any event, it'll be about as light as lua, if not a little lighter
            (early estimates, take with a grain of salt).

            I remember we were doing some memory-utilization profiling of Io over irc sometime in July and concluded that most of the weight (and startup time) was in building the standard library objects in memory.

            Smalltalk/Self deal with this using unwieldy image files, and Java/.net deal with this by being class-based and pulling in their classes/assemblies dynamically...I'd be interested to know how you're approaching this issue (of course, 'have a small standard library' is a satisfactory answer for embedded devices).

          Your message has been successfully submitted and would be delivered to recipients shortly.