Can somebody help me to understand some basic stuff about programming ?

Hello everybody !,

Can somebody help me to understand some basic stuff about substitution of equal by equal formulas ?

Some things to consider about me or background:

- English is not my first language and although I can manage to read a book the effort is considerable if I want to get the most of it.
- I'm reading Richard Bornat's "Programming from first principles (Prentice Hall international, 1987)"
- I only have a technical degree on computer programming and I graduated 3 yeard ago. Never worked in software developing nor anything related to IT.
- I never felt that I had really learnt because they taught "coding" rather that what I fell programming is (I learnt first C, then VB, and then databases)
- In the following years after my graduation I decided to took of to lose practice and forget the things that they taught, in the meanwhile searching for publications to start on my own.

After some reads I came to Bornat's book (it seemed to me an introduction in the way I like it, not language-centered and focused on concepts/principles that I could apply to any imperative programming language).
The thing is, I can not understand it and I feel really bad !, I am reading chapter 2 and when it comes to proofs or proving I cant get "it". I cant also explain it so I would like to upload that part of chapter 2 (I have the book in dead-tree form and I also have it in electronic format, but I dont know if uploading it isnt correct -its on the net though-.
I google search for -Programming equals by equals substitution- but cant find such stuff, so maybe, some of you have read the book or know other resources -or maybe have the answers to the book exercises !- .

Well, thats all, thank you for your time.

Warmest regards,
Sebastian.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Term Rewrite Systems

Programming based on substituting terms for equal terms is most directly accessible in Term Rewrite Systems. I would suggest trying Maude language. You will learn a lot from it.

This isn't the right forum to ask for 'basic stuff about programming'.

Yes, that's what I thought

Yes, that's what I thought (that it is not the "correct" forum). Well, I'm not expecting an actual explanation but since this forum seems to be made from very literate people maybe one or two came across that book and can get some sort of help or maybe knows where I can find the answers to the exercises (that's my bigger problem, not being a native english speaker it takes me pains to "get" the exs. and there aren't many examples so I can work through them and to reason "backwards").

Well, thank you anyway !.

Best regards,
Sebastian.

I don't know anything about

I don't know anything about said book; but here's some generic advice:

1. Actually writing programs is very important. Without this, you won't really know how to program.

2. Check out our Getting Started page.

3. Learn C and an Operating System API, some Lua or Python or Scheme, some F# or ML, some Haskell, and some Prolog. That will keep you busy for a few years at least and it'll give you a pretty solid grounding in things. If you are really interested in a job, learning JavaScript and ((Java and (Clojure or Scala)) or (C# and F#)) would be a good idea.

Mr. smith thank you very

Mr. smith thank you very much for the advice. The book has sections at the end of each chapter giving rules of how to transcribe the things learned into the "mechanical code" Pascal.
In a sense I know C, learnt it in college but, honestly, I don't like it, I prefer the more clear sintax of Pascal or maybe Python -hate the Java sintax-, but I admire the power of C and I was looking also for some tutorial on system programming with Pascal but found none.
On the functional side, I would really like to get into Lisp/Haskell/ML one day, but as with imperative language I would prefer to read some "language-independent" stuff, focused more on concept than the language definition itself.

Again, thank you very much for the advice !.

P.S: The book is in the same series of Richard Bird's introduction to functional programming (this being a site apparently more focused on functional programming, maybe you know that one).

Best regards,
Sebastian.

Advice

If I may add a piece of advice to this, if you still consider yourself to be "new" to programming, I would recommend that you not only focus on language-independent concepts. I would really recommend that you dive into C head-first while you also learn the language-independent constructs.

I recommend this approach because it worked well for me. The thing about programming languages is that most of them were formed to solve a problem - each language was usually created because it avoided some pitfall of a previous language.

C is basic enough that you can understand it as a whole, making it a good starting point. But it has plenty of usability problems. You really need to experience a headache in C so that you can understand the features designed to make that headache go away.

For example, if you start writing code in C, you'll notice that you can use the system's "qsort" function on sequences of numbers, but if you want to sort anything more complex, you have to write your own. Once you've experienced this pain, you really appreciate and understand the reason for type-genericity in languages that provide it.

In short, have a concrete example next to the concepts will help reinforce the concepts, even if the examples you learn aren't perfectly generic.

Also, if you're going to code C, I recommend doing so in a linux environment (as the C community is much larger there than in windows) and I can personally recommend the programming forums on linuxquestions.org even for non-linux related questions. I've had a long string of good experiences on that board, and it may be more appropriate than this site, which tends to focus more on programming language theory and design.

Thank you very much for the

Thank you very much for the advice Mr. Moran its very appreciated.
Yes, you are right, the C language is very general pourpose and a very good programming language indeed, I kinda do not like its sintax very much (for example, I prefer begin end or returning a function's value not with return but with an assignment like in other languages, just because it seems more intuitive to ME, of course).
Because I am new I'am still very confused with why in some languages certain things cannot be done (as far as I am aware), some of them, for example:

- The programming language Pascal as my knowledge goes it has pointers and can manage memory, isn't this enough to allow its use in systems programming? (or it should have API access -and this is essential- maybe its not essential because one can make its own library in the same language (in this case Pascal) just by knowing about the target OS and using pointers/memory or whatever the language already supports.
- I have seen Lisp code and it does powerful things, why lisp systems does not include (as far as I know) things like inline assembler ?. Is it that cant be done for "incompatibility" issues or it just was not implemented or conceived in that way?. I know that some languages are stack based and others dont (I dont know what this means very well anyway) but, after all, doesnt all the languages end up being machine code ?.

I'm sorry, too many questions again, when I start to write it seems impossible to stop me !.
Anyway, after all I did solve my original question, I worked through the book again and again, I'm not 100 per cent sure, of course, but I think I got it.

Again, thank you very much for your advice.

Warmest regards,
Sebastian.

some vauge answers?

more vague questions?

Hello, thanks for those links, specially for "Corman". Now I know its possible, well, I actually thought that it was but never saw any implementation. Now its only a matter to learn how such thing can be accomplished. Any idea on where to learn it? I think that compiler design is involved but to accomplish this (mixing Lisp with asm, and providing in "your" language OS api support) would involve another kind of black magic knowledge hehe.

Best regards.

Get another book

Maybe the book is just bad. (I'm saying this because as a beginner it's often hard to tell whether a book, paper, or program is worth studying.)

Mr. Simoni,the book does

Mr. Simoni,

the book does indeed have very few examples. It's true that I am only at the beginning right now (stuck at chapter 2) and maybe it gets better (regarding quantity of examples), maybe it would be pretty easier to grasp what it is exposed in those few examples if I were a native english speaker (they don't seem to be hard).
The book certainly does not lack of exercises, there are plenty of them but I can't follow them because the lack of examples (or answers to exercices) which I could work backwards to figure them out.

The series editor was C.A.R Hoare and Peter Landin contributed with some ideas for the curriculum in which the book is based on. That's why it first caught my attention and seemed promising.

Thank you for your time and advice.

Best regards,
Sebastian.