Page 1 of 2 [ 31 posts ]  Go to page 1, 2  Next

LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 34
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

23 Oct 2010, 6:03 pm

From the Wikipedia article on Singularity:

Wikipedia wrote:
The lowest-level x86 interrupt dispatch code is written in assembly language and C. Once this code has done its job, it invokes the kernel, whose runtime and garbage collector are written in Sing# (an extended version of Spec#, itself an extension of C#) and runs in unsafe mode. The hardware abstraction layer is written in C++ and runs in safe mode. There is also some C code to handle debugging.


So C, C++, and Assembly are used along with C#.


_________________
I don't want a good life. I want an interesting one.


ruveyn
Veteran
Veteran

User avatar

Joined: 21 Sep 2008
Age: 87
Gender: Male
Posts: 31,502
Location: New Jersey

23 Oct 2010, 7:55 pm

When I first got in the business the choice was simple: Assembly language or FORTRAN. Those were the days.

ruveyn



mcg
Veteran
Veteran

User avatar

Joined: 26 Jan 2010
Age: 34
Gender: Male
Posts: 538
Location: Sacramento

23 Oct 2010, 9:10 pm

LordoftheMonkeys wrote:
mcg wrote:
No, the software-based memory protection I described above could only be done with a type-safe language like C# or Java.


When C# code is compiled, it becomes machine code. It follows that you can do anything you can do in C# with machine code, and thus with Assembly language as well.
C# and Java are compiled to type-safe bytecode, not x86 machine code. For this reason, it is possible to statically verify that a compiled C# or Java program won't clobber another process's memory. It is impossible (or at least prohibitively difficult) to statically verify that native x86 code won't clobber another process' memory (you can't even do this with uncompiled C code).

Software-based memory protection is an alternative to the expensive page-based hardware memory protection used by current processors and operating systems.



LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 34
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

23 Oct 2010, 11:23 pm

mcg wrote:
Software-based memory protection is an alternative to the expensive page-based hardware memory protection used by current processors and operating systems.


Interesting. I will try to do some research on that.


_________________
I don't want a good life. I want an interesting one.


LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 34
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

23 Oct 2010, 11:38 pm

One thing I objected to in NewShinyCD's post, aside from what I already mentioned, is that they seem to have an extremely narrow, mainstream-centric view of programming. There seems to be a general attitude among amateur programmers these days that the only languages that matter are C++, C#, Visual Basic, Java, PHP, and Javascript. Fu¢k functional programming. Fu¢k command-line scripting. Fu¢k system administration. Fu¢k C, Perl, Common Lisp, Prolog, Assembly language, Python, and Fortran. Who cares about exploring possibilities and learning how things work when you can have the instant gratification of being able to write PC games with minimal effort? That's all programming is good for after all.


_________________
I don't want a good life. I want an interesting one.


Last edited by LordoftheMonkeys on 24 Oct 2010, 8:01 am, edited 3 times in total.

Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

24 Oct 2010, 2:04 am

mcg wrote:
C# and Java are compiled to type-safe bytecode, not x86 machine code.

Bytecode is not inherently more type-safe than machine code. Bytecode is the machine code of a virtual machine.

Quote:
For this reason, it is possible to statically verify that a compiled C# or Java program won't clobber another process's memory.

How can you statically verify a compiled bytecode program in a way that you couldn't statically verify a compiled machine code program?

Quote:
Software-based memory protection is an alternative to the expensive page-based hardware memory protection used by current processors and operating systems.

This sounds wrong. Generally, things done in hardware are much faster than things done in software.


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton


Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

24 Oct 2010, 2:24 am

LordoftheMonkeys wrote:
It forces a much greater dependence on code that someone else wrote.

The benefit is that you don't have to write all that code (and debug it) from scratch. If you're doing something really complicated, this could be the difference between being able to do it or not.

Quote:
With C, you build everything from the ground up, which means not only do you learn better, but programs written in C are smaller and potentially more efficient. The lower-level you program, the better the end result is.

If you want to really know computers, you do have to understand things at a low level, but that doesn't mean that the lower the level the better.

The lower the level you program at, the less productive you are. This is a well known rule in software: your productivity in lines of code is roughly constant in any language, so if you can say more in one line of code, you can get more done faster.

I do agree with you that the style of programming where you just say, "OMG I'm sure the Super-Duper-API has a call for that" to absolutely everything and assume that if it can be done, it has to be in the API is not the best way to do it.


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton


mcg
Veteran
Veteran

User avatar

Joined: 26 Jan 2010
Age: 34
Gender: Male
Posts: 538
Location: Sacramento

24 Oct 2010, 12:15 pm

Ancalagon wrote:
mcg wrote:
C# and Java are compiled to type-safe bytecode, not x86 machine code.

Bytecode is not inherently more type-safe than machine code. Bytecode is the machine code of a virtual machine.

Bytecode is not inherently type-safe, but both Java and C# bytecode specifically include type information where as compiled x86 code doesn't.

Ancalagon wrote:
Quote:
For this reason, it is possible to statically verify that a compiled C# or Java program won't clobber another process's memory.

How can you statically verify a compiled bytecode program in a way that you couldn't statically verify a compiled machine code program?

Here's the relevant section of the jvm spec: http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#88597

Since C isn't a type safe language (explicitly casting between two pointer types is considered a legit operation), you couldn't enforce type-safety for the compiled code even if you had the means to verify type (which means your program could end up using a random set of bits as a memory address).

Ancalagon wrote:
Quote:
Software-based memory protection is an alternative to the expensive page-based hardware memory protection used by current processors and operating systems.

This sounds wrong. Generally, things done in hardware are much faster than things done in software.

Well if you were using software to implement current hardware-based memory protection schemes, then that would be slow as all hell. Currently, x86s use the a translation lookaside buffer (basically a cache of VAs and corresponding PAs) to speed up virtual address -> physical address translation. Whenever you switch to a different virtual address space, this buffer needs to be flushed, as the mappings are no longer valid. This means that every time the newly switched-to process tries to read or write a pointer, a page fault results and the processor has to walk through the page tables to resolve the address. This is an extremely expensive operation, even when implemented quickly in hardware.

The idea here is that you can make all of this run-time overhead unnecessary by verifying protection at load-time or install-time.



NewShinyCD
Blue Jay
Blue Jay

User avatar

Joined: 8 Oct 2010
Age: 35
Gender: Male
Posts: 78
Location: North Georgia

24 Oct 2010, 8:53 pm

I only said that C# was good for someone wanting to get into programming, and you can jump to Java and C++ when you become more comfortable with programming. Then C or other low level languages.
I mean, when I first learned about programming (I was about 12 years old) I jumped into ASM but it only made me hate programming. Then someone told me about Python and the syntax was awful. Then I found out about VB and then C# which made me like to program again. My next step is probably C or something, although with the place I work at they are doing lots of promotions and I might concentrate on web scripting and database stuff.

Also I forgot, if you want to get into hardware type stuff there is the Arduino, although it does require some knowledge of programming in C++, but it is only basic loops and stuff at first (e.g. how to make a LED blink on and off).



Plywood
Deinonychus
Deinonychus

User avatar

Joined: 7 Jun 2010
Age: 32
Gender: Male
Posts: 318

31 Oct 2010, 12:52 pm

I read what you all said but you guys were talking about stuff that I really didn't understand.

Not to give up early but I don't think I can do it because I don't really have a mathematical mindset. I have had problems with math all my life.



CloudWalker
Veteran
Veteran

User avatar

Joined: 26 Mar 2009
Age: 34
Gender: Male
Posts: 711

31 Oct 2010, 10:16 pm

Don't worry about that. A lot of what's said is just ideology differences. You will come to have your own opinion after you learn a few languages.

I think what you should find out first is whether you really like programming. If there's some program that you are familiar with that suppors scripting, that may be a good place to start. Like someone mentioned before, html+javascript is also a good place to start. Note that those scripting languages and javascript are horrible languages, but they let you have a feel of what programming is really about fast. If you decided to look further, then C++ and java is what I recommended.



hitokage
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 30 May 2008
Age: 45
Gender: Male
Posts: 39
Location: Frederick, MD

01 Nov 2010, 7:38 am

LordoftheMonkeys wrote:
People entering the IT field will still be required to take CompTIA tests,

No one has ever been required to take certifications - CompTIA or others. That doesn't mean that an employer can't have them as a requirement for a position though.

LordoftheMonkeys wrote:
and the certifications are good for three years.

This is only the case for certifications taken on and after January 1st, 2011. You also only need to update on the highest level certification you received, so if you are A+ and Network+ certified, you would only need to take the Network+ again.

LordoftheMonkeys wrote:
Not only is CompTIA still the best way to get into IT, it's also the only way (for most professions).

This depends a lot on what you do/want to do and the requirements set by an employer. If you want to be on a help desk, a basic Microsoft certification can be enough. If being on the help desk requires more hardware knowledge, it depends on who the hardware manufacturer is, as some only require their certification, but don't require the A+ first.



Plywood
Deinonychus
Deinonychus

User avatar

Joined: 7 Jun 2010
Age: 32
Gender: Male
Posts: 318

05 Nov 2010, 2:08 pm

Thanks for all of the replies...
One more question
I am considering taking programming for college however I just wondered if I needed to be good at algebra to be a good programmer.



Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

05 Nov 2010, 5:37 pm

Plywood wrote:
Thanks for all of the replies...
One more question
I am considering taking programming for college however I just wondered if I needed to be good at algebra to be a good programmer.

What parts of algebra give you trouble? If it's a problem with any form of abstract symbol manipulation, that's probably a problem, but if it's just being bad at factoring or somthing like that, then it probably won't.


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton


Plywood
Deinonychus
Deinonychus

User avatar

Joined: 7 Jun 2010
Age: 32
Gender: Male
Posts: 318

07 Nov 2010, 1:24 pm

I have no problem setting up the equation but I don't really understand the steps for solving it. I always have problems with whether or not I have to add or subtract.



Avarice
Veteran
Veteran

User avatar

Joined: 5 Oct 2009
Age: 31
Gender: Male
Posts: 1,067

08 Nov 2010, 5:30 am

I suggest that you get a book on programming. I started with C, whether that was a good choice or not I don't know. I'm still only learning the basics, but I've tried Python as well and while that was far easier, I didn't understand the theory under the code nearly as well as I do with C. I've enjoyed programming, and from what I've read if you don't enjoy it you probably shouldn't go into the field.

Anyway, I'm not an expert. These are just my experiences with programming so far.