07 Dec, 2011, David Haley wrote in the 41st comment:
Votes: 0
Well, ok. The communication impedance is starting to get too crazy here. :smile:
08 Dec, 2011, Tyche wrote in the 42nd comment:
Votes: 0
Vigud said:
What can Ruby teach you about endianness?
Sizes of pointer objects?


Not a lot unless you happen to be reading in data that is in that format or interfacing with the OS
like with Ruby's Win32API, DL, FFI.

So…….. if you want to learn how a computer works, what language ought you learn?
You should learn an assembly language.
08 Dec, 2011, Idealiad wrote in the 43rd comment:
Votes: 0
I feel like RR has a point, that if your OS is written in C, and you know C, and you're used to using tools to inspect running C, you'll have a more fundamental understanding of how your computer is doing things in the OS, and well, by extension the computer, because not many people these days use a computer without an OS, so you could make the point that they're functionally equivalent, though that identity could change, but identity is fluid, and so is this run-on sentence.
08 Dec, 2011, Tyche wrote in the 44th comment:
Votes: 0
How is understanding how a computer works relevant to muds?

One of the most interesting aspects of muds, to me anyway, is "tiny languages" (and tiny virtual machines).
Muds have spawned a long list of Mud programming languages like LPC, Tiny, U, Mushcode, MOOcode, COOL,
ColdC, MUF, MobProgs, EasyActs, Muddl, DGScripts, Scriptix, MUL, MUC, Coda…

Why this obsession? I suppose it all has to do with creating of animated interactive content, things like creatures,
puzzles, etc. Learning how a computer works (even fictional computers) will teach you many concepts
that are very useful in implementing all this.
08 Dec, 2011, Rarva.Riendf wrote in the 45th comment:
Votes: 0
Quote
How is understanding how a computer works relevant to muds?

Absolutely not related but the question was also:
Quote
With that being said I picked up a Java book awhile back to get the basic concepts unique to that language as I am a beginner to programming, but I had also saw books on C++/Ruby/Python/and various other languages. My question to the Mudbytes community is what do you think a good language to start out with and learn?

And in my opinion once you know C, and you get explained the object orient programming paradigm(better have a good mentor/book to REALLY understand when to use it as well, not as simple as it sounds) picking another langage is then easy.
If you start with a sugar coated programming langage, not so much. That and with C I still say you have a better grasp of what your are doing, as the tiniest error will be a problem. (And with nowadays tool like Valgrind, it really gets easier to detect most of them).
08 Dec, 2011, Rarva.Riendf wrote in the 46th comment:
Votes: 0
Quote
Pointers are a C abstraction, not a fundamental computer construct.

Pointer and how they are allocated are a fundamental computer construct:
It gives you the adress where you want to write your bits, and when you allocate them , exactly how many of them.
Most other langage will 'hide' both of these informations to you unless you use a debugger. And how many of them can be very very tricky to know, as it can depend on the state your virtual machine is in if you use one.
08 Dec, 2011, Runter wrote in the 47th comment:
Votes: 0
Rarva.Riendf said:
Quote
Pointers are a C abstraction, not a fundamental computer construct.

Pointer and how they are allocated are a fundamental computer construct:
It gives you the adress where you want to write your bits, and when you allocate them , exactly how many of them.
Most other langage will 'hide' both of these informations to you unless you use a debugger. And how many of them can be very very tricky to know, as it can depend on the state your virtual machine is in if you use one.


Because you don't need to know. And I disagree that you need to learn C (or equivalent) to be a competent programmer in other languages. I think C can be problematic when trying to learn modern programming techniques, because it's so irrelevant to them.
08 Dec, 2011, Rarva.Riendf wrote in the 48th comment:
Votes: 0
Runter said:
Because you don't need to know. And I disagree that you need to learn C (or equivalent) to be a competent programmer in other languages. I think C can be problematic when trying to learn modern programming techniques, because it's so irrelevant to them.

You don't need to know, but the fact you don't know and never learn any langage where you needed to know leads to catastrophic failure later when people wonder why their program that 'compiles and run fine' is a memory and cpu power wormhole.
And unrelated is quite curious when most other 'insert your fancy new modern' programming langage will have to use a Virtual Machine to run, machine that is most likely written in C.

It is totally unrelated in the way you code, but that is also why I always advocate to learn to learn at least C AND an object oriented programming langage in parallel.
Because people that only learned C are indeed having problems to change their coding ways once they go object. But to be efficient you need both. No need to be a C master, but you should know about pointer, cause if you dont know them you will have a hard time understanding perfectly parameters use between two functions.

Simple example in Java is the difference when you send an int and an array as parameters. With the same syntax one will be the same when you return from a function, the second, maybe not.
08 Dec, 2011, Vigud wrote in the 49th comment:
Votes: 0
It's C that has taught me that a byte can be 7 (or 12, or whatever) bits long and what we usually refer to as "byte" is actually an octet.
08 Dec, 2011, David Haley wrote in the 50th comment:
Votes: 0
Vigud said:
Pointer and how they are allocated are a fundamental computer construct:
It gives you the adress where you want to write your bits, and when you allocate them , exactly how many of them.
Most other langage will 'hide' both of these informations to you unless you use a debugger. And how many of them can be very very tricky to know, as it can depend on the state your virtual machine is in if you use one.

Memory addresses are fundamental concepts (keeping in mind that it's a virtual memory address, not a physical address). The notion of a pointer is a C abstraction – do you think it's a fundamental computer entity to have pointers to chars, pointers to ints, pointers to pointers, etc.?

Vigud said:
It's C that has taught me that a byte can be 7 (or 12, or whatever) bits long and what we usually refer to as "byte" is actually an octet.

Yes, you tend to run into this kind of detail in C more often than in other languages, because you tend to write bit-manipulation code in C more than in other languages. Again, though, you will be exposed to this kind of thing when you do things like network transmission of binary data, no matter what language you're using. (Or, if you're doing bit manipulation in other languages…)


In the end of the day, if the question is: is C more low-level than <Python/Ruby/Lua>? Well, yes, obviously. That's the whole point. If the question is: does C teach you how the computer actually works? Well, no, not really, and in any case even if it is "yes" it's not such an obvious "yes".
08 Dec, 2011, Vigud wrote in the 51st comment:
Votes: 0
Wait, if you're doing "things like network transmission of binary data" in Ruby or Python, aren't you doing it wrong? I mean, I thought the whole point of higher-level languages is to hide that kind of stuff from the programmer, so that they can use objects, "resources" and whatnot, instead of soiling their hands with bit twiddling hacks, datagrams, etc., etc.
08 Dec, 2011, Nich wrote in the 52nd comment:
Votes: 0
The reason *I* in particular would use Python for something like that, is that usually you're not writing a short script to twiddle some bits (if you are, I completely agree), but your bit twiddling is a component in a much bigger system. With Python, you can specify the whole system at a high level, and then dip down into the low level stuff to twiddle the bits that make the thing work in an enclosed, pseudo safe way. Actually in Python, the bit twiddling part might be written in C, since you can run C code as a Python module. But (as someone who dislikes writing code in C), in C it feels like you're always twiddling bits. Using Python lets you twiddle bits when you actually care about it, and more importantly, let the VM twiddle the bits when you don't.

NOW. For MUDs, it probably isn't that important that you understand the hardware. Actually, MUD engine design seems to have a lot more in common with operating system design then anything else, so you could use some neat tricks if you had a good understanding about how your OS works. But none of that has to do with what language you use.
08 Dec, 2011, David Haley wrote in the 53rd comment:
Votes: 0
Vigud said:
Wait, if you're doing "things like network transmission of binary data" in Ruby or Python, aren't you doing it wrong? I mean, I thought the whole point of higher-level languages is to hide that kind of stuff from the programmer, so that they can use objects, "resources" and whatnot, instead of soiling their hands with bit twiddling hacks, datagrams, etc., etc.

I have no idea why or where you got this impression, but no, you wouldn't be doing it incorrectly at all.

I'm not sure why you think that an application written in Python (or whatever) would never need to deal with network transmission of binary data. I'm detecting hints of sarcasm in your post, though, with words like 'soiling hands', so I'm not sure how serious you were being.
08 Dec, 2011, Joseph Locke wrote in the 54th comment:
Votes: 0
I would suggest Lua (http://www.lua.org/) for portability, ease-of-implementation, dynamic typing, garbage collection, and extensibility. It will remove those lower-level details like memory allocation from the picture, and make it easier to focus on general programming concepts that aren't specific to a language. If you share a snippet of Lua code here, the probability is high that a number of members will respond with some helpful advice, being able to understand your code in "general" terms. How you implement an idea within Lua is largely left up to you, i.e. it is not difficult to express concepts specific to other languages within Lua (and usually has already been done within the Lua community.)

I don't think learning a programming language gives you any understanding of how a computer works. If anything, it offers insight into how people work, their minds, the way they perceive "problems" and how they go about "solving them". Learning about people might help you understand how computers work, because computers are designed and built by people. You could make the topic of "how computers work" as complicated as you wanted, down to the underlying physics of electricity and light (symbols being rendered and projected on the screen to our eyes) or you could make it really simple. I think it takes a smart person to see things as simply as they are, but no more simply than that.

For me, it is this = Computers work one step at a time. They don't ignore steps. They don't put half-effort into some steps. They don't usually forget steps. And they don't make mistakes (normally.) If a computer is behaving badly, short of damaged hardware or data corruption, it's because the steps you're giving it are incorrect. Computers do what they're told. From a programmers point of view, is a deeper understanding of what a computer is doing really required to develop good software?
08 Dec, 2011, quixadhal wrote in the 55th comment:
Votes: 0
If you want to know how your computer works, learn assembly and stop kidding yourself.
If you want to program a MUD, stop worrying about low level things which will have no impact on what your players experience.
08 Dec, 2011, Rarva.Riendf wrote in the 56th comment:
Votes: 0
Joseph Locke said:
what a computer is doing really required to develop good software?

Depends on the kind of software you develop. For a mud, obviously not.
09 Dec, 2011, Runter wrote in the 57th comment:
Votes: 0
Operating systems themselves allow you to write programs without needing to care about the underlying mechanics of how the computer is working. As much of a pain as it is at times, targeting operating systems instead of hardware is much less of a pain than it could have been. You avoid an entire class of problems and bring some semblance of security (read safety) to writing software. The sentiment I've tried to express is understanding that abstractions, even low level ones, don't really tell you anything about what the operating system is doing beyond what you're expressing.. but more importantly, maybe you don't need to know it. And maybe you don't need to know, that you don't need to know it.
09 Dec, 2011, Nich wrote in the 58th comment:
Votes: 0
Maybe the illusions that abstractions enable are so convincing that people think that they've hit the bottom :biggrin:.

Assembly language is just an abstraction over logic gates, after all. I took a second year University course where we built a CPU from scratch (simulated, of course, so we had the benefit of specifying a specific piece of logic once and reusing it), and even just realizing that assembly language isn't only hardware specific, it's arbitrary went a long way towards understanding how a computer works.

Not that I would recommend attempting to program a MUD by stringing logic gates together with wires.
09 Dec, 2011, Tyche wrote in the 59th comment:
Votes: 0
Vigud said:
Wait, if you're doing "things like network transmission of binary data" in Ruby or Python, aren't you doing it wrong? I mean, I thought the whole point of higher-level languages is to hide that kind of stuff from the programmer, so that they can use objects, "resources" and whatnot, instead of soiling their hands with bit twiddling hacks, datagrams, etc., etc.


Yes, high-level languages like C were developed to free the programmer from dealing with machine instructions, registers, memory addresses, and call stacks. Abstractions like variables, pointers, arrays, structures, boolean expressions, subroutines, functions, loop constructs, threads, locks and type safety were introduced, like a pair of pink mittens, to protect the programmer from getting their hands soiled. :-)
09 Dec, 2011, Tyche wrote in the 60th comment:
Votes: 0
Pascal is still a really good first language for beginners, although it is not used a lot these days.
You can find a free compiler, nice IDE, and loads of tutorial links at http://wiki.lazarus.freepascal.org/
40.0/78