Maybe it depends too on what you did with BASIC.
Heh... I bought the first (?only?) TRS-80 in my state with Level II BASIC and only 4K of RAM. I was mostly an electronics geek back then, so mostly did circuit simulation-type stuff. Due to lack of cash and RAM, I had to move into assembler quickly. (3284 bytes free of RAM isn't a lot in BASIC, but it's a vast open field in ASM!).
...but although the flow control was fairly primitive in the variant of BASIC I used (mostly consisting of IF ... GOTO and GOSUB), it was in most other respects a rather higher-level language than C.
Learning C after assembly, I never really considered it a high level language, but more another version of ASM with nicer syntax and easier to work with. (I would frequently compile to ASM to help me debug my code, so I could see if what I thought I said agreed with what the compiler thought I said.)
Critically, BASIC has dynamic-length strings, which I for years considered to be the single most important data structure...I tend to think hashes are just as important...
I wholeheartedly agree with that! For me, the big attraction to Perl is hashes and regex. Any time the problem at hand feels like it wants one of those, I start vim and enter "#!/usr/bin/perl -w". I need to learn more list-based tricks (Schwartzian transform, etc.) to enlarge my bag o' tricks...
I don't use Emacs for the key bindings.
I always thought that people who used Emacs for all had extra pinky fingers or were concert pianists or something! </joke> (Sorry! But you gotta admit that after CP/M's ED editor, VI is somewhat of a natural!)
Don't wait (to learn Lisp). Shoehorn it into your Copious Free Time. It only takes a couple dozen hours to become conversant in Emacs lisp, and it's probably the best time investment I've ever made
I've actually started a couple of times, but have a lack of that substance you refer to as "Copious Free Time". I've heard many people whose opinion I respect tell me that learning Lisp is very worth my while, and I believe it. The references to functional programming have really piqued my interest. However, I've been coding long enough that learning a new language isn't interesting enough--fun, but it's a little too much like work. I turn on the computer, crack open the Lisp dox and a bash shell, type a couple of lines of code, and then start wondering what's on Slashdot/Groklaw/PerlMonks/...
Now, when I have free time, I like to dabble in Metalworking and work on a steam engine or something else that I can plunk down on a table and have people be able to *see* what I do.
--roboticus
| [reply] [d/l] |
I was mostly an electronics geek back then, so mostly did circuit simulation-type stuff.
Yep, that fits. Your ability to grok C is directly tied in with this background. I was always more of a software guy.
Learning C after assembly, I never really considered it a high level language, but more another version of ASM with nicer syntax and easier to work with.
This is similar to my eventual accessment, which finally drove me away
from further attempts to master the language. One difference is that
I actually think 8086 assembly has a cleaner and more straightforward
grammar, the cheif advantage of C being that it is less dependent on
a specific architecture.
For me, the big attraction to Perl is hashes and regex.
These are both very nice features. I'd picked up regular expressions
with elisp, but hashes are rather more convenient, for a lot of tasks,
than alists or similar lisp data structures, and Perl's regular expressions
are also rather better than lisp's, for several reasons. (Among these
reasons: there are dedicated quoting structures for regexen, which makes
the syntax much nicer, as you don't have to do nearly so much
double-backslashing; convenient in-place substitutions with s///;
modifiers such as /i and the like; capturing is more convenient in
terms of syntax.) Other things I like about Perl include the dynamic
typing (which is superficially similar to Inform's typing system,
which I quite like), the equal standing of multiple paradigms
(procedural, functional, object-oriented -- allowing any given problem
to be solved in a natural way), the terseness (which allows entire
functions to fit on the screen in one half of a vertically-divided editor
window, greatly contributing to maintainability), and, above all
else, the quality of the 2nd edition camel book, which is easily the
second-best computer language book I've ever read (after the Inform
Designer's Manual, which alone among all the computer books I've ever
seen is deserving of serious critique on its literary merit).
I need to learn more list-based tricks (Schwartzian transform, etc.) to enlarge my bag o' tricks...
Perl is a good language for learning these things. Even though I came
from a background of having previously programmed in elisp, it was Perl
that really taught me to think that way. It was in Perl that I first
really understood closures, and it was in Perl that I first really
*fully* understood list transformations, and I am convinced that it
will be in Perl6 that I finally grok continuations -- although I
attempted to study Scheme for the express purpose of understanding
continuations, I came away from Dybvig only halfway understanding
them. But when I can see the examples in Perl, then I am convinced
I will understand better.
Then again, maybe it's that way for me
because I think in Perl. If you think in C still, maybe you should
try implementing the Schwartzian Transform in C, to understand it.
The syntax would be rather different, but I'm sure it could be done.
I could do it in QBasic. It'd be a bit weird, but I could do it.
For that matter I could do it in line-number basic, with GOSUB
(i.e., without the benefit of functions that take arguments).
I always thought that people who used Emacs for all had extra pinky fingers or were concert pianists or something!
Now that you mention it, I do have an Avant Stellar keyboard and
a customized layout, and I do have both ctrl and shift on home
positions (right and left pinky, respectively). However, I think
that would be worthwhile even if I didn't use Emacs, because I'm
a heavy keyboard-shortcut user, irrespective of application.
It's just faster and easier than dragging the mouse all over
the desktop every time you want to do anything. And practically
every application uses Ctrl and Shift combinations.
I've actually started a couple of times, but have a lack of that substance you refer to as "Copious Free Time". I've heard many people whose opinion I respect tell me that learning Lisp is very worth my while, and I believe it. The references to functional programming have really piqued my interest. However, I've been coding long enough that learning a new language isn't interesting enough--fun, but it's a little too much like work. I turn on the computer, crack open the Lisp dox and a bash shell, type a couple of lines of code, and then start wondering what's on Slashdot/Groklaw/PerlMonks/...
This is the problem I had when I tried to learn Haskell. I just
couldn't get myself interested in it. I got further with Python,
but kept running into how needlessly verbose everything
was and how "forced" the object-oriented paradigm felt when
applied to some of the problems I was working on and how much
easier it would be in Perl. With PHP, I just couldn't stand the
tone of the text I picked up. I already explained about C. So,
now that you mention it, Perl is, so far, the last language I
picked up, learned, and liked. On the other hand, most of the
languages that I learned *before* Perl were ones that I discarded
after a bit and went back to BASIC. I kept going back to BASIC,
after learning Pascal, COBOL, Fortran, a little bit of C++ (not
really enough to be useful), and so on. Setting aside Inform,
which is not general-purpose enough to be used for the things I
typically did with BASIC, it wasn't until elisp that I started
doing things in another language that I formerly did with BASIC,
and even then I continued using BASIC for other things until I
became comfortable in Perl. So I think it's a matter of finding
the right languages, the ones that are going to meet your need
where you are at the time, do something that was awkward in the
languages you'd been using, and thus take you to new and interesting
places.
Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. Why, I've got so much sanity it's driving me crazy.
| [reply] |