niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » C
Help with research
Post new topic   Reply to topic Page 173 of 173 [2591 Posts] View previous topic :: View next topic
Goto page:  Previous  1, 2, 3, ..., 171, 172, 173
Author Message
Darren New
*nix forums beginner


Joined: 16 Jun 2006
Posts: 42

PostPosted: Sat Jul 15, 2006 12:43 am    Post subject: Re: Amazon used lisp & C exclusively? (clc,cll) Reply with quote

Keith Thompson wrote:
Quote:
Yes, you really can. You just can't write it in *portable* C. The C
standard specifically allows implementations to provide extensions (as
long as they don't change the behavior of any strictly conforming
program) and a program that uses those extensions can still be a
"conforming program" in the sense defined in the standard.

And Common Lisp doesn't allow any implementation-defined extensions?
Wow. I never realized that. ;-)

Quote:
Ada does provide some features that let you do certain low-level
things that aren't directly supported in unextended C, but any Ada
program that uses those features will still be non-portable.

Not quite. The names of the interrupts are obviously going to be
implementation defined, and for that matter targer-architecture defined.
But the other things aren't. Prioritizing interrupts, disabling
interrupts while one is running, threading, atomic writes, volitile
writes, dynamic loading of code, etc are all portable to the extent that
your compiler supports them at all.

--
Darren New / San Diego, CA, USA (PST)
This octopus isn't tasty. Too many
tentacles, not enough chops.
Back to top
Rob Warnock
*nix forums beginner


Joined: 04 May 2005
Posts: 14

PostPosted: Sat Jul 15, 2006 2:02 am    Post subject: Re: Amazon used lisp & C exclusively? (clc,cll) Reply with quote

goose <ruse@webmail.co.za> wrote:
+---------------
| Darren New wrote:
| > Sure. So it's not "ANSI C" that lets you write the OS. It's that your
| > particular compiler has finished defining the undefined semantics that
| > C allows.
|
| The C standard differentiates between "undefined" and "implementation
| defined" whereas the Lisp standard doesn not.
+---------------

Actually, the ANSI CL standard *does* differentiate between "undefined"
and "implementation defined", except that it distinguishes them into
"undefined" [the big, bad, snot-monkeys-out-your-nose & thermonulear war
case] and the several sub-cases: "unspecified", "implementations may be
extended", "return values are unspecified", etc. From the CLHS:

http://www.lisp.org/HyperSpec/Body/sec_1-4-2.html
1.4.2 Error Terminology

...

The consequences are unspecified

This means that the consequences are unpredictable but harmless.
Implementations are permitted to specify the consequences of
this situation. No conforming code may depend on the results
or effects of this situation, and all conforming code is
required to treat the results and effects of this situation
as unpredictable but harmless. For example, ``if the second
argument to shared-initialize specifies a name that does not
correspond to any slots accessible in the object, the results
are unspecified.''

The consequences are undefined

This means that the consequences are unpredictable. The
consequences may range from harmless to fatal. No conforming
code may depend on the results or effects. Conforming code
must treat the consequences as unpredictable. In places where
the words ``must,'' ``must not,'' or ``may not'' are used,
then ``the consequences are undefined'' if the stated
requirement is not met and no specific consequence is
explicitly stated. An implementation is permitted to signal
an error in this case.

For example: ``Once a name has been declared by defconstant
to be constant, any further assignment or binding of that
variable has undefined consequences.''

...

The return values are unspecified

This means that only the number and nature of the return
values of a form are not specified. However, the issue of
whether or not any side-effects or transfer of control
occurs is still well-specified.

A program can be well-specified even if it uses a function
whose returns values are unspecified. For example, even if
the return values of some function F are unspecified, an
expression such as (length (list (F))) is still
well-specified because it does not rely on any particular
aspect of the value or values returned by F.

Implementations may be extended to cover this situation

This means that the situation has undefined consequences;
however, a conforming implementation is free to treat the
situation in a more specific way. For example, an implementation
might define that an error is signaled, or that an error
should be signaled, or even that a certain well-defined
non-error behavior occurs.

No conforming code may depend on the consequences of such a
situation; all conforming code must treat the consequences
of the situation as undefined. Implementations are required
to document how the situation is treated.

For example, ``implementations may be extended to define
other type specifiers to have a corresponding class.''

Overall, CL breaks down the issue of "undefined/unspecified" behaviour
into a dozen different cases. See CLHS 1.4.2 for details.


-Rob

-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
Back to top
Keith Thompson
*nix forums Guru


Joined: 28 Feb 2005
Posts: 5173

PostPosted: Sat Jul 15, 2006 2:10 am    Post subject: Re: Amazon used lisp & C exclusively? (clc,cll) Reply with quote

Darren New <dnew@san.rr.com> writes:
Quote:
Keith Thompson wrote:
Yes, you really can. You just can't write it in *portable* C. The C
standard specifically allows implementations to provide extensions (as
long as they don't change the behavior of any strictly conforming
program) and a program that uses those extensions can still be a
"conforming program" in the sense defined in the standard.

And Common Lisp doesn't allow any implementation-defined extensions?
Wow. I never realized that. Wink

And I never said it. I was responding to a statement you made
upthread about C:

| You really can't write a kernel in C if your machine uses
| memory maps, I/O ports, interrupts, etc.)

I said nothing at all about Common Lisp.

Quote:
Ada does provide some features that let you do certain low-level
things that aren't directly supported in unextended C, but any Ada
program that uses those features will still be non-portable.

Not quite.

Yes, quite.

Quote:
The names of the interrupts are obviously going to be
implementation defined, and for that matter targer-architecture
defined. But the other things aren't. Prioritizing interrupts,
disabling interrupts while one is running, threading, atomic writes,
volitile writes, dynamic loading of code, etc are all portable to the
extent that your compiler supports them at all.

Sure, Ada defines more things in this area than C does. But any Ada
code that works with interrupts is going to be non-portable, in the
sense that you won't necessarily be able to copy the source to another
system, recompile it, and expect it to run.

I suppose the term "non-portable" is ambiguous. Code that uses
interrupts certainly can be ported, at the expense of making changes
to the source. Making these changes is likely to be easier in some
languages than in others. Code that's truly portable (perhaps I
should say "maximally portable") can be ported to any comforming
implementation with no source changes. That level of portability is
unlikely for code that uses interrupts, at least if it's written in
Ada or C.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Back to top
J. J. Farrell
*nix forums addict


Joined: 09 Mar 2005
Posts: 57

PostPosted: Sat Jul 15, 2006 8:28 am    Post subject: Re: About iServicePro Reply with quote

Ian Collins wrote:
Quote:
jjf@bcs.org.uk wrote:

Please do not spam somp.lang.c with unsolicited advertisements which
are entirely off-topic.

I've asked before and I'll ask again - please don't reply to spam that a
decent news server will filter out. If you must, for pity's sake don't
quote it!

No need to ask, that's something I've been ranting about for decades.
My apologies, it was intended to be a private email; I don't know if
it's possible to cancel from Google, but it would have been too late by
the time I'd found out how.
Back to top
Alan Balmer
*nix forums Guru


Joined: 22 Feb 2005
Posts: 490

PostPosted: Sat Jul 15, 2006 6:09 pm    Post subject: Re: About iServicePro Reply with quote

On Sat, 15 Jul 2006 09:49:55 +1200, Ian Collins <ian-news@hotmail.com>
wrote:

Quote:
Al Balmer wrote:
On Fri, 14 Jul 2006 22:40:25 +1200, Ian Collins <ian-news@hotmail.com
wrote:


jjf@bcs.org.uk wrote:

Please do not spam somp.lang.c with unsolicited advertisements which
are entirely off-topic.


I've asked before and I'll ask again - please don't reply to spam that a
decent news server will filter out. If you must, for pity's sake don't
quote it!


Treat it like any other off topic posting - tell the poster not to do
it again, then tell him where to go.

Do you think spammers read the followups to their posting?

Sometimes. If they're amateurs, sometimes they even defend it.

Quote:
Best let the
machines take care of spam.

Already done. I don't just trust some mysterious system to take care
of spam, because it won't. Even a learning filter requires feedback. I
generally just let Spamcop's automated analysis do the job.

Granted, my smart-ass remark didn't contribute anything to the group,
but it's not the first such remark I've seen here, and won't be the
last. Let's not turn it into a big deal.

--
Al Balmer
Sun City, AZ
Back to top
Darren New
*nix forums beginner


Joined: 16 Jun 2006
Posts: 42

PostPosted: Sat Jul 15, 2006 9:04 pm    Post subject: Re: Amazon used lisp & C exclusively? (clc,cll) Reply with quote

Keith Thompson wrote:
Quote:
Sure, Ada defines more things in this area than C does. But any Ada
code that works with interrupts is going to be non-portable,

Right. And the other five or six facilities that Ada provides for
hardware kernel-type programming that C ignores are what I was talking
about when I said "not really".

--
Darren New / San Diego, CA, USA (PST)
This octopus isn't tasty. Too many
tentacles, not enough chops.
Back to top
Keith Thompson
*nix forums Guru


Joined: 28 Feb 2005
Posts: 5173

PostPosted: Sat Jul 15, 2006 11:29 pm    Post subject: Re: Amazon used lisp & C exclusively? (clc,cll) Reply with quote

Darren New <dnew@san.rr.com> writes:
Quote:
Keith Thompson wrote:
Sure, Ada defines more things in this area than C does. But any Ada
code that works with interrupts is going to be non-portable,

Right. And the other five or six facilities that Ada provides for
hardware kernel-type programming that C ignores are what I was talking
about when I said "not really".

And, as I explained, you were mistaken. You can't write a kernel in
portable C; you clearly can write a kernel in C.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Back to top
heinz
*nix forums beginner


Joined: 26 Feb 2006
Posts: 2

PostPosted: Sun Jul 16, 2006 4:10 am    Post subject: Re: IOCTL_STORAGE_QUERY_PROPERTY and the STORAGE_BUS_TYPE data type Reply with quote

Do not post things about the DDK in the C language group. Always post
to the most relevant group to keep stuff not of general interest from
cluttering other groups. That's the whole purpose of having a DDK
group.

Quote:
It seems to work fine except that I had to alter one of the default
struct definitions which I originally got from the DDK.

Never modify the DDK header files! This is why you are having
problems. It will also make upgrading the DDK a lot of unnecessary
work.

Quote:
I had to change the line "STORAGE_BUS_TYPE BusType;" to
"USHORT BusType;" for the STORAGE_ADAPTER_DESCRIPTOR structure.

The DDK defines it as UCHAR which you should be using. Yes, this is
dumb the DDK does not use its own enum for the purpose. Also you
should ensure structure packing is 8. The DDK headers have problems if
you try to use structure packing other than 8 and indeed this
particular structure is vulnerable (sizeof & field alignment). That's
dumb too, but less effort to just go with Microsoft's guidelines when
you are dealing with the DDK...
Back to top
Ian
*nix forums Guru


Joined: 16 Aug 2005
Posts: 1615

PostPosted: Sun Jul 16, 2006 9:41 am    Post subject: Re: Compiling Programs contains Xutility calls Reply with quote

ehabaziz2001@gmail.com wrote:
Quote:
Where can I download the header file xutility.h for compiling a C
program ?

Have you searched for it?


--
Ian Collins.
Back to top
Rob Thorpe
*nix forums addict


Joined: 27 Jun 2005
Posts: 50

PostPosted: Thu Jul 20, 2006 11:11 pm    Post subject: Re: Amazon used lisp & C exclusively? (clc,cll) Reply with quote

Keith Thompson wrote:
Quote:
Darren New <dnew@san.rr.com> writes:
Keith Thompson wrote:
Sure, Ada defines more things in this area than C does. But any Ada
code that works with interrupts is going to be non-portable,

Right. And the other five or six facilities that Ada provides for
hardware kernel-type programming that C ignores are what I was talking
about when I said "not really".

And, as I explained, you were mistaken. You can't write a kernel in
portable C; you clearly can write a kernel in C.

That's really the same as almost any language though. Lets take
standard Intercal to be the language defined in the Intercal manual.
You can't write a kernel in standard Intercal. But you could implement
a special version with (maybe non-portable) extensions in which a
kernel could be implemented.
Back to top
Keith Thompson
*nix forums Guru


Joined: 28 Feb 2005
Posts: 5173

PostPosted: Thu Jul 20, 2006 11:59 pm    Post subject: Re: Amazon used lisp & C exclusively? (clc,cll) Reply with quote

"Rob Thorpe" <robert.thorpe@antenova.com> writes:
Quote:
Keith Thompson wrote:
Darren New <dnew@san.rr.com> writes:
Keith Thompson wrote:
Sure, Ada defines more things in this area than C does. But any Ada
code that works with interrupts is going to be non-portable,

Right. And the other five or six facilities that Ada provides for
hardware kernel-type programming that C ignores are what I was talking
about when I said "not really".

And, as I explained, you were mistaken. You can't write a kernel in
portable C; you clearly can write a kernel in C.

That's really the same as almost any language though. Lets take
standard Intercal to be the language defined in the Intercal manual.
You can't write a kernel in standard Intercal. But you could implement
a special version with (maybe non-portable) extensions in which a
kernel could be implemented.

Certainly.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 173 of 173 [2591 Posts] Goto page:  Previous  1, 2, 3, ..., 171, 172, 173
View previous topic :: View next topic
The time now is Sat Jan 10, 2009 12:30 am | All times are GMT
navigation Forum index » Programming » C
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Home based Internet research Jobs honey PHP 0 Fri Jul 21, 2006 11:29 am
No new posts Bug#378939: ITP: libcomplearn -- machine learning through... Rudi Cilibrasi devel 0 Wed Jul 19, 2006 8:40 pm
No new posts linux file system research direction? cmk128@hotmail.com system 3 Wed Jun 07, 2006 2:17 am
No new posts Home based Internet research Jobs zangmu.safe@gmail.com networking 0 Thu May 18, 2006 11:26 am
No new posts Looking for MySQL users for market research Matthew Zito MySQL 0 Thu May 11, 2006 6:29 am

Debt Consolidation | Free Mmorpg | Magic the Gathering | Loans | Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 19.2805s ][ Queries: 16 (19.1460s) ][ GZIP on - Debug on ]