<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all:<br>No, I don't agree there isn't compiler internal intended to break interface that's other story but we don't fail compiled IRs at least that we know anything (at least the DEC-SRC front end needs to recompile every interface separately of any Module, so you can change compilers and still work the same clock speed should be equal in whatever configuration).<br>We should take advantage of that inherent parallelism  I guess but we would need a good distributed quake machine.<br>Alignment and endianness are same story about I don't mind that I just care for our actual clock  speed of our machines instead of thinking in polymorphic type instructions etc. We eat our own stuff, VAX style machine type, everything else is just  head ache:<br>http://mail-index.netbsd.org/current-users/1999/04/27/0032.html<br><br>Thanks in advance<br><br><br>--- El
 <b>jue, 23/8/12, Mika Nystrom <i><mika@async.caltech.edu></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Mika Nystrom <mika@async.caltech.edu><br>Asunto: Re: [M3devel] I know, I know...<br>Para: "Dragiša Durić" <dragisha@m3w.org><br>CC: m3devel@elegosoft.com<br>Fecha: jueves, 23 de agosto, 2012 18:07<br><br><div class="plainMail">Well .M3WEB isn't defined in the Green Book....<br><br>Actually I take back what I said before.  If I was doing what you<br>are describing from scratch, I'd write a Scheme program that takes an<br>S-expression according to certain rules and generates both an interface<br>defining a RECORD type Interface.T and packing/unpacking code in Modula-3<br>but following Jay's outline.  Then I'd write a template file that allows<br>me to specify said Scheme file in m3makefile.  The advantage of this<br>approach is that it
 doesn't rely on any compiler internals or special<br>output files.  And it's at least as powerful as any pragmas you might<br>want to add.  Plus easier to implement...<br><br>Below is a very partial example of something similar... it defines a SQL<br>database together with Modula-3 code for accessing the tables in that<br>database (in very multithreaded and pipelined ways).  I only define two<br>tables, you can imagine what the rest looks like.  It's for a real-time<br>financial trading application, if you were wondering.  The Scheme is<br>253 lines and results in 8,828 lines of Modula-3 code and 361 lines<br>of SQL.  The code generator is only 1,197 lines of Scheme and that is<br>including liberal documentation.  (The system is similar to "Hibernate"<br>but I suspect with more emphasis on certain kinds of performance that<br>we cared very much about in the trading application, e.g., latency of<br>piping data through
 the database.)  The whole thing is added to the<br>program by adding a single line to m3makefile.<br><br>     Mika<br><br>(define aux-mm-ordr-ctrl <br>  (make-table "aux_mm_ordr_ctrl" 'client<br>    (make-field "symbol"          'varchar          'not-null)<br>    (make-index (list "symbol"))<br>    (make-field "type"            'varchar          'not-null)<br>    (make-field "expiry"          'varchar          'not-null)<br>    (make-field "exchange"        'varchar          'not-null)<br>    (make-field "currency"        'varchar          'not-null)<br>    (make-field "action"         
 'varchar          'not-null)<br>    (make-field "quantity"        'double-precision 'not-null)<br>    (make-field "order_type"      'varchar          'not-null)<br>    (make-field "benchmark_price" 'double-precision)<br>    (make-field "time_allowance"  'double-precision)<br>    (make-field "model_name"      'varchar)<br>    (make-index (list "model_name"))<br>    (make-field "id"              'integer)<br>))<br><br><br>(define clean<br>  (make-table "clean" 'server<br>   (make-field "tabl"          'varchar 'not-null)<br>   (make-field "rowid"         'integer 'not-null)<br>   (make-field "client"        'varchar
 'not-null)<br>    <br>   (make-index (list "client"))<br>   (make-index (list "tabl"))<br>   (make-index (list "tabl" "rowid"))<br>   (make-index (list "client" "tabl"))))<br>    <br>(define gcoms<br>  (make-database "gcoms"<br>                 clean<br>                 code model instrument strategy model-data<br>                 model-code<br>                 ordr ordr_status<br>                 output eror<br>                 fill<br>                 aux-instrument<br>             
    aux-ordr<br>                 aux-ordr-params<br>                 aux-market-segment<br>                 aux-last-prices<br>                 aux-mm-ordr-ctrl<br>                 aux-mm-associations<br>))<br>    <br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>   <br>(write-database-sql gcoms)<br>(write-database-m3 gcoms)<br><br><br><br>=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:<br>><br>>--Apple-Mail=_6458BB99-E0EF-4A10-A66A-491737830F8E<br>>Content-Type: multipart/alternative;<br>>   
 boundary="Apple-Mail=_97F57BF6-5A6D-479B-8575-88C17BAE93B4"<br>><br>><br>>--Apple-Mail=_97F57BF6-5A6D-479B-8575-88C17BAE93B4<br>>Content-Transfer-Encoding: quoted-printable<br>>Content-Type: text/plain;<br>>    charset=utf-8<br>><br>>I have RTInfo module we developed years ago to parse .M3WEB. Good =<br>>enough? :) But, not a solution, it is easier to write as I wrote in =<br>>example I used to illustrate problem.<br>><br>>GCC not obeying packing instructions is like=E2=80=A6 GCC not working in =<br>>lot of cases. For some reason, I don't believe in it.<br>><br>>Hint, gm2 is GCC based compiler. And supports very precise =<br>>packing/aligning rules.<br>><br>>--<br>>Divided by a common language<br>><br>>Dragi=C5=A1a Duri=C4=87<br>><a ymailto="mailto:dragisha@m3w.org" href="/mc/compose?to=dragisha@m3w.org">dragisha@m3w.org</a><br>><br>><br>><br>><br>>On Aug 23,
 2012, at 9:51 PM, Mika Nystrom wrote:<br>><br>>>=20<br>>> Well I don't think Jay said that bytes couldn't be unpacked in =<br>>Modula-3<br>>> (you can just use Word for that).<br>>>=20<br>>> But I think the point was that a compiler back-end might not =<br>>necessarily<br>>> obey your packing instructions?<br>>>=20<br>>> Here's what I think you should do... it would be super useful, both to<br>>> you and other people in the future.  And completely independent of<br>>> compilers.<br>>>=20<br>>> Write a something-or-other that uses m3tk to read your RECORD type<br>>> spec, plus pragmas of your own choice (or comments, or auxiliary data<br>>> from somewhere) and then generates code using Word.T that can process<br>>> byte streams and return the RECORD you declared, in portable Modula-3.<br>>> I doubt it's very difficult.  m3tk is
 cool!<br>>>=20<br>>>    Mika<br>>>=20<br>>> =3D?utf-8?Q?Dragi=3DC5=3DA1a_Duri=3DC4=3D87?=3D writes:<br>>>>=20<br>>>> --Apple-Mail=3D_8871A9FB-3130-4B36-8524-F6549A5CEC9E<br>>>> Content-Type: multipart/alternative;<br>>>>     boundary=3D"Apple-Mail=3D_2314A877-555E-4BDE-8112-C875A2AE5122"<br>>>>=20<br>>>>=20<br>>>> --Apple-Mail=3D_2314A877-555E-4BDE-8112-C875A2AE5122<br>>>> Content-Transfer-Encoding: quoted-printable<br>>>> Content-Type: text/plain;<br>>>>     charset=3Dwindows-1250<br>>>>=20<br>>>> I have a friend, working for large software company and he just =<br>>recently =3D<br>>>> ported some message router from SPARC to Linux/Intel=3D85 Lots of =<br>>"network =3D<br>>>> order" data, same as with my current projects. Network, communication =<br>>in
 =3D<br>>>> general, network order is everywhere.<br>>>>=20<br>>>> Insisting on some god-given data ordering is a bit=3D85 What is nice =<br>>word =3D<br>>>> here? :) Outlandish? Outimeish?<br>>>>=20<br>>>> This is not first time I started discussion like this here. Every =<br>>single =3D<br>>>> time Jay explains to me how Modula-3 cannot handle it. I am handling =<br>>it, =3D<br>>>> as I have shown in my example, with Modula-3 code. With a bit of =<br>>effort =3D<br>>>> I can make it almost-transparent (subfolder/platform) over various =3D<br>>>> platforms. Of course, as I am developing a full product (not software =<br>>to =3D<br>>>> be run on arbitrary platform) I don't have to worry about too many =3D<br>>>> platforms. One is enough here, but I still think Modula-3 can =<br>>benefit, =3D<br>>>> and a lot, if it
 supported explicit byte/bit =<br>>ordering/packing/aligning =3D<br>>>> pragmas.<br>>>>=20<br>>>> Also, unlike GCC, pointer alignment in Modula-3 is 64bit on x86_64. =<br>>It =3D<br>>>> is 32bit in GCC, and x86_64 is totally happy with it. Wr have 64bit =<br>>so =3D<br>>>> we must write piece of software in C to be what? Compatible with =<br>>API's =3D<br>>>> all systems are compatible with without any hassle.=3D20<br>>>>=20<br>>>> TIA<br>>>> --<br>>>> Divided by a common language<br>>>>=20<br>>>> Dragi=3D9Aa Duri=3DE6<br>>>> <a ymailto="mailto:dragisha@m3w.org" href="/mc/compose?to=dragisha@m3w.org">dragisha@m3w.org</a><br>>>>=20<br>><br>><br>>--Apple-Mail=_97F57BF6-5A6D-479B-8575-88C17BAE93B4<br>>Content-Transfer-Encoding: quoted-printable<br>>Content-Type: text/html;<br>>   
 charset=utf-8<br>><br>><html><head></head><body style=3D"word-wrap: break-word; =<br>>-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I =<br>>have RTInfo module we developed years ago to parse .M3WEB. Good enough? =<br>>:) But, not a solution, it is easier to write as I wrote in example I =<br>>used to illustrate problem.<div><div><br></div><div>GCC not obeying =<br>>packing instructions is like=E2=80=A6 GCC not working in lot of cases. =<br>>For some reason, I don't believe in it.</div><div><br></div><div>Hint, =<br>>gm2 is GCC based compiler. And supports very precise packing/aligning =<br>>rules.</div><div><br><div apple-content-edited=3D"true"><br>><span class=3D"Apple-style-span" style=3D"border-collapse: separate; =<br>>color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal;
 =<br>>font-variant: normal; font-weight: normal; letter-spacing: normal; =<br>>line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: =<br>>0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =<br>>0px; -webkit-border-horizontal-spacing: 0px; =<br>>-webkit-border-vertical-spacing: 0px; =<br>>-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =<br>>auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span =<br>>class=3D"Apple-style-span" style=3D"border-collapse: separate; color: =<br>>rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: =<br>>normal; font-weight: normal; letter-spacing: normal; line-height: =<br>>normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; =<br>>text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; =<br>>-webkit-border-horizontal-spacing: 0px;
 -webkit-border-vertical-spacing: =<br>>0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =<br>>auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div =<br>>style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =<br>>-webkit-line-break: after-white-space; "><div>--</div><div>Divided by a =<br>>common language</div><div><br></div><div>Dragi=C5=A1a =<br>>Duri=C4=87</div><div><a =<br>>href=3D"mailto:<a ymailto="mailto:dragisha@m3w.org" href="/mc/compose?to=dragisha@m3w.org">dragisha@m3w.org</a>"><a ymailto="mailto:dragisha@m3w.org" href="/mc/compose?to=dragisha@m3w.org">dragisha@m3w.org</a></a></div><div><br></div>=<br>></div></span><br class=3D"Apple-interchange-newline"></span><br
 =<br>>class=3D"Apple-interchange-newline"><br>></div><br>><br><div><div>On Aug 23, 2012, at 9:51 PM, Mika Nystrom wrote:</div><br =<br>>class=3D"Apple-interchange-newline"><blockquote =<br>>type=3D"cite"><div><br>Well I don't think Jay said that bytes couldn't =<br>>be unpacked in Modula-3<br>(you can just use Word for that).<br><br>But =<br>>I think the point was that a compiler back-end might not =<br>>necessarily<br>obey your packing instructions?<br><br>Here's what I =<br>>think you should do... it would be super useful, both to<br>you and =<br>>other people in the future. &nbsp;And completely independent =<br>>of<br>compilers.<br><br>Write a something-or-other that uses m3tk to =<br>>read your RECORD type<br>spec, plus pragmas of your own choice (or =<br>>comments, or auxiliary
 data<br>from somewhere) and then generates code =<br>>using Word.T that can process<br>byte streams and return the RECORD you =<br>>declared, in portable Modula-3.<br>I doubt it's very difficult. =<br>>&nbsp;m3tk is cool!<br><br> =<br>>&nbsp;&nbsp;&nbsp;Mika<br><br>=3D?utf-8?Q?Dragi=3DC5=3DA1a_Duri=3DC4=3D87?=<br>>=3D writes:<br><blockquote type=3D"cite"><br></blockquote><blockquote =<br>>type=3D"cite">--Apple-Mail=3D_8871A9FB-3130-4B36-8524-F6549A5CEC9E<br></bl=<br>>ockquote><blockquote type=3D"cite">Content-Type: =<br>>multipart/alternative;<br></blockquote><blockquote type=3D"cite"><span =<br>>class=3D"Apple-tab-span" style=3D"white-space:pre">   
 =<br>></span>boundary=3D"Apple-Mail=3D_2314A877-555E-4BDE-8112-C875A2AE5122"<br>=<br>></blockquote><blockquote type=3D"cite"><br></blockquote><blockquote =<br>>type=3D"cite"><br></blockquote><blockquote =<br>>type=3D"cite">--Apple-Mail=3D_2314A877-555E-4BDE-8112-C875A2AE5122<br></bl=<br>>ockquote><blockquote type=3D"cite">Content-Transfer-Encoding: =<br>>quoted-printable<br></blockquote><blockquote type=3D"cite">Content-Type: =<br>>text/plain;<br></blockquote><blockquote type=3D"cite"><span =<br>>class=3D"Apple-tab-span" style=3D"white-space:pre">    =<br>></span>charset=3Dwindows-1250<br></blockquote><blockquote =<br>>type=3D"cite"><br></blockquote><blockquote type=3D"cite">I have a =<br>>friend, working for large software company and he just
 recently =<br>>=3D<br></blockquote><blockquote type=3D"cite">ported some message router =<br>>from SPARC to Linux/Intel=3D85 Lots of "network =<br>>=3D<br></blockquote><blockquote type=3D"cite">order" data, same as with =<br>>my current projects. Network, communication in =<br>>=3D<br></blockquote><blockquote type=3D"cite">general, network order is =<br>>everywhere.<br></blockquote><blockquote =<br>>type=3D"cite"><br></blockquote><blockquote type=3D"cite">Insisting on =<br>>some god-given data ordering is a bit=3D85 What is nice word =<br>>=3D<br></blockquote><blockquote type=3D"cite">here? :) Outlandish? =<br>>Outimeish?<br></blockquote><blockquote =<br>>type=3D"cite"><br></blockquote><blockquote type=3D"cite">This is not =<br>>first time I started discussion like this here.
 Every single =<br>>=3D<br></blockquote><blockquote type=3D"cite">time Jay explains to me =<br>>how Modula-3 cannot handle it. I am handling it, =<br>>=3D<br></blockquote><blockquote type=3D"cite">as I have shown in my =<br>>example, with Modula-3 code. With a bit of effort =<br>>=3D<br></blockquote><blockquote type=3D"cite">I can make it =<br>>almost-transparent (subfolder/platform) over various =<br>>=3D<br></blockquote><blockquote type=3D"cite">platforms. Of course, as I =<br>>am developing a full product (not software to =<br>>=3D<br></blockquote><blockquote type=3D"cite">be run on arbitrary =<br>>platform) I don't have to worry about too many =<br>>=3D<br></blockquote><blockquote type=3D"cite">platforms. One is enough =<br>>here, but I still think Modula-3 can benefit,
 =<br>>=3D<br></blockquote><blockquote type=3D"cite">and a lot, if it supported =<br>>explicit byte/bit ordering/packing/aligning =<br>>=3D<br></blockquote><blockquote =<br>>type=3D"cite">pragmas.<br></blockquote><blockquote =<br>>type=3D"cite"><br></blockquote><blockquote type=3D"cite">Also, unlike =<br>>GCC, pointer alignment in Modula-3 is 64bit on x86_64. It =<br>>=3D<br></blockquote><blockquote type=3D"cite">is 32bit in GCC, and =<br>>x86_64 is totally happy with it. Wr have 64bit so =<br>>=3D<br></blockquote><blockquote type=3D"cite">we must write piece of =<br>>software in C to be what? Compatible with API's =<br>>=3D<br></blockquote><blockquote type=3D"cite">all systems are compatible =<br>>with without any hassle.=3D20<br></blockquote><blockquote
 =<br>>type=3D"cite"><br></blockquote><blockquote =<br>>type=3D"cite">TIA<br></blockquote><blockquote =<br>>type=3D"cite">--<br></blockquote><blockquote type=3D"cite">Divided by a =<br>>common language<br></blockquote><blockquote =<br>>type=3D"cite"><br></blockquote><blockquote type=3D"cite">Dragi=3D9Aa =<br>>Duri=3DE6<br></blockquote><blockquote type=3D"cite"><a =<br>>href=3D"mailto:<a ymailto="mailto:dragisha@m3w.org" href="/mc/compose?to=dragisha@m3w.org">dragisha@m3w.org</a>"><a ymailto="mailto:dragisha@m3w.org" href="/mc/compose?to=dragisha@m3w.org">dragisha@m3w.org</a></a><br></blockquote><blo=<br>>ckquote
 =<br>>type=3D"cite"><br></blockquote></div></blockquote></div><br></div></div></=<br>>body></html>=<br>><br>>--Apple-Mail=_97F57BF6-5A6D-479B-8575-88C17BAE93B4--<br>><br>>--Apple-Mail=_6458BB99-E0EF-4A10-A66A-491737830F8E<br>>Content-Transfer-Encoding: 7bit<br>>Content-Disposition: attachment;<br>>    filename=signature.asc<br>>Content-Type: application/pgp-signature;<br>>    name=signature.asc<br>>Content-Description: Message signed with OpenPGP using GPGMail<br>><br>>-----BEGIN PGP SIGNATURE-----<br>>Version: GnuPG/MacGPG2 v2.0.18
 (Darwin)<br>><br>>iQEcBAEBAgAGBQJQNou3AAoJEJtljYXUJo8xhFQH/19LV/No97WCrAPygnWWZAa4<br>>DQDZtnFZuDhAxMut8QZWIZN/LikLsaC39Rd9YMr01oKRZ93gucjUigwad5cPfyUb<br>>XUV0PNrjMr67TZo9zRcwuXZJp8FzvNDFsA1nOtorQbIPG3e5IaLNdLpihSGBJ3zt<br>>vnd3wUjnPz56HbdDulA4kYkyxSkCQgJ457jI2DTR+wtsaqNREEl0Hzs1qlpDDXWC<br>>ShRvTdiDGZV/TMHHwkkWRVjZkHHu3npPClhXzY0fBRXUu+k3NWzZbuzIhXofCJ9y<br>>C+yLl7qKdtU5cF+JpObPReA2ZfarW7AJ7rLLHZJa6NCs75qtCzo68JWhY8MtF3Y=<br>>=OiB3<br>>-----END PGP SIGNATURE-----<br>><br>>--Apple-Mail=_6458BB99-E0EF-4A10-A66A-491737830F8E--<br></div></blockquote></td></tr></table>