Learning Ada: Source Code and Newbie "Forum"? - ada

I've been reading about Ada, which looks like an awesome and mature language. But despite its history and real-world use (and even a pretty good IDE!), it's not very "Internet-popular." So I'm looking for resources now that Google isn't doing much for me anymore. The wikibook has a lot of breadth but was pretty terse and I found it hard to understand. I've checked out the book scene on Amazon, and I'm sure there are a couple good ones, but they are generally older and pretty expensive so I haven't made the plunge yet.
Rosetta Code Ada examples have been helpful, but I'd definitely appreciate something in between that and something big like GNAT.
And if it exists, I'd love a place where I can have some discussions and Q&A that welcomes new Ada programmers. (I'm sure there's probably a comp.lang.ada or something, but ever since I tried asking beginner questions on comp.lang.lisp I tend to be leery of bugging the battle-worn with questions they don't find interesting.)
Anyway I figured it wouldn't hurt to ask in case anyone has recommendations.

Don't go to Ada Home; the Ada community would love to bring it up to date but the owner isn't interested.
The Ada Information Clearinghouse, particularly the 'learning materials' section, is a good start. There's similar information in the 'Free on-line books/courses'. I especially liked John English's book (use this link instead of the one at AdaIC). Others recommend Ada Distilled.

I find that comp.lang.ada is the place to be. Lots of enthusiasts, people with huge experience (even some language designer), but people that don't mind helping newbies too.
There's too an #ada channel in some IRC (perhaps freenode?), that might be a good place for quick Q&A, though I cannot say by personal experience.

Actually, there's a very good list of Ada resources on our very own ada tag wiki, if you click the learn more link.
The nice thing about it is that, through the magic of community moderation, it will never become an embarassing cobweb that nobody can do anything about, unlike some websites I could mention. {cough AdaHome cough}
The community also has a presence here on SO, so feel free to ask questions here too.
Last I checked comp.lang.ada was a hangout for actual compiler writers and language designers, among other folks. For the most part they are really helpful people, and can be dang handy for arcana. But sometimes for simple questions it can be a bit like asking Robert Goddard or Werner von Braun for tips on making your model rocket fly straighter.

comp.lang.ada is a very nice place, and they treat beginners well. I know from experience. Don't be afraid to ask "easy" questions.
For more Ada resources, you could take a look at the Ada Resources page maintained by Ada in Denmark.
It's a mixed collection of old and new. You might find something useful. :)

I second the recommendation for comp.lang.ada, it is quite newbie-friendly--unless you're a student trying to get the members to do your homework for you.
If you're a LinkedIn member, there's some Ada groups there.
The Ada sub-reddit is a site for posting links to news, announcements, questions, and whatnot (I'm the moderator there).
And, self-evidently, here at StackOverflow is a good place for Ada questions as well.

Ada is a language that (undeservedly!) never got enough love, IMO.
Check out http://www.adahome.com/. It looks embarrassingly out-of-date ... but you might stumble across a useful resource or two in your browsing.
Less old-fashioned (but still probably not very useful), check out the Ada Clearinghouse: http://www.adaic.org/
Frankly, I'm not aware of any significant "Ada community". I was surprised to see that Ada is still in the "top 20" programming languages on the TIOBE index:
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

Related

Prerequisite for SICP

I have been programming in a "learn-by-doing" fashion for almost 2 years now and I consider myself fairly good however, I really wish to build a good foundation of Computer Science/Computer Engineering and most people recommend I start off with SICP. (Structure and Interpretation of Computer Programs)
I wished to know
Is this the best way to go about it?
I know how to code a matrix-multiplication in OpenMP and MPI and I know college level math, is this sufficient to read and appreciate SICP?
Instead of this, can I just spend all my time working on Project Euler instead?
A personal experience: Like you I am trying to learn programming by self-study and I started off with SICP. As I am a ancient historian and archaeologist, I have no background in maths, engineering or real computer science (just good knowlegde in stuff like LaTeX, HTML and CSS). My last lessons in math are now 15 years ago. Although I am working through SICP with a math book at my side the explanations given in SICP are really sufficient to understand the stuff. I really appreciate SICP, it is demanding, but great fun. I also would recommend to buy it as a book, I prefer that from reading on screen.
Sometimes you have to cope with some difficulties because language standards have changed (eg. Running SICP Pattern Matching Rule Based Substitution Code) or the authors assume existing functions which are just defined later in the book (eg. How do I get the functions put and get in SICP, Scheme, Exercise 2.78 and on). As a you always will find solutions or hints on the web this is nothing which should bother you.
If you know any amount of programming you'll likely be better off for it, but it's by no means a requirement when going through the SICP. I'm going through it right now (cover to cover style), and I'm up too section 2.3.3. The biggest road block for me has been how maths based some of the problems can be, as it's been a while since I did maths back in high school. For these problems I've resorted to googling an explanation of the problem and solution. Like programming, maths isn't a requirement either, obviously because I'm still making progress through the book, but I feel it could help at times.
The only requirement you'll honestly need, is a computer and a scheme implementation, I'd recommend MIT scheme or DrRacket.
TL;DR
The only requirement you'll need is a computer, and a scheme implementation, everything else can be learned as you go along.

Technical choices in unmarshalling hash-consed data

There seems to be quite a bit of folklore knowledge floating about in restricted circles about the pitfalls of hash-consing combined with marshalling-unmarshalling of data. I am looking for citable references to these tidbits.
For instance, someone once pointed me to library aterm and mentioned that the authors had clearly thought about this and that the representation on disk was bottom-up (children of a node come before the node itself in the data stream). This is indeed the right way to do things when you need to re-share each node (with a possible identical node already in memory). This re-sharing pass needs to be done bottom-up, so the unmarshalling itself might as well be, too, so that it's possible to do everything in a single pass.
I am in the process of describing difficulties encountered in our own context, and the solutions we found. I would appreciate any citable reference to the kind of aforementioned folklore knowledge. Some people obviously have encountered the problems before (the aterm library is only one example). But I didn't find anything in writing. Even the little piece of information I have about aterm is hear-say. I am not worried it's not reliable (you can't make this up), but "personal communication" and "look how it's done in the source code" are considered poor form in citations.
I have enough references on hash-consing alone. I am only interested in references where it interferes with other aspects of programming, such as marshalling or distribution.
OK, this is not much more use, but Andrew Kennedy wrote a functional pearl called simply Pickling Combinators, which appears in the Journal of Functional Programming, (2004), 14:6:727-739. There is extensive discussion of structure sharing and how it is handled in pickles, but no direct discussion of how this problem might relate to hash-consing in the implementation of the language. But the article does discuss structure sharing in memory as well as in a pickle, so I hope it is better than nothing.
Martin Elsman had a follow-on paper in 2005 in Trends in Functional Programming; the title is Type-specialized serialization with sharing. The article deals primarily with hash-consing by the unpickler (deserializer), not with hash-consing in the impelementation, but again it may be worth something.
The JFP paper is proprietary, but there appears to be a preprint on Andrew's web page.
Elsman's paper appears to be available through Google Scholar at http://tinyurl.com/yd5tw2b.
(In a previous life, I worked on a project to create ASCII pickles that people could read and edit. I stupidly failed to publish it, but I have retained an interest.)
I found one reference on marshalling in functional languages; not sure if it will be useful, but the authors are smart: http://tinyurl.com/yc3hob9
I believe that Matthias Blume and/or Andrew Appel did something on this, but I can't find the paper. I also believe I reviewed something once for the Journal of Functional Programming, but I can't remember if the paper was accepted or who wrote it.
I suggest you ask Matthias Blume, Andrew Appel, and Phil Wadler if they can help.
Coq V5.10 had hash-consing and marshaling/unmarshaling. I didn't find anything in published form but the unmarshaling steps would be referenced as "reinterning" in the source code. Coq unmarhsaled values and then traversed them in order to re-create sharing, the obvious and only solution when all the language provides is an unmarshal function of type int_channel -> 'a.

Where can I discuss specific architecture/implementations I've created and get good feedback?

Let's say I've come up with what I think is a clean and elegant solution to a common generic requirement in coding projects. I'm happy to share my code but my main motivation for publishing it would be to get feedback from a quality audience about my solution and to determine if it has been done better elsewhere, if it could be done better, if it is buggy, etc. The normal sorts of reasons a programmer would want feedback for.
The Code Project - ugly forum/comment interface and a serious pain when you want to update the article after it has been categorised. Can also be horribly slow at times.
CodePlex - not really a general code community; people would have to know what they're looking for in advance to find my code.
It would be fantastic if something like a simplified version of The Code Project were produced by the Stack Overflow team with a view to allow users to show off pieces of code and get feedback, thus leading to general skills improvement of everyone participating. A bit like Scott Hanselman's Weekly Source Code blog posts, but with more of a communal purpose. In the mean time, however, what do you suggest?
It would be fantastic if something like a simplified version of The Code Project were produced by the Stack Overflow team with a view to allow users to show off pieces of code and get feedback, thus leading to general skills improvement of everyone participating.
There's now a sister Q&A website exactly for this purpose — Code Review.
You could post your solutions here, as an answer to a question describing the problem that it proposes to solve.
You're likely to get at least a little feedback, and see other edits/version of a similar solution.

Where is a good place to brush up on some math?

Math skills are becoming more and more essential, and I wonder where is a good place to brush up on some basics before moving on to some more CompSci specific stuff?
A site with lots of video's as well as practice exercises would be a double win but I can't seem to find one.
It depends on your math level. You should start by revising what you should know till that moment and then go further to algorithm mathmatics, geometry (transforms and etc), statistics and more.
There are tons of places on the internet were you can learn:
http://www.math.cornell.edu/Courses/courses.html
http://ocw.mit.edu/OcwWeb/web/courses/courses/index.htm
http://mathworld.wolfram.com/
and the list is open.
I recommend Project Euler if you want to train number theory and discrete maths. Lots of fun exercises, though you need to know a bit of programming.
Steve Yegge had a good blog post Math for programmers
Quoting some of it:
"But a few things I've learned recently might surprise you:
Math is a lot easier to pick up after you know how to program. In fact, if you're a halfway decent programmer, you'll find it's almost a snap.
They teach math all wrong in school. Way, WAY wrong. If you teach yourself math the right way, you'll learn faster, remember it longer, and it'll be much more valuable to you as a programmer.
Knowing even a little of the right kinds of math can enable you do write some pretty interesting programs that would otherwise be too hard. In other words, math is something you can pick up a little at a time, whenever you have free time.
Nobody knows all of math, not even the best mathematicians. The field is constantly expanding, as people invent new formalisms to solve their own problems. And with any given math problem, just like in programming, there's more than one way to do it. You can pick the one you like best.
Math is... ummm, please don't tell anyone I said this; I'll never get invited to another party as long as I live. But math, well... I'd better whisper this, so listen up: (it's actually kinda fun.)"
I will be boring and recommend actually taking university courses in math.
Without lectures and lessons with an assistant I know I would never be able to learn as much as I have. I just need some kind of motivation, since higher math is really hard.
That is, if you are looking for quite advanced stuff and actually want to get a deep understanding and don't want to crunch numbers. Crunching numbers is why we have MATLAB ;)
It would be good to know what level of math you have, and what you want to do with it. But I guess calculus, linear algebra and discrete math are the most useful courses to take.
I suggest books with good tutorials throughout if you're unable to partake in a maths course. For computer science-related maths Don Knuth's Concrete Mathematics is meant to be very good.
Obviously nothing can replace a good teacher, but good tutorials can come pretty damn close. You really get to learn the subject in the tutorials I think.
Get some videos from www.aduni.org
Math courses
It's a couple of years since this question has been asked, but there are a number of new sites and resources available now:
Khan Academy was originally intended for schoolkids, but it has since expanded to include material that would not be out of place in first-year university courses. It serves as a great way to review and fix fundamentals. It has videos and practice exercises, and keeps track of your progress.
EdX is an evolution of initiatives like MIT Open Courseware. It's now an alliance of universities like MIT, Berkeley and Stanford that offer free online university level courses, with video instruction and learning materials. My only complaint is that some of their courses have prerequisites (like single-variable calculus) that you need to pick up elsewhere, like Coursera, or the original MIT OpenCourseWare site.
Coursera offers more courses than EdX, and many of them are more basic, covering topics like pre-algebra and pre-calculus. The learning interface is not quite as cool as EdX's (which offers a scrollable captioning interface alongside most of it's videos), but the broader range of topics and courses covering fundamentals offers learning you just won't find on EdX.
A lot of the universities will actually publish their lecture materials online. So all you really need to do is find a suitable subject and then read the lecture materials and do the associated work. If you were really sneaky you could probably also go to the tutorials to get help :P
BetterExplained.com has some great math lectures. Its not video lectures but the author gives easy-to-understand explanations on math concepts.
Don't forget that iTunes now has available a load of maths lectures (and other subjects) from various mainstream universities - and all for free.
Since you want to brush up your math
I would suggest you to do a G search on UCCS math online
Or follow this link , and after registering yourself free you can browse the archives
I must say that It's common that you will find people recommending course X .
But rarely will you find people completing their recommended course ..
SO IN the case of number theory you must go for the latest course , the last offering has not high quality video ..
Also for Discrete Math ->There are no lecture notes on this site
So you have to figure out how to establish correspondence two online course (6.042 has good P sets and Notes) And The above Math course for Discrete Math .
I would discourage you to use YouTube (x minutes ) tutorials , Because most of them cover Math like History ..
A good course can be found by G searching Harvard OlI--
It has probability (Non Continuous) - There are P sets without solutions ..

What's a good beginning text on functional programming? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I like to study languages outside my comfort zone, but I've had a hard time finding a place to start for functional languages. I heard a lot of good things about Structure and Interpretations of Computer Programs, but when I tried to read through it a couple of years ago it just seemed to whiz over my head. I do way better with books than web sites, but when I visit the local book store the books on LISP look kind of scary.
So what's a good starting point? My goal is to be able to use a functional programming language to solve simple problems in 6 months or so, and the ability to move to more advanced topics, recognize when a functional language is the right tool for the job, and use the language to solve more problems over the course of 2-3 years. I like books that are heavy on examples but also include challenges to work through. Does such a thing exist for functional languages?
The Little Schemer teaches recursion really well, and it's fun and simple to read.
I also liked The Scheme Programming Language for a broader introduction into the language.
Try Real World Haskell. It's free online.
SICP is a great book.
This is probably my bias, but I thought ocaml was pretty easy to get into. You have the option of programming in a few different styles until you're completely comfortable. I posted a bunch of links to Haskell and Ocaml references that are books, with examples et cetera that seem right up your alley.
If you prefer Lisp, you can try to power through the 99-problems in Lisp(which you can do in any language, really), or you can watch the lectures from the people who wrote SICP.
Further down the road, get a hold of "Purely Functional Data Structures", as it'll get into the hard-core deep design and considerations you have to take into account in functional languages --it uses ML (which ocaml derived from).
I really recommend "On Lisp" from Paul Graham.
It is concise and very readable even for beginners in functional programming (as I was when I read it). It contains a lot of very short examples, each which helps to understand one single thing.
I often thought reading this book: this is just the language containing exactly the features I ever wanted in other (nonfunctional) languages, but never got. :-(
And this is exactly the book to learn it, always comprehensible, sometimes even funny!
You may get it for free at the author's site!
I really like Thompson’s “Haskell: The Craft of Functional Programming” because it’s well written and Haskell allows an easier start than other functional languages while being completely pure (unlike Lisp or Scheme).
Since there are a bunch of different functional programming languages, it's hard to recommend books. But if you're interested in Common Lisp, recently I've been reading "Practical Common Lisp" by Peter Seibel, which you can check out online for free before dropping your hard earned cash on it. It's a pretty gentle introduction to CL, with great explanations and tons of examples. Seibel's a great writer (example: read the story of Mac,) he's good at keeping you engaged, which is really where SICP falls down, I think. It's just so dry! But while Practical Common Lisp is pretty example-heavy, it doesn't really have challenges to work through, although the examples are mostly designed to let you continue to work and build on them.
Another good book, this one Scheme-oriented: How to Design Programs. (Online)
I haven't had as much time with this book, being more of a Lisper than a Schemer myself, but it's well written, has good explanations and examples, and has lots of exercises to work on. It seems pretty popular in the Scheme crowd.
The Schemers Guide and related software - seriously good stuff
http://www.schemers.com/tsg.html
Check out Introduction to functional programming. It offers a different perspective.
I found The Little Schemer a great, great introduction to functional programming. It's entirely based on simple, bite sized examples which are built up upon as the book goes on.
I learned from Jeffrey Ullman's Elements of ML Programming, which is pretty good. It loses points for being about Standard ML, when OCaml, F#, and Haskell are (seemingly) more popular.
I feel Purely Functional Data Structures by Chris Okasaki is worth a look.
FYI http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf
Haskell is a very good functional programming language for beginners. Someone had asked about good resources for Haskell, so I will point you there.
If you are looking for a good book on Functional Programming, I would recommend "Functional Programming: Practice and Theory" by Bruce J. Maclennan.
It is however required that you brush up on your Set Theory and Logic before giving it a read. It includes examples in LISP, Haskell and other languages.
If you have experience with .NET, Expert #F is good.
F# is derived from OCaml. Lisp is more pure as functional languages go.
Real-World Functional Programming (with examples in F# and C#)
I have heard good things about Haskell Functional Programming, but I also found this list of functional programming books at amazon that might be helpful to you.

Resources