Page 3 of 10
Posted: Wed Dec 26, 2007 7:43 am
by Craze Frog
Posted: Thu Dec 27, 2007 12:22 am
by AndrewAPrice
Craze Frog wrote:
....
As a coder, I would not have bought that keyboard.
Posted: Thu Dec 27, 2007 4:52 am
by Laksen
MessiahAndrw wrote:Craze Frog wrote:(image)
....
As a coder, I would not have bought that keyboard.
I have a keyboard like that. Probably just like most of the rest of the computer users in Denmark.
It's great, really. But not for coding in a curly bracket language.
But that's ok with me. I code in Object Pascal
Posted: Thu Dec 27, 2007 4:47 pm
by Combuster
MessiahAndrw wrote:....
As a coder, I would not have bought that keyboard.
Seriously, if you write your native language, a specific keyboard might be a necessity. If I were german, I would want some easy method to type ß,
without using Alt-2-2-5. And if that wasn't enough, try typing in japanese or greek for a change
Seriously, expecting everybody to use an US keyboard is IMNSHO like denying people their culture.
Posted: Thu Dec 27, 2007 6:00 pm
by AndrewAPrice
Combuster wrote:MessiahAndrw wrote:....
As a coder, I would not have bought that keyboard.
Seriously, if you write your native language, a specific keyboard might be a necessity. If I were german, I would want some easy method to type ß,
without using Alt-2-2-5. And if that wasn't enough, try typing in japanese or greek for a change
Seriously, expecting everybody to use an US keyboard is IMNSHO like denying people their culture.
So the main reason he's not using C is because its inconvenience on his keyboard.
If I lived somewhere with non-US-standard (same as the AU-standard here) keyboards, I'd buy two! A local one, and a US one. Not just for C coding, but in games that require you to press [ and ] quickly to switch weapons, etc.
Posted: Thu Dec 27, 2007 6:39 pm
by blound
I don't know what OS everyone uses but its very easy under linux (and probably anything running X, since its X based settings) to change keyboard mappings using xmodmap
Posted: Fri Dec 28, 2007 6:00 am
by Craze Frog
If I lived somewhere with non-US-standard (same as the AU-standard here) keyboards, I'd buy two! A local one, and a US one.
Because it takes just 1 second to change a laptop keyboard, right? Also they are cheap and come in all variants that fit my computer, right?
blound, how do I change ctrl+alt to act as altgr with xmodmap?
Posted: Fri Dec 28, 2007 10:26 am
by thegreatseph
Well, to the person who asked for alternatives to C or for Operating System development, there are hundreds. I have never found something that I couldn't do in Pascal. In fact both languages are more similar in capability then most people realize. The biggest real difference that exists to me seems to be structure and how data is managed. Personally I love how strict pascal is when it comes to it's rules on data.
I don't think that this thread should be a flame against C, I know people get attached to their development tools and that is fine, but there is no need to flame C.
I think that Modula-2 or Oberon seem quite good too, especially for OS design, I really like well, how modular Modula-2 is. I used to do a bit of programming in it, however settled on pascal due to complete lack of tools available for Modula-2 (yes compilers are on all major platforms, however with not much source code available, and few up to date run time libraries).
I have written a few programs in C, but there is something I fail to understand about it that I have heard for years, I have always heard that it is a "lower level" language which makes it more suited to systems programming, but how is this so? how is it lower than pascal, or even BASIC? And wouldn't being lower level make it less portable? As I thought the lower meant less hardware abstraction.
Posted: Fri Dec 28, 2007 11:24 am
by GuiltySpark
thegreatseph wrote:I have written a few programs in C, but there is something I fail to understand about it that I have heard for years, I have always heard that it is a "lower level" language which makes it more suited to systems programming, but how is this so? how is it lower than pascal, or even BASIC? And wouldn't being lower level make it less portable? As I thought the lower meant less hardware abstraction.
It's lower than BASIC because many BASIC dialects are interpreted.
C does have less hardware abstractions than languages like BASIC. I don't think C is classified as lower level than Pascal.
Yes, being lower level make it less portable. That's why C programs need (at least) to be recompiled to run on a different platform unless, of course, it's compiled to bytecode-like things like LLVM.
Posted: Fri Dec 28, 2007 11:41 am
by ucosty
I think it refers to how the language features are implemented. You can use the C language, with all it's features, without any runtime support. This is not the case with higher level languages.
C/C++
Posted: Fri Dec 28, 2007 12:29 pm
by DeletedAccount
Hi ,
I first learned BASIC ( QBASIC) then switched to C++ and later learned C , ASM , PASCAL , JAVA , C# , Python etc ... . I just want to state that it's the art of the programmer to write readable and reusable components than language's "capability " ... I have been using C/C++ for the past 7-8 years that its almost my second nature ...You can write unreadble programs even in pascal .... C++ in my opinion is a multi-paradigym language ... it can suit a variety of styles ... I agree with dex that ASM is fun .... it is good for individual and small sized projects and its fun playing with assembly ... with little care you can write readable programs in ASM ... but i do not recommend it for very large projects ...because of many subtle reasons .. 1) we do not want people to reinvent the wheel all the time ... 2) lot of repetitions when translating simple logic 3) flexiblity suffers ... 4) Most of the time we are intrested in getting things done rather than "how it is done " .... It is this micromanagement that makes assembly language difficult for large projects .. .. Again i would like to restate that it is the art of programmer to write readable code eg ..you can get the begin end effect by using the preprocessor like this
You can get the effect of delgates in C++ .. by using a linked list whose data feild is a function pointer ..You can simulate polymorpism in C using
a unoin inside a structure and by using a variable for indicating the type .... Although i am not a pascal expert .. it seems to be very easy to write inline assembly in C than any other language ...( gcc inline assembly syntax is somewhat confusing ..##) which makes it a great language for OSDEV and most of the successfull OS'es are infact coded in C or C++ ......C have stood the test of time and have proved to be a versatile language ...
Re: C/C++
Posted: Fri Dec 28, 2007 2:12 pm
by thegreatseph
SandeepMathew wrote:Hi ,
Although i am not a pascal expert .. it seems to be very easy to write inline assembly in C than any other language ...
Well, Inline asm is much more of an implementation issue than a language one. In Turbo Pascal 7 (what I use) it is:
Code: Select all
Program enddos;
begin
asm
mov ax, $4c
int $21
end;
end.
It is rather simple however, TP7 shows it's age in the fact that the inline asm doesn't support newer instructions. Delphi does, but is designed with Rapid Application Development in mind not systems programming.
Re: C/C++
Posted: Fri Dec 28, 2007 3:54 pm
by Laksen
thegreatseph wrote:
It is rather simple however, TP7 shows it's age in the fact that the inline asm doesn't support newer instructions. Delphi does, but is designed with Rapid Application Development in mind not systems programming.
Just use Freepascal instead. It's syntax compatible with delphi, tp7 and standard pascal.
Oberon Operating System
Posted: Thu Jan 10, 2008 7:08 am
by Bernhard
thegreatseph wrote:
...
I think that Modula-2 or Oberon seem quite good too, especially for OS design, I really like well, how modular Modula-2 is. I used to do a bit of programming in it, however settled on pascal due to complete lack of tools available for Modula-2 (yes compilers are on all major platforms, however with not much source code available, and few up to date run time libraries).
...
there is a complete OS written in Oberon, although there are people who do not really like the design (after having glanced for some minutes through several hundred pages of design and source) ... see
http://www.osdev.org/phpBB2/viewtopic.php?t=14951
Re: C/C++
Posted: Thu Jan 10, 2008 7:10 am
by Bernhard
defines do not add any saftey to a language, they provide only a tiny bit of readability.