What happens when your program crashes?

R

robertwessel2

Not at all. ~1500USD/month is a salary that many would die for. Compared
to the population of this country, only a small fraction earn that
much. Which is why s/w engineering is currently the most coveted field
of study, to be taken whether or not one really *has* any interest in
CS.


Indeed. In PPP terms, an $18K/yr nominal salary in India is roughly
equivalent to $75k in the US.
 
R

Richard

Indeed. In PPP terms, an $18K/yr nominal salary in India is roughly
equivalent to $75k in the US.

Depends where in India. Go to Mumbai. There are people who live on a few
dollars week there under the shadow of people who live in 20,000,000
dollar apartments.
 
J

jacob navia

santosh said:
jacob navia wrote:



But that doesn't include full source for lcc-win32, unlike gcc. What
would be the size of download of the full sources for lcc-win32?

lcc-win source code:

Compiler+Preprocessor+Assembler (lcc.exe):
45 558 lines, 1 220 469 bytes

Linker: lcclnk.exe
9 902 lines, 282 921 bytes

IDE+Debugger,Project management, software metrics, profiler, etc
(wedit.exe):
79 314 lines, 2 075 178 bytes

C Library:
46 476 1 119 047 bytes

Library builder (lcclib.exe)
1018 lines, 31 179 bytes
 
S

santosh

jacob said:
lcc-win source code:

Compiler+Preprocessor+Assembler (lcc.exe):
45 558 lines, 1 220 469 bytes

Linker: lcclnk.exe
9 902 lines, 282 921 bytes

IDE+Debugger,Project management, software metrics, profiler, etc
(wedit.exe):
79 314 lines, 2 075 178 bytes

C Library:
46 476 1 119 047 bytes

Library builder (lcclib.exe)
1018 lines, 31 179 bytes

Thanks. Your implementation is rather similar to PellesC. Small, C99
optimistic, and Windows specific. As an aside, do you regret basing
your compiler on top of lcc, as opposed to writing it from scratch?
 
H

Harald van Dijk

And do we have a fully conforming implementation of ISO 7185 that's
reasonably cross platform as well?

http://gnu-pascal.de/

with a note from

http://www.moorecad.com/standardpascal/compiler.html

It's a bit of a pain to make sure the specific version you get can be
made to conform to the standard, but it's possible, and it can run on
many (most? all?) systems that can run GCC.

Why are we talking about conformance of Pascal implementations on
comp.lang.c, by the way?
 
S

santosh

Harald said:
http://gnu-pascal.de/

with a note from

http://www.moorecad.com/standardpascal/compiler.html

It's a bit of a pain to make sure the specific version you get can be
made to conform to the standard, but it's possible, and it can run on
many (most? all?) systems that can run GCC.

Why are we talking about conformance of Pascal implementations on
comp.lang.c, by the way?

Thanks. Yes, it's OT and this should hopefully be the last post to this
subthread.
 
C

CBFalconer

santosh said:
And do we have a fully conforming implementation of ISO 7185 that's
reasonably cross platform as well?

The only one I know of today is gpc. However, it tries to do too
much, so I cut it back to the standard with:

alias pc=gpc --standard-pascal --no-mixed-comments -gstabs+

However I rarely use it anymore, and I am using a fairly old
version. It loads monstrosities from the library.
 
C

CBFalconer

jacob said:
lcc-win source code:

Compiler+Preprocessor+Assembler (lcc.exe):
45 558 lines, 1 220 469 bytes

Linker: lcclnk.exe
9 902 lines, 282 921 bytes

IDE+Debugger,Project management, software metrics, profiler, etc
(wedit.exe):
79 314 lines, 2 075 178 bytes

C Library:
46 476 1 119 047 bytes

Library builder (lcclib.exe)
1018 lines, 31 179 bytes

You omitted the download URL. I gather you are announcing that
that source is now freely available. What is the license under
which you issue it?

Incidentally the sum of your source lines is roughly 180,000, not
271,000. Something is wrong with your arithmetic somewhere.
 
R

Richard Heathfield

CBFalconer said:
jacob navia wrote:

You omitted the download URL. I gather you are announcing that
that source is now freely available.

What makes you gather that? I don't recall his announcing anything of the
kind.
What is the license under which you issue it?

If he does issue the source code at all, presumably it's under the EPM[1]
licence (and there's nothing particularly wrong with that, by the way -
freedom isn't the only business model for software).
Incidentally the sum of your source lines is roughly 180,000, not
271,000. Something is wrong with your arithmetic somewhere.

True enough, although hardly a big deal - anyone can mess up on the maths.
I remember with a certain degree of wry fondness a time when I calculated
the speed of light at school, and it came out as 3 metres per second -
which makes me superluminal even at a light jog, and means that (if only a
car could fly through space) I could drive the four light-years to Alpha
Centauri in less than six months, without ever breaking the motorway speed
limit. 50% is peanuts.


[1] Enormous Pile of Money
 
C

CBFalconer

Richard said:
CBFalconer said:



What makes you gather that? I don't recall his announcing
anything of the kind.

If he mentions the source code size, and considers it of interest
to us, it should be available, no? This thread started by
comparing binary sizes, which is another matter entirely. I
corrected my estimate relative to gcc, and concluded that gcc and
lcc binaries are roughly equisized.
 
H

Harald van Dijk

If he mentions the source code size, and considers it of interest to us,
it should be available, no?

No. jacob gave the source code size because he was directly asked for the
source code size. santosh asked: "What would be the size of download of
the full sources for lcc-win32?" jacob could have answered with "There is
no download of the full sources for lcc-win32, you can't ask for the size
of something that doesn't exist!!", but that would have been unhelpful
and annoying. Instead, he answered santosh's question. I don't see why
you're reading any more into it.
 
R

Richard

Harald van Dijk said:
No. jacob gave the source code size because he was directly asked for the
source code size. santosh asked: "What would be the size of download of
the full sources for lcc-win32?" jacob could have answered with "There is
no download of the full sources for lcc-win32, you can't ask for the size
of something that doesn't exist!!", but that would have been unhelpful
and annoying. Instead, he answered santosh's question. I don't see why
you're reading any more into it.

I do. He's being his usual objectionable self.
 
C

CBFalconer

Harald said:
.... snip ...

No. jacob gave the source code size because he was directly asked
for the source code size. santosh asked: "What would be the size
of download of the full sources for lcc-win32?" jacob could have
answered with "There is no download of the full sources for
lcc-win32, you can't ask for the size of something that doesn't
exist!!", but that would have been unhelpful and annoying.
Instead, he answered santosh's question. I don't see why you're
reading any more into it.

Because, in an earlier message, Jacob specifically brought up the
subject of the source code and its size. It doesn't really matter,
since I assume it to be meaningless, because not available.
 
J

João Jerónimo

jacob said:
As you can see both environments are completely different. It would be
interesting to hear from people that use debuggers in other embedded
systems to share their experiences here.

Why don't those guys just test their code in an enulator before loading it
into EPROMs?

JJ
 
J

jacob navia

João Jerónimo said:
Why don't those guys just test their code in an enulator before loading it
into EPROMs?

JJ

An emulator is fine for many tasks, but there is nothing
like the *real* thing.

Timing considerations, input/output, and many other factors make
an emulator different than the on-chip processor. The chip
interacts with an I2C bus, and must control the bus correctly.

The emulator runs in a PC and emulating the bus and the i/o
devices is quite difficult, since the real chip goes MUCH
slower than the emulator in a PC!
 
J

João Jerónimo

Bart said:
Actually, it does still apply. Only not to the environments you are
using.
And incidentally, I agree that C is still live and kicking. It has
been the language that I have used most in the past 8 years and I
still use it on a daily basis.

Computer Science and Electronic Engineering students learn C in their first
year in my University.
While this option is stupid as the first programming language (C is
difficult), I think it shows the actuality of the language (and it's still
wide applicability).

JJ
 
J

João Jerónimo

jacob said:
An emulator is fine for many tasks, but there is nothing
like the *real* thing.

Timing considerations, input/output, and many other factors make
an emulator different than the on-chip processor. The chip
interacts with an I2C bus, and must control the bus correctly.

The emulator runs in a PC and emulating the bus and the i/o
devices is quite difficult, since the real chip goes MUCH
slower than the emulator in a PC!

Yes. That's true.
Some kinds of bugs are, however, trackable inside emulators. An emulator
can correctly emulate the general environment of the CPU and the
peripherals. If you have a bug in an algorithm, the emulator can help you a
lot.
At the end of the day, you would finally load the code into your (E)(E)PROM
and track down issues with slow hardware or other unexpected conditions
which depend on real hardware.

Of course, if there's no emulator for the chip you are programming, it's
not practical to write your own instead of developing your program.

JJ
 
K

Keith Thompson

CBFalconer said:
Harald van D?k wrote:
... snip ...

Because, in an earlier message, Jacob specifically brought up the
subject of the source code and its size. It doesn't really matter,
since I assume it to be meaningless, because not available.

It seem to me that source code size is a perfectly valid (though
imprecise) metric for the complexity and maintainability of a piece of
softwre, whether the source code is available or not.
 
A

Antoninus Twink

jacob navia said:
[...] we are going to see what
happens when in the middle of the execution of your program, you see

"Segmentation fault"

And nothing. Your program doesn't exist any more, and it is up
to you to find *where* in those thousands of lines lies the fault.

Easy.
gdb ./foo core

An interesting solution for a man who only a few days ago claimed in
this group never to use a debugger, but to be able to debug any and all
code by hand just from reading the source...
 
K

Kelsey Bjarnason

[snips]

I am not dismissing it. What I just do not believe are the wild claims
being done here like Mr Heathfield saying he can debug code over the
phone without seeing it, or the others with their stories of debugging
with "just reading the code", etc.

#include <stdio.h>

int main(void)
{
int x, y, z;
x = 3;
y = 2;
z = 4;

z *= x / y;

printf( "z = %d\n", z );
return 0;
}

Complaint: prints z = 4, instead of z = 6.

Can *you* debug this just by reading the code? Probably. So can many
others. What is so unbelievable about it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top