Breaking from a thought habit can be hard. It's just our habit to
think that we are limited to a single C compiler on our system. Why
not have two compilers, gcc for linux, and ?[acl] for other stuff? On
Plan 9 we have c89 to compile foreign code. I would rather compile
applications on Linux us
i must say i don't see the point though.
in many ways, ?[acl] are attractive as a whole. (the
way it is done and the distribution of the work is part
of the point, although it's worth noting that the
arrangement isn't novel to it.) going back to .s production seems a
retrograde step to me. indeed
> How hard would it be to teach kenc to generate .s files and use
> the system assembler/loader? Or are there calling convention
> issuees as well?
There are calling convention differences and you'd also
have to emit debug info, but this would probably not be
too bad an intermediate step.
Russ
On 4/12/06, Aharon Robbins <[EMAIL PROTECTED]> wrote:
> How hard would it be to teach kenc to generate .s files and use
> the system assembler/loader? Or are there calling convention
> issuees as well?
that would probably mean merging the compiler
and the linker :) and yes there are calling conven
How hard would it be to teach kenc to generate .s files and use
the system assembler/loader? Or are there calling convention
issuees as well?
In article <[EMAIL PROTECTED]> you write:
>somehow i thought this might be the case.
>
>- erik
>
>On Tue Apr 11 06:58:07 CDT 2006, [EMAIL PROTECTED] wrote:
> the problem is that the X11 libraries are required for p9p to be useful.
the X11 libraries are probably not so bad (well, not in that sense), but i
wasn't referring to using ?[acl] for p9p anyway
the problem is that the X11 libraries are required for p9p to be useful.
tcc or icc on x86 machines seem good alternatives to gcc.
(tcc is very fast.)
- erik
On Tue Apr 11 20:11:18 CDT 2006, [EMAIL PROTECTED] wrote:
> it would still be useful for other software, and in some ways not too hard to
it would still be useful for other software, and in some ways not too hard to
do,
if so much other code didn't depend, often needlessly, on peculiar things in
gcc,
as noted in earlier discussion.
--- Begin Message ---
somehow i thought this might be the case.
- erik
On Tue Apr 11 06:58:07 CDT 2
somehow i thought this might be the case.
- erik
On Tue Apr 11 06:58:07 CDT 2006, [EMAIL PROTECTED] wrote:
> > i've considered this. would it be too much trouble to convert plan 9 object
> > files to elf? or to write a plan9-to-elf converter?
>
> this always seems like a good idea at first but
On Tue, Apr 11, 2006 at 05:37:48PM -0500, Russ Cox wrote:
> > P.S. Now, if I were an independent C++ consultant, I wouldn't push too hard,
> > after all -- even they should remember what happened to the Tower of Babel.
>
> The people at Babel had one really good language that
> everyone understood
> P.S. Now, if I were an independent C++ consultant, I wouldn't push too hard,
> after all -- even they should remember what happened to the Tower of Babel.
The people at Babel had one really good language that
everyone understood, and they were highly productive.
This reminds you of C++ programme
On Tue, Apr 11, 2006 at 01:26:49PM +1200, Andrew Simmons wrote:
> The good news is that things are going to get a whole lot more complicated,
> because, obviously, the way to make C++ easier to use is to add more
> features:
A colleague of mine, who is a chair of ANSI C++ Committee, told me on
On Mon, Apr 10, 2006 at 05:07:03PM -0700, David Leimbach wrote:
> On 4/10/06, Roman Shaposhnick <[EMAIL PROTECTED]> wrote:
> > On Mon, Apr 10, 2006 at 04:18:56PM -0700, David Leimbach wrote:
> > If the punch line here is, in fact, what I think it is, then
> > a good optimizing compiler should b
> i've considered this. would it be too much trouble to convert plan 9 object
> files to elf? or to write a plan9-to-elf converter?
this always seems like a good idea at first but is not,
as least as a solution for plan 9 from user space.
one of the main goals of p9p is to play nice with the
loc
No. In Limbo if you say I=0 and you haven't declared `I' then
you get an error. You only use the `I := 0' when you want to make
a new `I.'
And having lived with FORTRAN, a requirement to declare your variables
was a big advance. It was hard to find misspelled variables in
FORTRAN because they w
don't get me going. i once worked on a cad product complete
with a c++ shell and a fortran middle (complete with holorith data
and gobs of computed gotos.)
crunchy on the outside and chewy in the center.
- erik
On Tue Apr 11 05:22:29 CDT 2006, [EMAIL PROTECTED] wrote:
> >limbo's ":=" works lik
>limbo's ":=" works like that ...
>i := 0;# declares i as in an int and assigns 0 to it
>r := ref Boo;# declares r to be scarey
Well yes, but didn't Fortran's "=" work like that well before limbo?
C DECLARE I AS AN INTEGER AND ASSIGN 0 TO IT
I=0
C DECLARE A TO BE A SCAREY
i weep for you.
brucee
On 4/11/06, Charles Forsyth <[EMAIL PROTECTED]> wrote:
> > rob had a aimple example of some java that ":=" could help.
>
> i think almost any example would do: i started off writing Java using the
>Typename variable = expression;
>...
> style but java declar
> rob had a aimple example of some java that ":=" could help.
i think almost any example would do: i started off writing Java using the
Typename variable = expression;
...
style but java declarations are cluttered, and it becomes so hard
to see the part that does the work, that i r
rob had a aimple example of some java that ":=" could help.
brucee
On 4/11/06, Skip Tavakkolian <[EMAIL PROTECTED]> wrote:
> > limbo's ":=" works like that ...
>
> when i first looked at limbo, it took me a while to realize what a neat
> concept
> this is. also, has a nice consistent syntax in
2006/4/11, Andrew Simmons <[EMAIL PROTECTED]>:
The good news is that things are going to get a whole lot more complicated,because, obviously, the way to make C++ easier to use is to add more features:
http://www.artima.com/cppsource/cpp0xP.html
IMO There's a way too changed "auto" keyword (from C s
> limbo's ":=" works like that ...
when i first looked at limbo, it took me a while to realize what a neat concept
this is. also, has a nice consistent syntax in relation to ':' and '='
limbo's ":=" works like that ...
i := 0;# declares i as in an int and assigns 0 to it
r := ref Boo;# declares r to be scarey
brucee
On 4/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> the c++0x page kills me. their trick is as old and specialized as
>
>A = πr
>
> sure th
the c++0x page kills me. their trick is as old and specialized as
A = πr
sure their example looks slick, but there's a lot of sophistication lurking
in that simple-looking factor, π, or in their case, auto. and it would be too
trivial
to find another example that wouldn't look so sim
There's apparently very good money in knowing these little
esoteric bits about C++ though :).
For a depressingly typical example the following site is enlightening:
http://www.gotw.ca/gotw/
The good news is that things are going to get a whole lot more complicated,
because, obviously, the wa
sorry.
- erik
On Mon Apr 10 19:41:18 CDT 2006, [EMAIL PROTECTED] wrote:
> On Mon Apr 10 09:43:27 CDT 2006, [EMAIL PROTECTED] wrote:
>
> > That said, Neoptica (www.neoptica.com - the startup I'm involved
> > (committed?) with) is looking for a world-class systems/compilers
> > person to join
paul,
i'm looking for a job. my professional experience is in distributed
search. but i wrote quite a few interpreters and optimizers in the
process. (e.g. given a federated field set, a mapping to a real database
and a query, the query can be rewritten and then simplified in an
abstract fashio
On 4/10/06, Roman Shaposhnick <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 10, 2006 at 04:18:56PM -0700, David Leimbach wrote:
> > Interesting example...
> >
> > SomeContainer::iterator it = SomeContainerObject.begin();
> >
> > for (; it != SomeContainerObject.end(); ++it)
> >
> > is probably a lot fas
i've considered this. would it be too much trouble to convert plan 9 object
files to elf? or to write a plan9-to-elf converter?
- erik
On Mon Apr 10 06:36:50 CDT 2006, [EMAIL PROTECTED] wrote:
> > i think the gcc folks have different goals. they seem very interested in
> > lots of very sophisti
On Mon Apr 10 09:18:01 CDT 2006, rminnich@lanl.gov wrote:
> Brantley Coile wrote:
> It's humorous to see the inline madness, on machines with 512KB caches yet:
> [EMAIL PROTECTED] linux-2.6.16]$ grep -r -i 'static inline' . |wc
>21262 142677 1810997
>
> yep, 21262 instances of 'static inline'
On Mon, Apr 10, 2006 at 04:18:56PM -0700, David Leimbach wrote:
> Interesting example...
>
> SomeContainer::iterator it = SomeContainerObject.begin();
>
> for (; it != SomeContainerObject.end(); ++it)
>
> is probably a lot faster than
>
> for(; it != SomeConatinerObject.end(); it++)
>
> And I'
On 4/10/06, Andy Newman <[EMAIL PROTECTED]> wrote:
> On Tue, 2006-04-11 at 10:07 +1200, Andrew Simmons wrote:
> > I was recently told about the following compiler option. I honestly thought
> > it was an April Fool's joke:
> >
> > -Weffc++
>
> The "joke" is more that to use the language safely/corr
On Tue, 2006-04-11 at 10:07 +1200, Andrew Simmons wrote:
> I was recently told about the following compiler option. I honestly thought
> it was an April Fool's joke:
>
> -Weffc++
The "joke" is more that to use the language safely/correctly pretty much
requires such an option. There is a mini-i
Or they might just like writing stuff for the compiler, personal
entertainment.
I was recently told about the following compiler option. I honestly thought
it was an April Fool's joke:
-Weffc++
This option warns about C++ code which breaks some of the programming
guidelines given in the bo
> One processor I'm dealing with has something like a 19 cycle branch
> miss penalty, on a machine where it's memory is only 7 cycles away,
...[snip]...
> Worst quote from Sony: "Think in assembler, but code in C++"
that's an interesting processor you're describing there :)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10-Apr-06, at 7:09 AM, Ronald G Minnich wrote:
There's lots of other bad stuff that happened too. Linker-sets, for
example. Or, oh, the stuff like:
if (likely(a != b)) {eatme();}
Although I'm willing to claim that branch prediction hints do
You should see the bare machine then... Sony's GCC is even more hooped.And the PS3 version is no better, with huge dependence on "restrict" for any sort of performance, especially on SPU. And don't It's made me go back to coding assembly instead. And its structure packing so interferes with good
Brantley Coile wrote:
Or they might just like writing stuff for the compiler, personal
entertainment.
bingo.
I know one or two of the guys, or used to. It was all about optimize,
measure, optimize some more. The big picture got lost.
It's humorous to see the inline madness, on machines w
> i think the gcc folks have different goals. they seem very interested in
> lots of very sophisticated optimizations and support for every odd corner
> case.
Or they might just like writing stuff for the compiler, personal
entertainment. Or they like seeing their names on gcc.gnu.org
projects
i don't think that's it.
i think the gcc folks have different goals. they seem very interested in
lots of very sophisticated optimizations and support for every odd corner case.
(of course odd corner cases are exponential in sophisticated optimizations.)
i think their lack of success is indiciti
i rather strongly feel that the c99 people ought to have found
something really constructive to do instead.
distrust anthing with more than one underscore.
i've seen ...
#define iniline __inline__
more than once, and don't care what it means.
the ps2 linux port is crazy. trying to align things.
brucee
On 4/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Gcc does all these kinds of optimiza
> Gcc does all these kinds of optimizations and more. I can't imagine
> what they're optimizing for.
>
> gcc-developer time? many hours went into writing that code.
On the contrary, they are protecting their "job" just like any other
employee, by making themselves indispensable. I don't
> | The Plan 9 C libraries already provided a mechanism
> | for finding the caller - getcallerpc(2).
>
> What happens when there is no caller because the function got inlined?
Doesn't happen. One of the many nice things about the Plan 9 compilers.
In fact, I just added two instructions to an as
| The Plan 9 C libraries already provided a mechanism
| for finding the caller - getcallerpc(2).
What happens when there is no caller because the function got inlined?
Obviously with compiler support you could get the right effect, but
wouldn't it be a bit more work?
> What if I change the name of the function later? Isn't that what
> variables are for?
No, that's what sam's x//c// is for. Put
x/(^|[^a-zA-Z0-9_])OLD[^a-zA-Z0-9_]/ x/[a-zA-Z0-9_]+/ c/NEW/
in lib/sam.cmds and snarf and paste it into your sam command window as
needed. It's quick and easy.
i'm not convinced this is useful. if your program is sufficiently
complicated to warrent this sort of debugging aid, just printing
the caller's name (or pc) is most likely insufficient. most likely
you're going to need to know the whole call stack. and likely function
arguments and locals.
i di
> But why should I have to type the particular value several times?
> What if I change the name of the function later? Isn't that what
> variables are for?
Not variables named __func__. That's just disgusting. Sorry.
> Nah, even simple function calls can use it.
>
>check(a, b, c, __func__
| if you're writing the print statement,
| you *know* which function you're in.
But why should I have to type the particular value several times?
What if I change the name of the function later? Isn't that what
variables are for?
| it's only useful inside macros,
| which are mostly deprecated.
> What about when formatting a message that you want to return or print,
> but not kill the process?
it's easy to make up examples, but
i've never seen this in practice.
if you're writing the print statement,
you *know* which function you're in.
it's only useful inside macros,
which are mostly de
| formatting an assert message doesn't count,
| since assert will leave you a broken process to
What about when formatting a message that you want to return or print,
but not kill the process?
> i suppose you're expected to know how to read kmesg output and sic acid
> after the offender. ☺
you're supposed to be able to run stk() in acid.
i have yet to see a compelling use for __func__.
formatting an assert message doesn't count,
since assert will leave you a broken process to
debug.
__func__ looks like preprocessor magic, but must actually be implemented
as a magic variable in the compiler. imho, i think the standards committee
missed that one. it's pretty ugly.
is there a good argument for having __func__? it's not generally in the
plan 9 style to put stuff like that in
Russ Cox wrote:
Does pcc do C99? Anyone know how much or how little?
See /sys/src/cmd/cc/c99.
I'm courious, why has been __func__ declared unwanted?
smime.p7s
Description: S/MIME Cryptographic Signature
so do i. dealing with code that has more lines for the preprocessor
than for the compiler is torture. writing such code must be a disease.
brucee
On 4/9/06, Rob Pike <[EMAIL PROTECTED]> wrote:
> > ifdefs are so 80s.
>
> i wish that were so.
>
> -rob
> ifdefs are so 80s.
i wish that were so.
-rob
when ansi was going crazy, many years ago, i gave a talk
at AUUGM about "safe C". most of the audience understood,
despite my tequilla girl and my silly hat.
write it clean and portable ... ifdefs are so 80s.
brucee
On 4/8/06, Russ Cox <[EMAIL PROTECTED]> wrote:
> > New codes should be written
> New codes should be written in p9p or plan9 native, But for other poeples
> project they should be the one to decide I guess.As I understand it
> this was the main reason ape was created
>
> How do you guys handle this type of situation?
They don't. They just like to talk.
APE is still used f
On 4/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Writing code that will compile with ?c is just matter good style, ie.,
> not (ab)using cpp, not using gcc extensions and so on; see
> /sys/doc/comp.ps for details. Ape doesn't not even come into the
> picture, no sane C code should ever need
On 4/7/06, Russ Cox <[EMAIL PROTECTED]> wrote:
> > Does pcc do C99? Anyone know how much or how little?
>
> See /sys/src/cmd/cc/c99.
>
> Russ
>
>
Awesome thanks!
> Does pcc do C99? Anyone know how much or how little?
See /sys/src/cmd/cc/c99.
Russ
On 4/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Writing code that will compile with ?c is just matter good style, ie.,
> not (ab)using cpp, not using gcc extensions and so on; see
> /sys/doc/comp.ps for details. Ape doesn't not even come into the
> picture, no sane C code should ever need
Writing code that will compile with ?c is just matter good style, ie.,
not (ab)using cpp, not using gcc extensions and so on; see
/sys/doc/comp.ps for details. Ape doesn't not even come into the
picture, no sane C code should ever need to use cpp(1)
Figuring out if the builtin preprocessor will ha
> did you mean use gcc directly?
i meant pcc.
> I am not sure If I understood you correctly but to clarify my original
> question.
>
> Sometimes when I dont have access to my plan 9 system and my only computer
> is a linux box I want to check if a piece pf code will compile under ape.
you coul
On 4/8/06, Russ Cox <[EMAIL PROTECTED]> wrote:
> > this is just to assist me in porting some stuff into my plan9 box
>
> Just use pcc directly. All the relevant differences are in
> #include files, not compiler flags.
>
did you mean use gcc directly?
I am not sure If I understood you correctly bu
> this is just to assist me in porting some stuff into my plan9 box
Just use pcc directly. All the relevant differences are in
#include files, not compiler flags.
Russ
is this a good enough approximation of the pcc compiler in plan 9?
gcc -ansi -pedantic -std=c89
this is just to assist me in porting some stuff into my plan9 box
,Fernan
--
Public PGP/GnuPG key (http://www.fernski.com)
pub 1024D/3576CA71 2006-02-02 Fernan Bolando
Key fingerprint = FDFE C9A8 FFE
67 matches
Mail list logo