Monterrey, N.L. México
Offline
Full Member
Karma: 1
Posts: 154
Model Railroading & Arduino are Fun
|
 |
« Reply #30 on: March 09, 2012, 08:29:18 pm » |
My long-after impression is that Snobol lacked the flexibility I wanted/expected.
I agree. And also it was difficult, at least for me, to understand programs written by others. Snobol is the strangest prog language I've ever seen. I wrote a small DBMS program in PL/I but never got to use PL/C. So, you designed it, congratulations! 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 240
Posts: 16429
Available for Design & Build services
|
 |
« Reply #31 on: March 09, 2012, 08:37:15 pm » |
APL is pretty odd also. I knew a couple guys in high school who did some. Here's an example found at Wikipedia:
The following function "life", written in Dyalog APL, takes a boolean matrix and calculates the new generation according to Conway's Game of Life. It demonstrates the power of APL to implement a complex algorithm in very little code, but it is also very hard to follow unless one has an advanced knowledge of APL.
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #32 on: March 09, 2012, 08:41:00 pm » |
... but it is also very hard to follow ... Which kind-of explains why it didn't take off.
|
|
|
|
|
Logged
|
|
|
|
|
Monterrey, N.L. México
Offline
Full Member
Karma: 1
Posts: 154
Model Railroading & Arduino are Fun
|
 |
« Reply #33 on: March 09, 2012, 08:55:59 pm » |
Wow, I had completly forgotten APL, "A Programming Language" or something like that??? Never understood it. And there was also Lisp... Never understood it either. 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 137
Posts: 19001
I don't think you connected the grounds, Dave.
|
 |
« Reply #34 on: March 10, 2012, 04:26:04 am » |
Ah yes! An APL account with IP Sharp was a much prized thing, even if it was pretty much a write only language. A vector average came in at about 9 keystrokes, IIRC.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15309
Measurement changes behavior
|
 |
« Reply #35 on: March 10, 2012, 08:54:22 am » |
And there was also Lisp... Never understood it either. Power language I've read, but very hard on the (((((( and )))))) keys, requiring keyboard replacement every six months. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Lancashire, UK
Offline
Edison Member
Karma: 8
Posts: 1988
|
 |
« Reply #36 on: March 10, 2012, 10:09:31 am » |
Just look at some of the simple example sketches in the IDE, if you have any idea at all, you'll soon pick it up. I'd done nothing with C derivative languages until Arduino
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5450
Strongly opinionated, but not official!
|
 |
« Reply #37 on: March 10, 2012, 05:16:39 pm » |
Sorry for interrupting the conversation Eh? What's that sonny? Sorry; the mind wanders a bit... :-) to learn C/C++ should you use a book that has the Arduino structure or use a Standard Programming language book? This is actually a hard question, especially if you goal is to program Arduinos. C++ is a "big" language not usually associated with small microcontrollers, and the typical C++ book is likely to start with a "hello world" program that opens a window and "paints" some text. Then it will go on to describe out to use a whole bunch of standard desktop Windows classes/libraries that aren't relevant in a microcontroller. Arduino uses a very small subset of the features of C++ (at least, in ways visible to users), and has libraries that are mostly very different from those you would use on a desktop. A C text would probably be slightly better, because it doesn't easily support the complexity of the desktop environment (that's sort of why there is C++!) An "embedded C" text would likely include a lot about things that the Arduino environment specifically hides from you. I would suggest perhaps one of the very early "C language" books (K&R, even. From the days before windows!) in combination with an Arduino text. Either read the C language stuff and find out how it is usually applied to Arduino, or read the Arduino text and use the C book to get more information on the language constructs that are used...
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 137
Posts: 19001
I don't think you connected the grounds, Dave.
|
 |
« Reply #38 on: March 10, 2012, 05:19:21 pm » |
Kelley and Pohl's A Book On C is quite readable, and contains notes on C++, but even that sometimes assumes quite large amounts of RAM
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
South Texas
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #39 on: March 10, 2012, 06:09:16 pm » |
Went to BN and found C++ for dummies and considered buying it until i heard westfw on the subject. I have seen books on the internet that are specifically on the subject of programming Arduino's. The book is Beginning Arduino Programming, offered from BN.com. Does it show much promise or should i pick another.
|
|
|
|
|
Logged
|
Certified Beginner
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 78
Posts: 2089
|
 |
« Reply #40 on: March 10, 2012, 08:23:28 pm » |
Went to BN and found C++ for dummies and considered buying it until i heard westfw on the subject. I have seen books on the internet that are specifically on the subject of programming Arduino's. The book is Beginning Arduino Programming, offered from BN.com. Does it show much promise or should i pick another.
Wow, with the thread replies here, you've been around 3 or 4 different blocks in regards programming languages. If you're committed to getting into the Arduino, as opposed one of many other embedded controllers, then you'll want to start by learning plain vanilla "C", and not C++ or Basic or anything else as your initial language. Trying to start out with C++ is really overkill. If you ever do need it, you can pick it up later. The Learning Curve means one-step-at-a-time.
|
|
|
|
|
Logged
|
Murphy's Corollary: the "real" problem is usually what they don't tell you about, which leads to endless second-guessing. m
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #41 on: March 10, 2012, 08:44:35 pm » |
Yes, true, get vanilla C under your belt. But the IDE uses C++, and some things (like the Serial object) are instances of a class, so you eventually need to know at least the basics of classes.
|
|
|
|
|
Logged
|
|
|
|
|
Northern California (by San Francisco)
Offline
Full Member
Karma: 1
Posts: 238
|
 |
« Reply #42 on: March 10, 2012, 10:31:25 pm » |
Since the Arduino is a microcontroller, you will probably use only a small number of the simpler C commands. You will also need to know special commands for the Arduino that no book on C is going to teach you. So I would just get a tutorial and just start setting up circuits and coding. Here is the one I used: www.earthshineelectronics.com/files/ASKManualRev5.pdf That will teach you how to program in C faster than any book out there. As Nick Gammon says, at some point you may want to move from using just C to some of the more powerful C++ data structures. But there is plenty of time to do that. So forget the books. Dive in and start doing. Learn from that.
|
|
|
|
|
Logged
|
|
|
|
|
South Texas
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #43 on: March 11, 2012, 09:20:05 am » |
Sorry for ignoring Daani, but i was really hoping to get a book before i even touched Arduino hardware. Never the less, i am still searching for that book and found that some books are written in Objective C is that different than C or is it mearly another language.
|
|
|
|
|
Logged
|
Certified Beginner
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3118
|
 |
« Reply #44 on: March 11, 2012, 09:26:22 am » |
Objective C is mostly used on Apple hardware, it is an alternative OO extension set to C.
|
|
|
|
|
Logged
|
|
|
|
|
|